CN117478590A - Message processing method and device, electronic equipment and storage medium - Google Patents

Message processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117478590A
CN117478590A CN202311422802.7A CN202311422802A CN117478590A CN 117478590 A CN117478590 A CN 117478590A CN 202311422802 A CN202311422802 A CN 202311422802A CN 117478590 A CN117478590 A CN 117478590A
Authority
CN
China
Prior art keywords
processing
message data
flow table
message
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311422802.7A
Other languages
Chinese (zh)
Inventor
赵木华
黄明亮
鄢贵海
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yusur Technology Co ltd
Original Assignee
Yusur Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yusur Technology Co ltd filed Critical Yusur Technology Co ltd
Priority to CN202311422802.7A priority Critical patent/CN117478590A/en
Publication of CN117478590A publication Critical patent/CN117478590A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/645Splitting route computation layer and forwarding layer, e.g. routing according to path computational element [PCE] or based on OpenFlow functionality
    • H04L45/655Interaction between route computation entities and forwarding entities, e.g. for route determination or for flow table update
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/41Flow control; Congestion control by acting on aggregated flows or links
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a message processing method, a message processing device, an electronic device and a storage medium, wherein the method comprises the following steps: receiving the message data through the special data processor, matching the message data with all the combined flow tables in the special data processor, if the combined flow table matched with the message data exists, processing the message data by using the combined flow table matched with the message data, and if the combined flow table matched with the message data does not exist, transmitting the message data to the main computing equipment; processing the message data by the main computing device using a plurality of message processing rules matching the message data and generating a combined flow table of the message data, and offloading the combined flow table to the dedicated data processor. Therefore, the method and the device can support the simultaneous unloading of a plurality of message processing rules of the message data into the hardware by generating the merging flow table of the message data, so that the hardware can support the direct processing of most of the message data, and the processing efficiency of the message data is improved.

Description

Message processing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer communications technologies, and in particular, to a method and apparatus for processing a message, an electronic device, and a storage medium.
Background
Open vSwitch is abbreviated as OVS, which is a high quality virtual switch software supporting multi-layer data forwarding, aimed at implementing large-scale network automation through programming extension, and supporting standard management interfaces and protocols, and which can run on every physical machine implementing virtualization, and can provide remote management.
A special purpose data processor (Data Processing Unit, hereinafter referred to as DPU) is a data-centric specialized processor that supports infrastructure layer resource virtualization using software defined technology routes, and can support infrastructure layer services such as storage, security, quality of service management, and the like.
In some application scenarios, the OVS software can convert the message processing rule for processing the message data into a processing flow table, and offload the processing flow table to the DPU hardware, so that the DPU hardware can directly process the forwarding processing of the similar subsequent message.
However, in the prior art, only a single processing flow table generated by OVS software based on a single message processing rule is supported to be offloaded to the DPU hardware, and a plurality of processing flow tables for processing message data cannot be supported to be offloaded to the DPU hardware at the same time, so that in the case that the message data includes a plurality of processing flow tables, the DPU hardware cannot support direct processing of the message data, and the processing efficiency of the message data is reduced.
Disclosure of Invention
In view of this, the embodiment of the present application provides a message processing scheme, by generating a merged flow table of message data, it can support to unload multiple message processing rules of the message data to hardware at the same time, so as to expand the application range of executing message forwarding processing directly through DPU hardware, and improve the message processing efficiency.
According to a first aspect of embodiments of the present application, there is provided a method of processing a message, applied to a dedicated data processor coupled to a host computing device, the method comprising: receiving message data through the special data processor, matching the message data with each combined flow table in the special data processor, if a combined flow table matched with the message data exists, processing the message data by using the combined flow table matched with the message data, and if the combined flow table matched with the message data does not exist, transmitting the message data to the main computing equipment; and processing the message data by the main computing equipment by utilizing a plurality of message processing rules matched with the message data in a message processing rule set, generating a combined flow table of the message data, and unloading the combined flow table to the special data processor.
According to a second aspect of embodiments of the present application, there is provided a message processing apparatus for use with a dedicated data processor coupled to a host computing device, the apparatus comprising: the first control module is used for receiving the message data through the special data processor, matching the message data with all the combined flow tables in the special data processor, if the combined flow table matched with the message data exists, processing the message data by using the combined flow table matched with the message data, and if the combined flow table matched with the message data does not exist, transmitting the message data to the main computing equipment; and the second control module is used for processing the message data by the main computing equipment through a plurality of message processing rules matched with the message data in the message processing rule set, generating a combined flow table of the message data and unloading the combined flow table to the special data processor.
According to a third aspect of embodiments of the present application, there is provided an electronic device, including: the message processing method according to the first aspect is implemented when the computer program is executed by the processor.
According to a fourth aspect of embodiments of the present application, there is provided a computer storage medium storing computer program code which, when executed by a processor, causes the processor to perform the message processing method according to the first aspect.
In summary, according to the message processing scheme provided in each aspect of the present application, by generating a merged flow table including a plurality of message processing rules of the message data, the plurality of message processing rules of the message data may be unloaded into the hardware at the same time, so that the hardware may support direct processing of most of the message data, thereby improving the message processing efficiency, simplifying the message processing process, and improving the processing performance of the hardware.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following description will briefly introduce the drawings that are required to be used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments described in the embodiments of the present application, and other drawings may also be obtained according to these drawings for a person having ordinary skill in the art.
Fig. 1 is a schematic diagram of a message processing method or apparatus for implementing embodiments of the present application.
Fig. 2 is a process flow diagram of a message processing method according to an exemplary embodiment of the present application.
Fig. 3 is a flow chart of processing of first packet data of packet data according to an exemplary embodiment of the present application.
Fig. 4 is a flow chart of processing of sub-packet data of packet data according to an exemplary embodiment of the present application.
Fig. 5 is a flow chart of a process of generating and offloading a merged flow table of message data according to an exemplary embodiment of the present application.
Fig. 6 is a block diagram of a message processing apparatus according to an exemplary embodiment of the present application.
Fig. 7 is a block diagram of an electronic device according to an exemplary embodiment of the present application.
Detailed Description
In order to better understand the technical solutions in the embodiments of the present application, the following descriptions will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, but not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the embodiments of the present application shall fall within the scope of protection of the embodiments of the present application.
A special purpose data processor (Data Processing Unit, abbreviated DPU) is a data-centric architecture that can build a more efficient computing platform by offloading some of the computing platform's services. The DPU adopts a software-defined technical route to support the virtualization of infrastructure layer resources, and can support infrastructure layer services such as storage, security, service quality management and the like.
Open vSwitch is abbreviated as OVS, which is a high quality virtual switching software supporting multi-layer data forwarding. The forwarding process of the message data may be performed by running OVS software in a host computing device (e.g., CPU device). Specifically, the message data may be processed by querying a message processing rule (e.g., openFlow rule) that matches the message data, and according to an execution action defined by the message processing rule.
In some cases, OVS software may generate multiple process flow tables (megaflows) for a single message data, according to the network topology created in the OVS software and the pre-configured message processing rules (OpenFlow rules). In the case where a plurality of processing flow tables are generated simultaneously for a single message data, the processing flow table to be executed next (i.e., the recirculation action is used to determine the calling relationship between the processing flow tables) may be determined by identifying the recirculation action (RECIRC action) in the currently executed processing flow table until all the processing flow tables are executed to jointly complete the processing of the message data based on the plurality of processing flow tables (megaflows).
In order to improve the message processing efficiency, the OVS software may generate a corresponding processing flow table (megaflow) according to a message processing rule (OpenFlow protocol rule) for processing message data, and offload the generated processing flow table (megaflow) to the DPU hardware, so that the DPU hardware may directly process the same type of subsequent message according to the offload rule.
However, due to DPU hardware requirements and design, etc., DPU hardware is not supported for certain execution actions in the processing flow table (e.g., connection tracking), and therefore, all execution actions supported by OVS software cannot be offloaded into DPU hardware.
Furthermore, since the DPU hardware does not support the recirculation action (RECIRC action), only the forwarding function of the single flow table can be implemented, i.e., only the single flow table generated by the OVS software can be offloaded into the DPU hardware. However, in an actual usage scenario (such as in a cloud network), there are many cases where multiple processing flow tables are generated for a single message data. In this case, the OVS software can still be run in the main computing device (CPU) to perform forwarding processing of the message, which not only wastes the CPU utilization rate, but also reduces the forwarding processing efficiency of the message.
In view of this, various embodiments of the present application provide a message processing scheme, which can support to simultaneously offload a plurality of processing flow tables of message data to hardware, and can convert execution actions that are not supported by the hardware in the message processing flow tables, so that the hardware can support to process most of the message data, improve the processing efficiency of the message data, and simplify the processing procedure of the message data.
Specific implementations of various embodiments of the present application are described in detail below with reference to the accompanying drawings.
Fig. 1 is a schematic diagram of a message processing method or apparatus for implementing embodiments of the present application. As shown in fig. 1, the system architecture 100 includes a dedicated Data Processor (DPU) 110 coupled to a host computing device (CPU) 120, the host computing device 120 loaded with OVS software 122 operable to process message data 101 received by the dedicated data processor 110.
Fig. 2 shows a flow chart of a message processing method according to an exemplary embodiment of the present application. As shown, the method 200 of the present embodiment mainly includes the following steps:
step 202, receiving the message data by the special data processor, and matching the message data with each combined flow table stored in the special data processor.
In some embodiments, a dedicated Data Processor (DPU) 110 is provided with a set of merged flow tables 112 for storing merged flow tables (mergeflow), such as merged flow table 112A, merged flow table 112B shown in fig. 1, and the like, each merged flow table 112A, 112B having a merged flow table matching field, respectively.
In this embodiment, when the dedicated data processor 110 receives the packet data 101, the packet data 101 may be matched with each of the merged stream tables 112 according to the matching fields of each of the merged stream tables 112.
Step 204, determining whether a merged flow table matching the message data exists in the special data processor, if so, executing step 206, and if not, executing step 208.
Specifically, it may be determined whether there is a merged flow table in the set of merged flow tables 112 of the dedicated data processor 110 that matches the message data 101.
Step 206, processing the message data by using the merged flow table matched with the message data.
Illustratively, in the case where the combined flow table 112B in the set of combined flow tables 112 matches the message data 101, the special purpose data processor 110 may process the message data 101 according to the plurality of hardware actions contained in the combined flow table 112B without further processing by OVS software.
In some embodiments, the message data in the bottom layer tunnel (underlay) and the upper layer tunnel (overlay) may be sequentially processed by the dedicated data processor 110 using the merged flow table matched to the message data to implement the tunnel decapsulation processing of the message data. For example, the message data in the lower layer tunnel (underlay) may be processed first using the merged flow table matching the message data, and then the message data in the upper layer tunnel (overlay) may be processed using the merged flow table matching the message data.
Step 208, transmitting the message data to the main computing device.
In particular, in the event that there is no merged flow table in the special purpose data processor 110 that matches the message data 101, the message data 101 may be transferred by the special purpose data processor 110 to the host computing device 120 for processing.
Step 210, processing the message data by the main computing device and generating a combined flow table of the message data by using a plurality of message processing rules matched with the message data in the message processing rule set, and unloading the combined flow table to the special data processor.
In some embodiments, the message data 101 may be processed by running OVS software 122 in the host computing device 120.
In this embodiment, the packet data 101 may include first packet data or second packet data in the similar packet, where the first packet data represents first packet data in the similar packet received by the special data processor 110, and the second packet data represents non-first packet data in the similar packet received by the special data processor 110.
In this application, the message data having the same matching field is collectively referred to as a homogeneous message. Specifically, the processing flow table includes a matching field and an execution action, where the matching field is used to determine whether the processing flow table matches with the currently processed message data, and if so, the processing flow table is used to process the message data by using the execution action specified in the processing flow table. Therefore, the processing flow table matched with each message data under the same type of message should be identical.
For each packet data in the same type of packet, one packet data received by the dedicated data processing 110 for the first time may be referred to as first packet data of the same type of packet, and packet data received by the dedicated data processing 110 for the second time may be referred to as second packet data of the same type of packet. Typically, the first packet data in the same type of packet includes only one, and the sub-packet data may include at least one (i.e., all packet data in the same type of packet except the first packet data are referred to as sub-packet data).
In general, when the received packet data 101 is header packet data, the private data processor 110 submits the header packet data of the packet data 101 to the host computing device 120 for processing, because the merged flow table of the packet data 101 is not already stored in the private data processor 110. When the received message data 101 is sub-packet data, if the private data processor 110 already stores the merged stream table of the message data 101, the private data processor 110 directly processes the sub-packet data of the message data 101, and if the private data processor 110 does not store the merged stream table of the message data 101, the private data processor 110 still submits the message data 101 as sub-packet data to the main computing device 120 for processing.
In some embodiments, after the host computing device 120 receives the packet data 101 of the dedicated data processor 110, it may first identify whether the packet data 101 is first packet data or second packet data, and select a first packet data packet processing flow (refer to fig. 3) or a second packet data packet processing flow (refer to fig. 4) to process the packet data 101 based on the identification result of the first packet data or the second packet data.
In some embodiments, when the host computing device 120 identifies that the packet data 101 to be processed is first packet data, the first packet data may be matched with each candidate processing rule in the set of packet processing rules to obtain a plurality of packet processing rules in the set of packet processing rules that are matched with the first packet data, and process the first packet data according to a plurality of execution actions of the plurality of packet processing rules, generate a plurality of processing flow tables of the first packet data according to the plurality of packet processing rules for processing the first packet data, and generate a merged flow table (mergeflow) of the packet data 101 according to the plurality of processing flow tables of the first packet data.
Referring to fig. 3, a process flow for processing the first packet data 101A of the message data 101 using the OVS software 122 of the host computing device 120 is shown. As shown, after receiving the first packet data 101A of the packet data 101, a first processing cycle of the first packet data 101A is first performed, which includes: step 3102, based on each candidate processing rule in the set of packet processing rules, performing a first rule matching process on the first packet data 101A, and determining a packet processing rule a matching the first packet data 101A from each candidate processing rule; step 3104, according to the execution action of the message processing rule a, executing a corresponding action on the first packet data 101A, to obtain an action execution result of the first packet data 101A corresponding to the message processing rule a; step 3106, identifying whether there is a recirculation action (RECIRC action) in the action execution result of the first packet data 101A corresponding to the message processing rule a, if there is a recirculation action, executing the second processing cycle of the first packet data 101A, and if there is no recirculation action, executing step 3108; step 3108, creating a processing flow table a corresponding to the message processing rule a; in step 3110, the generated processing flow table a is stored in a packet array.
The second processing cycle performed on the first packet data 101A may include: step 3202, based on each candidate processing rule in the message processing rule set again, executing the second rule matching process of the first packet data 101A, and determining a message processing rule B matched with the first packet data 101A from each candidate processing rule; step 3204, according to the execution action of the message processing rule B, executing a corresponding action on the first packet data 101A to obtain an action execution result of the first packet data 101A corresponding to the message processing rule B; step 3206, identifying whether there is a recirculation action (RECIRC action) in the action execution result of the first packet data 101A corresponding to the message processing rule B, if so, continuing to execute the third processing cycle of the first packet data 101A, and if not, executing step 3208; step 3208, creating a processing flow table B corresponding to the message processing rule B; step 3210, saving the generated processing flow table B in the packet element array, and continuing to execute step 3108 in the first processing cycle.
For the third processing cycle performed on the first packet data 101A, the processing procedure is the same as that of the second processing cycle, and specific details thereof may refer to the description related to the second processing cycle, which will not be repeated herein.
It should be noted that, as can be seen from the process flow shown in fig. 3, the generation sequence of each processing flow table is exactly opposite to the execution sequence of the message processing rule. For example, in the example shown in fig. 3, the execution sequence of each message processing rule is a message processing rule a, a message processing rule B, and a message processing rule C, and the generation sequence of each processing flow table is a processing flow table C, a processing flow table B, and a processing flow table a, that is, the processing flow table C of the message processing rule C is first generated, the processing flow table B of the message processing rule B is then generated, and the processing flow table a of the message processing rule a is finally generated.
After the processing of the first packet data 101A is completed (i.e., no recirculation action exists as determined in step 3106, step 3206, or step 3306), step 340 may be continued to sequence the processing flow tables in the array of the header Wen Yuan. In this embodiment, the arrangement order of the processing flow tables in the array of the report Wen Yuan is consistent with the generation order of the processing flow tables, that is, the arrangement order of the processing flow tables is: a process flow table C, a process flow table B, and a process flow table A.
Step 350, based on the sorting result of each processing flow table, judging whether there is an exit action, if yes, executing step 360, if not, ending the step.
In this embodiment, according to the arrangement sequence of the processing flow tables of the message data, the last processing flow table of the message data 101 may be determined from the processing flow tables, and whether there is an exit action in the last processing flow table is identified.
For example, in the case that the arrangement order of the processing flow tables is the processing flow table C, the processing flow table B, and the processing flow table a, the processing flow table a is the last processing flow table of the packet data 101, it may be checked whether there is an exit action in the processing flow table a, if so, step 360 is performed, that is, the generating and unloading operation of the combined flow table (mergeflow) is performed, and if not, the generating and unloading operation of the combined flow table (mergeflow) is not performed.
In this embodiment, the exit actions may include any action for identifying the end of the message processing, such as an OUTPUT action, a DROP action, etc.
In this embodiment, when it is detected that there is an exit action (OUTPUT action, DROP action) in the last processing flow table of the packet data 101, it indicates that the first packet data 101A (packet data 101) has completed all OVS processing flows, and all processing flow tables matched with the first packet data 101A have been added to the packet Wen Yuan array, the combined flow table generating and unloading operation can be started (i.e. step 360).
In some embodiments, when the main computing device 120 identifies that the packet data 101 to be processed is sub-packet data, the sub-packet data of the packet data 101 may be directly processed by acquiring a plurality of processing flow tables for processing the first packet data 101A of the packet data 101 without re-executing the matching operation of the packet processing rule, so as to improve the processing efficiency of the sub-packet data in the same type of packet.
Referring to fig. 4, a process flow for processing the secondary packet data 101B of the message data 101 using the OVS software 122 of the primary computing device 120 is shown. As shown, after receiving the sub-packet data 101B of the packet data 101, a first processing cycle of the sub-packet data 101B is first performed, which includes: step 4102, obtaining a first processing flow table (i.e., processing flow table C) matching the sub-packet data 101B according to the arrangement sequence of the processing flow tables of the packet data 101, for example, the arrangement sequence of the processing flow table C, the processing flow table B, and the processing flow table a; step 4104, storing the first processing flow table (i.e. processing flow table C) of the message data 101 in the array of the message Wen Yuan; step 4106, according to the execution of the first processing flow table (i.e., processing flow table C), executing a corresponding action on the sub-packet data 101B to obtain an action execution result of the sub-packet data 101B corresponding to the first processing flow table (i.e., processing flow table C); in step 4108, it is identified whether there is a recirculation operation (RECIRC operation) in the operation execution result of the sub-packet data 101B corresponding to the first processing flow table (i.e., processing flow table C), and if there is a recirculation operation (RECIRC operation), the second processing cycle of the sub-packet data 101B is executed, and if there is no recirculation operation, step 440 is executed.
For the second processing cycle of the sub-packet data 101B, it includes: step 4202, obtaining a second processing flow table (i.e., processing flow table B) matching the sub-packet data 101B according to the arrangement order of the processing flow tables of the packet data 101, for example, the arrangement order of the processing flow table C, the processing flow table B, and the processing flow table a; step 4204, storing the second processing flow table (i.e., processing flow table B) of the message data 101 in the array of the message Wen Yuan; step 4206, according to the execution of the second processing flow table (i.e., processing flow table B), executing the corresponding action on the sub-packet data 101B to obtain the action execution result of the sub-packet data 101B corresponding to the second processing flow table (i.e., processing flow table B); in step 4208, it may be identified whether there is a recirculation action (RECIRC action) in the action execution result of the sub-packet data 101B corresponding to the second processing flow table (i.e., processing flow table B), if there is, the third processing cycle of the sub-packet data 101B is executed, and if there is no, step 440 is executed.
For the third processing cycle performed on the sub-packet data 101B, the processing procedure is the same as that of the second processing cycle, and specific details thereof may refer to the description related to the second processing cycle, which will not be repeated herein.
As can be seen from the process flows shown in fig. 3 and 4, the execution order of each processing flow table for processing the sub-packet data 101B is the reverse of the execution order of each packet processing rule for processing the first packet data 101A, that is, in fig. 4, the execution order of each processing flow table for processing the sub-packet data 101 is: in fig. 3, the execution sequence of each packet processing rule of the first packet data 101A is as follows: message processing rule A, message processing rule B, message processing rule C.
Step 440, it may be determined whether there is an exit operation according to the sorting result of each processing flow table, if so, step 450 is executed, and if not, the step is ended.
In this embodiment, according to the arrangement sequence of the processing flow tables of the message data, the last processing flow table of the message data 101 may be determined from the processing flow tables, and whether there is an exit action in the last processing flow table is identified.
For example, in the example shown in fig. 4, the arrangement order of the processing flow tables of the message data is the processing flow table C, the processing flow table B, and the processing flow table a, the processing flow table a is the last processing flow table of the message data 101, and it may be checked whether there is an exit action in the processing flow table a, if there is an exit action, step 450 is executed, and if there is no exit action, the step is ended.
In this embodiment, the exit actions may include any action for identifying the end of the message processing, such as an OUTPUT action, a DROP action, etc.
Step 450, determining whether the merged flow table of the message data 101 has been unloaded into the special data processor 110, if the merged flow table of the message data 101 has been unloaded into the special data processor 110, ending the process, and if the merged flow table of the message data 101 has not been unloaded into the special data processor 110, executing step 460.
In this embodiment, the primary computing device 120 may send a flow table unloading detection request of the message data 101 to the special purpose data processor 110, and determine whether the merged flow table of the message data 101 is unloaded into the special purpose data processor 110 according to a response result returned by the special purpose data processor 110 corresponding to the flow table unloading detection request.
Step 460, performing the generation and unloading operation of the combined flow table.
In some embodiments, according to a response result of the dedicated data processor 110 corresponding to the flow table offload detection request, if the response result is that the merged flow table (mergeflow) of the message data 101 does not exist in the dedicated data processor 110, the merged flow table (mergeflow) of the message data 101 is generated according to a plurality of processing flow tables of the message data 101.
Specifically, in the actual operation, there may be a case where the generation failure or the unloading failure of the merged flow table of the message data 101. Therefore, after the primary computing device 120 processes the secondary packet data of the packet data 101, it may check whether the merged stream table of the packet data 101 has been successfully unloaded into the dedicated data processor 110 by sending a stream table unloading detection request of the packet data 101 to the dedicated data processor 110, and if not, there may be a failure in generating the merged stream table representing the packet data 101 (i.e. failure in generating the merged stream table of the packet data 101 according to the processing result of the first packet data) or failure in unloading (i.e. failure in successfully unloading the merged stream table of the packet data 101 to the dedicated data processor 110). In this case, after processing the sub-packet data of the packet data 101, the generating and unloading operations of the merging flow table of the packet data 101 may be re-executed according to the multiple processing flow tables of the packet data 101, so as to provide a backup function for the generating and unloading operations of the merging flow table.
In summary, in the message processing method provided in this embodiment, after the dedicated data processor receives the message data, it may first query whether a merged flow table matching the message data exists in the dedicated data processor, if so, the dedicated data processor processes the message data directly based on the merged flow table, and if not, the message data is transferred to the host computing device for processing. Therefore, the embodiment can improve the processing efficiency of the message data under the condition of ensuring that the message data is successfully processed.
According to the message processing method provided by the embodiment, one merged flow table of the message data is generated according to a plurality of message processing rules for processing the message data, so that the technical problem that only a single processing flow table generated by OVS software is supported to be unloaded into DPU hardware in the prior art is solved, and the plurality of message processing rules of the message data can be supported to be unloaded into hardware at the same time, so that the hardware can support direct processing of most of the message data.
According to the message processing method, when the sub-packet data of the message data is processed, the processing of the sub-packet data can be completed directly according to the plurality of processing flow tables of the first packet data under the condition that the matching operation of the message processing rule is not required to be executed again, so that the processing efficiency of similar subsequent messages is greatly improved, and the operation load of main computing equipment is reduced.
After processing the sub-packet data of the message data, the message processing method provided in this embodiment determines whether to re-execute the generation and unloading processing of the combined flow table by detecting whether the combined flow table of the message data has been successfully unloaded in the special data processor, thereby improving the unloading success rate of the combined flow table.
Fig. 5 shows a process flow of a message processing method according to another exemplary embodiment of the present application. The embodiment mainly shows a specific implementation of a merged flow table for generating and unloading message data, and as shown in fig. 5, a method 500 of the embodiment mainly includes the following steps:
Step 502, determining an arrangement sequence of a plurality of processing flow tables of the message data according to the execution sequence of the message data corresponding to the message processing rules.
Illustratively, the arrangement order of the processing flow tables of the message data 101, that is, the generation order of the processing flow tables of the message data 101 (for example, the processing flow table C, the processing flow table B, the processing flow table a in the example shown in fig. 3) may be determined according to the execution order of the respective message processing rules (for example, the message processing rule a, the message processing rule B, the message processing rule C in the example shown in fig. 3) when the first packet data 101A of the message data 101 is processed by the host computing device 120 (OVS software 122).
Step 504, determining each hardware action of the message data and the execution sequence of each hardware action according to the arrangement sequence of the plurality of processing flow tables and the execution action of each processing flow table.
In some embodiments, the matching field of the first processing flow table and the matching field of the last processing flow table may be compared according to the arrangement sequence of the processing flow tables in the packet Wen Yuan array (megaflow), to obtain an execution action set of the packet data 101, where the execution action set characterizes all the execution actions of the packet data 101 before executing the last processing flow table, and according to the execution action set of the packet data 101 and the execution actions of the last processing flow table, the execution sequence of each hardware action and each hardware action of the packet data 101 may be obtained.
For example, in the case that the array of the report Wen Yuan includes three processing flow tables, and the arrangement sequence of the three processing flow tables is the processing flow table C, the processing flow table B, and the processing flow table a, according to the comparison result of the matching field of the processing flow table C and the matching field of the processing flow table a, an execution action set of the message data 101 may be obtained, where the execution action set includes an execution action of the message data 101 corresponding to the processing flow table C and an execution action of the processing flow table B; by integrating each execution action in the execution action set of the message data 101 with the execution action of the message data 101 corresponding to the processing flow table a, all hardware actions and the execution sequence of the hardware actions for processing the message data 101 can be obtained.
Step 506, determining the matching field of the first processing flow table in each processing flow table as the matching field of the merging flow table of the message data according to the arrangement sequence of the plurality of processing flow tables.
For example, in the case that the packet Wen Yuan array includes three processing flow tables and the arrangement order of the three processing flow tables is processing flow table C, processing flow table B, and processing flow table a, the matching field of the processing flow table C may be determined as the merging flow table matching field of the packet data 101.
Step 508, generating a combined flow table of the message data according to each hardware action of the message data, the execution sequence of each hardware action, and the combined flow table matching field of the message data.
Specifically, each hardware action sequence of the message data may be added to the merged flow table of the message data 101 according to the execution sequence of each hardware action, and the merged flow table matching field of the merged flow table may be determined according to the merged flow table matching field. The private data processor 110 may perform a matching operation on the received message data 101 based on the merged flow table matching field of the merged flow table (i.e., step 202).
Step 510, associating the merged stream table of the message data with the plurality of processing stream tables of the message data to generate an associated data table of the message data.
In some embodiments, a hash table (hashmap) may be employed to associate a merged flow table of message data with each processed flow table of message data. However, the present invention is not limited thereto, and other data association methods known in the art may be used to implement the association between the combined flow table and each of the processing flow tables.
Step 512, uninstalling the combined flow table of the message data to the special data processor.
In some embodiments, after offloading the merged flow table (mergeflow) of the message data 101 to the special purpose data processor 110, the merged flow table of the message data 101 offloaded to the special purpose data processor 110 may be maintained and managed using the associated data table (hashmap) of the message data.
In some embodiments, the combined flow table of message data 101 may be deleted from dedicated data processor 110 when any of the process flow tables associated with the combined flow table is detected to be deleted (e.g., when OVS software 122 of host computing device 120 deletes any of the process flow tables associated with the combined flow table) based on the associated data table of message data 101.
In summary, in the packet processing method provided in this embodiment, by converting the execution action of the processing flow table into the hardware action that can be supported by the DPU hardware to generate the merged flow table of the packet data, since the merged flow table no longer includes the recirculation action (RECIRC action), the problem that the multiple processing flow tables of the packet data cannot be simultaneously unloaded to the DPU hardware because the DPU hardware does not support the recirculation action (RECIRC action) can be effectively solved, and the execution action (for example, the connection tracking action) of the processing flow table that is not supported by the DPU hardware can also be replaced by other actions, so as to improve the success rate of executing the packet forwarding process by the DPU hardware.
According to the message processing method provided by the embodiment, the processing process of the DPU hardware on the message data can be simplified by combining the plurality of processing flow tables of the message data into one combined flow table, the processing performance of the hardware is improved, and the technical effect is also applicable to the DPU hardware supporting the recycling action (RECIRC action).
According to the message processing method provided by the embodiment, all execution actions for processing the message data can be accurately identified by comparing the matching fields of the first processing flow table and the last processing flow table of the message data, so that the accuracy and the success rate of executing the message forwarding processing through the DPU hardware are improved.
Fig. 6 is a block diagram of a message processing apparatus 600 according to an exemplary embodiment of the present application. As shown in the figure, the message processing apparatus 600 mainly includes:
a first control module 602, configured to receive, by using the dedicated data processor, packet data, match the packet data with each combined flow table in the dedicated data processor, process the packet data using the combined flow table matched with the packet data if there is a combined flow table matched with the packet data, and transmit the packet data to the host computing device if there is no combined flow table matched with the packet data;
The second control module 604 is configured to process, by the host computing device, the message data and generate a merged flow table of the message data using a plurality of message processing rules matched with the message data in the message processing rule set, and offload the merged flow table to the dedicated data processor.
Optionally, the message data processed by the main computing device includes first packet data of a similar message.
Optionally, the second control module 604 is configured to process the first packet data by using a plurality of packet processing rules matched with the first packet data in the packet processing rule set; generating a plurality of processing flow tables of the message data according to the message processing rules; and generating a combined flow table of the message data according to the plurality of processing flow tables of the message data.
Optionally, the message data processed by the primary computing device includes sub-packet data of the similar message.
Optionally, the second control module 604 is further configured to process the sub-packet data using a plurality of processing flow tables of the packet data; sending a flow table unloading detection request of the message data to the special data processor, and acquiring a response result of the special data processor corresponding to the flow table unloading detection request; and if the response result is that the combined flow table of the message data does not exist in the special data processor, generating the combined flow table of the message data according to a plurality of processing flow tables of the message data.
Optionally, the second control module 604 is further configured to determine an arrangement sequence of the plurality of processing flow tables according to a generation sequence of the plurality of processing flow tables of the packet data; determining each hardware action of the message data and the execution sequence of each hardware action according to the arrangement sequence of the plurality of processing flow tables and the execution sequence of each processing flow table, and determining a matching field of a first processing flow table in each processing flow table as a merging flow table matching field of the message data according to the arrangement sequence of the plurality of processing flow tables; and generating a combined flow table of the message data according to each hardware action of the message data, the execution sequence of each hardware action and the combined flow table matching field of the message data.
Optionally, the second control module 604 is further configured to determine a last processing flow table of the message data from the processing flow tables according to an arrangement sequence of the plurality of processing flow tables of the message data; identifying an exit action in the last process flow table; and if the last processing flow table contains the outlet action, executing the step of generating the merging flow table of the message data, and if the last processing flow table does not contain the outlet action, not executing the step of generating the merging flow table of the message data.
Optionally, the second control module 604 is further configured to correlate the merged flow table of the message data with the multiple processing flow tables of the message data, and generate a correlation data table of the message data; and deleting the combined flow table of the message data from the special data processor when detecting that any processing flow table associated with the combined flow table is deleted according to the associated data table of the message data.
Optionally, the first control module 602 is further configured to process the packet data in the bottom layer tunnel and the upper layer tunnel by using the merged flow table matched with the packet data, so as to implement tunnel decapsulation processing of the packet data.
The embodiments of the present application provide a computer storage medium storing computer program code, which when executed by a processor, causes the processor to execute the method for processing a message according to the embodiments of the present application.
An exemplary embodiment of the present application provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor. The memory stores a computer program executable by the at least one processor for causing the electronic device to perform the message processing method according to the exemplary embodiments of the present application when executed by the at least one processor.
Referring to fig. 7, a block diagram of an electronic device 700 that may be a server or client of the present application, which is an example of a hardware device that may be applied to aspects of the present application, will now be described. Electronic devices are intended to represent various forms of digital electronic computer devices, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the application described and/or claimed herein.
As shown in fig. 7, the electronic device 700 includes a computing unit 701 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 702 or a computer program loaded from a storage unit 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 700 may also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
Various components in the electronic device 700 are connected to the I/O interface 705, including: an input unit 706, an output unit 707, a storage unit 708, and a communication unit 709. The input unit 706 may be any type of device capable of inputting information to the electronic device 700, and the input unit 706 may receive input numeric or character information and generate key signal inputs related to user settings and/or function controls of the electronic device. The output unit 707 may be any type of device capable of presenting information and may include, but is not limited to, a display, speakers, video/audio output terminals, vibrators, and/or printers. Storage unit 708 may include, but is not limited to, magnetic disks, optical disks. The communication unit 709 allows the electronic device 700 to exchange information/data with other devices through computer networks, such as the internet, and/or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers and/or chipsets, such as bluetooth (TM) devices, wiFi devices, wiMax devices, cellular communication devices, and/or the like.
The computing unit 701 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 701 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 701 performs the various methods and processes described above. For example, in some embodiments, a message processing method as described above may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 708. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 700 via the ROM 702 and/or the communication unit 709. In some embodiments, the computing unit 701 may be configured to perform the above-described message processing method by any other suitable means (e.g., by means of firmware).
Program code for carrying out methods of the present application may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this application, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data service), or that includes a middleware component (e.g., an application service), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and the server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
It should be noted that, according to implementation requirements, each component/step described in the embodiments of the present application may be split into more components/steps, and two or more components/steps or part of operations of the components/steps may be combined into new components/steps, so as to achieve the purposes of the embodiments of the present application.
The above embodiments are only for illustrating the embodiments of the present application, but not for limiting the embodiments of the present application, and various changes and modifications can be made by one skilled in the relevant art without departing from the spirit and scope of the embodiments of the present application, so that all equivalent technical solutions also fall within the scope of the embodiments of the present application, and the scope of the embodiments of the present application should be defined by the claims.

Claims (10)

1. A method of processing a message, applied to a dedicated data processor coupled to a host computing device, the method comprising:
receiving message data through the special data processor, matching the message data with each combined flow table in the special data processor, if a combined flow table matched with the message data exists, processing the message data by using the combined flow table matched with the message data, and if the combined flow table matched with the message data does not exist, transmitting the message data to the main computing equipment;
and processing the message data by the main computing equipment by utilizing a plurality of message processing rules matched with the message data in a message processing rule set, generating a combined flow table of the message data, and unloading the combined flow table to the special data processor.
2. The method of claim 1, wherein the message data processed by the host computing device comprises first packet data of like messages;
the processing, by the main computing device, the message data and generating a merged flow table of the message data by using a plurality of message processing rules matched with the message data in a message processing rule set, including:
processing the first packet data by utilizing a plurality of message processing rules matched with the first packet data in the message processing rule set;
generating a plurality of processing flow tables of the message data according to the message processing rules;
and generating a combined flow table of the message data according to the plurality of processing flow tables of the message data.
3. The method of claim 2, wherein the message data processed by the primary computing device comprises secondary packet data of the same type of message;
wherein the method further comprises:
processing the sub-packet data by using a plurality of processing flow tables of the message data;
sending a flow table unloading detection request of the message data to the special data processor, and acquiring a response result of the special data processor corresponding to the flow table unloading detection request;
And if the response result is that the combined flow table of the message data does not exist in the special data processor, generating the combined flow table of the message data according to a plurality of processing flow tables of the message data.
4. A method according to claim 2 or 3, wherein generating the merged flow table of the message data from the plurality of processing flow tables of the message data comprises:
determining the arrangement sequence of a plurality of processing flow tables according to the generation sequence of the processing flow tables of the message data;
determining each hardware action of the message data and the execution sequence of each hardware action according to the arrangement sequence of the plurality of processing flow tables and the execution sequence of each processing flow table, and determining a matching field of a first processing flow table in each processing flow table as a merging flow table matching field of the message data according to the arrangement sequence of the plurality of processing flow tables;
and generating a combined flow table of the message data according to each hardware action of the message data, the execution sequence of each hardware action and the combined flow table matching field of the message data.
5. A method according to claim 2 or 3, wherein prior to generating the combined flow table of message data, the method further comprises:
Determining the last processing flow table of the message data from the processing flow tables according to the arrangement sequence of the processing flow tables of the message data;
identifying an exit action in the last process flow table;
and if the last processing flow table contains the outlet action, executing the step of generating the merging flow table of the message data, and if the last processing flow table does not contain the outlet action, not executing the step of generating the merging flow table of the message data.
6. The method according to claim 4, wherein the method further comprises:
the combined flow table of the message data is mutually related to a plurality of processing flow tables of the message data, and a related data table of the message data is generated;
and deleting the combined flow table of the message data from the special data processor when detecting that any processing flow table associated with the combined flow table is deleted according to the associated data table of the message data.
7. The method of claim 1, wherein processing the message data using the merged flow table matching the message data comprises:
And processing the message data in the bottom layer tunnel and the upper layer tunnel by using the combined flow table matched with the message data so as to implement tunnel decapsulation processing of the message data.
8. A message processing apparatus for application to a dedicated data processor coupled to a host computing device, the apparatus comprising:
the first control module is used for receiving the message data through the special data processor, matching the message data with all the combined flow tables in the special data processor, if the combined flow table matched with the message data exists, processing the message data by using the combined flow table matched with the message data, and if the combined flow table matched with the message data does not exist, transmitting the message data to the main computing equipment;
and the second control module is used for processing the message data by the main computing equipment through a plurality of message processing rules matched with the message data in the message processing rule set, generating a combined flow table of the message data and unloading the combined flow table to the special data processor.
9. An electronic device, comprising:
A memory and a processor, wherein the memory has stored therein a computer program which, when executed by the processor, implements the message processing method of any of claims 1 to 7.
10. A computer storage medium storing computer program code which, when executed by a processor, causes the processor to perform the message processing method according to any one of claims 1 to 7.
CN202311422802.7A 2023-10-30 2023-10-30 Message processing method and device, electronic equipment and storage medium Pending CN117478590A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311422802.7A CN117478590A (en) 2023-10-30 2023-10-30 Message processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311422802.7A CN117478590A (en) 2023-10-30 2023-10-30 Message processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117478590A true CN117478590A (en) 2024-01-30

Family

ID=89625062

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311422802.7A Pending CN117478590A (en) 2023-10-30 2023-10-30 Message processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117478590A (en)

Similar Documents

Publication Publication Date Title
CN110839084B (en) Session management method, device, equipment and medium
CN113157810B (en) Block synchronization method, computer equipment and storage medium
CN110210845B (en) Method, apparatus, medium, and computing device for blockchain data migration
EP4024765A1 (en) Method and apparatus for extracting fault propagation condition, and storage medium
CN109033814A (en) intelligent contract triggering method, device, equipment and storage medium
JP2022183003A (en) State machine processing, state processing method, device, electronic appliance and storage medium
CN114697391A (en) Data processing method, device, equipment and storage medium
CN110688305A (en) Test environment synchronization method, device, medium and electronic equipment
CN113641388A (en) Cloud mobile phone updating method, related device and computer program product
CN115766405B (en) Fault processing method, device, equipment and storage medium
CN115514718B (en) Data interaction method, control layer and equipment based on data transmission system
WO2023169193A1 (en) Method and device for generating smart contract
CN113691403B (en) Topology node configuration method, related device and computer program product
EP4142258A1 (en) Edge computing network, data transmission method and apparatus, device and storage medium
CN117478590A (en) Message processing method and device, electronic equipment and storage medium
CN113726881B (en) Communication connection establishment method, related device and computer readable storage medium
CN115080003A (en) Zero code platform operation method and device, electronic equipment and storage medium
CN111835857B (en) Method and apparatus for accessing data
CN113419880A (en) Cloud mobile phone root authority acquisition method, related device and computer program product
EP3993366A2 (en) Network load balancer, request message distribution method, program product and system
CN114338525B (en) Automatic route aggregation method and device, electronic equipment and storage medium
CN118034881A (en) Task execution method, device, electronic equipment and storage medium
US20240048460A1 (en) Service providing method and apparatus
CN116980386A (en) Domain name access method and device, electronic equipment and readable storage medium
CN117729006A (en) Route risk analysis method and device based on VPC network, electronic equipment and medium

Legal Events

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