Data processing method, device, and storage medium

By determining the data flow and packet header characteristics of the data packet in the network card and finding the preset packet processing list, the problem of packet processing delay in the prior art is solved, and more efficient packet processing is achieved.

CN116266825BActive Publication Date: 2025-08-26CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111546628.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-16
Publication Date
2025-08-26
Estimated Expiration
2041-12-16

AI Technical Summary

Technical Problem

In the prior art, network cards need to perform repeated analysis on each reception, resulting in an increase in communication delay.

Method used

By determining the data flow and packet header characteristics corresponding to the data packet, finding a preset packet processing list, and achieving rapid packet processing.

Benefits of technology

The communication delay of data packets is reduced and the efficiency of data packet processing is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116266825B_ABST
    Figure CN116266825B_ABST
Patent Text Reader

Abstract

An embodiment of the present application provides a data processing method, device, and storage medium, the method comprising: upon receiving a first data packet, determining a first data stream and a first data packet header feature corresponding to the first data packet; if it is determined that the first data packet is not the first data packet in the first data stream, searching a first packet processing list corresponding to the first data stream from a correspondence between a preset data stream and a preset packet processing list; searching a first packet processing mode corresponding to the first data packet header feature from the first packet processing list; and performing data packet processing on the first data packet based on the first packet processing mode; through the above technical solution, the purpose of reducing data packet communication delay is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data transmission, and in particular to a data processing method and device, and a storage medium. Background Art

[0002] For data packets flowing into and out of the network card, the network card's Field Programmable Gate Array (FPGA) will first search its own flow table based on the data packet. For data packets that can find a corresponding flow table entry in the flow table, the FPGA only needs to complete the corresponding processing according to the action instructions in the corresponding flow table entry. However, if the corresponding flow table entry is not found, a series of data analysis is required to determine the processing operation for the data packet.

[0003] With the existing technology, this operation needs to be repeated every time a data packet flows in, resulting in an increase in the communication delay of the data packet. Summary of the Invention

[0004] The embodiments of the present application provide a data processing method and device, and a storage medium, which can reduce the communication delay of data packets.

[0005] The technical solution of this application is achieved as follows:

[0006] In a first aspect, an embodiment of the present application provides a data processing method, the method comprising:

[0007] Upon receiving a first data packet, determining a first data stream corresponding to the first data packet and a first data packet header feature of the first data packet;

[0008] If it is determined that the first data packet is not the first data packet in the first data stream, searching a first packet processing list corresponding to the first data stream from a correspondence between preset data streams and preset packet processing lists; the preset packet processing list in the correspondence between the preset data streams and the preset packet processing lists is determined based on the first data packet in the preset data stream corresponding to the preset packet processing list; the first packet processing list stores a set of data packet header features and a set of packet processing methods, each data packet header feature in the set of data packet header features corresponds to a packet processing method;

[0009] Search the first packet processing list for a first packet processing method corresponding to the first data packet header feature; and perform data packet processing on the first data packet based on the first packet processing method.

[0010] In the above data processing method, after determining the first data stream corresponding to the first data packet and the first data packet header feature of the first data packet, the method further includes:

[0011] If it is determined that the first data packet is the first data packet in the first data flow, determining a first traffic type corresponding to the first data flow according to the first data packet header feature, and searching the first packet processing list corresponding to the first traffic type from a correspondence between preset traffic types and preset packet processing lists;

[0012] Add the correspondence between the first data stream and the first packet processing list to the correspondence between the preset data stream and the preset packet processing list; and search the first packet processing method corresponding to the first data packet header feature from the first packet processing list to perform packet processing on the first data packet based on the first packet processing method.

[0013] In the above data processing method, before searching the first packet processing list corresponding to the first traffic type from the correspondence between the preset traffic type and the preset packet processing list, the method further includes:

[0014] Obtaining preset traffic types, a set of data packet header features corresponding to each preset traffic type, and a set of packet processing methods;

[0015] Generate a preset packet processing list according to a set of data packet header features and a set of packet processing methods corresponding to each preset traffic type;

[0016] According to the preset traffic type and the preset packet processing list, a correspondence between the preset traffic type and the preset packet processing list is generated.

[0017] In a second aspect, an embodiment of the present application provides a data processing device, the device comprising:

[0018] Field Programmable Gate Array (FPGA); the FPGA includes a correspondence between a preset data stream and a preset packet processing list;

[0019] The FPGA is used to determine the first data stream and the first data packet header feature corresponding to the first data packet when receiving the first data packet; if it is determined that the first data packet is not the first data packet in the first data stream, search the first packet processing list corresponding to the first data stream from the correspondence between the preset data stream and the preset packet processing list; the preset packet processing list in the correspondence between the preset data stream and the preset packet processing list is determined according to the first data packet in the preset data stream corresponding to the preset packet processing list; the first packet processing list stores a group of data packet header features and a group of packet processing methods, each data packet header feature in the group of data packet header features corresponds to a packet processing method; search the first packet processing method corresponding to the first data packet header feature from the first packet processing list; and perform data packet processing on the first data packet based on the first packet processing method.

[0020] In the above data processing device, the device further comprises: a system-on-chip (SOC);

[0021] The FPGA is further configured to send the first data packet to the SOC if it is determined that the first data packet is the first data packet in the first data stream;

[0022] The SOC is used to parse the first data packet and obtain the first data packet header feature of the first data packet; determine the first traffic type corresponding to the first data stream based on the first data packet header feature, and search the first packet processing list corresponding to the first traffic type from the correspondence between the preset traffic type and the preset packet processing list; search the first packet processing method corresponding to the first data packet header feature from the first packet processing list, and send the correspondence between the first packet processing method, the first data stream and the first packet processing list to the FPGA.

[0023] In the above-mentioned data processing device, the FPGA is also used to add the correspondence between the first data stream and the first packet processing list to the correspondence between the preset data stream and the preset packet processing list, and perform packet processing on the first data packet based on the first packet processing method.

[0024] In the above-mentioned data processing device, the SOC is also used to obtain a preset traffic type, a set of data packet header features and a set of packet processing methods corresponding to each preset traffic type; generate a preset packet processing list based on the set of data packet header features and a set of packet processing methods corresponding to each preset traffic type; and generate a correspondence between the preset traffic type and the preset packet processing list based on the preset traffic type and the preset packet processing list.

[0025] In the above-mentioned data processing device, the SOC includes a data plane development kit DPDK; the FPGA is further used to send the first data packet to the SOC based on the DPDK; the SOC is further used to send the correspondence between the first packet processing mode, the first data flow and the first packet processing list to the FPGA based on the DPDK.

[0026] In a third aspect, an embodiment of the present application provides a data processing device, characterized in that the device includes: a processor, a memory and a communication bus; when the processor executes the running program stored in the memory, it implements the data processing method described in any one of the above items.

[0027] In a fourth aspect, an embodiment of the present application provides a storage medium on which a computer program is stored, characterized in that when the computer program is executed by a processor, it implements the data processing method as described in any one of the above items.

[0028] Embodiments of the present application provide a data processing method, apparatus, and storage medium, the method comprising: upon receiving a first data packet, determining a first data stream and a first data packet header feature corresponding to the first data packet; if it is determined that the first data packet is not the first data packet in the first data stream, searching a first packet processing list corresponding to the first data stream from a correspondence between a preset data stream and a preset packet processing list; the preset packet processing list in the correspondence between the preset data stream and the preset packet processing list is determined based on the first data packet in the preset data stream corresponding to the preset packet processing list; storing a set of data packet header features and a set of packet processing modes in the first packet processing list, each data packet header feature in the set of data packet header features corresponding to a packet processing mode; searching a first packet processing mode corresponding to the first data packet header feature from the first packet processing list; and performing data packet processing on the first data packet based on the first packet processing mode; using the above implementation scheme, by determining the first packet processing list corresponding to the first data stream based on the first data packet in the first data stream, when it is determined based on a subsequently received data packet that the data stream belongs to is the first data stream, by searching the first packet processing list, the packet processing mode for the data packet can be quickly determined, thereby achieving the purpose of reducing data packet communication delay. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 A flow chart of a data processing method provided in an embodiment of the present application;

[0030] Figure 2 A schematic diagram of the structure of an exemplary data processing device provided in an embodiment of the present application;

[0031] Figure 3 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application;

[0032] Figure 4 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0033] It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application.

[0034] The present invention provides a data processing method, which is applied to a data processing device. Figure 1 A flow chart of a data processing method provided in an embodiment of the present application is shown as follows: Figure 1 As shown, the data processing method may include:

[0035] S101. When a first data packet is received, determine a first data stream corresponding to the first data packet and a first data packet header feature of the first data packet.

[0036] In an embodiment of the present application, upon receiving a first data packet, the data processing device determines a first data stream corresponding to the first data packet and a first data packet header feature of the first data packet.

[0037] A data processing method proposed in an embodiment of the present application can be applied to scenarios where data packets are sent and received.

[0038] It should be noted that Figure 2 This is a schematic diagram of an exemplary data processing device structure provided in an embodiment of the present application, as shown in FIG. Figure 2 As shown, the data processing device includes an FPGA and a system-on-chip (SOC), and the SOC specifically includes a data plane development kit (DPDK), an application module, a data packet analysis module, and a pre-packet processing list module, wherein the FPGA is used to receive incoming data packets and determine a packet processing method for the data packets; the DPDK is used to assist the FPGA in sending data packets to the application module of the SOC; the application module is used to receive data packets sent by the FPGA; the data packet analysis module is used to parse the received data packets to obtain data packet header features, and then determine the traffic type of the data flow to which the data packet belongs based on the data packet header features, and send it to the pre-packet processing list orchestration module; the pre-packet processing list orchestration module is used to determine the corresponding packet processing list based on the traffic type, and send it to the FPGA, so that the FPGA can determine the packet processing method for the data packet based on this packet processing list.

[0039] It should be noted that when the first data packet flows into the data processing device, it first flows into the FPGA. After determining the first data stream corresponding to the first data packet and the first data packet header characteristics of the first data packet, the FPGA needs to determine whether the first data packet is the first data packet in the first data stream, and then choose whether to send the first data packet to the SOC for processing based on the judgment result.

[0040] It should be noted that the data packet header features include: a five-tuple, a transport layer protocol flag, an application layer protocol, etc.; among them, the five-tuple includes: a source Media Access Control Address (MAC) address, a destination MAC address, a source Internet Protocol (IP) address, a destination IP address, and a communication protocol.

[0041] S102: If it is determined that the first data packet is not the first data packet in the first data stream, search for a first packet processing list corresponding to the first data stream from a correspondence between preset data streams and preset packet processing lists.

[0042] In an embodiment of the present application, when the data processing device determines that the first data packet is not the first data packet in the first data stream, it searches for the first packet processing list corresponding to the first data stream from the correspondence between the preset data stream and the preset packet processing list.

[0043] In an embodiment of the present application, the preset packet processing list in the correspondence between the preset data stream and the preset packet processing list is determined according to the first data packet in the preset data stream corresponding to the preset packet processing list; a group of data packet header features and a group of packet processing methods are stored in the first packet processing list, and each data packet header feature in the group of data packet header features corresponds to a packet processing method.

[0044] It should be noted that, since the first packet processing list is determined based on the first data packet in the first data stream, the first data packet of the first data stream needs to be processed first; specifically, if it is determined that the first data packet is the first data packet in the first data stream, the first traffic type corresponding to the first data stream is determined based on the first data packet header characteristics, and the first packet processing list corresponding to the first traffic type is searched from the correspondence between the preset traffic type and the preset packet processing list; the correspondence between the first data stream and the first packet processing list is added to the correspondence between the preset data stream and the preset packet processing list; and the first packet processing method corresponding to the first data packet header characteristics is searched from the first packet processing list, so as to perform packet processing on the first data packet based on the first packet processing method.

[0045] It should be noted that, when the FPGA determines that the first data packet is the first data packet in the first data stream, it needs to send the first data packet to the SOC for processing.

[0046] It should be noted that if Figure 2 As shown in the figure, FPGA uses DPDK to send the first data packet to SOC. Since DPDK can directly bypass the kernel space of SOC and send the first data packet to the user space of SOC, that is, the application module, it can reduce the frequency of CPU interruption and memory copy, and improve the rate of data packet upload.

[0047] It should be noted that before using DPDK to send the first data packet from the FPGA to the SoC, you need to first create the DPDK environment, set up large page memory of no less than 2MB, unbind the Peripheral Component Interconnect (PCI) device responsible for sending data packets in the SmartNIC from the control of the Linux operating system, and rebind the DPDK ibg_uio module as a driver.

[0048] It should be noted that, since the FPGA does not send the first data packet header feature corresponding to the first data packet when sending the first data packet to the SOC, the SOC needs to parse the first data packet when receiving the first data packet to obtain the first data packet header feature of the first data packet, and this process is implemented by the data packet analysis module in the SOC, such as Figure 2 As shown, the data packet analysis module is set between the DPDK and the application module in the SOC, and is responsible for extracting the data packet header features and determining the traffic type of the data flow based on the data header features.

[0049] It should be noted that the traffic type is a character string used to assist in arranging the pre-packet processing list. It is usually described by the application layer protocol name of the data packet. The traffic types include: Secure Shell Protocol (SSH) connection, File Transfer Protocol (FTP) connection, remote control Telnet protocol connection, Hypertext Transfer Protocol (HTTP) access, Secure Hypertext Transfer Protocol (HTTPs) access, etc.; the specific traffic type can be specified according to actual conditions, and the embodiments of this application do not make specific limitations here.

[0050] In the embodiment of the present application, after the data packet analysis module determines the first traffic type of the first data flow, such as Figure 2 As shown, the first traffic type is sent to the pre-packet processing list arrangement module, and the pre-packet processing list arrangement module can obtain the first packet processing list corresponding to the first traffic type by searching the correspondence between the preset traffic type and the preset packet processing list.

[0051] In an embodiment of the present application, the correspondence between the preset traffic type and the preset packet processing list is generated before searching for the first packet processing list corresponding to the first traffic type from the correspondence between the preset traffic type and the preset packet processing list. Specifically: the preset traffic type, a set of data packet header features and a set of packet processing methods corresponding to each preset traffic type are obtained; a preset packet processing list is generated based on a set of data packet header features and a set of packet processing methods corresponding to each preset traffic type; and a correspondence between the preset traffic type and the preset packet processing list is generated based on the preset traffic type and the preset packet processing list.

[0052] It should be noted that each traffic type has a corresponding packet processing list, which stores the packet processing method corresponding to this traffic type.

[0053] It should be noted that the packet processing method can be forwarding to a specified device or port, etc. The specific processing method can be specified according to actual conditions, and the embodiment of this application does not make specific limitations here.

[0054] It should be noted that, in actual applications, the data packet header features and the corresponding packet processing methods can be customized, and a preset packet processing list can be generated based on them to process the incoming data packets.

[0055] It should be noted that the process of the SOC determining the first packet processing list according to the first traffic type is implemented by the pre-packet processing list arrangement module in the SOC, such as Figure 2 As shown, the pre-packet processing list orchestration module is set between DPDK and the application module in the SOC, and is responsible for determining the corresponding packet processing list according to different traffic types.

[0056] S103: Search the first packet processing method corresponding to the first data packet header feature in the first packet processing list; and perform data packet processing on the first data packet based on the first packet processing method.

[0057] In an embodiment of the present application, after finding the first packet processing list, the data processing device searches the first packet processing method corresponding to the first data packet header feature from the first packet processing list; and performs packet processing on the first data packet based on the first packet processing method.

[0058] It should be noted that after finding the first packet processing list, the SOC determines the first packet processing method corresponding to the first data packet from the first packet processing list, and then sends the first data stream, the first packet processing list and the first packet processing method to the FPGA. After receiving the first data stream, the first packet processing list and the first packet processing method, the FPGA first processes the first data packet based on the first packet processing method, and then adds the correspondence between the first data stream and the first packet processing list to the correspondence between the preset data stream and the preset packet processing list. When the next data packet of the first data stream is received, the first packet processing list is directly obtained from the correspondence between the preset data stream and the preset packet processing list, and then the next data packet of the first data stream is processed according to the packet processing method of the next data packet in the first packet processing list.

[0059] It should be noted that, since the FPGA sends the first data packet in the first data stream to the SOC and obtains the first packet processing list corresponding to the first data stream, in the embodiment of the present application, the FPGA can determine the first packet processing method for the first data packet by searching the first packet processing list corresponding to the first data stream when it determines that the first data packet is not the first data packet in the first data stream.

[0060] An embodiment of the present application provides a data processing method, the method comprising: upon receiving a first data packet, determining a first data stream and a first data packet header feature corresponding to the first data packet; if it is determined that the first data packet is not the first data packet in the first data stream, searching a first packet processing list corresponding to the first data stream from a correspondence between a preset data stream and a preset packet processing list; the preset packet processing list in the correspondence between the preset data stream and the preset packet processing list is determined based on the first data packet in the preset data stream corresponding to the preset packet processing list; storing a set of data packet header features and a set of packet processing modes in the first packet processing list, each data packet header feature in the set of data packet header features corresponding to a packet processing mode; searching a first packet processing mode corresponding to the first data packet header feature from the first packet processing list; and performing data packet processing on the first data packet based on the first packet processing mode; using the above implementation scheme, by determining the first packet processing list corresponding to the first data stream based on the first data packet in the first data stream, when it is determined based on a subsequently received data packet that the data stream belongs to is the first data stream, by searching the first packet processing list, the packet processing mode for the data packet can be quickly determined, thereby achieving the purpose of reducing data packet communication delay.

[0061] Based on the above embodiment, in another embodiment of the present application, a data processing device 1 is provided. Figure 3 A schematic diagram of the structure of a data processing device provided in this application is shown in FIG. Figure 3 As shown, the data processing device 1 includes:

[0062] Field Programmable Gate Array FPGA10; the FPGA10 includes a correspondence between a preset data stream and a preset packet processing list;

[0063] The FPGA is used to determine the first data stream and the first data packet header feature corresponding to the first data packet when receiving the first data packet; if it is determined that the first data packet is not the first data packet in the first data stream, search the first packet processing list corresponding to the first data stream from the correspondence between the preset data stream and the preset packet processing list; the preset packet processing list in the correspondence between the preset data stream and the preset packet processing list is determined according to the first data packet in the preset data stream corresponding to the preset packet processing list; the first packet processing list stores a group of data packet header features and a group of packet processing methods, each data packet header feature in the group of data packet header features corresponds to a packet processing method; search the first packet processing method corresponding to the first data packet header feature from the first packet processing list; and perform data packet processing on the first data packet based on the first packet processing method.

[0064] Optionally, the data processing device 1 further includes: a system-on-chip (SOC);

[0065] The FPGA is further configured to send the first data packet to the SOC if it is determined that the first data packet is the first data packet in the first data stream;

[0066] The SOC is used to parse the first data packet and obtain the first data packet header feature of the first data packet; determine the first traffic type corresponding to the first data stream based on the first data packet header feature, and search the first packet processing list corresponding to the first traffic type from the correspondence between the preset traffic type and the preset packet processing list; search the first packet processing method corresponding to the first data packet header feature from the first packet processing list, and send the correspondence between the first packet processing method, the first data stream and the first packet processing list to the FPGA.

[0067] Optionally, the FPGA is further used to add the correspondence between the first data stream and the first packet processing list to the correspondence between the preset data stream and the preset packet processing list, and perform packet processing on the first data packet based on the first packet processing method.

[0068] Optionally, the SOC is also used to obtain preset traffic types, a set of data packet header features and a set of packet processing methods corresponding to each preset traffic type; generate a preset packet processing list based on the set of data packet header features and a set of packet processing methods corresponding to each preset traffic type; and generate a correspondence between the preset traffic type and the preset packet processing list based on the preset traffic type and the preset packet processing list.

[0069] Optionally, the SOC includes a data plane development kit DPDK;

[0070] The FPGA is further configured to send the first data packet to the SOC based on the DPDK;

[0071] The SOC is further configured to send the correspondence between the first packet processing mode, the first data flow, and the first packet processing list to the FPGA based on the DPDK.

[0072] An embodiment of the present application provides a data processing device, the method comprising: upon receiving a first data packet, determining a first data stream and a first data packet header feature corresponding to the first data packet; if it is determined that the first data packet is not the first data packet in the first data stream, searching a first packet processing list corresponding to the first data stream from a correspondence between a preset data stream and a preset packet processing list; the preset packet processing list in the correspondence between the preset data stream and the preset packet processing list is determined based on the first data packet in the preset data stream corresponding to the preset packet processing list; the first packet processing list stores a set of data packet header features and a set of packet processing methods, each data packet header feature in the set of data packet header features corresponding to a packet processing method; searching the first packet processing method corresponding to the first data packet header feature from the first packet processing list; and performing data packet processing on the first data packet based on the first packet processing method; using the above implementation scheme, by determining the first packet processing list corresponding to the first data stream based on the first data packet in the first data stream, when it is determined based on a subsequently received data packet that the data stream belongs to is the first data stream, by searching the first packet processing list, the packet processing method for the data packet can be quickly determined, thereby achieving the purpose of reducing data packet communication delay.

[0073] Figure 4 This is a schematic diagram of the structure of a data processing device provided in an embodiment of the present application. In practical applications, based on the same disclosed concept of the above embodiments, Figure 4 As shown, the data processing device 2 of this embodiment includes: a processor 20 , a memory 21 and a communication bus 22 .

[0074] In a specific embodiment, the FPGA 10 and the SOC may be implemented by a processor 20 located on the data processing device 2. The processor 20 may be at least one of an application-specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a CPU, a controller, a microcontroller, and a microprocessor. It is understood that for different data processing devices, the electronic devices used to implement the functions of the processor may also be other electronic devices, which are not specifically limited in this embodiment.

[0075] In the embodiment of the present application, the communication bus 22 is used to realize the connection and communication between the processor 20 and the memory 21; when the processor 20 executes the running program stored in the memory 21, the following data processing method is implemented:

[0076] Upon receiving a first data packet, determining a first data stream corresponding to the first data packet and a first data packet header feature of the first data packet;

[0077] If it is determined that the first data packet is not the first data packet in the first data stream, searching a first packet processing list corresponding to the first data stream from a correspondence between preset data streams and preset packet processing lists; the preset packet processing list in the correspondence between the preset data streams and the preset packet processing lists is determined based on the first data packet in the preset data stream corresponding to the preset packet processing list; the first packet processing list stores a set of data packet header features and a set of packet processing methods, each data packet header feature in the set of data packet header features corresponds to a packet processing method;

[0078] Search the first packet processing list for a first packet processing method corresponding to the first data packet header feature; and perform data packet processing on the first data packet based on the first packet processing method.

[0079] Optionally, the processor 20 is further used to determine the first traffic type corresponding to the first data stream based on the first data packet header characteristics if it is determined that the first data packet is the first data packet in the first data stream, and search the first packet processing list corresponding to the first traffic type from the correspondence between the preset traffic type and the preset packet processing list; add the correspondence between the first data stream and the first packet processing list to the correspondence between the preset data stream and the preset packet processing list; and search the first packet processing method corresponding to the first data packet header characteristics from the first packet processing list to perform packet processing on the first data packet based on the first packet processing method.

[0080] Optionally, the processor 20 is also used to obtain a preset traffic type, a set of data packet header features and a set of packet processing methods corresponding to each preset traffic type; generate a preset packet processing list based on the set of data packet header features and a set of packet processing methods corresponding to each preset traffic type; and generate a correspondence between the preset traffic type and the preset packet processing list based on the preset traffic type and the preset packet processing list.

[0081] An embodiment of the present application provides a storage medium on which a computer program is stored. The computer-readable storage medium stores one or more programs. The one or more programs can be executed by one or more processors and applied to a data processing device. The computer program implements the data processing method as described above.

[0082] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0083] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the relevant technology, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling an image display device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the data processing method described in each embodiment of the present disclosure.

[0084] The above description is merely a preferred embodiment of the present application and is not intended to limit the scope of protection of the present application.

Claims

1. A data processing method, characterized in that: The method comprises: Upon receiving a first data packet, determining a first data stream corresponding to the first data packet and a first data packet header feature of the first data packet; If it is determined that the first data packet is not the first data packet in the first data stream, searching a first packet processing list corresponding to the first data stream from a correspondence between preset data streams and preset packet processing lists; the preset packet processing list in the correspondence between the preset data streams and the preset packet processing lists is determined based on the first data packet in the preset data stream corresponding to the preset packet processing list; the first packet processing list stores a set of data packet header features and a set of packet processing methods, each data packet header feature in the set of data packet header features corresponds to a packet processing method; If it is determined that the first data packet is the first data packet in the first data stream, determining the first traffic type corresponding to the first data stream according to the first data packet header feature, and searching the first packet processing list corresponding to the first traffic type from the correspondence between the preset traffic type and the preset packet processing list; adding the correspondence between the first data stream and the first packet processing list to the correspondence between the preset data stream and the preset packet processing list; Search the first packet processing list for a first packet processing method corresponding to the first data packet header feature; and perform data packet processing on the first data packet based on the first packet processing method.

2. The method according to claim 1, characterized in that Before searching the first packet processing list corresponding to the first traffic type from the correspondence between the preset traffic type and the preset packet processing list, the method further includes: Obtaining preset traffic types, a set of data packet header features corresponding to each preset traffic type, and a set of packet processing methods; Generate a preset packet processing list according to a set of data packet header features and a set of packet processing methods corresponding to each preset traffic type; According to the preset traffic type and the preset packet processing list, a correspondence between the preset traffic type and the preset packet processing list is generated.

3. A data processing device, characterized in that: The device comprises: Field Programmable Gate Array (FPGA) and System-on-Chip (SOC); the FPGA includes a correspondence between preset data streams and preset packet processing lists; The FPGA is configured to, upon receiving a first data packet, determine a first data stream and a first data packet header feature corresponding to the first data packet; if it is determined that the first data packet is not the first data packet in the first data stream, search the first packet processing list corresponding to the first data stream from the correspondence between the preset data stream and the preset packet processing list; the preset packet processing list in the correspondence between the preset data stream and the preset packet processing list is determined based on the first data packet in the preset data stream corresponding to the preset packet processing list; the first packet processing list stores a group of data packet header features and a group of packet processing modes, each data packet header feature in the group of data packet header features corresponding to a packet processing mode; search the first packet processing mode corresponding to the first data packet header feature from the first packet processing list; and perform data packet processing on the first data packet based on the first packet processing mode; The FPGA is further configured to send the first data packet to the SOC if it is determined that the first data packet is the first data packet in the first data stream; The SOC is configured to parse the first data packet to obtain a first data packet header feature of the first data packet; determine a first traffic type corresponding to the first data flow based on the first data packet header feature, and search the first packet processing list corresponding to the first traffic type from a correspondence between preset traffic types and preset packet processing lists; search the first packet processing method corresponding to the first data packet header feature from the first packet processing list, and send the correspondence between the first packet processing method, the first data flow, and the first packet processing list to the FPGA; The FPGA is further configured to add the correspondence between the first data stream and the first packet processing list to the correspondence between the preset data stream and the preset packet processing list, and perform packet processing on the first data packet based on the first packet processing method.

4. The device according to claim 3, characterized in that The SOC is further configured to obtain a preset traffic type, a set of data packet header features corresponding to each preset traffic type, and a set of packet processing methods; and generate a preset packet processing list based on the set of data packet header features and the set of packet processing methods corresponding to each preset traffic type; According to the preset traffic type and the preset packet processing list, a correspondence between the preset traffic type and the preset packet processing list is generated.

5. The device according to claim 3, characterized in that The SOC includes a data plane development kit DPDK; the FPGA is further used to send the first data packet to the SOC based on the DPDK; the SOC is further used to send the correspondence between the first packet processing mode, the first data flow and the first packet processing list to the FPGA based on the DPDK.

6. A data processing device, characterized in that: The device includes: a processor, a memory and a communication bus; when the processor executes the running program stored in the memory, the method according to claim 1 or 2 is implemented.

7. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to claim 1 or 2 is implemented.

Citation Information

Patent Citations

  • Data sending method, device and system based on software defined network

    CN109729022A

  • Data processing method, device and equipment and storage medium

    CN112653691A