Multi-modal network packet processing method, apparatus, device, and readable storage medium
By employing a multimodal network packet processing method, utilizing programmable network interface cards, forwarding engines, and modal virtual network elements, and selecting processing objects based on packet type, the problem of efficient and high-performance processing of network packets from various technologies is solved, achieving flexible multimodal network packet processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- PENG CHENG LAB
- Filing Date
- 2023-07-14
- Publication Date
- 2026-07-21
AI Technical Summary
Existing technologies cannot efficiently and effectively process packets from various network technologies. Traditional dedicated circuits have poor flexibility, and general-purpose CPU servers are inefficient, failing to meet network element functional indicators such as rate, bandwidth, latency, jitter, and throughput.
A multimodal network packet processing method is adopted, which uses programmable network interface cards, forwarding engines, and modal virtual network elements to select and process packets from various processing objects according to the packet type, thereby realizing multimodal network packet processing.
It enables efficient and high-performance hybrid forwarding and flexible processing of network packets from various technologies, reducing the limitations of multimodal network packet processing and meeting user needs.
Smart Images

Figure CN116668564B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network communication technology, and in particular to a multimodal network message processing method, apparatus, device, and readable storage medium. Background Technology
[0002] In multimodal networks, multiple network technologies operate simultaneously, each constituting a network mode, such as IP, geo-identification, identity-based, NDN, and SEANet. Different network modes employ different methods for parsing and processing packets. While traditional network elements using dedicated circuits offer good packet forwarding performance, they lack flexibility and scalability, only capable of parsing and processing network packets from a single technology according to fixed logic. Conversely, using general-purpose CPU servers for packet processing is too inefficient and fails to meet network element performance metrics such as rate, bandwidth, latency, jitter, and throughput. Therefore, achieving efficient and high-performance hybrid forwarding and flexible processing of network packets from multiple technologies is a problem that needs to be researched and solved. Summary of the Invention
[0003] The main objective of this application is to provide a multimodal network packet processing method, apparatus, electronic device, and readable storage medium, aiming to solve the technical problem of efficient and high-performance mixed forwarding and flexible processing of network packets of various technologies.
[0004] To achieve the above objectives, this application provides a multimodal network packet processing method, applied to a multimodal network packet processing system. The multimodal network packet processing system includes a programmable network interface card (NIC), a forwarding engine, and at least one modal virtual network element. The multimodal network packet processing method includes:
[0005] Obtain the set of messages to be processed and the message type of each message in the set of messages to be processed;
[0006] Based on the message type corresponding to each of the messages to be processed, the processing object corresponding to each of the messages to be processed is selected from the programmable network interface card, the forwarding engine and each of the modal virtual network elements;
[0007] By controlling the processing objects corresponding to each of the selected messages to be processed, each message to be processed is processed separately.
[0008] To achieve the above objectives, this application also provides a multimodal network packet processing apparatus, applied to a multimodal network packet processing system, the multimodal network packet processing system including a programmable network interface card (NIC), a forwarding engine, and at least one modal virtual network element, the multimodal network packet processing apparatus comprising:
[0009] The acquisition module is used to acquire the set of messages to be processed and the message type of each message to be processed in the set of messages to be processed;
[0010] The selection module is used to select the processing object corresponding to each of the packets to be processed from the programmable network interface card, the forwarding engine and each of the modal virtual network elements according to the packet type corresponding to each of the packets to be processed.
[0011] The processing module is used to process each of the selected messages by controlling the corresponding processing objects.
[0012] This application also provides an electronic device, the electronic device comprising: a memory, a processor, and a program of the multimodal network packet processing method stored in the memory and executable on the processor, wherein when the program of the multimodal network packet processing method is executed by the processor, it can implement the steps of the multimodal network packet processing method as described above.
[0013] This application also provides a computer-readable storage medium storing a program implementing a multimodal network packet processing method, wherein when the program is executed by a processor, it implements the steps of the multimodal network packet processing method as described above.
[0014] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the multimodal network packet processing method described above.
[0015] This application provides a multimodal network packet processing method, apparatus, electronic device, and readable storage medium. It involves acquiring a set of packets to be processed and the packet type of each packet in the set; selecting a processing object corresponding to each packet from a programmable network interface card (NIC), a forwarding engine, and each modal virtual network element (VMA) according to the packet type of each packet; and processing each packet by controlling the selected processing object. By integrating the programmable NIC, forwarding engine, and at least one VMA into a multimodal network packet processing system, multimodal network packet processing of various network technologies is achieved. Attached Figure Description
[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a flowchart illustrating the first embodiment of the multimodal network packet processing method of this application;
[0019] Figure 2 This is a schematic diagram of the structure of a modal virtual network element involved in the multimodal network packet processing method in this application embodiment;
[0020] Figure 3 This is an example diagram illustrating a multimodal network packet processing flow involved in the multimodal network packet processing method in this application embodiment;
[0021] Figure 4 This is a schematic diagram of the structure of a programmable network interface card (NIC) involved in the multimodal network packet processing method in this application embodiment;
[0022] Figure 5 This is a schematic diagram of the device structure involved in the multimodal network packet processing method in the embodiments of this application;
[0023] Figure 6 This is a schematic diagram of the device structure of the hardware operating environment involved in the multimodal network packet processing method in this application embodiment.
[0024] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0025] To make the above-mentioned objectives, features, and advantages of this application more apparent and understandable, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0026] Example 1
[0027] This application provides a multimodal network packet processing method. In a first embodiment of this multimodal network packet processing method, it is applied to a multimodal network packet processing system. The multimodal network packet processing system includes a programmable network interface card (NIC), a forwarding engine, and at least one modal virtual network element. (Refer to...) Figure 1 The multimodal network packet processing method includes:
[0028] Step S10: Obtain the set of messages to be processed and the message type of each message to be processed in the set of messages to be processed;
[0029] In this embodiment, it should be noted that the set of messages to be processed is a collection of various messages waiting to be processed. The modal virtual network element runs in a virtual machine manner, and within the virtual machine, computing, storage, and network resources are flexibly allocated according to the network function requirements under different technical systems. The modal virtual network element can be flexibly expanded and elastically loaded and run on demand.
[0030] In one feasible embodiment, the set of packets to be processed is obtained through the programmable network interface card.
[0031] In one feasible embodiment, the packet type of each packet to be processed in the pre-marked set of packets to be processed is obtained through the programmable network interface card.
[0032] In another feasible embodiment, the programmable network interface card (NIC) identifies the message type corresponding to each message to be processed based on the message header of each message to be processed in the message set.
[0033] Step S20: Based on the message type corresponding to each message to be processed, select the processing object corresponding to each message to be processed from the programmable network card, the forwarding engine, and each modal virtual network element;
[0034] In one feasible embodiment, if the message type corresponding to the selected message is a stream data type, then the programmable network interface card (NIC) is used as the processing object corresponding to the selected message.
[0035] In another feasible embodiment, if the packet type corresponding to the selected packet is a general protocol type, then the forwarding engine is used as the processing object corresponding to the selected packet, and the selected packet is forwarded to the forwarding engine through the programmable network card.
[0036] In another feasible embodiment, if the message type corresponding to the selected message is a modal protocol type, then the modal virtual network element corresponding to the modal protocol type is used as the processing object, and the selected message is transmitted to the forwarding engine through the programmable network card, and the selected message is forwarded to the modal virtual network element corresponding to the modal protocol type through the forwarding engine.
[0037] Step S30: By controlling the processing objects corresponding to each of the selected messages to be processed, each message to be processed is processed respectively.
[0038] In one feasible embodiment, based on the message reception time corresponding to each of the messages to be processed, the processing objects corresponding to each of the messages to be processed are selected sequentially by controlling the order of processing, and each message to be processed is processed separately.
[0039] In another feasible embodiment, the programmable network interface card (NIC) is controlled to process the pending packets whose corresponding processing object is the programmable NIC; if it is detected that all pending packets whose corresponding processing object is the programmable NIC have been processed, the forwarding engine is controlled to process the pending packets whose corresponding processing object is the forwarding engine; if it is detected that all pending packets whose corresponding processing object is the forwarding engine have been processed, each modal virtual network element is controlled to process the pending packets whose corresponding processing object is the modal virtual network element.
[0040] In one feasible embodiment, reference is made to Figure 2 , Figure 2 This is a schematic diagram of the structure of a modal virtual network element involved in the multimodal network packet processing method in this application embodiment. The modal virtual network element includes a virtual machine operating system, a system support library, and a modal network service program. The modal network service program flexibly allocates computing, storage, and network resources according to the network function requirements of different modal protocol types, and flexibly processes the packets to be processed to realize the network element functions of different modal protocol types, such as protocol communication, packet forwarding, and content caching. The system support library provides general API (Application Programming Interface) interfaces such as high-performance network packet transmission and reception, high-performance caching, high-performance storage, and flow table distribution to the modal network service program.
[0041] This application provides a multimodal network packet processing method. It involves obtaining a set of packets to be processed and the packet type of each packet in the set; selecting a processing object corresponding to each packet from the programmable network interface card (NIC), the forwarding engine, and each modal virtual network element (VMA) according to the packet type of each packet; and processing each packet by controlling the selected processing object. By integrating the programmable NIC, the forwarding engine, and at least one VMA into a multimodal network packet processing system, multimodal network packet processing with multiple modal protocol types is achieved, reducing the limitations of multimodal network packet processing.
[0042] Example 2
[0043] Furthermore, based on the first embodiment of this application, in another embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description and will not be repeated hereafter. Based on this, in step S30, the step of processing each of the selected messages by controlling the processing objects corresponding to each message to be processed includes:
[0044] Step S31: Determine the priority of each of the messages to be processed, wherein the priority is used to characterize user needs:
[0045] In one feasible embodiment, the message application type corresponding to each of the messages to be processed and the user's requirements for each message application type are obtained. Based on the message application type corresponding to each of the messages to be processed and the user's requirements for each message application type, a priority corresponding to each of the messages to be processed is generated, wherein the message application type is the purpose type of the message.
[0046] In one feasible embodiment, based on the user's requirements for various message application types, priorities corresponding to each message application type are generated, and the priorities corresponding to the message application types of each message to be processed are used as the priorities corresponding to each message to be processed.
[0047] In another feasible embodiment, before the step of determining the priority corresponding to each of the messages to be processed, wherein the priority is used to characterize user needs, the method further includes: obtaining message fields in each of the messages to be processed, and generating a message application type corresponding to each of the messages to be processed based on the message fields corresponding to each of the messages to be processed.
[0048] Step S32: Select the highest priority message from among the messages to be processed as the target message;
[0049] Step S33: Process the target message by controlling the processing object corresponding to the target message;
[0050] In one feasible embodiment, before the step of processing the target packet by controlling the processing object corresponding to the target packet, the method further includes: placing each of the packets to be processed into a buffer queue in the programmable network card.
[0051] In another feasible embodiment, if the processing object corresponding to the target packet is a forwarding engine, the target packet is retrieved from the cache queue through the programmable network card and sent to the forwarding engine for processing.
[0052] In another feasible embodiment, if the processing object corresponding to the target packet is a modal virtual network element, the target packet is retrieved from the cache queue through the programmable network card and passed to the forwarding engine. The forwarding engine then sends the target packet to the modal virtual network element corresponding to the target packet, and the modal virtual network element corresponding to the target packet processes the target packet.
[0053] In step S33, the step of processing the target message by controlling the processing object corresponding to the target message includes:
[0054] Step A10: Select the target flow table corresponding to the message type of the target message from each preset flow table;
[0055] In this embodiment, it should be noted that each preset flow table includes a flow data flow table, a general protocol flow table, and modal protocol flow tables corresponding to various modal protocol types.
[0056] In one feasible embodiment, if the target packet's packet type is a stream data type, then the stream data flow table is used as the target flow table. The stream data type is not limited here; it can be an IP network stream data type, or other stream data types such as a geographic network stream data type, an identity network stream data type, or an NDN (Named Data Networking) network stream data type.
[0057] In another feasible embodiment, if the message type of the target message is a general protocol type, then the general protocol flow table is used as the target flow table. The general protocol type is not limited here; it can be a network management protocol type, a flow acquisition protocol type, a communication protocol type, or other general protocol types.
[0058] In another feasible embodiment, if the message type of the target message is a modal protocol type, then the modal protocol flow table corresponding to the target message is used as the target flow table. The modal protocol type is not limited here; it can be an IP network modal protocol type, or other modal protocol types such as a geographic network modal protocol type, an identity network modal protocol type, and an NDN network modal protocol type.
[0059] In one feasible embodiment, reference is made to Figure 3 , Figure 3 This is an example diagram illustrating a multimodal network packet processing flow involved in the multimodal network packet processing method described in this application. Figure 3This includes messages of modal protocol type (modal protocol message shown in the figure), messages of stream data type (stream data message shown in the figure), and messages of general protocol type (general protocol message shown in the figure). If the processing object corresponding to the target message is a programmable network interface card (NIC), then the target message is retrieved from the buffer queue through the programmable NIC and processed.
[0060] Step A20: Obtain the matching method corresponding to the target message, and match the message fields in the target message with each preset field in the target flow table according to the matching method to obtain the target field in the target flow table that successfully matches the message fields;
[0061] In one feasible embodiment, before the step of obtaining the matching method corresponding to the target message, the method further includes: obtaining the user's matching requirements for various message fields, and generating the matching method corresponding to each of the messages to be processed according to the matching requirements.
[0062] In one feasible embodiment, the matching method corresponding to the target packet is mask matching. Some fields in the target packet are masked to obtain masked fields. The masked fields are then matched with each preset field in the target flow table to obtain the target fields in the target flow table that successfully match the packet fields.
[0063] In another feasible embodiment, the matching method corresponding to the target message is exact matching, which matches all message fields in the target message with each preset field in the target flow table to obtain the target field in the target flow table that successfully matches the message field.
[0064] Step A30: Control the processing object corresponding to the target packet to process the target packet according to the execution action corresponding to the target field in the target flow table.
[0065] In one feasible embodiment, if the processing object corresponding to the target packet is a programmable network interface card (NIC), then the programmable NIC is controlled to process the target packet according to the execution action corresponding to the target field in the target flow table.
[0066] In another feasible embodiment, if the processing object corresponding to the target packet is a forwarding engine, the target packet and the execution action corresponding to the target field in the target flow table are sent to the forwarding engine through the programmable network card, and the forwarding engine is controlled to process the target packet according to the execution action corresponding to the target field in the target flow table.
[0067] In another feasible embodiment, if the processing object corresponding to the target packet is a modal virtual network element, the programmable network card sends the target packet and the execution action corresponding to the target field in the target flow table to the forwarding engine. The forwarding engine then transmits the target packet and the execution action corresponding to the target field in the target flow table to the modal virtual network element corresponding to the target packet, and controls the modal virtual network element to process the target packet according to the execution action corresponding to the target field in the target flow table.
[0068] In step A30, the step of controlling the processing object corresponding to the target message to process the target message according to the execution action corresponding to the target field in the target flow table includes:
[0069] Step A31: If the action to be performed is a forwarding action, then control the processing object corresponding to the target packet to forward the target packet to the forwarding object corresponding to the forwarding action in the target flow table;
[0070] In this embodiment, it should be noted that the forwarding object can be a port, a forwarding engine, or a modal virtual network element.
[0071] Step A32: If the action to be performed is a modification action, then according to the modification field and modification method corresponding to the modification action in the target flow table, control the processing object corresponding to the target packet to modify the packet field in the target packet;
[0072] In one feasible embodiment, if the modification method is an addition, the processing object corresponding to the target packet is controlled to add the modification field corresponding to the modification action in the target flow table to the target packet.
[0073] In another feasible embodiment, if the modification method is deletion, the processing object corresponding to the target packet is controlled to delete the deletion field in the target packet, and the deletion field is the modification field corresponding to the modification action in the target flow table.
[0074] In another feasible embodiment, if the modification method is replacement, then the processing object corresponding to the target packet is controlled to replace the packet field in the target packet with the modification field corresponding to the modification action in the target flow table.
[0075] Step A33: If the action to be performed is a discard action, then control the processing object corresponding to the target packet to discard the target packet.
[0076] In step A30, the step of controlling the processing object corresponding to the target message to process the target message according to the execution action corresponding to the target field in the target flow table includes:
[0077] Step B10: If the packet type of the target packet is a modal protocol type, the target packet is transmitted to the forwarding engine through the programmable network card, the forwarding engine forwards the target packet to the modal virtual network element corresponding to the modal protocol type, and the modal virtual network element processes the target packet according to the execution action corresponding to the target field.
[0078] Step S34: Return to the step of selecting the highest priority message among the messages to be processed as the target message, until all the messages to be processed have been processed.
[0079] In this embodiment, by determining the priority of each of the pending messages, where the priority is used to characterize user needs; selecting the message with the highest priority among the pending messages as the target message; processing the target message by controlling the processing object corresponding to the target message; returning to the step of selecting the message with the highest priority among the pending messages as the target message, until all pending messages have been processed. Since priority can characterize user needs, that is, the greater the user's need for pending messages, the higher the priority of the pending message, the higher the priority of the pending message. Processing the message with the highest priority among the pending messages first achieves multimodal network message processing that meets user needs.
[0080] In step S20, before the step of selecting the processing object corresponding to each of the packets to be processed from the programmable network interface card, the forwarding engine, and each of the modal virtual network elements according to the packet type corresponding to each of the packets to be processed, the method further includes:
[0081] Step C10: Obtain messages of each modal protocol type, where each message belongs to a modal protocol type and corresponds to a network function requirement;
[0082] Step C10: Based on the messages of each modal protocol type, the modal protocol type corresponding to each message of each modal protocol type, and the network function requirements corresponding to each message of each modal protocol type, construct the modal virtual network element corresponding to each message of each modal protocol type.
[0083] Optionally, in addition to supporting ordinary network card packet transmission and reception, the programmable network interface card (NIC) in this application must also be able to support the mixed operation of multiple network technologies by multi-modal network element nodes, and forward network packets of multiple different technologies in real time. (See reference...) Figure 4 , Figure 4 This is a schematic diagram of the structure of a programmable network interface card (NIC) involved in the multimodal network packet processing method of this application. The programmable NIC includes a control unit, a switching unit, a forwarding flow table, and a packet buffer queue. The control unit communicates with external systems (including servers and adjacent NICs) through a PCIe interface. It stores the flow table issued by the server in the forwarding flow table according to the modal type, stores packets sent by the server or adjacent NICs in the sending buffer queue, and sends packets in the receiving buffer queue to the server or adjacent NICs. The switching unit implements multi-port packet forwarding and processing. After receiving packets from the network port, it parses and matches the packets according to the table entries in the forwarding flow table, and performs modification, discarding, or forwarding actions. Packets that need to be sent to the server or adjacent NICs are stored in the receiving buffer queue, while packets in the sending buffer queue are sent to the network. To support the forwarding and processing of network packets from various technical systems, the network interface card (NIC) described in this patent contains multiple forwarding flow tables. Each flow table stores entries for different technical systems, and each entry contains multiple matching fields and multiple action fields. After receiving a packet, the NIC parses it according to the matching fields of the flow table entry and executes the actions in the action fields, including dropping, forwarding, and modifying. To enable the mixed operation of various technical systems without interference, achieving coexistence and isolation between different technical systems, the NIC described in this patent contains multiple packet receiving and sending buffer queues for receiving and sending packets with virtual network elements under different technical systems. Simultaneously, it directly communicates with external NICs via DMA, enabling direct access and exchange of packets with external NICs without going through a server, thus improving packet forwarding performance.
[0084] This application provides a multimodal network packet processing method. It acquires packets of various modal protocol types, where each packet belongs to a specific modal protocol type and corresponds to a specific network functional requirement of a technical system. Based on the packets of each modal protocol type, the corresponding modal protocol type for each packet, and the corresponding network functional requirement of each modal protocol type, it constructs modal virtual network elements corresponding to each of the aforementioned modal protocol types. By constructing modal virtual network elements of various modal protocol types, multimodal network packet processing of multiple modal protocol types can be achieved, reducing the limitations of multimodal network packet processing.
[0085] Example 3
[0086] This application also provides a multimodal network packet processing apparatus, applied to a multimodal network packet processing system. The multimodal network packet processing system includes a programmable network interface card (NIC), a forwarding engine, and at least one modal virtual network element. (Refer to...) Figure 5The multimodal network packet processing device includes:
[0087] The acquisition module is used to acquire the set of messages to be processed and the message type of each message to be processed in the set of messages to be processed;
[0088] The selection module is used to select the processing object corresponding to each of the packets to be processed from the programmable network interface card, the forwarding engine and each of the modal virtual network elements according to the packet type corresponding to each of the packets to be processed.
[0089] The processing module is used to process each of the selected messages by controlling the corresponding processing objects.
[0090] Optionally, the processing module is further configured to:
[0091] Determine the priority of each of the messages to be processed, wherein the priority is used to characterize user needs;
[0092] Select the message with the highest priority from all the messages to be processed as the target message;
[0093] The target message is processed by controlling the processing object corresponding to the target message;
[0094] Return to the step of selecting the highest priority message from among the pending messages as the target message, until all pending messages have been processed.
[0095] Optionally, the processing module is further configured to:
[0096] Select the target flow table corresponding to the message type of the target message from each preset flow table;
[0097] Obtain the matching method corresponding to the target message, and match the message fields in the target message with each preset field in the target flow table according to the matching method to obtain the target field in the target flow table that successfully matches the message fields;
[0098] The control object corresponding to the target message processes the target message according to the execution action corresponding to the target field in the target flow table.
[0099] Optionally, the processing module is further configured to:
[0100] If the target packet is a modal protocol type, the target packet is transmitted to the forwarding engine through the programmable network interface card (NIC), and the forwarding engine forwards the target packet to the modal virtual network element corresponding to the modal protocol type. The modal virtual network element then processes the target packet according to the execution action corresponding to the target field.
[0101] Optionally, the processing module is further configured to:
[0102] If the action to be performed is a forwarding action, then the processing object corresponding to the target packet is controlled to forward the target packet to the forwarding object corresponding to the forwarding action in the target flow table;
[0103] If the action to be performed is a modification action, then according to the modification field and modification method corresponding to the modification action in the target flow table, the processing object corresponding to the target packet is controlled to modify the packet fields in the target packet;
[0104] If the action to be performed is a discard action, then the processing object corresponding to the target message is controlled to discard the target message.
[0105] Optionally, before the step of selecting the processing object corresponding to each of the packets to be processed from the programmable network interface card, the forwarding engine, and each of the modal virtual network elements according to the packet type corresponding to each of the packets to be processed, the multimodal network packet processing device is further configured to:
[0106] Obtain messages of various modal protocol types, where each message belongs to a modal protocol type and corresponds to a network function requirement of a certain technical system;
[0107] Based on the messages of each modal protocol type, the modal protocol type corresponding to each message of each modal protocol type, and the technical system network function requirements corresponding to each message of each modal protocol type, modal virtual network elements corresponding to each message of each modal protocol type are constructed respectively.
[0108] Optionally, the selection module is further configured to:
[0109] If the message type is a stream data type, then the programmable network interface card (NIC) will be used as the processing object.
[0110] If the message type is a general protocol type, then the forwarding engine will be used as the processing object;
[0111] If the message type is a modal protocol type, then the modal virtual network element corresponding to the modal protocol type is used as the processing object.
[0112] The multimodal network packet processing apparatus provided in this application, employing the multimodal network packet processing method described in the above embodiments, solves the technical problems of multimodal network packet processing in networks with various technical systems. Compared with the prior art, the beneficial effects of the multimodal network packet processing apparatus provided in this application are the same as those of the multimodal network packet processing method described in the above embodiments, and other technical features in this multimodal network packet processing apparatus are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0113] Example 4
[0114] This application provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the multimodal network packet processing method described above.
[0115] The following is for reference. Figure 6 The diagram illustrates a structural schematic of an electronic device suitable for implementing embodiments of the present disclosure. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers (PDAs), tablet computers, portable media players (PMPs), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 6 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0116] like Figure 6 As shown, an electronic device may include a processing unit (such as a central processing unit, graphics processing unit, etc.) that can perform various appropriate actions and processes based on programs stored in ROM (Read-Only Memory) or programs loaded from storage devices into RAM (Random Access Memory). RAM also stores various programs and data required for the operation of the electronic device. The processing unit, ROM, and RAM are interconnected via a bus. Input / output (I / O) ports are also connected to the bus.
[0117] Typically, the following systems can be connected to I / O ports: input devices including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices including, for example, magnetic tapes, hard disks, etc.; and communication devices. Communication devices allow electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although electronic devices with various systems are shown in the figures, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems may be implemented alternatively.
[0118] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processing device, it performs the functions defined above in the methods of embodiments of this disclosure.
[0119] The electronic device provided in this application employs the multimodal network packet processing method described in the above embodiments, solving the technical problems of multimodal network packet processing in various technical systems. Compared with the prior art, the beneficial effects of the electronic device provided in this application are the same as those of the multimodal network packet processing method described in the above embodiments, and other technical features of the electronic device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0120] It should be understood that various parts of this disclosure can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics may be combined in any suitable manner in one or more embodiments or examples.
[0121] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0122] Example 5
[0123] This embodiment provides a computer-readable storage medium having computer-readable program instructions stored thereon, which are used to execute the multimodal network packet processing method described in the above embodiment.
[0124] The computer-readable storage medium provided in this application embodiment may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, RAM, ROM, EPROM (Erasable Programmable Read Only Memory) or flash memory, optical fiber, CD-ROM (compact disc read-only memory), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0125] The aforementioned computer-readable storage medium may be included in an electronic device or may exist independently without being assembled into an electronic device.
[0126] The aforementioned computer-readable storage medium carries one or more programs. When the aforementioned one or more programs are executed by an electronic device, the electronic device causes the electronic device to: acquire a set of messages to be processed and the message type of each message to be processed in the set of messages to be processed; select a processing object corresponding to each message to be processed from the programmable network interface card, the forwarding engine, and each modal virtual network element according to the message type corresponding to each message to be processed; and process each message to be processed by controlling the selected processing object corresponding to each message to be processed.
[0127] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a LAN (Local Area Network) or a WAN (Wide Area Network)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0128] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0129] The modules described in the embodiments of this disclosure can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0130] The computer-readable storage medium provided in this application stores computer-readable program instructions for executing the above-described multimodal network packet processing method, thus solving the technical problems of multimodal network packet processing in various network systems with different technical architectures. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the multimodal network packet processing method provided in the above-described embodiments, and will not be repeated here.
[0131] Example 6
[0132] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the multimodal network packet processing method described above.
[0133] The computer program product provided in this application solves the technical problems of multimodal network packet processing in various technical networks. Compared with the prior art, the beneficial effects of the computer program product provided in the embodiments of this application are the same as the beneficial effects of the multimodal network packet processing methods provided in the above embodiments, and will not be repeated here.
[0134] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent scope of this application.
Claims
1. A multimodal network packet processing method, characterized in that, This invention relates to a multimodal network packet processing system, which includes a programmable network interface card (NIC), a forwarding engine, and at least one modal virtual network element. The programmable NIC includes a control unit, a switching unit, a multi-forwarding flow table, and a multi-packet buffer queue. The control unit stores the packets in the forwarding flow table according to their modal type based on the flow table issued by the server. The multi-forwarding flow table includes forwarding flow tables with different technical systems. The programmable NIC is used for hard real-time forwarding and processing of packets of the streaming data type. The forwarding engine comprises multiple packet buffer queues and a multi-level packet processing pipeline. One end is connected to the programmable network interface card (NIC), and the other end is connected to the modal virtual network element (MVN). It is used to process packets of common protocol types in parallel through the packet buffer queues and the multi-level packet processing pipeline. The MVN runs in a virtual machine manner and includes a virtual machine operating system, a system support library, and a modal network service program. The modal network service program flexibly allocates computing, storage, and network resources according to the network function requirements of different modal protocol types to process packets of modal protocol types. The multimodal network packet processing method includes: Obtain the set of messages to be processed and the message type of each message in the set of messages to be processed; If the message type is a stream data type, then the programmable network interface card (NIC) will be used as the processing object for the message to be processed. If the message type is a general protocol type, then the forwarding engine will be used as the processing object of the message to be processed. If the message type is a modal protocol type, then the modal virtual network element corresponding to the modal protocol type is used as the processing object of the message to be processed; Determine the priority of each of the messages to be processed, wherein the priority is used to characterize user needs; Select the message with the highest priority from all the messages to be processed as the target message; The target message is processed by controlling the processing object corresponding to the target message; Return to the step of selecting the highest priority message from among the pending messages as the target message, until all pending messages have been processed.
2. The multimodal network packet processing method as described in claim 1, characterized in that, The step of processing the target message by controlling the processing object corresponding to the target message includes: Select the target flow table corresponding to the message type of the target message from each preset flow table; Obtain the matching method corresponding to the target message, and match the message fields in the target message with each preset field in the target flow table according to the matching method to obtain the target field in the target flow table that successfully matches the message fields; The control object corresponding to the target message processes the target message according to the execution action corresponding to the target field in the target flow table.
3. The multimodal network packet processing method as described in claim 2, characterized in that, The step of controlling the processing object corresponding to the target packet to process the target packet according to the execution action corresponding to the target field in the target flow table includes: If the target packet is a modal protocol type, the target packet is transmitted to the forwarding engine through the programmable network interface card (NIC), and the forwarding engine forwards the target packet to the modal virtual network element corresponding to the modal protocol type. The modal virtual network element then processes the target packet according to the execution action corresponding to the target field.
4. The multimodal network packet processing method as described in claim 2, characterized in that, The step of controlling the processing object corresponding to the target packet to process the target packet according to the execution action corresponding to the target field in the target flow table includes: If the action to be performed is a forwarding action, then the processing object corresponding to the target packet is controlled to forward the target packet to the forwarding object corresponding to the forwarding action in the target flow table; If the action to be performed is a modification action, then according to the modification field and modification method corresponding to the modification action in the target flow table, the processing object corresponding to the target packet is controlled to modify the packet fields in the target packet; If the action to be performed is a discard action, then the processing object corresponding to the target message is controlled to discard the target message.
5. The multimodal network packet processing method as described in claim 1, characterized in that, After the steps of obtaining the set of messages to be processed and the message type of each message in the set of messages to be processed, the method further includes: Obtain messages of various modal protocol types, where each message belongs to a modal protocol type and corresponds to a network function requirement of a certain technical system; Based on the messages of each modal protocol type, the modal protocol type corresponding to each message of each modal protocol type, and the technical system network function requirements corresponding to each message of each modal protocol type, modal virtual network elements corresponding to each message of each modal protocol type are constructed respectively.
6. A multimodal network packet processing device, applied to a multimodal network packet processing system, the multimodal network packet processing system comprising a programmable network interface card (NIC), a forwarding engine, and at least one modal virtual network element, the programmable NIC comprising a control unit, a switching unit, and multiple forwarding flow tables and multiple packet buffer queues, the control unit storing the flow tables according to modal type in the forwarding flow tables issued by the server, the multiple forwarding flow tables comprising forwarding flow tables of different technical systems, the programmable NIC being used for hard real-time forwarding and processing of packets of stream data type; The forwarding engine comprises multiple packet buffer queues and a multi-level packet processing pipeline. One end is connected to the programmable network interface card (NIC), and the other end is connected to the modal virtual network element. It is used to process packets of common protocol types in parallel through the packet buffer queues and the multi-level packet processing pipeline. The modal virtual network element runs in a virtual machine manner, including a virtual machine operating system, system support libraries, and modal network service programs. The modal network service programs flexibly allocate computing, storage, and network resources according to the network function requirements of different modal protocol types to process packets of different modal protocol types. Its characteristic is that... The multimodal network packet processing device includes: The acquisition module is used to acquire the set of messages to be processed and the message type of each message to be processed in the set of messages to be processed; The selection module is used to select the programmable network interface card (NIC) as the processing object of the packet to be processed if the packet type is a stream data type; select the forwarding engine as the processing object of the packet to be processed if the packet type is a general protocol type; and select the modal virtual network element corresponding to the modal protocol type as the processing object of the packet to be processed if the packet type is a modal protocol type. The processing module is used to determine the priority of each of the pending messages, wherein the priority is used to characterize user needs; select the message with the highest priority among the pending messages as the target message; process the target message by controlling the processing object corresponding to the target message; and return to the step of selecting the message with the highest priority among the pending messages as the target message until all the pending messages have been processed.
7. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the steps of the multimodal network packet processing method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program for implementing a multimodal network packet processing method, which is executed by a processor to implement the steps of the multimodal network packet processing method as described in any one of claims 1 to 5.