A data processing method, an electronic device, a storage medium and a program product

CN118677775BActive Publication Date: 2026-10-13TENCENT CLOUD COMPUTING (BEIJING) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310272778.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-20
Publication Date
2026-10-13
Estimated Expiration
2043-03-20

AI Technical Summary

Technical Problem

为了修复流表错误,通常基于内存纠错码(Error-Correcting Code,ECC)进行流表修复;然而,采用内存纠错码所修复的错误通常为单一的单比特反转错误,影响了流表修复能力,进而影响了流表修复的通用性

Benefits of technology

[0030]本申请实施例至少具有以下有益效果:在生成流表时,通过存储流表标识与流表生成信息之间的第一对应关系,使得在响应于流表修复指令对待修复流表进行修复时,能够基于待修复流表的待修复流表标识确定所对应的目标流表生成信息,并基于该目标流表生成信息重新获得修复流表;从而,能够基于该修复流表完成待修复流表的修复;如此,能够修复存在各种错误的待修复流表,从而能够提升流表修复能力,进而能够提升流表修复的通用性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118677775B_ABST
    Figure CN118677775B_ABST
Patent Text Reader

Abstract

The application provides a data processing method, an electronic device, a storage medium and a program product; the data processing method is applied to various data forwarding scenes such as cloud technology, artificial intelligence, intelligent transportation, network communication and vehicle-mounted devices; the data processing method comprises the following steps: in response to a flow table repair instruction, target flow table generation information corresponding to a to-be-repaired flow table identifier is obtained based on a first correspondence relationship between the flow table identifier and the flow table generation information; wherein the first correspondence relationship is data stored when the flow table is generated, the flow table generation information refers to information used for generating the flow table, and the to-be-repaired flow table identifier is used for identifying a to-be-repaired flow table corresponding to the flow table repair instruction; a repaired flow table is generated based on the target flow table generation information; and the to-be-repaired flow table is repaired based on the repaired flow table, wherein the repaired flow table is used for forwarding a target data flow after the repair is completed. Through the application, the universality of flow table repair can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to data processing technology in the field of computer networks, and more particularly to a data processing method, electronic device, storage medium, and program product. Background Technology

[0002] In applications that forward data streams based on flow tables, flow table errors are common. To repair flow table errors, error-correcting codes (ECC) are typically used. However, errors repaired using ECC are usually single-bit inversion errors, which affects the flow table repair capability and, consequently, the versatility of flow table repair. Summary of the Invention

[0003] This application provides a data processing method, electronic device, storage medium, and program product that can improve the versatility of flow table repair.

[0004] The technical solution of this application embodiment is implemented as follows:

[0005] This application provides a data processing method, the method comprising:

[0006] In response to the flow table repair command, based on the first correspondence between the flow table identifier and the flow table generation information, the target flow table generation information corresponding to the flow table identifier to be repaired is obtained;

[0007] Wherein, the first correspondence is the data stored when the flow table is generated, the flow table generation information refers to the information used to generate the flow table, and the flow table identifier to be repaired is used to identify the flow table to be repaired corresponding to the flow table repair instruction;

[0008] Based on the target flow table generation information, a repair flow table is generated;

[0009] Based on the repair flow table, the flow table to be repaired is repaired, wherein the repair flow table is used to forward the target data flow after the repair is completed.

[0010] This application provides a data processing apparatus, the data processing apparatus comprising:

[0011] The information acquisition module is used to respond to the flow table repair instruction and acquire the target flow table generation information corresponding to the flow table identifier to be repaired based on the first correspondence between the flow table identifier and the flow table generation information; wherein, the first correspondence is data stored when the flow table is generated, the flow table generation information refers to the information used to generate the flow table, and the flow table identifier to be repaired is used to identify the flow table to be repaired corresponding to the flow table repair instruction.

[0012] The flow table generation module is used to generate a repaired flow table based on the target flow table generation information;

[0013] The flow table repair module is used to repair the flow table to be repaired based on the repair flow table, wherein the repair flow table is used to forward the target data flow after the repair is completed.

[0014] In this embodiment of the application, the flow table repair module is further configured to obtain the target flow table address corresponding to the flow table identifier to be repaired based on the second correspondence between the flow table identifier and the flow table address; replace the flow table to be repaired in the target flow table address with the repaired flow table; and determine that the repair of the flow table to be repaired is completed when the repaired flow table is successfully replaced.

[0015] In this embodiment of the application, the flow table repair module is further configured to determine the current flow table address based on free address resources when the flow table repair replacement fails; store the repaired flow table in the current flow table address; and determine that the repair of the flow table to be repaired is completed when the repaired flow table is completely stored.

[0016] In this embodiment of the application, the flow table repair module is further configured to set the target flow table address to an unavailable state and delete the flow table to be repaired from the target flow table address when the flow table repair replacement fails.

[0017] In this embodiment of the application, the flow table repair module is further configured to update the second correspondence based on the identifier of the flow table to be repaired and the current flow table address when the repaired flow table is stored, wherein the updated second correspondence is used to determine the flow table address corresponding to the flow table identifier.

[0018] In this embodiment of the application, the data processing device further includes a relationship acquisition module, configured to, in response to a first flow forwarding instruction, perform a first flow table matching based on a first data flow in a first flow table set, wherein the first flow table set refers to the full set of flow tables when responding to the first flow forwarding instruction; when the first flow table matching fails, acquire the flow table generation information of the first data flow; generate the flow table based on the flow table generation information, and acquire the flow table identifier of the generated flow table; and obtain the first correspondence relationship based on the combination of the flow table identifier and the flow table generation information.

[0019] In this embodiment of the application, the flow table repair instruction is triggered by at least one of the following: a second flow forwarding instruction, flow table hit time, and full flow table detection; wherein, the flow table hit time refers to the most recent time when the flow table was successfully matched by the data flow, and the full flow table detection refers to verifying each of the flow tables in the current flow table set.

[0020] In this embodiment, when the flow table repair instruction is triggered by the second flow forwarding instruction, the data processing device further includes a flow table detection module, used to perform second flow table matching based on the second data flow in response to the second flow forwarding instruction, wherein the second flow table set refers to the full set of flow tables when responding to the second flow forwarding instruction; when the second flow table matching is successful, current verification information is generated based on the flow table information length of the matched target flow table, wherein the flow table information length is used to determine the unit verification length of the target flow table; when the current verification information fails to match the original verification information, the target flow table is determined to be the flow table to be repaired, and the flow table repair instruction is generated for the target flow table, wherein the original verification information refers to the original standard information used to verify the target flow table.

[0021] In this embodiment of the application, the flow table detection module is further configured to generate at least two sub-initial flow tables from the flow table generation information corresponding to the second data flow, wherein the target flow table includes at least two sub-initial flow tables; and to perform the following processing on each sub-initial flow table: generating sub-original verification information based on the sub-flow table information length of the sub-initial flow table; and determining at least two sub-original verification information corresponding to at least two sub-initial flow tables as the original verification information.

[0022] In this embodiment of the application, when the flow table repair instruction is triggered by the flow table hit time, the flow table detection module is further configured to: when the first detection time is determined based on the first period, obtain the most recent hit time of each flow table in the third flow table set, wherein the first period refers to the period for detecting flow table hit times, and the third flow table set refers to all flow tables when the first detection time arrives; determine the flow tables whose most recent hit time is earlier than a specified time as flow tables to be verified; when it is determined that the verification of the flow table to be verified has failed, determine the flow table to be verified as the flow table to be repaired, and generate the flow table repair instruction for the flow table to be verified.

[0023] In this embodiment of the application, when the flow table repair instruction is triggered by full flow table detection, the flow table detection module is further configured to perform the following processing on each flow table in the fourth flow table set when the second detection time is determined based on the second period, wherein the fourth flow table set refers to the full flow table when the second detection time arrives; when it is determined that the flow table verification fails, the flow table with the verification failure is identified as the flow table to be repaired, and the flow table repair instruction is generated for the flow table with the verification failure.

[0024] In this embodiment, the information acquisition module is further configured to invoke the flow table offloading engine to perform the following processing: in response to a flow table repair instruction, based on a first correspondence between the flow table identifier and the flow table generation information, obtain target flow table generation information corresponding to the flow table identifier to be repaired, wherein the flow table offloading engine is configured to send the generated flow table to the flow forwarding engine, and the flow forwarding engine is configured to forward data streams based on the flow table sent by the flow table offloading engine; the flow table generation module is further configured to invoke the flow table offloading engine to perform the following processing: based on the target flow table generation information, generate a repair flow table; the flow table repair module is further configured to invoke the flow table offloading engine and the flow forwarding engine to perform the following processing: based on the repair flow table, repair the flow table to be repaired.

[0025] This application provides an electronic device for data processing, the electronic device comprising:

[0026] Memory is used to store executable instructions or computer programs.

[0027] The processor, when executing computer-executable instructions or computer programs stored in the memory, implements the data processing method provided in the embodiments of this application.

[0028] This application provides a computer-readable storage medium storing computer-executable instructions or computer programs, which, when executed by a processor, implement the data processing method provided in this application.

[0029] This application provides a computer program product, including computer-executable instructions or a computer program, which, when executed by a processor, implements the data processing method provided in this application.

[0030] The embodiments of this application have at least the following beneficial effects: When generating a flow table, by storing a first correspondence between the flow table identifier and the flow table generation information, when responding to a flow table repair instruction to repair the flow table to be repaired, the corresponding target flow table generation information can be determined based on the flow table identifier to be repaired of the flow table to be repaired, and the repair flow table can be obtained again based on the target flow table generation information; thus, the repair of the flow table to be repaired can be completed based on the repair flow table; in this way, flow tables to be repaired with various errors can be repaired, thereby improving the flow table repair capability and the versatility of flow table repair. Attached Figure Description

[0031] Figure 1 This is a flowchart of a flow table read / write operation using a sideband memory error correction code.

[0032] Figure 2This is a flowchart of a flow table read / write operation using an inline memory error correction code.

[0033] Figure 3 This is a schematic diagram of the architecture of the data processing system provided in the embodiments of this application;

[0034] Figure 4 This is one of the embodiments provided in this application. Figure 3 A schematic diagram of the server structure in the diagram;

[0035] Figure 5 This is a flowchart illustrating the data processing method provided in the embodiments of this application. Figure 1 ;

[0036] Figure 6 This is a flowchart illustrating the data processing method provided in the embodiments of this application. Figure 2 ;

[0037] Figure 7 This is a flowchart illustrating the data processing method provided in the embodiments of this application. Figure 3 ;

[0038] Figure 8 This is a flowchart illustrating the data processing method provided in the embodiments of this application. Figure 4 ;

[0039] Figure 9 This is a flowchart illustrating the data processing method provided in the embodiments of this application. Figure 5 ;

[0040] Figure 10 This is an exemplary flow table offloading architecture diagram provided in an embodiment of this application;

[0041] Figure 11 This is an exemplary flow table error detection diagram provided in an embodiment of this application;

[0042] Figure 12 This is an exemplary error handling diagram provided in an embodiment of this application;

[0043] Figure 13 This is another exemplary error handling diagram provided in the embodiments of this application. Detailed Implementation

[0044] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0045] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0046] In the following description, the terms “first, second, third, fourth” are used to distinguish similar objects and do not represent a specific ordering of objects. It is understood that “first, second, third, fourth” may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0047] Unless otherwise defined, all technical and scientific terms used in the embodiments of this application have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the embodiments of this application is for the purpose of describing the embodiments of this application only and is not intended to limit this application.

[0048] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.

[0049] 1) Cloud computing refers to a computing model that distributes computing tasks across a resource pool composed of a large number of computers, enabling various application systems to obtain computing power, storage space, and information services as needed. The network providing resources to this resource pool is called the "cloud." From the user's perspective, the resources in the "cloud" are infinitely scalable, readily available, on-demand, expandable, and pay-as-you-go. In this embodiment, the electronic device used for data processing can be a cloud device.

[0050] 2) In response to, used to indicate the conditions or states on which the performed processing depends, when the conditions or states on which it depends are met, one or more operations performed may be performed in real time or may have a set delay; unless otherwise specified, there is no restriction on the order in which the multiple operations are performed.

[0051] 3) A data processing unit (DPU) is a chip used to accelerate network processing and storage services. It typically includes a CPU, a network interface controller (NIC), and a programmable data acceleration engine (e.g., the stream forwarding engine in this embodiment). This data acceleration engine can be, for example, a field-programmable gate array (FPGA) or an application-specific integrated circuit (ASIC). The electronic device used for data processing in this embodiment can be an electronic device including a DPU.

[0052] 4) A stream refers to data that shares common characteristics or attributes and passes through the same network within the same time period; it is also called a data flow. For example, data requested from the same destination address within the same time period constitutes a data flow, as do data sent to the same destination address within the same time period. In this application embodiment, data processing is performed based on data flows. Furthermore, a flow table is a collection of policy entries for data flows; in this application embodiment, the flow table is used to forward data flows.

[0053] 5) Dynamic Random Access Memory (DRAM) is a semiconductor memory that determines whether a binary bit is 1 or 0 based on the amount of charge stored in a capacitor. In the embodiments of this application, DRAM can be used to store flow tables; additionally, DRAM can be a storage device in a DPU.

[0054] 6) Bit reversal refers to the change in the characteristics of electronic components (such as DRAM) caused by factors such as device quality and electromagnetic interference, which causes the switching of the 0 and 1 states of a capacitor; in addition, bit reversal can be a single bit reversal or a multi-bit reversal; in the embodiments of this application, the flow table to be repaired may have a bit reversal problem.

[0055] It's important to note that the software module offloads the flow tables used for data stream forwarding to devices like the DPU. The fast forwarding engine within the DPU then performs flow table matching on the received data stream and captures the data based on the matched flow tables, thereby improving the forwarding speed. This is a hardware-software collaborative process for accelerating data stream forwarding; for example, the data stream forwarding process in the open-source virtual switch OVS (Open Virtual Switch) is a hardware-software collaborative acceleration process. However, in this hardware-software collaborative acceleration process, firstly, the hardware within devices like the DPU is unstable, leading to bit flipping issues due to hardware quality and electromagnetic field influences, affecting data processing logic and results. Secondly, the programmable chips on devices like the DPU have limitations in logic resources and compilation / routing, affecting verification quality and fault tolerance. In other words, flow table errors are common in applications that forward data streams based on flow tables. To correct these errors, memory error correction codes are typically used. During the process of using memory error correction codes to correct flow table errors, the storage controller of the storage device (e.g., DRAM) generates ECC single-bit error correction and double-bit error detection (SECDED) data (referred to as ECC codes) for the flow table and stores the ECC SECDED data in the storage device. The flow table stored in the storage device is then verified based on the ECC SECDED data stored in the storage device to achieve single-bit error correction and double-bit error detection. The ECC SECDED data generation and verification process includes: the storage controller generates ECC SECDED data based on the flow table being written (also known as offloading or storing), and simultaneously stores the flow table and ECC SECDED data in the storage device; next, during the flow table reading process, the storage controller reads the flow table and its ECC SECDED data from the storage device, and regenerates the ECC SECDED data using the read flow table; finally, the storage controller compares the regenerated ECC SECDED data with the stored ECC SECDED data. If they match, the flow table is correct; if they do not match, the storage controller corrects single-bit errors and detects double-bit errors based on the ECC SECDED data.

[0056] It should also be noted that when using memory error correction codes to repair flow table errors, based on the storage method of ECC SECDED data, ECC includes two types: Side Band ECC and Inline ECC.

[0057] See Figure 1 , Figure 1 This is a flowchart of a flow table read / write operation using a sideband memory error correction code; for example... Figure 1As shown, in the flow table write process 1-1, a write command for the flow table is sent to the storage controller. The storage controller responds to the write command by generating verification data for the flow table (called ECC SECDED data), and sends the flow table and verification data to different storage devices. In the flow table read process 1-2, the storage controller reads the flow table and verification data from different storage devices, generates new verification data based on the read flow table, and determines whether the new verification data matches the read verification data. If they match, the flow table is considered correct; otherwise, it indicates an error. In other words, in sideband ECC, the ECC SECDED data is stored on a different DRAM than the DRAM storing the flow table; the ECC SECDED data serves as sideband data for the flow table. For example, for a 64-bit data width flow table, 8 bits are added for storing the ECC SECDED data. Therefore, a 72-bit data width storage module (DDR4 ECC) can be used. This storage module includes two additional 4-bit data width DRAMs or one 8-bit data width DRAM for storing the ECC SECDED data. Therefore, in sideband ECC, the storage controller reads and writes ECC data and flow tables simultaneously.

[0058] See Figure 2 , Figure 2 A flowchart of a flow table read / write operation for an inline memory error correction code; such as Figure 2 As shown, in the flow table write process 2-1, a write command for the flow table is sent to the storage controller. The storage controller responds to the write command by generating verification data for the flow table and storing the flow table and verification data in the same storage device. In the flow table read process 2-2, the storage controller reads the flow table and verification data from the same storage device, generates new verification data based on the read flow table, and determines whether the new verification data matches the read verification data. If they match, the flow table is considered correct; otherwise, it indicates an error. In other words, in inline ECC, ECC SECDED data and the flow table are stored together on the same DRAM. Because DRAM includes a fixed channel width, inline ECC affects storage space utilization; for example, for a 16-bit data width storage device, 8 bits of data width need to be allocated from the 16 bits for ECC SECDED data. However, ECC SECDED data corresponds to one read command and one write command for the flow table, thus reducing read / write overhead compared to in-band ECC.

[0059] The process of repairing flow tables using the ECC scheme relies on hardware resources (Intellectual Property Cores, IP cores), which impacts the forwarding performance of storage devices. Furthermore, the ECC scheme only repairs a single type of flow table error.

[0060] Based on this, embodiments of this application provide a data processing method, apparatus, electronic device, computer-readable storage medium, and computer program product, which can improve the universality of flow table repair and reduce the consumption of flow table repair. The following describes exemplary applications of the electronic device for data processing (hereinafter referred to as the data processing device) provided in embodiments of this application. The data processing device provided in embodiments of this application can be implemented as various types of terminals such as smartphones, smartwatches, laptops, tablets, desktop computers, smart home appliances, set-top boxes, smart vehicle devices, portable music players, personal digital assistants, dedicated messaging devices, intelligent voice interaction devices, portable gaming devices, and smart speakers. It can also be implemented as a server, or a combination of both. The following will describe exemplary applications when the data processing device is implemented as a server.

[0061] See Figure 3 , Figure 3 This is a schematic diagram of the architecture of the data processing system provided in the embodiments of this application; as shown Figure 3 As shown, to support a data processing application, in the data processing system 100, terminal 200 (terminals 200-1 and 200-2 are shown as examples) connects to server 400 via network 300. Network 300 can be a wide area network (WAN), a local area network (LAN), or a combination of both. Additionally, the data processing system 100 also includes a database 500 for providing data support to server 400; and... Figure 3 The example shown illustrates a scenario where the database 500 is independent of the server 400. However, the database 500 can also be integrated into the server 400, and this embodiment does not limit this to any particular case.

[0062] Terminal 200 is used to receive target data streams via network 300 and present information based on the target data streams (exemplary examples show interface information presented on graphical interfaces 210-1 and 210-2).

[0063] Server 400, in response to a flow table repair instruction, obtains target flow table generation information corresponding to the flow table identifier to be repaired, based on a first correspondence between the flow table identifier and the flow table generation information. The first correspondence is data stored during flow table generation, and the flow table generation information refers to the information used to generate the flow table. The flow table identifier to be repaired is used to identify the flow table to be repaired corresponding to the flow table repair instruction. Based on the target flow table generation information, a repair flow table is generated. Based on the repair flow table, the flow table to be repaired is repaired. The repair flow table is used to forward the target data stream after the repair is completed. After the repair is completed, the target data stream is forwarded to terminal 200 via network 300 based on the repair flow table.

[0064] In some embodiments, server 400 may be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. Terminals and servers can be connected directly or indirectly via wired or wireless communication, which is not limited in this embodiment.

[0065] See Figure 4 , Figure 4 This is one of the embodiments provided in this application. Figure 3 A schematic diagram of the server structure in the diagram; such as Figure 4 As shown, server 400 includes at least one processor 410, memory 450, and at least one network interface 420. In some embodiments, server 400 also includes a user interface 430. The various components in server 400 are coupled together via a bus system 440. It is understood that the bus system 440 is used to implement communication between these components. In addition to a data bus, bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in… Figure 4 The general labeled all buses as Bus System 440.

[0066] The processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.

[0067] User interface 430 includes one or more output devices 431 that enable the presentation of media content, including one or more speakers and / or one or more visual displays. User interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.

[0068] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state storage, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices physically located away from the processor 410.

[0069] The memory 450 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), and the volatile memory may be random access memory (RAM). The memory 450 described in this application embodiment is intended to include any suitable type of memory.

[0070] In some embodiments, memory 450 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or subsets or supersets thereof, as illustrated below.

[0071] Operating system 451 includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, driver layer, etc., for implementing various basic business functions and handling hardware-based tasks;

[0072] The network communication module 452 is used to reach other electronic devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 including: Bluetooth, Wi-Fi, and Universal Serial Bus (USB), etc.

[0073] Presentation module 453 is configured to enable the presentation of information (e.g., a user interface for operating peripheral devices and displaying content and information) via one or more output devices 431 (e.g., a display screen, a speaker, etc.) associated with user interface 430;

[0074] The input processing module 454 is used to detect and translate one or more user inputs or interactions from one or more input devices 432.

[0075] In some embodiments, the data processing apparatus provided in this application can be implemented in software. Figure 4 A data processing device 455 stored in memory 450 is shown. This device can be software in the form of programs and plug-ins, and includes the following software modules: an information acquisition module 4551, a flow table generation module 4552, a flow table repair module 4553, a relationship acquisition module 4554, and a flow table detection module 4555. These modules are logically connected and can therefore be arbitrarily combined or further divided according to their implemented functions. The functions of each module will be described below.

[0076] In some embodiments, the data processing apparatus provided in this application can be implemented in hardware. As an example, the data processing apparatus provided in this application can be a processor in the form of a hardware decoding processor, which is programmed to execute the data processing method provided in this application. For example, the processor in the form of a hardware decoding processor can be one or more ASICs, DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), FPGAs, or other electronic components.

[0077] The data processing method provided in this application will be described below with reference to exemplary applications and implementations of the data processing device provided in the embodiments of this application. Furthermore, the data processing method provided in the embodiments of this application is applicable to various data forwarding scenarios such as cloud technology, artificial intelligence, smart transportation, network communication, and vehicle-mounted systems.

[0078] See Figure 5 , Figure 5 This is a flowchart illustrating the data processing method provided in the embodiments of this application. Figure 1 ,in, Figure 5 The main body executing each step is the data processing equipment; the following will combine... Figure 5 The steps shown are explained.

[0079] Step 101: In response to the flow table repair instruction, based on the first correspondence between the flow table identifier and the flow table generation information, obtain the target flow table generation information corresponding to the flow table identifier to be repaired.

[0080] In this embodiment, when the data processing device detects a flow table error, it receives a flow table repair instruction. The data processing device then responds to this instruction and begins flow table repair processing. Since the repair object indicated by the flow table repair instruction is the flow table to be repaired, and the flow table to be repaired corresponds to identification information, this identification information is the flow table identifier to be repaired. Furthermore, since the data processing device includes a first correspondence between flow table identifiers and flow table generation information, or the data processing device can obtain this first correspondence from a storage device such as a database, the data processing device matches the flow table identifier to be repaired with each flow table identifier in the first correspondence. The resulting flow table generation information corresponding to the matched flow table identifier is the target flow table generation information corresponding to the flow table identifier to be repaired.

[0081] It should be noted that the first correspondence is the data stored when the flow table is generated; and the first correspondence includes the full flow table identifier corresponding to all flow tables in the data processing device; and each flow table corresponds to a flow table generation information, which refers to the information used to generate the flow table, such as the source address and destination address of the data flow. The flow table identifier to be repaired is used to identify the flow table to be repaired corresponding to the flow table repair instruction; that is, the flow table identifier of the flow table to be repaired is the flow table identifier to be repaired. The flow table is stored in a storage device. Data errors occur in the flow table due to bit reversals caused by at least one of the following: storage device quality, electromagnetic interference, and parallel operations. Alternatively, the flow table's storage address may experience read / write anomalies (e.g., inability to read or update). The flow table to be repaired is one with data errors or read / write anomalies. These errors or anomalies can be caused by repairable or irreparable hardware problems, which are not limited in this embodiment. Repairable hardware problems refer to those that can be fixed through charging or data reset operations, while irreparable hardware problems refer to those that cannot be fixed through charging or data reset operations. Furthermore, the first correspondence and the flow table are stored in different storage devices. The error rate of the storage device storing the flow table may be higher than that of the storage device storing the first correspondence. Alternatively, the first correspondence and the flow table may be stored in the same storage device.

[0082] It should also be noted that the data processing device includes a flow table offloading engine and a flow forwarding engine. The flow table offloading engine is used to distribute (also known as offload) the generated flow tables to the flow forwarding engine. Furthermore, the flow table offloading engine is implemented based on a software program and is a software module, such as a software virtual switch (VS). The flow forwarding engine is used to forward data streams based on the flow tables distributed by the flow table offloading engine. Furthermore, the flow forwarding engine is implemented through a hardware chip, such as the data acceleration engine in a DPU. Here, step 101 is executed by the flow table offloading engine; that is, the flow table offloading engine can obtain the first correspondence and respond to the flow table repair command to obtain the target flow table generation information based on the first correspondence.

[0083] Step 102: Generate a repair flow table based on the target flow table generation information.

[0084] In this embodiment of the application, since the flow table generation information is the data on which the flow table is generated, the data processing device can regenerate the flow table based on the target flow table generation information. The regenerated flow table is the repaired flow table. Furthermore, the data in the repaired flow table is correct or normal.

[0085] It should be noted that step 102 is executed by the flow table unloading engine; that is, the flow table unloading engine generates a repair flow table based on the target flow table generation information.

[0086] Step 103: Repair the flow table to be repaired based on the repair flow table.

[0087] In this embodiment, the data processing device obtains a repair flow table with correct data, and repairs the flow table to be repaired based on the repair flow table with data errors (or read / write anomalies). Here, the data processing device can achieve repair by replacing the flow table to be repaired with the repair flow table, or by deleting the flow table to be repaired and re-storing the repair flow table, etc. This embodiment does not limit the scope of the repair.

[0088] It should be noted that step 103 is implemented through the interaction between the flow table unloading engine and the flow forwarding engine; that is, the flow table unloading engine sends a repair instruction carrying the repair flow table to the flow forwarding engine, and the flow forwarding engine responds to the repair instruction and repairs the flow table to be repaired based on the repair flow table; wherein, the repaired flow table is used to forward the target data stream after the repair is completed, and the target data stream refers to the data stream carrying the target flow table generation information, and the target data stream is the data stream received after the repair is completed.

[0089] It is understandable that by storing the first correspondence between the flow table identifier and the flow table generation information when generating the flow table, when responding to a flow table repair instruction to repair the flow table to be repaired, the corresponding target flow table generation information can be determined based on the flow table identifier to be repaired, and the repair flow table can be obtained again based on the target flow table generation information; thus, the repair of the flow table to be repaired can be completed based on the repair flow table; in this way, flow tables with various errors can be repaired, thereby improving the flow table repair capability, and further improving the versatility of flow table repair and the stability of data flow forwarding.

[0090] See Figure 6 , Figure 6 This is a flowchart illustrating the data processing method provided in the embodiments of this application. Figure 2 ,in, Figure 6 The execution entity for each step is a data processing device; in this embodiment of the application, Figure 6 Step 103 can be implemented through steps 1031 to 1033; that is, the data processing device repairs the flow table to be repaired based on the repair flow table, including steps 1031 to 1033. Each step is explained below.

[0091] Step 1031: Based on the second correspondence between flow table identifiers and flow table addresses, obtain the target flow table address corresponding to the flow table identifier to be repaired.

[0092] In this embodiment, the flow table is stored in a storage device, and the data processing device also includes a second correspondence between flow table identifiers and flow table addresses. Alternatively, the data processing device can obtain the second correspondence from a storage device such as a database. The flow table address refers to the storage address of the stored flow table, and the second correspondence includes the flow table address of each flow table in the fully stored flow tables. Therefore, the data processing device matches the flow table identifier to be repaired with the flow table identifier of each flow table in the second correspondence, and the flow table address corresponding to the obtained matching flow table identifier is the target flow table address corresponding to the flow table identifier to be repaired. It is easy to see that the target flow table address stores the flow table to be repaired. Furthermore, the second correspondence and the flow table are stored in different storage devices, which could be because the error rate of the storage device storing the flow table is higher than the error rate of the storage device storing the second correspondence. Of course, the second correspondence and the flow table can also be stored in the same storage device. Here, the first correspondence and the second correspondence can be stored in the same storage device or in different storage devices; this embodiment does not limit this.

[0093] It should be noted that step 1031 is executed by the flow table unloading engine; that is, the flow table unloading engine determines the target flow table address based on the second correspondence it maintains, and issues a repair instruction carrying the target flow table address and the repair flow table to the flow forwarding engine for the flow table to be repaired.

[0094] Step 1032: Replace the flow table to be repaired in the target flow table address with the repair flow table.

[0095] In this embodiment of the application, regardless of the error type of the flow table to be repaired (e.g., a repairable hardware problem or an unrepairable hardware problem), the data processing device first replaces the flow table to be repaired in the target flow table address with the repair flow table, and then determines whether the replacement is successful.

[0096] It should be noted that step 1032 is executed by the flow forwarding engine; that is, in response to the repair instruction, the flow forwarding engine performs the process of replacing the flow table to be repaired in the target flow table address with the repaired flow table.

[0097] Step 1033: When the flow table replacement is successful, confirm that the repair of the flow table to be repaired is complete.

[0098] In this embodiment, when the data processing device completes the replacement, it reads the replaced flow table for verification. For example, it determines whether the replacement is successful based on whether the verification information of the replaced flow table matches the standard verification information. If the verification information matches the standard verification information, the replacement is successful; otherwise, the replacement fails. Here, when the verification determines that the replacement of the repaired flow table is successful, the data processing device also determines that the repair of the flow table to be repaired has been completed. Furthermore, when the replacement of the repaired flow table is successful, it is determined that the flow table to be repaired is a flow table that has experienced a repairable hardware problem.

[0099] It should be noted that step 1033 is executed by the flow forwarding engine; that is, the flow forwarding engine determines whether the replacement was successful, and when the flow table replacement is successful, it determines that the repair of the flow table to be repaired is complete.

[0100] Understandably, flow table repair is achieved by replacing the erroneous flow table to be repaired with a repaired flow table. In this way, various flow table errors can be repaired when the original hardware address is available, improving the flow table repair capability and versatility. Furthermore, based on the repair results, the stability and efficiency of data flow forwarding can be improved.

[0101] See also Figure 6 In this embodiment of the application, step 1032 is followed by steps 1034 and 1035; that is, step 103 can also be implemented by steps 1031 and 1032, as well as steps 1034 and 1035. Thus, after the data processing device replaces the flow table to be repaired in the target flow table address with the repair flow table, the data processing method further includes steps 1034 and 1035. Each step will be described below.

[0102] Step 1034: When the flow table replacement fails to be repaired, determine the current flow table address based on the available address resources.

[0103] In this embodiment, when the data processing device determines through verification that the flow table replacement repair has failed, it indicates that the target flow table address can no longer store the flow table. Therefore, the data processing device determines a new storage address for storing the flow table based on available address resources. This new storage address is the current flow table address. Here, available address resources refer to unused storage space within the storage space used for storing flow tables. Furthermore, when the flow table replacement repair fails, it is determined that the flow table to be repaired has suffered an unrepairable hardware problem.

[0104] It should be noted that step 1034 is executed by the flow table offloading engine; that is, when the flow forwarding engine determines that the flow table replacement repair has failed, it sends a replacement failure message to the offloading engine. The flow table offloading engine then determines the failure based on this message and, upon failure, determines the current flow table address based on available address resources. The flow table repair instruction sent by the flow forwarding engine to the flow table forwarding engine can carry the number of replacement failures. When the number of failures is 0, the error type of the flow table to be repaired is determined to be undetermined; when the number of failures is 1, the flow table to be repaired is determined to have an unrepairable hardware problem, and the corresponding repair processing for the unrepairable hardware problem is executed. Here, the replacement failure message can be a flow table repair instruction with a replacement failure count of 1.

[0105] Step 1035: Store the repaired flow table in the current flow table address, and when the repaired flow table is stored, determine that the repair of the flow table to be repaired is complete.

[0106] In this embodiment of the application, when the replacement of the repair flow table fails, it indicates that the target flow table address is no longer available. Therefore, the data processing device stores the repair flow table in the current flow table address. When the storage of the repair flow table in the current flow table address is completed, the data processing device determines that the repair of the flow table to be repaired is completed.

[0107] It should be noted that step 1035 is executed by the flow forwarding engine; that is, the flow forwarding engine receives a new repair instruction carrying the current flow table address issued by the flow table unloading engine, and in response to the new repair instruction, stores the repaired flow table in the current flow table address.

[0108] See also Figure 6 The data processing method also includes step 1036. That is, step 103 can also be implemented through steps 1031 and 1032, as well as steps 1034 to 1036. Step 1036 will be explained below.

[0109] Step 1036: If the flow table replacement fails to repair, set the target flow table address to an unavailable state and delete the flow table to be repaired from the target flow table address.

[0110] In this embodiment of the application, when the flow table replacement fails to be repaired, the data processing device is further configured to set the target flow table address to an unavailable state in order to improve the success rate of subsequent flow table unloading; and the data processing device is further configured to delete the flow table to be repaired from the target flow table address.

[0111] It should be noted that step 1036 is executed by the flow table unloading engine and the flow forwarding engine; that is, when the flow table replacement repair fails, the flow table unloading engine sets the target flow table address to an unavailable state and issues a deletion command to the flow forwarding engine to delete the flow table to be repaired. In response to the deletion command, the flow forwarding engine deletes the flow table to be repaired from the target flow table address.

[0112] See also Figure 6 The data processing method also includes step 1037. That is, step 103 can also be implemented through steps 1031 and 1032, as well as steps 1034 to 1037. Step 1037 will be explained below.

[0113] Step 1037: When the repaired flow table is stored, update the second correspondence based on the identifier of the flow table to be repaired and the current flow table address.

[0114] In this embodiment, when the repaired flow table is stored, the data processing device further replaces the target flow table address corresponding to the flow table identifier to be repaired in the second correspondence with the current flow table address. This completes the update of the second correspondence based on the flow table identifier to be repaired and the current flow table address. The updated second correspondence is used to determine the flow table address corresponding to the flow table identifier during subsequent flow table address matching.

[0115] It should be noted that step 1037 is executed by the flow table unloading engine; that is, when the flow table repair is completed and stored, the flow table unloading engine updates the second correspondence based on the identifier of the flow table to be repaired and the current flow table address.

[0116] It is understandable that updating the second correspondence by the current flow table address will allow subsequent flow table address matching based on the second correspondence to cancel the processing of flow tables with data errors that need to be repaired, and use the correct repaired flow table for processing, thereby improving the accuracy and stability of data flow forwarding.

[0117] In this embodiment of the application, the process of obtaining the first correspondence relationship is included before step 101; that is, before the data processing device responds to the flow table repair instruction, the data processing method further includes: the data processing device responds to the first flow forwarding instruction, performs a first flow table matching based on the first data flow in the first flow table set; and when the first flow table matching fails, obtains the flow table generation information of the first data flow; then generates a flow table based on the flow table generation information, and obtains the flow table identifier of the generated flow table; finally, obtains the first correspondence relationship based on the combination of the flow table identifier and the flow table generation information.

[0118] It should be noted that the first flow table set refers to the full set of flow tables stored when responding to the first flow forwarding instruction. Each flow table includes the forwarding address of the data flow, such as the source address and destination address of the data flow. Therefore, the data processing device matches the forwarding address of the first data flow with the forwarding address of each flow table. If no matching forwarding address is found, the first flow table matching is deemed unsuccessful, indicating that the first flow table set does not include a flow table used for forwarding the first data flow. Thus, the data processing device obtains flow table generation information from the first data flow, generates flow tables based on this information, and obtains the flow table identifier of the generated flow tables. Finally, the combination of the flow table identifier and the flow table generation information is updated in the current correspondence between flow table identifiers and flow table generation information, thereby obtaining the first correspondence. Furthermore, the first flow forwarding instruction is used to instruct the forwarding of the first data flow.

[0119] It should also be noted that, in response to the first flow forwarding instruction, the flow forwarding engine performs a first flow table match based on the first data flow in the first flow table set; and if the first flow table match fails, it forwards the first data flow to the flow table unloading engine; then, the flow table unloading engine obtains the flow table generation information of the first data flow, generates a flow table based on the flow table generation information, and obtains the flow table identifier of the generated flow table, so as to obtain a first correspondence based on the combination of the flow table identifier and the flow table generation information; the flow table unloading engine is also used to determine the flow table address of the flow table, so as to obtain a second correspondence based on the combination of the flow table identifier and the flow table address; after that, the flow table unloading engine unloads the flow table to the flow forwarding engine, and the flow forwarding engine stores the flow table in the corresponding flow table address.

[0120] In this embodiment of the application, the flow table repair instruction is triggered by at least one of the following: a second flow forwarding instruction, a flow table hit time, and a full flow table check; wherein, the reception time of the second flow forwarding instruction is later than the reception time of the first flow forwarding instruction in the time sequence, the flow table hit time refers to the most recent time when the flow table is successfully matched by the data flow, and the full flow table check refers to checking each flow table in the current flow table set.

[0121] In this embodiment of the application, when the flow table repair instruction is triggered by the second flow forwarding instruction, see [reference needed]. Figure 7 , Figure 7 This is a flowchart illustrating the data processing method provided in the embodiments of this application. Figure 3 ,in, Figure 7 The main entity executing each step is the data processing equipment; such as... Figure 7 As shown, steps 104 to 106 are included before step 101; that is, before the data processing device responds to the flow table repair instruction, the data processing method also includes steps 104 to 106, and each step is described below.

[0122] Step 104: In response to the second flow forwarding instruction, perform second flow table matching based on the second data flow in the second flow table set.

[0123] In this embodiment, when the data processing device receives a second flow forwarding instruction and begins forwarding the second data flow, it first performs a second flow table matching based on the second data flow in the second flow table set in response to the second flow forwarding instruction. The process of second flow table matching is similar to that of first flow table matching, and will not be described again in this embodiment. The second flow table set refers to the full set of flow tables stored in response to the second flow forwarding instruction, and the second flow forwarding instruction is used to instruct the forwarding of the second data flow.

[0124] It should be noted that step 104 is executed by the flow table unloading engine.

[0125] Step 105: When the second flow table is successfully matched, generate the current verification information based on the length of the flow table information of the matched target flow table.

[0126] In this embodiment, when the data processing device matches a target flow table that matches the second data flow in the second flow table set, it determines that the second flow table match is successful. At this time, since each flow table also stores corresponding original verification information when it completes storage, and the original verification information is determined based on the flow table information length; that is, the data processing device determines the unit verification length of the target flow table based on the flow table information length. The unit verification length can be the flow table information length, indicating that the original verification information of the data processing device is generated based on the data length of the entire flow table; the unit verification length can also be the sub-flow table information length, which is the data length of the sub-flow table of the target flow table, indicating that the original verification information of the data processing device is a combination of the verification information of each sub-flow table. Furthermore, the storage space occupied by each sub-flow table can be the same or different, so the unit verification lengths can be the same (when the storage space occupied by each sub-flow table is the same) or different (when the storage space occupied by each sub-flow table is different). It is understandable that when a flow table corresponds to a single unit check length, it means that one flow table corresponds to the generation of one check information; while when a flow table corresponds to multiple unit check lengths, the unit check lengths can be different or the same.

[0127] In this embodiment, the generation process of original verification information is illustrated using the example of a flow table corresponding to multiple unit verification lengths. Before determining that the target flow table is a flow table to be repaired when the current verification information fails to match the original verification information, the data processing method further includes the process of obtaining original verification information: the data processing device generates flow table generation information corresponding to the second data flow to generate at least two sub-initial flow tables, wherein the target flow table includes at least two sub-initial flow tables; the following processing is performed on each sub-initial flow table: based on the sub-flow table information length of the sub-initial flow table, sub-original verification information is generated; the at least two sub-original verification information corresponding to the at least two sub-initial flow tables are determined as original verification information.

[0128] It should be noted that the original verification information can be executed by at least one of the flow table offloading engine and the flow forwarding engine. Furthermore, the sub-initial flow table is a sub-flow table of the target flow table, and the sub-original verification information is the verification information of the sub-flow table.

[0129] Step 106: When the current verification information fails to match the original verification information, determine the target flow table as the flow table to be repaired, and generate a flow table repair instruction for the target flow table.

[0130] It should be noted that the original verification information refers to the original standard information used to verify the target flow table. When the data processing device determines that the current verification information is inconsistent with the original verification information, it determines that the current verification information and the original verification information have failed to match; conversely, when the data processing device determines that the current verification information and the original verification information match, it determines that the current verification information and the original verification information have matched successfully, and thus, the target data flow is forwarded based on the target flow table. Here, step 106 can be executed by the flow forwarding engine.

[0131] In this embodiment of the application, when the flow table repair instruction is triggered by the flow table hit time, see [reference needed]. Figure 8 , Figure 8 This is a flowchart illustrating the data processing method provided in the embodiments of this application. Figure 4 ,in, Figure 8 The main entity executing each step is the data processing equipment; such as... Figure 8 As shown, steps 107 to 109 are included before step 101; that is, before the data processing device responds to the flow table repair instruction, the data processing method also includes steps 107 to 109. Each step will be explained below.

[0132] Step 107: When the first detection time is determined based on the first cycle, obtain the most recent hit time of each flow table in the third flow table set.

[0133] It should be noted that the first period refers to the period of detecting flow table hit times, the third flow table set refers to the full set of flow tables when the first detection time arrives, and the most recent hit time refers to the time when the flow table is successfully matched by the data flow forwarded by the data processing device; this most recent hit time indicates the hit status of the flow table.

[0134] Step 108: Identify the flow tables whose most recent hit time is earlier than the specified time as the flow tables to be verified.

[0135] It should be noted that the data processing device determines the specified time based on the current time of the detected flow table. For example, it may determine the time corresponding to a specified duration before the current time of the detected flow table. Additionally, flow tables with a recent hit time earlier than the specified time may contain errors; therefore, the data processing device will identify such flow tables as flow tables to be verified.

[0136] Step 109: When it is determined that the verification of the flow table to be verified has failed, the flow table to be verified is identified as the flow table to be repaired, and a flow table repair instruction is generated for the flow table to be verified.

[0137] It should be noted that the process of the data processing device verifying the flow table to be verified is similar to the process of verifying the target flow table, and will not be described again in this embodiment. Steps 107 to 109 can be implemented by the flow forwarding engine.

[0138] In this embodiment of the application, when the flow table repair command is triggered by a full flow table detection, see [link to relevant documentation]. Figure 9 , Figure 9 This is a flowchart illustrating the data processing method provided in the embodiments of this application. Figure 5 ,in, Figure 9 The main entity executing each step is the data processing equipment; such as... Figure 9 As shown, step 110 is included before step 101; that is, before the data processing device responds to the flow table repair instruction, the data processing method also includes step 110. Each step is described below.

[0139] In this embodiment of the application, when the second detection time is determined to have arrived based on the second cycle, the following processing (i.e., step 110) is performed on each flow table in the fourth flow table set. Here, the current flow table set is the fourth flow table set, which refers to all flow tables at the time the first detection time arrives.

[0140] Step 110: When it is determined that the flow table verification failed, the flow table with the failed verification is identified as the flow table to be repaired, and a flow table repair instruction is generated for the flow table with the failed verification.

[0141] It should be noted that the process of data processing equipment verifying the flow table is similar to the process of verifying the target flow table, and will not be described again in this embodiment. Step 110 is executed by the flow table unloading engine.

[0142] The following describes an exemplary application of the embodiments of this application in a real-world application scenario. This exemplary application describes the process of detecting flow table errors from multiple dimensions and repairing flow table errors to improve the stability of data flow forwarding.

[0143] See Figure 10 , Figure 10 This is an exemplary flow table offloading architecture diagram provided in an embodiment of this application; as shown... Figure 10 As shown, the exemplary flow table offloading architecture 10-1 includes a host 10-11 (referred to as a data processing device), a dedicated data processing unit (DPU) 10-12, and a software virtual switch 10-13. The DPU 10-12 includes a fast forwarding engine 10-121 (referred to as a flow forwarding engine), and the software virtual switch 10-13 includes an offloading control engine 10-131 (referred to as a flow table offloading engine). The host 10-11 can be a bare metal / virtual machine (BM / VM), and includes the DPU 10-12 and the software virtual switch 10-13, as well as upper-layer applications and elastic network interface card (NIC) front-ends.

[0144] It should be noted that the fast forwarding engine 10-121 in the dedicated data processing chip 10-12 performs flow table matching in the various flow tables stored in the storage device 10-122 (e.g., DRAM) for each received data stream based on the packet header information (called the forwarding address) of the data stream. The data stream is obtained through the upper layer application and arrives at the fast forwarding engine 10-121 after interaction between the elastic network interface card front end and the elastic network interface card back end. It is easy to see that for the first received data stream, if no corresponding flow table is found during flow table matching, the fast forwarding engine 10-121 sends the data stream to the software virtual switch 10-13 via the upload / re-injection channel 10-141. The software virtual switch 10-13 performs business processing 10-132 on the data stream to calculate the required information such as index, tuple, action, statistics, and rate limit for the flow table, and combines the calculated information into a software flow table (referring to the flow table in the software virtual switch 10-13). Then, the control is offloaded. Engine 10-131 unloads the software flow table to a dedicated data processing chip 10-12 via management / unload channel 10-142. Fast forwarding engine 10-121 then stores this flow table in a dedicated storage device 10-122. The index information determines the flow table's storage address (called the flow table address) in hardware DRAM or other storage devices 10-122. Tuple information (such as the data flow source and destination addresses) is used for matching with the data flow. Action and rate limiting information determines the data flow forwarding method (e.g., forwarding speed, network channel). Statistical information refers to remaining and used data traffic. When a data flow arrives, if a matching flow table is found, fast forwarding engine 10-121 uses the matched flow table to perform a forwarding action on the data flow, i.e., forwarding the data flow to the client via forwarding network interface card 10-123 (100GETX) or forwarding network interface card 10-124 (100GERX).

[0145] Because the aforementioned data stream forwarding process involves multiple collaborative interactions and concurrent processing between hardware and software (i.e., dedicated data processing chip 10-12 and software virtual switch 10-13), the probability of hardware-software inconsistencies or processing anomalies is increased. Furthermore, the offloaded flow tables are stored in the DRAM within the dedicated data processing chip 10-12, which can also lead to bit flips or data changes caused by hardware failures. Based on this, Figure 10 See Figure 11 , Figure 11 This is an exemplary flow table error detection diagram provided in an embodiment of this application; as shown... Figure 11As shown, each flow table is divided into multiple sub-flow tables based on the logical processing stage performed on that flow table. For example, each flow table is divided into 3 sub-flow tables (sub-flow tables 11-11 to 11-13 are exemplarily shown in storage devices 10-122). Among them, the corresponding check code (called check information) is obtained based on the data in each sub-flow table. In storage devices 10-122, check codes 11-21 to 11-23 corresponding to sub-flow tables 11-11 to 11-12 are exemplarily shown.

[0146] It should be noted that since the data flow forwarding process is based on the pipelined processing of data in the flow table, the flow table can be divided into different sub-flow tables based on the different logical processing stages performed on the flow table. This allows the fast forwarding engine 10-121 to access different sub-flow tables at different logical processing stages. Here, the flow table division based on hardware programming implementation and business logic can be applied to flow tables of different data types, improving the versatility of flow table verification. In addition, since ECC codes verify the flow table by occupying a fixed proportion of bit width (e.g., one ECC code for every 4 bits of flow table data), and this embodiment generates check codes for corresponding sub-flow tables through different logical processing stages, the length of the sub-flow table is longer than the check length of the ECC code, and it is independent of the verification logic of hardware resources. Therefore, this embodiment sets a corresponding check code for each sub-flow table, which can reduce the storage space occupied by the check code and reduce the hardware resource consumption of flow table verification. Furthermore, the data length and verification algorithm of the sub-flow table can be flexibly selected according to actual business needs and storage space. Among them, the verification algorithms used to obtain the verification code include Cyclic Redundancy Check (CRC), Block Check Character (BCC), cryptographic hash function (MD5 check), Data Encryption Standard (DES), and Advanced Encryption Standard (AES) algorithms. Taking CRC as an example, it can support data length verification of 8 bits, 16 bits, 32 bits, and 64 bits. When verifying with an 8-bit data length, the verification code occupies 1% of the total space of the flow table, while ECC code occupies more than 10% of the space.

[0147] It should also be noted that the one or more checksum fields corresponding to each flow table are calculated by at least one of the software virtual switch and the fast forwarding engine when the flow table is unloaded from the software virtual switch; these one or more checksum fields, along with the corresponding flow table, are stored in DRAM. Furthermore, during the flow table-based data flow forwarding process, the flow table contains data that is updated as the data flow is forwarded, such as statistical information; therefore, while updating the data in the flow table, the fast forwarding engine recalculates the checksum related to the updated flow table data and updates the DRAM with the new checksum. In other words, during the flow table-based data flow forwarding process, at least one of the software virtual switch and the fast forwarding engine updates the checksum of the sub-flow table in real time.

[0148] See also Figure 11 The unloading control engine 10-131 includes an unloading resource management module 11-4, which manages and allocates flow table control plane information 11-5 for flow tables unloaded to the hardware. The flow table control plane information 11-5 includes flow table storage resources 11-2 (including a second correspondence and free address resources). The flow table storage resources 11-2 are the state of the storage space used to store flow tables, which is managed by the unloading resource management module 11-4 based on the index. It can be in an idle state, a used state, or an unavailable state.

[0149] See also Figure 11In the process of verifying flow tables based on verification fields, flow table verification is performed using three triggering methods to improve the coverage and timeliness of flow table verification. One of the triggering methods is to trigger flow table verification 11-31 during data flow forwarding; that is, on the data path, when the data flow to be forwarded arrives, the fast forwarding engine 10-121 verifies the flow table matching the data flow to confirm whether errors such as bit flipping have occurred in the data of each sub-flow table read; if an error has occurred in the sub-flow table, the error information for the flow table is sent to the offloading control engine 10-131 through the upload / reload channel 10-141. Another triggering method is that the fast forwarding engine 10-121 periodically triggers flow table verification 11-32. That is, on the management path, the aging module in the fast forwarding engine 10-121 periodically scans all stored flow tables and sends flow tables that have not been used for a long time (the most recent usage time is earlier than the specified time) to the unloading control engine 10-131 through the unloading / management channel 10-142. The unloading control engine 10-131 then issues a deletion command for the flow table to the fast forwarding engine 10-121. Alternatively, the flow tables that have not been used for a long time can be verified first, and if the verification result indicates that there are data errors in the flow table, the long-term unused flow table can be sent to the unloading control engine 10-131 for deletion. Another triggering method refers to the unloading control engine 10-131 periodically triggering flow table verification 11-33; that is, on the management path, the unloading control engine 10-131, based on the flow table control plane information 11-5 it maintains, periodically verifies all flow tables in the storage device 10-122 through the unloading / management channel 10-142 to detect flow tables with data errors; the flow table control plane information 11-5 also includes an index, so that the unloading control engine 10-131 can read the checksum of the flow table and each sub-flow table in the flow table based on the index.

[0150] It should be noted that, for the three flow table verification triggering methods mentioned above, the flow table verification for the first two methods is integrated into the original flow table-based processing logic of the fast forwarding engine 10-121, reducing the performance impact on the forwarded data stream. The third flow table verification triggering method involves a thread in the offload control engine 10-131 periodically verifying all flow tables in the dedicated data processing chip 10-12, and verifying each flow table according to the flow table control plane information 11-5. It can be understood that by periodically verifying all flow tables through the offload control engine 10-131, flow table data errors caused by design flaws or concurrent coordination in the dedicated data processing chip 10-12 can be detected. It can also detect situations where the dedicated data processing chip 10-12 mistakenly confirms that a flow table does not exist, thus complementing flow table verification in cases where the dedicated data processing chip 10-12 has design flaws or a limited scope of inspection. It is evident that the above three flow table verification triggering methods operate in parallel, enabling timely and comprehensive detection of flow table errors, thereby ensuring the stability of data stream forwarding.

[0151] In this embodiment, detected erroneous flow tables are repaired by the offload resource management module 11-4 in the offload control engine 10-131. Since hardware faults within the DPU can be categorized into recoverable errors (Correctable Error, CE) and uncorrectable errors (Uncorrectable Error, UE), this embodiment employs different repair methods for flow tables with recoverable and uncorrectable errors. Recoverable errors refer to flow table errors that can be repaired through power-on / off cycles or resets; uncorrectable errors refer to flow table errors that cannot be repaired through power-on / off cycles or resets. The repair processes for these two types of errors are described below.

[0152] based on Figure 10 and Figure 11 See Figure 12 , Figure 12 This is an exemplary error handling diagram provided in an embodiment of this application; as shown... Figure 12As shown, the unloading resource management module 11-4 repairs erroneous flow tables. For example, when the fast forwarding engine detects erroneous flow table 12-6 (referred to as the flow table to be repaired), as shown in step 12-1, the fast forwarding engine summarizes the error information of the erroneous flow table (referred to as the flow table repair instruction) to the unloading resource management module 11-4. Next, as shown in step 12-2, the unloading resource management module 11-4 matches the flow table identifier in the flow table control plane information 11-5 based on the flow table identifier in the error information, and obtains the original necessary information (referred to as the target flow table generation information) corresponding to the matched flow table identifier from the flow table control plane information 11-5; where the original necessary information refers to the information carried in the data flow for generating the flow table, such as the source address and destination address of the data flow. Then, as shown in step 12-3, the unloading resource management module 11-4 performs business processing 10-132 based on the original necessary information to recalculate the flow table entries such as actions and rate limits, and determines the flow table entries as the regenerated software flow table. Next, as shown in step 12-4, the resource management module 11-4 re-unloads the software flow table. During the re-unloading process, the division of each sub-flow table and the calculation of the checksum of each sub-flow table are also included to obtain the unloaded flow table 12-7 (called the repaired flow table). Finally, as shown in step 12-5, the fast forwarding engine 10-121 overwrites the original erroneous flow table 12-6 with the unloaded flow table 12-7 to use the overwritten flow table for data flow forwarding.

[0153] Understandably, for recoverable errors, the flow table can be restored by rebuilding it at the original hardware address. However, for unrecoverable errors, the original hardware address of the flow table is unusable. Here, for erroneous flow tables, the recoverable error process is first used for repair. Then, the checksum calculated by the overwritten flow table is checked against the original checksum. If they do not match, the overwriting fails, thus determining that the flow table error is unrecoverable. See here for further details. Figure 13 , Figure 13 This is another exemplary error handling diagram provided in the embodiments of this application; as shown Figure 13As shown in step 13-1, the fast forwarding engine 10-121 sends an unrecoverable error notification for the erroneous flow table 12-6 to the offload resource management module 11-4. Then, as shown in step 13-2, the offload resource management module 11-4 changes the status of the original hardware address of the erroneous flow table 12-6 from "in use" to "unavailable," and as shown in step 13-3, reallocates a new hardware address (referred to as the current flow table address). Next, as shown in step 13-4, the offload resource management module 11-4 instructs the fast forwarding engine to delete the erroneous flow table 12-6. Finally, as shown in step 13-5, the offload resource management module 11-4 instructs the fast forwarding engine 10-121 to offload the flow table 12-7 to the new hardware address for data flow forwarding based on the flow table in the new hardware address.

[0154] It is understood that the embodiments of this application map hardware flow table resources by unloading control plane information to allocate and unload the hardware storage address of the flow table; when an unrecoverable error of the flow table is detected, the unloading control engine can accurately delete the flow table and set the hardware storage address of the flow table to an unavailable state to improve the accuracy of subsequent flow table unloading.

[0155] It should be noted that the flow table control plane information of the offloading control engine also includes whether each flow table has undergone recoverable error repair. Therefore, when the offloading control engine receives error information from an erroneous flow table, if it determines that the current flow table has undergone recoverable error repair, it determines that the flow table at the original hardware address has suffered an unrecoverable error, thereby triggering... Figure 13 Repairing the unrecoverable error shown.

[0156] It is understood that the data processing method provided in this application embodiment is applied to the DPU platform for flow table offloading acceleration. The offloading control engine saves offloading control plane information, and when an error occurs in a flow table, it can obtain the original necessary information of the flow table to be generated based on the offloading control plane information. The software virtual switch regenerates the flow table based on the original necessary information for offloading, thus repairing flow tables with bit flip errors or logical processing errors. This allows for the repair of not only recoverable errors but also unrecoverable errors, thereby improving the flow table error repair capability and ensuring the reliability of flow table offloading and the normal operation of data flow forwarding, thus improving the stability of data flow forwarding. Furthermore, it is independent of the number of offloaded flow tables, improving the versatility of flow table repair. In addition, this application embodiment addresses the reliability issues that may occur during collaborative offloading acceleration by adding a processing module for detecting and repairing flow table errors in the software virtual switch and DPU. This module comprehensively detects flow table errors from multiple dimensions and performs different repair processes for different errors, thereby improving the stability of data flow processing. Furthermore, based on the different logical processing stages performed according to the flow table, the embodiments of this application divide the flow table into different sub-flow tables, and calculate the check code in units of the data length of the sub-flow table, thereby increasing the check length of the data in the flow table and reducing the storage resources of the check code; and, the verification of the flow table in the embodiments of this application is independent of hardware verification resources, reducing the consumption of hardware resources.

[0157] The following description continues to illustrate the exemplary structure of the data processing apparatus 455 provided in the embodiments of this application as a software module. In some embodiments, such as Figure 4 As shown, the software modules stored in the data processing device 455 of the memory 450 may include:

[0158] The information acquisition module 4551 is used to respond to the flow table repair instruction and acquire the target flow table generation information corresponding to the flow table identifier to be repaired based on the first correspondence between the flow table identifier and the flow table generation information; wherein, the first correspondence is data stored when the flow table is generated, the flow table generation information refers to the information used to generate the flow table, and the flow table identifier to be repaired is used to identify the flow table to be repaired corresponding to the flow table repair instruction.

[0159] The flow table generation module 4552 is used to generate a repair flow table based on the target flow table generation information;

[0160] The flow table repair module 4553 is used to repair the flow table to be repaired based on the repair flow table, wherein the repair flow table is used to forward the target data flow after the repair is completed.

[0161] In this embodiment of the application, the flow table repair module 4553 is further configured to obtain the target flow table address corresponding to the flow table identifier to be repaired based on the second correspondence between the flow table identifier and the flow table address; replace the flow table to be repaired in the target flow table address with the repaired flow table; and determine that the repair of the flow table to be repaired is completed when the repaired flow table is successfully replaced.

[0162] In this embodiment of the application, the flow table repair module 4553 is further configured to determine the current flow table address based on free address resources when the flow table repair replacement fails; store the repaired flow table in the current flow table address; and determine that the repair of the flow table to be repaired is completed when the repaired flow table is completely stored.

[0163] In this embodiment of the application, the flow table repair module 4553 is further configured to set the target flow table address to an unavailable state and delete the flow table to be repaired from the target flow table address when the flow table repair replacement fails.

[0164] In this embodiment of the application, the flow table repair module 4553 is further configured to update the second correspondence based on the identifier of the flow table to be repaired and the current flow table address when the repaired flow table is stored, wherein the updated second correspondence is used to determine the flow table address corresponding to the flow table identifier.

[0165] In this embodiment of the application, the data processing device 455 further includes a relationship acquisition module 4554, configured to, in response to a first flow forwarding instruction, perform a first flow table matching based on a first data flow in a first flow table set, wherein the first flow table set refers to the full set of flow tables when responding to the first flow forwarding instruction; when the first flow table matching fails, acquire the flow table generation information of the first data flow; generate the flow table based on the flow table generation information, and acquire the flow table identifier of the generated flow table; and obtain the first correspondence relationship based on the combination of the flow table identifier and the flow table generation information.

[0166] In this embodiment of the application, the flow table repair instruction is triggered by at least one of the following: a second flow forwarding instruction, flow table hit time, and full flow table detection; wherein, the flow table hit time refers to the most recent time when the flow table was successfully matched by the data flow, and the full flow table detection refers to verifying each of the flow tables in the current flow table set.

[0167] In this embodiment, when the flow table repair instruction is triggered by the second flow forwarding instruction, the data processing device 455 further includes a flow table detection module 4555, used to perform second flow table matching based on the second data flow in response to the second flow forwarding instruction, wherein the second flow table set refers to the full set of flow tables when responding to the second flow forwarding instruction; when the second flow table matching is successful, current verification information is generated based on the flow table information length of the matched target flow table, wherein the flow table information length is used to determine the unit verification length of the target flow table; when the current verification information fails to match the original verification information, the target flow table is determined to be the flow table to be repaired, and the flow table repair instruction is generated for the target flow table, wherein the original verification information refers to the original standard information used to verify the target flow table.

[0168] In this embodiment of the application, the flow table detection module 4555 is further configured to generate at least two sub-initial flow tables based on the flow table generation information corresponding to the second data flow, wherein the target flow table includes at least two sub-initial flow tables; and to perform the following processing on each sub-initial flow table: generating sub-original verification information based on the sub-flow table information length of the sub-initial flow table; and determining at least two sub-original verification information corresponding to at least two sub-initial flow tables as the original verification information.

[0169] In this embodiment of the application, when the flow table repair instruction is triggered by the flow table hit time, the flow table detection module 4555 is further configured to, when the first detection time is determined based on the first period, obtain the most recent hit time of each flow table in the third flow table set, wherein the first period refers to the period for detecting the flow table hit time, and the third flow table set refers to all flow tables when the first detection time arrives; determine the flow tables whose most recent hit time is earlier than a specified time as flow tables to be verified; when it is determined that the verification of the flow table to be verified has failed, determine the flow table to be verified as the flow table to be repaired, and generate the flow table repair instruction for the flow table to be verified.

[0170] In this embodiment of the application, when the flow table repair instruction is triggered by full flow table detection, the flow table detection module 4555 is further configured to perform the following processing on each flow table in the fourth flow table set when the second detection time is determined based on the second period, wherein the fourth flow table set refers to the full flow table when the second detection time arrives; when it is determined that the flow table verification fails, the flow table with the verification failure is determined as the flow table to be repaired, and the flow table repair instruction is generated for the flow table with the verification failure.

[0171] In this embodiment, the information acquisition module 4551 is further configured to invoke the flow table offloading engine to perform the following processing: in response to a flow table repair instruction, based on a first correspondence between the flow table identifier and the flow table generation information, acquire target flow table generation information corresponding to the flow table identifier to be repaired, wherein the flow table offloading engine is configured to send the generated flow table to the flow forwarding engine, and the flow forwarding engine is configured to forward data streams based on the flow table sent by the flow table offloading engine; the flow table generation module 4552 is further configured to invoke the flow table offloading engine to perform the following processing: generate a repair flow table based on the target flow table generation information; the flow table repair module 4553 is further configured to invoke the flow table offloading engine and the flow forwarding engine to perform the following processing: repair the flow table to be repaired based on the repair flow table.

[0172] This application provides a computer program product, which includes computer-executable instructions or a computer program stored in a computer-readable storage medium. The processor of an electronic device reads the computer-executable instructions or computer program from the computer-readable storage medium and executes the computer-executable instructions or computer program, causing the electronic device to perform the data processing method described in this application.

[0173] This application provides a computer-readable storage medium storing computer-executable instructions or a computer program. When the computer-executable instructions or the computer program are executed by a processor, the processor will execute the data processing method provided in this application. For example, ... Figure 4 The data processing method is shown.

[0174] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.

[0175] In some embodiments, computer-executable instructions may take the form of programs, software, software modules, scripts, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.

[0176] As an example, computer-executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple co-located files (e.g., files that store one or more modules, subroutines, or code sections).

[0177] As an example, computer-executable instructions can be deployed to execute on a single electronic device (in which case, this single electronic device is a data processing device), or to execute on multiple electronic devices located at one location (in which case, the multiple electronic devices located at one location are data processing devices), or to execute on multiple electronic devices distributed across multiple locations and interconnected via a communication network (in which case, the multiple electronic devices distributed across multiple locations and interconnected via a communication network are data processing devices).

[0178] It is understood that in the embodiments of this application, data related to data streams and the like are involved. When the embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0179] In summary, the embodiments of this application store a first correspondence between flow table identifiers and flow table generation information during flow table generation. This allows the determination of the corresponding target flow table generation information based on the flow table identifier to be repaired when responding to a flow table repair instruction, and the re-obtaining of the repaired flow table based on this target flow table generation information. Thus, the repair of the flow table to be repaired can be completed based on this repaired flow table. This enables the repair of flow tables with various errors, thereby improving flow table repair capabilities. Furthermore, multiple methods are used to trigger flow table detection, achieving multi-dimensional flow table detection and improving the timeliness of erroneous flow table detection. In addition, storing flow table verification information on a sub-flow table basis reduces storage space usage and hardware verification resource consumption. In conclusion, the data processing method provided by the embodiments of this application improves the versatility of flow table repair and enhances the stability and efficiency of data flow forwarding.

[0180] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.

Claims

1. A data processing method, characterized in that, The method includes: In response to the first flow forwarding instruction, a first flow table match is performed in the first flow table set based on the first data flow, wherein the first flow table set refers to the full flow table at the time of responding to the first flow forwarding instruction; If the first flow table fails to match, obtain the flow table generation information of the first data stream; The flow table is generated based on the flow table generation information, and the flow table identifier of the generated flow table is obtained; Based on the combination of the flow table identifier and the flow table generation information, a first correspondence between the flow table identifier and the flow table generation information is obtained; In response to the flow table repair instruction, based on the first correspondence, the target flow table generation information corresponding to the flow table identifier to be repaired is obtained; Wherein, the first correspondence is the data stored when the flow table is generated, the flow table generation information refers to the information used to generate the flow table, and the flow table identifier to be repaired is used to identify the flow table to be repaired corresponding to the flow table repair instruction; Based on the target flow table generation information, a repair flow table is generated; Based on the repair flow table, the flow table to be repaired is repaired, wherein the repair flow table is used to forward the target data flow after the repair is completed.

2. The method according to claim 1, characterized in that, The step of repairing the flow table to be repaired based on the repair flow table includes: Based on the second correspondence between flow table identifiers and flow table addresses, obtain the target flow table address corresponding to the flow table identifier to be repaired; Replace the flow table to be repaired in the target flow table address with the flow table to be repaired; When the replacement of the repaired flow table is successful, the repair of the flow table to be repaired is determined to be complete.

3. The method according to claim 2, characterized in that, After replacing the flow table to be repaired in the target flow table address with the flow table to be repaired, the method further includes: When the flow table replacement fails, the current flow table address is determined based on available address resources; The repaired flow table is stored in the current flow table address, and the repair of the flow table to be repaired is determined to be completed when the repaired flow table is completely stored.

4. The method according to claim 3, characterized in that, The method further includes: If the replacement of the repaired flow table fails, the target flow table address is set to an unavailable state, and the flow table to be repaired is deleted from the target flow table address.

5. The method according to claim 3, characterized in that, The method further includes: When the repaired flow table is stored, the second correspondence is updated based on the identifier of the flow table to be repaired and the current flow table address, wherein the updated second correspondence is used to determine the flow table address corresponding to the flow table identifier.

6. The method according to claim 1, characterized in that, The flow table repair instruction is triggered by at least one of the following: a second flow forwarding instruction, flow table hit time, and full flow table detection; The flow table hit time refers to the most recent time when the flow table was successfully matched by the data flow, and the full flow table detection refers to verifying each flow table in the current flow table set.

7. The method according to any one of claims 1 to 6, characterized in that, When the flow table repair instruction is triggered by the second flow forwarding instruction, the method further includes responding before the flow table repair instruction: In response to the second flow forwarding instruction, a second flow table match is performed in the second flow table set based on the second data flow, wherein the second flow table set refers to the full flow table at the time of responding to the second flow forwarding instruction; When the second flow table is successfully matched, the current verification information is generated based on the flow table information length of the matched target flow table, wherein the flow table information length is used to determine the unit verification length of the target flow table; When the current verification information fails to match the original verification information, the target flow table is determined to be the flow table to be repaired, and a flow table repair instruction is generated for the target flow table. The original verification information refers to the original standard information used to verify the target flow table.

8. The method according to claim 7, characterized in that, Before determining the target flow table as the flow table to be repaired when the current verification information fails to match the original verification information, the method further includes: The flow table generation information corresponding to the second data stream generates at least two sub-initial flow tables, wherein the target flow table includes at least two sub-initial flow tables; For each of the sub-initial flow tables, perform the following processing: generate sub-original verification information based on the sub-flow table information length of the sub-initial flow table; The at least two sub-original verification information corresponding to at least two sub-initial flow tables are determined as the original verification information.

9. The method according to any one of claims 1 to 6, characterized in that, When the flow table repair instruction is triggered by a flow table hit time, the method further includes responding before the flow table repair instruction, wherein: When the first detection time is determined based on the first period, the most recent hit time of each flow table in the third flow table set is obtained, wherein the first period refers to the period of detecting the hit time of the flow table, and the third flow table set refers to the full set of flow tables when the first detection time is reached. The flow tables whose most recent hit time is earlier than the specified time are identified as flow tables to be verified. When it is determined that the verification of the flow table to be verified has failed, the flow table to be verified is identified as the flow table to be repaired, and a flow table repair instruction is generated for the flow table to be verified.

10. The method according to any one of claims 1 to 6, characterized in that, When the flow table repair instruction is triggered by a full flow table detection, the method, prior to responding to the flow table repair instruction, further includes: When the second detection time is determined based on the second cycle, the following processing is performed on each flow table in the fourth flow table set, wherein the fourth flow table set refers to all flow tables when the second detection time arrives; When it is determined that the flow table verification fails, the flow table with the failed verification is identified as the flow table to be repaired, and a flow table repair instruction is generated for the flow table with the failed verification.

11. The method according to any one of claims 1 to 6, characterized in that, The step of responding to the flow table repair instruction by obtaining the target flow table generation information corresponding to the flow table identifier to be repaired based on the first correspondence between the flow table identifier and the flow table generation information is executed by the flow table unloading engine. The flow table unloading engine is used to send the generated flow table to the flow forwarding engine, and the flow forwarding engine is used to forward the data stream based on the flow table sent by the flow table unloading engine. The generation of the repair flow table based on the target flow table generation information is performed by the flow table unloading engine; The repair of the flow table to be repaired, based on the repair flow table, is performed by the flow table unloading engine and the flow forwarding engine.

12. A data processing apparatus, characterized in that, The data processing device includes: The relationship acquisition module is used to, in response to a first flow forwarding instruction, perform a first flow table match based on a first data flow in a first flow table set, wherein the first flow table set refers to the full set of flow tables at the time of responding to the first flow forwarding instruction; when the first flow table match fails, acquire the flow table generation information of the first data flow; generate the flow table based on the flow table generation information, and acquire the flow table identifier of the generated flow table; and obtain a first correspondence between the flow table identifier and the flow table generation information based on the combination of the flow table identifier and the flow table generation information. The information acquisition module is used to respond to the flow table repair instruction and, based on the first correspondence, acquire the target flow table generation information corresponding to the flow table identifier to be repaired; wherein, the first correspondence is data stored when the flow table is generated, the flow table generation information refers to the information used to generate the flow table, and the flow table identifier to be repaired is used to identify the flow table to be repaired corresponding to the flow table repair instruction. The flow table generation module is used to generate a repaired flow table based on the target flow table generation information; The flow table repair module is used to repair the flow table to be repaired based on the repair flow table, wherein the repair flow table is used to forward the target data flow after the repair is completed.

13. The apparatus according to claim 12, characterized in that, The flow table repair module is further configured to obtain the target flow table address corresponding to the flow table identifier to be repaired based on the second correspondence between the flow table identifier and the flow table address; replace the flow table to be repaired in the target flow table address with the repaired flow table; and determine that the repair of the flow table to be repaired is completed when the repaired flow table is successfully replaced.

14. The apparatus according to claim 13, characterized in that, The flow table repair module is further configured to determine the current flow table address based on free address resources when the flow table repair replacement fails; store the repaired flow table in the current flow table address; and determine that the repair of the flow table to be repaired is completed when the repaired flow table is completely stored.

15. The apparatus according to claim 14, characterized in that, The flow table repair module is further configured to, when the flow table repair replacement fails, set the target flow table address to an unavailable state and delete the flow table to be repaired from the target flow table address.

16. The apparatus according to claim 14, characterized in that, The flow table repair module is further configured to update the second correspondence based on the identifier of the flow table to be repaired and the current flow table address when the repaired flow table is stored, wherein the updated second correspondence is used to determine the flow table address corresponding to the flow table identifier.

17. An electronic device for data processing, characterized in that, The electronic device includes: Memory is used to store executable instructions or computer programs. A processor, when executing computer-executable instructions or computer programs stored in the memory, implements the data processing method according to any one of claims 1 to 11.

18. A computer-readable storage medium storing computer-executable instructions or a computer program, characterized in that, When the computer-executable instructions or computer program are executed by a processor, the data processing method according to any one of claims 1 to 11 is implemented.

19. A computer program product comprising computer-executable instructions or a computer program, characterized in that, When the computer-executable instructions or computer program are executed by a processor, the data processing method according to any one of claims 1 to 11 is implemented.

Citation Information

Patent Citations

  • Openflow flow table recovery method and device, electronic device and medium

    CN111404810A