Message processing method and network security device

By monitoring the CPU utilization rate of the processing core and sending alarm events for bypass processing, the memory resource exhaustion and packet loss caused by DPI in a single large traffic is solved, and the effective response to a single large traffic is achieved.

CN115021960BActive Publication Date: 2024-11-01NEW H3C SECURITY TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202210461827.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-28
Publication Date
2024-11-01
Estimated Expiration
2042-04-28

AI Technical Summary

Technical Problem

Deep message detection (DPI) consumes a lot of CPU resources in network security devices, resulting in overloading of processing cores in a single large traffic, resulting in memory resource exhaustion and packet loss problems.

Method used

By monitoring the CPU utilization of the processing core in the operating system, when the alarm condition is reached, an alarm event is sent to the DPI engine and bypass processing is performed, thereby avoiding deep message detection on the target data stream and reducing mbuf resource occupation.

Benefits of technology

Effectively dealing with a single large traffic can avoid the problem of memory resource exhaustion and packet loss in network security equipment, and improve the processing capabilities of the equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115021960B_ABST
    Figure CN115021960B_ABST
Patent Text Reader

Abstract

The present application provides a message processing method and network security equipment, which relate to the field of communication technology. The network security equipment includes an operating system, a deep packet inspection DPI engine and multiple processing cores. In the control plane, the operating system determines the CPU utilization of each processing core; when the operating system detects that the CPU utilization of the target processing core among the multiple processing cores meets the alarm condition, it sends an alarm event to the DPI engine; after the DPI engine receives the alarm event, it performs bypass processing on the forwarding plane for the first data flow in the target processing core that currently needs to perform deep packet inspection. In this way, effective response to a single large flow is achieved, and at the same time, the problem of packet loss caused by exhaustion of memory resources in the network security device due to a single large flow after the DPI service is turned on is solved.
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 message processing method and a network security device. Background Art

[0002] Deep Packet Inspection (DPI) is a deep inspection technology based on the data packets of each flow. It performs deep inspection on different network application layer loads (such as HTTP, DNS, etc.), and determines the legitimacy of the message by detecting the payload of the message. Since the detection is performed on the load of a flow, the message forwarding mode is based on the core load sharing of the flow, that is, all messages of a flow of the same five-tuple must be reported to the same processing core, so that the processing core processes the received messages one by one to complete the order preservation work. Since DPI's detection of the depth of the message payload consumes a lot of CPU computing resources, after the DPI detection service is enabled on the network security device, when a sudden single large flow, that is, a single elephant flow attack, is encountered, it will exceed the seven-layer throughput capacity of the DPI service of a processing core in the network security device in a short time, resulting in the processing core processing traffic overload drive to continuously receive messages but not being processed in time by the processing core, resulting in a large number of cached messages consuming the memory resource mbuf within a certain period of time. Since mbuf resources are shared by all processing cores (due to the limitations of the underlying hardware architecture, it is not possible to configure independent mbuf resources for each processing core used for forwarding), when normal traffic arrives on other processing cores, the other processing cores cannot apply for mbuf resources and have to drop packets, thereby affecting the forwarding of all processing cores, that is, causing the "one core is blocked, all cores are blocked" phenomenon.

[0003] Therefore, how to effectively deal with a single large flow and solve the problem of packet loss caused by the exhaustion of memory resources in network security equipment due to a single large flow after the DPI service is enabled is one of the technical issues worth considering. Summary of the invention

[0004] In view of this, the present application provides a message processing method and a network security device to effectively cope with a single large flow and solve the problem of packet loss caused by exhaustion of memory resources in the network security device due to a single large flow after the DPI service is enabled.

[0005] Specifically, the present application is implemented through the following technical solutions:

[0006] According to a first aspect of the present application, a message processing method is provided, which is applied to a network security device, wherein the network security device includes an operating system, a deep message inspection (DPI) engine, and multiple processing cores, and the method includes:

[0007] In the control plane, the operating system determines the CPU utilization of each processing core;

[0008] When the operating system detects that the CPU utilization of the target processing core among the multiple processing cores meets the alarm condition, the operating system sends an alarm event to the DPI engine;

[0009] After receiving the alarm event, the DPI engine performs bypass processing on the forwarding plane for the first data flow that currently needs to perform deep packet inspection in the target processing core.

[0010] According to a second aspect of the present application, a network security device is provided, including an operating system, a deep packet inspection DPI engine, and multiple processing cores, wherein:

[0011] The operating system is used to determine the CPU utilization of each processing core in the control plane; when it is detected that the CPU utilization of the target processing core among the multiple processing cores meets the alarm condition, an alarm event is sent to the DPI engine;

[0012] The DPI engine is used to perform bypass processing on the first data flow that currently needs to perform deep packet inspection in the target processing core in the forwarding plane after receiving the alarm event.

[0013] Beneficial effects of the embodiments of the present application:

[0014] In the message processing method and network security device provided by the embodiment of the present application, when the operating system determines the CPU utilization of each processing core, if it detects that the CPU utilization of the target processing core meets the alarm condition, an alarm event is sent to the DPI engine so that the DPI engine controls the first data stream sent to the target processing core in the forwarding plane, that is, performs bypass processing, and no longer performs deep message detection on the first data stream. Since the DPI does not need to perform deep message detection on the message of the first data stream corresponding to the target processing core, and directly performs forwarding processing, it avoids the situation where the DPI occupies more mbuf resources when performing deep message processing, thereby achieving the purpose of effectively responding to a single large flow, and solving the problem of packet loss caused by the exhaustion of memory resources in the network security device due to a single large flow after the DPI service is turned on. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 It is a flowchart of a message processing method provided in an embodiment of the present application;

[0016] Figure 2 It is a flowchart of another message processing method provided in an embodiment of the present application;

[0017] Figure 3It is a structural schematic diagram of a network security device provided in an embodiment of the present application;

[0018] Figure 4 It is a structural diagram of another network security device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0019] Here, exemplary embodiments will be described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application.

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

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

[0022] The message processing method provided by this application is described in detail below.

[0023] See also Figure 1 , Figure 1 This is a flow chart of a message processing method provided by the present application, which is applied to a network security device, the network security device includes an operating system, a DPI engine and multiple processing cores, and the interaction process between the operating system and the DPI engine may include the following steps:

[0024] S101. In the control plane, the operating system determines the CPU utilization of each processing core.

[0025] At present, network security equipment is to be connected in series in the network. When IPS (intrusion prevention detection), AV (anti-virus) and application auditing services are enabled, the network security equipment needs to continuously perform in-depth detection on the traffic flowing through the equipment, and this detection mode is detected in units of data streams, that is, DPI detection must be performed for each data stream. The device forwarding mode is also based on the core load sharing mode of the data stream. Once the load pressure of a single processing core is too large, the mbuf resources of the entire network security device will be consumed, thereby affecting the message service processing and message forwarding of the network security device. When a single elephant flow attack occurs in the network, the entire machine will have a problem of one core blocking and all cores blocking. In view of this, this step proposes that in the control plane, the operating system of the network security device monitors each processing core, that is, determines the CPU utilization of each processing core.

[0026] S102: When the operating system detects that the CPU utilization of a target processing core among multiple processing cores meets an alarm condition, the operating system sends an alarm event to the DPI engine.

[0027] In this step, when the operating system detects that the CPU utilization of the target processing core meets the alarm condition, it indicates that the current business processing volume of the target processing core is large, that is, encountering a large traffic scenario, which may cause more mbuf resources to be occupied in the process of processing the business of the target processing core, and further may cause other processing cores to be unable to process the business normally. In order to avoid this situation, this embodiment proposes that when it is determined that the CPU utilization of the target processing core reaches the alarm condition, an alarm event is sent to the DPI engine used for deep packet inspection.

[0028] Optionally, the alarm condition may be, but is not limited to, that the CPU utilization is higher than a set threshold, and the specific value of the set threshold may be determined according to actual conditions.

[0029] It should be noted that when the operating system detects that the CPU utilization of each processing core does not meet the alarm condition, the process of step S101 continues to be executed. The operating system can periodically execute step S101, that is, when the detection period arrives, execute the message processing process provided in this embodiment.

[0030] Optionally, the detection period may be, but is not limited to, set in seconds, and may be specifically configured according to actual conditions. This embodiment does not limit the specific value of the detection period.

[0031] It should be noted that the above-mentioned target processing core can be any processing core in the security network device.

[0032] S103: After receiving the alarm event, the DPI engine performs bypass processing on the forwarding plane for the first data flow that currently needs to perform deep packet inspection in the target processing core.

[0033] In this step, after the DPI engine receives the alarm event sent by the operating system, it can control the business processing operation of the first data stream that is originally to perform deep packet inspection in the target processing core in the forwarding plane, such as performing bypass processing on the first data stream of the target processing core in the forwarding plane, that is, directly forwarding the first data stream to the outside without performing deep packet inspection on the first data stream. In this way, the message processing pressure of deep packet inspection can be reduced, thereby reducing the mbuf resources occupied by the target processing core, thereby avoiding the occurrence of packet loss problems caused by insufficient available mbuf resources in other processing cores.

[0034] It should be noted that the above-mentioned first data flow is the data flow that currently needs to be processed by the target processing core when the DPI receives an alarm event.

[0035] By implementing the message processing method provided by the present application, when the operating system determines the CPU utilization of each processing core, if it detects that the CPU utilization of the target processing core meets the alarm condition, an alarm event is sent to the DPI engine so that the DPI engine controls the first data stream sent to the target processing core in the forwarding plane, that is, performs bypass processing, and no longer performs deep message detection on the first data stream. Since the DPI does not need to perform deep message detection on the message of the first data stream corresponding to the target processing core, and directly performs forwarding processing, it avoids the situation where the DPI occupies more mbuf resources when performing deep message processing, thereby achieving the purpose of effectively responding to a single large flow, and solving the problem of packet loss caused by the exhaustion of memory resources in the network security device due to a single large flow after the DPI service is turned on.

[0036] Optionally, based on the above embodiments, in this embodiment, when executing step S103, it can be implemented according to the following process: setting an alarm mark for the target processing core and recording it; when it is necessary to perform deep packet inspection on the first data stream of the target processing core, if the alarm mark of the target processing core is read, forwarding processing is performed on the first data stream.

[0037] Specifically, in order to facilitate the forwarding plane's control over the message processing of the target processing core, the DPI can maintain a tag list, and then record the correspondence between the core identifier of the processing core that generates the alarm and the alarm tag in the tag list. That is, when the operating system determines that the CPU utilization of the target processing core has reached the alarm condition, when sending an alarm event to the DPI engine, it can carry the core identifier of the target processing core in the alarm event. In this way, after receiving the alarm event, the DPI engine can parse the core identifier from the alarm event, and then write the correspondence between the core identifier of the target processing core and the alarm tag in the tag list.

[0038] On this basis, on the forwarding plane, before the DPI engine executes deep packet inspection of the first data stream corresponding to the target processing core, it can first read from the tag list whether the target processing core has an alarm mark. When the alarm mark of the target processing core is successfully read, deep packet inspection is not performed on the first data stream, and the first data stream is forwarded.

[0039] Optionally, the DPI engine can also record the alarm mark of the target processing core according to the following method: the DPI engine applies for respective storage space for each processing core in advance, so that the DPI engine can write the alarm mark of the target processing core into the storage space corresponding to the target processing core. In this way, when the target processing core currently reads the first data stream and needs to perform deep packet inspection, the DPI engine can be called to implement it. At this time, the DPI engine can read the alarm mark from the storage space corresponding to the target processing core. When the alarm mark is read, the deep packet inspection process is not performed on the first data stream directly, that is, the first data stream is forwarded. When the alarm mark is not read, the deep packet inspection process is performed normally on the first data stream, and the forwarding process is performed on the first data stream that passes the inspection.

[0040] It should be noted that the specific values ​​of the above-mentioned alarm marks can be configured according to actual conditions, and this application does not limit their specific values.

[0041] Optionally, based on the above embodiment, in this embodiment, when it is necessary to perform deep packet inspection on the first data stream of the target processing core, if the alarm mark of the target processing core is read, the step of performing forwarding processing on the first data stream can be executed according to the following process: when it is necessary to process the packet of the above-mentioned first data stream, query the session table item of the above-mentioned first data stream; if the above-mentioned session table item includes a bypass mark, forward the above-mentioned packet; if the above-mentioned session table item does not include the bypass mark, read the alarm mark of the above-mentioned target processing core; if the alarm mark of the above-mentioned target processing core is read, forward the above-mentioned packet; and add a bypass mark to the above-mentioned session table item to obtain the marked session table item; when it is necessary to process a new packet of the above-mentioned first data stream, if the above-mentioned new packet hits the above-mentioned marked session table item, forward the above-mentioned new packet.

[0042] Specifically, since the data stream is processed in units of packets, and then each packet of the data stream is processed based on the session table entry, after the target processing core performs layer 2 and layer 3 detection on the packet of the first data stream, before the DPI engine performs deep packet detection on the packet, it first queries the session table entry. If the session table entry does not include an alarm mark, the alarm mark of the target processing core is read from the storage location of the alarm mark, for example, the DPI engine reads from the storage space corresponding to the target processing core; when the alarm mark of the target processing core is read, the DPI engine does not perform deep packet detection on the packet, but directly forwards the packet. At the same time, the DPI engine will add a bypass mark to the session table entry, for example, add bypass, to obtain the marked session table entry, so that when the DPI engine processes a new packet of the first data stream, when matching the marked session table entry, it can match the bypass mark, and then directly forward the new packet without performing deep packet detection. Since the front packets of the same data stream have not been deep-packet inspected, it is meaningless to perform deep-packet inspection on the rear packets. Therefore, when the front packets of the first data stream are directly forwarded, the rear packets can also be directly forwarded. On the one hand, the DPI engine can perform deep-packet inspection for the data streams of other processing cores, and at the same time, the mbuf resources requested by the target processing core can be reduced, thereby avoiding the phenomenon of one core being blocked and all cores being blocked.

[0043] Optionally, based on any of the above embodiments, in this embodiment, it is also possible to execute Figure 2 The process of the message processing method shown is:

[0044] S201: On the control plane, the operating system reconfirms the CPU utilization of the target processing core.

[0045] In this step, in order to ensure the security of the network to which the network security device is connected to to a certain extent, while solving the problem that when the target processing core encounters large traffic, the mbuf is insufficient and affects the message processing of other processing cores, this embodiment proposes to continue to confirm the CPU utilization of the target processing core on the control plane.

[0046] S202: When the operating system detects that the CPU utilization of the target processing core does not meet the alarm condition, the operating system sends a recovery event to the DPI engine.

[0047] In this step, when the operating system confirms that the CPU utilization of the target processing core does not meet the alarm condition after a period of time, it indicates that the target processing core is executing Figure 1After the process shown, the CPU utilization of the target processing core is alleviated, and some deep packet inspection functions can be processed on the target processing core, thereby ensuring the security of the packets entering the accessed network. In view of this, the operating system will send a recovery event for the target processing core to the DPI engine.

[0048] It should be noted that, when it is confirmed that the CPU utilization of the target processing core is not higher than the set threshold, it can be confirmed that the CPU utilization of the target processing core does not meet the alarm condition.

[0049] It should be noted that the operating system detects the CPU utilization of the target processing core while also detecting the CPU utilization of other processing cores. When the CPU utilization of other processing cores meets the alarm condition, the alarm is executed. Figure 1 When the CPU utilization of other processing cores does not meet the alarm condition, the other processing cores that do not meet the alarm condition are the above-mentioned target processing cores, and the execution process can refer to the processing process for the target processing core, that is, Figure 2 The processes shown will not be described in detail here.

[0050] S203. After the DPI engine receives the recovery event, if the first data stream has not been processed completely, it continues to perform bypass processing on the first data stream; and performs deep packet inspection processing on the second data stream newly acquired by the target processing core.

[0051] In this step, after the DPI engine receives the recovery event for the target processing core, it also needs to identify the data stream that needs to be processed currently. If the data stream to be processed currently is still the first data stream, bypass processing will continue to be performed on the first data stream. It should be noted that since the DPI engine performs bypass processing on the first half of the first data stream (the part processed after receiving the alarm event and before receiving the recovery event), that is, deep message detection is not performed on the first half of the first data stream, in actual applications, it is not meaningful to perform deep message detection only on the second half of the first data stream. Therefore, this step proposes that the DPI engine directly continues to perform forwarding processing on the first data stream and no longer performs deep message detection. In addition, before the alarm event of the target processing core is temporarily not received, when the DPI engine processes the first data stream and needs to process the second data stream newly acquired by the target processing core, deep message detection processing can be performed on the second data stream at this time. In this way, it can also ensure that the messages entering the accessed network are all messages that have passed the deep message detection, thereby improving the security of the accessed network.

[0052] Optionally, based on the above embodiments, it is proposed in this embodiment that step S203 can be performed according to the following method: the DPI engine clears the alarm mark of the above target processing core; if the data stream to be processed currently is the above first data stream, if the alarm mark of the above target processing core is not read, then continue to perform bypass processing on the above first data stream; when the above first data stream is processed, when it is necessary to process the second data stream newly acquired by the above target processing core, if the alarm mark of the above target processing core is not read, then perform deep packet inspection processing on the above second data stream.

[0053] In one embodiment, when the DPI engine maintains a tag list, when the operating system sends a recovery event, it will carry the core identifier of the target processing core, so that after receiving the recovery event, the DPI engine can parse the core identifier from the recovery event, and then delete the correspondence between the core identifier and the alarm tag in the tag list, thereby clearing the alarm tag. On this basis, before the DPI engine performs deep message processing on the data stream of the target processing core on the forwarding plane, it can first read from the tag list whether the target processing core has an alarm tag, that is, based on the core identifier of the target processing core, confirm whether the corresponding alarm tag can be read from the tag list. When the alarm tag is not read, it indicates that the traffic of the data stream on the current target processing core is not enough to cause high CPU utilization. At this time, if the DPI engine wants to process the data stream of the target processing core, it can first identify whether the data stream to be processed is still the first data stream. If it is the first data stream, bypass processing continues to be performed on the first data stream. After processing the first data stream according to the above process, if the alarm mark is still not read at this time, deep packet inspection can be performed on the second data stream newly acquired by the target processing core. In this way, without causing high CPU utilization of the target processing core, deep packet inspection can continue to be performed on the data stream acquired by the target processing core, thereby ensuring to a certain extent that the packets flowing into the network accessed by the security network device are safe, thereby ensuring the security of the accessed network.

[0054] In another embodiment, when the DPI engine writes the alarm mark of the target processing core into the storage space corresponding to the target processing core, after the DPI engine parses the core identifier from the received recovery event, the alarm mark stored in the storage space corresponding to the target processing core corresponding to the core identifier can be cleared. On this basis, before the DPI engine performs deep message processing on the data stream of the target processing core in the forwarding plane, it can first read from the storage space corresponding to the target processing core whether the target processing core has an alarm mark, that is, based on the core identifier of the target processing core, confirm whether the corresponding alarm mark can be read from the storage space corresponding to the target processing core. When the alarm mark is not read, it indicates that the flow of the data stream on the current target processing core is not enough to cause a high CPU utilization. At this time, if the DPI engine wants to process the data stream of the target processing core, it can first identify whether the data stream to be processed is still the first data stream. If it is the first data stream, bypass processing continues to be performed on the first data stream. After processing the first data stream according to the above process, if the alarm mark is still not read at this time, deep packet inspection can be performed on the second data stream newly acquired by the target processing core. In this way, without causing high CPU utilization of the target processing core, deep packet inspection can continue to be performed on the data stream acquired by the target processing core, thereby ensuring to a certain extent that the packets flowing into the network accessed by the security network device are safe, thereby ensuring the security of the accessed network.

[0055] Optionally, the above-mentioned steps of performing deep packet inspection on the second data stream if the alarm mark of the target processing core is not read when processing the first data stream after processing the first data stream; generating a session table entry for the second data stream; and performing packet inspection on other packets of the second data stream according to the session table entry.

[0056] Specifically, after processing the first data stream, when the DPI engine needs to process the second data stream newly acquired by the target processing core, that is, when processing the first packet of the second data stream, if the alarm mark of the target processing core is not read at this time, the DPI engine directly performs deep packet inspection on the first packet; at the same time, a session table entry is generated according to the first packet, so that when the DPI engine processes other subsequent packets of the second data stream, it can directly perform packet inspection processing on other packets according to the session table entry. That is, at this time, since the session table entry does not include a bypass mark, the DPI engine directly performs deep packet inspection processing on the aforementioned other packets, and then performs forwarding processing on the packets that pass the inspection.

[0057] Based on the same inventive concept, the present application also provides a network security device for implementing the above message processing method. Figure 3 , Figure 3 is a schematic diagram of a network security device provided by an exemplary embodiment of the present application, including: an operating system 301, a deep packet inspection DPI engine 302 and multiple processing cores (refer to Figure 3 Processing core 1 to processing core n), where:

[0058] The operating system 301 is used to determine the CPU utilization of each processing core in the control plane; when it is detected that the CPU utilization of the target processing core among the multiple processing cores meets the alarm condition, an alarm event is sent to the DPI engine;

[0059] The DPI engine 302 is configured to perform bypass processing on the first data flow that currently needs to perform deep packet inspection in the target processing core in a forwarding plane after receiving the alarm event.

[0060] Specifically, the processing process of the operating system 301 and the DPI engine 302 is the specific implementation process of the above-mentioned corresponding method embodiment, and will not be described in detail here.

[0061] Optionally, the DPI engine includes a DPI control module 3021 of the control plane and a DPI service processing module 3022 of the forwarding plane, see Figure 4 As shown, where:

[0062] The operating system 301 is specifically used to send an alarm event to the DPI control module, where the alarm event includes a core identifier of the target processing core;

[0063] The DPI control module 3021 is used to set and record an alarm mark for the target processing core corresponding to the core identifier after receiving the alarm event;

[0064] The DPI service processing module 3022 is used to perform forwarding processing on the first data flow of the target processing core in the forwarding plane when deep packet inspection needs to be performed on the first data flow of the target processing core and if an alarm mark of the target processing core is read.

[0065] Specifically, after the control plane receives the alarm event, the DPI control module 3021 will parse the core identifier of the target processing core from the alarm event, and then set an alarm mark for the target processing core, and then write the correspondence between the core identifier of the target processing core and the alarm mark into the mark list, or write the alarm mark of the target processing core into the storage space corresponding to the target processing core. The storage space can be applied for and maintained in advance for each processing core by the DPI control module 3021. On this basis, the DPI business processing module 3022 can read the alarm mark from the mark list or the storage space corresponding to the target processing core before the forwarding plane needs to perform deep packet inspection on the first data stream obtained by the target processing core. When the alarm mark is read, forwarding processing is performed on the first data stream, and deep packet inspection processing is no longer performed on the first data stream.

[0066] On this basis, the above-mentioned DPI business processing module 3022 is specifically used to query the session table entry of the first data flow when it is necessary to process the message of the first data flow; if the session table entry includes a bypass mark, the message is forwarded; if the session table entry does not include a bypass mark, the alarm mark of the target processing core is read; if the alarm mark of the target processing core is read, the message is forwarded; and a bypass mark is added to the session table entry to obtain a marked session table entry; when it is necessary to process a new message of the first data flow, if the new message hits the marked session table entry, the new message is forwarded.

[0067] It should be noted that the processing flow of the DPI service processing module 3022 executing the above embodiment can refer to the corresponding implementation process of the DPI engine in the forwarding plane in the corresponding method embodiment, which will not be described in detail here.

[0068] Optionally, based on any of the above embodiments, in this embodiment, the above operating system 301 is further used to reconfirm the CPU utilization of the target processing core in the control plane; and when it is detected that the CPU utilization of the target processing core does not meet the alarm condition, send a recovery event to the DPI engine;

[0069] The DPI engine 302 is used to, after receiving the recovery event, continue to perform bypass processing on the first data stream if the first data stream has not been processed; and perform deep packet inspection processing on the second data stream newly acquired by the target processing core.

[0070] Specifically, the processing process of the operating system 301 and the DPI engine 302 is the specific implementation process of the above-mentioned corresponding method embodiment, and will not be described in detail here.

[0071] Optionally, based on the above embodiment, the DPI engine in this embodiment includes a DPI control module 3021 of the control plane and a DPI service processing module 3022 of the forwarding plane, please also refer to Figure 4 shown.

[0072] On this basis, the operating system 301 is specifically used to send a recovery event to the DPI control module, wherein the recovery event includes a core identifier of the target processing core;

[0073] The DPI control module 3021 is used to clear the alarm mark of the target processing core after receiving the recovery event;

[0074] The DPI business processing module 3022 is used to continue to perform bypass processing on the first data stream if the data stream to be processed currently is the first data stream and the alarm mark of the target processing core is not read; when the first data stream is processed and it is necessary to process the second data stream newly acquired by the target processing core, if the alarm mark of the target processing core is not read, perform deep packet inspection processing on the second data stream.

[0075] Specifically, after the control plane receives the recovery event, the DPI control module 3021 will parse the core identifier of the target processing core from the recovery event, and then clear the correspondence between the core identifier of the target processing core and the alarm mark in the mark list, or clear the alarm mark from the storage space corresponding to the target processing core. Before the DPI business processing module 3022 performs deep packet inspection on the forwarding plane, it can read the alarm mark from the mark list or the storage space corresponding to the target processing core. If it is not processed, if the current data stream to be processed is the first data stream, then the bypass processing of the first data stream will continue; after processing the first data stream, if it is necessary to process the second data stream newly acquired by the target processing core, if the alarm mark of the target processing core is still not read, then the deep packet inspection processing is performed on the second data stream. It should be noted that the processing flow of the DPI business processing module 3022 to execute the above-mentioned embodiment can refer to the corresponding implementation process of the DPI engine in the forwarding plane in the corresponding method embodiment, which will not be described in detail here.

[0076] On this basis, the above-mentioned DPI business processing module 3022 is specifically used to perform deep packet inspection processing on the first packet of the second data stream if the alarm mark of the target processing core is not read when processing the first packet of the second data stream; generate a session table entry for the second data stream; and perform packet inspection processing on other packets of the second data stream according to the session table entry.

[0077] It should be noted that the processing flow of the DPI service processing module 3022 executing the above embodiment can refer to the corresponding implementation process of the DPI engine in the forwarding plane in the corresponding method embodiment, which will not be described in detail here.

[0078] By providing the above-mentioned security network device, not only the situation where DPI occupies more mbuf resources when performing deep packet processing is avoided, but also the purpose of effectively coping with a single large flow is achieved. At the same time, the problem of packet loss caused by the exhaustion of memory resources in the network security device due to a single large flow after the DPI service is turned on is solved.

[0079] Based on the same inventive concept, this embodiment also provides a machine-readable storage medium, which stores a computer program. When called and executed by an operating system or a DPI engine, the computer program prompts the processor to execute the message processing method provided in any of the above embodiments of the present application.

[0080] The machine-readable storage medium may be a memory, which may include a random access memory (RAM), a DDR SRAM (Double Data Rate Synchronous Dynamic Random Access Memory), or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the processor.

[0081] As for the machine-readable storage medium embodiment, since the method content involved is basically similar to the aforementioned method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0082] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

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

[0084] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are merely schematic, wherein the units / modules described as separate components may or may not be physically separated, and the components displayed as units / modules may or may not be physical units / modules, that is, they may be located in one place, or they may be distributed on multiple network units / modules. Some or all of the units / modules may be selected according to actual needs to achieve the purpose of the present application. A person of ordinary skill in the art can understand and implement it without creative work.

[0085] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A message processing method, It is characterized in that Applied to a network security device, the network security device includes an operating system, a deep packet inspection (DPI) engine, and multiple processing cores, the method includes: In the control plane, the operating system determines the CPU utilization of each processing core; When the operating system detects that the CPU utilization of the target processing core among the multiple processing cores meets the alarm condition, the operating system sends an alarm event to the DPI engine; After receiving the alarm event, the DPI engine performs bypass processing on the forwarding plane for the first data flow that currently needs to perform deep packet inspection in the target processing core; The method further comprises: On the control plane, the operating system reconfirms the CPU utilization of the target processing core; When the operating system detects that the CPU utilization of the target processing core does not meet the alarm condition, the operating system sends a recovery event to the DPI engine; After the DPI engine receives the recovery event, if the first data stream has not been processed, it continues to perform bypass processing on the first data stream, including: the DPI engine clears the alarm mark of the target processing core; if the data stream to be processed currently is the first data stream, if the alarm mark of the target processing core is not read, it continues to perform bypass processing on the first data stream; performs deep packet inspection processing on the second data stream newly acquired by the target processing core, including: when the first data stream is processed and it is necessary to process the second data stream newly acquired by the target processing core, if the alarm mark of the target processing core is not read, it performs deep packet inspection processing on the second data stream.

2. The method according to claim 1, It is characterized in that After receiving the alarm event, the DPI engine performs bypass processing on the forwarding plane on the first data flow currently being processed by the target processing core, including: The DPI engine sets and records an alarm mark for the target processing core; When it is necessary to perform deep packet inspection on the first data stream of the target processing core, if an alarm mark of the target processing core is read, forwarding processing is performed on the first data stream.

3. The method according to claim 2, It is characterized in that When it is necessary to perform deep packet inspection on the first data stream of the target processing core, if an alarm mark of the target processing core is read, forwarding processing is performed on the first data stream, including: When it is necessary to process the message of the first data flow, query the session table entry of the first data flow; If the session entry includes a bypass mark, forwarding the message; If the session table entry does not include a bypass flag, reading an alarm flag of the target processing core; If the alarm mark of the target processing core is read, the message is forwarded; and a bypass mark is added to the session table entry to obtain a marked session table entry; When a new message of the first data flow needs to be processed, if the new message hits the marked session entry, the new message is forwarded.

4. The method according to claim 3, It is characterized in that After processing the first data stream, when it is necessary to process a second data stream newly acquired by the target processing core, if the alarm mark of the target processing core is not read, deep packet inspection processing is performed on the second data stream, including: When processing the first message of the second data stream, if the alarm mark of the target processing core is not read, performing deep message inspection processing on the first message; generating a session table entry for the second data flow; Message detection processing is performed on other messages of the second data flow according to the session table entry.

5. A network security device, It is characterized in that It includes an operating system, a deep packet inspection (DPI) engine, and multiple processing cores, including: The operating system is used to determine the CPU utilization of each processing core in the control plane; when it is detected that the CPU utilization of the target processing core among the multiple processing cores meets the alarm condition, an alarm event is sent to the DPI engine; The DPI engine is configured to, after receiving the alarm event, perform bypass processing on the forwarding plane for the first data flow that currently needs to perform deep packet inspection in the target processing core; The operating system is further used to reconfirm the CPU utilization of the target processing core in the control plane; and when it is detected that the CPU utilization of the target processing core does not meet the alarm condition, send a recovery event to the DPI engine; The DPI engine is configured to, after receiving the recovery event, continue to perform bypass processing on the first data stream if the first data stream has not been processed; and perform deep packet inspection processing on the second data stream newly acquired by the target processing core; The DPI engine includes a DPI control module of the control plane and a DPI service processing module of the forwarding plane; The operating system is specifically used to send a recovery event to the DPI control module, wherein the recovery event includes a core identifier of the target processing core; The DPI control module is used to clear the alarm mark of the target processing core after receiving the recovery event; The DPI business processing module is used to, if the data stream to be processed currently is the first data stream and the alarm mark of the target processing core is not read, continue to perform bypass processing on the first data stream; when the first data stream is processed and it is necessary to process the second data stream newly acquired by the target processing core, if the alarm mark of the target processing core is not read, perform deep packet inspection processing on the second data stream.

6. The network security device according to claim 5, It is characterized in that The DPI engine includes a DPI control module of the control plane and a DPI service processing module of the forwarding plane; The operating system is specifically used to send an alarm event to the DPI control module, wherein the alarm event includes a core identifier of the target processing core; The DPI control module is used to set and record an alarm mark for the target processing core corresponding to the core identifier after receiving the alarm event; The DPI service processing module is used to perform forwarding processing on the first data flow of the target processing core in the forwarding plane when deep packet inspection needs to be performed on the first data flow of the target processing core and if an alarm mark of the target processing core is read.

7. The network security device according to claim 6, It is characterized in that The DPI service processing module is specifically configured to query a session table entry of the first data flow when it is necessary to process a message of the first data flow; if the session table entry includes a bypass mark, forward the message; if the session table entry does not include a bypass mark, read an alarm mark of the target processing core; If the alarm mark of the target processing core is read, the message is forwarded; and a bypass mark is added to the session table entry to obtain a marked session table entry; when a new message of the first data flow needs to be processed, if the new message hits the marked session table entry, the new message is forwarded.

8. The network security device according to claim 7, It is characterized in that The DPI service processing module is specifically configured to perform deep packet inspection processing on the first packet of the second data flow if the alarm mark of the target processing core is not read when processing the first packet of the second data flow; Generate a session table entry for the second data flow; and perform message detection processing on other messages of the second data flow according to the session table entry.

Citation Information

Patent Citations

  • Intelligent flow security processing control method and device

    CN101977154A

  • Depth message detection method, device and system based on fusion home gateway

    CN109391520A

  • CPU multi-core utilization rate optimization processing method and device for single server

    CN110377418A

  • Message detection method and device

    CN112311765A

  • Message detection method and device, electronic equipment and medium

    CN113835885A