Data processing system, data processing method, programmable switch and medium

By updating the data flow table in the programmable switch in real time and adjusting the flow table entries according to resource status data, the problem of insufficient anomaly detection caused by fixed flow tables is solved, and the stability and efficiency of the data processing system are improved.

CN119449746BActive Publication Date: 2025-11-18PENG CHENG LAB
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411514304.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-11-18
Estimated Expiration
2044-10-28

AI Technical Summary

Technical Problem

The fixed contents of flow table entries in programmable switches make it difficult to detect and avoid abnormal risks during data forwarding in a timely manner, resulting in low data processing efficiency.

Method used

The data processing module sends resource status data to the control module. The control module updates the data flow table based on the current resource status data, enabling adaptive and rapid adjustment, generating a flow table that adapts to the real-time environment, and timely detecting and avoiding data risks.

Benefits of technology

It improves the ability to handle anomalies and overall efficiency in the data processing process, ensuring that the data processing system operates stably in dynamic environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119449746B_ABST
    Figure CN119449746B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a data processing system, a data processing method, a programmable switch and a medium, and relate to the technical field of communication. In the data processing system, the programmable switch receives a data packet to be processed of a data input module and a data flow table of a control module, pre-processes the data packet to be processed, or transmits the data packet to be processed to a data processing module selected according to the data flow table; the data processing module performs data processing on the data packet to be processed to obtain a data processing result, and sends resource state data of itself to the control module to update the data flow table. In the data processing process based on the programmable switch, the control module adaptively and quickly adjusts the data flow table according to the currently acquired resource state data, perceives and avoids possible data risks in time during the data processing process according to the latest data flow table, quickly processes abnormal problems, and improves the overall data processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of communication, and in particular to a data processing system, a data processing method, a programmable switch and a medium. BACKGROUND

[0002] The programmable switch, also known as a software-defined network switch, supports dynamic configuration through software programming and can control the forwarding rules of data packets. The core component in the forwarding process is a flow table, which stores matching and action rules to determine the forwarding path and processing method of data packets. By adjusting the matching fields and action instructions in the flow table, fine management of traffic, optimization of network performance and security can be achieved.

[0003] In related technologies, the flow table of the programmable switch is usually defined according to actual needs. In the data forwarding process, the specific flow table entry content is fixed, which makes it difficult to timely perceive and avoid abnormal risks in the data forwarding process. SUMMARY

[0004] The main purpose of the embodiments of the present application is to propose a data processing system, a data processing method, a programmable switch and a medium, which can quickly handle abnormal problems and improve the overall data processing efficiency in the data processing process based on the programmable switch.

[0005] To achieve the above purpose, the first aspect of the embodiments of the present application proposes a data processing system based on a programmable switch, which comprises:

[0006] A data input module is configured to obtain a to-be-processed data packet.

[0007] A control module is configured to generate a data flow table.

[0008] A programmable switch is configured to receive the to-be-processed data packet and the data flow table, pre-process the to-be-processed data packet, or select one from a plurality of data processing modules based on the data flow table, and transmit the to-be-processed data packet to the selected data processing module.

[0009] The data processing module is configured to perform data processing on the to-be-processed data packet to obtain a data processing result, and to obtain resource state data of itself and send it to the control module.

[0010] The control module is further configured to update the data flow table according to the resource state data.

[0011] In some embodiments, the system further comprises a management module.

[0012] The management module is configured to receive the resource state data of the plurality of data processing modules, and generate a statistical index according to the resource state data, and send the statistical index to the control module.

[0013] The control module is further configured to update the data flow table according to the statistical index.

[0014] In some embodiments, the data processing module is configured to perform the following when obtaining the resource state data of itself and sending the resource state data to the management module:

[0015] obtain at least one of remaining CPU resource data, remaining memory resource data, remaining bandwidth resource data, resource usage rate, bandwidth delay, and a first preset network protocol, to obtain the resource state data;

[0016] In response to the sending time, the resource state data is sent to the management module.

[0017] In some embodiments, the management module is configured to perform the following when receiving the resource state data of the plurality of data processing modules and generating a statistical index according to the resource state data:

[0018] obtain the receiving time of the resource state data, and if the receiving time is within a preset time period after the sending time, generate a first service state index indicating that the service is running normally, otherwise generate a second service state index indicating that the service is running abnormally;

[0019] quantify the resource state data based on the first service state index to obtain first quantization data;

[0020] generate second quantization data containing a default value of the corresponding resource state data based on the second service state index;

[0021] generate the statistical index according to the first service state index and the first quantization data, or generate the statistical index according to the second service state index and the second quantization data.

[0022] In some embodiments, the control module is configured to perform the following when updating the data flow table according to the statistical index:

[0023] select the data processing module whose resource state data is at a first preset threshold value as a first update processing module from the statistical index;

[0024] select the data processing module whose resource state data is at a second preset threshold value as a second update processing module;

[0025] acquire the packet egress field indicated by the action in each flow table entry in the data flow table, take the packet egress field indicating the first updating processing module as a first field, and take the packet egress field indicating the second updating processing module as a second field;

[0026] acquire the first flow table entry corresponding to the first field, generate a first new flow table entry according to the flow table filtering condition corresponding to the first flow table entry, and include the second field in the action of the first new flow table entry;

[0027] if the first flow table entry is not deleted, configure the priority of the first new flow table entry to be higher than that of the first flow table entry.

[0028] In some embodiments, the control module is configured to perform the following when updating the data flow table according to the statistical indicators:

[0029] select the data processing module corresponding to the first service state indicator from the statistical indicators as a third updating processing module;

[0030] select the data processing module corresponding to the second service state indicator as a fourth updating processing module;

[0031] acquire the packet egress field indicated by the action in each flow table entry in the data flow table, take the packet egress field indicating the third updating processing module as a third field, and take the packet egress field indicating the fourth updating processing module as a fourth field;

[0032] acquire the second flow table entry corresponding to the fourth field, generate a second new flow table entry according to the flow table filtering condition corresponding to the second flow table entry, and include the third field in the action of the second new flow table entry;

[0033] if the second flow table entry is not deleted, configure the priority of the second new flow table entry to be higher than that of the second flow table entry.

[0034] In some embodiments, the control module is configured to perform the following when updating the data flow table according to the statistical indicators:

[0035] select the data processing module corresponding to the resource state data being a preset resource value from the statistical indicators as a fifth updating processing module;

[0036] acquire the flow table filtering condition, generate a fifth field indicating the fifth updating processing module as a packet egress field, and generate a third new flow table entry according to the flow table filtering condition and the fifth field.

[0037] In some embodiments, the control module is configured to perform the following when updating the data flow table according to the statistical indicators:

[0038] acquire a second preset network protocol corresponding to each flow table entry in the data flow table and a data packet egress field of an action instruction;

[0039] acquire the first preset network protocol of the data processing module corresponding to each data packet egress field from the statistical indicators;

[0040] when the first preset network protocol is different from the second preset network protocol in the flow table entry, remove the second preset network protocol in the flow table entry and add the first preset network protocol.

[0041] In some embodiments, the control module is further configured to perform the following operations:

[0042] acquire a processing state indicator of the data processing module, and take the data processing module with an idle state indicated by the processing state indicator as a sixth update processing module;

[0043] acquire a flow table filtering condition of each flow table entry in the data flow table and a data packet egress field of an action instruction, and take the flow table entry corresponding to the data packet egress field indicating the sixth update processing module as a third flow table entry;

[0044] merge at least one redundant fifth flow table entry based on the flow table filtering condition to obtain a fourth new flow table entry;

[0045] remove the third flow table entry and the fifth flow table entry in the data flow table, and add the fourth new flow table entry in the data flow table.

[0046] To achieve the above object, a second aspect of the embodiments of the present application proposes a data processing method applied to the programmable switch-based data processing system as described in any one of the first aspect, and the method comprises:

[0047] acquire a data flow table from the control module and a to-be-processed data packet from the data input module;

[0048] preprocess the to-be-processed data packet, or select one from a plurality of data processing modules based on the data flow table, and transmit the to-be-processed data packet to the selected data processing module, so that the data processing module performs data processing on the to-be-processed data packet to obtain a data processing result, and acquires resource state data of itself and sends the resource state data to the control module, and the control module updates the data flow table according to the resource state data.

[0049] To achieve the above object, a third aspect of the embodiments of the present application provides a programmable switch, the programmable switch comprising a memory and a processor, the memory storing a computer program, and the processor implementing the method of the second aspect when executing the computer program.

[0050] To achieve the above object, a fourth aspect of the embodiments of the present application provides a storage medium, the storage medium being a storage medium, the storage medium storing a computer program, and the computer program implementing the method of the second aspect when executed by a processor.

[0051] The data processing system, the data processing method, the programmable switch and the medium provided by the embodiments of the present application, wherein the data processing system based on the programmable switch comprises a data input module, a control module, a programmable switch and a data processing module. Specifically, the data input module is configured to obtain a data packet to be processed; the control module is configured to generate a data flow table; the programmable switch is configured to receive the data packet to be processed and the data flow table, pre-process the data packet to be processed, or select one from a plurality of data processing modules based on the data flow table, and transmit the data packet to be processed to the selected data processing module; the data processing module is configured to perform data processing on the data packet to be processed to obtain a data processing result, and configured to obtain resource state data of itself and send the resource state data to the control module; and the control module is further configured to update the data flow table according to the resource state data. In the data processing process based on the programmable switch, the resource state data of the data processing module is first sent to the control module, and then the control module updates the data flow table according to the current obtained resource state data. In this way, the data flow table is adaptively and quickly adjusted, so that a data flow table suitable for a real-time environment is obtained, so that in the data processing process, the latest data flow table can be used to timely perceive and avoid possible data risks, so as to quickly handle abnormal problems and improve the overall data processing efficiency. BRIEF DESCRIPTION OF DRAWINGS

[0052] Figure 1 is a structural schematic diagram of the data processing system based on the programmable switch provided by the embodiments of the present application.

[0053] Figure 2 is a step flowchart diagram executed by the data processing module when obtaining the resource state data of itself and sending the resource state data to the management module.

[0054] Figure 3 is a step flowchart diagram executed by the management module when generating a statistical index according to the resource state data.

[0055] Figure 4is a step flowchart provided by the control module according to the statistical index to update the data flow table.

[0056] Figure 5 is another step flowchart provided by the control module to update the data flow table according to the statistical index.

[0057] Figure 6 is another step flowchart provided by the control module to update the data flow table according to the statistical index.

[0058] Figure 7 is another step flowchart provided by the control module to update the data flow table according to the statistical index.

[0059] Figure 8 is another function flowchart of the control module.

[0060] Figure 9 is an optional flowchart of the data processing method provided by the embodiment of the present application.

[0061] Figure 10 is a hardware structure schematic diagram of the programmable switch provided by the embodiment of the present application. DETAILED DESCRIPTION

[0062] In order to make the purpose, technical scheme and advantages of the present application more clear, the present application is further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.

[0063] It should be noted that although the functional modules are divided in the device schematic diagram, and the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order from the module division in the device or the order in the flowchart.

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

[0065] The programmable switch, also known as software-defined network switch, supports dynamic configuration through software programming, and can control the forwarding rules of data packets. The core component in the forwarding process is the flow table, which stores matching and action rules to determine the forwarding path and processing method of data packets. By adjusting the matching fields and action instructions in the flow table, fine management of traffic, optimization of network performance and security can be achieved.

[0066] The flow table of the programmable switch in the related art is usually defined according to actual needs, and the content of the specific flow table entry is fixed in the data forwarding process, which makes it difficult to perceive and avoid abnormal risks in the data forwarding process in time.

[0067] Based on this, the embodiment of the application provides a data processing system, a data processing method, a programmable switch and a medium. In the data processing process based on the programmable switch, first, the data processing module sends its own resource state data to the control module, and then the control module updates the data flow table according to the currently obtained resource state data. In this way, the data flow table is adaptively and quickly adjusted, so that a data flow table suitable for the real-time environment is obtained, so that the data processing process can perceive and avoid possible data risks in time according to the latest data flow table, so as to quickly handle abnormal problems and improve the overall data processing efficiency.

[0068] The embodiment of the application provides a data processing system, a data processing method, a programmable switch and a medium, which are specifically described as follows. First, the data processing system based on the programmable switch in the embodiment of the application is described.

[0069] In an embodiment, refer to Figure 1 , Figure 1 is a structural schematic diagram of the data processing system based on the programmable switch provided by the embodiment of the application. In combination with Figure 1 , the data processing system shown includes a data input module, a control module, a programmable switch and a data processing module which are independent of each other. If there is a communication requirement between different modules in the data processing system, the communication is performed in the form of a socket. Figure 1 In the figure, the solid line represents the data flow, the dashed line represents the control flow, and the arrow direction represents the transmission direction of the data flow or the control flow.

[0070] In an embodiment, the data input module is used to obtain a data packet to be processed. The data packet to be processed here can be forwarded to the data input module by other sources, or can be generated by the data input module itself. The specific source of the data packet to be processed can be determined according to the actual application scenario, and the embodiment does not limit this.

[0071] In an embodiment, the control module stores a data flow table, wherein the data flow table includes a plurality of flow table entries with different priorities. The flow table entry, also known as a flow table rule, includes a set of flow table filtering conditions or a plurality of actions. The flow table filtering conditions are used to filter the data packet corresponding to the flow table entry, and the actions can determine the processing mode of the selected data packet. The flow table entries are selected one by one to perform the data packet matching process.

[0072] In one embodiment, the control module sends the data flow table to the programmable switch, while the programmable switch receives the data packets to be processed forwarded by the data input module. At this time, the flow table filtering conditions in the flow table entries include, but are not limited to, the following fields: packet ingress field, Ethernet MAC source address field, Ethernet MAC destination address field, IP source address field, IP destination address field, source port field, destination port field, priority field, and transport protocol field. Therefore, the programmable switch selects flow table entries according to priority and then determines whether the data packet to be processed can match the flow table entry based on the flow table filtering conditions of the flow table entry. For example, a certain flow table entry only matches data from a specific packet ingress or a specific IP source address. If the flow table filtering conditions are met, the flow table entry is successfully matched, and the corresponding operation is performed on the data packet to be processed according to the action of the flow table entry. For example, the action of the flow table entry can be: forwarding the data packet to a specified packet egress (here, the packet egress is stored in the flow table entry as a packet egress field, and each packet egress field can correspond to a specific data processing module), discarding the data packet, modifying the packet header information, etc. Operations other than forwarding the data packet to a specified packet egress are called preprocessing. Therefore, programmable switches can preprocess data packets or perform forwarding operations on them. When forwarding data packets, the switch first selects one of multiple data processing modules based on the packet exit field of the flow table entry matched in the flow table. This selected module is then used to receive the data packets, and the data packets are transmitted to the selected module.

[0073] In one embodiment, after receiving a data packet to be processed, the data processing module parses the packet header information to determine its source, destination, protocol type, and other key attributes. Then, based on actual processing requirements, such as routing, load balancing, and security policies, the module performs data processing on the data packet to obtain the corresponding processing result. For example, if it is necessary to forward the data packet from one interface to another, the data processing module will look up the routing table to determine the best forwarding path and modify information such as the destination MAC address and VLAN identifier of the data packet.

[0074] In one embodiment, during data processing, the data processing module also monitors and acquires its own resource status data in real time. This resource status data can be used to evaluate the performance and stability of the data processing module. Finally, the acquired resource status data is sent to the control module.

[0075] It is understood that the data processing system of the programmable switch in this embodiment may process multiple data packets in parallel. Therefore, other busy data processing modules will also send their own resource status data to the control module. Furthermore, even idle data processing modules need to send resource status data to the control module. In other words, in this embodiment, the control module receives resource status data from all data processing modules for unified scheduling and management.

[0076] In one embodiment, reference is made to Figure 1 The data processing system based on a programmable switch also includes a management module. This management module receives resource status data from multiple data processing modules, generates statistical indicators based on this data, and sends these indicators to the control module. The control module then updates the data flow table based on the statistical indicators. The reason for setting up a management module is that the control module undertakes core control tasks, requiring data flow table generation and updates, which consumes significant computing and storage resources. Therefore, having the management module handle the statistical processing of resource status data from the data processing modules avoids a heavy computational burden on the control module, thereby improving the overall system efficiency. It is understandable that a separate management module could be omitted, and its functions integrated into the control module.

[0077] In one embodiment, reference is made to Figure 2 , Figure 2 This is a flowchart illustrating the steps performed by the data processing module provided in this application embodiment when it obtains its own resource status data and sends it to the management module. Specifically, it includes the following steps:

[0078] Step 210: Obtain at least one of the following: remaining CPU resource data, remaining memory resource data, remaining bandwidth resource data, resource utilization rate, bandwidth latency, and a first preset network protocol, to obtain resource status data.

[0079] Step 220: In response to the sending time, send the resource status data to the management module.

[0080] In one embodiment, after the data processing module obtains the corresponding remaining CPU resource data, remaining memory resource data, remaining bandwidth resource data, resource utilization rate, bandwidth latency, and a first preset network protocol, it sends the resource status data to the management module at the agreed-upon sending time. This sending time can be periodic or real-time, and can be set according to actual conditions; this embodiment does not limit this.

[0081] In one embodiment, remaining CPU resource data refers to the unused CPU processing capacity in the data processing module. This data reflects the current CPU load of the data processing module and is crucial for determining whether the module can handle more tasks or requires load balancing. Higher remaining CPU resources mean the module is relatively idle and can handle more computational tasks; lower remaining CPU resources may indicate the module is under significant pressure. Remaining memory resource data refers to the unused memory capacity in the data processing module. Memory is a vital component for running programs and storing data, so understanding remaining memory is essential for ensuring stable system operation. By monitoring the remaining memory resources of the data processing module, performance can be improved through optimization of memory usage. Remaining bandwidth resource data refers to the unused data transmission capacity in the network connection. High remaining bandwidth means the network transmission of the corresponding data processing module is smooth and can support more data transmission tasks; low remaining bandwidth may lead to network latency and data loss. Resource utilization is a comprehensive indicator reflecting the overall usage of resources such as CPU, memory, and disk I / O. Monitoring resource utilization provides insight into the overall load of the data processing module. Bandwidth latency refers to the time required for data to travel from the programmable switch to the data processing module, and is used to measure the network performance between the two. The first preset network protocol refers to the network protocol used by the data processing module for data processing; this first network protocol can be IPv4 or IPv6, etc.

[0082] In one embodiment, after the management module receives resource status data from multiple data processing modules, it needs to statistically organize and process the resource status data. (Refer to...) Figure 3 , Figure 3 This is a flowchart illustrating the steps performed by the management module in this application embodiment when generating statistical indicators based on resource status data. Specifically, it includes the following steps:

[0083] Step 310: Obtain the reception time of resource status data. If the reception time is within a preset time period after the transmission time, generate a first service status indicator indicating that the service is running normally; otherwise, generate a second service status indicator indicating that the service is running abnormally.

[0084] In one embodiment, considering that if the data processing module does not send resource status data for an extended period, it is considered that the data processing module has timed out, potentially indicating a performance anomaly. In this case, corresponding anomaly information needs to be generated. Therefore, in this embodiment, the management module determines whether an anomaly is present based on the reception time of the resource status data. It is understood that the transmission time of each data processing module can be predetermined. Therefore, the judgment can be made based on the time difference between the reception time and the transmission time. If the reception time is within a preset time period after the transmission time, a first service status indicator indicating normal service operation is generated; otherwise, a second service status indicator indicating abnormal service operation is generated. This preset time period can be set according to actual needs. Furthermore, if the data processing module does not send resource status data, and the management module does not receive resource status data within the preset time period, the reception time is set to outside the preset time period to ensure that a second service status indicator indicating abnormal service operation is generated in this situation.

[0085] Step 320: Based on the first service status indicator, quantify the resource status data to obtain the first quantified data.

[0086] In one embodiment, if the service is running normally, at least the remaining CPU resource data, remaining memory resource data, remaining bandwidth resource data, resource utilization, bandwidth latency, and the first preset network protocol are quantified and represented as a unified format of numbers.

[0087] Step 330: Based on the second service status indicator, generate second quantitative data containing default values ​​of the corresponding resource status data.

[0088] In one embodiment, if the service malfunctions, a second service status indicator is first generated. Then, default values ​​representing anomalies in remaining CPU resources, remaining memory resources, remaining bandwidth resources, and the first preset network protocol are generated, resulting in second quantified data. It is understood that the second quantified data and the first quantified data have similar data formats; the only difference is that the corresponding values ​​in the second quantified data are default values ​​representing the anomalies. For example, the default value for remaining CPU resources is 0, the default value for remaining memory resources is 0, the default value for remaining bandwidth resources is 0, the default value for resource utilization is 0, the default value for bandwidth latency is NULL, and the default value for the first preset network protocol is NULL, etc.

[0089] Step 340: Generate statistical indicators based on the first service status indicator and the first quantitative data, or generate statistical indicators based on the second service status indicator and the second quantitative data.

[0090] In one embodiment, for cases where the service is operating normally, the first service status indicator and the first quantified data of the corresponding data processing module are concatenated to generate a statistical indicator. For cases where the service is operating abnormally, the second service status indicator and the second quantified data of the corresponding data processing module are concatenated to generate a statistical indicator.

[0091] After the above process, refer to Figure 1 After the management module generates statistical indicators, it sends these indicators to the control module. Upon receiving the statistical indicators, the control module updates the data flow table using them. In one embodiment, refer to... Figure 4 , Figure 4 This is a flowchart illustrating the steps performed by the control module in this application embodiment when updating the data flow table based on statistical indicators, specifically including the following steps:

[0092] Step 410: Select the data processing module whose resource status data is at the first preset threshold from the statistical indicators as the first update processing module.

[0093] In one embodiment, if the processing resources (e.g., CPU resources, memory resources, or bandwidth resources) of a certain data processing module are about to be exhausted, then during the processing of the programmable switch, it is necessary to reduce the data traffic of that data processing module and coordinate the corresponding data traffic to other data processing modules with sufficient processing resources. Therefore, the data processing module whose resource status data is at a first preset threshold is selected from the statistical indicators as the first update processing module. Here, the first preset threshold is used to indicate that the corresponding processing resources are about to be exhausted. It is understood that different resource status data correspond to related first preset thresholds, such as a first CPU resource preset threshold, a first memory resource preset threshold, and a first bandwidth resource preset threshold, etc.

[0094] Step 420: Select the data processing module whose resource status data is at the second preset threshold as the second update processing module.

[0095] In one embodiment, it is also necessary to determine the data processing module with sufficient processing resources. Therefore, the data processing module whose resource status data is at a second preset threshold is selected as the second update processing module. Here, the second preset threshold is used to indicate that the corresponding processing resources still have a lot of free time. For example, taking the remaining memory resource data as an example, the first preset threshold can be 2% to 5%, and the second preset threshold can be 50% to 99%, etc. The specific values ​​here can be set according to the actual situation, and this application embodiment does not make specific limitations on this.

[0096] Step 430: Obtain the packet exit field of the action indication in each flow table entry in the data flow table, take the packet exit field indicating the first update processing module as the first field, and take the packet exit field indicating the second update processing module as the second field.

[0097] In one embodiment, for a data flow table, the packet exit field included in the action of each flow table entry is obtained. The packet exit field is used to indicate the data forwarding destination of the flow table entry, that is, which data processing module it is forwarded to. At this time, the packet exit field indicating forwarding to the first update processing module is used as the first field, and the packet exit field indicating forwarding to the second update processing module is used as the second field.

[0098] Step 440: Obtain the first flow table entry corresponding to the first field, and generate the first new flow table entry based on the flow table filtering conditions corresponding to the first flow table entry.

[0099] In one embodiment, a first flow table entry corresponding to the first field is obtained. The first flow table entry forwards the data to be processed to the first update processing module. At this time, the data needs to be scheduled to the second update processing module, generating a new flow table entry, denoted as the first new flow table entry. The flow table filtering conditions of the first new flow table entry are consistent with those of the first flow table entry to ensure that if the data packet to be processed can match the first flow table entry, it will also match the first new flow table entry. The action of the first new flow table entry specifies its data packet exit field as the second field. In this way, the first new flow table entry can forward the data packet to be processed, which should have been forwarded to the first update processing module, to the second update processing module. It is understood that when generating the first new flow table entry based on the flow table filtering conditions corresponding to the first flow table entry, it is also necessary to combine the action corresponding to the first flow table entry and perform operations such as copying or modifying the behavior according to actual needs, and then add the action to the first new flow table entry. At the same time, the first new flow table entry also includes other necessary field data, which is not limited in this embodiment.

[0100] Step 450: If the first flow entry has not been deleted, configure the first new flow entry to have a higher priority than the first flow entry.

[0101] In one embodiment, once a first new flow entry corresponding to the first flow entry is generated, the first flow entry can be deleted. If the first flow entry is not deleted, the priority of the first new flow entry can be configured to be higher than that of the first flow entry, ensuring that the first new flow entry can be matched before the first flow entry.

[0102] For example, if the computing resources of a data processing module C1 are about to be exhausted—for instance, the utilization rate of one of its resources, such as CPU, memory, or bandwidth, is about to reach its limit—while data processing module C2 has more idle resources, the flow table entry for data processing module C1 is adjusted to schedule data traffic, thereby reducing the data traffic of data processing module C1 and increasing the data traffic of data processing module C2. It is understandable that when the resource usage of data processing module C1 decreases and it can resume processing data packets, it may, based on the aforementioned preset resource threshold, become a second update processing module and re-participate in the data processing process.

[0103] In one embodiment, reference is made to Figure 5 , Figure 5 This is a flowchart illustrating another step performed by the control module provided in this application embodiment when updating the data flow table based on statistical indicators, specifically including the following steps:

[0104] Step 510: Select the data processing module corresponding to the first service status indicator from the statistical indicators as the third update processing module.

[0105] Step 520: Select the data processing module corresponding to the second service status indicator as the fourth update processing module.

[0106] In one embodiment, the data processing module with normal service operation status is referred to as the third update processing module, and the data processing module with abnormal service operation status is referred to as the fourth update processing module.

[0107] Step 530: Obtain the packet exit field of the action indication in each flow table entry in the data flow table, take the packet exit field indicating the third update processing module as the third field, and take the packet exit field indicating the fourth update processing module as the fourth field.

[0108] In one embodiment, for the data flow table, the data packet exit field indicating forwarding to the third update processing module is used as the third field, and the data packet exit field indicating forwarding to the fourth update processing module is used as the fourth field.

[0109] Step 540: Obtain the second flow table entry corresponding to the fourth field, and generate a second new flow table entry based on the flow table filtering conditions corresponding to the second flow table entry.

[0110] In one embodiment, the second flow table entry corresponding to the fourth field is obtained. The second flow table entry forwards the data to be processed to the fourth update processing module. At this time, the data needs to be scheduled to the third update processing module. Therefore, a new flow table entry is generated, which is denoted as the second new flow table entry. The flow table filtering conditions of the second new flow table entry are consistent with those of the second flow table entry to ensure that if the data packet to be processed can match the second flow table entry, it will also match the second new flow table entry. At the same time, the action of the second new flow table entry specifies its data packet exit field as the third field. In this way, the second new flow table entry can forward the data packet to be processed that should be forwarded to the fourth update processing module to the third update processing module.

[0111] It is understandable that when generating a second new flow entry based on the flow table filtering conditions corresponding to the second flow entry, it is also necessary to combine the action corresponding to the second flow entry. For example, after copying or modifying the behavior according to actual needs, the action is also added to the second new flow entry. At the same time, the second new flow entry also includes other necessary field data, which is not limited in this embodiment.

[0112] Step 550: If the second flow entry has not been deleted, configure the priority of the second new flow entry to be higher than that of the second flow entry.

[0113] In one embodiment, once a second new flow entry corresponding to the second flow entry is generated, the second flow entry can be deleted. If the second flow entry is not deleted, the priority of the second new flow entry can be configured to be higher than that of the second flow entry, ensuring that the second new flow entry is matched before the second flow entry.

[0114] In one embodiment, for a data flow table, the destination port field of each flow table entry is statistically analyzed, and the destination port field indicating the third update processing module and the destination port field indicating the fourth update processing module are selected. The destination port field indicating the fourth update processing module in the flow table entry is updated to the destination port field indicating the third update processing module, so that the data packets that should have been scheduled to the abnormal fourth update processing module are scheduled to the normal third update processing module, thereby updating the flow table entry.

[0115] For example, if data processing module C3 fails to report resource status data within a timeout period, the management module considers data processing module C3 to be abnormal and generates a corresponding second service status indicator. Therefore, it adjusts the flow table entry for data processing module C3 in the data flow table, performing data traffic scheduling to redirect data traffic from data processing module C3 to other data processing modules that are running normally. Understandably, when data processing module C3 is running normally and can continue processing data packets, it may, based on the aforementioned preset time period, become a third update processing module and re-participate in the data processing process.

[0116] In one embodiment, reference is made to Figure 6 , Figure 6 This is a flowchart illustrating another step performed by the control module provided in this application embodiment when updating the data flow table based on statistical indicators, specifically including the following steps:

[0117] Step 610: Select the data processing module that uses the resource status data as the preset resource value from the statistical indicators as the fifth update processing module.

[0118] In one embodiment, if a new data processing module is added, it reports resource status data to the management module according to the agreed-upon protocol. The management module judges the data based on the specific resource status data. If the resource status data matches a preset resource value, such as 100% or 99% of the remaining CPU resources, the module is considered a new data processing module and is included as the fifth update processing module in the subsequent data processing process. It is understood that the preset resource value here can also be a threshold value, set according to the actual situation.

[0119] Step 620: Obtain the flow table filtering conditions, generate an instruction to use the fifth update processing module as the fifth field of the packet egress field, and generate a third new flow table entry based on the flow table filtering conditions and the fifth field.

[0120] In one embodiment, according to the newly added fifth update processing module, flow table filtering conditions are set according to actual needs, and a new flow table entry is generated according to the flow table filtering conditions, which is denoted as the third new flow table entry. The data packet exit field corresponding to the action in the third new flow table entry is the fifth field, which can instruct the third new flow table entry to forward the acquired data to the fifth update processing module.

[0121] Understandably, flow table entries include not only flow table filtering conditions and packet exit fields, but also other necessary fields, such as actions. After generating a third new flow table entry, it is added to the data flow table, thereby updating the flow table entry.

[0122] For example, if a data processing module C4 is a newly added data processing module, then data flow scheduling can be performed according to the corresponding new flow table entry, and the data packets to be processed can be scheduled to data processing module C4 to participate in the data processing process.

[0123] In one embodiment, reference is made to Figure 7 , Figure 7 This is a flowchart illustrating another step performed by the control module provided in this application embodiment when updating the data flow table based on statistical indicators, specifically including the following steps:

[0124] Step 710: Obtain the second preset network protocol and the data packet exit field of the action indication corresponding to each flow table entry in the data flow table.

[0125] In one embodiment, the second preset network protocol refers to the network protocol of the data to be processed in the data input module that the flow table entry can receive. This second network protocol can be IPv4 or IPv6, etc. Simultaneously, it is also necessary to obtain the packet exit field of each flow table entry, that is, to locate the data processing module that forwards the data for each flow table entry.

[0126] Step 720: Obtain the first preset network protocol of the data processing module corresponding to the exit field of each data packet from the statistical indicators.

[0127] In one embodiment, if the first preset network protocol is different from the second preset network protocol, the corresponding data processing module and data input module are considered to be heterogeneous networks.

[0128] Step 730: When the first preset network protocol and the second preset network protocol in the flow table entry are different, remove the second preset network protocol from the flow table entry and add the first preset network protocol.

[0129] In one embodiment, to achieve data processing between heterogeneous networks, the data packets to be processed need to be converted according to the protocol in the programmable switch before being forwarded to the corresponding data processing module. This action needs to be set in the data flow table to instruct the programmable switch to execute the action. Therefore, a second preset network protocol is removed from the data flow table, and a first preset network protocol is added. For example, if the first preset network protocol is IPv6 and the second preset network protocol is IPv4, the following modification can be made at the action position in the flow table entry: remove_header:ipv4, add_header:ipv6. This modification adds the first preset network protocol to the relevant flow table entry, enabling seamless connection between the data input module and the data processing module of the heterogeneous network.

[0130] In one embodiment, the programmable switch performs corresponding data conversion operations on the data packets to be processed in the data plane, thereby realizing the data processing and forwarding functions of heterogeneous networks at the data layer.

[0131] For example, if the second preset network protocol of a data input module C5 is IPv4, and the first preset network protocol of a data processing module C6 is IPv6, then the two constitute a heterogeneous network. Therefore, the second preset network protocol needs to be removed from the flow table entry of the data processing module C6, and the first preset network protocol needs to be added. This is to instruct the programmable switch to convert the data packets to be processed into the first preset network protocol before transmitting them to the data processing module C6 for data processing.

[0132] In one embodiment, reference is made to Figure 8 , Figure 8 This is another functional flowchart of the control module provided in the embodiments of this application, which specifically includes the following steps:

[0133] Step 810: Obtain the processing status index of the data processing module, and designate the data processing module whose processing status index indicates that it is in an idle state as the sixth update processing module.

[0134] In one embodiment, in order to improve data utilization, the processing status indicators of each data processing module can be obtained. For example, if a certain data processing module has not participated in the data processing process for a long time, its processing status indicator is considered to indicate an idle state, and it is regarded as the sixth update processing module.

[0135] Step 820: Obtain the packet exit field of the flow table filtering conditions and action indication for each flow table entry in the data flow table, and take the flow table entry corresponding to the packet exit field indicating the sixth update processing module as the third flow table entry.

[0136] In one embodiment, a flow table entry whose destination is the sixth update module is forwarded as a third flow table entry, and the packet exit field of the third flow table entry indicates the sixth update processing module.

[0137] Step 830: Merge at least one redundant fifth flow table entry based on the flow table filtering conditions to obtain a fourth new flow table entry.

[0138] In one embodiment, the filtering conditions of multiple flow table entries may be completely covered by a single flow table entry. For example, if there were originally three flow table entries, merging them into one flow table entry covers the traffic that originally needed to be forwarded. In this case, the original flow table entries are redundant. The redundant one is designated as the fifth flow table entry, and the merged one is designated as the fourth new flow table entry. Assume there are two flow table entries, f1 and f2, both with the filtering condition "source IP address equals xxx". However, flow table entry f1 forwards traffic to data processing module 1, while flow table entry f2 forwards traffic to data processing module 2. If it is now necessary to forward all traffic from this xxx subnet to data processing module 1, a new flow table entry f3 can be created. Its filtering condition remains "source IP address equals xxx", but its action is changed to forward traffic to data processing module 1. In this way, flow entry f3 covers the functions of flow entries f1 and f2, making flow entries f1 and f2 redundant. At this point, flow entries f1 and f2 are the fifth flow entries, and flow entry f3 is the fourth new flow entry.

[0139] It is understood that, in the embodiments of this application, whenever a new flow table entry is generated, whether it is the first new flow table entry, the second new flow table entry, the third new flow table entry, or the fourth new flow table entry, the flow table filtering conditions, actions, and other related data of the new flow table entry will be determined according to the requirements.

[0140] Step 840: Remove the third and fifth flow table entries from the data flow table, and add a fourth new flow table entry to the data flow table.

[0141] In one embodiment, the third and fifth flow table entries are removed from the data flow table, and a fourth new flow table entry is added to the data flow table to achieve redundancy processing of the data flow table.

[0142] Through the above process, in this embodiment, the management module collects and analyzes whether there is a risk of data forwarding anomalies in each data processing module. Then, the management module uses a pre-set program to analyze and statistically analyze the data results, generate statistical indicators, and send them to the control module. The control module adapts to modify or generate flow table entries based on the statistical indicators, updating the data flow table. Especially during the update process, when the data input module and the data processing module are in a heterogeneous network, relevant instructions for network protocol conversion are defined in the flow table entries, enabling the programmable switch to adaptively process information such as packet headers, realizing data flow forwarding between heterogeneous networks.

[0143] In related technologies, programmable switches (PLS) often fail to promptly detect and mitigate risks of data flow forwarding failures or anomalies in scenarios involving large-scale network data processing and forwarding. Furthermore, the data flow tables within PLS are relatively fixed and cannot be quickly adjusted and updated based on changes in traffic and the external environment. The data processing system based on a PLS in this application embodiment can promptly detect and mitigate potential risks during data packet processing and forwarding, ensuring the normal operation of the entire data processing system and overcoming the shortcomings of PLS, such as poor risk detection and mitigation capabilities and untimely response.

[0144] The data processing system based on a programmable switch in this embodiment includes a data input module, a control module, a programmable switch, and a data processing module. Specifically, the data input module is used to acquire data packets to be processed; the control module is used to generate a data flow table; the programmable switch is used to receive the data packets to be processed and the data flow table, preprocess the data packets to be processed, or select one from multiple data processing modules based on the data flow table and transmit the data packets to be processed to the selected data processing module; the data processing module is used to process the data packets to be processed to obtain data processing results, and to acquire its own resource status data and send it to the control module; the control module is also used to update the data flow table according to the resource status data. In the data processing process based on the programmable switch in this embodiment, the data processing module first sends its own resource status data to the control module, and then the control module updates the data flow table according to the currently acquired resource status data. In this way, the data flow table is adaptively and quickly adjusted to obtain a data flow table adapted to the real-time environment. This allows for timely detection and avoidance of potential data risks during the data processing process based on the latest data flow table, thereby quickly handling abnormal problems and improving the overall data processing efficiency.

[0145] The following describes a data processing method in an embodiment of this application, which is applied to a data processing system based on a programmable switch as described in any of the above embodiments.

[0146] Figure 9 This is an optional flowchart of the data processing method provided in the embodiments of this application. Figure 9 The method may include, but is not limited to, steps 910 to 920. It is also understood that this embodiment... Figure 9 The order of steps 910 to 920 is not specifically limited, and the order of steps can be adjusted or some steps can be reduced or added according to actual needs.

[0147] Step 910: Obtain the data packet to be processed from the data input module and the data flow table from the control module.

[0148] In one embodiment, a programmable switch is used as the execution subject of the method. In this case, the programmable switch first obtains the data packet to be processed from the data input module and the data flow table from the control module.

[0149] Step 920: Preprocess the data packet to be processed, or select one of multiple data processing modules based on the data flow table, and transmit the data packet to the selected data processing module.

[0150] In one embodiment, after the data processing module receives the data to be processed, it performs data processing on the data packet to obtain the data processing result, and obtains its own resource status data and sends it to the control module. The control module updates the data flow table based on the resource status data.

[0151] The specific implementation method of the data processing method in this embodiment is basically the same as the specific implementation method of the data processing system based on the programmable switch described above, and will not be repeated here.

[0152] This application also provides a programmable switch, including:

[0153] At least one memory;

[0154] At least one processor;

[0155] At least one program;

[0156] The program is stored in a memory, and the processor executes the at least one program to implement the data processing method described above in this application.

[0157] Please see Figure 10 , Figure 10 The hardware structure of a programmable switch according to another embodiment is illustrated. The programmable switch includes:

[0158] The processor 1001 can be implemented using a general-purpose central processing unit (CPU), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application.

[0159] The memory 1002 can be implemented as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1002 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1002 and is called and executed by the processor 1001 using the data processing method of the embodiments of this application.

[0160] Input / output interface 1003 is used to implement information input and output;

[0161] Communication interface 1004 is used to enable communication and interaction between this device and other devices. Communication can be achieved via wired means (e.g., USB, Ethernet cable) or wireless means (e.g., mobile network, Wi-Fi, Bluetooth).

[0162] Bus 1005 transmits information between various components of the device (e.g., processor 1001, memory 1002, input / output interface 1003, and communication interface 1004);

[0163] The processor 1001, memory 1002, input / output interface 1003 and communication interface 1004 are connected to each other within the device via bus 1005.

[0164] This application embodiment also provides a storage medium that stores a computer program, which, when executed by a processor, implements the above-described data processing method.

[0165] Memory, as a non-transitory storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0166] The data processing system, data processing method, programmable switch, and medium proposed in this application embodiment include a data input module, a control module, a programmable switch, and a data processing module. Specifically, the data input module is used to acquire data packets to be processed; the control module is used to generate a data flow table; the programmable switch is used to receive the data packets to be processed and the data flow table, preprocess the data packets to be processed, or select one from multiple data processing modules based on the data flow table and transmit the data packets to be processed to the selected data processing module; the data processing module is used to process the data packets to be processed to obtain data processing results, and to acquire its own resource status data and send it to the control module; the control module is also used to update the data flow table according to the resource status data. In the data processing process based on the programmable switch in this application embodiment, the data processing module first sends its own resource status data to the control module, and then the control module updates the data flow table according to the currently acquired resource status data. In this way, the data flow table is adaptively and quickly adjusted to obtain a data flow table adapted to the real-time environment. This allows for timely detection and avoidance of potential data risks during the data processing process based on the latest data flow table, thereby quickly handling abnormal problems and improving the overall data processing efficiency.

[0167] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0168] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0169] The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0170] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / modules in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0171] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or modules is not necessarily limited to those steps or modules explicitly listed, but may include other steps or modules not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0172] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0173] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between apparatuses or modules, and may be electrical, mechanical, or other forms.

[0174] The modules described above as separate components may or may not be physically separate. Similarly, the components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0175] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.

[0176] If the integrated module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0177] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.

Claims

1. A data processing system based on a programmable switch, characterized in that, include: Data input module: used to acquire data packets to be processed; Control module: Used to generate data flow tables; Programmable switch: Used to receive the data packet to be processed and the data flow table, select one of multiple data processing modules based on the data flow table, and transmit the data packet to be processed to the selected data processing module; The data processing module is used to process the data packet to be processed to obtain the data processing result, and to obtain its own resource status data and send it to the control module. The control module is also used to update the data flow table based on the resource status data.

2. The data processing system based on a programmable switch according to claim 1, characterized in that, The system also includes: a management module; The management module is used to receive resource status data from multiple data processing modules, generate statistical indicators based on the resource status data, and send the statistical indicators to the control module. The control module is also used to update the data flow table based on the statistical indicators.

3. The data processing system based on a programmable switch according to claim 2, characterized in that, The data processing module is used to execute the following when acquiring its own resource status data and sending it to the management module: The resource status data is obtained by acquiring at least one of the following: remaining CPU resource data, remaining memory resource data, remaining bandwidth resource data, resource utilization rate, bandwidth latency, and a first preset network protocol. In response to the sending time, the resource status data is sent to the management module.

4. The data processing system based on a programmable switch according to claim 3, characterized in that, The management module is used to receive resource status data from multiple data processing modules and to perform the following when generating statistical indicators based on the resource status data: The resource status data is obtained by receiving the time. If the receiving time is within a preset time period after the sending time, a first service status indicator indicating that the service is running normally is generated; otherwise, a second service status indicator indicating that the service is running abnormally is generated. Based on the first service status indicator, the resource status data is quantified to obtain the first quantified data; Based on the second service status indicator, generate second quantitative data containing default values ​​of the corresponding resource status data; The statistical indicator is generated based on the first service status indicator and the first quantitative data, or the statistical indicator is generated based on the second service status indicator and the second quantitative data.

5. The data processing system based on a programmable switch according to claim 3, characterized in that, The control module is used to perform the following when updating the data flow table based on the statistical indicators: The data processing module whose resource status data is at a first preset threshold is selected from the statistical indicators as the first update processing module; The data processing module whose resource status data is at a second preset threshold is selected as the second update processing module; Obtain the data packet exit field of the action indication in each flow table entry of the data flow table, take the data packet exit field indicating the first update processing module as the first field, and take the data packet exit field indicating the second update processing module as the second field; Obtain the first flow table entry corresponding to the first field, and generate a first new flow table entry based on the flow table filtering conditions corresponding to the first flow table entry. The action of the first new flow table entry includes the second field. If the first flow table entry is not deleted, configure the first new flow table entry to have a higher priority than the first flow table entry.

6. The data processing system based on a programmable switch according to claim 4, characterized in that, The control module is used to perform the following when updating the data flow table based on the statistical indicators: Select the data processing module corresponding to the first service status indicator from the statistical indicators as the third update processing module; The data processing module corresponding to the second service status indicator is selected as the fourth update processing module; Obtain the data packet exit field of the action indication in each flow table entry of the data flow table, take the data packet exit field indicating the third update processing module as the third field, and take the data packet exit field indicating the fourth update processing module as the fourth field; Obtain the second flow table entry corresponding to the fourth field, and generate a second new flow table entry based on the flow table filtering conditions corresponding to the second flow table entry. The action of the second new flow table entry includes the third field. If the second flow table entry is not deleted, configure the second new flow table entry to have a higher priority than the second flow table entry.

7. The data processing system based on a programmable switch according to claim 3, characterized in that, The control module is used to perform the following when updating the data flow table based on the statistical indicators: The data processing module that selects the resource status data as the preset resource value from the statistical indicators is used as the fifth update processing module; Obtain the flow table filtering conditions, generate an instruction to use the fifth update processing module as the fifth field of the packet egress field, and generate a third new flow table entry based on the flow table filtering conditions and the fifth field.

8. The data processing system based on a programmable switch according to claim 3, characterized in that, The control module is used to perform the following when updating the data flow table based on the statistical indicators: Obtain the data packet exit field corresponding to the second preset network protocol and action indication for each flow table entry in the data flow table; Obtain the first preset network protocol of the data processing module corresponding to each data packet egress field from the statistical indicators; When the first preset network protocol and the second preset network protocol in the flow table entry are different, the second preset network protocol is removed from the flow table entry and the first preset network protocol is added.

9. The data processing system based on a programmable switch according to any one of claims 1 to 8, characterized in that, The control module is also used to perform the following operations: Obtain the processing status index of the data processing module, and designate the data processing module whose processing status index indicates an idle state as the sixth update processing module. Obtain the packet exit field of the flow table filtering conditions and action indication for each flow table entry in the data flow table, and take the flow table entry corresponding to the packet exit field that indicates the sixth update processing module as the third flow table entry; Based on the flow table filtering conditions, at least one redundant fifth flow table entry is merged to obtain a fourth new flow table entry; Remove the third and fifth flow table entries from the data flow table, and add the fourth new flow table entry to the data flow table.

10. A data processing method, characterized in that, The method, applied to a data processing system based on a programmable switch as described in any one of claims 1 to 9, comprises: Obtain the data packet to be processed from the data input module and the data flow table from the control module; Based on the data flow table, one of multiple data processing modules is selected, and the data packet to be processed is transmitted to the selected data processing module, so that the data processing module can process the data packet to obtain the data processing result, and obtain its own resource status data and send it to the control module. The control module updates the data flow table according to the resource status data.

11. A programmable switch, characterized in that, The programmable switch includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the data processing method of claim 10.

12. A storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the data processing method of claim 10.

Citation Information

Patent Citations

  • Stream scheduling method, device and system, switch and computer storage medium

    CN111628940A

  • Data processing method and device, electronic equipment and computer readable storage medium

    CN114285790A