Network element service interface creation method, apparatus, and related device

By automatically creating execution body service interfaces through RPC message generation in the main control unit, the problem of cumbersome and costly network element service interface creation operations is solved, achieving fast and efficient interface consistency configuration and reducing R&D costs.

CN116743832BActive Publication Date: 2026-05-05PURPLE MOUNTAIN LAB +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
PURPLE MOUNTAIN LAB
Filing Date
2023-06-26
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

In existing technologies, the creation of network element service interfaces is cumbersome and costly, making it difficult to achieve fast and efficient interface consistency configuration.

Method used

By creating a business interface in the main control unit and generating an RPC message, which is then sent to the execution unit, the corresponding business interface is automatically created. The RPC technology is used to synchronize the business interfaces between the main control unit and the execution unit.

Benefits of technology

It enables the rapid and efficient creation of network element service interfaces, reduces R&D costs, and ensures the consistency of service interfaces between the main control unit and the execution unit.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116743832B_ABST
    Figure CN116743832B_ABST
Patent Text Reader

Abstract

This application discloses a method for creating a network element service interface. The network element includes a main control unit and an execution unit. The method is applied to the main control unit and includes: creating a first service interface; generating configuration information for the first service interface; generating an RPC message based on the configuration information; and sending the RPC message to the execution unit, so that the execution unit uses the RPC message to create a second service interface corresponding to the first service interface. Applying the technical solution provided in this application can achieve fast and efficient creation of network element service interfaces, effectively reducing R&D costs. This application also discloses a network element service interface creation device, an electronic device, and a computer-readable storage medium, which also have the above-mentioned technical effects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet technology, and in particular to a method for creating a network element service interface, as well as a device, electronic device and computer-readable storage medium for creating a network element service interface. Background Technology

[0002] To support network services, it is often necessary to add various network elements to the network. These network elements include the main control unit and multiple execution units, and their networks can be connected through virtual switches.

[0003] Generally, network elements have one or more service interfaces, which are used for input / output of network data transmission with other network elements. Taking an SDN (Software-defined Networking) controller as an example, the main control unit and multiple execution units have the same service interface. Protocol messages received from the main control unit's service interface need to be copied and distributed to multiple execution units. After receiving the message, the execution unit needs to recognize the protocol message as having been received from the service interface, and then perform further protocol message parsing and processing. Obviously, to ensure the normal processing of protocol messages, the consistency of service interfaces needs to be guaranteed, that is, the main control unit and each execution unit need to create the same interface and configure the same address information. To address this issue, related technologies still use manual configuration, which is cumbersome, inefficient, and costly.

[0004] Therefore, how to achieve rapid and efficient creation of network element service interfaces and reduce R&D costs is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0005] The purpose of this application is to provide a method for creating network element service interfaces, which can achieve fast and efficient creation of network element service interfaces and effectively reduce R&D costs. Another purpose of this application is to provide a network element service interface creation device, electronic device, and computer-readable storage medium, all of which have the above-mentioned beneficial effects.

[0006] In a first aspect, this application provides a method for creating a network element service interface, wherein the network element includes a main control unit and an execution unit, and the method is applied to the main control unit, including:

[0007] Create the first business interface;

[0008] Generate the configuration information for the first service interface;

[0009] Generate an RPC message based on the configuration information;

[0010] The RPC message is sent to the executor so that the executor can use the RPC message to create a second service interface corresponding to the first service interface.

[0011] Optionally, the configuration information for generating the first service interface includes:

[0012] Determine the interface name, binding VRF information, interface IP address, and interface MAC address of the first service interface;

[0013] The configuration information of the first service interface is generated based on the interface name, the binding VRF information, the interface IP address, and the interface MAC address.

[0014] Optionally, the method for creating network element service interfaces further includes:

[0015] Receive the RPC reply message from the executor;

[0016] The index information of the second service interface is determined based on the RPC reply message;

[0017] The business interface index mapping relationship between the main control unit and the execution body is generated based on the index information.

[0018] Optionally, the method for creating network element service interfaces further includes:

[0019] When a service message is received, the first target service interface for receiving the service message is determined.

[0020] The target index information corresponding to the first target business interface is determined based on the business interface index mapping relationship.

[0021] Add the target index information to the service message to obtain a new service message;

[0022] The new service message is sent to the executor so that the executor can determine the second target service interface corresponding to the first target service interface based on the target index information in the new service message.

[0023] Secondly, this application provides a method for creating a network element service interface, wherein the network element includes a main control unit and an execution unit, and the method is applied to the execution unit, including:

[0024] The system receives RPC messages sent by the main control unit; the RPC messages are generated by the main control unit based on the configuration information of the first service interface after the first service interface is created.

[0025] The configuration information of the first service interface is determined based on the RPC message;

[0026] Create a second service interface corresponding to the first service interface based on the configuration information.

[0027] Optionally, creating a second service interface corresponding to the first service interface based on the configuration information includes:

[0028] The interface name, binding VRF information, interface IP address, and interface MAC address of the first service interface are determined based on the configuration information.

[0029] Create the second business interface according to the interface name;

[0030] Create a new VRF based on the bound VRF information;

[0031] Bind the second service interface to the new VRF;

[0032] Set the IP address of the second service interface to the IP address of the interface;

[0033] Set the MAC address of the second service interface to the MAC address of the interface.

[0034] Optionally, the method for creating network element service interfaces further includes:

[0035] Generate the index information for the second business interface;

[0036] Generate an RPC response message based on the index information;

[0037] The RPC response message is fed back to the main control unit, so that the main control unit can generate a business interface index mapping relationship between the main control unit and the execution body based on the index information.

[0038] Optionally, the method for creating network element service interfaces further includes:

[0039] The main control unit receives a new service message sent by the main control unit; the new service message is generated by the main control unit based on the original service message and the target index information of the first target service interface that receives the original service message.

[0040] The new service message is parsed to obtain the original service message and the target index information;

[0041] Determine the second target service interface corresponding to the first target service interface based on the target index information;

[0042] The original service message is sent to the second target service interface.

[0043] Thirdly, this application also discloses a network element service interface creation device, wherein the network element includes a main control unit and an execution unit, and the device is applied to the main control unit, comprising:

[0044] The first creation module is used to create the first business interface;

[0045] The first generation module is used to generate the configuration information of the first business interface;

[0046] The second generation module is used to generate RPC messages based on the configuration information;

[0047] The sending module is used to send the RPC message to the executor, so that the executor can use the RPC message to create a second service interface corresponding to the first service interface.

[0048] Fourthly, this application also discloses a network element service interface creation device, wherein the network element includes a main control unit and an execution unit, and the device is applied to the execution unit, comprising:

[0049] The receiving module is used to receive RPC messages sent by the main control unit; the RPC messages are generated by the main control unit according to the configuration information of the first service interface after the first service interface is created.

[0050] The determination module is used to determine the configuration information of the first service interface based on the RPC message;

[0051] The second creation module is used to create a second service interface corresponding to the first service interface based on the configuration information.

[0052] Fifthly, this application also discloses an electronic device, comprising:

[0053] Memory, used to store computer programs;

[0054] A processor is used to execute the computer program to implement the steps of any of the network element service interface creation methods described above.

[0055] Sixthly, this application also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of any of the network element service interface creation methods described above.

[0056] This application provides a method for creating a network element service interface. The network element includes a main control unit and an execution unit. The method is applied to the main control unit and includes: creating a first service interface; generating configuration information for the first service interface; generating an RPC message based on the configuration information; and sending the RPC message to the execution unit so that the execution unit uses the RPC message to create a second service interface corresponding to the first service interface.

[0057] By applying the technical solution provided in this application, after the main control unit completes the creation of the service interface (i.e., the first service interface mentioned above), the configuration information of the service interface is collected to generate an RPC (Remote Procedure Call) message. Then, the RPC message is sent to the execution body so that the execution body can use the configuration information to create the service interface (i.e., the second service interface mentioned above). Thus, based on RPC technology, the automatic creation of service interfaces in the main control unit and the execution body within the network element is realized, and the synchronization of service interfaces between the two is achieved without manual operation. Therefore, based on this technical solution, the creation of network element service interfaces is achieved quickly and efficiently, effectively reducing the research and development cost.

[0058] The network element service interface creation device, electronic device, and computer-readable storage medium provided in this application also have the above-mentioned technical effects, and will not be described in detail here. Attached Figure Description

[0059] To more clearly illustrate the technical solutions in the prior art and the embodiments of this application, the accompanying drawings used in the description of the prior art and the embodiments of this application will be briefly introduced below. Of course, the accompanying drawings described below with respect to the embodiments of this application are only a part of the embodiments in this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort, and such other drawings also fall within the protection scope of this application.

[0060] Figure 1 A schematic diagram of the structure of a network system provided in this application;

[0061] Figure 2 A flowchart illustrating a method for creating a network element service interface provided in this application;

[0062] Figure 3 A flowchart illustrating another method for creating a network element service interface provided in this application;

[0063] Figure 4 A network element deployment diagram provided in this application;

[0064] Figure 5A flowchart illustrating a synchronous creation business interface provided in this application;

[0065] Figure 6 A schematic diagram of the message format of a new service message provided in this application;

[0066] Figure 7 A schematic diagram of a mimicry message header format provided in this application;

[0067] Figure 8 This application provides another network element deployment diagram;

[0068] Figure 9 A schematic diagram of a network element service interface creation device provided in this application;

[0069] Figure 10 A schematic diagram of another network element service interface creation device provided in this application;

[0070] Figure 11 This is a schematic diagram of the structure of an electronic device provided in this application. Detailed Implementation

[0071] The core of this application is to provide a method for creating network element service interfaces, which can achieve fast and efficient creation of network element service interfaces and effectively reduce R&D costs. Another core aspect of this application is to provide a network element service interface creation device, electronic device, and computer-readable storage medium, all of which have the aforementioned beneficial effects.

[0072] To provide a clearer and more complete description of the technical solutions in the embodiments of this application, the technical solutions in the embodiments of this application will be described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0073] Please refer to Figure 1 , Figure 1 This application provides a schematic diagram of a network system structure. The network elements include a main control unit and execution units (generally multiple), deployed on different virtual machines / containers. These virtual machines / containers are deployed on the same or different servers, and their networks are connected through virtual switches on the network servers. The network element service interface creation method provided in this application is applied to this network system.

[0074] This application provides a method for creating network element service interfaces.

[0075] Please refer to Figure 2, Figure 2 This is a flowchart illustrating a method for creating a network element service interface provided in this application. The method is applied to the main control unit of a network element and may include the following steps S101 to S104.

[0076] S101: Create the first business interface.

[0077] This step aims to create the first service interface, which is the service interface within the main control unit. The creation of the first service interface can be initiated in response to a service interface creation command. Upon receiving this command, the main control unit can execute the service interface creation operation to complete the creation of the first service interface. This command may contain relevant information about the first service interface, including but not limited to port name and port address.

[0078] S102: Generate configuration information for the first business interface.

[0079] This step aims to generate the configuration information for the first service interface. After the creation of the first service interface is completed, its information can be statistically analyzed to obtain its configuration information. This configuration information may include, but is not limited to, the name, address, and bound device information of the first service interface. It is used to instruct each executor to create a second service interface corresponding to the first service interface, so as to achieve consistency of service interfaces between the main control unit and the executors.

[0080] S103: Generate RPC messages based on configuration information.

[0081] This step aims to generate RPC messages. Specifically, after obtaining the configuration information of the first service interface, RPC messages can be generated using this configuration information. This allows the configuration information to be remotely transmitted to each execution entity in the form of RPC messages, thereby completing the creation of the service interface (i.e., the second service interface corresponding to the first service interface) within the execution entity. RPC, or Remote Procedure Call protocol, is a protocol that requests services from a remote computer over a network without needing to understand the underlying network technology. In this embodiment, RPC technology is used to remotely transmit relevant information between the main control unit and the execution entities within a network element.

[0082] S104: Send the RPC message to the executor so that the executor can use the RPC message to create a second service interface corresponding to the first service interface.

[0083] This step aims to send RPC messages, specifically to the various execution units within the network element where the main control unit resides. After the RPC messages are sent to the execution units, they can obtain the configuration information for the first service interface through message parsing. They can then use this configuration information to create a second service interface corresponding to the first service interface, thus ensuring consistency of service interfaces between the main control unit and the execution units. This completes the creation of the network element's internal service interface.

[0084] As can be seen, the network element service interface creation method provided in this application embodiment, after the main control unit completes the creation of the service interface (i.e., the first service interface mentioned above), collects the configuration information of the service interface to generate an RPC message, and then sends the RPC message to the execution body so that the execution body can use the configuration information therein to create the service interface (i.e., the second service interface mentioned above). Thus, based on RPC technology, the automatic creation of service interfaces in the main control unit and the execution body within the network element is realized, and the synchronization of service interfaces between the two is realized without manual operation. Therefore, based on this technical solution, fast and efficient network element service interface creation is achieved, effectively reducing R&D costs.

[0085] Based on the above embodiments:

[0086] In one embodiment of this application, the configuration information for generating the first service interface may include:

[0087] Determine the interface name, VRF binding information, interface IP address, and interface MAC address of the first business interface;

[0088] Generate the configuration information for the first business interface based on the interface name, bound VRF information, interface IP address, and interface MAC address.

[0089] This application provides a method for generating configuration information for a first service interface. Specifically, after creating the first service interface, the interface name, bound VRF (Virtual Routing and Rorwarding) information, interface IP address, and interface MAC address of the first service interface can be determined statistically, and configuration information for the first service interface can be generated based on this information. Subsequent execution units can then use this information to create a second service interface.

[0090] In one embodiment of this application, the method for creating a network element service interface may further include:

[0091] Receive RPC response messages from the executor;

[0092] The index information of the second service interface is determined based on the RPC reply message;

[0093] Generate the business interface index mapping relationship between the main control unit and the execution unit based on the index information.

[0094] The network element service creation method provided in this application embodiment can also enable the main control unit to record the index information of the second service interface in the execution body, so as to facilitate the subsequent exchange of service messages between the two and thus realize the corresponding service processing.

[0095] In the implementation process, each executor can add index information to the second business interface after creating it (for querying the second business interface during subsequent business message exchanges), and generate an RPC reply message based on this index information to send to the main control unit. Furthermore, the main control unit, upon receiving the RPC reply message, can obtain the index information, i.e., the index information of the second business interface, through message parsing. Finally, a business interface index mapping relationship between the main control unit and the executors can be generated based on this index information. This business interface index mapping relationship can be in tabular form. For example, please refer to Table 1 below for the business interface index mapping relationship table.

[0096] Table 1. Index Mapping Relationship of a Business Interface

[0097]

[0098] In one embodiment of this application, the method for creating a network element service interface may further include:

[0099] When a business message is received, the first target business interface for receiving the business message is determined.

[0100] Determine the target index information corresponding to the first target business interface based on the business interface index mapping relationship;

[0101] Add the target index information to the business message to obtain the new business message;

[0102] The new service message is sent to the executor so that the executor can determine the second target service interface corresponding to the first target service interface based on the target index information in the new service message.

[0103] The network element service interface creation method provided in this application embodiment can further implement service message processing. For the main control unit in the network element, when it receives a service message, it can determine the first target service interface that received the service message (the number of first service interfaces created in the main control unit may not be unique). Therefore, it can determine the target index information corresponding to the first target service interface by querying the service interface index mapping relationship (as shown in Table 1). Further, it adds the target index information to the service message to obtain a new service message and sends it to the execution body. The execution body can then obtain the target index information in the new service message through message parsing, and simultaneously restore the original service message (i.e., the service message received by the first target service interface), thereby determining the second target service interface corresponding to the target index information. Finally, the execution body sends the restored service message to the second target service interface. At this point, the execution body can consider that the service message it received was received through the second target service interface corresponding to the first target service interface. In other words, the main control unit receives service messages through the first target service interface, and the execution body receives service messages through the second target service interface, and the first target service interface corresponds to the second target service interface.

[0104] This application provides another method for creating network element service interfaces.

[0105] Please refer to Figure 3 , Figure 3 This is a flowchart illustrating another method for creating a network element service interface provided in this application. This method is applied to the execution body of a network element and may include the following steps S201 to S203.

[0106] S201: Receive RPC messages sent by the main control unit; the RPC messages are generated by the main control unit after the first service interface is created, based on the configuration information of the first service interface.

[0107] This step aims to achieve the reception of RPC messages. The RPC messages are generated by the master control unit. After creating its own service interface (i.e., the aforementioned first service interface), the master control unit can obtain the configuration information of the first service interface and generate RPC messages based on this configuration information to send to the executors. The configuration information of the first service interface may include, but is not limited to, the name, address, and bound device information of the first service interface, which is used to instruct each executor to create a second service interface corresponding to the first service interface, thereby ensuring consistency of service interfaces between the master control unit and the executors.

[0108] S202: Determine the configuration information of the first service interface based on the RPC message.

[0109] This step aims to determine the configuration information of the first service interface. Specifically, based on the aforementioned RPC message generation method, after receiving the RPC message sent by the main control unit, the executor can obtain the configuration information of the first service interface through message parsing, so as to create its own service interface (i.e., the second service interface below) based on this configuration information.

[0110] S203: Create a second service interface corresponding to the first service interface based on the configuration information.

[0111] This step aims to create the second service interface. Specifically, after obtaining the configuration information of the first service interface, the executor can use this configuration information to create its own service interface, namely the aforementioned second service interface. It can be understood that since the configuration information is the configuration information of the first service interface within the main control unit, the second service interface created based on this configuration information is the service interface corresponding to the first service interface within the main control unit, thereby ensuring the consistency of service interfaces between the main control unit and the executor. This completes the creation of the network element's internal service interface.

[0112] As can be seen, the network element service interface creation method provided in this application embodiment, after the main control unit completes the creation of the service interface (i.e., the first service interface mentioned above), collects the configuration information of the service interface to generate an RPC message, and then sends the RPC message to the execution body so that the execution body can use the configuration information therein to create the service interface (i.e., the second service interface mentioned above). Thus, based on RPC technology, the automatic creation of service interfaces in the main control unit and the execution body within the network element is realized, and the synchronization of service interfaces between the two is realized without manual operation. Therefore, based on this technical solution, fast and efficient network element service interface creation is achieved, effectively reducing R&D costs.

[0113] Based on the above embodiments:

[0114] In one embodiment of this application, the creation of a second service interface corresponding to the first service interface based on configuration information may include:

[0115] Determine the interface name, VRF binding information, interface IP address, and interface MAC address of the first service interface based on the configuration information;

[0116] Create a second business interface based on the interface name;

[0117] Create a new VRF based on the bound VRF information;

[0118] Bind the second business interface to the new VRF;

[0119] Set the IP address of the second business interface to the interface IP address;

[0120] Set the MAC address of the second business interface to the interface's MAC address.

[0121] This application provides a method for creating a second service interface based on configuration information. Referring to the previous embodiments, when the configuration information includes an interface name, binding VRF information, an interface IP address, and an interface MAC address, the executable can determine these information based on the configuration information. Then, a second service interface can be created based on the interface name, a new VRF can be created based on the binding VRF information and bound to the second service interface, and the address information (IP address and MAC address) of the first service interface can be set as the address information of the second service interface. Thus, the creation of the second service interface is completed.

[0122] In one embodiment of this application, the method for creating a network element service interface may further include:

[0123] Generate index information for the second business interface;

[0124] Generate an RPC response message based on the index information;

[0125] The RPC response message is fed back to the main control unit so that the main control unit can generate a business interface index mapping relationship between the main control unit and the executor based on the index information.

[0126] The network element service creation method provided in this application embodiment can also enable the main control unit to record the index information of the second service interface in the execution body, so as to facilitate the subsequent exchange of service messages between the two and thus realize the corresponding service processing.

[0127] In the implementation process, each executor can add index information to the second business interface after creating it (for querying the second business interface during subsequent business message exchanges). This involves generating the index information for the second business interface as described above, and then generating an RPC reply message based on this index information and sending it to the main control unit. Furthermore, upon receiving the RPC reply message, the main control unit can obtain the index information—that is, the index information of the second business interface—through message parsing. Finally, the main control unit can generate a business interface index mapping relationship between the main control unit and the executors based on this index information. This business interface index mapping relationship can specifically be in tabular form.

[0128] In one embodiment of this application, the method for creating a network element service interface may further include:

[0129] Receive new service messages sent by the main control unit; the new service message is generated by the main control unit based on the original service message and the target index information of the first target service interface that received the original service message.

[0130] The new service message is parsed to obtain the original service message and target index information;

[0131] Determine the second target business interface corresponding to the first target business interface based on the target index information;

[0132] The original business message is sent to the second target business interface.

[0133] The network element service interface creation method provided in this application embodiment can further implement service message processing. For the main control unit in the network element, when it receives a service message, it can determine the first target service interface that received the service message (the number of first service interfaces created in the main control unit may not be unique). Therefore, it can determine the target index information corresponding to the first target service interface by querying the service interface index mapping relationship (as shown in Table 1). Further, it adds the target index information to the service message to obtain a new service message and sends it to the execution unit. The execution unit can then obtain the target index information in the new service message through message parsing, and simultaneously restore the original service message (i.e., the service message received by the first target service interface, i.e., the aforementioned original service message), thereby determining the second target service interface corresponding to the target index information. Finally, the execution unit sends the original service message to the second target service interface. At this point, the execution unit can consider that the service message it received was received through the second target service interface corresponding to the first target service interface. In other words, the main control unit receives service messages through the first target service interface, and the execution unit receives service messages through the second target service interface, with the first target service interface corresponding to the second target service interface.

[0134] Based on the above embodiments, this application provides yet another method for creating network element service interfaces.

[0135] First, please refer to Figure 4 , Figure 4 The network element deployment diagram provided in this application describes a system where the resources required for the deployment of the main control unit and execution units are not constrained by physical space but are uniformly allocated and managed by the cloud management platform. Physically, they can be deployed on different servers. The main control unit and execution units each have service interfaces and basic interfaces, both of which are virtual interfaces. Physical interfaces are used for physical network connections between servers. The basic interfaces are uniformly managed and allocated by the cloud management platform and are used for internal network communication between the main control unit and execution units. The service interfaces are used for receiving and sending protocol messages by the network function virtualization network elements. The main control unit and each execution unit have specific requirements for the service interfaces, requiring the same IP and MAC addresses; therefore, they cannot be uniformly managed and allocated by the cloud management platform.

[0136] The mimicry architecture of Network Functions Virtualization (NFV) network elements requires heterogeneous redundancy deployment of these elements, divided into a master control unit (MCU) and execution units. The MCU is the core control and decision-making unit in the mimicry architecture. Besides deploying NFV network elements, it also needs to deploy mimicry modules, including protocol proxies, mimicry adjudicators, and negative feedback scheduling. Heterogeneous NFV network elements are deployed on multiple execution units, ultimately achieving a heterogeneous redundancy architecture. The NFV network elements in the mimicry architecture must ensure input consistency between each execution unit and the MCU. The MCU has one or more service interfaces for transmitting network data with external network elements. To ensure that each execution unit has the same service input interface as the MCU, the service interfaces on the MCU need to be synchronized to multiple execution units. This ensures that the number of service interfaces, interface names, VRF names bound to the interfaces, interface IP addresses, and MAC addresses are identical on each execution unit, thereby guaranteeing consistency between the service interfaces on the MCU and the execution units.

[0137] For further information, please refer to [link / reference]. Figure 5 , Figure 5 The flowchart provided in this application for synchronously creating a business interface may include the following implementation process:

[0138] 1. Create a business interface (first business interface) on the main control unit and configure it to include the name of the business interface, the VRF name bound to the interface, the interface IP address, and the MAC address.

[0139] 2. Use the RPC (Remote Procedure Call) protocol to synchronously create business interfaces. RPC can be implemented using HTTP (Hypertext Transfer Protocol), or a custom protocol can be implemented using sockets. JSON-RPC can be used to implement a cross-language remote procedure call protocol. The main control unit, acting as a client, initiates a JSON-RPC synchronization request (RPC message). The executor, acting as the server, receives and processes the request and issues a JSON-RPC response (RPC recovery message). The content transmitted is defined using JSON format. JSON is a lightweight data exchange format. The JSON-RPC request message includes the name of each business interface, the bound VRF name, IP address, and MAC address. The format of the JSON-RPC request message is as follows:

[0140]

[0141]

[0142] In a JSON-RPC message, the content of the business interfaces can be represented as an array, and multiple business interfaces can be represented in the same RPC message. For example, if two business interfaces are created on the main control unit, with interface name G0 for business interface 1, not bound to a VRF, IP address 192.168.1.1 / 24, and MAC address 00-00-00-01-02-03; and interface name G1 for business interface 2, bound to VRF name vrf1, IP address 192.168.2.1 / 24, and MAC address 00-00-00-02-02-03, then the format of the JSON-RPC request message is as follows:

[0143]

[0144]

[0145] 3. The executor, acting as a JSON-RPC server, receives a JSON-RPC synchronization request from the main control unit. Parsing the message reveals the interface name, bound VRF name, IP address, MAC address, and other information. It then creates the corresponding interface, generates the corresponding VRF, binds it to the business interface, and configures the corresponding IP address and MAC address. In this process, different executors create their own corresponding business interfaces and VRFs. The index information for the corresponding interfaces on different executors may not be the same, and the ID values ​​of the corresponding VRFs may also differ.

[0146] 4. After receiving and processing the data, the executor sends a JSON-RPC response. The response includes the index information generated after the corresponding business interface was created on this executor, the ID value of the bound VRF, and indicates whether the business interface synchronization of the main control unit was successful or failed. If successful, the executor needs to synchronize the index information of the business interface. The format of the JSON-RPC response message is as follows:

[0147]

[0148]

[0149] If the business interface synchronization fails on the execution body, the content format of the JSON-RPC response message is as follows:

[0150]

[0151] 5. After receiving the JSON-RPC response message from the executor, the main control unit extracts the index information and VRF ID value of the business interface and stores them locally. Since the indexes of the same business interface on different executors may not be the same, and the ID values ​​of the VRFs bound to the same business interface on different executors may also not be the same, it is ultimately necessary to generate an index mapping table for the business interfaces (business interface index mapping relationship), as shown in Table 2. Table 2 is another method provided in this application, which records the interface index values ​​of all business interfaces on the main control unit and each executor, as well as the ID values ​​of the VRFs bound to the business interfaces.

[0152] Table 2. Another type of business interface index mapping relationship table

[0153]

[0154] Furthermore, business message processing operations are performed to ensure the synchronization of business messages. After the business interfaces between the main control unit and the executors are synchronized, the main control unit obtains the index information of the business interfaces on each executor, providing a foundation for the synchronization of business messages. Taking the SDN controller with a mimicry architecture as an example, the business messages received by the main control unit's business interface need to be copied and distributed to multiple executors through a protocol proxy. The messages copied and distributed by the protocol proxy include the complete message payload starting from the Ethernet header. In order for the executor to send the message to the specific business interface for processing when it receives the message, the protocol proxy needs to add a mimicry header to the message when copying and distributing the message. The mimicry header is filled with information such as the business interface index of the executor and transmitted to the executor through the virtual network. When the executor receives the message, it sends the message to the business interface corresponding to the extracted interface index information for processing, ultimately achieving complete consistency between the input message of the executor and the input message of the main control unit.

[0155] Please refer to Figure 6 , Figure 6 This application provides a schematic diagram of the message format for a new service message. The message format of the new service message is the message format for protocol proxy replication and distribution, consisting of an original message portion and a new message portion. The original message portion is the original message received by the master control unit from the service interface without being parsed by the protocol stack, including the original Ethernet header and Ethernet payload. The new message portion includes a new Ethernet header and a mimicry header. The new Ethernet header is a Layer 2 message header for internal network communication between the master control unit and the execution unit. It can be learned dynamically via ARP (Address Resolution Protocol) or specified statically. The mimicry header is used to identify which service interface the service message is received from, playing a decisive role in message replication and distribution between the master control unit and the execution unit in the mimicry network.

[0156] For further information, please refer to [link / reference]. Figure 7 , Figure 7 A schematic diagram of a mimicry message header format provided for this application is shown, wherein the meanings of each field are as follows:

[0157] (1) IF-ID: 32 bits, used to identify the ID value of the receiving message interface. The operating system kernel carried by the network element of the network function virtualization will assign a unique ID to each interface; as the main control unit or execution body in the mimicry architecture, it will assign a unique ID to each service interface.

[0158] (2) VRF-ID: 16 bits, used to identify the VRF bound to the interface. If a VRF is bound, it represents the ID of the VRF; if no VRF is bound, the ID value is 0.

[0159] (3) Reserved: 16 bits, reserved field, not used for the time being, for future expansion.

[0160] Finally, please refer to Figure 8 , Figure 8 This application provides another network element deployment diagram. Taking a cloud-based deployment of Network Functions Virtualization (NFV) as an example, the virtual networks between servers in the cloud environment are connected through Open vSwitch (OVS), and VXLAN (Virtual eXtensible Local Area Network) tunnels are established between OVSs. The main control unit and the execution unit each have service interfaces and basic interfaces, both of which are virtual interfaces. The service interfaces are used for NFV network elements to receive and send service packets, while the basic interfaces are used for internal network communication between the main control unit and the execution unit. After the service interface synchronization is completed, when the main control unit's service interface receives a service packet, the distribution and processing flow of the service packet between the main control unit and the execution unit is as follows:

[0161] 1. When the main control unit's service interface receives the original service message, it directly extracts all message content, including the Ethernet header, from the original service message. At this time, the MAC address in the original Ethernet header is the MAC address of the service interface.

[0162] 2. The main control unit's protocol proxy, based on the execution entities in the deployment environment, copies and distributes the original business messages to the execution entities. Before copying and distributing messages to a specific execution entity, it queries the business interface index mapping table (as shown in Table 1 or Table 2) based on the business interface through which the main control unit receives the messages. This table retrieves the interface index value and VRF ID value of the corresponding execution entity for that business interface. Figure 7The required format is filled into the mimicry header; then, based on the underlying network corresponding to the underlying interface, the ARP mapping table is queried to obtain the MAC value, which is then filled into the new Ethernet header to obtain the new service message and send it.

[0163] 3. If the packet is forwarded through OVS, since VXLAN tunnels are configured between OVS for forwarding Layer 2 packets, when the packet is forwarded between OVS, it needs to be encapsulated according to the VXLAN tunnel requirements, with a VXLAN header, UDP header, IP header and outer Ethernet header added. The MAC address encapsulated in the outer Ethernet header is the MAC address corresponding to the physical interface between the servers.

[0164] 4. After receiving the message, the OVS server of the execution entity decapsulates the VXLAN tunnel, strips the outer Ethernet header, UDP (User Datagram Protocol, a simple message-oriented transport layer protocol) header, IP header and VXLAN header, and sends the message to the execution entity's basic interface.

[0165] 5. The executor receives the message from the base interface, strips off the new Ethernet message header, parses the mimic message header to extract the interface index value and VRF ID value, and finds the corresponding service interface based on the interface index value and VRF ID value. This service interface is the service interface corresponding to this executor. Then, the original message is sent to this service interface for further processing, and finally the replication and distribution of the service message and its processing in the executor are completed.

[0166] As can be seen, the network element service interface creation method provided in this application embodiment, after the main control unit completes the creation of the service interface (i.e., the first service interface mentioned above), collects the configuration information of the service interface to generate an RPC message, and then sends the RPC message to the execution body so that the execution body can use the configuration information therein to create the service interface (i.e., the second service interface mentioned above). Thus, based on RPC technology, the automatic creation of service interfaces in the main control unit and the execution body within the network element is realized, and the synchronization of service interfaces between the two is realized without manual operation. Therefore, based on this technical solution, fast and efficient network element service interface creation is achieved, effectively reducing R&D costs.

[0167] This application provides a device for creating network element service interfaces.

[0168] Please refer to Figure 4 , Figure 4 This application provides a schematic diagram of a network element service interface creation device. This device is applied to the main control unit of a network element and may include:

[0169] The first creation module 1 is used to create the first business interface;

[0170] The first generation module 2 is used to generate the configuration information for the first business interface;

[0171] The second generation module 3 is used to generate RPC messages based on configuration information;

[0172] Sending module 4 is used to send RPC messages to the executor so that the executor can use the RPC messages to create a second service interface corresponding to the first service interface.

[0173] As can be seen, the network element service interface creation device provided in this application, after the main control unit completes the creation of the service interface (i.e., the first service interface mentioned above), collects the configuration information of the service interface to generate an RPC message, and then sends the RPC message to the execution body so that the execution body can use the configuration information therein to create the service interface (i.e., the second service interface mentioned above). Thus, based on RPC technology, the automatic creation of service interfaces in the main control unit and the execution body within the network element is realized, and the synchronization of service interfaces between the two is realized without manual operation. Therefore, based on this technical solution, fast and efficient network element service interface creation is achieved, effectively reducing R&D costs.

[0174] In one embodiment of this application, the first generation module 2 described above may be specifically used to determine the interface name, binding VRF information, interface IP address, and interface MAC address of the first service interface; and generate configuration information of the first service interface based on the interface name, binding VRF information, interface IP address, and interface MAC address.

[0175] In one embodiment of this application, the network element service interface creation device may further include a first feedback module, used to receive an RPC reply message from the executor; determine the index information of the second service interface based on the RPC reply message; and generate a service interface index mapping relationship between the main control unit and the executor based on the index information.

[0176] In one embodiment of this application, the network element service interface creation device may further include a first message processing module, configured to, when a service message is received, determine a first target service interface for receiving the service message; determine target index information corresponding to the first target service interface according to the service interface index mapping relationship; add the target index information to the service message to obtain a new service message; and send the new service message to the execution body so that the execution body determines a second target service interface corresponding to the first target service interface according to the target index information in the new service message.

[0177] For a description of the apparatus provided in the embodiments of this application, please refer to the above method embodiments; further details will not be repeated here.

[0178] This application provides a device for creating network element service interfaces.

[0179] Please refer to Figure 5 , Figure 5 The schematic diagram provided in this application illustrates the structure of a network element service interface creation device. This device is applied to the execution unit of a network element and may include:

[0180] The receiving module 5 is used to receive RPC messages sent by the main control unit; the RPC messages are generated by the main control unit according to the configuration information of the first service interface after the first service interface is created.

[0181] Module 6 is used to determine the configuration information of the first service interface based on the RPC message;

[0182] The second creation module 7 is used to create a second business interface corresponding to the first business interface based on the configuration information.

[0183] As can be seen, the network element service interface creation device provided in this application, after the main control unit completes the creation of the service interface (i.e., the first service interface mentioned above), collects the configuration information of the service interface to generate an RPC message, and then sends the RPC message to the execution body so that the execution body can use the configuration information therein to create the service interface (i.e., the second service interface mentioned above). Thus, based on RPC technology, the automatic creation of service interfaces in the main control unit and the execution body within the network element is realized, and the synchronization of service interfaces between the two is realized without manual operation. Therefore, based on this technical solution, fast and efficient network element service interface creation is achieved, effectively reducing R&D costs.

[0184] In one embodiment of this application, the second creation module 7 described above can be specifically used to determine the interface name, binding VRF information, interface IP address, and interface MAC address of the first service interface according to the configuration information; create a second service interface according to the interface name; create a new VRF according to the binding VRF information; bind the second service interface to the new VRF; set the IP address of the second service interface to the interface IP address; and set the MAC address of the second service interface to the interface MAC address.

[0185] In one embodiment of this application, the network element service interface creation device may further include a second feedback module, used to generate index information of the second service interface; generate an RPC reply message based on the index information; and feed the RPC reply message back to the main control unit, so that the main control unit generates a service interface index mapping relationship between the main control unit and the executor based on the index information.

[0186] In one embodiment of this application, the network element service interface creation device may further include a second message processing module, used to receive a new service message sent by the main control unit; the new service message is generated by the main control unit based on the original service message and the target index information of the first target service interface that receives the original service message; the new service message is parsed to obtain the original service message and the target index information; the second target service interface corresponding to the first target service interface is determined based on the target index information; and the original service message is sent to the second target service interface.

[0187] For a description of the apparatus provided in the embodiments of this application, please refer to the above method embodiments; further details will not be repeated here.

[0188] This application provides an electronic device.

[0189] Please refer to Figure 6 , Figure 6 This application provides a schematic diagram of the structure of an electronic device, which may include:

[0190] Memory, used to store computer programs;

[0191] A processor, used to execute computer programs, can implement the steps of any of the network element service interface creation methods described above.

[0192] like Figure 6 The diagram shows the structural composition of an electronic device, which may include a processor 10, a memory 11, a communication interface 12, and a communication bus 13. The processor 10, memory 11, and communication interface 12 all communicate with each other through the communication bus 13.

[0193] In this embodiment, the processor 10 may be a central processing unit (CPU), an application-specific integrated circuit, a digital signal processor, a field-programmable gate array, or other programmable logic devices.

[0194] The processor 10 can call the program stored in the memory 11. Specifically, the processor 10 can execute the operations in the embodiment of the network element service interface creation method.

[0195] The memory 11 is used to store one or more programs. The programs may include program code, which includes computer operation instructions. In this embodiment, the memory 11 stores at least a program for implementing the following functions:

[0196] Create the first business interface;

[0197] Generate the configuration information for the first business interface;

[0198] Generate RPC messages based on configuration information;

[0199] The RPC message is sent to the executor so that the executor can use the RPC message to create a second service interface corresponding to the first service interface.

[0200] In one possible implementation, the memory 11 may include a program storage area and a data storage area, wherein the program storage area may store the operating system and applications required for at least one function; and the data storage area may store data created during use.

[0201] In addition, memory 11 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device or other volatile solid-state storage device.

[0202] Communication interface 12 can be an interface for the communication module, used to connect with other devices or systems.

[0203] Of course, it should be noted that, Figure 6 The structure shown does not constitute a limitation on the electronic device in the embodiments of this application. In practical applications, the electronic device may include more than Figure 6 More or fewer components as shown, or combinations of certain components.

[0204] This application provides a computer-readable storage medium.

[0205] The computer-readable storage medium provided in this application embodiment stores a computer program, which, when executed by a processor, can implement the steps of any of the network element service interface creation methods described above.

[0206] The computer-readable storage medium may include various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0207] For a description of the computer-readable storage medium provided in the embodiments of this application, please refer to the above method embodiments; further details will not be repeated here.

[0208] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.

[0209] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0210] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0211] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the methods and core ideas of this application. It should be noted that those skilled in the art can make several improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of this application.

Claims

1. A method for creating a network element service interface, characterized in that, The network element includes a main control unit and an execution unit in a mimicry architecture. The method is applied to the main control unit and includes: Create the first business interface; Generate the configuration information for the first business interface; Generate an RPC message based on the configuration information; The RPC message is sent to the executor so that the executor can use the RPC message to create a second service interface corresponding to the first service interface.

2. The method for creating network element service interfaces according to claim 1, characterized in that, The configuration information for generating the first service interface includes: Determine the interface name, binding VRF information, interface IP address, and interface MAC address of the first service interface; The configuration information of the first service interface is generated based on the interface name, the binding VRF information, the interface IP address, and the interface MAC address.

3. The method for creating network element service interfaces according to claim 1 or 2, characterized in that, Also includes: Receive the RPC reply message from the executor; The index information of the second service interface is determined based on the RPC reply message; The business interface index mapping relationship between the main control unit and the execution body is generated based on the index information.

4. The method for creating network element service interfaces according to claim 3, characterized in that, Also includes: When a service message is received, the first target service interface for receiving the service message is determined. The target index information corresponding to the first target business interface is determined based on the business interface index mapping relationship. Add the target index information to the service message to obtain a new service message; The new service message is sent to the executor so that the executor can determine the second target service interface corresponding to the first target service interface based on the target index information in the new service message.

5. A method for creating a network element service interface, characterized in that, The network element includes a main control unit and an execution unit in a mimicry architecture. The method is applied to the execution unit and includes: The system receives RPC messages sent by the main control unit; the RPC messages are generated by the main control unit based on the configuration information of the first service interface after the first service interface is created. The configuration information of the first service interface is determined based on the RPC message; Create a second service interface corresponding to the first service interface based on the configuration information.

6. The method for creating network element service interfaces according to claim 5, characterized in that, The step of creating a second service interface corresponding to the first service interface based on the configuration information includes: The interface name, binding VRF information, interface IP address, and interface MAC address of the first service interface are determined based on the configuration information. Create the second business interface according to the interface name; Create a new VRF based on the bound VRF information; Bind the second service interface to the new VRF; Set the IP address of the second service interface to the IP address of the interface; Set the MAC address of the second service interface to the MAC address of the interface.

7. The method for creating a network element service interface according to claim 5 or 6, characterized in that, Also includes: Generate the index information for the second business interface; Generate an RPC response message based on the index information; The RPC response message is fed back to the main control unit, so that the main control unit can generate a business interface index mapping relationship between the main control unit and the execution body based on the index information.

8. The method for creating network element service interfaces according to claim 7, characterized in that, Also includes: Receive new service messages sent by the main control unit; The new service message is generated by the main control unit based on the original service message and the target index information of the first target service interface that receives the original service message; The new service message is parsed to obtain the original service message and the target index information; Determine the second target service interface corresponding to the first target service interface based on the target index information; The original service message is sent to the second target service interface.

9. A network element service interface creation device, characterized in that, The network element includes a main control unit and an execution unit in a mimicry architecture. The device is applied to the main control unit and includes: The first creation module is used to create the first business interface; The first generation module is used to generate the configuration information of the first business interface; The second generation module is used to generate RPC messages based on the configuration information; The sending module is used to send the RPC message to the executor, so that the executor can use the RPC message to create a second service interface corresponding to the first service interface.

10. A network element service interface creation device, characterized in that, The network element includes a main control unit and an execution unit in a mimicry architecture. The device is applied to the execution unit and includes: The receiving module is used to receive RPC messages sent by the main control unit; the RPC messages are generated by the main control unit according to the configuration information of the first service interface after the first service interface is created. The determination module is used to determine the configuration information of the first service interface based on the RPC message; The second creation module is used to create a second service interface corresponding to the first service interface based on the configuration information.

11. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the network element service interface creation method as described in any one of claims 1 to 8 when executing the computer program.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the network element service interface creation method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Gateway equipment and control method thereof

    CN104092603A

  • Network bridge transparent proxy method and device, storage medium and equipment

    CN115914425A