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

By using the data processing system of a programmable switch to update the data flow table by sending resource status data using the data processing module, the problem of difficult to timely perceive and avoid abnormal risks in the prior art is solved, and efficient data processing is achieved.

CN119449746AActive Publication Date: 2025-02-14PENG CHENG LAB

Patent Information

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

AI Technical Summary

Technical Problem

The flow tables of existing programmable switches are difficult to timely perceive and avoid abnormal risks in data forwarding, resulting in inefficient data processing.

Method used

A data processing system based on a programmable switch is designed. The data processing module sends resource status data to the control module, and the control module updates the data flow table based on these data, thereby realizing adaptive and rapid adjustment of the data flow table.

Benefits of technology

By updating data flow tables in real time, we can timely perceive and avoid data risks, quickly deal with abnormal problems, and improve overall data processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119449746A_ABST
    Figure CN119449746A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data processing system, a data processing method, a programmable switch and a medium, and relates to the technical field of communication. In the data processing system, a programmable switch receives a to-be-processed data packet of a data input module and a data flow table of a control module, preprocesses the to-be-processed data packet, or transmits the to-be-processed data packet to a data processing module selected according to the data flow table; and the data processing module performs data processing on the to-be-processed data packet to obtain a data processing result, and sends own resource state data to the control module to update the data flow table. In the data processing process based on the programmable switch, the control module carries out self-adaptive rapid adjustment on the data flow table according to the currently obtained resource state data, in the data processing process, according to the latest data flow table, possible data risks are sensed and avoided in time, abnormal problems are rapidly processed, and the overall data processing efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Programmable switches, also known as software-defined network switches, support dynamic configuration through software programming and can control the forwarding rules of data packets. The core component of its 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, you can achieve fine traffic management and optimize network performance and security.

[0003] In the related art, the flow table of a programmable switch is usually defined according to actual needs. During the data forwarding process, the specific content of the flow table items is fixed, which makes it difficult to timely perceive and avoid abnormal risks during the data forwarding process. Summary of the invention

[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 in the data processing process based on the programmable switch and improve the overall data processing efficiency.

[0005] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application proposes a data processing system based on a programmable switch, the system comprising:

[0006] Data input module: used to obtain data packets to be processed;

[0007] Control module: used to generate data flow table;

[0008] A programmable switch: used for receiving the data packet to be processed and the data flow table, preprocessing the data packet to be processed, or selecting one from a plurality of data processing modules based on the data flow table, and transmitting the data packet to be processed to the selected data processing module;

[0009] The data processing module is used to process the data packet to be processed to obtain a data processing result, and to obtain its own resource status data and send it to the control module;

[0010] The control module is also used to update the data flow table according to the resource status data.

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

[0012] The management module is used to receive the resource status data of multiple data processing modules, generate statistical indicators according to the resource status data, and send the statistical indicators to the control module;

[0013] The control module is also used to update the data flow table according to the statistical indicator.

[0014] In some embodiments, the data processing module is used to obtain its own resource status data and send it to the management module when executing:

[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 status data;

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

[0017] In some embodiments, the management module is used to receive the resource status data of multiple data processing modules, and when generating statistical indicators according to the resource status data, execute:

[0018] Acquire the reception time of the resource status data, and if the reception time is within a preset time period after the sending 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;

[0019] quantifying the resource status data based on the first service status indicator to obtain first quantified data;

[0020] Based on the second service status indicator, generating second quantitative data including a default value of the corresponding resource status data;

[0021] The statistical indicator is generated according to the first service status indicator and the first quantitative data, or the statistical indicator is generated according to the second service status indicator and the second quantitative data.

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

[0023] Selecting the data processing module whose resource status data is within a first preset threshold from the statistical indicators as the first update processing module;

[0024] Selecting the data processing module whose resource status data is within a second preset threshold as a second update processing module;

[0025] Obtaining the data packet egress field indicated by the action in each flow table entry in the data flow table, taking the data packet egress field indicating the first update processing module as the first field, and taking the data packet egress field indicating the second update processing module as the second field;

[0026] Obtain a first flow table entry corresponding to the first field, and generate a first new flow table entry according to the flow table filtering condition corresponding to the first flow table entry, wherein an action of the first new flow table entry includes the second field;

[0027] If the first flow table entry is not deleted, configuring the first new flow table entry has a higher priority than the first flow table entry.

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

[0029] Selecting the data processing module corresponding to the first service status indicator from the statistical indicators as a third update processing module;

[0030] Selecting the data processing module corresponding to the second service status indicator as a fourth update processing module;

[0031] Obtaining the data packet egress field indicated by the action in each flow table entry in the data flow table, using the data packet egress field indicating the third update processing module as the third field, and using the data packet egress field indicating the fourth update processing module as the fourth field;

[0032] Obtain a second flow table entry corresponding to the fourth field, and generate a second new flow table entry according to the flow table filtering condition corresponding to the second flow table entry, wherein an action of the second new flow table entry includes the third field;

[0033] If the second flow table entry is not deleted, configuring the second new flow table entry has a higher priority than the second flow table entry.

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

[0035] Selecting the data processing module whose resource status data is a preset resource value from the statistical indicators as a fifth update processing module;

[0036] A flow table filtering condition is obtained, a fifth field is generated indicating that the fifth update processing module is used as an egress field of a data packet, and a third new flow table entry is generated according to the flow table filtering condition and the fifth field.

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

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

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

[0040] 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.

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

[0042] Acquire a processing status indicator of the data processing module, and use the data processing module in an idle state indicated by the processing status indicator as a sixth update processing module;

[0043] Obtaining the flow table filtering condition and the data packet egress field indicated by the action of each flow table item in the data flow table, and using the flow table item corresponding to the data packet egress field indicating the sixth update processing module as the third flow table item;

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

[0045] The third flow table entry and the fifth flow table entry are removed from the data flow table, and the fourth new flow table entry is added to the data flow table.

[0046] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application proposes a data processing method, which is applied to a data processing system based on a programmable switch as described in any one of the first aspects, and the method includes:

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

[0048] Preprocess the data packet to be processed, or select one from multiple data processing modules based on the data flow table, and transmit the data packet to be processed to the selected data processing module, so that the data processing module processes the data packet to be processed to obtain a data processing result, and obtains its own resource status data and sends it to the control module, and the control module updates the data flow table according to the resource status data.

[0049] To achieve the above-mentioned purpose, a third aspect of an embodiment of the present application proposes a programmable switch, the programmable switch comprising a memory and a processor, the memory storing a computer program, and the processor implementing the method described in the above-mentioned second aspect when executing the computer program.

[0050] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a storage medium, which is a storage medium. The storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the second aspect is implemented.

[0051] The data processing system, data processing method, programmable switch and medium proposed in the embodiment of the present application, wherein the data processing system based on the programmable switch includes a data input module, a control module, a programmable switch and a data processing module. Specifically, the data input module is used to obtain a data packet to be processed; the control module is used to generate a data flow table; the programmable switch is used 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 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 perform data processing on the data packet to be processed to obtain a 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 according to the resource status data. In the data processing process based on the programmable switch of the embodiment of the present application, 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 obtained 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, so that in the data processing process, according to the latest data flow table, it can timely perceive and avoid possible data risks, thereby quickly handling abnormal problems and improving the overall data processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 It is a structural diagram of a data processing system based on a programmable switch provided in an embodiment of the present application.

[0053] Figure 2 It is a flow chart of the steps executed by the data processing module provided in the embodiment of the present application to obtain its own resource status data and send it to the management module.

[0054] Figure 3 It is a flowchart of the steps executed by the management module provided in the embodiment of the present application when generating statistical indicators based on resource status data.

[0055] Figure 4It is a flow chart of the steps executed by the control module provided in the embodiment of the present application when updating the data flow table according to statistical indicators.

[0056] Figure 5 This is another step flow chart executed by the control module provided in the embodiment of the present application when updating the data flow table according to statistical indicators.

[0057] Figure 6 This is another step flow chart executed by the control module provided in the embodiment of the present application when updating the data flow table according to statistical indicators.

[0058] Figure 7 This is another step flow chart executed by the control module provided in the embodiment of the present application when updating the data flow table according to statistical indicators.

[0059] Figure 8 This is another functional flow chart of the control module provided in the embodiment of the present application.

[0060] Fig. 9 It is an optional flowchart of the data processing method provided in the embodiment of the present application.

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

[0062] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying 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 and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than 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 those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0065] Programmable switches, also known as software-defined network switches, support dynamic configuration through software programming and can control the forwarding rules of data packets. The core component of its 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, you can achieve fine traffic management and optimize network performance and security.

[0066] In the related art, the flow table of a programmable switch is usually defined according to actual needs. During the data forwarding process, the specific content of the flow table items is fixed, which makes it difficult to timely perceive and avoid abnormal risks during the data forwarding process.

[0067] Based on this, the embodiments of the present application provide a data processing system, a data processing method, a programmable switch and a medium. In the data processing process based on the programmable switch, 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 that adapts to the real-time environment, so that in the data processing process, the possible data risks can be perceived and avoided 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 embodiments of the present application provide a data processing system, a data processing method, a programmable switch and a medium, which are specifically described through the following embodiments. First, a data processing system based on a programmable switch in the embodiments of the present application is described.

[0069] In one embodiment, referring to Figure 1 , Figure 1 Schematic diagram of the structure of a data processing system based on a programmable switch provided in an embodiment of the present application. Figure 1 The data processing system shown includes a mutually independent data input module, a control module, a programmable switch and a data processing module. If there is a communication requirement between different modules in the data processing system, the communication is performed through a socket. Figure 1 In the figure, solid lines represent data flow, dotted lines represent control flow, and the direction of the arrow represents the transmission direction of the data flow or control flow.

[0070] In one embodiment, the data input module is used to obtain the data packets to be processed, where the data packets to be processed may be forwarded to the data input module from other sources, or may be generated by the data input module itself. Other sources may be determined according to the specific sources of the data packets to be processed according to the actual application scenario, and this embodiment does not limit this.

[0071] In one embodiment, a data flow table is stored in the control module, wherein the data flow table includes multiple flow table items with different priorities, and the flow table items are also called flow table rules. The flow table items include a set of flow table filter conditions or multiple actions. The flow table filter conditions are used to filter the data packets corresponding to the flow table items, and the actions can determine the processing method of the selected data packets. The flow table items are selected one by one according to the priority to perform the data packet matching process.

[0072] In one embodiment, the control module sends the data flow table to the programmable switch, and at the same time, the programmable switch receives the data packet to be processed forwarded by the data input module. At this time, the flow table filter conditions in the flow table item include but are not limited to the following fields: data packet entry 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, transmission protocol and other fields. Therefore, the programmable switch selects the flow table item according to the priority, and then determines whether the data packet to be processed can match the flow table item according to the flow table filter conditions of the flow table item. For example, a flow table item only matches data from a specific data packet entry or a specific IP source address. If the flow table filter conditions are met, the flow table item is successfully matched, and the corresponding operation is performed on the data packet to be processed according to the action of the flow table item. For example, the action of the flow table item can be: forwarding the data packet to the specified data packet outlet (the data packet outlet here is stored in the flow table item in the form of the data packet outlet field, and each data packet outlet field can correspond to a specific data processing module), discarding the data packet, modifying the data packet header information, etc., and the operation other than forwarding the data packet to the specified data packet outlet is called preprocessing. Therefore, the programmable switch can pre-process the data packets to be processed, and can also perform forwarding operations on the data packets to be processed. When forwarding the data packets to be processed, firstly, one is selected from multiple data processing modules based on the data packet egress field of the flow table entry matched in the data flow table, and it is used as the data processing module to receive the data packets to be processed, and then the data packets to be processed are transmitted to the selected data processing module.

[0073] In one embodiment, after receiving the data packet to be processed, the data processing module will parse the header information of the data packet to determine its key attributes such as source, destination, protocol type, etc. Then, according to the actual processing requirements, such as routing selection, load balancing, security policy, etc., the data packet to be processed is processed to obtain the corresponding data processing result. For example, if the data packet to be processed needs to be forwarded from one interface to another interface, the data processing module will search the routing table, determine the best forwarding path, and modify the destination MAC address, VLAN ID, etc. of the data packet to be processed.

[0074] In one embodiment, the data processing module will also monitor and obtain its own resource status data in real time during the data processing process, and the resource status data here can be used to evaluate the performance and stability of the data processing module. Finally, the obtained resource status data of the module will be sent to the control module.

[0075] It is understandable that the data processing system of the programmable switch in the embodiment of the present application may process multiple data packets to be processed in parallel, so other data processing modules in a busy state will also send their own resource status data to the control module. In addition, even the data processing module in an idle state needs to send resource status data to the control module. In other words, the control module in the embodiment of the present application will receive the resource status data sent by all data processing modules in order to perform unified scheduling management.

[0076] In one embodiment, referring to Figure 1 , the data processing system based on the programmable switch also includes a management module. At this time, the management module receives the resource status data of multiple data processing modules, generates statistical indicators based on the resource status data, and sends the statistical indicators to the control module. Next, the control module updates the data flow table based on the statistical indicators. The reason for setting up the management module is that the control module undertakes the core control tasks and needs to generate and update the data flow table, which itself consumes more computing resources and storage resources. Therefore, the statistical process of the resource status data of the data processing module is completed through the management module, which can avoid the heavy computing burden of the control module, thereby improving the operation efficiency of the entire system. It is understandable that the management module may not be set, and the functions of the management module can be integrated into the control module.

[0077] In one embodiment, referring to Figure 2 , Figure 2 This is a flowchart of the steps performed when the data processing module provided in the embodiment of the present application is used to obtain its own resource status data and send it to the management module, specifically including the following steps:

[0078] Step 210: 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 resource status data.

[0079] Step 220: In response to the sending time, the resource status data is sent 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 delay, and the first preset network protocol, the resource status data is sent to the management module when the sending time agreed with the management module arrives. The sending time here can be periodic sending or real-time sending, which can be set according to actual conditions, and this embodiment does not limit this.

[0081] In one embodiment, the remaining CPU resource data refers to the unused CPU processing capacity in the data processing module. The remaining CPU resource data can reflect the current load of the CPU corresponding to the data processing module, which is crucial for judging whether the data processing module can handle more tasks or whether load balancing is required. Higher remaining CPU resources mean that the data processing module is relatively idle and can undertake more computing tasks; while lower remaining CPU resources may indicate that the data processing module is under greater pressure. The remaining memory resource data refers to the unused memory capacity in the data processing module. Memory is an important component of computer running programs and storing data. Therefore, understanding the remaining memory is crucial to ensure the stable operation of the system. By monitoring the remaining memory resources of the data processing module, the performance of the data processing module can be improved by optimizing memory usage. The remaining bandwidth resource data refers to the unused data transmission capacity in the network connection. High remaining bandwidth means that the network transmission of the corresponding data processing module is relatively smooth and can support more data transmission tasks; while low remaining bandwidth may cause network delays and data loss. Resource utilization is a comprehensive indicator that reflects the overall utilization of resources such as CPU, memory, and disk I / O. By monitoring resource utilization, the overall load of the data processing module can be understood. 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, and the first network protocol here can be IPV4 or IPV6, etc.

[0082] In one embodiment, after the management module receives resource status data sent by multiple data processing modules, it is necessary to perform statistics on the resource status data. Figure 3 , Figure 3 It is a flowchart of the steps performed when the management module according to the embodiment of the present application generates statistical indicators based on resource status data, which specifically includes the following steps:

[0083] Step 310: Obtain the receiving time of the resource status data. If the receiving time is within a preset time period after the sending 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, if the data processing module does not send resource status data for a long time, it is considered that the processing of the data processing module has timed out, and there may be performance abnormalities. At this time, corresponding abnormal information needs to be generated. Therefore, in the embodiment of the present application, the management module determines whether it is abnormal according to the receiving time of the resource status data. It can be understood that the sending time of each data processing module can be predetermined, so it can be judged according to the time difference between the receiving time and the sending time. If the receiving time is within the 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. The preset time period here can be set according to actual needs. In addition, if the data processing module does not send resource status data, at this time, if the management module does not receive the resource status data within the preset time period, the receiving time is set to be outside the preset time period to ensure that the second service status indicator indicating that the service is running abnormally is generated in this case.

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

[0086] In one embodiment, if the service runs normally, at least the remaining CPU resource data, remaining memory resource data, remaining bandwidth resource data, resource utilization, bandwidth delay, and the first preset network protocol are quantified and expressed in a unified digital format.

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

[0088] In one embodiment, if the service runs abnormally, a second service status indicator is first generated, and then a default value indicating that the remaining CPU resource data, the remaining memory resource data, the remaining bandwidth resource data, and the first preset network protocol are all abnormal is generated to obtain the second quantitative data. It can be understood that the data format of the second quantitative data is similar to that of the first quantitative data, and the only difference is that the corresponding value in the second quantitative data is the default value representing the abnormality. For example, the default value of the remaining CPU resource data is 0, the default value of the remaining memory resource data is 0, the default value of the remaining bandwidth resource data is 0, the default value of the resource utilization rate is 0, the default value of the bandwidth delay is NULL, the default value of the first preset network protocol is NULL, etc.

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

[0090] In one embodiment, when the service runs normally, the first service status indicator and the first quantitative data of the corresponding data processing module are spliced ​​to generate a statistical indicator. When the service runs abnormally, the second service status indicator and the second quantitative data of the corresponding data processing module are spliced ​​to generate a statistical indicator.

[0091] After the above process, refer to Figure 1 After the management module generates the statistical indicators, it sends the statistical indicators to the control module. After receiving the statistical indicators, the control module uses the statistical indicators to update the data flow table. In one embodiment, refer to Figure 4 , Figure 4 It is a flowchart of the steps performed when the control module according to the statistical indicators of the embodiment of the present application updates the data flow table, which specifically includes the following steps:

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

[0093] In one embodiment, if the processing resources (such as CPU resources, memory resources or bandwidth resources) of a data processing module are about to be exhausted, it is necessary to reduce the data flow of the data processing module during the processing of the programmable switch, and coordinate the corresponding data flow to other data processing modules with sufficient processing resources. Therefore, a 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, and the first preset threshold here is used to indicate that the corresponding processing resources are about to be exhausted. It can be understood that different resource status data correspond to related first preset thresholds, such as the first CPU resource preset threshold, the first memory resource preset threshold, and the first bandwidth resource preset threshold.

[0094] Step 420: Select a data processing module whose resource status data is within a second preset threshold as a 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 with resource status data at the second preset threshold is selected as the second update processing module. The second preset threshold here is used to indicate that the corresponding processing resources are still relatively idle. For example, taking the remaining memory resource data as an example, the first preset threshold can be 2% to 5%, the second preset threshold can be 50% to 99%, etc. The specific values ​​here can be set according to the actual situation, and the embodiment of the present application does not make specific limitations on this.

[0096] Step 430: Obtain the data packet egress field indicated by the action in each flow table entry in the data flow table, and use the data packet egress field indicating the first update processing module as the first field, and use the data packet egress field indicating the second update processing module as the second field.

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

[0098] Step 440: Obtain a first flow table entry corresponding to the first field, and generate a first new flow table entry according to the flow table filtering condition corresponding to the first flow table entry.

[0099] In one embodiment, the first flow table item corresponding to the first field is obtained. The first flow table item will forward 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 to generate a new flow table item, which is recorded as the first new flow table item. The first new flow table item is consistent with the flow table filter condition of the first flow table item to ensure that if the data packet to be processed can match the first flow table item, it will also match the first new flow table item. In the action of the first new flow table item, its data packet export field is specified as the second field, so that the first new flow table item can forward the data packet to be processed that should be forwarded to the first update processing module to the second update processing module. It can be understood that when the first new flow table item is generated according to the flow table filter condition corresponding to the first flow table item, it is also necessary to combine the action corresponding to the first flow table item, copy or modify the behavior according to actual needs, and then add the action to the first new flow table item. At the same time, the first new flow table item also includes other necessary field data, which is not limited in this embodiment.

[0100] Step 450: If the first flow table entry is not deleted, configure the first new flow table entry with a higher priority than the first flow table entry.

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

[0102] For example, the computing resources of a data processing module C1 will be exhausted, for example, the usage rate of one of the CPU resources, memory resources or bandwidth resources is about to reach the resource upper limit. At this time, the resources of the data processing module C2 are relatively idle, so the flow table entry for the data processing module C1 in the data flow table is adjusted to perform data flow scheduling, thereby reducing the data flow of the data processing module C1 and increasing the data flow of the data processing module C2. It is understandable that when the resource occupancy of the data processing module C1 falls back and it can continue to process data packets, it may become the second update processing module according to the judgment of the above-mentioned preset resource threshold and re-participate in the data processing process.

[0103] In one embodiment, referring to Figure 5 , Figure 5 It is another flowchart of steps performed by the control module provided in the embodiment of the present application when updating the data flow table according to the statistical indicators, which specifically includes the following steps:

[0104] Step 510: Select a 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 a normal service running status is called a third update processing module, and the data processing module with an abnormal service running status is called a fourth update processing module.

[0107] Step 530: Obtain the data packet egress field indicated by the action in each flow table entry in the data flow table, and use the data packet egress field indicating the third update processing module as the third field, and use the data packet egress field indicating the fourth update processing module as the fourth field.

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

[0109] Step 540: Obtain a second flow table entry corresponding to the fourth field, and generate a second new flow table entry according to the flow table filtering condition 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 will forward 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, recorded as the second new flow table entry. The second new flow table entry is consistent with the flow table filtering condition 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, in the action of the second new flow table entry, its data packet export field is specified as the third field, so that the second new flow table entry can forward the data packet to be processed that should have been forwarded to the fourth update processing module to the third update processing module.

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

[0112] Step 550: If the second flow entry is not deleted, configure a second new flow entry with a higher priority than the second flow entry.

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

[0114] In one embodiment, for a data flow table, the destination port field of each flow table entry is counted, and the destination port field indicating the third update processing module and the destination port field indicating the fourth update processing module are selected therefrom, and 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 to-be-processed data packet that should have been scheduled to the abnormal fourth update processing module is scheduled to the normal third update processing module, thereby updating the flow table entry.

[0115] For example, a data processing module C3 times out and does not report resource status data. At this time, the management module considers that the data processing module C3 is abnormal and generates a corresponding second service status indicator. Therefore, the flow table entry for the data processing module C3 in the data flow table is adjusted to perform data flow scheduling, and the data flow of the data processing module C3 is scheduled to other data processing modules with normal service operation. It is understandable that when the data processing module C3 service is running normally and can continue to process data packets, it may become the third update processing module according to the judgment of the above-mentioned preset time period and re-participate in the data processing process.

[0116] In one embodiment, referring to Figure 6 , Figure 6 It is another flowchart of steps performed by the control module provided in the embodiment of the present application when updating the data flow table according to the statistical indicators, which specifically includes the following steps:

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

[0118] In one embodiment, if there is a newly added data processing module, it reports the resource status data to the management module according to the agreement. The management module makes a judgment based on the value corresponding to the specific resource status data. If the resource status data is a preset resource value, such as the remaining CPU resource data is 100% or 99%, the data processing module is considered to be a newly added data processing module, and it is used as the fifth update processing module to participate in the subsequent data processing process. It can be understood that the preset resource value here can also be a threshold value, which is set according to the actual situation.

[0119] Step 620: Obtain the flow table filtering condition, generate a fifth field indicating that the fifth update processing module is used as the data packet egress field, and generate a third new flow table entry according to the flow table filtering condition and the fifth field.

[0120] In one embodiment, according to the newly added fifth update processing module, the 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 recorded 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, and the fifth field can instruct the third new flow table entry to forward the acquired data to the fifth update processing module.

[0121] It is understandable that the flow table entry includes not only the flow table filter condition and the data packet egress field, but also other necessary fields, such as actions, etc. After the third new flow table entry is generated, the third new flow table entry is added to the data flow table, thereby updating the flow table entry.

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

[0123] In one embodiment, referring to Figure 7 , Figure 7 It is another flowchart of steps performed by the control module provided in the embodiment of the present application when updating the data flow table according to the statistical indicators, which specifically includes the following steps:

[0124] Step 710: Obtain the second preset network protocol and the data packet egress 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, and the second network protocol here can be IPV4 or IPV6, etc. At the same time, it is also necessary to obtain the data packet egress field of each flow table entry, that is, to locate the data processing module for forwarding data of each flow table entry.

[0126] Step 720: Obtain the first preset network protocol of the data processing module corresponding to each data packet egress field 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, in order to realize data processing between heterogeneous networks, it is necessary to perform corresponding protocol conversion on the data packets to be processed in the programmable switch. Only after the conversion can it be forwarded to the corresponding data processing module, and this action needs to be set in the data flow table to instruct the programmable switch to perform the action. Therefore, the second preset network protocol is removed from the data flow table, and the first preset network protocol is added at the same time. For example, if the first preset network protocol is IPV6 and the second preset network protocol is IPV4, the following modifications can be made to the action position in the flow table item: remove_header:ipv4, add_header:ipv6. Through this modification, the first preset network protocol can be added to the relevant flow table item, which can realize the seamless connection of the processing process of 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 on the data plane, thereby realizing the data processing and forwarding functions of the heterogeneous network on the data level.

[0131] For example, the second preset network protocol of a data input module C5 is IPV4, and the first preset network protocol of the data processing module C6 is IPV6, and 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 to indicate that the programmable switch needs to convert the data format of the data packet to be processed before transmitting it to the data processing module C6, and then transmit it to the data processing module C6 for data processing after converting it to the first preset network protocol.

[0132] In one embodiment, referring to Figure 8 , Figure 8 It is another functional flow chart of the control module provided in the embodiment of the present application, which specifically includes the following steps:

[0133] Step 810: Obtain the processing status indicator of the data processing module, and use the data processing module whose processing status indicator indicates an idle state as the sixth update processing module.

[0134] In one embodiment, in order to improve data utilization, the processing status indicator of each data processing module can be obtained. For example, if a 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 used as the sixth update processing module.

[0135] Step 820: Obtain the flow table filtering condition and the data packet egress field indicated by the action of each flow table entry in the data flow table, and use the flow table entry corresponding to the data packet egress field indicating the sixth update processing module as the third flow table entry.

[0136] In one embodiment, the flow table entry whose forwarding destination is the sixth update module is used as the third flow table entry, and the data packet egress field of the third flow table entry indicates the sixth update processing module.

[0137] Step 830: Based on the flow table filtering condition, merge at least one redundant fifth flow table entry to obtain a fourth new flow table entry.

[0138] In one embodiment, there may be some flow table items whose filtering conditions are completely covered by one flow table item. For example, there are originally three flow table items, and now after merging, one flow table item covers the traffic that originally needs to be forwarded. At this time, the original flow table items are redundant, and the redundant ones are used as the fifth flow table item, and the merged ones are used as the fourth new flow table item. Suppose there are two flow table items f1 and flow table item f2, and their filtering conditions are both "source IP address equals xxx", but the action of flow table item f1 is to forward the traffic to data processing module 1, and the action of flow table item f2 is to forward the traffic to data processing module 2. If it is now necessary to forward all traffic from this xxx subnet to data processing module 1, then a new flow table item f3 can be created, and its filtering condition is still "source IP address equals xxx", but the action is changed to forward the traffic to data processing module 1. In this way, flow entry f3 covers the functions of flow entry f1 and flow entry f2, making flow entry f1 and flow entry f2 redundant. At this time, flow entry f1 and flow entry f2 are the fifth flow entry, and flow entry f3 is the fourth new flow entry.

[0139] It can be understood that in the embodiments of the present 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 as required.

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

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

[0142] Through the above process, in the embodiment of the present application, the management module collects and analyzes whether there is a risk of abnormal data forwarding in each data processing module, and then the management module generates statistical indicators through the preset program analysis and statistical data results and sends them to the control module. The control module adaptively modifies or generates flow table items according to the statistical indicators and updates the data flow table. In particular, during the update process, in the case where the data input module and the data processing module are heterogeneous networks, the relevant instructions for network protocol conversion are defined in the flow table items, so that the programmable switch can adaptively process information such as data packet headers and realize data flow forwarding between heterogeneous networks.

[0143] In the related art, in the scenario of large-scale network data processing and forwarding, programmable switches have the problem of not being able to timely perceive and avoid data flow forwarding failure or abnormal risks. At the same time, the data flow table in the programmable switch is relatively fixed, and the flow table cannot be quickly adjusted and updated according to changes in traffic and external environment. The data processing system based on a programmable switch in the embodiment of the present application can timely perceive and avoid potential risks in the process of data packet processing and forwarding, ensure the normal operation of the entire data processing system, and overcome the shortcomings of programmable switches in terms of poor ability to perceive and avoid potential risks and untimely response.

[0144] In the embodiment of the present application, the data processing system based on the programmable switch includes a data input module, a control module, a programmable switch and a data processing module. Specifically, the data input module is used to obtain a data packet to be processed; the control module is used to generate a data flow table; the programmable switch is used 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 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 a 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 according to the resource status data. In the data processing process based on the programmable switch of the embodiment of the present application, 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 obtained 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, so that in the data processing process, according to the latest data flow table, it can timely perceive and avoid possible data risks, thereby quickly handling abnormal problems and improving the overall data processing efficiency.

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

[0146] Fig. 9 is an optional flowchart of the data processing method provided in the embodiment of the present application. Fig. 9 The method in the embodiment may include but is not limited to steps 910 to 920. Fig. 9 The order of step 910 to step 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: pre-process the data packet to be processed, or select one from multiple data processing modules based on the data flow table, and transmit the data packet to be processed to the selected data processing module.

[0150] In one embodiment, after receiving the data to be processed, the data processing module processes the data packet to be processed to obtain a data processing result, and obtains its own resource status data and sends it to the control module, and the control module updates the data flow table according to the resource status data.

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

[0152] The present 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 the memory, and the processor executes at least one program to implement the data processing method described above in the present application.

[0157] See also Fig.10 , Fig.10 The hardware structure of a programmable switch of another embodiment is illustrated. The programmable switch includes:

[0158] The processor 1001 may be implemented by a general-purpose central processing unit (CPU), a microprocessor, an 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 the present application;

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

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

[0161] Communication interface 1004, used to realize communication interaction between the device and other devices, which can be realized by wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.); and

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

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

[0164] An embodiment of the present application further provides a storage medium, which is a storage medium storing a computer program, and the computer program implements the above-mentioned data processing method when executed by a processor.

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

[0166] The data processing system, data processing method, programmable switch and medium proposed in the embodiment of the present application, the data processing system based on the programmable switch includes a data input module, a control module, a programmable switch and a data processing module. Specifically, the data input module is used to obtain the data packet to be processed; the control module is used to generate a data flow table; the programmable switch is used 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 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 perform data processing on 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 according to the resource status data. In the data processing process based on the programmable switch of the embodiment of the present application, the resource status data of the data processing module is first sent to the control module by the data processing module, and then the control module updates the data flow table according to the currently obtained resource status data. In this way, the data flow table is adaptively and quickly adjusted, so as to obtain a data flow table adapted to the real-time environment, so that in the data processing process, the data risks that may occur can be timely perceived and avoided according to the latest data flow table, so as to quickly handle abnormal problems and improve the overall data processing efficiency.

[0167] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

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

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

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

[0171] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or modules is not necessarily limited to those steps or modules clearly listed, but may include other steps or modules that are not clearly listed or inherent to these processes, methods, products or devices.

[0172] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0173] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0174] The modules described above as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0175] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.

[0176] If the integrated module is implemented in the form of a software function 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 the present application is essentially 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, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method of each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store programs.

[0177] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. A data processing system based on a programmable switch, characterized in that: include: Data input module: used to obtain data packets to be processed; Control module: used to generate data flow table; A programmable switch: used for receiving the data packet to be processed and the data flow table, preprocessing the data packet to be processed, or selecting one from a plurality of data processing modules based on the data flow table, and transmitting 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 a 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 according to the resource status data.

2. The data processing system based on a programmable switch according to claim 1, characterized in that: The system further comprises: a management module; The management module is used to receive the resource status data of multiple data processing modules, generate statistical indicators according to 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 according to the statistical indicator.

3. The data processing system based on a programmable switch according to claim 2, characterized in that: The data processing module is used to obtain its own resource status data and send it to the management module when executing: 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 status data; In response to a 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 the resource status data of multiple data processing modules, and to generate statistical indicators according to the resource status data, and to execute: Acquire the reception time of the resource status data, and if the reception time is within a preset time period after the sending 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; quantifying the resource status data based on the first service status indicator to obtain first quantified data; Based on the second service status indicator, generating second quantitative data including a default value of the corresponding resource status data; The statistical indicator is generated according to the first service status indicator and the first quantitative data, or the statistical indicator is generated according to 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 execute when updating the data flow table according to the statistical indicator: Selecting the data processing module whose resource status data is within a first preset threshold from the statistical indicators as the first update processing module; Selecting the data processing module whose resource status data is within a second preset threshold as a second update processing module; Obtaining the data packet egress field indicated by the action in each flow table entry in the data flow table, taking the data packet egress field indicating the first update processing module as the first field, and taking the data packet egress field indicating the second update processing module as the second field; Obtain a first flow table entry corresponding to the first field, and generate a first new flow table entry according to the flow table filtering condition corresponding to the first flow table entry, wherein an action of the first new flow table entry includes the second field; If the first flow table entry is not deleted, configuring the first new flow table entry has 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 execute when updating the data flow table according to the statistical indicator: Selecting the data processing module corresponding to the first service status indicator from the statistical indicators as a third update processing module; Selecting the data processing module corresponding to the second service status indicator as a fourth update processing module; Obtaining the data packet egress field indicated by the action in each flow table entry in the data flow table, taking the data packet egress field indicating the third update processing module as the third field, and taking the data packet egress field indicating the fourth update processing module as the fourth field; Obtain a second flow table entry corresponding to the fourth field, and generate a second new flow table entry according to the flow table filtering condition corresponding to the second flow table entry, wherein an action of the second new flow table entry includes the third field; If the second flow table entry is not deleted, configuring the second new flow table entry has 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 execute when updating the data flow table according to the statistical indicator: Selecting the data processing module whose resource status data is a preset resource value from the statistical indicators as a fifth update processing module; A flow table filtering condition is obtained, a fifth field is generated indicating that the fifth update processing module is used as an egress field of a data packet, and a third new flow table entry is generated according to the flow table filtering condition 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 execute when updating the data flow table according to the statistical indicator: Obtain a second preset network protocol and a data packet egress field of an action indication corresponding to each flow table entry in the data flow table; Acquire the first preset network protocol of the data processing module corresponding to each of the data packet egress fields 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: Acquire a processing status indicator of the data processing module, and use the data processing module in an idle state indicated by the processing status indicator as a sixth update processing module; Obtaining the flow table filtering condition and the data packet egress field indicated by the action of each flow table item in the data flow table, and using the flow table item corresponding to the data packet egress field indicating the sixth update processing module as the third flow table item; Merging at least one redundant fifth flow table entry based on the flow table filtering condition to obtain a fourth new flow table entry; The third flow table entry and the fifth flow table entry are removed from the data flow table, and the fourth new flow table entry is added to the data flow table.

10. A data processing method, characterized in that: Applied to the data processing system based on a programmable switch according to any one of claims 1 to 9, the method comprises: Acquire the data packet to be processed from the data input module and the data flow table from the control module; Preprocess the data packet to be processed, or select one from multiple data processing modules based on the data flow table, and transmit the data packet to be processed to the selected data processing module, so that the data processing module processes the data packet to be processed to obtain a data processing result, and obtains its own resource status data and sends it to the control module, and 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 implements the data processing method according to claim 10 when executing the computer program.

12. A storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the data processing method according to claim 10 is implemented.

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

  • Data scheduling method and device and computer equipment

    CN116781640A

  • Data plane cache forwarding and control method based on programmable network

    CN118382110A

  • Antiinflammatory, Antibacterial and Antifungal Composition containing Ulmus macrocarpa Hance and Smilax china L. Root Extract and Pharmaceutical Composition for Preventing or Treating Vaginitis, and Composition for Female Cleansing Agent containing the same

    KR102048525B1

Cited By

  • Data packet processing method, flow table processing method and related equipment

    CN121530921A