A five-tuple keyword matching method and device with prefix mask

By preprocessing the mask information of IP five-tuples and building the dictionary tree, efficient matching and flexible query of five-tuple keywords is achieved, and the problem of hash conflict and inflexible matching in the existing technology is solved, and the problem of hash conflict and matching is improved. Match efficiency and flexibility.

CN118427408BActive Publication Date: 2024-11-15NAT COMP NETWORK & INFORMATION SECURITY MANAGEMENT CENT
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410890093.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-04
Publication Date
2024-11-15
Estimated Expiration
2044-07-04

AI Technical Summary

Technical Problem

The existing IP five-tuple matching method is prone to hash conflicts, and the matching method for five-tuple is inflexible, making it impossible to achieve efficient query and flexible matching of any keyword combination.

Method used

Using the five-tuple keyword matching method of prefix mask, the mask information is preprocessed, the address information and port string are converted into byte information, the dictionary tree is constructed, and the matching rules are constructed through the dictionary tree depth value is realized. Querying matching keywords improves matching efficiency and flexibility.

Benefits of technology

Effectively saves dictionary tree storage space, improves matching efficiency, realizes batch return of matching results and greater matching flexibility, and supports non-essential matching of IP addresses or ports that are accurate to the last digit.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118427408B_ABST
    Figure CN118427408B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of network data processing, and in particular to a method and device for prefix masked five-tuple keyword matching, the method comprising: loading a five-tuple as a matching rule and mask information corresponding to the five-tuple; preprocessing the mask information to obtain a target five-tuple; constructing at least one dictionary tree based on the target five-tuple; generating target five-tuple information by parsing a data packet corresponding to at least one dictionary tree; querying a keyword to be matched based on the target five-tuple information to generate a matching result. By applying the method, the storage space of the dictionary tree can be effectively saved by preprocessing the mask information; in constructing at least one dictionary tree based on the target five-tuple, the mask matching function of the dictionary tree is realized, and the matching efficiency is improved; the matching mark is retained in the hit array method, and finally the batch return of the matching results is realized, which is conducive to improving the matching efficiency and the flexibility of the mask matching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of network data processing, and in particular to a prefix mask quintuple keyword matching method. Background Art

[0002] IP quintuple (hereinafter referred to as quintuple) matching is a commonly used function in network development. It refers to the five basic elements used to represent and define a specific network connection in computer network communications, including source IP address, source port number, destination IP address, destination port number and protocol type.

[0003] The conventional IP five-tuple matching method uses a five-tuple hash algorithm for matching, that is, a hash calculation is performed on the five-tuple to obtain a unique hash value for identifying the data packet. In the network device, these hash values ​​can be stored in a hash table to achieve fast data packet matching and filtering. However, the conventional IP five-tuple matching method is prone to hash conflicts and has high requirements for the hash algorithm. The five keywords of the five-tuple can only be queried by full matching, which has low flexibility.

[0004] In view of this, how to provide an efficient quintuple matching method to realize the query of any keyword combination and the flexible matching of masks has become an urgent problem to be solved. Summary of the invention

[0005] The invention provides a prefix masked quintuple keyword matching method and a prefix masked quintuple keyword matching device, which are used to at least solve the problems of low efficiency and inflexible matching of current mask matching.

[0006] According to a first aspect of an embodiment of the present invention, a prefix masked five-tuple keyword matching method is provided, comprising:

[0007] Loading a five-tuple as a matching rule and mask information corresponding to the five-tuple;

[0008] Preprocessing the mask information to obtain a target quintuple, wherein the preprocessing of the mask information includes converting character strings corresponding to address information and ports involved in the mask information into byte information;

[0009] Based on the target quintuple, construct at least one dictionary tree, wherein the target quintuple, based on the depth value of the dictionary tree, includes a first quintuple and a second quintuple, and the dictionary tree is constructed by the first quintuple within the depth value range of the dictionary tree and the second quintuple outside the depth value range of the dictionary tree;

[0010] Generate target five-tuple information by parsing a data packet corresponding to at least one dictionary tree;

[0011] Based on the target quintuple information, a query is performed on the keywords to be matched to generate a matching result.

[0012] According to a second aspect of an embodiment of the present invention, a prefix masked five-tuple keyword matching device is provided, comprising:

[0013] A loading module, configured to load a quintuple as a matching rule and mask information corresponding to the quintuple;

[0014] A preprocessing module is configured to preprocess the mask information to obtain a target quintuple, wherein the preprocessing of the mask information includes converting a character string corresponding to the address information and the port involved in the mask information into byte information;

[0015] A construction module is configured to construct at least one dictionary tree based on the target quintuple, wherein the target quintuple, based on the depth value of the dictionary tree, includes a first quintuple and a second quintuple, and the dictionary tree is constructed by the first quintuple within the depth value range of the dictionary tree and the second quintuple outside the depth value range of the dictionary tree;

[0016] A parsing module is configured to generate target five-tuple information by parsing a data packet corresponding to at least one dictionary tree;

[0017] The query module is configured to query the keywords to be matched based on the target quintuple information and generate matching results.

[0018] In a third aspect of the embodiments of the present application, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the above-mentioned prefix mask five-tuple keyword matching method are implemented.

[0019] In a fourth aspect of the embodiments of the present application, a computer device is provided, including:

[0020] Memory and processor;

[0021] The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions. When the computer executable instructions are executed by the processor, the steps of the five-tuple keyword matching method of the prefix mask are implemented.

[0022] An embodiment of the present application provides a prefix masked quintuple keyword matching method, comprising: loading a quintuple as a matching rule and mask information corresponding to the quintuple; preprocessing the mask information to obtain a target quintuple, wherein the preprocessing of the mask information comprises converting character strings corresponding to address information and ports involved in the mask information into byte information; constructing at least one dictionary tree based on the target quintuple; generating target quintuple information by parsing data packets corresponding to at least one dictionary tree; and querying keywords to be matched based on the target quintuple information to generate matching results.

[0023] The five-tuple keyword matching method with prefix mask provided in the embodiment of the present application can effectively save the storage space of the dictionary tree by preprocessing the mask information and converting the character string corresponding to the keyword into bytes for processing one by one; at least one dictionary tree is constructed based on the target five-tuple, and the corresponding bytes outside the depth value of the dictionary tree and the mask array are ANDed to obtain the IP segment filtered by the mask and the final port range, thereby realizing the mask matching function of the dictionary tree and improving the matching efficiency; retaining the matching mark in the hit array, and finally realizing the batch return of the matching results, which is conducive to improving the matching efficiency and the flexibility of mask matching.

[0024] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0026] Figure 1 It is a flowchart of a prefix mask five-tuple keyword matching method provided in an embodiment of the present application;

[0027] Figure 2 It is a block diagram of a prefix masked five-tuple keyword matching device provided in an embodiment of the present application;

[0028] Figure 3 It is a structural block diagram of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0029] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.

[0030] See also Figure 1 , Figure 1 FIG. 1 is a flow chart of a prefix mask five-tuple keyword matching method provided in an embodiment of the present application. Figure 1 As shown, the specific steps include the following steps.

[0031] Step S102: Loading a quintuple as a matching rule and mask information corresponding to the quintuple.

[0032] Step S104: preprocessing the mask information to obtain a target quintuple, wherein the preprocessing of the mask information includes converting character strings corresponding to the address information and ports involved in the mask information into byte information.

[0033] Specifically, the mask information is preprocessed to obtain a target quintuple, including: in response to the keyword of the quintuple being an IP address, converting the character string corresponding to the IP address into address bytes one by one for processing; in response to the keyword of the quintuple being a port, converting the character string corresponding to the port into port bytes one by one, and directly storing high bytes higher than a preset byte threshold and low bytes not higher than a preset byte threshold respectively; and obtaining the target quintuple based on the address bytes and the port bytes.

[0034] In an embodiment of the present application, the mask information is preprocessed, specifically including: processing the IPv4 address in the quintuple information into 4-byte information; processing the IPv6 address in the quintuple information into 16-byte information; processing the port in the quintuple information into 2-byte information.

[0035] According to the provided mask, several keywords of the five-tuple are processed separately: if it is an IP address, the string is converted into bytes for processing; if it is a port, the same is true, and the high and low bytes are directly stored separately. This application converts the IP address in string form into bytes, which can effectively save dictionary tree storage space.

[0036] Step S106: Construct at least one dictionary tree based on the target quintuple, wherein the target quintuple, based on the depth value of the dictionary tree, includes a first quintuple and a second quintuple, and the dictionary tree is constructed by the first quintuple within the depth value range of the dictionary tree and the second quintuple outside the depth value range of the dictionary tree.

[0037] Specifically, the construction of at least one dictionary tree based on the target quintuple includes: calculating the dictionary tree depth value corresponding to at least one of the dictionary trees based on the mask information; constructing a conventional dictionary tree according to bytes for the first quintuple within the dictionary tree depth value; setting a mask array; performing a bitwise AND operation on the bytes corresponding to the second quintuple outside the dictionary tree depth value and the mask array to obtain a mask bit value; traversing all byte information, performing a bitwise AND operation on the mask array to generate an operation result, and in response to the operation result being consistent with the mask bit value, constructing the next depth node and setting a corresponding match mark in the hit array; repeating the above-mentioned AND operation to construct at least one dictionary tree based on the conventional dictionary tree.

[0038] After constructing at least one dictionary tree, the method includes: marking a matching mark on the character nodes that meet the matching rules.

[0039] In an embodiment of the present application, the processed quintuple information is constructed into a dictionary tree, specifically including: constructing the IPv4 address, IPv6 address and port in the quintuple information into three dictionary trees respectively.

[0040] Specifically, first, the depth Deep of the dictionary tree is calculated according to the mask in the five-tuple information, and the five-tuple within the Deep value is constructed as a regular dictionary tree node by byte; then, the mask array {0x00, 0x80, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC, 0xFE, 0xFF} is set; secondly, the mask value is modulo, and the obtained value is "AND" operated with the mask array to obtain the mask bit value MaskValue; then, traverse 0~255 and perform "AND" operation with the mask array. If it is the same as MaskValue, the next depth node is constructed, and the corresponding matching mark is set in the hit array; finally, the above operations are executed in batches to complete the dictionary tree construction of large-scale five-tuple rules.

[0041] In the dictionary tree construction stage, the corresponding bytes outside the Deep value are bitwise ANDed with the mask array, and the final result is the IP segment filtered by the mask; bitwise ANDed with the mask to obtain the final port range. In the dictionary tree construction process, this application does not use the entire IP address or port and the mask for "AND" operation, but uses the mask array to perform "AND" budget with the last byte of the IP address, which realizes the mask matching function of the dictionary tree and improves efficiency compared with the traditional construction method.

[0042] In addition, the matching marks are retained in the form of a hit array, and the matching results can be returned in batches. Taking the IP address as an example, put it into the dictionary tree and traverse the character nodes in the dictionary tree from the root node to match. If it comes to the node mark that identifies the rule, it proves that the match is successful. After the address scan is completed, the results can be returned in batches. Compared with the ordinary dictionary tree, which can only return a single result each time, the matching efficiency is improved.

[0043] Step S108: Generate target quintuple information by parsing the data packet corresponding to at least one dictionary tree.

[0044] Step S110: Based on the target quintuple information, query the keywords to be matched to generate matching results.

[0045] In response to the matching result hitting the matching mark, it is determined that the match is successful, and after the query task is completed, the query results are output in batches.

[0046] Based on the target quintuple information, the keyword to be matched is queried to generate a matching result, including: inputting the keyword to be matched into a dictionary tree, traversing the character nodes of the dictionary tree in sequence from the root node, and in response to the matching mark of the character node satisfying the node mark of the matching rule corresponding to the keyword, determining that the match is successful and generating a matching result.

[0047] This application constructs a dictionary tree for several keywords of the quintuple, and can perform free combination queries on 1-5 keywords; supporting mask matching means that it is not necessary to provide an IP address or port accurate to the last digit, which can provide greater matching flexibility in specific scenarios.

[0048] Corresponding to the above method embodiment, the present application also provides a prefix mask five-tuple keyword matching device embodiment, see Figure 2 , Figure 2 is a block diagram of a prefix masked five-tuple keyword matching device provided in an embodiment of the present application, such as Figure 2 As shown, it specifically includes the following modules.

[0049] A loading module 202, configured to load a quintuple as a matching rule and mask information corresponding to the quintuple;

[0050] The preprocessing module 204 is configured to preprocess the mask information to obtain a target quintuple, wherein the preprocessing of the mask information includes converting a character string corresponding to the address information and the port involved in the mask information into byte information;

[0051] The construction module 206 is configured to construct at least one dictionary tree based on the target quintuple, wherein the target quintuple, based on the depth value of the dictionary tree, includes a first quintuple and a second quintuple, and the dictionary tree is constructed by the first quintuple within the depth value range of the dictionary tree and the second quintuple outside the depth value range of the dictionary tree;

[0052] The parsing module 208 is configured to generate target five-tuple information by parsing the data packet corresponding to at least one dictionary tree;

[0053] The query module 210 is configured to query the keywords to be matched based on the target quintuple information and generate matching results.

[0054] In an optional embodiment, the query module 210 is further configured to:

[0055] In response to the matching result hitting the matching mark, it is determined that the match is successful, and after the query task is completed, the query results are output in batches.

[0056] In an optional embodiment, the preprocessing module 204 is further configured to:

[0057] In response to the keyword of the quintuple being an IP address, converting the character string corresponding to the IP address into address bytes one by one for processing;

[0058] In response to the keyword of the quintuple being a port, the character strings corresponding to the ports are converted into port bytes one by one, and high bytes higher than a preset byte threshold and low bytes not higher than the preset byte threshold are directly stored respectively;

[0059] Based on the address byte and the port byte, a target five-tuple is obtained.

[0060] In an optional embodiment, the construction module 206 is further configured to:

[0061] Based on the mask information, calculate a dictionary tree depth value corresponding to at least one of the dictionary trees respectively;

[0062] Performing a conventional dictionary tree construction on the first five-tuple within the dictionary tree depth value according to bytes;

[0063] Set up the mask array;

[0064] Performing a bitwise AND operation on the bytes corresponding to the second five-tuple outside the depth value of the dictionary tree and the mask array to obtain a mask bit value;

[0065] Traversing all byte information, performing bitwise AND operation with the mask array, generating an operation result, and in response to the operation result being consistent with the mask bit value, constructing the next depth node and setting the corresponding match mark in the hit array;

[0066] Repeat the above operations to construct at least one dictionary tree based on the conventional dictionary tree.

[0067] In an optional embodiment, after the construction module 206, it is further configured to:

[0068] Add matching marks to the character nodes that meet the matching rules.

[0069] In an optional embodiment, the query module 210 is further configured to:

[0070] The keyword to be matched is input into the dictionary tree, and the character nodes of the dictionary tree are traversed in sequence from the root node. In response to the matching mark of the character node satisfying the node mark of the matching rule corresponding to the keyword, it is determined that the match is successful and a matching result is generated.

[0071] The five-tuple keyword matching device using the prefix mask provided in the embodiment of the present application can effectively save the storage space of the dictionary tree by preprocessing the mask information and converting the character string corresponding to the keyword into bytes for processing one by one; at least one dictionary tree is constructed based on the target five-tuple, and the corresponding bytes outside the depth value of the dictionary tree are ANDed with the mask array to obtain the IP segment filtered by the mask and the final port range, thereby realizing the mask matching function of the dictionary tree and improving the matching efficiency; the matching mark is retained in the hit array, and finally the batch return of the matching results is realized, which is conducive to improving the matching efficiency and the flexibility of the mask matching.

[0072] Figure 3 300 is a block diagram of a computing device provided in an embodiment of the present application. The components of the computing device 300 include but are not limited to a memory 310 and a processor 320. The processor 320 is connected to the memory 310 via a bus 330, and a database 350 is used to store data. The computing device 300 also includes an access device 340.

[0073] In one embodiment of the present application, the above components of the computing device 300 and Figure 3 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 3 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of the present application. Those skilled in the art may add or replace other components as needed.

[0074] The computing device 300 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 300 may also be a mobile or stationary server.

[0075] The processor 320 is used to execute the following computer executable instructions, which implement the steps of the above method when executed by the processor.

[0076] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above method belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the above method.

[0077] An embodiment of the present application further provides a computer-readable storage medium storing computer-executable instructions, which can implement the steps of the above method when executed by a processor.

[0078] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above method belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the above method.

[0079] It should be noted that in the embodiments of the present application, 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 includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0080] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0081] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0082] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A five-tuple keyword matching method with prefix mask, It is characterized in that include: Loading a five-tuple as a matching rule and mask information corresponding to the five-tuple; Preprocessing the mask information to obtain a target quintuple, wherein the preprocessing of the mask information includes converting character strings corresponding to address information and ports involved in the mask information into byte information; Based on the target quintuple, construct at least one dictionary tree, wherein the target quintuple, based on the depth value of the dictionary tree, includes a first quintuple and a second quintuple, and the dictionary tree is constructed by the first quintuple within the depth value range of the dictionary tree and the second quintuple outside the depth value range of the dictionary tree; Generate target five-tuple information by parsing a data packet corresponding to at least one dictionary tree; Based on the target quintuple information, query the keywords to be matched to generate matching results; The preprocessing of the mask information to obtain the target quintuple includes: In response to the keyword of the quintuple being an IP address, converting the character strings corresponding to the IP address into address bytes one by one for processing; In response to the keyword of the quintuple being a port, the character strings corresponding to the ports are converted into port bytes one by one, and high bytes higher than a preset byte threshold and low bytes not higher than the preset byte threshold are directly stored respectively; Based on the address byte and the port byte, obtain a target quintuple; The step of constructing at least one dictionary tree based on the target quintuple includes: Based on the mask information, calculate a dictionary tree depth value corresponding to at least one of the dictionary trees respectively; Performing a conventional dictionary tree construction on the first five-tuple within the dictionary tree depth value according to bytes; Set up the mask array; Performing a bitwise AND operation on the bytes corresponding to the second five-tuple outside the depth value of the dictionary tree and the mask array to obtain a mask bit value; Traversing all byte information, performing bitwise AND operation with the mask array, generating an operation result, and in response to the operation result being consistent with the mask bit value, constructing the next depth node and setting the corresponding match mark in the hit array; Repeat the above operations to construct at least one dictionary tree based on the conventional dictionary tree.

2. The method according to claim 1, It is characterized in that The querying of the keywords to be matched based on the target quintuple information and generating matching results includes: In response to the matching result hitting the matching mark, it is determined that the match is successful, and after the query task is completed, the query results are output in batches.

3. The method according to claim 1, It is characterized in that After constructing at least one dictionary tree, the process includes: Add matching marks to the character nodes that meet the matching rules.

4. The method according to claim 1, It is characterized in that The querying of the keywords to be matched based on the target quintuple information to generate matching results includes: The keyword to be matched is input into the dictionary tree, and the character nodes of the dictionary tree are traversed in sequence from the root node. In response to the matching mark of the character node satisfying the node mark of the matching rule corresponding to the keyword, it is determined that the match is successful and a matching result is generated.

5. A prefix masked five-tuple keyword matching device, It is characterized in that include: A loading module, configured to load a quintuple as a matching rule and mask information corresponding to the quintuple; A preprocessing module is configured to preprocess the mask information to obtain a target quintuple, wherein the preprocessing of the mask information includes converting a character string corresponding to the address information and the port involved in the mask information into byte information; A construction module is configured to construct at least one dictionary tree based on the target quintuple, wherein the target quintuple, based on the depth value of the dictionary tree, includes a first quintuple and a second quintuple, and the dictionary tree is constructed by the first quintuple within the depth value range of the dictionary tree and the second quintuple outside the depth value range of the dictionary tree; A parsing module, configured to generate target five-tuple information by parsing a data packet corresponding to at least one dictionary tree; A query module is configured to query the keywords to be matched based on the target quintuple information and generate a matching result; Wherein, the preprocessing module is further configured as follows: In response to the keyword of the quintuple being an IP address, converting the character strings corresponding to the IP address into address bytes one by one for processing; In response to the keyword of the quintuple being a port, the character strings corresponding to the ports are converted into port bytes one by one, and high bytes higher than a preset byte threshold and low bytes not higher than the preset byte threshold are directly stored respectively; Based on the address byte and the port byte, obtain a target quintuple; The building block is further configured as follows: Based on the mask information, calculate a dictionary tree depth value corresponding to at least one of the dictionary trees respectively; Performing a conventional dictionary tree construction on the first five-tuple within the dictionary tree depth value according to bytes; Set up the mask array; Performing a bitwise AND operation on the bytes corresponding to the second five-tuple outside the depth value of the dictionary tree and the mask array to obtain a mask bit value; Traversing all byte information, performing bitwise AND operation with the mask array, generating an operation result, and in response to the operation result being consistent with the mask bit value, constructing the next depth node and setting the corresponding match mark in the hit array; Repeat the above operations to construct at least one dictionary tree based on the conventional dictionary tree.

6. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

7. A computer device, It is characterized in that The computer device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the method according to any one of claims 1 to 4 when executed by the processor.