Accurate matching table storage and query system and method

By using the cuckoo hash algorithm to preprocess the storage location of flow table items in the software module in the storage and query system of the exact matching table table, the problem of time-consuming and hash conflicts in the table entry operation in the prior art is solved, and a more efficient packet matching search speed is achieved.

CN120123559APending Publication Date: 2025-06-10CHENGDU HAIWANG NETWORK TECH CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311671933.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-07
Publication Date
2025-06-10

AI Technical Summary

Technical Problem

When inserting, deleting and updating the existing precise matching table, the determination of the table entry position occupies more hardware resources and takes a lot of time, affecting the speed of data packet processing and forwarding; at the same time, the hash conflict problem leads to excessive hardware module resource utilization, affecting the data surface processing performance.

Method used

The flow table preprocessing software module uses the cuckoo hash algorithm to calculate the relative storage location of the flow table entry and store it in the subtable of the exact matching table; the flow table query hardware module uses the same hash algorithm to match to achieve exact matching.

Benefits of technology

By determining the storage location of flow table items in the software module in advance, the workload of the hardware module is reduced and hardware resources is saved. At the same time, the hash function directly obtains the relative storage location of the matching flow table items, which improves the speed of data packet matching search.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120123559A_ABST
    Figure CN120123559A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of communication, in particular to an accurate matching table storage and query system and method. The system comprises a flow table preprocessing software module and a flow table query hardware module, and the flow table preprocessing software module is used for calculating the relative storage position of a flow table item by using a uckoo hash algorithm and storing the flow table item into one sub-table of an accurate matching table based on the relative storage position; flow table item data including the flow table items and the relative storage positions of the flow table items are sent to a flow table query hardware module; and the flow table query hardware module is used for performing matching by utilizing a uckoo hash algorithm to obtain a relative storage position of a flow table item and implementing accurate matching. According to the invention, the flow table preprocessing software module determines the storage position of the flow table item in advance, so that the storage workload of the flow table query hardware module is reduced, and the resources of the flow table query hardware module are saved. Meanwhile, during query, the relative storage position of the matched flow table item is directly obtained through the hash function, and the data packet matching and searching speed is increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technologies, and in particular, to a storage and query system and method for an exact match table. Background Art

[0002] With the continuous popularization and development of Internet applications and the explosive growth of data traffic, the traditional network structure will also undergo a complete change. Among them, software-defined network (SDN, Software Defined Network) technology is a new network architecture that separates control and forwarding and is directly programmable. The important sign that distinguishes it from the traditional network architecture is the decoupling of the control plane and the data plane, and the two planes communicate through open interfaces that follow the same protocol. Among them, the flow table is the forwarding rule sent by the control plane to the data plane in the SDN network, which is used to guide the processing of data packets according to matching and actions, and plays an important role.

[0003] The exact match table is the most basic and commonly used organizational structure of the flow table. It can uniquely define a flow using matching items such as the five-tuple (source address, source port, destination address, destination port, and four-layer protocol number) or seven-tuple (source address, source port, destination address, destination port, four-layer protocol number, service type, and four-layer flag) in the packet. Generally, when implementing, a KEY value is constructed using the matching items, and the hash algorithm is used to determine the storage location of the flow table entry and the location for looking up the flow table entry. In the actual application process, the following problems exist:

[0004] 1. Generally, the exact match table has a large number of entries. When performing insert, delete, and update operations on the entries, the determination of the entry location occupies a large amount of hardware resources and takes a long time, seriously affecting the processing and forwarding speed of data packets;

[0005] 2. To improve the data plane lookup speed, the hash algorithm is generally used, but this will bring hash conflict problems. Whether it is for storing flow table entries or for looking up matching flow table entries, it will occupy a large amount of hardware module resources and affect the data plane processing performance. Summary of the Invention

[0006] The purpose of the present invention is to overcome the above-mentioned defects of the prior art, and thus provide a storage and query system and method for an exact match table.

[0007] To solve the above technical problems, the storage and query system for an exact match table provided by the technical solution of the present invention includes a flow table preprocessing software module and a flow table query hardware module, wherein,

[0008] The flow table preprocessing software module calculates the relative storage position of the flow table entry using the cuckoo hash algorithm, and stores the flow table entry into one of the sub-tables of the exact match table based on the relative storage position; sends the flow table entry data including the flow table entry and its relative storage position to the flow table query hardware module;

[0009] The flow table query hardware module performs matching using the cuckoo hash algorithm, obtains the relative storage position of the flow table entry, and implements exact matching.

[0010] As an improvement of the above system, the flow table preprocessing software module uses the matching item information of the flow table entry as the KEY value, and calculates the relative storage position of the flow table entry using d different hash functions of the cuckoo hash algorithm.

[0011] As an improvement of the above system, storing the flow table entry into one of the sub-tables of the exact match table includes:

[0012] Inserting the flow table entry into one of the sub-tables of the exact match table;

[0013] Updating the flow table entry in one of the sub-tables of the exact match table; and

[0014] Deleting the flow table entry in one of the sub-tables of the exact match table.

[0015] As an improvement of the above system, inserting the flow table entry into one of the sub-tables of the exact match table specifically includes:

[0016] S1: The insertion module of the flow table preprocessing software module obtains the KEY value of the flow table entry to be inserted;

[0017] S2: Calculate the hash value h(i) of the i-th sub-table according to the KEY value; where, the sub-table serial number i of the i-th sub-table is the sub-table serial number of the last inserted flow table entry + 1;

[0018] S3: Determine whether the position of the hash value h(i) of the i-th sub-table is empty; if it is determined to be empty, execute S5, otherwise execute S4;

[0019] S4: Update i to i + 1, execute S2 until all d sub-tables are polled; insert the flow table entry at the relative storage position of the j-th sub-table, and record the inserted flow table entry and its relative storage position in the eviction linked list; where, the sub-table serial number j of the j-th sub-table is the sub-table serial number of the last sub-table + 1 after all d sub-tables are polled this time; the evicted flow table entry becomes the new flow table entry to be inserted, and execute S1;

[0020] S5: Insert the flow table entry to be inserted and send it, along with its relative storage location, to the flow table query hardware module; determine whether an old flow table entry has been removed during the insertion process. If the determination result is no, the insertion operation is completed; if the determination result is yes, send the flow table entries and their relative storage locations in the removal linked list to the flow table query hardware module one by one, and the insertion operation is completed.

[0021] As an improvement of the above system, updating the flow table entry in one of the sub-tables of the exact match table specifically includes:

[0022] S’1: The update module of the flow table preprocessing software module obtains the KEY value of the flow table entry to be updated;

[0023] S’2: Calculate the hash value h(i) of the i-th sub-table according to the KEY value;

[0024] S’3: Determine whether the flow table entry at the hash value h(i) position of the i-th sub-table matches the flow table entry to be updated. If the determination result is no, execute S’4; otherwise, execute S’5;

[0025] S’4: Update i to i + 1 and execute S’2. If it still does not match after polling all d sub-tables, the update operation fails;

[0026] S’5: Update the flow table entry at the hash value h(i) position of the i-th sub-table with the flow table entry to be updated, use the update position as the relative storage location, and send the updated flow table entry and its relative storage location to the flow table query hardware module, and the update operation is completed.

[0027] As an improvement of the above system, deleting the flow table entry in one of the sub-tables of the exact match table specifically includes:

[0028] S”1: The deletion module of the flow table preprocessing software module obtains the KEY value of the flow table entry to be deleted;

[0029] S”2: Calculate the hash value h(i) of the i-th sub-table according to the KEY value;

[0030] S”3: Determine whether the position of the hash value h(i) of the i-th sub-table is empty; if it is empty, execute S”4; otherwise, execute S”5;

[0031] S”4: Update i to i + 1 and execute S”2. If it is still determined to be empty after polling all d sub-tables, it proves that the flow table entry to be deleted does not need to be deleted, and the deletion operation is completed;

[0032] S”5: Determine whether the flow table entry at the position of the hash value h(i) of the i-th sub-table is the same as the flow table entry to be deleted. If it is determined to be the same, delete the flow table entry at the position of the hash value h(i) of the i-th sub-table, use the deletion position as the relative storage position, and send the relative storage position and the deletion command to the flow table query hardware module to complete the deletion operation; otherwise, update i = i + 1 and execute S”2.

[0033] As an improvement of the above system, the total number d of the sub-tables is greater than or equal to 2.

[0034] As an improvement of the above system, the flow table query hardware module calculates d possible relative storage positions of the field to be matched through d different hash functions of the cuckoo hash algorithm, reads d flow table entries at the relative storage positions and compares them with the field to be matched, and uses any flow table entry that is the same as the matching field as the successfully matched flow table entry.

[0035] To achieve another object of the present invention, the present invention also provides a method for storing and querying an exact match table, which is implemented based on the above-mentioned system for storing and querying an exact match table. The method includes:

[0036] Step 1: Through the flow table preprocessing software module, calculate the relative storage position of the flow table entry using the cuckoo hash algorithm, and store the flow table entry into one of the sub-tables of the exact match table based on the relative storage position; send the flow table entry data including the flow table entry and its relative storage position to the flow table query hardware module;

[0037] Step 2: Through the flow table query hardware module, perform matching using the cuckoo hash algorithm to obtain the relative storage position of the flow table entry and implement the exact matching of the flow table entry.

[0038] Compared with the prior art, the advantages of the present invention are that the flow table entries of the exact match table maintain the same relative storage position in the software module and the hardware module, and the software module completes the determination of the storage position of the flow table entry in advance and sends this position and the flow table entry to the hardware module together, reducing the workload of the flow table storage of the hardware module and saving the resources of the hardware module. At the same time, when the hardware module queries, the relative storage position of the matching flow table entry is directly obtained by the hash function, which improves the speed of packet matching and searching. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 It is a schematic diagram of the system for storing and querying an exact match table provided by an embodiment of the present invention;

[0040] Figure 2 It is a flowchart of the flow table entry insertion operation of the exact match table provided by an embodiment of the present invention;

[0041] Figure 3Flowchart of the exact match table flow entry deletion operation provided by the embodiment of the present invention;

[0042] Figure 4 Flowchart of the exact match table flow entry update operation provided by the embodiment of the present invention;

[0043] Figure 5 Flowchart of the exact match table flow entry query operation provided by the embodiment of the present invention. Detailed implementation manners

[0044] The technical solutions provided by the present invention are further described below in conjunction with embodiments.

[0045] Embodiment 1

[0046] A storage and query system for an exact match table disclosed in this embodiment includes: a software-implemented flow table preprocessing module and a hardware-implemented flow table query module; the same flow entry has the same relative storage position in the flow table preprocessing module and the flow table query module, and the flow table preprocessing module determines the relative storage position of the flow entry based on d-dimensional Cuckoo hash calculation; when installing the flow entry, the flow entry data carrying the relative storage position of the flow entry is sent to the flow entry storage module of the hardware; when the hardware stores the flow entry, it directly completes the storage process of the flow entry without calculating the relative storage position of the flow entry; when looking up the flow entry, the hardware flow table matching module directly calculates the relative storage position of the matching flow entry by using the hash function for the field to be matched, realizing exact matching.

[0047] The specific operation process includes:

[0048] 1) The flow table preprocessing module determines the relative storage position of the exact match table flow entry, and the same flow entry has the same relative storage position in the flow table preprocessing module and the flow table query module;

[0049] 2) The flow table preprocessing module determines the insertion position of the flow entry based on the d-dimensional Cuckoo hash algorithm;

[0050] 3) The flow table matching sub-module calculates the relative storage position of the flow entry by using d hash functions to implement exact matching;

[0051] Optionally, the relative storage position is calculated by a software module through d hash functions according to the matching item information of the flow entry to obtain the relative storage position of the flow entry in d sub-tables, and the flow entry is stored in one of the sub-tables.

[0052] Optionally, the relative storage position takes the first entry of the flow table where the entry is located as position 0, and the other positions are the position offsets relative to the first entry.

[0053] Optionally, the d - dimensional Cuckoo hash supports d (d ≥ 2) different hash functions, and each exact - match table is divided into d sub - tables.

[0054] Optionally, the distribution of the exact - match table includes operations of inserting, deleting, and updating the entries of the exact - match table.

[0055] Optionally, in the operation of inserting an entry of the exact - match table, the software module calculates the relative storage position in the i - th sub - table according to the matching - item information of the flow table entry. If the position is empty, the flow table entry is inserted; if the position is not empty, the relative storage position in the d - 1 sub - tables is calculated continuously. If the position is empty, the flow table entry is inserted; if the relative storage positions of all d sub - tables calculated by the hash function have old flow table entries, the j - th sub - table is selected, the flow table entry at the original position is kicked out, the new flow table entry is inserted, and the flow table entry at the original position is re - executed for the insertion operation. The new positions in the other d - 1 sub - tables are calculated by the other d - 1 hash functions until all flow table entries find empty positions to be inserted.

[0056] Optionally, in the operation of inserting an entry of the exact - match table, after the software module finds an empty position, if there is no operation of kicking out other flow table entries, only the relative storage position of the newly inserted flow table entry is sent to the hardware module; if there has been an operation of kicking out other flow table entries, the software module records the relative storage positions of all kicked - out old flow table entries. After sending the relative storage position of the new flow table entry to the hardware module, the new positions of the old flow table entries are sent to the hardware module in turn.

[0057] Optionally, in the operation of inserting an entry of the exact - match table, the sub - table number i of the i - th sub - table is the sub - table number of the last inserted flow table entry + 1;

[0058] Optionally, in the operation of inserting an entry of the exact - match table, the sub - table number j of the j - th sub - table is the sub - table number of the last sub - table + 1 after polling all d sub - tables this time;

[0059] Optionally, in the operation of deleting an entry of the exact - match table, the software module calculates the relative storage positions in the d sub - tables according to the matching - item information of the flow table entry. If the flow table entries in these d positions are the same as the flow table entry to be deleted, the relative storage position of this flow table entry in the sub - table and the delete command are sent to the hardware module, and at the same time, the software module also deletes the flow table entry at this position.

[0060] Optionally, in the operation of updating an entry of the exact - match table, the software module calculates the relative storage positions in the d sub - tables according to the matching - item information of the flow table entry. If the flow table entries in these d positions are the same as the flow table entry to be updated, the relative storage position of this flow table entry in the sub - table and the update command are sent to the hardware module, and at the same time, the software module also updates the flow table entry at this position.

[0061] Optionally, the sum of the flow table entry capacities of the d sub-tables is the same as the capacity of the original 1 exact match table.

[0062] Optionally, when searching for flow table entries, the hardware flow table matching module calculates the to-be-matched fields through d hash functions to obtain d possible relative storage positions, and any non-empty flow table entry in the d positions is a successfully matched flow table entry.

[0063] The present invention will now be further described with reference to the accompanying drawings and specific embodiments.

[0064] The embodiment of the present invention provides an accurate matching table storage and query system, which can calculate the relative storage position of the flow table items to be inserted, deleted, and updated by the software module, reduce the workload of the hardware module, and save resources on the hardware module; when matching and searching for data packets, d possible relative storage positions of the matching flow table items are directly obtained by d hash functions, and accurate matching is achieved, which can improve the speed of flow table query and realize fast forwarding.

[0065] like Figure 1 As shown, specifically including:

[0066] The software module receives the flow table entry message sent down, and the flow table parsing module parses the message to obtain the matching domain as the KEY value, and parses the specific commands of the flow table entry message, which are insert, delete, and update commands, respectively, so as to send the KEY value and flow table entry to the corresponding exact match table entry insertion, deletion, and update modules. After the specific table entry processing module completes the insertion, deletion, and update operations based on the d-dimensional Cuckoo hash algorithm, the relative storage position of the table entry is obtained. The position is based on the first entry in the flow table where the table entry is located as position 0, and other positions are offset relative to the position of the first table entry.

[0067] After the software module sends the relative storage location and flow table entry to the hardware module, the flow table entry storage module of the hardware module finds the specific location according to the flow table id and the relative storage location, and completes the corresponding operation according to the insert, delete, and update commands. When querying, the location of the flow table entry is obtained based on the d hash functions of the to-be-matched fields of the input data packet, and the exact matching result is obtained after comparison. According to whether it is hit and the instructions of the hit flow table entry, the specific action is performed on the output data packet to complete the search operation.

[0068] Figure 2 The process of inserting an exact match table flow entry is described, which includes the following steps:

[0069] First, the exact match table entry insertion module obtains the KEY value of the flow table entry to be inserted, and calculates the hash value h(i) of the i-th sub-table according to the KEY value. Among them, the sub-table number i of the i-th sub-table is the sub-table number of the last inserted flow table entry + 1; in this embodiment, the H3 algorithm is used to calculate the hash value. Each hash function of this algorithm is a different numerical matrix. Reasonable selection of the H3 matrix can obtain excellent uniformity, and the H3 hash function is easy to implement for hardware modules. Secondly, it is judged whether there is already a flow table entry at the position of h(i). If this position is not empty, then update i = i + 1. Then it is judged whether all d sub-tables have been polled. If not all polled, then continue to calculate the hash value h(i) of the updated i-th sub-table. If all d sub-tables have been polled, then insert the new flow table entry at this relative position in the j-th sub-table, and record the newly inserted flow table entry and its position in the elimination linked list. The sub-table number j of the j-th sub-table is the sub-table number of the last sub-table + 1 after polling all d sub-tables this time. At the same time, the kicked-out flow table entry becomes the new flow table entry to be inserted, and continues to perform hash calculation to obtain a new relative position. If the position of h(i) in the sub-table is empty, then insert the flow table entry to be inserted, and send it to the hardware module together with its relative storage position. Then, it is judged whether old flow table entries have been kicked out. If no kicking-out operation has occurred, the insertion operation is completed. If a kicking-out operation has occurred, send the flow table entries and their positions in the kicking-out linked list to the hardware module one by one, and the insertion operation is completed. Finally, the flow table entry storage module of the hardware module stores the flow table entry in the actual position according to the table_id and the relative storage position.

[0070] Figure 3 The process of deleting flow table entries in the exact match table is described, which specifically includes the following steps:

[0071] First, the exact match table entry deletion module obtains the KEY value of the flow table entry to be deleted, and calculates the hash value h(i) of the i-th sub-table according to the KEY value. Secondly, it is judged whether there is already a flow table entry at the position of h(i). If this position is empty, then update i = i + 1. Then it is judged whether all d sub-tables have been polled. If not all polled, then continue to calculate the hash value h(i) of the updated i-th sub-table. If all d sub-tables have been polled and there is still no matching flow table entry, it means that this flow table entry does not need to be deleted, and the deletion operation is completed and returned. If there is already a flow table entry at the position of h(i), then compare whether the flow table entry at this position is the same as the flow table entry to be deleted. For each flow table entry, a unique KEY value is used for identification in this embodiment. If the KEY values are the same, it means the flow table entries are the same; if the KEY values are different, it means the flow table entries are different. If the flow table entries are different, then update i = i + 1 and continue the original process. If the flow table entries are the same, then delete the flow table entry at this position, and send the position and deletion command to the hardware module, and the storage module of the hardware module completes the deletion command.

[0072] Figure 4The process of updating the exact match table flow entry is described, which specifically includes the following steps:

[0073] First, the exact match table entry update module obtains the KEY value of the flow entry to be updated, and calculates the hash value h(i) of the sub-table i according to the KEY value. Secondly, it is judged whether the flow entry to be updated is at the position of h(i). If they are different, then update i = i + 1. Then it is judged whether all d sub-tables have been polled. If not all polled, then continue to calculate the hash value h(i) of the updated i-th sub-table. If all d sub-tables have been polled and there is still no matching flow entry, it indicates that there is no such flow entry, and the update operation returns a failure. If the flow entry at the position of h(i) is the same as the flow entry to be updated, then update the flow entry at this position, and send the position, the flow entry, and the update command to the hardware module, and the storage module of the hardware module completes the update command.

[0074] Figure 5 The process of querying the exact match table flow entry is described, which specifically includes the following steps:

[0075] For the flow entry lookup operation, first calculate d hash values of the field to be matched according to d different hash matrices as the addressing addresses, and read the flow entries pre-distributed in d sub-tables. Then compare the d read flow entries with the field to be matched. If they are all different, then the lookup operation returns a miss. If there is exactly one entry that hits, then read the corresponding action value (value) of this flow entry from the flow entry storage module according to the hit entry address. If the value of value is valid, then the lookup operation returns a hit and outputs the value of value for subsequent modules to perform specific actions, otherwise the lookup operation returns a miss; if there are multiple entries that hit, then read the value of value from the value table according to the address of the entry with the smallest table sequence number, and also judge whether the value of value is valid. If it is valid, then the lookup operation returns a hit and outputs the value of value for subsequent modules to perform specific actions, otherwise the lookup operation returns a miss.

[0076] Embodiment 2

[0077] This embodiment provides a method for storing and querying an exact match table, which is implemented based on the method for storing and querying the exact match table in Embodiment 1. The method includes:

[0078] Step 1: Through the flow table preprocessing software module, use the cuckoo hash algorithm to calculate the relative storage position of the flow entry, and store the flow entry into one of the sub-tables of the exact match table based on the relative storage position; send the flow entry data including the flow entry and its relative storage position to the flow table query hardware module;

[0079] Step 2: Through the flow table query hardware module, use the cuckoo hash algorithm for matching to obtain the relative storage position of the flow entry, and implement the exact match of the flow entry.

[0080] As can be seen from the above specific description of the present invention, a storage and query system and method for an exact match table disclosed by the present invention involve a flow table preprocessing module and a flow table query module. The flow table query module includes a flow table matching sub-module. The flow table preprocessing module determines the relative storage position of the flow table entries in the exact match table, and the same flow table entry has the same relative storage position in the flow table preprocessing module and the flow table query module. The flow table preprocessing module determines the insertion position of the flow table entry based on the d-dimensional Cuckoo hash algorithm. The flow table matching sub-module calculates the relative storage position of the flow table entry using d hash functions to implement exact matching. In the present invention, the flow table entries in the exact match table maintain the same relative storage position in the software module and the hardware module, and the software module completes the determination of the storage position of the flow table entry in advance. When the hardware stores the flow table entry, there is no need to calculate the relative storage position of the flow table entry. This reduces the workload of the flow table storage in the hardware module and saves the resources of the hardware module. At the same time, during the matching query, the hardware module directly obtains the relative storage position of the matching flow table entry through the hash function, which improves the speed of packet matching search.

[0081] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the embodiments, those of ordinary skill in the art should understand that any modification or equivalent replacement of the technical solutions of the present invention does not depart from the spirit and scope of the technical solutions of the present invention, and they should all be covered by the scope of the claims of the present invention.

Claims

1. A storage and query system for an exact match table, characterized in that, it includes a flow table preprocessing software module and a flow table query hardware module, wherein, the flow table preprocessing software module calculates the relative storage position of the flow table entry using the cuckoo hash algorithm, and stores the flow table entry into one of the sub-tables of the exact match table based on the relative storage position; and sends the flow table entry data including the flow table entry and its relative storage position to the flow table query hardware module; the flow table query hardware module performs matching using the cuckoo hash algorithm to obtain the relative storage position of the flow table entry and implements exact matching.

2. The storage and query system for an exact match table according to claim 1, characterized in that, the flow table preprocessing software module uses the matching item information of the flow table entry as the KEY value and calculates the relative storage position of the flow table entry using d different hash functions of the cuckoo hash algorithm.

3. The storage and query system for an exact match table according to claim 1, characterized in that, storing the flow table entry into one of the sub-tables of the exact match table includes: inserting the flow table entry into one of the sub-tables of the exact match table; updating the flow table entry in one of the sub-tables of the exact match table; and deleting the flow table entry in one of the sub-tables of the exact match table.

4. The storage and query system for an exact match table according to claim 3, characterized in that, inserting the flow table entry into one of the sub-tables of the exact match table specifically includes: S1: The insertion module of the flow table preprocessing software module obtains the KEY value of the flow table entry to be inserted; S2: Calculate the hash value h(i) of the i-th sub-table according to the KEY value; wherein, the sub-table serial number i of the i-th sub-table is the sub-table serial number of the last inserted flow table entry + 1; S3: Judge whether the position of the hash value h(i) of the i-th sub-table is empty; if it is judged to be empty, execute S5, otherwise execute S4; S4: Update i to i + 1, execute S2 until all d sub-tables are polled; insert the flow table entry at the relative storage position of the j-th sub-table, and record the inserted flow table entry and its relative storage position in the eviction linked list; wherein, the sub-table serial number j of the j-th sub-table is the sub-table serial number of the last sub-table + 1 after all d sub-tables are polled this time; the evicted flow table entry becomes the new flow table entry to be inserted, and execute S1; S5: Insert the flow table entry to be inserted and its relative storage position and send them to the flow table query hardware module; judge whether an old flow table entry has been evicted during the insertion process, if it is judged to be no, the insertion operation is completed; if it is judged to be yes, send the flow table entry and its relative storage position in the eviction linked list to the flow table query hardware module one by one, and the insertion operation is completed.

5. The storage and query system for an exact match table according to claim 3, characterized in that, updating the flow table entry in one of the sub-tables of the exact match table specifically includes: S’1: The update module of the flow table preprocessing software module obtains the KEY value of the flow table entry to be updated; S’2: Calculate the hash value h(i) of the i-th sub-table according to the KEY value; S’3: Determine whether the flow table entry at the hash value h(i) position of the i-th sub-table matches the flow table entry to be updated. If the determination is no, execute S’4; otherwise, execute S’5; S’4: Update i to i + 1 and execute S’2. If, after polling all d sub-tables, there is still no match, the update operation fails; S’5: Update the flow table entry at the hash value h(i) position of the i-th sub-table with the flow table entry to be updated. Use the update position as the relative storage position, and send the updated flow table entry and its relative storage position to the flow table query hardware module. The update operation is completed.

6. The storage and query system for an exact match table according to claim 3, wherein, deleting a flow table entry in one of the sub-tables of the exact match table specifically includes: S”1: The deletion module of the flow table preprocessing software module obtains the KEY value of the flow table entry to be deleted; S”2: Calculate the hash value h(i) of the i-th sub-table according to the KEY value; S”3: Determine whether the position at the hash value h(i) of the i-th sub-table is empty. If it is determined to be empty, execute S”4; otherwise, execute S”5; S”4: Update i to i + 1 and execute S”2. If, after polling all d sub-tables, it is still determined to be empty, it proves that the flow table entry to be deleted does not need to be deleted, and the deletion operation is completed; S”5: Determine whether the flow table entry at the hash value h(i) position of the i-th sub-table is the same as the flow table entry to be deleted. If the determination is yes, delete the flow table entry at the hash value h(i) position of the i-th sub-table. Use the deletion position as the relative storage position, and send the relative storage position and the deletion command to the flow table query hardware module. The deletion operation is completed; otherwise, update i = i + 1 and execute S”2.

7. The storage and query system for an exact match table according to claim 1, wherein, the total number d of the sub-tables is greater than or equal to 2.

8. The storage and query system for an exact match table according to claim 1, wherein, the flow table query hardware module calculates d possible relative storage positions of the field to be matched through d different hash functions of the cuckoo hash algorithm, reads d flow table entries at the relative storage positions and compares them with the field to be matched, and uses any flow table entry that is the same as the matching field as the successfully matched flow table entry.

9. A method for storing and querying an exact match table, implemented based on the storage and query system for an exact match table according to any one of claims 1 - 8, the method comprises: Step 1: Through the flow table preprocessing software module, calculate the relative storage position of the flow table entry using the cuckoo hash algorithm, and store the flow table entry into one of the sub-tables of the exact match table based on the relative storage position; send the flow table entry data including the flow table entry and its relative storage position to the flow table query hardware module; Step 2: Through the flow table query hardware module, perform matching using the cuckoo hash algorithm to obtain the relative storage position of the flow table entry, and implement the exact matching of the flow table entry.