WO2021179977A1 - Packet processing method and device - Google Patents

Packet processing method and device Download PDF

Info

Publication number
WO2021179977A1
WO2021179977A1 PCT/CN2021/078975 CN2021078975W WO2021179977A1 WO 2021179977 A1 WO2021179977 A1 WO 2021179977A1 CN 2021078975 W CN2021078975 W CN 2021078975W WO 2021179977 A1 WO2021179977 A1 WO 2021179977A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
model
message
file
protobuf
Prior art date
Application number
PCT/CN2021/078975
Other languages
French (fr)
Chinese (zh)
Inventor
陈可
胡元波
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2021179977A1 publication Critical patent/WO2021179977A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/565Conversion or adaptation of application format or content
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications

Definitions

  • This application relates to the field of network communication technology, and in particular to a message processing method and device.
  • NETCONF Network Configuration Protocol
  • the data based on the YANG data model is generally encapsulated through the northbound interface of the network device, so as to realize data conversion between network devices with different configuration management models and network management devices.
  • the present application provides a message processing method and device to solve the problems of low efficiency in configuration management of network devices, low flexibility in use, and high response delay.
  • this application provides a message processing method, the method is applied to a network device, and the method includes:
  • a message request message based on the YANG data model is used to confirm the corresponding data object based on the Protobuf data model to generate a message response message. Since the YANG data model and the Protobuf data model have corresponding data structures, the YANG data model The characteristics can also be embodied in the Protobuf data model, and when the management device configures and manages the network equipment through the message request message based on the YANG data model, it can give full play to the flexible and efficient advantages of the YANG data model to achieve, for example, composite Complicated operation instructions such as conditional query improve the efficiency and flexibility of configuration management. At the same time, since the conversion between different message data formats during the message transmission process between the management device and the network device is avoided, the efficiency of message transmission is improved, and the response delay of the network device is reduced.
  • the method further includes:
  • each sub-object in each memory object is converted into each data value combination, wherein the mapping file is used to indicate the conversion between the sub-object and the data value combination Relationship, the data value combination is a data expression based on the Protobuf data model; each data object is generated according to the prestored first model file and each data value combination, wherein the first model file is based on Protobuf data model file.
  • the memory objects that use different configuration management models are converted into data objects based on the Protobuf data model, which is equivalent to preprocessing the memory objects that store configuration data And cache, so that when the subsequent management device configures and manages the network device, the data object can be directly determined through the message request message, and the data object is directly returned to the management device as a message response message.
  • the format conversion improves the efficiency and flexibility of message interaction.
  • the mapping file includes conversion information of one or more memory objects, and the conversion information of each memory object includes object identification and sub-object information; wherein, the sub-object information includes one or more sub-objects.
  • the characterization information of the object, the characterization information includes the first path and format attributes; the first path is used to indicate the node corresponding to the child object in the second model file, and the node corresponding to the child object has a data value, and the second model
  • the file is a file based on the YANG data model.
  • the second model file includes N nodes, and each M node of the N nodes corresponds to each message request message; the format attribute is used to indicate the data expression mode based on the Protobuf data model ; N and M are integers greater than or equal to 1, and M is less than or equal to N.
  • the conversion information of one or more memory objects set in the mapping file is used to realize the conversion of the memory object to the data object.
  • the memory object can correspond to more configurations
  • the type of data realizes the further refinement of the configuration data corresponding to the memory object, and improves the flexibility of network device configuration management.
  • the conversion information of each type of memory object further includes a second path; wherein, the second path is used to indicate a node corresponding to the memory object in the second model file.
  • each sub-object in each memory object is converted into each data value combination, including:
  • the node corresponding to each sub-object determines the node corresponding to each sub-object, and read the data value in the node corresponding to each sub-object; according to the format attribute of each sub-object, the node corresponding to each sub-object The data value in is converted to each data value combination.
  • the value and data format of the node corresponding to the sub-object is determined according to the first path and format attribute.
  • the format attribute can be set according to specific needs. Therefore, the memory object can correspond to more types of configuration data, and the network is improved. The flexibility of equipment configuration management.
  • generating each of the data objects according to the pre-stored first model file and the combination of each of the data values includes:
  • each Protobuf object is generated, where the Protobuf object includes the object identification and the attribute definition based on Protobuf; the combination of each data value is assigned to each Protobuf object, and each Protobuf object is obtained. 1. The data object.
  • the method further includes:
  • Obtain the second model file convert the second model file into the first model file according to a preset mapping relationship, wherein the mapping relationship is used to indicate the attribute definition in the second model file The mapping relationship with the attribute definition in the first model file.
  • the second model file is converted into the first model file according to the preset mapping relationship, which realizes the conversion between different model files. Because the process of generating data objects and assigning values to data objects does not require the northbound interface of the device , It can be completed after the device is initialized, therefore, the efficiency and flexibility of message interaction between the management device and the network device are improved.
  • the attribute definition includes one or more of the following: declaration definition, type definition, and supplementary definition; wherein, the supplementary definition includes one or more of the following: key definition, namespace Definition, name definition, decimal place definition.
  • This application through attribute definitions and supplementary definitions, enables the Protobuf data model to fully realize the characteristics of the YANG data model, and further realizes the report between the management device that sends and receives messages based on the YANG data model and the network device that stores data based on the Protobuf data model. Text interaction, and since the attribute definition and supplementary definition can be defined as needed, the flexibility of use is improved.
  • the present application provides a message processing device, including:
  • the receiving module is configured to receive a message request message from the management device, where the message request message is text information based on the YANG data model;
  • the determining module is configured to determine a data object corresponding to the message request message according to a pre-stored data set, wherein the data set includes one or more data objects, and the data objects are data based on the Protobuf data model ;
  • the sending module is configured to determine the data object corresponding to the message request message as a message response message, and send the message response message to the management device.
  • a message request message based on the YANG data model is used to confirm the corresponding data object based on the Protobuf data model to generate a message response message. Since the YANG data model and the Protobuf data model have corresponding data structures, the YANG data model The characteristics can also be embodied in the Protobuf data model, and when the management device configures and manages the network equipment through the message request message based on the YANG data model, it can give full play to the flexible and efficient advantages of the YANG data model to achieve, for example, composite Complicated operation instructions such as conditional query improve the efficiency and flexibility of configuration management. At the same time, since the conversion between different message data formats during the message transmission process between the management device and the network device is avoided, the efficiency of message transmission is improved, and the response delay of the network device is reduced.
  • the message processing device further includes a generating module.
  • the generating module is used for:
  • each sub-object in each memory object is converted into each data value combination, wherein the mapping file is used to indicate the conversion between the sub-object and the data value combination Relationship, the data value combination is a data expression based on the Protobuf data model; each data object is generated according to the prestored first model file and each data value combination, wherein the first model file is based on Protobuf data model file.
  • the memory objects that use different configuration management models are converted into data objects based on the Protobuf data model, which is equivalent to preprocessing the memory objects that store configuration data And cache, so that when the subsequent management device configures and manages the network device, the data object can be directly determined through the message request message, and the data object is directly returned to the management device as a message response message.
  • the format conversion improves the efficiency and flexibility of message interaction.
  • the mapping file includes conversion information of one or more memory objects, and the conversion information of each memory object includes object identification and sub-object information; wherein, the sub-object information includes one or more sub-objects.
  • the characterization information of the object, the characterization information includes the first path and format attributes; the first path is used to indicate the node corresponding to the child object in the second model file, and the node corresponding to the child object has a data value, and the second model
  • the file is a file based on the YANG data model.
  • the second model file includes N nodes, and each M node of the N nodes corresponds to each message request message; the format attribute is used to indicate the data expression mode based on the Protobuf data model ; N and M are integers greater than or equal to 1, and M is less than or equal to N.
  • the conversion information of one or more memory objects set in the mapping file is used to realize the conversion of the memory object to the data object.
  • the memory object can correspond to more configurations
  • the type of data realizes the further refinement of the configuration data corresponding to the memory object, and improves the flexibility of network device configuration management.
  • the conversion information of each type of memory object further includes a second path; wherein, the second path is used to indicate a node corresponding to the memory object in the second model file.
  • the generating module converts each sub-object of each memory object into each data value combination according to the pre-stored mapping file, it is specifically used for:
  • the node corresponding to each sub-object determines the node corresponding to each sub-object, and read the data value in the node corresponding to each sub-object; according to the format attribute of each sub-object, the node corresponding to each sub-object The data value in is converted to each data value combination.
  • the value and data format of the node corresponding to the sub-object is determined according to the first path and format attribute.
  • the format attribute can be set according to specific needs. Therefore, the memory object can correspond to more types of configuration data, and the network is improved. The flexibility of equipment configuration management.
  • the generating module when the generating module generates each of the data objects according to the combination of the pre-stored first model file and each of the data values, it is specifically used to:
  • each Protobuf object is generated, where the Protobuf object includes the object identification and the attribute definition based on Protobuf; the combination of each data value is assigned to each Protobuf object, and each Protobuf object is obtained. 1. The data object.
  • the device further includes: a conversion module.
  • the conversion module is used for:
  • Obtain the second model file convert the second model file into the first model file according to a preset mapping relationship, wherein the mapping relationship is used to indicate the attribute definition in the second model file The mapping relationship with the attribute definition in the first model file.
  • the second model file is converted into the first model file according to the preset mapping relationship, which realizes the conversion between different model files. Because the process of generating data objects and assigning values to data objects does not require the northbound interface of the device It can be completed after the device is initialized. Therefore, the efficiency and flexibility of message interaction between the management device and the network device are improved.
  • the attribute definition includes one or more of the following: declaration definition, type definition, and supplementary definition; wherein, the supplementary definition includes one or more of the following: key definition, namespace Definition, name definition, decimal place definition.
  • This application through attribute definitions and supplementary definitions, enables the Protobuf data model to fully realize the characteristics of the YANG data model, and further realizes the report between the management device that sends and receives messages based on the YANG data model and the network device that stores data based on the Protobuf data model. Text interaction, and since the attribute definition and supplementary definition can be defined as needed, the flexibility of use is improved.
  • this application provides a network device, including a processor, a receiver, and a transmitter.
  • the receiver is configured to receive a message request message from the management device, where the message request message is a message based on extensible markup language XML; and the processor is configured to determine and The data object corresponding to the message request message, wherein the data set includes one or more data objects, and the data object is data based on the Protobuf data model; the data object corresponding to the message request message , It is determined to be a message response message; the transmitter is configured to send the message response message to the management device, where the message response message is an XML-based message.
  • a message request message based on the YANG data model is used to confirm the corresponding data object based on the Protobuf data model to generate a message response message. Since the YANG data model and the Protobuf data model have corresponding data structures, the YANG data model The characteristics can also be embodied in the Protobuf data model, and when the management device configures and manages the network equipment through the message request message based on the YANG data model, it can give full play to the flexible and efficient advantages of the YANG data model to achieve, for example, composite Complicated operation instructions such as conditional query improve the efficiency and flexibility of configuration management. At the same time, since the conversion between different message data formats during the message transmission process between the management device and the network device is avoided, the efficiency of message transmission is improved, and the response delay of the network device is reduced.
  • the processor is also used for:
  • each sub-object in each memory object is converted into each data value combination, wherein the mapping file is used to indicate the conversion between the sub-object and the data value combination Relationship, the data value combination is a data expression based on the Protobuf data model; each data object is generated according to the pre-stored first model file and each data value combination, wherein the first model is based on the Protobuf The file of the data model.
  • the memory objects that use different configuration management models are converted into data objects based on the Protobuf data model, which is equivalent to preprocessing the memory objects that store configuration data And cache, so that when the subsequent management device configures and manages the network device, the data object can be directly determined through the message request message, and the data object is directly returned to the management device as a message response message.
  • the format conversion improves the efficiency and flexibility of message interaction.
  • the mapping file includes conversion information of one or more memory objects, and the conversion information of each memory object includes object identification and sub-object information; wherein, the sub-object information includes one or more sub-objects.
  • the characterization information of the object, the characterization information includes the first path and format attributes; the first path is used to indicate the node corresponding to the child object in the second model file, and the node corresponding to the child object has a data value, and the second model
  • the file is a file based on the YANG data model.
  • the second model file includes N nodes, and each M node of the N nodes corresponds to each message request message; the format attribute is used to indicate the data expression mode based on the Protobuf data model ; N and M are integers greater than or equal to 1, and M is less than or equal to N.
  • the conversion information of one or more memory objects set in the mapping file is used to realize the conversion of the memory object to the data object.
  • the memory object can correspond to more configurations
  • the type of data realizes the further refinement of the configuration data corresponding to the memory object, and improves the flexibility of network device configuration management.
  • the conversion information of each type of memory object further includes a second path; wherein, the second path is used to indicate a node corresponding to the memory object in the second model file.
  • the processor when the processor is used to convert each sub-object of each memory object into each data value combination according to a pre-stored mapping file, it is specifically used for:
  • the node corresponding to each sub-object determines the node corresponding to each sub-object, and read the data value in the node corresponding to each sub-object; according to the format attribute of each sub-object, the node corresponding to each sub-object The data value in is converted to each data value combination.
  • the value and data format of the node corresponding to the sub-object is determined according to the first path and format attribute.
  • the format attribute can be set according to specific needs. Therefore, the memory object can correspond to more types of configuration data, and the network is improved. The flexibility of equipment configuration management.
  • the processor when used to generate each of the data objects according to the combination of the pre-stored first model file and each of the data values, it is specifically used to:
  • each Protobuf object is generated, where the Protobuf object includes the object identification and the attribute definition based on Protobuf; the combination of each data value is assigned to each Protobuf object, and each Protobuf object is obtained. 1. The data object.
  • the processor is also used for:
  • Obtain the second model file convert the second model file into the first model file according to a preset mapping relationship, wherein the mapping relationship is used to indicate the attribute definition in the second model file The mapping relationship with the attribute definition in the first model file.
  • the second model file is converted into the first model file according to the preset mapping relationship, which realizes the conversion between different model files. Because the process of generating data objects and assigning values to data objects does not require the northbound interface of the device , It can be completed after the device is initialized, therefore, the efficiency and flexibility of message interaction between the management device and the network device are improved.
  • the attribute definition includes one or more of the following: declaration definition, type definition, and supplementary definition; wherein, the supplementary definition includes one or more of the following: key definition, namespace Definition, name definition, decimal place definition.
  • This application through attribute definitions and supplementary definitions, enables the Protobuf data model to fully realize the characteristics of the YANG data model, and further realizes the report between the management device that sends and receives messages based on the YANG data model and the network device that stores data based on the Protobuf data model. Text interaction, and since the attribute definition and supplementary definition can be defined as needed, the flexibility of use is improved.
  • the present application provides a computer-readable storage medium, including instructions, which when run on a computer, cause the computer to execute the method described in any one of the first aspects above.
  • the present application provides a computer program, including program code.
  • the program code executes the method described in any one of the first aspects above.
  • FIG. 1 is a schematic diagram of a network architecture provided by an embodiment of this application.
  • FIG. 2 is a schematic diagram 1 of an application scenario provided by an embodiment of this application.
  • FIG. 3 is a second schematic diagram of an application scenario provided by an embodiment of this application.
  • FIG. 5 is a schematic flowchart of another message processing method provided by an embodiment of this application.
  • FIG. 6 is a schematic diagram of the conversion of a memory object provided by an embodiment of the application.
  • FIG. 7 is a schematic flowchart of another message processing method provided by an embodiment of the application.
  • FIG. 8 is a schematic block diagram of a message processing apparatus provided by an embodiment of the application.
  • FIG. 9 is a schematic block diagram of another message processing apparatus provided by an embodiment of the application.
  • FIG. 10 is a schematic structural diagram of a network device provided by an embodiment of this application.
  • the embodiments of this application are applied to network devices, network equipment, network systems that make up SDN, or any system that can execute the embodiments of this application.
  • the following explains some terms in this application for the convenience of those skilled in the art understand. It should be noted that when the solutions of the embodiments of this application are applied to a network system, or any system that can execute the embodiments of this application, the names of the network devices and network equipment may change, but this does not affect the implementation of this application. Example of the implementation of the program.
  • Network equipment refers to equipment used for network data transmission, such as switches, routers, etc.
  • NETCONF is a network configuration management protocol based on Extensible Markup Language (XML).
  • NETCONF provides a mechanism for managing network equipment. Users can use this mechanism to add, modify, and delete network equipment. Configure to obtain configuration and status information of network devices.
  • NETCONF adopts the client/server model (Client/Server, C/S).
  • C/S client/server model
  • the Client corresponds to the management device
  • the Server corresponds to the network device.
  • the NETCONF-based configuration management model it is possible to manage the device Data exchange with network equipment.
  • NETCONF has a four-layer structure, namely, the Secure Transport Layer, the Message Layer, the Operation Layer, and the Content Layer.
  • the secure transport layer is used to specify a secure encrypted communication protocol and perform data transmission.
  • the message layer is used to implement message sending and receiving between Client and Server.
  • the operation layer is used to implement specific command operations of the Client on the Server based on the message layer, such as query, edit, copy, delete, etc.
  • the content layer is used to define the specific protocol content.
  • the content layer is the most important layer in NETCONF.
  • the content layer in NETCONF is open, that is, NETCONF itself does not specify a specific data structure for the content layer, but through another next generation (Yet Another Next Generation, YANG) modeling
  • YANG Next Generation
  • the language models the data structure to define the specific content of the content layer of the NETCONF protocol. Therefore, users can establish a YANG data model according to their needs to realize the management of network devices on the server side.
  • NETCONF needs to be extended and modified, it can be realized by modifying the YANG data model. Therefore, the configuration management model based on NETCONF has better scalability and management efficiency.
  • Protocol is an efficient structured data storage method that can be used to serialize data, that is, to convert data structures or objects into a format that can be stored and transmitted (such as network transmission). Many advantages such as cross-platform, high efficiency, and good scalability. Through Protobuf, data structure modeling and conversion can be achieved.
  • Multiple means two or more than two, and other measure words are similar.
  • “And/or” describes the association relationship of the associated objects, indicating that there can be three types of relationships, for example, A and/or B, which can mean: A alone exists, A and B exist at the same time, and B exists alone.
  • the character “/” generally indicates that the associated objects before and after are in an "or” relationship.
  • Correspondence can refer to an association relationship or binding relationship, and the correspondence between A and B means that there is an association relationship or binding relationship between A and B.
  • FIG. 1 is a schematic diagram of a network architecture provided by an embodiment of the application.
  • the network architecture shown in Figure 1 includes: a management device 11, a network device 12, a network device 13, and a network device 14.
  • the management device 11 forms a network with the network device 12, the network device 13, and the network device 14.
  • the management device 11 passes NETCONF
  • the protocol performs configuration management on the network device 12, the network device 13, and the network device 14.
  • the network device 12 and the network device 13 are configuration management models based on a YANG data model
  • the network device 14 is a configuration management model based on a non-YANG data model, for example, a configuration management model based on CLI.
  • FIG. 2 is a schematic diagram 1 of an application scenario provided by an embodiment of the application.
  • the management device 11 sends a message request message to the network device 12 and the network device 13 to characterize the interaction instruction, because the network device 12 and the network device 13 are both based on The configuration management model of the YANG data model. Therefore, the network device 12 and the network device 13 can directly recognize and respond to the message request message, and return the message response message to the management device 11 to complete the management device 11 and the network device 12 and network device 13's data interaction process.
  • FIG. 3 is a second schematic diagram of an application scenario provided by an embodiment of the application.
  • the management device 11 sends a message request message to the network device 14 to represent an interactive instruction. Since the network device 14 is a configuration management model based on a non-YANG data model, Therefore, the network device 14 cannot directly recognize and respond to the message request message. It needs to parse the message request message first to execute the corresponding interactive instruction. After the execution is completed, the response result is again converted into data that conforms to the YANG data model. , And return to the management device 11 as a message response message to complete the data interaction process between the management device 11 and the network device 14.
  • the configuration management model of the network device does not match the configuration management model of the management device, it is necessary to convert the data and instructions in the data interaction process between the management device and the network device.
  • the configuration management model of the YANG data model is more flexible, when the operation instructions in the configuration management model based on the YANG data model are converted to the operation instructions in the configuration management model based on the non-YANG data model, some complex operation instructions cannot be realized.
  • the operation instruction in the configuration management model based on the YANG data model is "Query the description information of all the interfaces that are 10GE and the status is up". Because the operation instruction set in the configuration management model based on CLI is fixed, so The inability to implement the above-mentioned operation instructions causes the problems of low configuration management efficiency and low flexibility of use.
  • FIG. 4 is a schematic flowchart of a message processing method provided by an embodiment of the application.
  • the message processing method provided in this embodiment is applied to a network device. As shown in FIG. 4, the method includes:
  • the management device may be a network management device, such as a network management server, a network management terminal, etc., network management software is installed in the network management device, and the user can configure and manage network devices in the same network through the network management software, such as configuration Data query, configuration data modification, configuration data replication, configuration data deletion, etc.
  • the management device may also be a controller device or other devices that function as a controller, which can run a controller program and perform configuration management on network devices in the same network.
  • the specific form of the management device is not limited here.
  • the network device may be a switch, router, or other access network device.
  • the management equipment and the network equipment exchange data through the NETCONF protocol based on the YANG data model.
  • the management device When the management device needs to perform configuration management on the network device, it sends a message-based request message to the network device.
  • the message request message is used to characterize specific configuration management instructions and content, such as querying interface types and modifying interface names.
  • the network device can receive the message request message and respond according to the configuration management instruction and content represented by the message request message.
  • the message request message includes instruction information and content information corresponding to the instruction information.
  • the message request message is used to characterize an instruction to modify an interface name, and the interface name eth1 is eth0.
  • the instruction information in the message request message is to modify the interface, and the content information is eth1 and eth2.
  • the implementation manner of the message request message for modifying the interface name here is exemplary, and various other manners may also be used, which are not limited herein.
  • the message request message is text information based on the YANG data model, such as an XML file, or an Object Notation (JavaScript Object Notation, JSON) file, or other data exchange formats that meet specific specifications for storing and representing data and information, here There is no specific limitation.
  • S102 Determine a data object corresponding to the message request message according to the pre-stored data set, where the data set includes one or more data objects, and the data objects are data based on the Protobuf data model.
  • the pre-stored data set may include two types of state data and configuration data, where the state data may be inherent attribute data of the network device and current operating state data, for example, the type of port, the state of the port, and the like. Status data can only be queried.
  • the configuration data may be data configured by the user on the network device in a certain way, for example, the name of the port and the description of the port.
  • the configuration data may also have multiple sub-data sets, and each sub-data set may be, for example, a database.
  • the ⁇ running/> database can be used to store the configuration data that is currently in effect; the ⁇ candidate/> database can be used to store the configuration data that can be submitted as effective; the ⁇ startup/> database can be used to store the configuration data at startup.
  • the sum of status data and configuration data can be collectively referred to as a data set.
  • the data object is the basic unit of the data collection, for example, the type of the port, the state of the port, the name of the port, the description of the port, and so on.
  • Different data objects can correspond to status data or configuration data.
  • the configuration management instruction and content specifically characterized by the message request message the corresponding data object can be determined.
  • the configuration management instruction and content represented by the message request message is to query the port type of port A, then the data object A corresponding to the message request message is the port type of the port; for another example, the message request message represents The configuration management instruction and content of is to query the description information of all interfaces that are 10GE and the state is up, then the data object A corresponding to the message request message is the description information of the interface that is 10GE and the state is up.
  • the data object is the data based on the Protobuf data model.
  • the Protobuf data model has a mapping relationship with the YANG data model.
  • the Protobuf data model is a preset data model for storing data collections, which can realize some or all of the features of the YANG data model.
  • Protobuf can construct a Protobuf data model according to specific needs, so that the original data can be organized according to the Protobuf data model to form data based on the Protobuf data model.
  • YANG provides some basic data structures, such as module, container, and leaf. These basic data structures constitute the data structure of the YANG data model.
  • the mapping relationship between the Protobuf data model and the YANG data model the data structure provided by Protobuf can be used to map the data structure of the YANG data model.
  • the specific mapping method between the Protobuf data model and the YANG data model can be specifically set according to requirements, and there is no restriction here.
  • the data object based on the Protobuf data model and the message request message based on the YANG data model can form a corresponding data model, and then determine the correspondence with the message request message The data object.
  • the data object After determining the data object corresponding to the message request message, since the data format of the data object based on the Protobuf data model corresponds to the data format of the message response message based on the YANG data model, the data object can be directly used as the message response message Send to the management device to realize the response to the message request message sent by the management device, and then realize the data interaction process between the management device and the network device.
  • the data object and the message response message may be an XML file or other data exchange format that conforms to a specific specification for storing and representing data and information.
  • the management device is a network management device.
  • the network management device and the network device are in the same network.
  • the network management device sends a message request message to the network device according to the NETCONF protocol based on the YANG data model.
  • the message request message represents the port to port A.
  • Type the instruction to query.
  • the network device receives the message request message sent by the network management device.
  • the network device stores a data set based on the Protobuf data model, and the data set includes multiple data objects.
  • the network device can directly determine the corresponding data object based on the Protobuf data model according to the message request message based on the YANG data model, and then combine the data object based on the Protobuf data model , In the form of XML files, return to the network management equipment, avoiding the conversion process between different data formats during the data interaction process between the network management equipment and the network equipment.
  • the message request message is received from the management device, where the message request message is text information based on the YANG data model; the data object corresponding to the message request message is determined according to the pre-stored data set, where: The data set includes one or more data objects, which are data based on the Protobuf data model; the data object corresponding to the message request message is determined as the message response message, and the message response message is sent to the management device.
  • the management device can configure the network device through the message request message based on the YANG data model During management, it can give full play to the flexible and efficient advantages of the YANG data model, realize complex operation instructions such as compound condition query, and improve the efficiency and flexibility of configuration management.
  • the efficiency of message transmission is improved, and the response delay of the network device is reduced.
  • FIG. 5 is a schematic flowchart of another message processing method provided by an embodiment of the application. As shown in FIG. 5, the method includes:
  • a memory object refers to data that exists in the memory in a specific data format after the network device is running.
  • Each memory object includes a set of data, which is used to characterize different configuration data, for example, port speed.
  • the memory object includes one or more sub-objects, and the sub-objects are used to represent more detailed configuration data.
  • the memory object PORT_SPEED is a port rate.
  • it usually has multiple different port rates, for example, a first port rate and a second port rate.
  • the first port rate and the second port rate are sub-objects of the memory object.
  • the collection of multiple sub-objects constitutes a memory object corresponding to a data object.
  • the data value combination is a data expression based on the Protobuf data model, that is, data that conforms to the Protobuf data model. According to the pre-stored mapping file, each sub-object in the memory object can be converted into a data value combination that conforms to the Protobuf data model, and then realize Convert memory objects into data conforming to the Protobuf data model.
  • Fig. 6 is a schematic diagram of the conversion of a memory object provided by an embodiment of the application. As shown in Fig. 6, Fig. 6 shows the process of converting each sub-object in the memory object into each data value combination in step S201.
  • the specific data model of the object is determined by the network device. For network devices that use different configuration management models, the data model of the memory object storing configuration data is different. Through a specific mapping relationship, the memory object can be transformed into a unified For data that conform to the Protobuf data model, the Protobuf data model corresponds to the YANG data model.
  • the specific mapping relationship can be obtained through a pre-stored mapping file.
  • S202 Generate each data object according to the pre-stored first model file and each data value combination, where the first model file is a file based on the Protobuf data model.
  • the first model file is a description file of the Protobuf data model.
  • the specific data structure of the Protobuf data model can be determined, and the Protobuf data model has a mapping relationship with the YANG data model.
  • the first port rate is 1000; the second port rate is 1200; the third port rate is 1500, correspondingly generate the first port rate and the second port rate that conform to the Protobuf data model ,
  • the data object of the second port rate, and the specific data values 1000, 1200, 1500 are respectively assigned to the first port rate, the second port rate, and the second port rate in the data object representing the port rate, so as to realize the generation of each
  • the purpose of the data object corresponding to the memory object is to complete the conversion of memory objects with different data structures to data objects based on the Protobuf data model.
  • S203 Receive a message request message from the management device, where the message request message is text information based on the YANG data model.
  • this step may refer to step S101 shown in FIG. 4, which will not be repeated.
  • S204 Determine a data object corresponding to the message request message according to the pre-stored data set, where the data set includes one or more data objects, and the data objects are data based on the Protobuf data model.
  • this step may refer to step S102 shown in FIG. 4, and details are not described herein again.
  • S205 Determine the data object corresponding to the message request message as the message response message, and send the message response message to the management device.
  • this step may refer to step S103 shown in FIG. 4, and details are not described herein again.
  • the management device is a network management device, and the network management device and the network device are in the same network.
  • the network device converts the memory object running in the memory into a data object based on the Protobuf data model according to the preset mapping file and the preset first model file, that is, caches.
  • the Protobuf data model and the YANG data model are unified in data structure and correspond in function.
  • this process may occur in the initialization phase after the network device is turned on, or under other triggering conditions, which is not specifically limited here.
  • the network management device sends a message request message to the network device according to the NETCONF protocol based on the YANG data model.
  • the message request message represents an instruction to query the port type of port A.
  • the network device receives the message request message sent by the network management device, and a data set based on the Protobuf data model is cached in the network device, and the data set includes multiple data objects.
  • the network device can directly determine the corresponding data object based on the Protobuf data model according to the message request message based on the YANG data model, and then combine the data object based on the Protobuf data model , In the form of XML files, return to the network management equipment, avoiding the conversion process between different data formats during the data interaction process between the network management equipment and the network equipment.
  • mapping file is used to indicate the conversion between the sub-object and the data value combination Relationship
  • the data value combination is a data expression based on the Protobuf data model
  • each data object is generated according to the pre-stored first model file and each data value combination, where the first model file is a file based on the Protobuf data model; received from Manage the device's message request message and respond to it.
  • the memory object in the network device is converted into a data object based on the Protobuf data model, and the data object based on the Protobuf data model and the message request based on the YANG data model
  • the data structure of the message has a corresponding relationship. Therefore, the network device can access the data object according to the message request message, which avoids that the network device needs to first respond to the message request message and the message response message when receiving and responding to the message request message.
  • the problem of conversion improves the efficiency and flexibility of network equipment configuration management, and reduces the response delay of network equipment.
  • FIG. 7 is a schematic flowchart of another message processing method provided by an embodiment of the application. As shown in FIG. 7, the method includes:
  • the mapping file includes conversion information of one or more kinds of memory objects, and the conversion information can be regarded as a set of information for realizing the conversion of memory objects to data objects based on the Protobuf data model.
  • the memory object includes sub-objects, and the conversion information of each type of memory object includes object identification and sub-object information.
  • the object identifier is a unique identifier that characterizes the memory object. For example, an object identifier is WDMPORT_OXUCNSPEED. According to this object identifier, a memory object describing the port rate can be uniquely determined.
  • the sub-object information corresponds to the sub-object, and is used to describe the specific implementation of the sub-object, for example, how the value of the sub-object is represented. According to the conversion information composed of the object identifier and the sub-object information, the conversion from the memory object to the data object based on the Protobuf data model can be realized.
  • the sub-object information includes the characterization information of one or more sub-objects, and the characterization information includes the first path and format attributes; the first path is used to indicate the node corresponding to the sub-object and the node corresponding to the sub-object in the second model file
  • the second model file is a file based on the YANG data model, the second model file includes N nodes, and each M node in the N nodes corresponds to each message request message; the format attribute is used to indicate the data based on Protobuf
  • N and M are integers greater than or equal to 1, and M is less than or equal to N.
  • the conversion information of each type of memory object further includes a second path; where the second path is used to indicate a node corresponding to the memory object in the second model file.
  • mapping file The following is a schematic code of a data structure of a mapping file provided in an embodiment of this application.
  • TransValue ⁇ is the conversion information of a memory object, and the conversion from the memory object to the data object can be realized through the conversion information TransValue ⁇ .
  • path is the second path, which is used to indicate the node corresponding to the memory object in the second model file.
  • Id is the object identifier
  • each conversion information TransValue ⁇ contains a globally unique object identifier id, which is used to distinguish the conversion information corresponding to different memory objects.
  • the keys: ⁇ is the sub-object information.
  • the sub-object information keys: ⁇ includes the parameter path and the parameter format.
  • path is the first path, which is used to indicate the node corresponding to the sub-object in the YANG model file.
  • the operation of the leaf nodes in the model is very flexible, and can realize operations such as compound instructions. Therefore, through the parameter path mapping to the leaf nodes of the specific YANG model, the data objects corresponding to the conversion information of the keys: ⁇ can also be implemented.
  • the parameter format is format data, which is used to define the specific data format of keys: ⁇ , which can be set according to specific requirements.
  • the implementation method is a common technical means in the field, and will not be repeated here.
  • format: ⁇ is the format attribute, which is used to indicate the data expression method based on the Protobuf data model, for example, whether the unit of the bandwidth rate is mega or gigabit.
  • the first path is a specific node address. According to the first path, the position of the node corresponding to the child object can be directly determined, and the data value of the child object located at the node can be read. Therefore, by separately processing according to multiple first paths, the data value in the node corresponding to each sub-object can be obtained respectively.
  • the data value in the node corresponding to each sub-object is organized into each group of data value combinations.
  • step S303 the method further includes:
  • the second model file is a file based on the YANG data model, for example, a text file. Since there is a certain similarity between Protobuf and YANG, the conversion between the second model and the first model file can be realized through the preset mapping relationship, so that the first model file can achieve the same function as the second model file And data structure.
  • step S3031 and step S3032 can be set to be executed at any position before S304.
  • the first model file is a description file of the Protobuf data model, for example, a text file.
  • the specific data structure of the Protobuf data model can be determined.
  • the method of generating each Protobuf object according to the first model file is, for example, obtaining the data structure declared in the first model file and compiling with the data structure of the compiler to obtain each Protobuf object.
  • the object identification and conversion information The object identifiers are the same.
  • the object identifier is the unique identifier of the memory object and the data object. Different Protobuf objects have different object identifiers.
  • the object identifier can be preset and can be changed according to specific needs, or it can be bound to the hardware parameters of the network device but cannot be changed.
  • the specific implementation of the object identifier is not limited here.
  • the property definition based on Protobuf refers to the characteristics of the specific Protobuf data model of the Protobuf object.
  • the property definition between each Protobuf object may be the same or different.
  • the attribute definition includes one or more of the following: declaration definition, type definition, and supplementary definition.
  • the supplementary definition includes one or more of the following: key definition, name space definition, name definition, and decimal place definition.
  • the mapping relationship between each data value combination and each Protobuf object can be determined, and the value of each data value combination can be assigned to the Protobuf object to obtain the corresponding data object.
  • the data object is based on the Protobuf data model.
  • the Protobuf data model and the YANG data model are unified in data structure and correspond in function.
  • this step may refer to step S101 shown in FIG. 4, which will not be repeated.
  • S307. Determine a data object corresponding to the message request message according to the pre-stored data set, where the data set includes one or more data objects, and the data objects are data based on the Protobuf data model.
  • this step may refer to step S102 shown in FIG. 4, and details are not described herein again.
  • this step may refer to step S102 shown in FIG. 4, and details are not described herein again.
  • the conversion information of one or more memory objects set in the mapping file is used to realize the conversion of the memory object to the data object. Since the object identifier and sub-object information are set in the conversion information, the memory object can correspond to more The type of configuration data realizes the further refinement of the configuration data corresponding to the memory object, and improves the flexibility of network device configuration management.
  • FIG. 8 is a schematic block diagram of a message processing apparatus provided by an embodiment of the application.
  • the apparatus 8 in the embodiment of the present application may be the network device in the foregoing method embodiment, or may be one or more chips in the network device.
  • the apparatus may be used to perform part or all of the functions of the network device in the foregoing method embodiment.
  • the device may include the following modules.
  • the receiving module 91 is configured to receive a message request message from the management device, where the message request message is text information based on the YANG data model.
  • the determining module 92 is configured to determine the data object corresponding to the message request message according to the pre-stored data set, where the data set includes one or more data objects, and the data objects are data based on the Protobuf data model.
  • the sending module 93 is configured to determine the data object corresponding to the message request message as the message response message, and send the message response message to the management device.
  • the receiving module 91 may perform step S101 of the method shown in FIG. 4, or may perform step S203 of the method shown in FIG. 5; or may perform step S306 of the method shown in FIG. 7; the determining module 92 may perform the method shown in FIG. Step S102 of the method shown in FIG. 5 may be performed; or step S307 of the method shown in FIG. 7 may be performed; the sending module 93 may perform step S103 of the method shown in FIG. 4, or may perform step S103 of the method shown in FIG. 5 ⁇ step S205; or step S308 of the method shown in FIG. 7 can be performed.
  • the message processing apparatus of the embodiment shown in FIG. 8 can be used to implement the technical solution of the embodiment shown in FIG. 4 in the foregoing method, and its implementation principles and technical effects are similar, and will not be repeated here.
  • FIG. 9 is a schematic block diagram of another message processing apparatus provided by an embodiment of the application. Based on the device shown in FIG. 9, as shown in FIG. 9, the message processing device 9 further includes:
  • the generating module 101 is used to convert each sub-object in each memory object into each data value combination according to the pre-stored mapping file, wherein the mapping file is used to indicate the conversion between the sub-object and the data value combination Relationship, the data value combination is a data expression based on the Protobuf data model; each data object is generated according to the pre-stored first model file and each data value combination, where the first model file is a file based on the Protobuf data model.
  • the generating module 101 can execute steps S201-S202 of the method shown in FIG. 5, and the implementation principles and technical effects are similar, and will not be repeated here.
  • the generating module 101 is further configured to determine the first path and format attributes according to a preset mapping file.
  • the mapping file includes conversion information of one or more types of memory objects, the mapping file includes conversion information of one or more types of memory objects, and the conversion information of each type of memory object includes object identification and sub-object information; among them, the sub-object
  • the information includes the characterization information of one or more sub-objects, and the characterization information includes the first path and format attributes;
  • the first path is used to indicate the node corresponding to the sub-object in the second model file, and the node corresponding to the sub-object has data Value
  • the second model file is a file based on the YANG data model, the second model file includes N nodes, and each M node in the N nodes corresponds to each message request message;
  • the format attribute is used to indicate the file based on the Protobuf data model Data expression mode; N and M are integers greater than or equal to 1, and M is less than or equal to N.
  • the conversion information of each type of memory object further includes a second path; where the second path is used to indicate a node corresponding to the memory object in the second model file.
  • the generating module 101 can execute step S301 of the method shown in FIG. 7, and its implementation principles and technical effects are similar, and will not be repeated here.
  • the generating module 101 converts each sub-object in each memory object into each data value combination according to a pre-stored mapping file, it is specifically used for:
  • the node corresponding to each sub-object is determined, and the data value in the node corresponding to each sub-object is read; according to the format attribute of each sub-object, the value in the node corresponding to each sub-object is Data value, converted to each data value combination.
  • the generating module 102 can execute steps S302-S303 of the method shown in FIG.
  • the generating module 101 when the generating module 101 generates each data object according to the combination of the prestored first model file and each data value, it is specifically used for:
  • each Protobuf object is generated, where the Protobuf object includes the object identification and the attribute definition based on Protobuf; each data value is combined and assigned to each Protobuf object to obtain each data object.
  • the attribute definition includes one or more of the following: declaration definition, type definition, and supplementary definition; wherein, the supplementary definition includes one or more of the following: key definition, name space definition, name definition, decimal places definition.
  • the generating module 101 can execute steps S304-S305 of the method shown in FIG.
  • the conversion module 102 is configured to obtain a second model file, and convert the second model file into a first model file according to a preset mapping relationship, where the mapping relationship is used to indicate the attribute definition in the second model file and the first model The mapping relationship between the attribute definitions in the file.
  • the conversion module 102 can execute steps S3031-S3032 of the method shown in FIG.
  • this embodiment does not depend on whether the embodiment shown in FIG. 8 is implemented or not, and this embodiment can be implemented independently.
  • FIG. 10 is a schematic structural diagram of a network device provided by an embodiment of this application. As shown in FIG. 10, the network device includes a processor 111, a receiver 112, and a transmitter 113.
  • the receiver 112 is configured to receive a message request message from the management device, where the message request message is a message based on extensible markup language XML. At this time, the receiver 112 may perform step S101 of the method shown in FIG. 4, or may perform step S203 of the method shown in FIG. 5; or may perform step S306 of the method shown in FIG.
  • the processor 111 is configured to determine the data object corresponding to the message request message according to the pre-stored data set, where the data set includes one or more data objects, and the data object is data based on the Protobuf data model; The data object corresponding to the request message is determined as the message response message.
  • the processor 111 may execute step S102 of the method shown in FIG. 4, or may execute step S204 of the method shown in FIG. 5; or may execute step S307 of the method shown in FIG.
  • the transmitter 113 is configured to send a message response message to the management device, where the message response message is an XML-based message.
  • the transmitter 113 may execute step S103 of the method shown in FIG. 4, or may execute step S205 of the method shown in FIG. 5; or may execute step S308 of the method shown in FIG.
  • the processor 111 is further configured to convert each sub-object in each memory object into each data value combination according to a pre-stored mapping file, where the mapping file is used to indicate the sub-object and the data value
  • the conversion relationship between the combinations, the data value combination is a data expression based on the Protobuf data model.
  • the processor 111 may execute step S201 of the method shown in FIG. 5.
  • the processor 111 is further configured to generate each data object according to the pre-stored first model file and each data value combination, where the first model is a file based on the Protobuf data model.
  • the processor 111 may execute step S202 of the method shown in FIG. 5.
  • the processor 111 is further configured to determine the first path and format attributes according to a preset mapping file.
  • the mapping file includes conversion information of one or more types of memory objects, and the conversion information of each type of memory object includes object identification and sub-object information.
  • the sub-object information includes the characterization information of one or more sub-objects, and the characterization information includes the first path and format attributes; the first path is used to indicate the node corresponding to the sub-object in the second model file, which corresponds to the sub-object
  • the node of has a data value
  • the second model file is a file based on the YANG data model
  • the second model file includes N nodes, and each M node in the N nodes corresponds to each message request message
  • the format attribute is used to indicate the The data expression mode of the Protobuf data model; N and M are integers greater than or equal to 1, and M is less than or equal to N.
  • the processor 111 may execute step S301 of the method shown in FIG. 7.
  • the conversion information of each type of memory object further includes a second path; where the second path is used to indicate a node corresponding to the memory object in the second model file.
  • processor 111 when the processor 111 is used to convert each sub-object in each memory object into each data value combination according to a pre-stored mapping file, it is specifically used to:
  • the processor 111 may execute step S302 of the method shown in FIG. 7.
  • the processor 111 may execute step S303 of the method shown in FIG. 7.
  • processor 111 when the processor 111 is configured to generate each data object according to the combination of the prestored first model file and each data value, it is specifically configured to:
  • each Protobuf object is generated, where the Protobuf object includes the object identifier and the attribute definition based on the Protobuf.
  • the processor 111 may execute step S303 of the method shown in FIG. 7.
  • the processor 111 may execute step S304 of the method shown in FIG. 7.
  • the processor 111 is further configured to:
  • the processor 111 may execute step S3031 of the method shown in FIG. 7.
  • the second model file is converted into the first model file according to the preset mapping relationship, where the mapping relationship is used to indicate the mapping relationship between the attribute definition in the second model file and the attribute definition in the first model file.
  • the processor 111 may execute step S3032 of the method shown in FIG. 7.
  • the attribute definition includes one or more of the following: declaration definition, type definition, and supplementary definition.
  • the supplementary definition includes one or more of the following: key definition, name space definition, name definition, and decimal place definition.
  • the processor 111 may be used to execute the processing procedure of the network device in the foregoing method embodiment.
  • the network device may further include a memory 114, and the memory 114 is used to store program codes and data of the network device.
  • the above-mentioned embodiments can refer to each other and learn from each other, and the same or similar steps and nouns will not be repeated one by one.
  • the processor 111 may also be a controller, which is represented as "controller/processor 111" in FIG. 10.
  • the receiver 112 and the transmitter 113 are used to support the sending and receiving of information between the network device and the management device in the foregoing embodiment, and to support radio communication between the network device and other network devices.
  • the processor 111 performs various functions for communicating with the management device.
  • the network device may also include a communication interface 115.
  • the communication interface 115 is used to support the network device to communicate with other network entities.
  • the processor 111 for example, a central processing unit (CPU), may also be one or more integrated circuits configured to implement the above methods, for example: one or more specific integrated circuits, or, one or more micro-processing Device, or, one or more field programmable gate arrays, etc.
  • the memory 111 may be one memory, or may be a collective term for multiple storage elements.
  • the embodiment of the present application also provides a computer-readable storage medium including instructions.
  • the instructions When the instructions are run on a computer, the computer can execute the methods provided in FIGS. 4-7.
  • the embodiment of the present application also provides a computer program, including program code.
  • the program code executes the methods provided in FIGS. 4-7.
  • the above-mentioned embodiments it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
  • software it can be implemented in the form of a computer program product in whole or in part.
  • the computer program product includes one or more computer instructions.
  • the computer program instructions When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application are generated in whole or in part.
  • the computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • Computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • computer instructions may be transmitted from a website, computer, server, or data center through a cable (such as , Coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL) or wireless (for example, infrared, wireless, microwave, etc.) transmission to another website site, computer, server or data center.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center integrated with one or more available media.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, and a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)).
  • the functions described in the embodiments of the present application may be implemented by hardware, software, firmware, or any combination thereof. When implemented by software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on the computer-readable medium.
  • the computer-readable medium includes a computer storage medium and a communication medium, where the communication medium includes any medium that facilitates the transfer of a computer program from one place to another.
  • the storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.

Landscapes

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

Abstract

Embodiments of the present invention disclose a packet processing method and device. The method comprises: receiving a packet request message from a management device, wherein the packet request message is text information based on a YANG data model; determining, according to a pre-stored data set, a data object corresponding to the packet request message, wherein the data set comprises one or more data objects, and the data objects are data based on a Protobuf data model; and determining the data object corresponding to the packet request message as a packet response message, and sending the packet response message to the management device. Since the YANG data model and the Protobuf data model have corresponding data structures, a network device can directly respond to the packet request message without having to perform data format conversion, thus improving the efficiency and flexibility of configuration management, and reducing response delays of the network device.

Description

报文处理方法和设备Message processing method and equipment
本申请要求于2020年3月9日提交中国国家知识产权局、申请号为202010159272.1、发明名称为“报文处理方法和设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the State Intellectual Property Office of China, the application number is 202010159272.1, and the invention title is "message processing method and equipment" on March 9, 2020. The entire content is incorporated into this application by reference. middle.
技术领域Technical field
本申请涉及网络通讯技术领域,尤其涉及一种报文处理方法和设备。This application relates to the field of network communication technology, and in particular to a message processing method and device.
背景技术Background technique
为了满足软件定义网络(Software Defined Network,SDN)中复杂的网络设备配置管理的需求,国际互联网工程任务组(The Internet Engineering Task Force,IETF)制定了网络配置协议(Network Configuration Protocol,NETCONF),基于YANG建模语言构建的NETCONF配置管理模型,具有灵活、高效、安全的特性,可以轻松地实现对网络设备的配置管理。In order to meet the requirements of complex network device configuration management in Software Defined Network (SDN), the Internet Engineering Task Force (IETF) has formulated the Network Configuration Protocol (NETCONF), which is based on The NETCONF configuration management model constructed by YANG modeling language has the characteristics of flexibility, efficiency, and security, and can easily realize the configuration management of network equipment.
目前,由于SDN网络中还会同时存在其他配置管理模型的网络设备,例如,基于命令行(Command Line Interface,CLI)或简单网络管理协议(Simple Network Management Protocol,SNMP)的配置管理模型的网络设备,为了兼容这些配置管理模型不同的网络设备,一般是通过网络设备的北向接口对基于YANG数据模型的数据进行封装,从而实现不同配置管理模型的网络设备与网管设备之间的数据转换。At present, because there will also be other network equipment of configuration management models in the SDN network, for example, network equipment based on the command line (Command Line Interface, CLI) or the Simple Network Management Protocol (Simple Network Management Protocol, SNMP) configuration management model. In order to be compatible with these network devices with different configuration management models, the data based on the YANG data model is generally encapsulated through the northbound interface of the network device, so as to realize data conversion between network devices with different configuration management models and network management devices.
然后,通过这种方式对网络设备进行配置管理时,存在配置管理效率低,使用灵活性低和响应延迟高的问题。Then, when configuring and managing network devices in this way, there are problems of low configuration management efficiency, low use flexibility, and high response delay.
发明内容Summary of the invention
本申请提供一种报文处理方法和设备,以解决对网络设备进行配置管理的效率低,使用灵活性低和响应延迟高的问题。The present application provides a message processing method and device to solve the problems of low efficiency in configuration management of network devices, low flexibility in use, and high response delay.
第一方面,本申请提供一种报文处理方法,所述方法应用于网络设备,所述方法包括:In the first aspect, this application provides a message processing method, the method is applied to a network device, and the method includes:
接收来自管理设备的报文请求消息,其中,所述报文请求消息为基于YANG数据模型的文本信息;根据预存的数据集合,确定与所述报文请求消息对应的数据对象,其中,所述数据集合中包括一个或多个数据对象,所述数据对象为基于Protobuf数据模型的数据;将与所述报文请求消息对应的数据对象,确定为报文响应消息,并向所述管理设备发送所述报文响应消息。Receive a message request message from the management device, where the message request message is text information based on the YANG data model; determine the data object corresponding to the message request message according to the pre-stored data set, where the The data set includes one or more data objects, the data objects are data based on the Protobuf data model; the data object corresponding to the message request message is determined as a message response message and sent to the management device The message response message.
本申请,通过基于YANG数据模型的报文请求消息,确认对应的基于Protobuf数据模型数据对象,从而生成报文响应消息,由于YANG数据模型和Protobuf数据模型具有对应的数据结构,因此YANG数据模型所具有的特性也可以在Protobuf数据模型中体现,进而在管理设备通过基于YANG数据模型的报文请求消息对网络设备进行配置管理时,可以充分发挥YANG数据模型的灵活、高效的优点,实现例如复合条件查询等复杂操作指令,提高配置管理的效率和灵活性。同时,由于避免了管理设备与网络设备进行报文传输过程中,不同报文数据格式之间的转换,提高了报文传输的效率,降低了网络设备响应的延迟。In this application, a message request message based on the YANG data model is used to confirm the corresponding data object based on the Protobuf data model to generate a message response message. Since the YANG data model and the Protobuf data model have corresponding data structures, the YANG data model The characteristics can also be embodied in the Protobuf data model, and when the management device configures and manages the network equipment through the message request message based on the YANG data model, it can give full play to the flexible and efficient advantages of the YANG data model to achieve, for example, composite Complicated operation instructions such as conditional query improve the efficiency and flexibility of configuration management. At the same time, since the conversion between different message data formats during the message transmission process between the management device and the network device is avoided, the efficiency of message transmission is improved, and the response delay of the network device is reduced.
在一种可能的设计中,所述方法,还包括:In a possible design, the method further includes:
根据预存的映射文件,将每一种内存对象中的每一子对象,转换为每一数据值组合,其中,所述映射文件用于指示所述子对象与所述数据值组合之间的转换关系,所述数据值组合为基于Protobuf数据模型的数据表达;根据预存的第一模型文件和所述每一数据值组合,生成每一所述数据对象,其中,所述第一模型文件为基于Protobuf数据模型的文件。According to the pre-stored mapping file, each sub-object in each memory object is converted into each data value combination, wherein the mapping file is used to indicate the conversion between the sub-object and the data value combination Relationship, the data value combination is a data expression based on the Protobuf data model; each data object is generated according to the prestored first model file and each data value combination, wherein the first model file is based on Protobuf data model file.
本申请,通过预设的映射文件和预设的第一模型文件,将使用不同配置管理模型的内存对象转换为基于Protobuf数据模型的数据对象,相当于对存储配置数据的内存对象进行了预处理和缓存,使后续管理设备对网络设备进行配置管理时,可以通过报文请求消息直接确定数据对象,并将数据对象直接作为报文响应消息直接返回管理设备,报文交互的过程中无需进行数据格式的转换,提高了报文交互的效率和灵活性。In this application, through the preset mapping file and the preset first model file, the memory objects that use different configuration management models are converted into data objects based on the Protobuf data model, which is equivalent to preprocessing the memory objects that store configuration data And cache, so that when the subsequent management device configures and manages the network device, the data object can be directly determined through the message request message, and the data object is directly returned to the management device as a message response message. There is no need for data in the process of message interaction. The format conversion improves the efficiency and flexibility of message interaction.
在一种可能的设计中,映射文件中包括一种或多种内存对象的转换信息,每一种内存对象的转换信息中包括对象标识和子对象信息;其中,子对象信息中包括一个或多个子对象的表征信息,表征信息中包括第一路径和格式属性;第一路径用于指示第二模型文件中的与子对象对应的节点,与子对象对应的节点具有数据值,所述第二模型文件为基于YANG数据模型的文件,所述第二模型文件包括N个节点,N个节点中每M个节点与每一报文请求消息对应;格式属性用于指示基于Protobuf数据模型的数据表达方式;N、M为大于等于1的整数,M小于等于N。In a possible design, the mapping file includes conversion information of one or more memory objects, and the conversion information of each memory object includes object identification and sub-object information; wherein, the sub-object information includes one or more sub-objects. The characterization information of the object, the characterization information includes the first path and format attributes; the first path is used to indicate the node corresponding to the child object in the second model file, and the node corresponding to the child object has a data value, and the second model The file is a file based on the YANG data model. The second model file includes N nodes, and each M node of the N nodes corresponds to each message request message; the format attribute is used to indicate the data expression mode based on the Protobuf data model ; N and M are integers greater than or equal to 1, and M is less than or equal to N.
本申请,通过映射文件中设置的一种或多种内存对象的转换信息,实现了内存对象至数据对象的转换,通过在转换信息内设置对象标识和子对象信息,使内存对象能够对应更多配置数据的类型,实现了对内存对象对应的配置数据的进一步细化,提高了网络设备配置管理的灵活性。In this application, the conversion information of one or more memory objects set in the mapping file is used to realize the conversion of the memory object to the data object. By setting the object identifier and sub-object information in the conversion information, the memory object can correspond to more configurations The type of data realizes the further refinement of the configuration data corresponding to the memory object, and improves the flexibility of network device configuration management.
在一种可能的设计中,每一种内存对象的转换信息中还包括第二路径;其中,第二路径用于指示所述第二模型文件中的与内存对象对应的节点。In a possible design, the conversion information of each type of memory object further includes a second path; wherein, the second path is used to indicate a node corresponding to the memory object in the second model file.
本申请,通过在转换信息中增加第二路径,以实现对第二模型文件中的与内存对象对应的节点的定位,实现了对内存对象对应的配置数据的进一步细化,提高了网络设备配置管理的灵活性。In this application, by adding a second path to the conversion information, the positioning of the node corresponding to the memory object in the second model file is realized, the configuration data corresponding to the memory object is further refined, and the network device configuration is improved. Management flexibility.
在一种可能的设计中,根据预存的映射文件,将每一种内存对象中的每一子对象,转换为每一数据值组合,包括:In a possible design, according to the pre-stored mapping file, each sub-object in each memory object is converted into each data value combination, including:
根据所述第一路径,确定与每一子对象对应的节点,并读取与每一子对象对应的节点中的数据值;根据每一子对象的格式属性,与每一子对象对应的节点中的数据值,转换为每一数据值组合。According to the first path, determine the node corresponding to each sub-object, and read the data value in the node corresponding to each sub-object; according to the format attribute of each sub-object, the node corresponding to each sub-object The data value in is converted to each data value combination.
本申请,根据第一路径和格式属性,确定子对象对应的节点的数值及数据格式,格式属性可以根据具体的需求进行设置,因此,使内存对象能够对应更多配置数据的类型,提高了网络设备配置管理的灵活性。在一种可能的设计中,根据预存的第一模型文件和所述每一数据值组合,生成每一所述数据对象,包括:In this application, the value and data format of the node corresponding to the sub-object is determined according to the first path and format attribute. The format attribute can be set according to specific needs. Therefore, the memory object can correspond to more types of configuration data, and the network is improved. The flexibility of equipment configuration management. In a possible design, generating each of the data objects according to the pre-stored first model file and the combination of each of the data values includes:
根据所述第一模型文件,生成各Protobuf对象,其中,所述Protobuf对象中包括所述对象标识和基于Protobuf的属性定义;将所述每一数据值组合,赋值给每一Protobuf对象,得到每一所述数据对象。According to the first model file, each Protobuf object is generated, where the Protobuf object includes the object identification and the attribute definition based on Protobuf; the combination of each data value is assigned to each Protobuf object, and each Protobuf object is obtained. 1. The data object.
本申请,通过生成Protobuf对象并利用数据值组合给Protobuf对象赋值,实现了从内存对象至数据对象的数据模型的转换,由于生成数据对象及给数据对象赋值的过程无需借助设备的北向接口,在设备初始化后即可完成,因此,提高了管理设备与网络设备进行报文交 互的效率和灵活性。In this application, by generating Protobuf objects and using data value combinations to assign values to Protobuf objects, the data model conversion from memory objects to data objects is realized. Since the process of generating data objects and assigning values to data objects does not require the use of the northbound interface of the device, It can be completed after the device is initialized. Therefore, the efficiency and flexibility of message interaction between the management device and the network device are improved.
在一种可能的设计中,所述方法,还包括:In a possible design, the method further includes:
获取所述第二模型文件;根据预设的映射关系,将所述第二模型文件转换为所述第一模型文件,其中,所述映射关系用于指示所述第二模型文件中的属性定义与所述第一模型文件中的属性定义之间的映射关系。Obtain the second model file; convert the second model file into the first model file according to a preset mapping relationship, wherein the mapping relationship is used to indicate the attribute definition in the second model file The mapping relationship with the attribute definition in the first model file.
本申请,根据预设的映射关系将第二模型文件转换为所述第一模型文件,实现了不同模型文件之间的转换,由于生成数据对象及给数据对象赋值的过程无需借助设备的北向接口,在设备初始化后即可完成,因此,提高了管理设备与网络设备进行报文交互的效率和灵活性。在一种可能的设计中,所述属性定义包括以下的一种或多种:声明定义、类型定义和补充定义;其中,所述补充定义包括以下的一种或多种:键定义、名字空间定义、名字定义、小数位数定义。In this application, the second model file is converted into the first model file according to the preset mapping relationship, which realizes the conversion between different model files. Because the process of generating data objects and assigning values to data objects does not require the northbound interface of the device , It can be completed after the device is initialized, therefore, the efficiency and flexibility of message interaction between the management device and the network device are improved. In a possible design, the attribute definition includes one or more of the following: declaration definition, type definition, and supplementary definition; wherein, the supplementary definition includes one or more of the following: key definition, namespace Definition, name definition, decimal place definition.
本申请,通过属性定义和补充定义,使Protobuf数据模型能够完全实现YANG数据模型的特性,进而实现了基于YANG数据模型收发报文的管理设备与基于Protobuf数据模型存储数据的网络设备之间的报文交互,并且,由于属性定义和补充定义可根据需要进行定义,提高了使用灵活性。This application, through attribute definitions and supplementary definitions, enables the Protobuf data model to fully realize the characteristics of the YANG data model, and further realizes the report between the management device that sends and receives messages based on the YANG data model and the network device that stores data based on the Protobuf data model. Text interaction, and since the attribute definition and supplementary definition can be defined as needed, the flexibility of use is improved.
第二方面,本申请提供一种报文处理装置,包括:In the second aspect, the present application provides a message processing device, including:
接收模块,用于接收来自管理设备的报文请求消息,其中,所述报文请求消息为基于YANG数据模型的文本信息;The receiving module is configured to receive a message request message from the management device, where the message request message is text information based on the YANG data model;
确定模块,用于根据预存的数据集合,确定与所述报文请求消息对应的数据对象,其中,所述数据集合中包括一个或多个数据对象,所述数据对象为基于Protobuf数据模型的数据;The determining module is configured to determine a data object corresponding to the message request message according to a pre-stored data set, wherein the data set includes one or more data objects, and the data objects are data based on the Protobuf data model ;
发送模块,用于将与所述报文请求消息对应的数据对象,确定为报文响应消息,并向所述管理设备发送所述报文响应消息。The sending module is configured to determine the data object corresponding to the message request message as a message response message, and send the message response message to the management device.
本申请,通过基于YANG数据模型的报文请求消息,确认对应的基于Protobuf数据模型数据对象,从而生成报文响应消息,由于YANG数据模型和Protobuf数据模型具有对应的数据结构,因此YANG数据模型所具有的特性也可以在Protobuf数据模型中体现,进而在管理设备通过基于YANG数据模型的报文请求消息对网络设备进行配置管理时,可以充分发挥YANG数据模型的灵活、高效的优点,实现例如复合条件查询等复杂操作指令,提高配置管理的效率和灵活性。同时,由于避免了管理设备与网络设备进行报文传输过程中,不同报文数据格式之间的转换,提高了报文传输的效率,降低了网络设备响应的延迟。In this application, a message request message based on the YANG data model is used to confirm the corresponding data object based on the Protobuf data model to generate a message response message. Since the YANG data model and the Protobuf data model have corresponding data structures, the YANG data model The characteristics can also be embodied in the Protobuf data model, and when the management device configures and manages the network equipment through the message request message based on the YANG data model, it can give full play to the flexible and efficient advantages of the YANG data model to achieve, for example, composite Complicated operation instructions such as conditional query improve the efficiency and flexibility of configuration management. At the same time, since the conversion between different message data formats during the message transmission process between the management device and the network device is avoided, the efficiency of message transmission is improved, and the response delay of the network device is reduced.
在一种可能的设计中,所述报文处理装置,还包括,生成模块。In a possible design, the message processing device further includes a generating module.
所述生成模块,用于:The generating module is used for:
根据预存的映射文件,将每一种内存对象中的每一子对象,转换为每一数据值组合,其中,所述映射文件用于指示所述子对象与所述数据值组合之间的转换关系,所述数据值组合为基于Protobuf数据模型的数据表达;根据预存的第一模型文件和所述每一数据值组合,生成每一所述数据对象,其中,所述第一模型文件为基于Protobuf数据模型的文件。According to the pre-stored mapping file, each sub-object in each memory object is converted into each data value combination, wherein the mapping file is used to indicate the conversion between the sub-object and the data value combination Relationship, the data value combination is a data expression based on the Protobuf data model; each data object is generated according to the prestored first model file and each data value combination, wherein the first model file is based on Protobuf data model file.
本申请,通过预设的映射文件和预设的第一模型文件,将使用不同配置管理模型的内存对象转换为基于Protobuf数据模型的数据对象,相当于对存储配置数据的内存对象进行了预处理和缓存,使后续管理设备对网络设备进行配置管理时,可以通过报文请求消息直接确定数据对象,并将数据对象直接作为报文响应消息直接返回管理设备,报文交互的过程中无需进行数据格式的转换,提高了报文交互的效率和灵活性。In this application, through the preset mapping file and the preset first model file, the memory objects that use different configuration management models are converted into data objects based on the Protobuf data model, which is equivalent to preprocessing the memory objects that store configuration data And cache, so that when the subsequent management device configures and manages the network device, the data object can be directly determined through the message request message, and the data object is directly returned to the management device as a message response message. There is no need for data in the process of message interaction. The format conversion improves the efficiency and flexibility of message interaction.
在一种可能的设计中,映射文件中包括一种或多种内存对象的转换信息,每一种内存对象的转换信息中包括对象标识和子对象信息;其中,子对象信息中包括一个或多个子对象的表征信息,表征信息中包括第一路径和格式属性;第一路径用于指示第二模型文件中的与子对象对应的节点,与子对象对应的节点具有数据值,所述第二模型文件为基于YANG数据模型的文件,所述第二模型文件包括N个节点,N个节点中每M个节点与每一报文请求消息对应;格式属性用于指示基于Protobuf数据模型的数据表达方式;N、M为大于等于1的整数,M小于等于N。In a possible design, the mapping file includes conversion information of one or more memory objects, and the conversion information of each memory object includes object identification and sub-object information; wherein, the sub-object information includes one or more sub-objects. The characterization information of the object, the characterization information includes the first path and format attributes; the first path is used to indicate the node corresponding to the child object in the second model file, and the node corresponding to the child object has a data value, and the second model The file is a file based on the YANG data model. The second model file includes N nodes, and each M node of the N nodes corresponds to each message request message; the format attribute is used to indicate the data expression mode based on the Protobuf data model ; N and M are integers greater than or equal to 1, and M is less than or equal to N.
本申请,通过映射文件中设置的一种或多种内存对象的转换信息,实现了内存对象至数据对象的转换,通过在转换信息内设置对象标识和子对象信息,使内存对象能够对应更多配置数据的类型,实现了对内存对象对应的配置数据的进一步细化,提高了网络设备配置管理的灵活性。In this application, the conversion information of one or more memory objects set in the mapping file is used to realize the conversion of the memory object to the data object. By setting the object identifier and sub-object information in the conversion information, the memory object can correspond to more configurations The type of data realizes the further refinement of the configuration data corresponding to the memory object, and improves the flexibility of network device configuration management.
在一种可能的设计中,每一种内存对象的转换信息中还包括第二路径;其中,第二路径用于指示所述第二模型文件中的与内存对象对应的节点。In a possible design, the conversion information of each type of memory object further includes a second path; wherein, the second path is used to indicate a node corresponding to the memory object in the second model file.
本申请,通过在转换信息中增加第二路径,以实现对第二模型文件中的与内存对象对应的节点的定位,实现了对内存对象对应的配置数据的进一步细化,提高了网络设备配置管理的灵活性。In this application, by adding a second path to the conversion information, the positioning of the node corresponding to the memory object in the second model file is realized, the configuration data corresponding to the memory object is further refined, and the network device configuration is improved. Management flexibility.
在一种可能的设计中,所述生成模块在根据预存的映射文件,将每一种内存对象中的每一子对象,转换为每一数据值组合时,具体用于:In a possible design, when the generating module converts each sub-object of each memory object into each data value combination according to the pre-stored mapping file, it is specifically used for:
根据所述第一路径,确定与每一子对象对应的节点,并读取与每一子对象对应的节点中的数据值;根据每一子对象的格式属性,与每一子对象对应的节点中的数据值,转换为每一数据值组合。According to the first path, determine the node corresponding to each sub-object, and read the data value in the node corresponding to each sub-object; according to the format attribute of each sub-object, the node corresponding to each sub-object The data value in is converted to each data value combination.
本申请,根据第一路径和格式属性,确定子对象对应的节点的数值及数据格式,格式属性可以根据具体的需求进行设置,因此,使内存对象能够对应更多配置数据的类型,提高了网络设备配置管理的灵活性。In this application, the value and data format of the node corresponding to the sub-object is determined according to the first path and format attribute. The format attribute can be set according to specific needs. Therefore, the memory object can correspond to more types of configuration data, and the network is improved. The flexibility of equipment configuration management.
在一种可能的设计中,所述生成模块在根据预存的第一模型文件和所述每一数据值组合,生成每一所述数据对象时,具体用于:In a possible design, when the generating module generates each of the data objects according to the combination of the pre-stored first model file and each of the data values, it is specifically used to:
根据所述第一模型文件,生成各Protobuf对象,其中,所述Protobuf对象中包括所述对象标识和基于Protobuf的属性定义;将所述每一数据值组合,赋值给每一Protobuf对象,得到每一所述数据对象。According to the first model file, each Protobuf object is generated, where the Protobuf object includes the object identification and the attribute definition based on Protobuf; the combination of each data value is assigned to each Protobuf object, and each Protobuf object is obtained. 1. The data object.
本申请,通过生成Protobuf对象并利用数据值组合给Protobuf对象赋值,实现了从内存对象至数据对象的数据模型的转换,由于生成数据对象及给数据对象赋值的过程无需借助设备的北向接口,在设备初始化后即可完成,因此,提高了管理设备与网络设备进行报文交互的效率和灵活性。In this application, by generating Protobuf objects and using data value combinations to assign values to Protobuf objects, the data model conversion from memory objects to data objects is realized. Since the process of generating data objects and assigning values to data objects does not require the use of the northbound interface of the device, It can be completed after the device is initialized. Therefore, the efficiency and flexibility of message interaction between the management device and the network device are improved.
在一种可能的设计中,所述装置,还包括:转换模块。In a possible design, the device further includes: a conversion module.
所述转换模块,用于:The conversion module is used for:
获取所述第二模型文件;根据预设的映射关系,将所述第二模型文件转换为所述第一模型文件,其中,所述映射关系用于指示所述第二模型文件中的属性定义与所述第一模型文件中的属性定义之间的映射关系。Obtain the second model file; convert the second model file into the first model file according to a preset mapping relationship, wherein the mapping relationship is used to indicate the attribute definition in the second model file The mapping relationship with the attribute definition in the first model file.
本申请,根据预设的映射关系将第二模型文件转换为所述第一模型文件,实现了不同模型文件之间的转换,由于生成数据对象及给数据对象赋值的过程无需借助设备的北向接口, 在设备初始化后即可完成,因此,提高了管理设备与网络设备进行报文交互的效率和灵活性。In this application, the second model file is converted into the first model file according to the preset mapping relationship, which realizes the conversion between different model files. Because the process of generating data objects and assigning values to data objects does not require the northbound interface of the device It can be completed after the device is initialized. Therefore, the efficiency and flexibility of message interaction between the management device and the network device are improved.
在一种可能的设计中,所述属性定义包括以下的一种或多种:声明定义、类型定义和补充定义;其中,所述补充定义包括以下的一种或多种:键定义、名字空间定义、名字定义、小数位数定义。In a possible design, the attribute definition includes one or more of the following: declaration definition, type definition, and supplementary definition; wherein, the supplementary definition includes one or more of the following: key definition, namespace Definition, name definition, decimal place definition.
本申请,通过属性定义和补充定义,使Protobuf数据模型能够完全实现YANG数据模型的特性,进而实现了基于YANG数据模型收发报文的管理设备与基于Protobuf数据模型存储数据的网络设备之间的报文交互,并且,由于属性定义和补充定义可根据需要进行定义,提高了使用灵活性。This application, through attribute definitions and supplementary definitions, enables the Protobuf data model to fully realize the characteristics of the YANG data model, and further realizes the report between the management device that sends and receives messages based on the YANG data model and the network device that stores data based on the Protobuf data model. Text interaction, and since the attribute definition and supplementary definition can be defined as needed, the flexibility of use is improved.
第三方面,本申请提供一种网络设备,包括:处理器、接收器和发送器。In a third aspect, this application provides a network device, including a processor, a receiver, and a transmitter.
所述接收器,用于接收来自管理设备的报文请求消息,其中,所述报文请求消息为基于可扩展标记语言XML的消息;所述处理器,用于根据预存的数据集合,确定与所述报文请求消息对应的数据对象,其中,所述数据集合中包括一个或多个数据对象,所述数据对象为基于Protobuf数据模型的数据;将与所述报文请求消息对应的数据对象,确定为报文响应消息;所述发送器,用于向所述管理设备发送所述报文响应消息,其中,所述报文响应消息为基于XML的消息。The receiver is configured to receive a message request message from the management device, where the message request message is a message based on extensible markup language XML; and the processor is configured to determine and The data object corresponding to the message request message, wherein the data set includes one or more data objects, and the data object is data based on the Protobuf data model; the data object corresponding to the message request message , It is determined to be a message response message; the transmitter is configured to send the message response message to the management device, where the message response message is an XML-based message.
本申请,通过基于YANG数据模型的报文请求消息,确认对应的基于Protobuf数据模型数据对象,从而生成报文响应消息,由于YANG数据模型和Protobuf数据模型具有对应的数据结构,因此YANG数据模型所具有的特性也可以在Protobuf数据模型中体现,进而在管理设备通过基于YANG数据模型的报文请求消息对网络设备进行配置管理时,可以充分发挥YANG数据模型的灵活、高效的优点,实现例如复合条件查询等复杂操作指令,提高配置管理的效率和灵活性。同时,由于避免了管理设备与网络设备进行报文传输过程中,不同报文数据格式之间的转换,提高了报文传输的效率,降低了网络设备响应的延迟。In this application, a message request message based on the YANG data model is used to confirm the corresponding data object based on the Protobuf data model to generate a message response message. Since the YANG data model and the Protobuf data model have corresponding data structures, the YANG data model The characteristics can also be embodied in the Protobuf data model, and when the management device configures and manages the network equipment through the message request message based on the YANG data model, it can give full play to the flexible and efficient advantages of the YANG data model to achieve, for example, composite Complicated operation instructions such as conditional query improve the efficiency and flexibility of configuration management. At the same time, since the conversion between different message data formats during the message transmission process between the management device and the network device is avoided, the efficiency of message transmission is improved, and the response delay of the network device is reduced.
在一种可能的设计中,所述处理器,还用于:In a possible design, the processor is also used for:
根据预存的映射文件,将每一种内存对象中的每一子对象,转换为每一数据值组合,其中,所述映射文件用于指示所述子对象与所述数据值组合之间的转换关系,所述数据值组合为基于Protobuf数据模型的数据表达;根据预存的第一模型文件和所述每一数据值组合,生成每一所述数据对象,其中,所述第一模型为基于Protobuf数据模型的文件。According to the pre-stored mapping file, each sub-object in each memory object is converted into each data value combination, wherein the mapping file is used to indicate the conversion between the sub-object and the data value combination Relationship, the data value combination is a data expression based on the Protobuf data model; each data object is generated according to the pre-stored first model file and each data value combination, wherein the first model is based on the Protobuf The file of the data model.
本申请,通过预设的映射文件和预设的第一模型文件,将使用不同配置管理模型的内存对象转换为基于Protobuf数据模型的数据对象,相当于对存储配置数据的内存对象进行了预处理和缓存,使后续管理设备对网络设备进行配置管理时,可以通过报文请求消息直接确定数据对象,并将数据对象直接作为报文响应消息直接返回管理设备,报文交互的过程中无需进行数据格式的转换,提高了报文交互的效率和灵活性。In this application, through the preset mapping file and the preset first model file, the memory objects that use different configuration management models are converted into data objects based on the Protobuf data model, which is equivalent to preprocessing the memory objects that store configuration data And cache, so that when the subsequent management device configures and manages the network device, the data object can be directly determined through the message request message, and the data object is directly returned to the management device as a message response message. There is no need for data in the process of message interaction. The format conversion improves the efficiency and flexibility of message interaction.
在一种可能的设计中,映射文件中包括一种或多种内存对象的转换信息,每一种内存对象的转换信息中包括对象标识和子对象信息;其中,子对象信息中包括一个或多个子对象的表征信息,表征信息中包括第一路径和格式属性;第一路径用于指示第二模型文件中的与子对象对应的节点,与子对象对应的节点具有数据值,所述第二模型文件为基于YANG数据模型的文件,所述第二模型文件包括N个节点,N个节点中每M个节点与每一报文请求消息对应;格式属性用于指示基于Protobuf数据模型的数据表达方式;N、M为大于等于1的整数,M小于等于N。In a possible design, the mapping file includes conversion information of one or more memory objects, and the conversion information of each memory object includes object identification and sub-object information; wherein, the sub-object information includes one or more sub-objects. The characterization information of the object, the characterization information includes the first path and format attributes; the first path is used to indicate the node corresponding to the child object in the second model file, and the node corresponding to the child object has a data value, and the second model The file is a file based on the YANG data model. The second model file includes N nodes, and each M node of the N nodes corresponds to each message request message; the format attribute is used to indicate the data expression mode based on the Protobuf data model ; N and M are integers greater than or equal to 1, and M is less than or equal to N.
本申请,通过映射文件中设置的一种或多种内存对象的转换信息,实现了内存对象至数 据对象的转换,通过在转换信息内设置对象标识和子对象信息,使内存对象能够对应更多配置数据的类型,实现了对内存对象对应的配置数据的进一步细化,提高了网络设备配置管理的灵活性。In this application, the conversion information of one or more memory objects set in the mapping file is used to realize the conversion of the memory object to the data object. By setting the object identifier and sub-object information in the conversion information, the memory object can correspond to more configurations The type of data realizes the further refinement of the configuration data corresponding to the memory object, and improves the flexibility of network device configuration management.
在一种可能的设计中,每一种内存对象的转换信息中还包括第二路径;其中,第二路径用于指示所述第二模型文件中的与内存对象对应的节点。In a possible design, the conversion information of each type of memory object further includes a second path; wherein, the second path is used to indicate a node corresponding to the memory object in the second model file.
本申请,通过在转换信息中增加第二路径,以实现对第二模型文件中的与内存对象对应的节点的定位,实现了对内存对象对应的配置数据的进一步细化,提高了网络设备配置管理的灵活性。In this application, by adding a second path to the conversion information, the positioning of the node corresponding to the memory object in the second model file is realized, the configuration data corresponding to the memory object is further refined, and the network device configuration is improved. Management flexibility.
在一种可能的设计中,所述处理器在用于根据预存的映射文件,将每一种内存对象中的每一子对象,转换为每一数据值组合时,具体用于:In a possible design, when the processor is used to convert each sub-object of each memory object into each data value combination according to a pre-stored mapping file, it is specifically used for:
根据所述第一路径,确定与每一子对象对应的节点,并读取与每一子对象对应的节点中的数据值;根据每一子对象的格式属性,与每一子对象对应的节点中的数据值,转换为每一数据值组合。According to the first path, determine the node corresponding to each sub-object, and read the data value in the node corresponding to each sub-object; according to the format attribute of each sub-object, the node corresponding to each sub-object The data value in is converted to each data value combination.
本申请,根据第一路径和格式属性,确定子对象对应的节点的数值及数据格式,格式属性可以根据具体的需求进行设置,因此,使内存对象能够对应更多配置数据的类型,提高了网络设备配置管理的灵活性。In this application, the value and data format of the node corresponding to the sub-object is determined according to the first path and format attribute. The format attribute can be set according to specific needs. Therefore, the memory object can correspond to more types of configuration data, and the network is improved. The flexibility of equipment configuration management.
在一种可能的设计中,所述处理器在用于根据预存的第一模型文件和所述每一数据值组合,生成每一所述数据对象时,具体用于:In a possible design, when the processor is used to generate each of the data objects according to the combination of the pre-stored first model file and each of the data values, it is specifically used to:
根据所述第一模型文件,生成各Protobuf对象,其中,所述Protobuf对象中包括所述对象标识和基于Protobuf的属性定义;将所述每一数据值组合,赋值给每一Protobuf对象,得到每一所述数据对象。According to the first model file, each Protobuf object is generated, where the Protobuf object includes the object identification and the attribute definition based on Protobuf; the combination of each data value is assigned to each Protobuf object, and each Protobuf object is obtained. 1. The data object.
本申请,通过生成Protobuf对象并利用数据值组合给Protobuf对象赋值,实现了从内存对象至数据对象的数据模型的转换,由于生成数据对象及给数据对象赋值的过程无需借助设备的北向接口,在设备初始化后即可完成,因此,提高了管理设备与网络设备进行报文交互的效率和灵活性。In this application, by generating Protobuf objects and using data value combinations to assign values to Protobuf objects, the data model conversion from memory objects to data objects is realized. Since the process of generating data objects and assigning values to data objects does not require the use of the northbound interface of the device, It can be completed after the device is initialized. Therefore, the efficiency and flexibility of message interaction between the management device and the network device are improved.
在一种可能的设计中,所述处理器,还用于:In a possible design, the processor is also used for:
获取所述第二模型文件;根据预设的映射关系,将所述第二模型文件转换为所述第一模型文件,其中,所述映射关系用于指示所述第二模型文件中的属性定义与所述第一模型文件中的属性定义之间的映射关系。Obtain the second model file; convert the second model file into the first model file according to a preset mapping relationship, wherein the mapping relationship is used to indicate the attribute definition in the second model file The mapping relationship with the attribute definition in the first model file.
本申请,根据预设的映射关系将第二模型文件转换为所述第一模型文件,实现了不同模型文件之间的转换,由于生成数据对象及给数据对象赋值的过程无需借助设备的北向接口,在设备初始化后即可完成,因此,提高了管理设备与网络设备进行报文交互的效率和灵活性。In this application, the second model file is converted into the first model file according to the preset mapping relationship, which realizes the conversion between different model files. Because the process of generating data objects and assigning values to data objects does not require the northbound interface of the device , It can be completed after the device is initialized, therefore, the efficiency and flexibility of message interaction between the management device and the network device are improved.
在一种可能的设计中,所述属性定义包括以下的一种或多种:声明定义、类型定义和补充定义;其中,所述补充定义包括以下的一种或多种:键定义、名字空间定义、名字定义、小数位数定义。In a possible design, the attribute definition includes one or more of the following: declaration definition, type definition, and supplementary definition; wherein, the supplementary definition includes one or more of the following: key definition, namespace Definition, name definition, decimal place definition.
本申请,通过属性定义和补充定义,使Protobuf数据模型能够完全实现YANG数据模型的特性,进而实现了基于YANG数据模型收发报文的管理设备与基于Protobuf数据模型存储数据的网络设备之间的报文交互,并且,由于属性定义和补充定义可根据需要进行定义,提高了使用灵活性。This application, through attribute definitions and supplementary definitions, enables the Protobuf data model to fully realize the characteristics of the YANG data model, and further realizes the report between the management device that sends and receives messages based on the YANG data model and the network device that stores data based on the Protobuf data model. Text interaction, and since the attribute definition and supplementary definition can be defined as needed, the flexibility of use is improved.
第三方面,本申请提供一种计算机可读存储介质,包括指令,当其在计算机上运行时, 使得计算机执行如上第一方面任一项所述的方法。In a third aspect, the present application provides a computer-readable storage medium, including instructions, which when run on a computer, cause the computer to execute the method described in any one of the first aspects above.
第四方面,本申请提供一种计算机程序,包括程序代码,当计算机运行所述计算机程序时,所述程序代码执行如上第一方面任一项所述的方法。In a fourth aspect, the present application provides a computer program, including program code. When the computer runs the computer program, the program code executes the method described in any one of the first aspects above.
附图说明Description of the drawings
图1为本申请实施例提供的一种网络架构示意图;FIG. 1 is a schematic diagram of a network architecture provided by an embodiment of this application;
图2为本申请实施例提供的一种应用场景示意图一;FIG. 2 is a schematic diagram 1 of an application scenario provided by an embodiment of this application;
图3为本申请实施例提供的一种应用场景示意图二;FIG. 3 is a second schematic diagram of an application scenario provided by an embodiment of this application;
图4为本申请实施例提供的一种报文处理方法的流程示意图;4 is a schematic flowchart of a message processing method provided by an embodiment of the application;
图5为本申请实施例提供的另一种报文处理方法的流程示意图;FIG. 5 is a schematic flowchart of another message processing method provided by an embodiment of this application;
图6为本申请实施例提供的内存对象的转换示意图;FIG. 6 is a schematic diagram of the conversion of a memory object provided by an embodiment of the application;
图7为本申请实施例提供的又一种报文处理方法的流程示意图;FIG. 7 is a schematic flowchart of another message processing method provided by an embodiment of the application;
图8为本申请实施例提供的一种报文处理装置的示意性框图;FIG. 8 is a schematic block diagram of a message processing apparatus provided by an embodiment of the application;
图9为本申请实施例提供的另一种报文处理装置的示意性框图;FIG. 9 is a schematic block diagram of another message processing apparatus provided by an embodiment of the application;
图10为本申请实施例提供的一种网络设备的结构示意图。FIG. 10 is a schematic structural diagram of a network device provided by an embodiment of this application.
具体实施方式Detailed ways
本申请实施例应用于组成SDN的网络装置中、网络设备中、网络系统中,或者可以执行本申请实施例的任意系统中,以下对本申请中的部分用语进行解释说明,以便于本领域技术人员理解。需要说明的是,当本申请实施例的方案应用于网络系统中,或者可以执行本申请实施例的任意系统中时,网络装置、网络设备的名称可能发生变化,但这并不影响本申请实施例方案的实施。The embodiments of this application are applied to network devices, network equipment, network systems that make up SDN, or any system that can execute the embodiments of this application. The following explains some terms in this application for the convenience of those skilled in the art understand. It should be noted that when the solutions of the embodiments of this application are applied to a network system, or any system that can execute the embodiments of this application, the names of the network devices and network equipment may change, but this does not affect the implementation of this application. Example of the implementation of the program.
1)、网络设备,是指用于网络数据传输的设备,例如交换机、路由器等。1). Network equipment refers to equipment used for network data transmission, such as switches, routers, etc.
2)、NETCONF,是一种基于可扩展标记语言(Extensible Markup Language,XML)的网络配置管理协议,NETCONF提供一套管理网络设备的机制,用户可以使用这套机制增加、修改、删除网络设备的配置,获取网络设备的配置和状态信息。NETCONF采用的是客户端/服务器模式(Client/Server,C/S),在基于NETCONF的配置管理模型中,Client对应管理设备,Server对应网络设备,通过基于NETCONF的配置管理模型,可能实现管理设备与网络设备之间的数据交换。2). NETCONF is a network configuration management protocol based on Extensible Markup Language (XML). NETCONF provides a mechanism for managing network equipment. Users can use this mechanism to add, modify, and delete network equipment. Configure to obtain configuration and status information of network devices. NETCONF adopts the client/server model (Client/Server, C/S). In the NETCONF-based configuration management model, the Client corresponds to the management device, and the Server corresponds to the network device. Through the NETCONF-based configuration management model, it is possible to manage the device Data exchange with network equipment.
NETCONF内部为4层结构,分别为安全传输层(Secure Transport Layer)、消息层(Message Layer)、操作层(Operation Layer)和内容层(Content Layer)。NETCONF has a four-layer structure, namely, the Secure Transport Layer, the Message Layer, the Operation Layer, and the Content Layer.
其中,安全传输层用于规定安全加密的通信协议并进行数据传输。Among them, the secure transport layer is used to specify a secure encrypted communication protocol and perform data transmission.
消息层用于实现Client和Server之间的消息收发。The message layer is used to implement message sending and receiving between Client and Server.
操作层用于在消息层的基础上,实现Client对Server的具体指令操作,例如查询、编辑、复制、删除等。The operation layer is used to implement specific command operations of the Client on the Server based on the message layer, such as query, edit, copy, delete, etc.
3)、内容层,用于定义具体的协议内容。内容层是NETCONF中最重要的一层,NETCONF中的内容层是开放的,即NETCONF本身未对内容层指定具体的数据结构,而是通过又一个下一代(Yet Another Next Generation,YANG)建模语言对数据结构进行建模,从而定义NETCONF协议内容层具体的内容。因此,用户可以根据需求,建立YANG数据模型,实现对位于服务器侧的网络设备进行管理。在需要对NETCONF进行扩展和修改时,可以通过对YANG数据模型进 行修改而实现,因此,基于NETCONF的配置管理模型具有较好的可扩展性和管理效率。3). The content layer is used to define the specific protocol content. The content layer is the most important layer in NETCONF. The content layer in NETCONF is open, that is, NETCONF itself does not specify a specific data structure for the content layer, but through another next generation (Yet Another Next Generation, YANG) modeling The language models the data structure to define the specific content of the content layer of the NETCONF protocol. Therefore, users can establish a YANG data model according to their needs to realize the management of network devices on the server side. When NETCONF needs to be extended and modified, it can be realized by modifying the YANG data model. Therefore, the configuration management model based on NETCONF has better scalability and management efficiency.
4)、Protobuf(Protocol Buffers),是一种高效的结构化数据存储方式,可以用于对数据进行序列化,即将数据结构或对象转换成能够被存储和传输(例如网络传输)的格式,具有跨平台、高效、扩展性好等众多优点。通过Protobuf,可以实现数据结构的建模和转换。4) Protocol (Protocol Buffers) is an efficient structured data storage method that can be used to serialize data, that is, to convert data structures or objects into a format that can be stored and transmitted (such as network transmission). Many advantages such as cross-platform, high efficiency, and good scalability. Through Protobuf, data structure modeling and conversion can be achieved.
5)、“多个”是指两个或两个以上,其它量词与之类似。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。5) "Multiple" means two or more than two, and other measure words are similar. "And/or" describes the association relationship of the associated objects, indicating that there can be three types of relationships, for example, A and/or B, which can mean: A alone exists, A and B exist at the same time, and B exists alone. The character "/" generally indicates that the associated objects before and after are in an "or" relationship.
6)、“对应”可以指的是一种关联关系或绑定关系,A与B相对应指的是A与B之间是一种关联关系或绑定关系。6) "Correspondence" can refer to an association relationship or binding relationship, and the correspondence between A and B means that there is an association relationship or binding relationship between A and B.
需要指出的是,本申请实施例中涉及的名词或术语可以相互参考,不再赘述。It should be pointed out that the terms or terms involved in the embodiments of the present application can be referred to each other, and will not be repeated here.
图1为本申请实施例提供的一种网络架构示意图。如图1所示的网络架构包括:管理设备11,网络设备12、网络设备13和网络设备14,管理设备11与网络设备12、网络设备13和网络设备14共同组成网络,管理设备11通过NETCONF协议对网络设备12、网络设备13和网络设备14进行配置管理。其中,网络设备12和网络设备13是基于YANG数据模型的配置管理模型,网络设备14为基于非YANG数据模型的配置管理模型,例如,基于CLI的配置管理模型。FIG. 1 is a schematic diagram of a network architecture provided by an embodiment of the application. The network architecture shown in Figure 1 includes: a management device 11, a network device 12, a network device 13, and a network device 14. The management device 11 forms a network with the network device 12, the network device 13, and the network device 14. The management device 11 passes NETCONF The protocol performs configuration management on the network device 12, the network device 13, and the network device 14. Among them, the network device 12 and the network device 13 are configuration management models based on a YANG data model, and the network device 14 is a configuration management model based on a non-YANG data model, for example, a configuration management model based on CLI.
图2为本申请实施例提供的一种应用场景示意图一。如图2所示,在图1所示的网络架构下,管理设备11向网络设备12和网络设备13发送用于表征交互指令的报文请求消息,由于网络设备12和网络设备13均是基于YANG数据模型的配置管理模型,因此,网络设备12和网络设备13可以直接识别并响应报文请求消息,并将报文响应消息返回至管理设备11,完成管理设备11与网络设备12和网络设备13的数据交互过程。FIG. 2 is a schematic diagram 1 of an application scenario provided by an embodiment of the application. As shown in FIG. 2, under the network architecture shown in FIG. 1, the management device 11 sends a message request message to the network device 12 and the network device 13 to characterize the interaction instruction, because the network device 12 and the network device 13 are both based on The configuration management model of the YANG data model. Therefore, the network device 12 and the network device 13 can directly recognize and respond to the message request message, and return the message response message to the management device 11 to complete the management device 11 and the network device 12 and network device 13's data interaction process.
图3为本申请实施例提供的一种应用场景示意图二。如图3所示,在图1所示的网络架构下,管理设备11向网络设备14发送用于表征交互指令的报文请求消息,由于络设备14是基于非YANG数据模型的配置管理模型,因此,网络设备14无法直接识别并响应报文请求消息,需要在首先对报文请求消息进行解析,以执行对应的交互指令,执行完成后,将响应结果再次进行转换为符合YANG数据模型的数据,并作为报文响应消息返回至管理设备11,完成管理设备11与网络设备14的数据交互过程。FIG. 3 is a second schematic diagram of an application scenario provided by an embodiment of the application. As shown in FIG. 3, under the network architecture shown in FIG. 1, the management device 11 sends a message request message to the network device 14 to represent an interactive instruction. Since the network device 14 is a configuration management model based on a non-YANG data model, Therefore, the network device 14 cannot directly recognize and respond to the message request message. It needs to parse the message request message first to execute the corresponding interactive instruction. After the execution is completed, the response result is again converted into data that conforms to the YANG data model. , And return to the management device 11 as a message response message to complete the data interaction process between the management device 11 and the network device 14.
在图3所示实施例提供的应用场景中,由于网络设备的配置管理模型与管理设备的配置管理模型不匹配,因此,需要对管理设备与网络设备数据交互过程中的数据和指令进行转换,由于YANG数据模型的配置管理模型使用更加灵活,在将基于YANG数据模型的配置管理模型中的操作指令转换为基于非YANG数据模型的配置管理模型中的操作指令时,部分复杂操作指令无法实现。例如,基于YANG数据模型的配置管理模型中的操作指令为“查询所有类型为10GE而且状态为up的接口的描述信息”,由于基于CLI的配置管理模型中的操作指令集都是固定的,因此无法实现上述的操作指令,造成了配置管理效率低,使用灵活性低的问题。In the application scenario provided by the embodiment shown in FIG. 3, because the configuration management model of the network device does not match the configuration management model of the management device, it is necessary to convert the data and instructions in the data interaction process between the management device and the network device. Because the configuration management model of the YANG data model is more flexible, when the operation instructions in the configuration management model based on the YANG data model are converted to the operation instructions in the configuration management model based on the non-YANG data model, some complex operation instructions cannot be realized. For example, the operation instruction in the configuration management model based on the YANG data model is "Query the description information of all the interfaces that are 10GE and the status is up". Because the operation instruction set in the configuration management model based on CLI is fixed, so The inability to implement the above-mentioned operation instructions causes the problems of low configuration management efficiency and low flexibility of use.
同时,在对网络设备进行查询、复制等会产生大数据量的响应结果的操作时,由于需要将响应结果转换为符合YANG数据模型的数据才能返回管理设备,而该编译过程会消耗大量计算时间,因此造成了响应延迟高的问题。At the same time, when querying and copying network devices will produce a large amount of response results, the response results need to be converted to data that conforms to the YANG data model before they can be returned to the management device, and the compilation process consumes a lot of computing time. , Thus causing the problem of high response delay.
图4为本申请实施例提供的一种报文处理方法的流程示意图,示例性地,本实施例提供的报文处理方法应用于网络设备,如图4所示,该方法包括:FIG. 4 is a schematic flowchart of a message processing method provided by an embodiment of the application. Illustratively, the message processing method provided in this embodiment is applied to a network device. As shown in FIG. 4, the method includes:
S101、接收来自管理设备的报文请求消息,其中,报文请求消息为基于YANG数据模型的 文本信息。S101. Receive a message request message from the management device, where the message request message is text information based on the YANG data model.
示例性地,管理设备可以为网络管理设备,例如网络管理服务器、网络管理终端等,网络管理设备中安装有网管软件,用户可以通过网管软件对处于同一网络内的网络设备进行配置管理,例如配置数据查询、配置数据修改、配置数据复制、配置数据删除等。管理设备还可以为控制器设备或起到控制器作用的其他设备,能够运行控制器程序并起到对同一网络内的网络设备进行配置管理的作用,此处不对管理设备的具体形式进行限定。Exemplarily, the management device may be a network management device, such as a network management server, a network management terminal, etc., network management software is installed in the network management device, and the user can configure and manage network devices in the same network through the network management software, such as configuration Data query, configuration data modification, configuration data replication, configuration data deletion, etc. The management device may also be a controller device or other devices that function as a controller, which can run a controller program and perform configuration management on network devices in the same network. The specific form of the management device is not limited here.
示例性地,网络设备可以为交换机、路由器或其他接入网络设备。管理设备与网络设备之间通过基于YANG数据模型的NETCONF协议进行数据的交换。Exemplarily, the network device may be a switch, router, or other access network device. The management equipment and the network equipment exchange data through the NETCONF protocol based on the YANG data model.
当管理设备需要对网络设备进行配置管理时,会向网络设备发送基于报文请求消息,报文请求消息用于表征具体的配置管理指令和内容,例如,查询接口类型、修改接口名称等。网络设备能够接收报文请求消息,并按照报文请求消息所表征的配置管理指令和内容进行响应。When the management device needs to perform configuration management on the network device, it sends a message-based request message to the network device. The message request message is used to characterize specific configuration management instructions and content, such as querying interface types and modifying interface names. The network device can receive the message request message and respond according to the configuration management instruction and content represented by the message request message.
示例性地,报文请求消息中包括指令信息和与指令信息对应的内容信息,例如,报文请求消息用于表征一条修改接口名称的指令,将接口名称eth1为eth0。其中,报文请求消息中的指令信息为修改接口,内容信息为eth1和eth2。当然,可以理解的是,此处修改接口名称的报文请求消息的实现方式为示例性,还可以通过其他多种方式,此处不做限定。Exemplarily, the message request message includes instruction information and content information corresponding to the instruction information. For example, the message request message is used to characterize an instruction to modify an interface name, and the interface name eth1 is eth0. Among them, the instruction information in the message request message is to modify the interface, and the content information is eth1 and eth2. Of course, it can be understood that the implementation manner of the message request message for modifying the interface name here is exemplary, and various other manners may also be used, which are not limited herein.
报文请求消息是基于YANG数据模型的文本信息,例如XML文件,或者对象简谱(JavaScript Object Notation,JSON)文件,或者其他符合特定规范的用于存储和表示数据和信息的数据交换格式,此处不做具体限定。The message request message is text information based on the YANG data model, such as an XML file, or an Object Notation (JavaScript Object Notation, JSON) file, or other data exchange formats that meet specific specifications for storing and representing data and information, here There is no specific limitation.
S102、根据预存的数据集合,确定与报文请求消息对应的数据对象,其中,数据集合中包括一个或多个数据对象,数据对象为基于Protobuf数据模型的数据。S102. Determine a data object corresponding to the message request message according to the pre-stored data set, where the data set includes one or more data objects, and the data objects are data based on the Protobuf data model.
示例性地,预存的数据集合可以包括状态数据和配置数据两类,其中,状态数据可以为网络设备的固有属性数据和当前运行的状态数据等,例如,端口的类型、端口的状态等。状态数据仅能够被查询。配置数据可以为由用户通过某种方式配置到网络设备上的数据,例如,端口的名称、端口的描述。配置数据又可以存在多个子数据集合,每个子数据集合例如可以为一个数据库。例如,<running/>数据库可以用于保存当前已经生效的配置数据;<candidate/>数据库用于保存可以提交为生效的配置数据;<startup/>数据库用于保存启动时的配置数据。状态数据和配置数据的总和可以统称为数据集合。Exemplarily, the pre-stored data set may include two types of state data and configuration data, where the state data may be inherent attribute data of the network device and current operating state data, for example, the type of port, the state of the port, and the like. Status data can only be queried. The configuration data may be data configured by the user on the network device in a certain way, for example, the name of the port and the description of the port. The configuration data may also have multiple sub-data sets, and each sub-data set may be, for example, a database. For example, the <running/> database can be used to store the configuration data that is currently in effect; the <candidate/> database can be used to store the configuration data that can be submitted as effective; the <startup/> database can be used to store the configuration data at startup. The sum of status data and configuration data can be collectively referred to as a data set.
数据对象为数据集合的基本单元,例如,端口的类型、端口的状态、端口的名称、端口的描述等。不同的数据对象,可以对应状态数据,也可以对应配置数据。根据报文请求消息所具体表征的配置管理指令和内容,可以确定对应的数据对象。例如,报文请求消息所表征的配置管理指令和内容为,查询A端口的端口类型,则该报文请求消息所对应的数据对象A为端口的端口类型;再例如,报文请求消息所表征的配置管理指令和内容为,查询查询所有类型为10GE而且状态为up的接口的描述信息,则该报文请求消息所对应的数据对象A为类型为10GE而且状态为up的接口的描述信息。The data object is the basic unit of the data collection, for example, the type of the port, the state of the port, the name of the port, the description of the port, and so on. Different data objects can correspond to status data or configuration data. According to the configuration management instruction and content specifically characterized by the message request message, the corresponding data object can be determined. For example, the configuration management instruction and content represented by the message request message is to query the port type of port A, then the data object A corresponding to the message request message is the port type of the port; for another example, the message request message represents The configuration management instruction and content of is to query the description information of all interfaces that are 10GE and the state is up, then the data object A corresponding to the message request message is the description information of the interface that is 10GE and the state is up.
数据对象是基于Protobuf数据模型的数据。其中,Protobuf数据模型与YANG数据模型具有映射关系,Protobuf数据模型为预先设置的用于存储数据集合的数据模型,可以实现YANG数据模型的部分或全部特征。The data object is the data based on the Protobuf data model. Among them, the Protobuf data model has a mapping relationship with the YANG data model. The Protobuf data model is a preset data model for storing data collections, which can realize some or all of the features of the YANG data model.
具体地,Protobuf作为一种高效的结构化数据的序列化方法,能够根据具体的需求,构建Protobuf数据模型,从而使原始数据能够按照Protobuf数据模型进行组织,形成基于 Protobuf数据模型的数据。Specifically, as an efficient method for serializing structured data, Protobuf can construct a Protobuf data model according to specific needs, so that the original data can be organized according to the Protobuf data model to form data based on the Protobuf data model.
为了实现Protobuf数据模型与YANG数据模型之间的模型匹配,需要预先根据YANG数据模型的特征,建立Protobuf数据模型与YANG数据模型之间的映射关系。更加具体地,YANG提供了一些基础的数据结构,例如,module、container、leaf,这些基础的数据结构构成了YANG数据模型的数据架构。在建立Protobuf数据模型与YANG数据模型之间的映射关系时,可以利用Protobuf提供的数据结构去映射YANG数据模型的数据结构。例如:将Protobuf提供的package与YANG提供的module声明为映射;将Protobuf提供的message与YANG提供的container声明为映射;将Protobuf提供的field与YANG提供的leaf声明为映射。Protobuf数据模型与YANG数据模型之间具体的映射方式,可以根据需求进行具体的设置,此处不做限制。In order to achieve model matching between the Protobuf data model and the YANG data model, it is necessary to establish the mapping relationship between the Protobuf data model and the YANG data model according to the characteristics of the YANG data model in advance. More specifically, YANG provides some basic data structures, such as module, container, and leaf. These basic data structures constitute the data structure of the YANG data model. When establishing the mapping relationship between the Protobuf data model and the YANG data model, the data structure provided by Protobuf can be used to map the data structure of the YANG data model. For example: Declare the package provided by Protobuf and the module provided by YANG as a mapping; declare the message provided by Protobuf and the container provided by YANG as a mapping; declare the field provided by Protobuf and the leaf provided by YANG as a mapping. The specific mapping method between the Protobuf data model and the YANG data model can be specifically set according to requirements, and there is no restriction here.
根据Protobuf数据模型与YANG数据模型之间的映射,可以使基于Protobuf数据模型的数据对象,与基于YANG数据模型的报文请求消息之间形成对应的数据模型,进而实现确定与报文请求消息对应的数据对象。According to the mapping between the Protobuf data model and the YANG data model, the data object based on the Protobuf data model and the message request message based on the YANG data model can form a corresponding data model, and then determine the correspondence with the message request message The data object.
S103、将与报文请求消息对应的数据对象,确定为报文响应消息,并向管理设备发送报文响应消息。S103. Determine the data object corresponding to the message request message as the message response message, and send the message response message to the management device.
确定与报文请求消息对应的数据对象后,由于数据对象基于Protobuf数据模型的数据格式与报文响应消息基于YANG数据模型的数据格式是对应的,因此,可以将数据对象直接作为报文响应消息向管理设备发送,实现对管理设备发送的报文请求消息的响应,进而实现管理设备与网络设备之间的数据交互过程。After determining the data object corresponding to the message request message, since the data format of the data object based on the Protobuf data model corresponds to the data format of the message response message based on the YANG data model, the data object can be directly used as the message response message Send to the management device to realize the response to the message request message sent by the management device, and then realize the data interaction process between the management device and the network device.
示例性地,数据对象和报文响应消息可以为XML文件或其他符合特定规范的用于存储和表示数据和信息的数据交换格式。Exemplarily, the data object and the message response message may be an XML file or other data exchange format that conforms to a specific specification for storing and representing data and information.
下面以一个具体的使用场景对本实施例提供的报文处理方法进行说明。The following describes the message processing method provided in this embodiment with a specific usage scenario.
管理设备为网络管理设备,网络管理设备和网络设备处于同一网络内,网络管理设备根据基于YANG数据模型的NETCONF协议对网络设备发送报文请求消息,该报文请求消息表征了对端口A的端口类型进行查询的指令。网络设备接收网络管理设备发送的报文请求消息,网络设备内存储有基于Protobuf数据模型的数据集合,数据集合中包括多个数据对象。由于Protobuf数据模型与YANG数据模型的特性统一,因此,网络设备可以根据基于YANG数据模型的报文请求消息,直接确定对应的基于Protobuf数据模型的数据对象,并将该基于Protobuf数据模型的数据对象,以XML文件的形式,返回网络管理设备,避免了网络管理设备和网络设备数据交互过程中,不同数据格式之间的转换过程。The management device is a network management device. The network management device and the network device are in the same network. The network management device sends a message request message to the network device according to the NETCONF protocol based on the YANG data model. The message request message represents the port to port A. Type the instruction to query. The network device receives the message request message sent by the network management device. The network device stores a data set based on the Protobuf data model, and the data set includes multiple data objects. Since the characteristics of the Protobuf data model and the YANG data model are unified, the network device can directly determine the corresponding data object based on the Protobuf data model according to the message request message based on the YANG data model, and then combine the data object based on the Protobuf data model , In the form of XML files, return to the network management equipment, avoiding the conversion process between different data formats during the data interaction process between the network management equipment and the network equipment.
本实施例中,通过接收来自管理设备的报文请求消息,其中,报文请求消息为基于YANG数据模型的文本信息;根据预存的数据集合,确定与报文请求消息对应的数据对象,其中,数据集合中包括一个或多个数据对象,数据对象为基于Protobuf数据模型的数据;将与报文请求消息对应的数据对象,确定为报文响应消息,并向管理设备发送报文响应消息。由于YANG数据模型和Protobuf数据模型具有对应的数据结构,因此YANG数据模型所具有的特性也可以在Protobuf数据模型中体现,进而在管理设备通过基于YANG数据模型的报文请求消息对网络设备进行配置管理时,可以充分发挥YANG数据模型的灵活、高效的优点,实现例如复合条件查询等复杂操作指令,提高配置管理的效率和灵活性。同时,由于避免了管理设备与网络设备进行报文传输过程中,不同报文数据格式之间的转换,提高了报文传输的效率,降低了网络设备响应的延迟。In this embodiment, the message request message is received from the management device, where the message request message is text information based on the YANG data model; the data object corresponding to the message request message is determined according to the pre-stored data set, where: The data set includes one or more data objects, which are data based on the Protobuf data model; the data object corresponding to the message request message is determined as the message response message, and the message response message is sent to the management device. Since the YANG data model and the Protobuf data model have corresponding data structures, the characteristics of the YANG data model can also be reflected in the Protobuf data model, and the management device can configure the network device through the message request message based on the YANG data model During management, it can give full play to the flexible and efficient advantages of the YANG data model, realize complex operation instructions such as compound condition query, and improve the efficiency and flexibility of configuration management. At the same time, since the conversion between different message data formats during the message transmission process between the management device and the network device is avoided, the efficiency of message transmission is improved, and the response delay of the network device is reduced.
图5为本申请实施例提供的另一种报文处理方法的流程示意图,如图5所示,该方法包括:FIG. 5 is a schematic flowchart of another message processing method provided by an embodiment of the application. As shown in FIG. 5, the method includes:
S201、根据预存的映射文件,将每一种内存对象中的每一子对象,转换为每一数据值组合,其中,映射文件用于指示子对象与数据值组合之间的转换关系,数据值组合为基于Protobuf数据模型的数据表达。S201. Convert each sub-object in each memory object into each data value combination according to a pre-stored mapping file, where the mapping file is used to indicate the conversion relationship between the sub-object and the data value combination, and the data value The combination is a data expression based on the Protobuf data model.
示例性的,内存对象是指网络设备运行后,在内存中以特定数据格式存在的数据。每一种内存对象分别为包括一组数据,用于表征不同的配置数据,例如,端口速率。内存对象中包括一个或多个子对象,子对象用于表征更加详细的配置数据。例如,内存对象PORT_SPEED为端口速率,对于网络设备而言,通常具有多个不同的端口速率,例如,第一端口速率,第二端口速率。其中第一端口速率,第二端口速率即为内存对象的子对象。多个子对象的集合,构成了对应一种数据对象的内存对象。Exemplarily, a memory object refers to data that exists in the memory in a specific data format after the network device is running. Each memory object includes a set of data, which is used to characterize different configuration data, for example, port speed. The memory object includes one or more sub-objects, and the sub-objects are used to represent more detailed configuration data. For example, the memory object PORT_SPEED is a port rate. For a network device, it usually has multiple different port rates, for example, a first port rate and a second port rate. The first port rate and the second port rate are sub-objects of the memory object. The collection of multiple sub-objects constitutes a memory object corresponding to a data object.
数据值组合为基于Protobuf数据模型的数据表达,即符合Protobuf数据模型的数据,根据预存的映射文件,可以将内存对象中的每一子对象,转换为符合Protobuf数据模型的数据值组合,进而实现将内存对象转换为符合Protobuf数据模型的数据。The data value combination is a data expression based on the Protobuf data model, that is, data that conforms to the Protobuf data model. According to the pre-stored mapping file, each sub-object in the memory object can be converted into a data value combination that conforms to the Protobuf data model, and then realize Convert memory objects into data conforming to the Protobuf data model.
图6为本申请实施例提供的内存对象的转换示意图,如图6所示,图6示出了步骤S201中将内存对象中的每一子对象转换为每一数据值组合的过程,由于内存对象的具体数据模型,是由网络设备决定的,使用不同配置管理模型的网络设备,其存储配置数据的内存对象的数据模型是不同的,通过特定的映射关系,可以将内存对象转化为统一的符合Protobuf数据模型的数据,Protobuf数据模型与YANG数据模型相对应。该特定的映射关系可以通过预存的映射文件获得。Fig. 6 is a schematic diagram of the conversion of a memory object provided by an embodiment of the application. As shown in Fig. 6, Fig. 6 shows the process of converting each sub-object in the memory object into each data value combination in step S201. The specific data model of the object is determined by the network device. For network devices that use different configuration management models, the data model of the memory object storing configuration data is different. Through a specific mapping relationship, the memory object can be transformed into a unified For data that conform to the Protobuf data model, the Protobuf data model corresponds to the YANG data model. The specific mapping relationship can be obtained through a pre-stored mapping file.
S202、根据预存的第一模型文件和每一数据值组合,生成每一数据对象,其中,第一模型文件为基于Protobuf数据模型的文件。S202: Generate each data object according to the pre-stored first model file and each data value combination, where the first model file is a file based on the Protobuf data model.
具体地,第一模型文件为Protobuf数据模型的描述文件,根据第一模型文件,可以确定Protobuf数据模型的具体数据结构,且Protobuf数据模型与YANG数据模型具有映射关系。根据第一数据值组合表征的具体内容,例如第一端口速率为1000;第二端口速率为1200;第三端口速率为1500,对应生成符合Protobuf数据模型的表征第一端口速率、第二端口速率、第二端口速率的数据对象,并将具体的数据值1000、1200、1500分别赋给表征端口速率的数据对象中的第一端口速率、第二端口速率、第二端口速率,实现生成每一内存对象对应的数据对象的目的,即完成了不同数据结构的内存对象至基于Protobuf数据模型数据对象的转换。Specifically, the first model file is a description file of the Protobuf data model. According to the first model file, the specific data structure of the Protobuf data model can be determined, and the Protobuf data model has a mapping relationship with the YANG data model. According to the specific content of the first data value combination, for example, the first port rate is 1000; the second port rate is 1200; the third port rate is 1500, correspondingly generate the first port rate and the second port rate that conform to the Protobuf data model , The data object of the second port rate, and the specific data values 1000, 1200, 1500 are respectively assigned to the first port rate, the second port rate, and the second port rate in the data object representing the port rate, so as to realize the generation of each The purpose of the data object corresponding to the memory object is to complete the conversion of memory objects with different data structures to data objects based on the Protobuf data model.
S203、接收来自管理设备的报文请求消息,其中,报文请求消息为基于YANG数据模型的文本信息。S203. Receive a message request message from the management device, where the message request message is text information based on the YANG data model.
示例性地,本步骤可以参见图4所示的步骤S101,不再赘述。Exemplarily, this step may refer to step S101 shown in FIG. 4, which will not be repeated.
S204、根据预存的数据集合,确定与报文请求消息对应的数据对象,其中,数据集合中包括一个或多个数据对象,数据对象为基于Protobuf数据模型的数据。S204. Determine a data object corresponding to the message request message according to the pre-stored data set, where the data set includes one or more data objects, and the data objects are data based on the Protobuf data model.
示例性地,本步骤可以参见图4所示的步骤S102,不再赘述。Exemplarily, this step may refer to step S102 shown in FIG. 4, and details are not described herein again.
S205、将与报文请求消息对应的数据对象,确定为报文响应消息,并向管理设备发送报文响应消息。S205: Determine the data object corresponding to the message request message as the message response message, and send the message response message to the management device.
示例性地,本步骤可以参见图4所示的步骤S103,不再赘述。Exemplarily, this step may refer to step S103 shown in FIG. 4, and details are not described herein again.
下面以一个具体的使用场景对本实施例提供的报文处理方法进行说明。The following describes the message processing method provided in this embodiment with a specific usage scenario.
管理设备为网络管理设备,网络管理设备和网络设备处于同一网络内。网络设备开启后, 网络设备根据预设的映射文件和预设的第一模型文件,将内存中运行的内存对象转换为基于Protobuf数据模型的数据对象,即并进行缓存。该Protobuf数据模型与YANG数据模型在数据结构上统一,功能上相对应。可选地,该过程可以发生在网络设备开启后的初始化阶段,或者其他触发条件下,此处不做具体限定。The management device is a network management device, and the network management device and the network device are in the same network. After the network device is turned on, the network device converts the memory object running in the memory into a data object based on the Protobuf data model according to the preset mapping file and the preset first model file, that is, caches. The Protobuf data model and the YANG data model are unified in data structure and correspond in function. Optionally, this process may occur in the initialization phase after the network device is turned on, or under other triggering conditions, which is not specifically limited here.
网络管理设备根据基于YANG数据模型的NETCONF协议对网络设备发送报文请求消息,该报文请求消息表征了对端口A的端口类型进行查询的指令。网络设备接收网络管理设备发送的报文请求消息,网络设备内缓存有基于Protobuf数据模型的数据集合,数据集合中包括多个数据对象。由于Protobuf数据模型与YANG数据模型的特性统一,因此,网络设备可以根据基于YANG数据模型的报文请求消息,直接确定对应的基于Protobuf数据模型的数据对象,并将该基于Protobuf数据模型的数据对象,以XML文件的形式,返回网络管理设备,避免了网络管理设备和网络设备数据交互过程中,不同数据格式之间的转换过程。The network management device sends a message request message to the network device according to the NETCONF protocol based on the YANG data model. The message request message represents an instruction to query the port type of port A. The network device receives the message request message sent by the network management device, and a data set based on the Protobuf data model is cached in the network device, and the data set includes multiple data objects. Since the characteristics of the Protobuf data model and the YANG data model are unified, the network device can directly determine the corresponding data object based on the Protobuf data model according to the message request message based on the YANG data model, and then combine the data object based on the Protobuf data model , In the form of XML files, return to the network management equipment, avoiding the conversion process between different data formats during the data interaction process between the network management equipment and the network equipment.
本实施例中,通过根据预存的映射文件,将每一种内存对象中的每一子对象,转换为每一数据值组合,其中,映射文件用于指示子对象与数据值组合之间的转换关系,数据值组合为基于Protobuf数据模型的数据表达;根据预存的第一模型文件和每一数据值组合,生成每一数据对象,其中,第一模型文件为基于Protobuf数据模型的文件;接收来自管理设备的报文请求消息并进行响应。由于在接收来自管理设备的报文请求消息并进行响应之前,将网络设备内的内存对象转换为了基于Protobuf数据模型的数据对象,而基于Protobuf数据模型的数据对象与基于YANG数据模型的报文请求消息的数据结构具有对应关系,因此,网络设备根据报文请求消息可以对数据对象进行访问,避免了网络设备在接收和响应报文请求消息时,需要先对报文请求消息和报文响应消息进行转化的问题,提高了网络设备配置管理的效率和灵活性,降低了网络设备的响应延迟。In this embodiment, by converting each sub-object in each memory object into each data value combination according to a pre-stored mapping file, the mapping file is used to indicate the conversion between the sub-object and the data value combination Relationship, the data value combination is a data expression based on the Protobuf data model; each data object is generated according to the pre-stored first model file and each data value combination, where the first model file is a file based on the Protobuf data model; received from Manage the device's message request message and respond to it. Because before receiving the message request message from the management device and responding, the memory object in the network device is converted into a data object based on the Protobuf data model, and the data object based on the Protobuf data model and the message request based on the YANG data model The data structure of the message has a corresponding relationship. Therefore, the network device can access the data object according to the message request message, which avoids that the network device needs to first respond to the message request message and the message response message when receiving and responding to the message request message. The problem of conversion improves the efficiency and flexibility of network equipment configuration management, and reduces the response delay of network equipment.
图7为本申请实施例提供的又一种报文处理方法的流程示意图,如图7所示,该方法包括:FIG. 7 is a schematic flowchart of another message processing method provided by an embodiment of the application. As shown in FIG. 7, the method includes:
S301、根据预设的映射文件,确定第一路径和格式属性。S301. Determine a first path and format attributes according to a preset mapping file.
映射文件中包括一种或多种内存对象的转换信息,转换信息可以视为一组信息集合,用于实现内存对象至基于Protobuf数据模型的数据对象的转换。内存对象内包括子对象,每一种内存对象的转换信息中包括对象标识和子对象信息。对象标识为表征内存对象的唯一性标识。例如,一个对象标识为WDMPORT_OXUCNSPEED,根据此对象标识,可以唯一的确定一个描述端口速率的内存对象。子对象信息与子对象相对应,用于描述子对象的具体实现方式,例如,子对象的值如何表示。根据由对象标识和子对象信息构成的转换信息,可以实现内存对象至基于Protobuf数据模型的数据对象的转换。The mapping file includes conversion information of one or more kinds of memory objects, and the conversion information can be regarded as a set of information for realizing the conversion of memory objects to data objects based on the Protobuf data model. The memory object includes sub-objects, and the conversion information of each type of memory object includes object identification and sub-object information. The object identifier is a unique identifier that characterizes the memory object. For example, an object identifier is WDMPORT_OXUCNSPEED. According to this object identifier, a memory object describing the port rate can be uniquely determined. The sub-object information corresponds to the sub-object, and is used to describe the specific implementation of the sub-object, for example, how the value of the sub-object is represented. According to the conversion information composed of the object identifier and the sub-object information, the conversion from the memory object to the data object based on the Protobuf data model can be realized.
子对象信息中包括一个或多个子对象的表征信息,表征信息中包括第一路径和格式属性;第一路径用于指示第二模型文件中的与子对象对应的节点,与子对象对应的节点具有数据值,第二模型文件为基于YANG数据模型的文件,第二模型文件包括N个节点,N个节点中每M个节点与每一报文请求消息对应;格式属性用于指示基于Protobuf数据模型的数据表达方式;N、M为大于等于1的整数,M小于等于N。The sub-object information includes the characterization information of one or more sub-objects, and the characterization information includes the first path and format attributes; the first path is used to indicate the node corresponding to the sub-object and the node corresponding to the sub-object in the second model file With data values, the second model file is a file based on the YANG data model, the second model file includes N nodes, and each M node in the N nodes corresponds to each message request message; the format attribute is used to indicate the data based on Protobuf The data expression mode of the model; N and M are integers greater than or equal to 1, and M is less than or equal to N.
可选地,每一种内存对象的转换信息中还包括第二路径;其中,第二路径用于指示第二模型文件中的与内存对象对应的节点。Optionally, the conversion information of each type of memory object further includes a second path; where the second path is used to indicate a node corresponding to the memory object in the second model file.
下面为本申请实施例提供的一种映射文件的数据结构的示意性代码。The following is a schematic code of a data structure of a mapping file provided in an embodiment of this application.
Figure PCTCN2021078975-appb-000001
Figure PCTCN2021078975-appb-000001
Figure PCTCN2021078975-appb-000002
Figure PCTCN2021078975-appb-000002
TransValue{}为一种内存对象的转换信息,通过转换信息TransValue{}可以实现内存对 象至数据对象的转换。TransValue{} is the conversion information of a memory object, and the conversion from the memory object to the data object can be realized through the conversion information TransValue{}.
其中,path:为第二路径,用于指示第二模型文件中的与内存对象对应的节点。Among them, path: is the second path, which is used to indicate the node corresponding to the memory object in the second model file.
Id:为对象标识,每一个转换信息TransValue{}内有一个全局唯一的对象标识id,用于区别不同的内存对象对应的转换信息。Id: is the object identifier, each conversion information TransValue{} contains a globally unique object identifier id, which is used to distinguish the conversion information corresponding to different memory objects.
keys:{}为子对象信息,子对象信息keys:{}中,包括参数path和参数format,其中,path为第一路径,用于指示YANG模型文件中的与子对象对应的节点,由于YANG模型中叶子节点的操作非常灵活,可以实现例如复合指令等操作,因此,通过参数path映射向具体YANG模型的叶子节点,使keys:{}所属的转换信息对应的数据对象,也可以实现相应的操作;参数format为格式数据,用于对keys:{}具体的数据格式进行定义,可以根据具体的需求进行设定,其实现方式为本领域常用技术手段,此处不再赘述。The keys:{} is the sub-object information. The sub-object information keys:{} includes the parameter path and the parameter format. Among them, path is the first path, which is used to indicate the node corresponding to the sub-object in the YANG model file. The operation of the leaf nodes in the model is very flexible, and can realize operations such as compound instructions. Therefore, through the parameter path mapping to the leaf nodes of the specific YANG model, the data objects corresponding to the conversion information of the keys:{} can also be implemented. Operation; the parameter format is format data, which is used to define the specific data format of keys:{}, which can be set according to specific requirements. The implementation method is a common technical means in the field, and will not be repeated here.
format:{}为格式属性,用于指示基于Protobuf数据模型的数据表达方式,例如,带宽速率的单位是兆还是千兆。format:{} is the format attribute, which is used to indicate the data expression method based on the Protobuf data model, for example, whether the unit of the bandwidth rate is mega or gigabit.
S302、根据第一路径,确定与每一子对象对应的节点,并读取与每一子对象对应的节点中的数据值。S302. Determine a node corresponding to each sub-object according to the first path, and read the data value in the node corresponding to each sub-object.
示例性地,第一路径为一个具体的节点地址,根据第一路径,可以直接确定子对象对应的节点位置,进而可以读取位于节点处的子对象的数据值。因此,根据多个第一路径,分别进行处理,可以分别获得每一子对象对应的节点中的数据值。Exemplarily, the first path is a specific node address. According to the first path, the position of the node corresponding to the child object can be directly determined, and the data value of the child object located at the node can be read. Therefore, by separately processing according to multiple first paths, the data value in the node corresponding to each sub-object can be obtained respectively.
S303、根据每一子对象的格式属性,与每一子对象对应的节点中的数据值,转换为每一数据值组合。S303: According to the format attribute of each sub-object, the data value in the node corresponding to each sub-object is converted into each data value combination.
获取数据值后,再根据具体的格式属性,将每一子对象对应的节点中的数据值组织为每一组数据值组合。After obtaining the data value, according to the specific format attribute, the data value in the node corresponding to each sub-object is organized into each group of data value combinations.
可选地,在步骤S303之后还包括:Optionally, after step S303, the method further includes:
S3031、获取第二模型文件。S3031. Obtain a second model file.
S3032、根据预设的映射关系,将第二模型文件转换为第一模型文件,其中,映射关系用于指示第二模型文件中的属性定义与第一模型文件中的属性定义之间的映射关系。S3032. Convert the second model file into the first model file according to the preset mapping relationship, where the mapping relationship is used to indicate the mapping relationship between the attribute definition in the second model file and the attribute definition in the first model file .
具体地,第二模型文件为基于YANG数据模型的文件,例如为文本类文件。由于Protobuf与YANG之间本身存在一定的相似性,通过预设的映射关系,可以实现第二模型与第一模型文件之间的转换,使第一模型文件能够实现与第二模型文件相同的功能和数据结构。Specifically, the second model file is a file based on the YANG data model, for example, a text file. Since there is a certain similarity between Protobuf and YANG, the conversion between the second model and the first model file can be realized through the preset mapping relationship, so that the first model file can achieve the same function as the second model file And data structure.
可以理解的是,步骤S3031和步骤S3032可以设置在S304之前的任何位置执行。It can be understood that step S3031 and step S3032 can be set to be executed at any position before S304.
S304、根据第一模型文件,生成各Protobuf对象,其中,Protobuf对象中包括对象标识和基于Protobuf的属性定义。S304. Generate each Protobuf object according to the first model file, where the Protobuf object includes an object identifier and an attribute definition based on the Protobuf.
具体地,第一模型文件为Protobuf数据模型的描述文件,例如为文本类文件,根据第一模型文件,可以确定Protobuf数据模型的具体数据结构。根据第一模型文件生成各Protobuf对象的方式例如为,获取第一模型文件中声明的数据结构,并利用编译器数据结构进行编译,从而得到各Protobuf对象,可选地,对象标识与转换信息中的对象标识是一致的,对象标识为表征内存对象的以及数据对象的唯一性标识,不同Protobuf对象具有不同的对象标识。该对象标识可以是预设的,并可以根据具体需要进行更改,也可以是与网络设备的硬件参数绑定可不能更改的,此处不对对象标识的具体实现方式进行限定。基于Protobuf的属性定义是指Protobuf对象所具有的具体的Protobuf数据模型的特征,每个Protobuf对象之间的属性定义可能相同,也可能不同。可选地,属性定义包括以下的一种或多种:声明定义、类型定 义和补充定义。其中,补充定义包括以下的一种或多种:键定义、名字空间定义、名字定义、小数位数定义。Specifically, the first model file is a description file of the Protobuf data model, for example, a text file. According to the first model file, the specific data structure of the Protobuf data model can be determined. The method of generating each Protobuf object according to the first model file is, for example, obtaining the data structure declared in the first model file and compiling with the data structure of the compiler to obtain each Protobuf object. Optionally, the object identification and conversion information The object identifiers are the same. The object identifier is the unique identifier of the memory object and the data object. Different Protobuf objects have different object identifiers. The object identifier can be preset and can be changed according to specific needs, or it can be bound to the hardware parameters of the network device but cannot be changed. The specific implementation of the object identifier is not limited here. The property definition based on Protobuf refers to the characteristics of the specific Protobuf data model of the Protobuf object. The property definition between each Protobuf object may be the same or different. Optionally, the attribute definition includes one or more of the following: declaration definition, type definition, and supplementary definition. Among them, the supplementary definition includes one or more of the following: key definition, name space definition, name definition, and decimal place definition.
S305、将每一数据值组合,赋值给每一Protobuf对象,得到每一数据对象。S305. Combine each data value and assign it to each Protobuf object to obtain each data object.
根据对象标识,能够确定每一数据值组合和每一Protobuf对象的映射关系,将每一数据值组合的值对应的赋值给Protobuf对象,得到相应的数据对象。数据对象是基于Protobuf数据模型的,Protobuf数据模型与YANG数据模型在数据结构上相统一,在功能上相对应。According to the object identification, the mapping relationship between each data value combination and each Protobuf object can be determined, and the value of each data value combination can be assigned to the Protobuf object to obtain the corresponding data object. The data object is based on the Protobuf data model. The Protobuf data model and the YANG data model are unified in data structure and correspond in function.
S306、接收来自管理设备的报文请求消息,其中,报文请求消息为基于YANG数据模型的文本信息。S306. Receive a message request message from the management device, where the message request message is text information based on the YANG data model.
示例性地,本步骤可以参见图4所示的步骤S101,不再赘述。Exemplarily, this step may refer to step S101 shown in FIG. 4, which will not be repeated.
S307、根据预存的数据集合,确定与报文请求消息对应的数据对象,其中,数据集合中包括一个或多个数据对象,数据对象为基于Protobuf数据模型的数据。S307. Determine a data object corresponding to the message request message according to the pre-stored data set, where the data set includes one or more data objects, and the data objects are data based on the Protobuf data model.
示例性地,本步骤可以参见图4所示的步骤S102,不再赘述。Exemplarily, this step may refer to step S102 shown in FIG. 4, and details are not described herein again.
S308、将与报文请求消息对应的数据对象,确定为报文响应消息,并向管理设备发送报文响应消息。S308. Determine the data object corresponding to the message request message as the message response message, and send the message response message to the management device.
示例性地,本步骤可以参见图4所示的步骤S102,不再赘述。Exemplarily, this step may refer to step S102 shown in FIG. 4, and details are not described herein again.
本实施例,通过映射文件中设置的一种或多种内存对象的转换信息,实现了内存对象至数据对象的转换,由于在转换信息内设置对象标识和子对象信息,使内存对象能够对应更多配置数据的类型,实现了对内存对象对应的配置数据的进一步细化,提高了网络设备配置管理的灵活性。In this embodiment, the conversion information of one or more memory objects set in the mapping file is used to realize the conversion of the memory object to the data object. Since the object identifier and sub-object information are set in the conversion information, the memory object can correspond to more The type of configuration data realizes the further refinement of the configuration data corresponding to the memory object, and improves the flexibility of network device configuration management.
上文中详细描述了根据本申请实施例的报文处理方法,下面将描述本申请实施例的报文处理装置。The message processing method according to the embodiment of the present application is described in detail above, and the message processing apparatus of the embodiment of the present application will be described below.
在一个示例中,图8为本申请实施例提供的一种报文处理装置的示意性框图。本申请实施例的装置8可以是上述方法实施例中的网络设备,也可以是网络设备内的一个或多个芯片。该装置可以用于执行上述方法实施例中的网络设备的部分或全部功能。该装置可以包括下述模块。In an example, FIG. 8 is a schematic block diagram of a message processing apparatus provided by an embodiment of the application. The apparatus 8 in the embodiment of the present application may be the network device in the foregoing method embodiment, or may be one or more chips in the network device. The apparatus may be used to perform part or all of the functions of the network device in the foregoing method embodiment. The device may include the following modules.
接收模块91,用于接收来自管理设备的报文请求消息,其中,报文请求消息为基于YANG数据模型的文本信息。The receiving module 91 is configured to receive a message request message from the management device, where the message request message is text information based on the YANG data model.
确定模块92,用于根据预存的数据集合,确定与报文请求消息对应的数据对象,其中,数据集合中包括一个或多个数据对象,数据对象为基于Protobuf数据模型的数据。The determining module 92 is configured to determine the data object corresponding to the message request message according to the pre-stored data set, where the data set includes one or more data objects, and the data objects are data based on the Protobuf data model.
发送模块93,用于将与报文请求消息对应的数据对象,确定为报文响应消息,并向管理设备发送报文响应消息。The sending module 93 is configured to determine the data object corresponding to the message request message as the message response message, and send the message response message to the management device.
其中,接收模块91可以执行图4所示方法的步骤S101,或者可以执行图5所示方法的步骤S203;或者可以执行图7所示方法的步骤S306;确定模块92可以执行图4所示方法的步骤S102,或者可以执行图5所示方法的步骤S204;或者可以执行图7所示方法的步骤S307;发送模块93可以执行图4所示方法的步骤S103,或者可以执行图5所示方法的步骤S205;或者可以执行图7所示方法的步骤S308。Among them, the receiving module 91 may perform step S101 of the method shown in FIG. 4, or may perform step S203 of the method shown in FIG. 5; or may perform step S306 of the method shown in FIG. 7; the determining module 92 may perform the method shown in FIG. Step S102 of the method shown in FIG. 5 may be performed; or step S307 of the method shown in FIG. 7 may be performed; the sending module 93 may perform step S103 of the method shown in FIG. 4, or may perform step S103 of the method shown in FIG. 5的 step S205; or step S308 of the method shown in FIG. 7 can be performed.
图8所示实施例的报文处理装置可用于执行上述方法中图4所示实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。The message processing apparatus of the embodiment shown in FIG. 8 can be used to implement the technical solution of the embodiment shown in FIG. 4 in the foregoing method, and its implementation principles and technical effects are similar, and will not be repeated here.
在另一个示例中,图9为本申请实施例提供的另一种报文处理装置的示意性框图。在图 9所示装置的基础上,如图9所示,该报文处理装置9中,还包括:In another example, FIG. 9 is a schematic block diagram of another message processing apparatus provided by an embodiment of the application. Based on the device shown in FIG. 9, as shown in FIG. 9, the message processing device 9 further includes:
生成模块101,用于根据预存的映射文件,将每一种内存对象中的每一子对象,转换为每一数据值组合,其中,映射文件用于指示子对象与数据值组合之间的转换关系,数据值组合为基于Protobuf数据模型的数据表达;根据预存的第一模型文件和每一数据值组合,生成每一数据对象,其中,第一模型文件为基于Protobuf数据模型的文件。其中生成模块101可以执行图5所示方法的步骤S201-S202,其实现原理和技术效果类似,此处不再赘述。The generating module 101 is used to convert each sub-object in each memory object into each data value combination according to the pre-stored mapping file, wherein the mapping file is used to indicate the conversion between the sub-object and the data value combination Relationship, the data value combination is a data expression based on the Protobuf data model; each data object is generated according to the pre-stored first model file and each data value combination, where the first model file is a file based on the Protobuf data model. The generating module 101 can execute steps S201-S202 of the method shown in FIG. 5, and the implementation principles and technical effects are similar, and will not be repeated here.
可选地,生成模块101,还用于根据预设的映射文件,确定第一路径和格式属性。映射文件中包括一种或多种内存对象的转换信息,映射文件中包括一种或多种内存对象的转换信息,每一种内存对象的转换信息中包括对象标识和子对象信息;其中,子对象信息中包括一个或多个子对象的表征信息,表征信息中包括第一路径和格式属性;第一路径用于指示第二模型文件中的与子对象对应的节点,与子对象对应的节点具有数据值,第二模型文件为基于YANG数据模型的文件,第二模型文件包括N个节点,N个节点中每M个节点与每一报文请求消息对应;格式属性用于指示基于Protobuf数据模型的数据表达方式;N、M为大于等于1的整数,M小于等于N。可选地,每一种内存对象的转换信息中还包括第二路径;其中,第二路径用于指示第二模型文件中的与内存对象对应的节点。此时,生成模块101可以执行图7所示方法的步骤S301,其实现原理和技术效果类似,此处不再赘述。Optionally, the generating module 101 is further configured to determine the first path and format attributes according to a preset mapping file. The mapping file includes conversion information of one or more types of memory objects, the mapping file includes conversion information of one or more types of memory objects, and the conversion information of each type of memory object includes object identification and sub-object information; among them, the sub-object The information includes the characterization information of one or more sub-objects, and the characterization information includes the first path and format attributes; the first path is used to indicate the node corresponding to the sub-object in the second model file, and the node corresponding to the sub-object has data Value, the second model file is a file based on the YANG data model, the second model file includes N nodes, and each M node in the N nodes corresponds to each message request message; the format attribute is used to indicate the file based on the Protobuf data model Data expression mode; N and M are integers greater than or equal to 1, and M is less than or equal to N. Optionally, the conversion information of each type of memory object further includes a second path; where the second path is used to indicate a node corresponding to the memory object in the second model file. At this time, the generating module 101 can execute step S301 of the method shown in FIG. 7, and its implementation principles and technical effects are similar, and will not be repeated here.
可选地,生成模块101在根据预存的映射文件,将每一种内存对象中的每一子对象,转换为每一数据值组合时,具体用于:Optionally, when the generating module 101 converts each sub-object in each memory object into each data value combination according to a pre-stored mapping file, it is specifically used for:
根据第一路径,确定与每一子对象对应的节点,并读取与每一子对象对应的节点中的数据值;根据每一子对象的格式属性,与每一子对象对应的节点中的数据值,转换为每一数据值组合。此时,生成模块102可以执行图7所示方法的步骤S302-S303,其实现原理和技术效果类似,此处不再赘述。According to the first path, the node corresponding to each sub-object is determined, and the data value in the node corresponding to each sub-object is read; according to the format attribute of each sub-object, the value in the node corresponding to each sub-object is Data value, converted to each data value combination. At this time, the generating module 102 can execute steps S302-S303 of the method shown in FIG.
可选地,生成模块101在根据预存的第一模型文件和每一数据值组合,生成每一数据对象时,具体用于:Optionally, when the generating module 101 generates each data object according to the combination of the prestored first model file and each data value, it is specifically used for:
根据第一模型文件,生成各Protobuf对象,其中,Protobuf对象中包括对象标识和基于Protobuf的属性定义;将每一数据值组合,赋值给每一Protobuf对象,得到每一数据对象。可选地,属性定义包括以下的一种或多种:声明定义、类型定义和补充定义;其中,补充定义包括以下的一种或多种:键定义、名字空间定义、名字定义、小数位数定义。此时,生成模块101可以执行图7所示方法的步骤S304-S305,其实现原理和技术效果类似,此处不再赘述。According to the first model file, each Protobuf object is generated, where the Protobuf object includes the object identification and the attribute definition based on Protobuf; each data value is combined and assigned to each Protobuf object to obtain each data object. Optionally, the attribute definition includes one or more of the following: declaration definition, type definition, and supplementary definition; wherein, the supplementary definition includes one or more of the following: key definition, name space definition, name definition, decimal places definition. At this time, the generating module 101 can execute steps S304-S305 of the method shown in FIG.
转换模块102,用于获取第二模型文件,根据预设的映射关系,将第二模型文件转换为第一模型文件,其中,映射关系用于指示第二模型文件中的属性定义与第一模型文件中的属性定义之间的映射关系。此时,转换模块102可以执行图7所示方法的步骤S3031-S3032,其实现原理和技术效果类似,此处不再赘述。The conversion module 102 is configured to obtain a second model file, and convert the second model file into a first model file according to a preset mapping relationship, where the mapping relationship is used to indicate the attribute definition in the second model file and the first model The mapping relationship between the attribute definitions in the file. At this time, the conversion module 102 can execute steps S3031-S3032 of the method shown in FIG.
并且,本实施例的实施不依赖于图8所示的实施例是否实施,本实施例可以独立实施。Moreover, the implementation of this embodiment does not depend on whether the embodiment shown in FIG. 8 is implemented or not, and this embodiment can be implemented independently.
图10为本申请实施例提供的一种网络设备的结构示意图。如图10所示,该网络设备包括处理器111、接收器112和发送器113。FIG. 10 is a schematic structural diagram of a network device provided by an embodiment of this application. As shown in FIG. 10, the network device includes a processor 111, a receiver 112, and a transmitter 113.
接收器112,用于接收来自管理设备的报文请求消息,其中,报文请求消息为基于可扩展标记语言XML的消息。此时,接收器112可以执行图4所示方法的步骤S101,或者可以执行图5所示方法的步骤S203;或者可以执行图7所示方法的步骤S306。The receiver 112 is configured to receive a message request message from the management device, where the message request message is a message based on extensible markup language XML. At this time, the receiver 112 may perform step S101 of the method shown in FIG. 4, or may perform step S203 of the method shown in FIG. 5; or may perform step S306 of the method shown in FIG.
处理器111,用于根据预存的数据集合,确定与报文请求消息对应的数据对象,其中,数据集合中包括一个或多个数据对象,数据对象为基于Protobuf数据模型的数据;将与报文请求消息对应的数据对象,确定为报文响应消息。此时,处理器111可以执行图4所示方法的步骤S102,或者可以执行图5所示方法的步骤S204;或者可以执行图7所示方法的步骤S307。The processor 111 is configured to determine the data object corresponding to the message request message according to the pre-stored data set, where the data set includes one or more data objects, and the data object is data based on the Protobuf data model; The data object corresponding to the request message is determined as the message response message. At this time, the processor 111 may execute step S102 of the method shown in FIG. 4, or may execute step S204 of the method shown in FIG. 5; or may execute step S307 of the method shown in FIG.
发送器113,用于向管理设备发送报文响应消息,其中,报文响应消息为基于XML的消息。此时,发送器113可以执行图4所示方法的步骤S103,或者可以执行图5所示方法的步骤S205;或者可以执行图7所示方法的步骤S308。The transmitter 113 is configured to send a message response message to the management device, where the message response message is an XML-based message. At this time, the transmitter 113 may execute step S103 of the method shown in FIG. 4, or may execute step S205 of the method shown in FIG. 5; or may execute step S308 of the method shown in FIG.
可选地,处理器111,还用于根据预存的映射文件,将每一种内存对象中的每一子对象,转换为每一数据值组合,其中,映射文件用于指示子对象与数据值组合之间的转换关系,数据值组合为基于Protobuf数据模型的数据表达。此时,处理器111可以执行图5所示方法的步骤S201。Optionally, the processor 111 is further configured to convert each sub-object in each memory object into each data value combination according to a pre-stored mapping file, where the mapping file is used to indicate the sub-object and the data value The conversion relationship between the combinations, the data value combination is a data expression based on the Protobuf data model. At this time, the processor 111 may execute step S201 of the method shown in FIG. 5.
可选地,处理器111,还用于根据预存的第一模型文件和每一数据值组合,生成每一数据对象,其中,第一模型为基于Protobuf数据模型的文件。此时,处理器111可以执行图5所示方法的步骤S202。Optionally, the processor 111 is further configured to generate each data object according to the pre-stored first model file and each data value combination, where the first model is a file based on the Protobuf data model. At this time, the processor 111 may execute step S202 of the method shown in FIG. 5.
可选地,处理器111,还用于根据预设的映射文件,确定第一路径和格式属性。映射文件中包括一种或多种内存对象的转换信息,每一种内存对象的转换信息中包括对象标识和子对象信息。Optionally, the processor 111 is further configured to determine the first path and format attributes according to a preset mapping file. The mapping file includes conversion information of one or more types of memory objects, and the conversion information of each type of memory object includes object identification and sub-object information.
其中,子对象信息中包括一个或多个子对象的表征信息,表征信息中包括第一路径和格式属性;第一路径用于指示第二模型文件中的与子对象对应的节点,与子对象对应的节点具有数据值,第二模型文件为基于YANG数据模型的文件,第二模型文件包括N个节点,N个节点中每M个节点与每一报文请求消息对应;格式属性用于指示基于Protobuf数据模型的数据表达方式;N、M为大于等于1的整数,M小于等于N。此时,处理器111可以执行图7所示方法的步骤S301。Among them, the sub-object information includes the characterization information of one or more sub-objects, and the characterization information includes the first path and format attributes; the first path is used to indicate the node corresponding to the sub-object in the second model file, which corresponds to the sub-object The node of has a data value, the second model file is a file based on the YANG data model, the second model file includes N nodes, and each M node in the N nodes corresponds to each message request message; the format attribute is used to indicate the The data expression mode of the Protobuf data model; N and M are integers greater than or equal to 1, and M is less than or equal to N. At this time, the processor 111 may execute step S301 of the method shown in FIG. 7.
可选地,每一种内存对象的转换信息中还包括第二路径;其中,第二路径用于指示第二模型文件中的与内存对象对应的节点。Optionally, the conversion information of each type of memory object further includes a second path; where the second path is used to indicate a node corresponding to the memory object in the second model file.
可选地,处理器111在用于根据预存的映射文件,将每一种内存对象中的每一子对象,转换为每一数据值组合时,具体用于:Optionally, when the processor 111 is used to convert each sub-object in each memory object into each data value combination according to a pre-stored mapping file, it is specifically used to:
根据第一路径,确定与每一子对象对应的节点,并读取与每一子对象对应的节点中的数据值。此时,处理器111可以执行图7所示方法的步骤S302。According to the first path, the node corresponding to each sub-object is determined, and the data value in the node corresponding to each sub-object is read. At this time, the processor 111 may execute step S302 of the method shown in FIG. 7.
根据每一子对象的格式属性,与每一子对象对应的节点中的数据值,转换为每一数据值组合。此时,处理器111可以执行图7所示方法的步骤S303。According to the format attribute of each sub-object, the data value in the node corresponding to each sub-object is converted into each data value combination. At this time, the processor 111 may execute step S303 of the method shown in FIG. 7.
可选地,处理器111在用于根据预存的第一模型文件和每一数据值组合,生成每一数据对象时,具体用于:Optionally, when the processor 111 is configured to generate each data object according to the combination of the prestored first model file and each data value, it is specifically configured to:
根据第一模型文件,生成各Protobuf对象,其中,Protobuf对象中包括对象标识和基于Protobuf的属性定义。此时,处理器111可以执行图7所示方法的步骤S303。According to the first model file, each Protobuf object is generated, where the Protobuf object includes the object identifier and the attribute definition based on the Protobuf. At this time, the processor 111 may execute step S303 of the method shown in FIG. 7.
将每一数据值组合,赋值给每一Protobuf对象,得到每一数据对象。此时,处理器111可以执行图7所示方法的步骤S304。Combine each data value and assign it to each Protobuf object to get each data object. At this time, the processor 111 may execute step S304 of the method shown in FIG. 7.
可选地,处理器111,还用于:Optionally, the processor 111 is further configured to:
获取第二模型文件。此时,处理器111可以执行图7所示方法的步骤S3031。Obtain the second model file. At this time, the processor 111 may execute step S3031 of the method shown in FIG. 7.
根据预设的映射关系,将第二模型文件转换为第一模型文件,其中,映射关系用于指示第二模型文件中的属性定义与第一模型文件中的属性定义之间的映射关系。此时,处理器111可以执行图7所示方法的步骤S3032。The second model file is converted into the first model file according to the preset mapping relationship, where the mapping relationship is used to indicate the mapping relationship between the attribute definition in the second model file and the attribute definition in the first model file. At this time, the processor 111 may execute step S3032 of the method shown in FIG. 7.
可选地,属性定义包括以下的一种或多种:声明定义、类型定义和补充定义。Optionally, the attribute definition includes one or more of the following: declaration definition, type definition, and supplementary definition.
其中,补充定义包括以下的一种或多种:键定义、名字空间定义、名字定义、小数位数定义。Among them, the supplementary definition includes one or more of the following: key definition, name space definition, name definition, and decimal place definition.
处理器111可用于执行上述方法实施例中网络设备的处理过程。The processor 111 may be used to execute the processing procedure of the network device in the foregoing method embodiment.
可选的,网络设备还可以包括存储器114,存储器114用于存储网络设备的程序代码和数据。Optionally, the network device may further include a memory 114, and the memory 114 is used to store program codes and data of the network device.
在本申请实施例中,上述各实施例之间可以相互参考和借鉴,相同或相似的步骤以及名词均不再一一赘述。In the embodiments of the present application, the above-mentioned embodiments can refer to each other and learn from each other, and the same or similar steps and nouns will not be repeated one by one.
其中,处理器111也可以为控制器,图10中表示为“控制器/处理器111”。接收器112和发送器113用于支持网络设备与上述实施例中的管理设备之间收发信息,以及支持网络设备与其他网络设备之间进行无线电通信。可选的,处理器111执行各种用于与管理设备通信的功能。The processor 111 may also be a controller, which is represented as "controller/processor 111" in FIG. 10. The receiver 112 and the transmitter 113 are used to support the sending and receiving of information between the network device and the management device in the foregoing embodiment, and to support radio communication between the network device and other network devices. Optionally, the processor 111 performs various functions for communicating with the management device.
此外,网络设备还可以包括通信接口115。通信接口115用于支持网络设备与其他网络实体进行通信。In addition, the network device may also include a communication interface 115. The communication interface 115 is used to support the network device to communicate with other network entities.
处理器111例如中央处理器(central processing unit,CPU),还可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个特定集成电路,或,一个或多个微处理器,或,一个或者多个现场可编程门阵列等。存储器111可以是一个存储器,也可以是多个存储元件的统称。The processor 111, for example, a central processing unit (CPU), may also be one or more integrated circuits configured to implement the above methods, for example: one or more specific integrated circuits, or, one or more micro-processing Device, or, one or more field programmable gate arrays, etc. The memory 111 may be one memory, or may be a collective term for multiple storage elements.
本申请实施例,还提供了一种计算机可读存储介质,包括了指令,当指令在计算机上运行时,计算机可以执行图4-图7所提供的方法。The embodiment of the present application also provides a computer-readable storage medium including instructions. When the instructions are run on a computer, the computer can execute the methods provided in FIGS. 4-7.
本申请实施例,还提供了一种计算机程序,包括程序代码,当计算机运行计算机程序时,程序代码执行执行图4-图7所提供的方法。The embodiment of the present application also provides a computer program, including program code. When the computer runs the computer program, the program code executes the methods provided in FIGS. 4-7.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如,同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如,红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如,固态硬盘(solid state disk,SSD))等。In the above-mentioned embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented by software, it can be implemented in the form of a computer program product in whole or in part. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. Computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, computer instructions may be transmitted from a website, computer, server, or data center through a cable (such as , Coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL) or wireless (for example, infrared, wireless, microwave, etc.) transmission to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center integrated with one or more available media. The usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, and a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)).
本领域技术人员应该可以意识到,在上述一个或多个示例中,本申请实施例所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。计 算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是通用或专用计算机能够存取的任何可用介质。Those skilled in the art should be aware that, in one or more of the foregoing examples, the functions described in the embodiments of the present application may be implemented by hardware, software, firmware, or any combination thereof. When implemented by software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on the computer-readable medium. The computer-readable medium includes a computer storage medium and a communication medium, where the communication medium includes any medium that facilitates the transfer of a computer program from one place to another. The storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific implementations of this application, but the protection scope of this application is not limited to this. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application. Should be covered within the scope of protection of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

Claims (18)

  1. 一种报文处理方法,其特征在于,所述方法应用于网络设备,所述方法包括:A message processing method, characterized in that the method is applied to a network device, and the method includes:
    接收来自管理设备的报文请求消息,其中,所述报文请求消息为基于YANG数据模型的文本信息;Receiving a message request message from the management device, where the message request message is text information based on the YANG data model;
    根据预存的数据集合,确定与所述报文请求消息对应的数据对象,其中,所述数据集合中包括一个或多个数据对象,所述数据对象为基于Protobuf数据模型的数据;Determine a data object corresponding to the message request message according to a pre-stored data set, where the data set includes one or more data objects, and the data objects are data based on the Protobuf data model;
    将与所述报文请求消息对应的数据对象,确定为报文响应消息,并向所述管理设备发送所述报文响应消息。The data object corresponding to the message request message is determined as a message response message, and the message response message is sent to the management device.
  2. 根据权利要求1所述的方法,其特征在于,所述方法,还包括:The method according to claim 1, wherein the method further comprises:
    根据预存的映射文件,将每一种内存对象中的每一子对象,转换为每一数据值组合,其中,所述映射文件用于指示所述子对象与所述数据值组合之间的转换关系,所述数据值组合为基于Protobuf数据模型的数据表达;According to the pre-stored mapping file, each sub-object in each memory object is converted into each data value combination, wherein the mapping file is used to indicate the conversion between the sub-object and the data value combination Relationship, the data value combination is a data expression based on the Protobuf data model;
    根据预存的第一模型文件和所述每一数据值组合,生成每一所述数据对象,其中,所述第一模型文件为基于Protobuf数据模型的文件。According to the pre-stored first model file and the combination of each data value, each of the data objects is generated, wherein the first model file is a file based on the Protobuf data model.
  3. 根据权利要求2所述的方法,其特征在于,映射文件中包括一种或多种内存对象的转换信息,每一种内存对象的转换信息中包括对象标识和子对象信息;The method according to claim 2, wherein the mapping file includes conversion information of one or more types of memory objects, and the conversion information of each type of memory object includes object identification and sub-object information;
    其中,子对象信息中包括一个或多个子对象的表征信息,表征信息中包括第一路径和格式属性;第一路径用于指示第二模型文件中的与子对象对应的节点,与子对象对应的节点具有数据值,所述第二模型文件为基于YANG数据模型的文件,所述第二模型文件包括N个节点,N个节点中每M个节点与每一报文请求消息对应;格式属性用于指示基于Protobuf数据模型的数据表达方式;N、M为大于等于1的整数,M小于等于N。Among them, the sub-object information includes the characterization information of one or more sub-objects, and the characterization information includes the first path and format attributes; the first path is used to indicate the node corresponding to the sub-object in the second model file, which corresponds to the sub-object The node of has a data value, the second model file is a file based on the YANG data model, the second model file includes N nodes, and each M node of the N nodes corresponds to each message request message; format attributes Used to indicate the data expression method based on the Protobuf data model; N and M are integers greater than or equal to 1, and M is less than or equal to N.
  4. 根据权利要求3所述的方法,其特征在于,每一种内存对象的转换信息中还包括第二路径;其中,第二路径用于指示所述第二模型文件中的与内存对象对应的节点。The method according to claim 3, wherein the conversion information of each memory object further includes a second path; wherein the second path is used to indicate the node corresponding to the memory object in the second model file .
  5. 根据权利要求3或4所述的方法,其特征在于,根据预存的映射文件,将每一种内存对象中的每一子对象,转换为每一数据值组合,包括:The method according to claim 3 or 4, wherein, according to a pre-stored mapping file, converting each sub-object in each memory object into each data value combination includes:
    根据所述第一路径,确定与每一子对象对应的节点,并读取与每一子对象对应的节点中的数据值;According to the first path, determine the node corresponding to each sub-object, and read the data value in the node corresponding to each sub-object;
    根据每一子对象的格式属性,与每一子对象对应的节点中的数据值,转换为每一数据值组合。According to the format attribute of each sub-object, the data value in the node corresponding to each sub-object is converted into each data value combination.
  6. 根据权利要求3-5任一项所述的方法,其特征在于,根据预存的第一模型文件和所述每一数据值组合,生成每一所述数据对象,包括:The method according to any one of claims 3-5, wherein generating each of the data objects according to a combination of the prestored first model file and each of the data values comprises:
    根据所述第一模型文件,生成各Protobuf对象,其中,所述Protobuf对象中包括所述对象标识和基于Protobuf的属性定义;Generate each Protobuf object according to the first model file, wherein the Protobuf object includes the object identifier and the attribute definition based on Protobuf;
    将所述每一数据值组合,赋值给每一Protobuf对象,得到每一所述数据对象。Combining each of the data values and assigning them to each Protobuf object to obtain each of the data objects.
  7. 根据权利要求3-6任一项所述的方法,其特征在于,所述方法,还包括:The method according to any one of claims 3-6, wherein the method further comprises:
    获取所述第二模型文件;Acquiring the second model file;
    根据预设的映射关系,将所述第二模型文件转换为所述第一模型文件,其中,所述映射关系用于指示所述第二模型文件中的属性定义与所述第一模型文件中的属性定义之间的映射关系。The second model file is converted into the first model file according to a preset mapping relationship, where the mapping relationship is used to indicate that the attribute definition in the second model file is different from that in the first model file. The mapping relationship between the attribute definitions.
  8. 根据权利要求7所述的方法,其特征在于,所述属性定义包括以下的一种或多种:声明定义、类型定义和补充定义;The method according to claim 7, wherein the attribute definition includes one or more of the following: declaration definition, type definition and supplementary definition;
    其中,所述补充定义包括以下的一种或多种:键定义、名字空间定义、名字定义、小数位数定义。Wherein, the supplementary definition includes one or more of the following: key definition, name space definition, name definition, and decimal place definition.
  9. 一种网络设备,其特征在于,所述网络设备包括:处理器、接收器和发送器;A network device, characterized in that, the network device includes: a processor, a receiver, and a transmitter;
    所述接收器,用于接收来自管理设备的报文请求消息,其中,所述报文请求消息为基于可扩展标记语言XML的消息;The receiver is configured to receive a message request message from a management device, where the message request message is a message based on extensible markup language XML;
    所述处理器,用于根据预存的数据集合,确定与所述报文请求消息对应的数据对象,其中,所述数据集合中包括一个或多个数据对象,所述数据对象为基于Protobuf数据模型的数据;将与所述报文请求消息对应的数据对象,确定为报文响应消息;The processor is configured to determine a data object corresponding to the message request message according to a pre-stored data set, wherein the data set includes one or more data objects, and the data objects are based on the Protobuf data model的 data; determine the data object corresponding to the message request message as a message response message;
    所述发送器,用于向所述管理设备发送所述报文响应消息,其中,所述报文响应消息为基于XML的消息。The transmitter is configured to send the message response message to the management device, where the message response message is an XML-based message.
  10. 根据权利要求9所述的网络设备,其特征在于,所述处理器,还用于:The network device according to claim 9, wherein the processor is further configured to:
    根据预存的映射文件,将每一种内存对象中的每一子对象,转换为每一数据值组合,其中,所述映射文件用于指示所述子对象与所述数据值组合之间的转换关系,所述数据值组合为基于Protobuf数据模型的数据表达;According to the pre-stored mapping file, each sub-object in each memory object is converted into each data value combination, wherein the mapping file is used to indicate the conversion between the sub-object and the data value combination Relationship, the data value combination is a data expression based on the Protobuf data model;
    根据预存的第一模型文件和所述每一数据值组合,生成每一所述数据对象,其中,所述第一模型为基于Protobuf数据模型的文件。According to the pre-stored first model file and the combination of each data value, each of the data objects is generated, wherein the first model is a file based on the Protobuf data model.
  11. 根据权利要求10所述的网络设备,其特征在于,映射文件中包括一种或多种内存对象的转换信息,每一种内存对象的转换信息中包括对象标识和子对象信息;The network device according to claim 10, wherein the mapping file includes conversion information of one or more types of memory objects, and the conversion information of each type of memory object includes object identification and sub-object information;
    其中,子对象信息中包括一个或多个子对象的表征信息,表征信息中包括第一路径和格式属性;第一路径用于指示第二模型文件中的与子对象对应的节点,与子对象对应的节点具有数据值,所述第二模型文件为基于YANG数据模型的文件,所述第二模型文件包括N个节点,N个节点中每M个节点与每一报文请求消息对应;格式属性用于指示基于Protobuf数据模型的数据表达方式;N、M为大于等于1的整数,M小于等于N。Among them, the sub-object information includes the characterization information of one or more sub-objects, and the characterization information includes the first path and format attributes; the first path is used to indicate the node corresponding to the sub-object in the second model file, which corresponds to the sub-object The node of has a data value, the second model file is a file based on the YANG data model, the second model file includes N nodes, and each M node of the N nodes corresponds to each message request message; format attributes Used to indicate the data expression method based on the Protobuf data model; N and M are integers greater than or equal to 1, and M is less than or equal to N.
  12. 根据权利要求11所述的网络设备,其特征在于,每一种内存对象的转换信息中还包括第二路径;其中,第二路径用于指示所述第二模型文件中的与内存对象对应的节点。The network device according to claim 11, wherein the conversion information of each type of memory object further includes a second path; wherein, the second path is used to indicate the second path in the second model file corresponding to the memory object node.
  13. 根据权利要求11或12所述的网络设备,其特征在于,所述处理器在用于根据预存的映射文件,将每一种内存对象中的每一子对象,转换为每一数据值组合时,具体用于:The network device according to claim 11 or 12, wherein the processor is configured to convert each sub-object in each memory object into each data value combination according to a pre-stored mapping file , Specifically used for:
    根据所述第一路径,确定与每一子对象对应的节点,并读取与每一子对象对应的节点中 的数据值;According to the first path, determine the node corresponding to each child object, and read the data value in the node corresponding to each child object;
    根据每一子对象的格式属性,与每一子对象对应的节点中的数据值,转换为每一数据值组合。According to the format attribute of each sub-object, the data value in the node corresponding to each sub-object is converted into each data value combination.
  14. 根据权利要求11-13任一项所述的网络设备,其特征在于,所述处理器在用于根据预存的第一模型文件和所述每一数据值组合,生成每一所述数据对象时,具体用于:The network device according to any one of claims 11-13, wherein the processor is configured to generate each of the data objects according to a combination of the pre-stored first model file and each of the data values , Specifically used for:
    根据所述第一模型文件,生成各Protobuf对象,其中,所述Protobuf对象中包括所述对象标识和基于Protobuf的属性定义;Generate each Protobuf object according to the first model file, wherein the Protobuf object includes the object identifier and the attribute definition based on Protobuf;
    将所述每一数据值组合,赋值给每一Protobuf对象,得到每一所述数据对象。Combining each of the data values and assigning them to each Protobuf object to obtain each of the data objects.
  15. 根据权利要求11-14任一项所述的网络设备,其特征在于,所述处理器,还用于:The network device according to any one of claims 11-14, wherein the processor is further configured to:
    获取所述第二模型文件;Acquiring the second model file;
    根据预设的映射关系,将所述第二模型文件转换为所述第一模型文件,其中,所述映射关系用于指示所述第二模型文件中的属性定义与所述第一模型文件中的属性定义之间的映射关系。The second model file is converted into the first model file according to a preset mapping relationship, where the mapping relationship is used to indicate that the attribute definition in the second model file is different from that in the first model file. The mapping relationship between the attribute definitions.
  16. 根据权利要求15所述的网络设备,其特征在于,所述属性定义包括以下的一种或多种:声明定义、类型定义和补充定义;The network device according to claim 15, wherein the attribute definition includes one or more of the following: declaration definition, type definition and supplementary definition;
    其中,所述补充定义包括以下的一种或多种:键定义、名字空间定义、名字定义、小数位数定义。Wherein, the supplementary definition includes one or more of the following: key definition, name space definition, name definition, and decimal place definition.
  17. 一种计算机可读存储介质,其特征在于,包括指令,当其在计算机上运行时,使得计算机执行如权利要求1至8任一项所述的方法。A computer-readable storage medium, characterized by comprising instructions, which when run on a computer, causes the computer to execute the method according to any one of claims 1 to 8.
  18. 一种计算机程序,其特征在于,包括程序代码,当计算机运行所述计算机程序时,所述程序代码执行如权利要求1至8任一项所述的方法。A computer program, characterized by comprising program code, when the computer runs the computer program, the program code executes the method according to any one of claims 1 to 8.
PCT/CN2021/078975 2020-03-09 2021-03-04 Packet processing method and device WO2021179977A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010159272.1A CN113381870B (en) 2020-03-09 2020-03-09 Message processing method and device
CN202010159272.1 2020-03-09

Publications (1)

Publication Number Publication Date
WO2021179977A1 true WO2021179977A1 (en) 2021-09-16

Family

ID=77569438

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/078975 WO2021179977A1 (en) 2020-03-09 2021-03-04 Packet processing method and device

Country Status (2)

Country Link
CN (1) CN113381870B (en)
WO (1) WO2021179977A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115643314A (en) * 2022-10-21 2023-01-24 中电金信软件有限公司 System alternation information confirmation method and system
WO2024021045A1 (en) * 2022-07-29 2024-02-01 Huawei Technologies Co., Ltd. System and method for improving efficiency of yang based configuration of devices

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117251144B (en) * 2023-11-20 2024-03-29 北京友友天宇系统技术有限公司 Theme-based data object access and release method and related equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107872337A (en) * 2016-09-26 2018-04-03 中国电信股份有限公司 Information conversion method, device and system
CN109951315A (en) * 2019-02-14 2019-06-28 烽火通信科技股份有限公司 A kind of method and system realizing YANG model and being mapped to internal model
CN110474794A (en) * 2019-07-10 2019-11-19 烽火通信科技股份有限公司 A kind of information conversion method and system of SDN framework
WO2019233616A1 (en) * 2018-06-06 2019-12-12 Telefonaktiebolaget Lm Ericsson (Publ) Method and apparatus for merging of yang configuration and state data in model-driven applications

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8838653B2 (en) * 2010-11-01 2014-09-16 Cisco Technology, Inc. Translating an object-oriented data model to a YANG data model
CN105138771A (en) * 2015-08-25 2015-12-09 国网江西省电力公司鹰潭供电分公司 Data modeling tool based on power dispatching automation rule engine

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107872337A (en) * 2016-09-26 2018-04-03 中国电信股份有限公司 Information conversion method, device and system
WO2019233616A1 (en) * 2018-06-06 2019-12-12 Telefonaktiebolaget Lm Ericsson (Publ) Method and apparatus for merging of yang configuration and state data in model-driven applications
CN109951315A (en) * 2019-02-14 2019-06-28 烽火通信科技股份有限公司 A kind of method and system realizing YANG model and being mapped to internal model
CN110474794A (en) * 2019-07-10 2019-11-19 烽火通信科技股份有限公司 A kind of information conversion method and system of SDN framework

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024021045A1 (en) * 2022-07-29 2024-02-01 Huawei Technologies Co., Ltd. System and method for improving efficiency of yang based configuration of devices
CN115643314A (en) * 2022-10-21 2023-01-24 中电金信软件有限公司 System alternation information confirmation method and system
CN115643314B (en) * 2022-10-21 2024-02-23 中电金信软件有限公司 System alternating information confirmation method and system

Also Published As

Publication number Publication date
CN113381870A (en) 2021-09-10
CN113381870B (en) 2023-01-06

Similar Documents

Publication Publication Date Title
WO2021179977A1 (en) Packet processing method and device
US8635315B2 (en) Method and system for dynamic loading of management information bases on network devices
CA2645692C (en) System for providing a configurable adaptor for mediating systems
US7668908B2 (en) System and method for generalized and distributed scalable eventing system
WO2020062959A1 (en) Data configuration method and apparatus
CN106664224B (en) Method and system for metadata enhanced inventory management for communication systems
WO2021218144A1 (en) Data processing method and apparatus, computer device, and storage medium
WO2003046752A1 (en) System and method for generating a representation of a configuration schema
EP3716067A1 (en) Query proxy for delivery of dynamic system state
CN110958131B (en) GraphQL-based queries supported on a YANG configuration data model
WO2021185083A1 (en) Vnf instantiation method and device
US9129035B2 (en) Systems, methods, and apparatus for accessing object representations of data sets
WO2020038337A1 (en) Network configuration method, apparatus and system
US20230308348A1 (en) Server to support client data models from heterogeneous data sources
US11354491B1 (en) Systems and methods for improved data modeling and translation
KR20180058458A (en) Virtualized network function management method and virtualized network function manager using TOSCA based information model, and network function virtualization system using the same
US11936523B2 (en) Incremental network intent provisioning
EP4191907A1 (en) Vnf instantiation method and apparatus
WO2006051599A1 (en) Resource management program, resource management method, and resource management device
JP6677052B2 (en) Communication management device, communication management method and program
TWI540861B (en) Management system and management method
US11425221B1 (en) Runtime extensible application programming interface server
US11973660B1 (en) Method and system for data model mapping for network management
US11663058B1 (en) Preemptive filtering of events of an event bus with a deterministic filter
EP4325791A1 (en) Configuration updating method and apparatus, and system and computer-readable storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21768589

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21768589

Country of ref document: EP

Kind code of ref document: A1