Security policy quick matching engine technology

Through the combination of security policy attribute table and multi-core processor, the security policy matching process is optimized, and the problems of poor matching performance and underutilization of resources in the existing technology are solved, and efficient and low-latency security policy matching is achieved.

CN120433960APending Publication Date: 2025-08-05BEIJING VENUS INFORMATION SECURITY TECH +2
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510474189.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-16
Publication Date
2025-08-05

AI Technical Summary

Technical Problem

In the prior art, the sequential matching security policy method causes a sharp increase in the number of security policies when facing complex network environments and diversified security threats, resulting in poor matching performance, and insufficient utilization of the advantages of multi-core processors, resulting in increased processing delays and resource consumption.

Method used

The security policy attribute table is adopted, including source IP, source port, destination IP, destination port, protocol type and action attribute table, and optimized matching and search through hash and structure array, and combined with thread pool and multi-core processor, parallel processing is achieved, reducing the number of matches and improving efficiency.

Benefits of technology

It significantly improves the speed and efficiency of security policy matching of a single data packet, solves the performance bottleneck of sequential matching method, reduces processing delays, makes full use of multi-core processor resources, and optimizes resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120433960A_ABST
    Figure CN120433960A_ABST
Patent Text Reader

Abstract

The invention discloses a security policy quick matching engine technology, which comprises the following steps of: making at least one security policy attribute table according to security policy attributes; analyzing the data packet, and extracting key security policy attributes in the data packet; performing matching search in the corresponding security policy attribute table according to the extracted security policy attributes; determining the security policy with the highest hit priority, and determining a final processing action; and processing the data packet according to the determined processing action. According to the matching engine technology, the security policy matching speed and efficiency of a single data packet can be remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network security, and in particular to a security policy fast matching engine technology. Background Art

[0002] With the development of the Internet, network security has become a key concern for both businesses and individuals. The configuration of security policies in network devices (such as firewalls and routers) is crucial. Currently, the sequential matching security policy execution method is widely used in network security protection devices (such as firewalls and intrusion detection systems). When a data packet arrives at a network security protection device, the system will check whether the data packet meets the conditions of the rule starting from the first security policy rule according to the pre-defined list of security policy rules. If the data meets one of the rules, the data packet is processed according to the action specified by the rule (such as allow, deny, or further processing). However, with the increasing complexity of the network environment and the diversification of security threats, the number of security policies that need to be configured has increased dramatically, which poses a severe challenge to the traditional sequential matching security policy method.

[0003] The information in the background technology is only intended to illustrate the general background of the invention and should not be regarded as an admission or any form of suggestion that this information constitutes the prior art known to a person skilled in the art. Summary of the Invention

[0004] In order to solve at least some of the technical problems in the prior art, the present invention provides a security policy fast matching engine technology.

[0005] The first aspect of the present invention provides a security policy fast matching engine technology, which includes: creating at least one security policy attribute table based on security policy attributes; parsing a data packet to extract key security policy attributes in the data packet; performing a matching search in the corresponding security policy attribute table based on the extracted security policy attributes; determining the highest priority security policy that is hit and determining the final processing action; and processing the data packet according to the determined processing action.

[0006] In certain embodiments, the security policy attribute table includes one or more of a source IP attribute table, a source port attribute table, a destination IP attribute table, a destination port attribute table, a protocol type attribute table, and an action attribute table.

[0007] In certain embodiments, the source IP attribute table is used to store the source IPs involved in all security policy rules and their corresponding rule bitmaps; the source port attribute table is used to store the source ports involved in all security policy rules and their corresponding rule bitmaps; the destination IP attribute table is used to store the destination IPs involved in all security policy rules and their corresponding rule bitmaps; the destination port attribute table is used to store the destination ports involved in all security policy rules and their corresponding rule bitmaps; the protocol type attribute table is used to store the protocol types involved in all security policy rules and their corresponding rule bitmaps; and the action attribute table is used to store the actions involved in all security policy rules and their corresponding rule bitmaps.

[0008] In certain embodiments, the security policy attribute table further includes a rule attribute correspondence table, and the rule attribute correspondence table is used to store the security policy attribute table addresses corresponding to the security policy attributes involved in all security policy rules.

[0009] In certain embodiments, the step of creating at least one security policy attribute table based on security policy attributes includes: using a hash mechanism to hash the source IP and the destination IP into hash values of fixed length to form the source IP attribute table and the destination IP attribute table; and performing a matching search in the corresponding security policy attribute table includes: performing a matching search in the source IP attribute table and the destination IP attribute table according to the hash values of the source IP and the destination IP.

[0010] In certain embodiments, the step of preparing at least one security policy attribute table based on the security policy attributes includes: using a structure array to linearly arrange the port numbers of the source port and the destination port to form the source port attribute table and the destination port attribute table; and performing a matching search in the corresponding security policy attribute table includes: using the port numbers of the source port and the destination port as array subscripts to perform a matching search in the source port attribute table respectively.

[0011] In certain embodiments, the step of creating at least one security policy attribute table based on security policy attributes includes: using a structure array to linearly arrange the protocol numbers of the protocol types to form the protocol type attribute table; and performing a matching search in the corresponding security policy attribute table includes: performing a matching search in the protocol type attribute table using the protocol number as an array subscript.

[0012] In certain embodiments, at least one security policy attribute table is prepared based on the security policy attributes, and determining the final processing action includes: matching the action specification ID involved in the security policy rule; linearly arranging the rule ID and the corresponding action to form the action attribute table; performing a matching search in the corresponding security policy attribute table includes: performing a matching search in the action attribute table according to the rule ID to confirm the policy action.

[0013] In certain embodiments, performing a matching search in the corresponding security policy attribute table based on the extracted security policy attributes includes: creating a thread pool containing at least one thread; binding each thread in the thread pool to a CPU core; assigning the security policy attribute table to each thread in the thread pool to be responsible for the corresponding search task of the security policy attribute table; submitting the matching search task to the thread pool based on the extracted security policy attributes, and the thread pool scheduling the corresponding thread to process the matching search task based on the task type.

[0014] In certain embodiments, determining the highest priority security policy that is hit and determining the final processing action include: determining the matching results of each security policy attribute table; summarizing the rule bitmaps matched by the threads, and performing a bitwise AND operation on the rule bitmaps that are hit in each security policy attribute table; determining the highest priority security policy that is hit based on the bitwise AND operation results of the rule bitmaps; and searching for a policy action based on the security policy.

[0015] The security policy fast matching engine technology of the present invention significantly improves the security policy matching speed and efficiency of a single data packet, and solves the problem of poor matching performance of the sequential security policy matching method in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A flowchart of a security policy fast matching engine technology according to an embodiment of the present invention;

[0017] Figure 2 A corresponding schematic diagram of a rule attribute correspondence table according to an embodiment of the present invention;

[0018] Figure 3 This is a schematic diagram of the correspondence between the CPU core and the security policy attribute table according to an embodiment of the present invention. DETAILED DESCRIPTION

[0019] Various exemplary embodiments of the present invention will now be described in detail. This detailed description should not be considered as limiting the present invention, but rather as a more detailed description of certain aspects, features, and embodiments of the present invention.

[0020] It should be understood that the terms described in the present invention are only for describing particular embodiments and are not intended to limit the present invention. In addition, for numerical ranges in the present invention, it should be understood that the upper and lower limits of the ranges and each intermediate value therebetween are specifically disclosed. Each smaller range between any stated value or intermediate value within a stated range and any other stated value or intermediate value within the stated range is also included in the present invention. The upper and lower limits of these smaller ranges may be independently included or excluded within the scope.

[0021] Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the invention pertains. Although preferred methods and materials are described herein, any methods and materials similar or equivalent to those described herein may also be used in the practice or testing of the present invention. All documents mentioned in this specification are incorporated by reference to disclose and describe the methods and / or materials related thereto. In the event of any conflict with any incorporated document, the present specification shall prevail. Unless otherwise specified, "%" refers to percentages based on weight.

[0022] Example

[0023] like Figure 1 As shown, the present invention provides a security policy fast matching engine technology, which includes:

[0024] S01: Create at least one security policy attribute table based on security policy attributes;

[0025] S02: Parse the data packet and extract key security policy attributes from the data packet;

[0026] S03: performing a matching search in the corresponding security policy attribute table based on the extracted security policy attributes;

[0027] S04: Determine the highest priority security policy that is hit and determine the final processing action;

[0028] S05: Process the data packet according to the determined processing action.

[0029] Specifically, traditional security policy matching methods typically use a sequential matching approach, where each security policy is used as a unit to form a policy rule list. Within this policy rule list, each policy rule is an independent unit, containing a series of policy attributes (e.g., source IP address, destination IP address, protocol type, port number, etc.). When a data packet arrives, the system checks each policy rule one by one in the order of the security policy rule list to determine whether the data packet complies with a particular security policy rule, until the first matching policy rule is found. While this approach is simple and intuitive, as the number of security policy rules increases, sequential matching of security policies will lead to increased data processing latency and low efficiency. Especially when the number of security policy rules is large, it is necessary to traverse a large number of policy rules to find a match, resulting in performance bottlenecks. Furthermore, the shortcomings of traditional sequential matching security policies are particularly evident in high-traffic, high-concurrency environments. The following explains the performance issues of sequential matching security policies and the failure to utilize the advantages of multi-core processors:

[0030] 1. Performance issues with sequential matching security policies

[0031] In sequential security policy matching mode, the system matches each received packet against the security policy rule list in order until the first matching rule is found. If there are a large number of security policies and the matching rule is at the end of the list, or if there is no matching rule, the entire security policy rule list must be scanned. This linear search method can result in significant processing delays when the security policy rule list is long. Especially in high-traffic scenarios, every packet must undergo a complete policy check, which not only increases the processing time for each packet but also causes the security policy matching process to consume significant CPU resources, impacting network performance and service quality.

[0032] 2. Sequential matching security policy does not fully utilize the advantages of multi-core processors

[0033] With advancements in hardware technology, modern network equipment is now widely equipped with multi-core or multi-threaded processors to enhance computing power and the ability to process tasks concurrently. However, existing security policy matching technologies often fail to fully exploit these hardware features. Traditional sequential security policy matching methods typically run on only one core, and even with idle cores, they are unable to effectively share the workload. Therefore, despite the processor's powerful parallel processing capabilities, the lack of an effective parallelized security policy matching mechanism prevents efficient utilization of processor resources, resulting in suboptimal processing efficiency.

[0034] In this embodiment, the data packet matching security policy has nothing to do with the number and position of the security policies, and the result can be obtained with one match. After determining the final processing action, the data packet is processed (for example, allow, deny, log, etc.). The security policy fast matching engine technology adopts a new security policy arrangement method to reorganize and write the security policy according to its attributes, and splits the existing security policy rule list based on policy rules into several custom policy attribute lists classified according to policy attributes. Each attribute list corresponds to a specific policy attribute (for example, source IP, destination IP, protocol type, etc.), that is, the security policy fast matching engine technology converts the existing single security policy rule set into a special security policy attribute list. The matching engine technology changes the matching dimension of the security policy, reducing the number of security policy matches from the level of the number of security policy rules to the level of the number of policy attributes, significantly improving the security policy matching speed and efficiency of a single data packet, and solving the problem of poor matching performance of the sequential matching security policy method in the existing technology.

[0035] According to one embodiment of the present invention, the security policy attribute table includes one or more of a source IP attribute table, a source port attribute table, a destination IP attribute table, a destination port attribute table, a protocol type attribute table, and an action attribute table.

[0036] According to one embodiment of the present invention, the source IP attribute table is used to store the source IP addresses involved in all security policy rules and their corresponding rule bitmaps. The source port attribute table is used to store the source ports involved in all security policy rules and their corresponding rule bitmaps. The destination IP attribute table is used to store the destination IP addresses involved in all security policy rules and their corresponding rule bitmaps. The destination port attribute table is used to store the destination ports involved in all security policy rules and their corresponding rule bitmaps. The protocol type attribute table is used to store the protocol types involved in all security policy rules and their corresponding rule bitmaps. The action attribute table is used to store the actions involved in all security policy rules and their corresponding rule bitmaps.

[0037] In this embodiment, each security policy attribute table only includes data related to its corresponding security policy attribute and does not need to include complete security policy rule information.

[0038] like Figure 2 As shown, according to one embodiment of the present invention, in addition to the source IP attribute table, source port attribute table, destination IP attribute table, destination port attribute table, protocol type attribute table, and action attribute table, the security policy attribute table also includes a rule attribute correspondence table. The rule attribute correspondence table is used to store the security policy attribute table addresses corresponding to the security policy attributes involved in all security policy rules.

[0039] In this embodiment, for example, firewall rules in traditional network security policies include key attributes such as source IP, source port, destination IP, destination port, protocol type, and action. Based on the security policy fast matching engine technology, a source IP attribute table, a source port attribute table, a destination IP attribute table, a destination port attribute table, a protocol type attribute table, an action attribute table, and a rule attribute correspondence table are generated.

[0040] The security policy fast matching engine technology sets a rule attribute correspondence table, which can optimize the security policy matching process, improve matching efficiency, and simplify the process of security policy rule management and maintenance. When a data packet needs to be matched, it can directly search in the corresponding security policy attribute table according to the various security policy attributes of the data packet (such as source IP, destination IP, etc.), so as to quickly locate the relevant rules. For example, when modifying or deleting a security policy rule, the rule attribute correspondence table can be used to quickly locate the position / address of each security policy attribute of the security policy rule in the corresponding security policy attribute table without traversing the corresponding security policy attribute table.

[0041] According to one embodiment of the present invention, creating at least one security policy attribute table based on security policy attributes includes: using a hash mechanism to hash a source IP address and a destination IP address into hash values of fixed lengths, thereby forming a source IP attribute table and a destination IP attribute table. Performing a matching search in the corresponding security policy attribute table includes: performing a matching search in the source IP attribute table and the destination IP attribute table based on the hash values of the source IP address and the destination IP address.

[0042] In this embodiment, since there are a large number of source IPs and destination IPs, a hash mechanism can be used to further optimize the source IP attribute table and the destination IP attribute table, thereby increasing the search speed of the source IP and destination IP, and thus increasing the matching speed of a single data packet.

[0043] For example, as shown in Table 1, the source IP attribute table is composed of a hash table, and the element structure of the hash table is in the Key-Value format. The Key is the source IP, and the Value is the rule bitmap. Each binary bit in the rule bitmap corresponds to the state of a security policy rule (such as permission, filtering policy, etc.) (0 / 1 means disabled / enabled). The source IP attribute table is composed of a hash table, which can reduce the number of source IP matches. In theory, when the hash table is large enough, the time complexity of the source IP query is O(1).

[0044]

[0045] Table 1 Source IP attribute table

[0046] As shown in Table 2, the destination IP attribute table is constructed using a hash table, and its structure is similar to the above-mentioned source IP attribute table constructed using a hash table.

[0047]

[0048] Table 2 Destination IP attribute table

[0049] According to one embodiment of the present invention, generating at least one security policy attribute table based on security policy attributes includes: linearly arranging the port numbers of the source port and the destination port using a structure array to form a source port attribute table and a destination port attribute table. Performing a matching search in the corresponding security policy attribute table includes: performing a matching search in the source port attribute table using the port numbers of the source port and the destination port as array subscripts.

[0050] In this embodiment, for example, as shown in Table 3, the element structure of the source port attribute table is in a Key-Value format. The Key is the source port, and the Value is the rule bitmap. For example, in the TCP / IP protocol, the source port number ranges from 1 to 65535, and the number is fixed. Therefore, the corresponding source port attribute table is a pre-allocated linear array of 65535 elements. When performing source port matching, the source port attribute matching can be performed directly using the source port number as the array subscript, and the query time complexity is O(1).

[0051]

[0052] Table 3 Source port attribute table

[0053] For example, as shown in Table 4, the structure of the destination port attribute table is the same as the source port attribute table described below.

[0054]

[0055] Table 4 Destination port attribute table

[0056] According to one embodiment of the present invention, generating at least one security policy attribute table based on security policy attributes includes: linearly arranging protocol numbers of protocol types using a structure array to form a protocol type attribute table. Performing a matching search in the corresponding security policy attribute table includes: performing a matching search in the protocol type attribute table using the protocol number as an array subscript.

[0057] In this embodiment, for example, as shown in Table 5, the element structure of the protocol type attribute table is in a Key-Value format. The Key is the protocol number, and the Value is the rule bitmap. For example, in the TCP / IP protocol, the source port number ranges from 0 to 255, and the number is fixed. The protocol type attribute table shown is a pre-allocated linear array of 255 elements. When performing protocol type matching, the protocol type attribute can be matched by using the protocol number as the array subscript (i.e., finding the policy rule bitmap), and the query time complexity is O(1).

[0058]

[0059] Table 5 Protocol type attribute table

[0060] According to one embodiment of the present invention, at least one security policy attribute table is created based on the security policy attributes, and determining the final processing action includes:

[0061] S041: Matches the action rule ID involved in the security policy rule.

[0062] S042: Arrange the rule IDs and corresponding actions linearly to form an action attribute table.

[0063] Performing a matching search in the corresponding security policy attribute table includes performing a matching search in the action attribute table according to the rule ID to confirm the policy action.

[0064] In this embodiment, for example, as shown in Table 6, the elements / data structure of the action attribute table are in a key-value format. The key is the security policy rule ID, and the value is the action. For example, the action attribute table can be a linear array pre-allocated based on the maximum number of security policies. The security policy actions are searched using the rule ID, and the query time complexity is O(1).

[0065]

[0066] Table 6 Action attribute table

[0067] The security policy fast matching engine technology provided in this embodiment adopts different data structures according to different security policy attributes, and ultimately reduces the search and matching complexity from O(n) to O(1).

[0068] like Figure 3 As shown, according to one embodiment of the present invention, performing a matching search in a corresponding security policy attribute table based on the extracted security policy attribute includes:

[0069] S031: Create a thread pool containing at least one thread;

[0070] S032: Bind each thread in the thread pool to a CPU core;

[0071] S033: Allocate a security policy attribute table to the threads in the thread pool to be responsible for the corresponding security policy attribute table search task;

[0072] S034: Submit the matching search task to the thread pool based on the extracted security policy attributes.

[0073] S035: The thread pool schedules the corresponding thread to process the matching search task according to the task type.

[0074] In this embodiment, a sufficient number of threads is created, equal to the number of available CPU cores in the system. This full-policy fast matching engine technology first initializes the thread pool. Specifically, it manages threads through the thread pool and binds them to CPU cores in a one-to-one correspondence, ensuring that each thread runs on a fixed CPU core. It then assigns at least one security policy attribute table to each thread in the thread pool, thereby binding the security policy attribute table to the CPU core. Finally, the thread pool schedules the corresponding thread to handle the matching task based on the security policy attributes extracted from the data packet.

[0075] In a multi-core processor environment, this full-policy fast matching engine technology leverages the parallel processing capabilities of multi-core processors. Each thread can process tasks assigned by the thread pool in parallel. By combining the thread pool with multiple cores and enabling fast multi-core matching, the advantages of multiple cores are fully utilized. By using security policy attribute tables for rapid search and matching, each thread is responsible for processing at least one specific security policy attribute table. Multi-cores are used to enable simultaneous matching of multiple security policy attribute tables, further improving overall processing power and search and matching speeds, and optimizing matching time. This security policy fast matching engine technology addresses the problem of prior art sequential security policy matching methods failing to leverage the advantages of multi-core processors, reducing device resource consumption and packet latency.

[0076] According to one embodiment of the present invention, the thread pool uses a load balancing algorithm to assign security policy attribute table search tasks to threads.

[0077] The security policy fast matching engine technology provided in this embodiment uses a load balancing algorithm to ensure balanced task loads across CPU cores, preventing situations where some CPU cores are overly busy while others are idle. For example, if one or more CPUs are extremely busy while other CPUs are idle, the security policy attribute tables corresponding to the threads bound to the busy CPUs are assigned to the threads corresponding to the idle CPUs, thereby balancing CPU resources.

[0078] According to one embodiment of the present invention, determining the highest priority security policy that is hit and determining the final processing action includes:

[0079] S051: Determine the matching results of each security policy attribute table;

[0080] S052: Summarize the rule bitmaps matched by the threads, and perform a bitwise AND operation on the rule bitmaps matched in each security policy attribute table;

[0081] S053: Determine the highest priority hit security policy based on the bitwise AND operation result of the rule bitmap;

[0082] S054: Search for a policy action according to the security policy.

[0083] In this embodiment, the matching results of each security policy attribute table are confirmed. If one of the security policy attribute tables does not match any policy, it means that the data packet does not match the security policy. If there is a matching security policy in each security policy attribute table item, it is necessary to confirm whether there is a complete security policy match. That is, a bitwise AND operation is performed on the matching rule bitmaps in each security policy attribute table. For example, if the bitwise AND operation of the matching rule bitmaps in each security policy attribute table is ultimately 0, it means that no security policy is completely matched. If the bitwise AND operation is ultimately non-zero, it is necessary to confirm the matching policy with the highest priority. After determining the matching policy, the policy action is searched according to the policy to complete the fast matching process of the policy.

[0084] This security policy fast matching engine technology optimizes the time complexity of security policy matching from the traditional O(n) to O(1), reducing the time required to process each data packet. The same search and matching task can use lower-performance, lower-cost hardware to deploy the same service. This matching engine technology significantly improves matching efficiency and, by binding the security policy attribute table to the CPU core, transforms the matching process from serial to parallel, further improving matching efficiency. At the same time, this matching engine technology can significantly reduce packet processing latency, which is critical for real-time communications and other latency-sensitive applications. Lower latency means a better user experience, which can enhance user satisfaction and loyalty. In addition, this matching engine technology is functionally identical to the traditional sequential matching method, achieving full attribute matching of security policies without adversely affecting related security functions such as data auditing.

[0085] Although the present invention has been described with reference to exemplary embodiments, it should be understood that the invention is not limited to the disclosed exemplary embodiments. Various modifications and variations may be made to the exemplary embodiments of the present specification without departing from the scope or spirit of the present invention. The scope of the claims is to be given the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.

Claims

1. A security policy fast matching engine technology, comprising: Creating at least one security policy attribute table based on security policy attributes; Parse the data packet and extract the key security policy attributes in the data packet; Perform a matching search in the corresponding security policy attribute table based on the extracted security policy attributes; Determine the highest priority security policy that is hit and determine the final processing action; Process the data packet according to the determined processing action.

2. The security policy fast matching engine method according to claim 1, wherein the security policy attribute table includes one or more of a source IP attribute table, a source port attribute table, a destination IP attribute table, a destination port attribute table, a protocol type attribute table, and an action attribute table.

3. The security policy fast matching engine method according to claim 2, wherein the source IP attribute table is used to store the source IPs involved in all security policy rules and their corresponding rule bitmaps; the source port attribute table is used to store the source ports involved in all security policy rules and their corresponding rule bitmaps; The destination IP attribute table is used to store the destination IPs involved in all security policy rules and their corresponding rule bitmaps; The destination port attribute table is used to store the destination ports involved in all security policy rules and their corresponding rule bitmaps; The protocol type attribute table is used to store the protocol types involved in all security policy rules and their corresponding rule bitmaps; the action attribute table is used to store the actions involved in all security policy rules and their corresponding rule bitmaps.

4. The security policy fast matching engine method according to claim 3, wherein the security policy attribute table further includes a rule attribute correspondence table, and the rule attribute correspondence table is used to store the security policy attribute table address corresponding to the security policy attributes involved in all security policy rules.

5. The security policy fast matching engine method according to claim 3, wherein said creating at least one security policy attribute table according to the security policy attributes comprises: The source IP and the destination IP are hashed into hash values of fixed lengths using a hash mechanism to form the source IP attribute table and the destination IP attribute table; The matching search in the corresponding security policy attribute table includes: According to the hash values of the source IP and the destination IP, a matching search is performed in the source IP attribute table and the destination IP attribute table respectively.

6. The security policy fast matching engine method according to claim 3, wherein said creating at least one security policy attribute table according to security policy attributes comprises: Arranging the port numbers of the source ports and the port numbers of the destination ports in a linear manner using a structure array to form the source port attribute table and the destination port attribute table; The matching search in the corresponding security policy attribute table includes: The port number of the source port and the port number of the destination port are used as array subscripts to perform matching searches in the source port attribute table.

7. The security policy fast matching engine method according to claim 3, wherein said creating at least one security policy attribute table according to security policy attributes comprises: Arranging the protocol numbers of the protocol types in a linear manner using a structure array to form the protocol type attribute table; The matching search in the corresponding security policy attribute table includes: A matching search is performed in the protocol type attribute table using the protocol number as the array subscript.

8. The security policy fast matching engine method according to claim 4, wherein creating at least one security policy attribute table based on the security policy attributes and determining the final processing action comprises: Match the rule ID for the actions involved in the security policy rule. Arrange the rule IDs and corresponding actions linearly to form the action attribute table; The matching search in the corresponding security policy attribute table includes: A matching search is performed in the action attribute table according to the rule ID to confirm the policy action.

9. The security policy fast matching engine method according to claim 1, wherein performing a matching search in the corresponding security policy attribute table based on the extracted security policy attributes comprises: Create a thread pool containing at least one thread; Bind each thread in the thread pool to a CPU core; Allocating the security policy attribute table to threads in the thread pool to be responsible for the corresponding search task of the security policy attribute table; According to the extracted security policy attributes, the matching search task is submitted to the thread pool. The thread pool schedules the corresponding thread to process the matching search task according to the task type.

10. The security policy fast matching engine method according to claim 9, wherein Determining the highest priority security policy that is hit and determining the final processing action includes: Determine the matching results of each security policy attribute table; Summarize the rule bitmaps matched by the threads and perform a bitwise AND operation on the rule bitmaps matched in each security policy attribute table; Determine the highest priority hit security policy based on the bitwise AND operation result of the rule bitmap; Find policy actions based on security policies.

Citation Information

Patent Citations

  • Data packet filtering method and device

    CN106790170A

  • Network data fusion matching method based on multiple dimensions

    CN111897644A

  • Flow table management method supporting quick update of multiple matching domains

    CN118175089A

  • ACL optimization method and system, electronic equipment and computer storage medium

    CN119520396A