FPGA-based integrated computing and network data traffic forwarding method and device

By integrating FPGA chips in network equipment to handle flow control and forwarding in a unified manner, the complexity and security issues caused by the separation of flow control and forwarding in the existing technology are solved, and efficient and flexible data flow management is achieved.

CN118400323BActive Publication Date: 2024-09-27HANGZHOU DPTECH TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410852564.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-27
Publication Date
2024-09-27
Estimated Expiration
2044-06-27

AI Technical Summary

Technical Problem

Existing network equipment has an architecture in which traffic control processing and traffic forwarding are separated, resulting in problems of high complexity, high cost and low security.

Method used

Adopting the computing and network integrated data traffic forwarding method based on FPGA chips, by receiving data traffic, analyzing and determining the traffic control strategy and traffic forwarding strategy, the unified processing of traffic control and forwarding is realized, including traffic filtering, load balancing, bandwidth limitation, network Address translation and other functions.

Benefits of technology

It achieves an integrated computing and network architecture that integrates efficient and reliable traffic control and traffic forwarding, reducing complexity and cost, and improving security and flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118400323B
    Figure CN118400323B
Patent Text Reader

Abstract

The present application provides a method and device for forwarding data traffic based on FPGA for integrated computing and network. According to an example, the method includes: receiving data traffic sent by at least one external device; parsing the data traffic, and determining a traffic control strategy and a traffic forwarding strategy corresponding to the data traffic; wherein the traffic control strategy includes a strategy for managing and regulating the data traffic; the traffic forwarding strategy includes a strategy for performing network address translation on the data traffic; performing traffic control processing on the data traffic according to the traffic control strategy; performing traffic forwarding processing on the data traffic according to the traffic forwarding strategy; and sending the data traffic that has undergone the traffic control processing and the traffic forwarding processing to at least one external device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method and device for forwarding data traffic in an integrated computing and network based on FPGA. Background Art

[0002] Computing and Network Convergence is a technology and architectural concept that deeply integrates computing resources and network resources. It aims to enable computing resources (such as servers, storage devices, etc.) and network resources (such as bandwidth, routers, switches, etc.) to work together through unified management and scheduling, thereby improving resource utilization efficiency and service quality.

[0003] When network devices forward data traffic, they usually need to perform traffic control processing on the received traffic, such as traffic filtering, load balancing, etc. Traffic control processing usually requires the use of computing resources and is completed by a separate security protection device or a separate CPU; forwarding traffic usually requires the use of network resources and is usually completed by other network devices, such as switches, routers, etc.

[0004] In the existing network equipment or the architecture of multiple network equipment networking, separating traffic control processing and traffic forwarding, that is, separating computing resources from network resources, means that these two parts need to be managed and maintained separately, resulting in higher complexity and cost. For example, it may be necessary to monitor and configure computing resources and network resources separately to ensure coordination and interoperability between them. At the same time, in the architecture that separates traffic control processing and traffic forwarding, the interface between traffic control processing and traffic forwarding processing may also become the target of security attacks, resulting in lower security. Summary of the invention

[0005] The present application provides a method for forwarding data traffic in an integrated computing and networking system based on FPGA, which is applied to a network device equipped with an FPGA chip. The method includes:

[0006] receiving data traffic sent by at least one external device;

[0007] Parsing the data traffic to determine a traffic control strategy and a traffic forwarding strategy corresponding to the data traffic; wherein the traffic control strategy includes a strategy for managing and regulating the data traffic; and the traffic forwarding strategy includes a strategy for performing network address translation on the data traffic;

[0008] According to the flow control strategy, flow control processing is performed on the data flow;

[0009] According to the traffic forwarding strategy, traffic forwarding processing is performed on the data traffic;

[0010] The data traffic that has undergone the traffic control processing and the traffic forwarding processing is sent to at least one external device.

[0011] Optionally, the flow control strategy includes at least one or more of the following:

[0012] Performing traffic filtering on the data traffic to filter out malicious traffic containing attack behaviors in the data traffic;

[0013] Based on a preset scheduling algorithm, the data traffic is distributed to a plurality of processing units connected to the FPGA chip;

[0014] Based on the preset bandwidth limitation parameters, the transmission rate of the data traffic is limited.

[0015] Optionally, the traffic forwarding strategy includes at least one or more of the following:

[0016] Querying a routing table or a forwarding table built into the FPGA chip to determine a forwarding address of a data packet in the data flow;

[0017] Based on the address mapping table built into the FPGA chip, NAT conversion is performed on the data packets in the data flow, and the private IP addresses contained in the data packets in the data flow are replaced with public IP addresses;

[0018] The protocol type of the application layer protocol used by the data packet in the data flow is obtained, and corresponding ALG conversion is performed based on the protocol type.

[0019] Optionally, determining a flow control strategy corresponding to the data flow includes at least one or more of the following:

[0020] Obtaining a device type of a network device equipped with the FPGA chip, and determining a flow control strategy based on the device type;

[0021] Obtain the device type of the front device and the device type of the rear device of the network device equipped with the FPGA chip in the network, determine the position of the network device equipped with the FPGA chip in the network, and determine the flow control strategy based on the position of the device equipped with the FPGA chip in the network;

[0022] The flow characteristics of the data flow are obtained, and a flow control strategy corresponding to the data flow is determined based on the flow characteristics.

[0023] Optionally, determining a traffic forwarding strategy corresponding to the data traffic includes:

[0024] Obtain traffic characteristics of the data traffic, and determine a traffic forwarding strategy corresponding to the data traffic based on the traffic characteristics.

[0025] Optionally, the FPGA chip includes at least one receiving engine; the receiving of data traffic sent by at least one external device includes:

[0026] The data traffic sent by the at least one external device is received through the at least one receiving engine, and the received data traffic is aggregated.

[0027] Optionally, the FPGA chip further includes at least one sending engine; the sending of the data traffic that has undergone the traffic control processing and the traffic forwarding processing to at least one external device includes:

[0028] The data traffic that has undergone the traffic control processing and the traffic forwarding processing is respectively sent to the at least one sending engine, so that the at least one sending engine forwards the data traffic to a corresponding external device.

[0029] The present application also provides a method and device for forwarding data traffic in an integrated computing and networking manner based on FPGA, which is applied to a network device equipped with an FPGA chip, and the device comprises:

[0030] A traffic receiving unit, configured to receive data traffic sent by at least one external device;

[0031] A policy determination unit, configured to parse the data traffic to determine a traffic control policy and a traffic forwarding policy corresponding to the data traffic; wherein the traffic control policy includes a policy for managing and regulating the data traffic; and the traffic forwarding policy includes a policy for performing network address translation on the data traffic;

[0032] A control processing unit, configured to perform flow control processing on the data flow according to the flow control strategy;

[0033] A forwarding processing unit, configured to perform traffic forwarding processing on the data traffic according to the traffic forwarding strategy, and forward the data traffic that has undergone traffic control processing and traffic forwarding processing;

[0034] A traffic forwarding unit is used to send the data traffic that has undergone the traffic control processing and the traffic forwarding processing to at least one external device.

[0035] The present application also provides an electronic device, comprising a communication interface, a processor, a memory and a bus, wherein the communication interface, the processor and the memory are interconnected via the bus;

[0036] The memory stores machine-readable instructions, and the processor executes the above method by calling the machine-readable instructions.

[0037] The present application also provides a computer-readable storage medium, which stores machine-readable instructions. When the machine-readable instructions are called and executed by a processor, the above method is implemented.

[0038] In the scheme recorded in the above embodiments, FPGA integrates the flow control processing and flow forwarding processing functions, thereby realizing an integrated computing and network architecture that integrates efficient and reliable flow control and flow forwarding. By utilizing the programmability and high-performance processing capabilities of FPGA, more flexible flow control processing and flow forwarding processing are realized. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 It is a flowchart of a data traffic forwarding method based on an FPGA chip provided by an exemplary embodiment.

[0040] Figure 2 It is a schematic diagram of the application flow of a data traffic forwarding method based on an FPGA chip provided by an exemplary embodiment.

[0041] Figure 3 This is a diagram of the internal architecture of an FPGA chip provided by an exemplary embodiment.

[0042] Figure 4 It is a hardware structure diagram of an electronic device in which a data traffic forwarding method device based on an FPGA chip is located, provided by an exemplary embodiment.

[0043] Figure 5 It is a block diagram of a data traffic forwarding method and device based on an FPGA chip provided by an exemplary embodiment. DETAILED DESCRIPTION

[0044] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0045] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.

[0046] The existing end-to-end autonomous driving models at this stage lack an interface for human intervention in the driving path planned by the autonomous driving model, so that the driving path planned by the autonomous driving system can only conform to the perception results, that is, the planned driving path will not cause collisions, but cannot meet the driver's driving requirements. In addition, the driving paths planned and output by these models are relatively simple and cannot complete some complex instructions input by the driver, such as overtaking, U-turn, etc.

[0047] In view of this, the present application proposes a technical solution that combines the instructions input by the driver with the driving path planned by the automatic driving system.

[0048] See also Figure 1 , Figure 1 This is a flow chart of a data traffic forwarding method based on an FPGA chip provided by an exemplary embodiment. The method may include the following steps:

[0049] Step 102: Receive data traffic sent by at least one external device.

[0050] In this specification, FPGA chip (Field-Programmable Gate Array) is a semi-customized integrated circuit that allows users to program and reconfigure it according to their own design requirements to achieve customized digital logic circuit functions. Compared with traditional ASIC (application-specific integrated circuit), the biggest feature of FPGA chip is flexibility and reprogrammability. Designers can modify the circuit logic without changing the hardware entity, so FPGA chips can be used to efficiently implement traffic control and traffic forwarding.

[0051] In this specification, the network device can be equipped with an FPGA chip, and the FPGA chip can be used to implement traffic control and traffic forwarding.

[0052] Among them, the specific way in which the network device equipped with the FPGA chip receives the data traffic sent by the external device is not specifically limited in this specification.

[0053] For example, an FPGA chip typically has multiple input / output pins for receiving and sending data, and the outside world can input data traffic into the FPGA chip through these pins.

[0054] FPGA chips usually also support some serial communication protocols, such as UART, SPI, I2C, etc. External devices can transmit data traffic to FPGA chips through these interfaces.

[0055] In addition, FPGA chips can also have high-speed interfaces, such as Ethernet interfaces, PCIe interfaces, etc. External devices can transmit large data traffic to FPGA chips through these interfaces.

[0056] In actual applications, the specific interface selection will depend on the type of external device, communication requirements, and data traffic characteristics. FPGA chips can usually provide flexible interface options to meet the needs of various application scenarios.

[0057] Step 104, parse the data traffic to determine the traffic control strategy and traffic forwarding strategy corresponding to the data traffic; wherein the traffic control strategy includes a strategy for managing and regulating the data traffic; the traffic forwarding strategy includes a strategy for performing network address translation on the data traffic.

[0058] In this specification, the FPGA chip can parse the received data flow according to a specific protocol and obtain the flow characteristics of the flow. For example, for Ethernet data packets, the FPGA chip can parse the Ethernet header, IP header and transport layer header to extract key information such as source address, destination address, port number, etc.

[0059] By parsing the packet header information, the FPGA chip can identify different data flows, including packets from different source IP addresses or destined for different destination IP addresses, and further determine the characteristics of the data flow based on this information and classify the data flow.

[0060] FPGA chips can usually have multiple built-in flow control strategies and flow forwarding strategies. Among them, the flow control strategy can specifically refer to a method of managing and regulating data traffic. For example, the data traffic is cleaned and filtered to distinguish normal traffic from malicious traffic containing attack behaviors, and prevent malicious traffic from entering. For another example, the FPGA chip can distribute the data traffic to different target servers or processing units according to the preset scheduling algorithm based on the size of the received traffic and the load of the docked equipment. For another example, the FPGA chip can also design corresponding control logic to limit the transmission rate of data traffic according to the pre-set bandwidth limitation parameters.

[0061] The traffic forwarding strategy is specifically a method of performing network address translation for the data traffic in the network device to determine the transmission path of the data packet in the data traffic. For example, the FPGA chip can determine the next hop address of the data packet in the data traffic through a routing table or a forwarding table. For another example, the FPGA chip can perform NAT conversion through a built-in address mapping table to replace the source IP address in the data packet in the data traffic with a public IP address. For another example, the FPGA chip can determine the protocol type of the application layer protocol of the data packet in the data traffic, and perform ALG conversion based on the protocol type. For example, for protocols such as FTP and SIP that have multi-channel communication requirements, ALG can identify and adapt to the specific requirements of these protocols, such as port mapping or conversion of address information in messages.

[0062] Among them, determining the flow control strategy corresponding to the data flow is not specifically limited in this specification.

[0063] For example, the flow control strategy corresponding to the data flow can be determined according to the device type of the device equipped with the FPGA chip. For example, if the device type of the device equipped with the FPGA chip is a security protection device, then the corresponding flow control strategy can be to clean and filter the data flow. For another example, if the device type of the device equipped with the FPGA chip is a load balancing device, then the corresponding flow control strategy can be to load balance the data flow and distribute the data flow to different target servers or processing units.

[0064] For another example, the flow control strategy corresponding to the data traffic can be determined according to the specific location of the device equipped with the FPGA chip in the network. For example, if the device equipped with the FPGA chip is located at the edge of the network, and mainly restricts and manages the inlet traffic, then the corresponding flow control strategy can be to limit the transmission rate of the data traffic; for another example, if the device equipped with the FPGA chip is located at the middle node of the network, then the corresponding flow control strategy can be to clean and filter the data traffic, or to load balance the data traffic, etc.

[0065] For another example, it is possible to determine whether flow control is required and the corresponding flow control strategy based on the analyzed flow characteristics. For example, the size of the data flow can be obtained, and when the data flow exceeds a preset threshold, load balancing can be performed on the data flow. For another example, it is possible to determine whether the data flow contains flow characteristics that may indicate attack behavior, and if so, clean and filter the data flow.

[0066] Determine the traffic forwarding strategy corresponding to the data traffic, which is not specifically limited in this specification. For example, if the protocol used by the data traffic has a specific mechanism, such as FTP, SIP, RTSP, HTTP, etc., port negotiation, command channel establishment and data channel opening are required, NAT conversion and ALG conversion may be required. For another example, the behavior of the data traffic can be analyzed to see whether there are interactions unique to the application layer protocol, such as SIP media negotiation, FTP PORT command, etc. These interactions usually require ALG conversion to correctly parse and modify the data packet. For another example, the address mapping table can be queried to determine whether NAT conversion is required, or the routing table can be directly queried to determine the next hop address of the data packet in the data traffic.

[0067] Step 106: Perform flow control processing on the data flow according to the flow control strategy.

[0068] After determining the flow control strategy corresponding to the data flow, flow control processing can be performed on the data flow according to the flow control strategy, so as to manage and regulate the data flow.

[0069] For example, if the traffic control strategy is to clean and filter data traffic, then normal traffic and malicious traffic containing attack behaviors in the data traffic can be determined, and the malicious traffic can be filtered.

[0070] In actual applications, FPGA chips can use predefined rules or features to identify normal traffic and malicious traffic. These features may include traffic size, frequency, protocol type, source / destination IP address, port number, etc. By comparing real-time traffic with known rules or features, FPGA chips can accurately determine which traffic is considered malicious.

[0071] In addition, FPGA chips can also detect malicious traffic by analyzing the behavior patterns of traffic. For example, abnormal data transmission rates, abnormal connection patterns, abnormal data packet sizes, etc. may indicate attack behaviors. By monitoring these behavior patterns, FPGA chips can detect potential malicious traffic.

[0072] FPGA chips can also perform in-depth inspections on data packets, including checking the content and header information of the data packets, so as to further detect malicious code or attack payloads hidden in the data packets.

[0073] When malicious traffic is detected, the FPGA chip can block the traffic, record logs, and trigger alarm notifications.

[0074] For another example, if the flow control strategy is to perform load balancing on the data flow, the data flow can be distributed to different processing units connected to the FPGA chip based on a preset scheduling algorithm.

[0075] The preset scheduling algorithm is not specifically limited in this specification, and may be, for example, a hash algorithm, a minimum connection algorithm, a polling algorithm, and the like.

[0076] In practical applications, FPGA chips can use static hash algorithms to distribute data traffic to different processing units according to predefined rules.

[0077] FPGA chips can also use the minimum connection algorithm to make dynamic adjustments based on real-time load conditions and system performance to maximize the use of system resources.

[0078] In the case of multiple processing units, the FPGA chip can use a polling algorithm to distribute data streams to different processing units in turn to achieve load balancing and fair resource utilization.

[0079] For another example, if the flow control strategy is to limit the bandwidth for data flow, the transmission rate of the data flow can be limited based on a preset bandwidth limitation parameter.

[0080] In practical applications, FPGA chips can use hardware limiters to directly control the transmission rate of data traffic. The hardware limiter can limit the data flow rate in real time according to the preset bandwidth limit parameters to ensure that it does not exceed the set bandwidth limit.

[0081] FPGA chips can also limit the transmission rate of data streams through intelligent buffer management. By adding a buffer of appropriate size on the data transmission path and controlling the filling and release of the buffer according to the bandwidth limit parameters, the data flow transmission rate can be limited.

[0082] In addition, FPGA chips can also use traffic scheduling algorithms to dynamically adjust the transmission rate of data streams according to bandwidth limitation parameters. For example, dynamic scheduling can be used to control the interval between data packets sent or adjust the order in which data packets are processed to achieve the effect of bandwidth limitation.

[0083] Step 108: Perform traffic forwarding processing on the data traffic according to the traffic forwarding strategy, and forward the data traffic that has undergone traffic control processing and traffic forwarding processing.

[0084] After determining the traffic forwarding strategy corresponding to the data traffic, traffic forwarding processing can be performed on the data flow according to the traffic control strategy, thereby performing network address translation on the data traffic and determining the transmission path of the data packets in the data traffic.

[0085] For example, when the traffic forwarding strategy is routing management, the built-in routing table or forwarding table of the FPGA chip can be queried to determine the forwarding address of the data packet in the data traffic.

[0086] In practical applications, routing tables or forwarding tables can be stored in FPGA chips. Through routing tables or forwarding tables, FPGA chips can map the destination address of each data packet in the data flow to the output port or next hop address. When the data packet arrives at the FPGA chip, the FPGA chip parses the header information of the data packet and obtains the destination IP address. The FPGA chip can then use the destination IP address as a query key to retrieve the entry related to the address in the routing table or forwarding table. Once the corresponding hungry match is found, the FPGA chip extracts the corresponding forwarding address or next hop information from the routing table or forwarding table.

[0087] For another example, when the traffic forwarding strategy is NAT conversion, NAT conversion can be performed on the data packets in the data traffic based on the address mapping table built into the FPGA chip, and the private IP addresses contained in the data packets in the data traffic can be replaced with public IP addresses.

[0088] In actual applications, the FPGA chip is pre-configured with an address mapping table to map private IP addresses to corresponding public IP addresses. The mapping relationship in the address mapping table is usually pre-configured by the network administrator and stored in the memory in the FPGA chip. When a data packet arrives at the FPGA chip, the FPGA chip parses the header information of the data packet to obtain the source IP address and the destination IP address. If the source IP address or the destination IP address is a private IP address and there is a corresponding mapping in the address mapping table, the FPGA chip will replace the source IP address or the destination IP address with the mapped public IP address.

[0089] For another example, when the traffic forwarding strategy is ALG conversion, the protocol type of the application layer protocol used by the data packets in the data traffic may be obtained, and based on the protocol type, an ALG conversion corresponding to the protocol type may be performed.

[0090] In actual applications, the FPGA chip will parse the header information of the data packet, including the source and destination IP addresses, transport layer ports, and application layer protocol types. Based on the application layer protocol type in the data packet, the FPGA chip can determine the type of ALG conversion to be performed. For example, for FTP (File Transfer Protocol), it may be necessary to modify the IP address and port information in the data packet.

[0091] Step 110: Send the data traffic that has undergone the traffic control processing and the traffic forwarding processing to at least one external device.

[0092] The FPGA chip can send the data traffic that has undergone the traffic control processing and the traffic forwarding processing to at least one external device connected to the FPGA chip, thereby completing the entire data traffic forwarding process.

[0093] See also Figure 2 , Figure 2 The present invention is a schematic diagram of an application flow of a data traffic forwarding method based on an FPGA chip, which is shown as an exemplary embodiment.

[0094] Step 202: Receive data traffic sent by at least one external device.

[0095] An FPGA chip usually has multiple input / output pins for receiving and sending data. Through the input / output pins, the FPGA chip can receive data traffic sent by at least one external device.

[0096] FPGA chips usually also support some serial communication protocols, such as UART, SPI, I2C, etc. Through the interfaces corresponding to these protocols, the FPGA chip can receive data traffic sent by at least one external device.

[0097] In addition, the FPGA chip may also have a high-speed interface, such as an Ethernet interface, a PCIe interface, etc. Through these high-speed interfaces, the FPGA chip can receive data traffic sent by at least one external device.

[0098] Step 204: parse the data traffic, determine a traffic control strategy and a traffic forwarding strategy corresponding to the data traffic, and issue the traffic control strategy and the traffic forwarding strategy.

[0099] The FPGA chip can parse data traffic, obtain the traffic characteristics of the data traffic, and the device information of the device equipped with the FPGA chip to determine the traffic control strategy and traffic forwarding strategy corresponding to the data traffic.

[0100] The FPGA chip can determine the flow control strategy corresponding to the data flow according to the device type of the device equipped with the FPGA chip. The FPGA chip can also determine the flow control strategy corresponding to the data flow according to the specific location of the device network where the device equipped with the FPGA chip is located. The FPGA chip can also determine whether flow control is required and the corresponding flow control strategy based on the analyzed flow characteristics.

[0101] At the same time, the FPGA chip can determine whether network address translation is required based on the analyzed traffic characteristics, thereby determining a traffic forwarding strategy corresponding to the data traffic.

[0102] Step 206: Perform flow control processing on the data flow.

[0103] Traffic control strategies can specifically include attack protection, load balancing, and bandwidth limiting.

[0104] Among them, attack protection specifically refers to the FPGA chip performing traffic filtering on the data traffic, determining normal traffic in the data traffic and malicious traffic containing attack behavior, and filtering the malicious traffic.

[0105] Load balancing specifically refers to the FPGA chip distributing the data traffic to different processing units connected to the FPGA chip based on a preset scheduling algorithm.

[0106] Bandwidth speed limiting specifically refers to limiting the transmission rate of the data traffic by the FPGA chip based on preset bandwidth limiting parameters.

[0107] Step 208: Perform traffic forwarding processing on the data traffic.

[0108] Traffic forwarding strategies may specifically include routing management, NAT conversion, and ALG conversion.

[0109] The routing management is specifically that the FPGA chip queries a built-in routing table or a forwarding table to determine the forwarding address of the data packet in the data flow.

[0110] The NAT conversion is specifically performed by the FPGA chip based on the address mapping table built into the FPGA chip, for the data packets in the data flow, and the private IP addresses contained in the data packets in the data flow are replaced with public IP addresses.

[0111] The ALG conversion specifically refers to the FPGA chip obtaining the protocol type of the application layer protocol used by the data packet in the data flow, and performing ALG conversion corresponding to the protocol type based on the protocol type.

[0112] Step 210: Send the data traffic that has undergone the traffic control processing and the traffic forwarding processing to at least one external device.

[0113] Finally, the FPGA chip can send the data traffic that has undergone the traffic control processing and the traffic forwarding processing to at least one external device connected to the FPGA chip, thereby completing the entire data traffic forwarding process.

[0114] In one embodiment, the FPGA chip includes at least one receiving engine; each receiving engine corresponds to an input interface, and each input interface is connected to an external device. These interfaces can be physical interfaces, such as Ethernet ports, or virtual interfaces, such as logical channels. The main task of the receiving engine is to read data packets from these interfaces and pass them to the next step of processing.

[0115] At the same time, the FPGA chip also includes at least one sending engine; the sending engine is similar to the receiving engine, and the sending engine corresponds to an output interface, and each output interface is also connected to an external device. The main task of the sending engine is to forward the data packets that have undergone flow control processing and flow forwarding processing from these interfaces to the external device.

[0116] See also Figure 3 , Figure 3 This is a diagram showing the internal architecture of an FPGA chip as an exemplary embodiment.

[0117] like Figure 3 As shown, Figure 3 , n receiving engines and n sending engines are shown. Each receiving engine corresponds to an input interface, and each input interface is connected to an external device. Each sending engine corresponds to an output interface, and each output interface is connected to an external device.

[0118] The FPGA chip can receive the data traffic sent by at least one external device respectively through the at least one receiving engine, and aggregate the data traffic sent by the at least one external device.

[0119] For the aggregated data traffic, the FPGA chip can perform traffic control processing and traffic forwarding processing separately, and can further send the data traffic that has undergone traffic control processing and traffic forwarding processing to the at least one sending engine respectively, so that the sending engine can forward it to the corresponding external device.

[0120] In the scheme recorded in the above embodiments, the FPGA chip integrates the flow control processing and flow forwarding processing functions, thereby realizing an efficient and reliable flow control and flow forwarding integrated architecture, and utilizing the programmability and high-performance processing capabilities of the FPGA chip to achieve more flexible flow control processing and flow forwarding processing.

[0121] See also Figure 4 , Figure 4 It is a hardware structure diagram of an electronic device in which a data traffic forwarding method device based on an FPGA chip is located, which is shown as an exemplary embodiment. At the hardware level, the device includes a processor 402, an internal bus 404, a network interface 406, a memory 408, and a non-volatile memory 410, and of course may also include hardware required for other services. One or more embodiments of this specification can be implemented based on software, such as the processor 402 reading the corresponding computer program from the non-volatile memory 410 into the memory 408 and then running it. Of course, in addition to the software implementation, one or more embodiments of this specification do not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0122] See also Figure 5 , Figure 5 The block diagram of a data traffic forwarding method and device based on FPGA is shown in an exemplary embodiment. The data traffic forwarding method and device based on FPGA chip can be applied to Figure 4 In the electronic device shown in the figure, the technical solution of this specification is implemented. Among them, the above-mentioned data traffic forwarding method device based on FPGA chip may include:

[0123] The traffic receiving unit 502 is used to receive data traffic sent by at least one external device;

[0124] A policy determination unit 504 is used to parse the data traffic to determine a traffic control policy and a traffic forwarding policy corresponding to the data traffic; wherein the traffic control policy includes a policy for managing and regulating the data traffic; and the traffic forwarding policy includes a policy for performing network address translation on the data traffic;

[0125] A control processing unit 506, configured to perform flow control processing on the data flow according to the flow control strategy;

[0126] A forwarding processing unit 508, configured to perform traffic forwarding processing on the data traffic according to the traffic forwarding strategy;

[0127] The traffic forwarding unit 510 is used to send the data traffic that has undergone the traffic control processing and the traffic forwarding processing to at least one external device.

[0128] In this embodiment, the flow control strategy includes at least one or more of the following:

[0129] Performing traffic filtering on the data traffic to filter out malicious traffic containing attack behaviors in the data traffic;

[0130] Based on a preset scheduling algorithm, the data traffic is distributed to a plurality of processing units connected to the FPGA chip;

[0131] Based on the preset bandwidth limitation parameters, the transmission rate of the data traffic is limited.

[0132] In this embodiment, the traffic forwarding strategy includes at least one or more of the following:

[0133] Querying a routing table or a forwarding table built into the FPGA chip to determine a forwarding address of a data packet in the data flow;

[0134] Based on the address mapping table built into the FPGA chip, NAT conversion is performed on the data packets in the data flow, and the private IP addresses contained in the data packets in the data flow are replaced with public IP addresses;

[0135] The protocol type of the application layer protocol used by the data packet in the data flow is obtained, and corresponding ALG conversion is performed based on the protocol type.

[0136] In this embodiment, determining the flow control strategy corresponding to the data flow includes at least one or more of the following:

[0137] Obtaining a device type of a network device equipped with the FPGA chip, and determining a flow control strategy based on the device type;

[0138] Obtain the device type of the front device and the device type of the rear device of the network device equipped with the FPGA chip in the network, determine the position of the network device equipped with the FPGA chip in the network, and determine the flow control strategy based on the position of the device equipped with the FPGA chip in the network;

[0139] The flow characteristics of the data flow are obtained, and a flow control strategy corresponding to the data flow is determined based on the flow characteristics.

[0140] In this embodiment, determining a traffic forwarding strategy corresponding to the data traffic includes:

[0141] Obtain traffic characteristics of the data traffic, and determine a traffic forwarding strategy corresponding to the data traffic based on the traffic characteristics.

[0142] In this embodiment, the FPGA chip includes at least one receiving engine; the receiving of data traffic sent by at least one external device includes:

[0143] The data traffic sent by the at least one external device is received through the at least one receiving engine, and the received data traffic is aggregated.

[0144] In this embodiment, the FPGA chip further includes at least one sending engine; the sending of the data traffic that has undergone the traffic control processing and the traffic forwarding processing to at least one external device includes:

[0145] The data traffic that has undergone the traffic control processing and the traffic forwarding processing is respectively sent to the at least one sending engine, so that the at least one sending engine forwards the data traffic to a corresponding external device.

[0146] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.

[0147] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this specification. Ordinary technicians in this field can understand and implement it without paying creative work.

[0148] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this manual are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0149] This specification also provides an embodiment of a computer-readable storage medium. The computer-readable storage medium stores machine-readable instructions, and when the machine-readable instructions are called and executed by a processor, the data traffic forwarding method based on an FPGA chip provided in any embodiment of this specification can be implemented.

[0150] The computer-readable storage medium provided in the embodiments of this specification may specifically include, but is not limited to, any type of disk (including floppy disk, hard disk, optical disk, CD-ROM, and magneto-optical disk), ROM (Read-Only Memory), RAM (Random Access Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory, magnetic card or optical fiber card. That is, the readable storage medium includes a readable medium that can store or transmit information.

[0151] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.

[0152] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0153] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0154] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined in this article, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0155] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0156] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0157] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "one", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0158] It should be understood that although the terms first, second, third, etc. may be used to describe various information in one or more embodiments of this specification, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0159] The above description is merely a preferred embodiment of one or more embodiments of the present specification and is not intended to limit one or more embodiments of the present specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present specification shall be included in the scope of protection of one or more embodiments of the present specification.

Claims

1. A method for forwarding data traffic in an integrated computing and network based on FPGA, which is applied to a network device equipped with an FPGA chip, wherein the FPGA chip is used to implement traffic control and traffic forwarding, and the FPGA chip has multiple built-in traffic control strategies and multiple traffic forwarding strategies, and the method comprises: receiving data traffic sent by at least one external device; Parsing the data traffic to determine a traffic control strategy and a traffic forwarding strategy corresponding to the data traffic; wherein the traffic control strategy includes a strategy for managing and regulating the data traffic; and the traffic forwarding strategy includes a strategy for performing network address translation on the data traffic; According to the flow control strategy, flow control processing is performed on the data flow; According to the traffic forwarding strategy, traffic forwarding processing is performed on the data traffic; Sending the data traffic that has undergone the traffic control processing and the traffic forwarding processing to at least one external device; The flow control strategy includes at least one or more of the following: Performing traffic filtering on the data traffic to filter out malicious traffic containing attack behaviors in the data traffic; Based on a preset scheduling algorithm, the data traffic is distributed to a plurality of processing units connected to the FPGA chip; Based on preset bandwidth limitation parameters, limiting the transmission rate of the data traffic; The method of allocating the data traffic to a plurality of processing units connected to the FPGA chip based on a preset scheduling algorithm includes: Based on the size of the data traffic and the load of the connected external device, the data traffic is distributed to different target servers or processing units according to the preset scheduling algorithm.

2. According to the method of claim 1, the traffic forwarding strategy includes at least one or more of the following: Querying a routing table or a forwarding table built into the FPGA chip to determine a forwarding address of a data packet in the data flow; Based on the address mapping table built into the FPGA chip, NAT conversion is performed on the data packets in the data flow, and the private IP addresses contained in the data packets in the data flow are replaced with public IP addresses; The protocol type of the application layer protocol used by the data packet in the data flow is obtained, and corresponding ALG conversion is performed based on the protocol type.

3. According to the method of claim 1, determining the flow control strategy corresponding to the data flow includes at least one or more of the following: Obtaining a device type of a network device equipped with the FPGA chip, and determining a flow control strategy based on the device type; Obtain the device type of the front device and the device type of the rear device of the network device equipped with the FPGA chip in the network, determine the position of the network device equipped with the FPGA chip in the network, and determine the flow control strategy based on the position of the device equipped with the FPGA chip in the network; The flow characteristics of the data flow are obtained, and a flow control strategy corresponding to the data flow is determined based on the flow characteristics.

4. The method according to claim 1, determining a traffic forwarding strategy corresponding to the data traffic, comprising: Obtain traffic characteristics of the data traffic, and determine a traffic forwarding strategy corresponding to the data traffic based on the traffic characteristics.

5. The method according to claim 1, wherein the FPGA chip comprises at least one receiving engine; wherein receiving data traffic sent by at least one external device comprises: The data traffic sent by the at least one external device is received through the at least one receiving engine, and the received data traffic is aggregated.

6. According to the method of claim 5, the FPGA chip further comprises at least one sending engine; the step of sending the data traffic that has undergone the traffic control processing and the traffic forwarding processing to at least one external device comprises: The data traffic that has undergone the traffic control processing and the traffic forwarding processing is respectively sent to the at least one sending engine, so that the at least one sending engine forwards the data traffic to a corresponding external device.

7. An FPGA-based computing-network integrated data traffic forwarding device, applied to a network device equipped with an FPGA chip, wherein the FPGA chip is used to implement traffic control and traffic forwarding, and the FPGA chip has multiple built-in traffic control strategies and multiple traffic forwarding strategies, and the device comprises: A traffic receiving unit, configured to receive data traffic sent by at least one external device; A policy determination unit, configured to parse the data traffic to determine a traffic control policy and a traffic forwarding policy corresponding to the data traffic; wherein the traffic control policy includes a policy for managing and regulating the data traffic; and the traffic forwarding policy includes a policy for performing network address translation on the data traffic; A control processing unit, configured to perform flow control processing on the data flow according to the flow control strategy; A forwarding processing unit, configured to perform traffic forwarding processing on the data traffic according to the traffic forwarding strategy; A traffic forwarding unit, configured to send the data traffic that has undergone the traffic control processing and the traffic forwarding processing to at least one external device; The flow control strategy includes at least one or more of the following: Performing traffic filtering on the data traffic to filter out malicious traffic containing attack behaviors in the data traffic; Based on a preset scheduling algorithm, the data traffic is distributed to a plurality of processing units connected to the FPGA chip; Based on preset bandwidth limitation parameters, limiting the transmission rate of the data traffic; The method of allocating the data traffic to a plurality of processing units connected to the FPGA chip based on a preset scheduling algorithm includes: Based on the size of the data traffic and the load of the connected external device, the data traffic is distributed to different target servers or processing units according to the preset scheduling algorithm.

8. An electronic device, comprising a communication interface, a processor, a memory and a bus, wherein the communication interface, the processor and the memory are interconnected via the bus; The memory stores machine-readable instructions, and the processor executes the method according to any one of claims 1 to 6 by calling the machine-readable instructions.

9. A computer-readable storage medium storing machine-readable instructions, wherein the machine-readable instructions, when called and executed by a processor, implement the method according to any one of claims 1 to 6.