FPGA-based hierarchical session management method and device

By adopting a Bloom filter and hierarchical memory architecture on FPGA, the hash length is dynamically adjusted, which solves the query latency and memory usage problems of traditional hash tables in high concurrency scenarios, and realizes low-latency and efficient session management, which is suitable for high-performance network devices and data centers.

CN120281710BActive Publication Date: 2025-08-19HANGZHOU XINQI ELECTRONIC TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510772037.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-10
Publication Date
2025-08-19
Estimated Expiration
2045-06-10

AI Technical Summary

Technical Problem

In the high concurrency scenario, traditional hash tables have problems such as large query delay fluctuations and high memory usage in session management. Especially in the high concurrency scenario, the hash table conflicts frequently, which increases the uncertainty of query time and hardware resource consumption.

Method used

Using a hierarchical session management method based on FPGA, the Bloom filter is used to match ACL rules, combining block random access memory BRAM, high bandwidth memory HBM and dual-rate synchronous dynamic random memory DDR, the length of the hash value is dynamically adjusted according to the session life cycle type, and the session is stored in different memory, including short session storage to BRAM, medium session storage to HBM, and long session storage to DDR.

Benefits of technology

It realizes low-latency and high-efficiency session query and storage management, reduces redundant memory access, improves system performance and resource utilization, reduces system operation costs, and adapts to the needs of future network development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120281710B_ABST
    Figure CN120281710B_ABST
Patent Text Reader

Abstract

This application discloses an FPGA-based hierarchical session management method. The method obtains quintuple information from a message to be processed; determines multiple first hash values corresponding to the quintuple information, and matches the multiple first hash values against ACL rules using a Bloom filter; determines the session lifecycle type based on the protocol type; if the session is short, selects the lower X bits from the second hash value as the first storage address and stores the quintuple information and the second hash value in BRAM; if the session is medium, selects the lower Y bits from the second hash value as the second storage address and stores the quintuple information and the second hash value in HBM; if the session is long, selects the lower Z bits from the second hash value as the third storage address and stores the quintuple information and the second hash value in DDR. This application can achieve low-latency, high-efficiency session query and storage management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of session management, and in particular to a hierarchical session management method and device based on FPGA. Background Art

[0002] In traditional network systems, session management typically uses hash tables for fast lookups. However, with the explosive growth of network traffic, managing tens of millions, or even hundreds of millions, of sessions has become the norm. This leads to problems with traditional hash table lookups, such as large fluctuations in query latency and high memory usage. Especially in high-concurrency scenarios, hash table conflicts are frequent, increasing not only query time uncertainty but also hardware resource consumption. Summary of the Invention

[0003] The purpose of this application is to provide an FPGA-based hierarchical session management method that can achieve low-latency, high-efficiency session query and storage management.

[0004] In a first aspect, the present application provides a hierarchical session management method based on an FPGA, wherein the FPGA includes a block random access memory (BRAM), a high bandwidth memory (HBM), and a dual-rate synchronous dynamic random access memory (DDR). The method includes:

[0005] Obtain the five-tuple information in the message to be processed;

[0006] Determine multiple first hash values corresponding to the quintuple information, and match the multiple first hash values with access control list (ACL) rules based on a Bloom filter;

[0007] In response to the five-tuple information hitting the ACL rule, determining the session lifecycle type of the to-be-processed message based on the protocol type in the five-tuple information, and using any one of the multiple first hash values as the second hash value;

[0008] If the session lifecycle type is a short session, select the lower X bits from the second hash value as the first storage address, and store the quintuple information and the second hash value in the first storage space corresponding to the first storage address in the BRAM;

[0009] If the session lifecycle type is a medium session, select the lower Y bits from the second hash value as the second storage address, and store the quintuple information and the second hash value in the second storage space corresponding to the second storage address in the HBM;

[0010] If the session lifecycle type is a long session, select the lower Z bits from the second hash value as the third storage address, and store the quintuple information and the second hash value in the third storage space corresponding to the third storage address in the DDR, where Y is greater than X and less than Z.

[0011] Optionally, determining multiple first hash values corresponding to the quintuple information, and matching the multiple first hash values with access control list (ACL) rules based on a Bloom filter includes:

[0012] Performing hash operations on the five-tuple information using k different hash functions to obtain k first hash values;

[0013] Based on the k first hash values, searching, in a plurality of fourth storage spaces of the Bloom filter, a fourth storage space that matches each of the k first hash values, and obtaining a bitmap index value in each matching fourth storage space, wherein the Bloom filter is configured to: for each ACL rule, use k different hash functions to perform calculations to obtain k corresponding hash arrays, and configure the bitmap index value in the fourth storage space corresponding to the k hash arrays to be 1;

[0014] If the values of all bitmap indexes are 1, the five-tuple information is determined to match the ACL rule; otherwise, the five-tuple information is discarded.

[0015] Optionally, the method further includes:

[0016] Obtain session information from the message to be processed. The session information includes five-tuple information, session type, creation time, message statistics, byte statistics, and source port. The creation time is the time when the message to be processed is first received.

[0017] If the session lifecycle type is a short session, select the lower X bits from the second hash value as the first storage address, and store the session information, the second hash value, and the first timestamp information corresponding to the storage of the session information into the first storage space corresponding to the first storage address in the BRAM;

[0018] If the session lifecycle type is a medium session, select the lower Y bits from the second hash value as the second storage address, and store the session information, the second hash value, and the second timestamp information corresponding to the storage of the session information into the second storage space corresponding to the second storage address in the HBM;

[0019] If the session lifecycle type is a long session, select the lower Z bits from the second hash value as the third storage address, and store the session information, the second hash value, and the third timestamp information corresponding to the storage of the session information into the third storage space corresponding to the third storage address in the DDR, where Y is greater than X and less than Z.

[0020] Optionally, the method further includes:

[0021] Obtain the session activity of each session information in BRAM, determine whether the session information is inactive based on the session activity, and migrate the inactive session information to HBM;

[0022] Obtain the session activity of each session in HBM, determine whether the session is inactive based on the session activity, and migrate the inactive session information to DDR;

[0023] The session activity of each session information in the DDR is obtained, and based on the session activity, whether the session information is in an inactive state is determined, and the inactive session information is aged.

[0024] Optionally, obtaining the session activity of each session information in the BRAM, determining whether the session information is in an inactive state based on the session activity, and migrating the inactive session information to the HBM includes:

[0025] For each first storage address in the BRAM, obtain each first timestamp information corresponding to the current polling period, and determine the session activity of the corresponding session information based on the difference between the first timestamp information and the current polling time point;

[0026] If the session activity is not greater than M times the preset polling period, the session information, the second hash value, and the first timestamp information corresponding to the first storage address remain unchanged;

[0027] If the session activity is greater than M times the preset polling period, obtain the second hash value corresponding to the first storage address, select the lower Y bits from the second hash value as the new second storage address, store the session information, the second hash value and the first timestamp information corresponding to the first storage address into the second storage space corresponding to the new second storage address in the HBM, and release the first storage address.

[0028] Optionally, the session activity of each session information in the HBM is obtained, and based on the session activity, whether the session information is in an inactive state is determined, and the inactive session information is migrated to the DDR, including:

[0029] For each second storage address in the HBM, obtain each second timestamp information corresponding to the current polling period, and determine the session activity of the corresponding session information based on the difference between the second timestamp information and the current polling time point;

[0030] If the session activity is not greater than N times the preset polling period, the session information, the second hash value, and the second timestamp information corresponding to the second storage address remain unchanged;

[0031] If the session activity is greater than N times the preset polling period, obtain the second hash value corresponding to the second storage address, select the lower Z bits from the second hash value as the new third storage address, store the session information, second hash value and second timestamp information corresponding to the second storage address into the third storage space corresponding to the new third storage address in the DDR, and release the second storage address.

[0032] Optionally, the session activity of each session information in the DDR is obtained, and based on the session activity, whether the session information is in an inactive state is determined, and the inactive session information is aged, including:

[0033] For each third storage address in the DDR, obtain each third timestamp information corresponding to the current polling cycle, and determine the session activity of the corresponding session information based on the difference between the third timestamp information and the current polling time point;

[0034] If the session activity is not greater than P times the preset polling period, the session information, the second hash address, and the third timestamp information corresponding to the third storage address remain unchanged;

[0035] If the session activity is greater than P times the preset polling period, the session information, the second hash value, and the third timestamp information corresponding to the third storage address are aged.

[0036] Optionally, the method further includes:

[0037] For each first storage address in the BRAM, the corresponding session lifetime is determined based on the difference between the corresponding creation time and the current polling time point. If the session lifetime exceeds the first time threshold, the next time a to-be-processed message identical to the corresponding quintuple is received, the lower Y bits are selected from the corresponding second hash value as the second storage address. The session information, the second hash value, and the second timestamp information corresponding to the storage of the session information in the to-be-processed message are stored in the second storage space corresponding to the second storage address in the HBM.

[0038] For each second storage address in the HBM, the corresponding session survival time is determined by the difference between the corresponding creation time and the current polling time point. If the session survival time exceeds the second time threshold, the next time a to-be-processed message with the same five-tuple information as the corresponding is received, the lower Z bits are selected from the corresponding second hash value as the third storage address, and the session information, the second hash value, and the third timestamp information corresponding to the storage of the session information in the to-be-processed message are stored in the third storage space corresponding to the third storage address in the DDR.

[0039] In a second aspect, the present application provides an FPGA-based hierarchical session management method and apparatus, the apparatus comprising:

[0040] An acquisition module is used to obtain the five-tuple information in the message to be processed;

[0041] a Bloom filter, configured to determine a plurality of first hash values corresponding to the quintuple information, match the plurality of first hash values with an access control list (ACL) rule based on the Bloom filter, and in response to the quintuple information hitting the ACL rule, determine a session lifecycle type of the message to be processed based on a protocol type in the quintuple information, and use any one of the plurality of first hash values as a second hash value;

[0042] a block random access memory (BRAM) configured to, if the session lifecycle type is a short session, select the lower X bits from the second hash value as a first storage address, and store the quintuple information and the second hash value in a first storage space corresponding to the first storage address in the BRAM;

[0043] The high-bandwidth memory (HBM) is configured to select, if the session lifecycle type is a medium session, the lower Y bits from the second hash value as a second storage address, and store the quintuple information and the second hash value in a second storage space corresponding to the second storage address in the HBM;

[0044] A dual-rate synchronous dynamic random access memory DDR is used to select the lower Z bits from the second hash value as the third storage address if the session lifecycle type is a long session, and store the quintuple information and the second hash value in the third storage space corresponding to the third storage address in the DDR, where Y is greater than X and less than Z.

[0045] In a third aspect, the present application provides a communication device, comprising the FPGA-based hierarchical session management apparatus as described above.

[0046] This application uses a Bloom filter to match ACL rules on the five-tuple information in the received message, which can filter out most invalid queries in advance, greatly reducing the query pressure of the subsequent hierarchical compressed hash architecture, improving the query efficiency of the entire hash architecture, and reducing the overall delay of the system; according to the different session life cycle types, the length of the hash value is dynamically adjusted and compressed, and the adjusted hash value is used as the storage address of different memories, reducing redundant memory access and further improving the performance of the system; according to the different session life cycle types, the session is stored in different memories, and by adopting a hierarchical hash architecture, memory usage and unnecessary memory access are effectively reduced, and more efficient query and storage management can be achieved, which greatly improves the system's response speed and processing capabilities, improves resource utilization, and reduces system operating costs; the hierarchical hash architecture is flexible in design and scalable, and can better adapt to the needs of future network development. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 A first flow chart of the FPGA-based hierarchical session management method provided in an embodiment of the present application;

[0048] Figure 2 A second flow chart of the FPGA-based hierarchical session management method provided in an embodiment of the present application;

[0049] Figure 3 A third flow chart of the FPGA-based hierarchical session management method provided in an embodiment of the present application;

[0050] Figure 4 A fourth flow chart of the FPGA-based hierarchical session management method provided in an embodiment of the present application;

[0051] Figure 5 A fifth flow chart of the FPGA-based hierarchical session management method provided in an embodiment of the present application;

[0052] Figure 6 A sixth flow chart of the FPGA-based hierarchical session management method provided in an embodiment of the present application;

[0053] Figure 7 A seventh flow chart of the FPGA-based hierarchical session management method provided in an embodiment of the present application;

[0054] Figure 8 A system block diagram of an FPGA-based hierarchical session management device provided in an embodiment of the present application;

[0055] Figure 9 A system block diagram of the communication device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0056] The present application will be described in detail below in conjunction with the specific embodiments shown in the accompanying drawings, but these embodiments do not limit the present application. Structural, methodological, or functional changes made by ordinary technicians in this field based on these embodiments are included in the scope of protection of the present application.

[0057] Please refer to Figure 1 An embodiment of the present application provides a hierarchical session management method based on an FPGA, wherein the FPGA includes a block random access memory (BRAM), a high bandwidth memory (HBM), and a double data rate generation synchronous dynamic random access memory (DDR). The method includes steps S101-S106.

[0058] S101, obtaining quintuple information in a message to be processed.

[0059] Receive a message to be processed, parse the message to be processed, and obtain the five-tuple information and session type in the message to be processed. The five-tuple information includes the source IP address, destination IP address, source port, destination port, and protocol type. The five-tuple information is used to uniquely identify a session. In network communications, a session refers to a communication connection established between two or more network devices. These sessions can be TCP connections, user login sessions, network service sessions, etc., which are not limited in the embodiments of the present application.

[0060] S102: Determine multiple first hash values corresponding to the quintuple information, and match the multiple first hash values with access control list (ACL) rules based on a Bloom filter.

[0061] Different hash functions are used to perform hash operations on the quintuple information to obtain corresponding multiple first hash values.

[0062] A Bloom filter is an efficient data structure commonly used to determine whether an element is in a set. Based on multiple first hash values, a query is performed within the Bloom filter to retrieve matching access control list (ACL) rules. Access control list technology is widely used in modern network devices (routers and switches). Routers often use ACLs to control the acceptance or rejection of data packets. An ACL primarily involves setting a series of rules, which contain the content of the rule that matches a packet and the action to be performed on the packet after a match. For example, each ACL consists of a series of rules, each consisting of matching items and actions. For example, the source IP address, destination IP address, source port number, destination port number, and protocol number can all be matching items in an ACL rule. The action determines the handling of matching packets, such as permit or deny. Permit means forwarding or processing the packet, while deny means discarding the packet.

[0063] In this embodiment, a Bloom filter is used to match ACL rules against the five-tuple information in a message. The received five-tuple information is determined to match the ACL rules. If not, the message is discarded. If it matches, the message is processed. By applying a Bloom filter to the five-tuple information in the received message, a large number of invalid queries are directly filtered out, eliminating the need for subsequent hash structure lookup. This significantly reduces redundant memory accesses by 75%, greatly alleviating the query pressure on the subsequent layered compressed hash architecture, and particularly reduces redundant accesses to slower HBM and DDR4 memory.

[0064] S103: In response to the quintuple information hitting the ACL rule, determine the session lifecycle type of the message to be processed based on the protocol type in the quintuple information, and use any one of the multiple first hash values as the second hash value.

[0065] When it is determined that the quintuple information matches the ACL rule, the session lifecycle type is determined according to the protocol type in the quintuple information in the message, and any one of the multiple first hash values is used as the second hash value.

[0066] The session lifecycle type is determined based on the protocol type in the five-tuple information in the message. For example, if the protocol type is TCP persistent connection, UDP, WebSocket, VPN, SSH, etc., the session lifecycle type is determined to be a long session. Long sessions generally have characteristics such as long session duration and frequent and stable data exchange, for example, session durations exceeding one minute. Examples include video streaming and long gaming connections. If the protocol type is DNS, ICMP, DHCP, etc., the session lifecycle type is determined to be a short session. Short sessions generally have characteristics such as short session duration and low data exchange, for example, session durations less than two seconds. Examples include IoT probe packets and DNS queries. If the protocol type is HTTP short connection, QUIC, SMTP, or MQTT short-medium connection, the session lifecycle type is determined to be a medium session. Medium sessions have characteristics such as moderate session duration and the possibility of multiple rounds of data exchange, and are determined to be a medium session. For example, sessions lasting approximately two seconds to one minute are examples of rapid access and exit of mobile apps, WeChat and Alipay app requests, and periodic heartbeat transmissions from IoT devices.

[0067] S104: If the session lifecycle type is a short session, select the lower X bits from the second hash value as a first storage address, and store the quintuple information and the second hash value into a first storage space corresponding to the first storage address in the BRAM.

[0068] During session management, the hash value length is dynamically adjusted based on the session lifecycle. For short sessions, typically temporary network connections, such as brief HTTP request sessions during web browsing, these sessions are short-lived and contain relatively small amounts of data. Therefore, a shorter hash value can be used as the storage address, thus satisfying the identification requirements of the five-tuple information.

[0069] Therefore, if the session lifecycle type is short, the lower X bits of the second hash value are selected as the first storage address of the BRAM. The five-tuple information and the second hash value are stored in the first storage space corresponding to the first storage address in the BRAM. FPGA on-chip BRAM offers extremely fast access speeds, with access latency typically less than 10μs. However, its storage capacity is limited, typically designed for 1K-4K entries. Therefore, BRAM can store data for active or frequently accessed sessions. For example, in network devices, sessions currently transmitting data or sessions that frequently initiate requests within a short period of time can be stored in BRAM, ensuring fast access and meeting application scenarios with high real-time requirements.

[0070] S105: If the session lifecycle type is a medium session, select the lower Y bits from the second hash value as a second storage address, and store the quintuple information and the second hash value into a second storage space corresponding to the second storage address in the HBM.

[0071] For a medium session, the session data is not particularly active, so a longer hash value can be used as the storage address to meet the identification requirements of the quintuple information. Therefore, if the session lifecycle type is a medium session, the lower Y bits of the second hash value are selected as the second storage address of the HBM, and the quintuple information and the second hash value are stored in the second storage space corresponding to the second storage address in the HBM.

[0072] FPGAs' on-chip HBM offers faster access speeds and greater storage capacity than BRAM, typically designed for 1M to 32M entries. While its access latency is slightly longer than BRAM, it still meets the needs of most high-performance scenarios. Therefore, HBM can be used to store inactive session data that may be accessed in the future.

[0073] S106: If the session lifecycle type is a long session, select the lower Z bits from the second hash value as the third storage address, and store the quintuple information and the second hash value into the third storage space corresponding to the third storage address in the DDR, where Y is greater than X and less than Z.

[0074] For long sessions, such as long-term online gaming sessions or continuous data transmission sessions, because these sessions last long and have large data volumes, a longer hash value can be used as the storage address to meet the identification requirements of the quintuple information. Therefore, if the session lifecycle type is long, the lower Z bits of the second hash value are selected as the third storage address of the DDR. The quintuple information and the second hash value are stored in the third storage space corresponding to the third storage address in the DDR.

[0075] DDR memory has a large storage capacity, typically designed with 64M to 1G entries (depending on the number of external DDRs and the capacity of each DDR). However, its access speed is relatively slow. Therefore, DDR can store session data that is inactive for a long time or rarely accessed.

[0076] In this embodiment, the Bloom filter is used to match the ACL rules on the five-tuple information in the received message, which can filter out most invalid queries in advance, significantly reduce 75% of redundant memory access, and greatly alleviate the query pressure of the subsequent hierarchical compression hash architecture, especially reducing the redundant access to HBM and DDR4 memories with slower access speeds, improving the query efficiency of the entire hash architecture, and reducing the overall latency of the system; according to the different types of session lifecycles, the length of the hash value is dynamically adjusted and compressed, and the adjusted hash value is used as the storage address of different memories, reducing redundant memory access and further improving the performance of the system; according to the different types of session lifecycles, the session is stored in different memories, and by adopting a hierarchical hash architecture, memory usage and unnecessary memory access are effectively reduced. The parallel computing capabilities of this implementation enable more efficient query and storage management, significantly improving system response speed and processing capabilities, increasing resource utilization, and reducing system operating costs. It comprehensively balances network access speed and storage capacity, making it suitable for scenarios with extremely high session management performance requirements, such as high-performance network equipment and data centers. The layered hash architecture offers a flexible and scalable design, enabling improved system performance and expanded functionality by adding hash functions and expanding hash table capacity, better adapting to the needs of future network development. This embodiment was tested on a Xilinx FPGA platform. The results demonstrated that single-session query latency remained stable at under 15 nanoseconds, significantly reducing query latency compared to traditional hash tables. This significantly meets the stringent real-time requirements of high-performance network equipment and data centers. The system can support up to 120 million queries per second, significantly improving session management throughput and effectively addressing scenarios with large-scale concurrent queries.

[0077] One embodiment of the present application, such as Figure 2 As shown, multiple first Hash values corresponding to the five-tuple information are determined, and access control list (ACL) rules are matched on the multiple first Hash values based on the Bloom filter, including steps S201-S203.

[0078] S201, using k different hash functions to perform hash operations on the quintuple information respectively to obtain k first hash values;

[0079] S202: Based on the k first hash values, query a fourth storage space matching each of the k first hash values in multiple fourth storage spaces of the Bloom filter, and obtain a bitmap index value in each matching fourth storage space, wherein the Bloom filter is configured to: for each ACL rule, use k different hash functions to perform calculations to obtain k corresponding hash arrays, and configure the bitmap index value in the fourth storage space corresponding to the k hash arrays to be 1;

[0080] S203: If all bitmap index values are 1, it is determined that the quintuple information matches the ACL rule; otherwise, the quintuple information is discarded.

[0081] Multiple ACL rules can be pre-set based on actual needs. Each ACL rule includes configuration quintuple information. For each ACL rule, k different hash functions are used for calculation. That is, for each configuration quintuple information, k different hash functions are used for calculation to obtain corresponding k hash arrays. The bitmap index values in the fourth storage space corresponding to the k hash arrays are configured to 1. For example, k is 3, and three different hash functions are used for calculation to obtain three corresponding hash values.

[0082] Exemplarily, the Bloom filter has multiple fourth storage spaces, each of which can store a 1-bit bitmap index value. It can be seen that the total storage capacity of the Bloom filter is low, which only occupies a small amount of storage resources of the FPGA and does not affect the data processing efficiency of the FPGA.

[0083] Use k different hash functions to perform hash operations on the quintuple information respectively to obtain k first hash values. In the multiple fourth storage spaces of the Bloom filter, the k first hash values are used as k read addresses of the Bloom filter to read the bitmap index values stored in the corresponding fourth storage space. If the k bitmap index values read are all 1, it is determined that the quintuple information hits the ACL rule, the message hits the matching rule, and subsequent message processing continues; otherwise, the quintuple information is discarded, that is, the message is discarded.

[0084] In this embodiment, extensive experiments have verified that the Bloom filter mechanism can filter out 98.7% of non-hit queries. Therefore, during actual query processes, a large number of invalid queries are directly filtered out, significantly reducing redundant memory accesses by 75%. This greatly reduces the query pressure on the subsequent layered hash architecture, especially reducing redundant access to the slower HBM and DDR4 memory. For example, when processing millions of query requests per second, the Bloom filter can preemptively filter out the vast majority of invalid queries, allowing BRAM, HBM, and DDR4 to focus on processing truly hit query requests, improving the query efficiency of the entire hash architecture and reducing overall system latency. By designing multiple hash functions, the session identifier (five-tuple information) can be mapped to different levels of hash structures. For example, hash functions such as MD5 and SHA-1 can be used.

[0085] One embodiment of the present application, such as Figure 3 As shown, the method further includes steps S301-S304.

[0086] S301, obtaining session information from a message to be processed, where the session information includes five-tuple information, session type, creation time, message statistics, byte statistics, and source port. The creation time is the time when the message to be processed is first received.

[0087] S302: If the session lifecycle type is a short session, select the lower X bits from the second hash value as the first storage address, and store the session information, the second hash value, and the first timestamp information corresponding to the storage of the session information into the first storage space corresponding to the first storage address in the BRAM;

[0088] S303: If the session lifecycle type is a medium session, select the lower Y bits from the second hash value as a second storage address, and store the session information, the second hash value, and the second timestamp information corresponding to the storage of the session information into a second storage space corresponding to the second storage address in the HBM;

[0089] S304: If the session lifecycle type is a long session, select the lower Z bits from the second hash value as the third storage address, and store the session information, the second hash value, and the third timestamp information corresponding to the storage of the session information into the third storage space corresponding to the third storage address in the DDR.

[0090] Exemplarily, when a message to be processed is received for the first time, the time the message was received is recorded as the session creation time, and session information in the message to be processed is obtained. The session information includes five-tuple information, session type, creation time, message statistics, byte statistics, and source port. If the session lifecycle type is a short session, the lower X bits are selected from the second hash value as the first storage address, and the session information, the second hash value, and the first timestamp information corresponding to the storage of the session information are stored in the first storage space corresponding to the first storage address in the BRAM. When the same message to be processed is received for the second time, the session information in the message to be processed is obtained. Based on the same processing method described above, since the five-tuple information of the message to be processed is consistent, the first storage address of the BRAM is the same, and therefore the information previously stored in the first storage address is overwritten. That is, the session information, the second hash value, and the first timestamp information corresponding to the storage of the session information in the second received message are stored in the first storage space corresponding to the first storage address in the BRAM. The first timestamp information at this time is the time when the session information in the second received message was stored. Therefore, when a new message is received, the first timestamp information is refreshed. The processing methods for medium and long sessions described below are similar and will not be repeated here.

[0091] Exemplarily, X is 12. If the session lifecycle type is short, the first 12 bits of the second hash value are selected as the first storage address of the BRAM (i.e., the first storage address is the 12-bit second hash value). The session information, the second hash value, and the first timestamp corresponding to the storage of the session information are stored in the first storage space corresponding to the first storage address in the BRAM. The first timestamp is the storage time when the session information is written to the BRAM.

[0092] Exemplarily, Y is 16. If the session lifecycle type is a medium session, the first 16 bits of the second hash value are selected as the second storage address of the HBM. That is, the second storage address is the 16-bit second hash value. The session information, the second hash value, and the second timestamp corresponding to the storage of the session information are stored in the second storage space corresponding to the second storage address in the HBM. The second timestamp is the storage time when the session information is written to the HBM.

[0093] Exemplarily, the value of Z is 24. If the session lifecycle type is long, the first 24 bits of the second hash value are selected as the second storage address, that is, the third storage address is the 24-bit second hash value. The session information, the second hash value, and the third timestamp corresponding to the session information are stored in the third storage space corresponding to the third storage address in the DDR. The third timestamp is the storage time when the session information was written to the DDR.

[0094] This embodiment dynamically adjusts the hash value length based on the session period type. Compared to traditional fixed-length encoding (e.g., uniformly using 32 bits), this approach saves approximately 22% of storage space when storing the same amount of session data. This approach not only reduces storage costs but also reduces memory read and write overhead, further improving system performance. Furthermore, by reducing redundant memory accesses, memory bandwidth requirements are lowered, further reducing hardware costs.

[0095] One embodiment of the present application, such as Figure 4 As shown, the method further includes steps S401-S403.

[0096] S401, obtaining the session activity of each session information in the BRAM, determining whether the session information is in an inactive state based on the session activity, and migrating the inactive session information to the HBM;

[0097] S402: Acquire the session activity of each session information in the HBM, determine whether the session information is in an inactive state based on the session activity, and migrate the inactive session information to the DDR;

[0098] S403: Acquire the session activity of each session information in the DDR, determine whether the session information is in an inactive state based on the session activity, and perform an aging operation on the inactive session information.

[0099] In this embodiment, the session activity level is obtained for each session in BRAM, HBM, and DDR. Based on the activity level, the session information's location in different hash storage architectures is dynamically adjusted. For example, active sessions (such as recently accessed or frequently accessed sessions) are migrated to faster storage tiers (such as BRAM), while inactive sessions are migrated to slower storage tiers (such as HBM or DDR4). This balances session access speed and storage capacity. When the session activity level changes, the migration of the session information is automatically triggered, and dynamic adjustments are made based on the load of each level of the hash structure to ensure that session data is always stored in the most appropriate storage tier.

[0100] A specific embodiment of the present application, such as Figure 5 As shown, the session activity of each session information in the BRAM is obtained, whether the session information is in an inactive state is determined based on the session activity, and the inactive session information is migrated to the HBM, including steps S501-S504.

[0101] S501: For each first storage address in the BRAM, obtain each first timestamp information corresponding to the current polling period, and determine the session activity of the corresponding session information based on the difference between the first timestamp information and the current polling time point;

[0102] S502: If the session activity is not greater than M times the preset polling period, the session information, the second hash value, and the first timestamp information corresponding to the first storage address remain unchanged;

[0103] S503: If the session activity is greater than M times the preset polling period, obtain the second hash value corresponding to the first storage address, select the lower Y bits from the second hash value as the new second storage address, store the session information, the second hash value and the first timestamp information corresponding to the first storage address into the second storage space corresponding to the new second storage address in the HBM, and release the first storage address.

[0104] For each session information in the first storage address in the BRAM, the session activity of the session information is obtained. A polling period is pre-set. For example, the polling period can be set to 0.1ms or 0.2ms, etc., and the user can set it according to actual conditions. The system periodically polls the BRAM based on the polling period, that is, periodically reads the first timestamp information in each first storage address in the BRAM. Based on the above description, it can be seen that the first timestamp information is continuously refreshed. Therefore, the first timestamp information obtained through each polling is used to determine the session activity of the corresponding session information by the difference between the first timestamp information and the time point of the current polling, thereby determining whether the session information is in an active state.

[0105] Exemplarily, M takes a value of 2. If the session activity is no more than 2 times the preset polling period, the session information is determined to be active, and the session information, second hash value, and first timestamp information corresponding to the first storage address are still stored in the BRAM. If the session activity is greater than 2 times the preset polling period, the session information is determined to be inactive, and the corresponding session information is migrated to the HBM. That is, the second hash value corresponding to the first storage address is obtained, the lower Y bits are selected from the second hash value as the new second storage address, the session information, second hash value, and first timestamp information corresponding to the first storage address are stored in the second storage space corresponding to the new second storage address in the HBM, and the first storage address is released.

[0106] In this embodiment, when new session information is received, the first timestamp information in the BRAM is refreshed. This refresh of the first timestamp information can cause changes in the activity of the session information. By periodically polling the first timestamp information, the activity of each session information is determined. Session information with reduced activity is then migrated to the HBM, freeing up BRAM storage space. This ensures that the BRAM can store active sessions or frequently accessed session data, reducing the burden on the BRAM, ensuring the rational use of storage resources, and improving overall system performance. For example, for VR applications with frequent real-time interactions, these sessions are always stored in the fast-access BRAM to ensure a smooth user experience. When session data is migrated within the hash structure, the system simultaneously updates the corresponding storage address. For example, when a session is migrated from BRAM to HBM, the corresponding storage address in the BRAM is released, and a new storage address is created in the HBM. This avoids data redundancy or loss, and ensures the accuracy and stability of the system during the data migration process.

[0107] A specific embodiment of the present application, such as Figure 6 As shown, the session activity of each session information in the HBM is obtained, whether the session information is in an inactive state is determined based on the session activity, and the inactive session information is migrated to the DDR, including steps S601-S603.

[0108] S601: For each second storage address in the HBM, obtain each second timestamp information corresponding to the current polling period, and determine the session activity of the corresponding session information based on the difference between the second timestamp information and the current polling time point;

[0109] S602: If the session activity is not greater than N times the preset polling period, the session information, the second hash value, and the second timestamp information corresponding to the second storage address remain unchanged;

[0110] S603: If the session activity is greater than N times the preset polling period, obtain the second hash value corresponding to the second storage address, select the lower Z bits from the second hash value as the new third storage address, store the session information, second hash value and second timestamp information corresponding to the second storage address into the third storage space corresponding to the new third storage address in the DDR, and release the second storage address.

[0111] For each session information in the second storage address in the HBM, the session activity of the session information is obtained. A polling period is pre-set. For example, the polling period can be set to 0.1ms or 0.2ms, etc., and the user can set it according to actual conditions. The system regularly polls the HBM based on the polling period, that is, regularly reads the second timestamp information in each second storage address in the HBM. Based on the above description, it can be seen that the second timestamp information is continuously refreshed. Therefore, the second timestamp information obtained through each polling is used to determine the session activity of the corresponding session information by the difference between the second timestamp information and the time point of the current polling, so as to determine whether the session information is in an active state.

[0112] Exemplarily, N is 5. If the session activity is no more than 5 times the preset polling period, the session information is determined to be active, and the session information, second hash value, and second timestamp information corresponding to the second storage address remain stored in the HBM. If the session activity is greater than 5 times the preset polling period, the session information is determined to be inactive, and the corresponding session information is migrated to the DDR. Specifically, the second hash value corresponding to the second storage address is obtained, the lower Z bits of the second hash value are selected as the new third storage address, the session information, second hash value, and second timestamp information corresponding to the second storage address are stored in the third storage space corresponding to the new third storage address in the DDR, and the second storage address is released.

[0113] In this embodiment, when new session information is received, the HBM's second timestamp information is refreshed. This refresh can cause changes in the session activity. By periodically polling the second timestamp information, the activity level of each session is determined. Session information with reduced activity is then migrated to the DDR, freeing up HBM storage space. This ensures that the HBM can store inactive session data that may be accessed in the future. This reduces the burden on the HBM, ensures efficient use of storage resources, and improves overall system performance. The HBM supports fast access, ensuring that inactive but potentially useful session data can be quickly retrieved while maintaining a certain storage capacity. When session data is migrated within the hash structure, the system simultaneously updates the corresponding storage address, preventing data redundancy or loss and ensuring system accuracy and stability during data migration.

[0114] A specific embodiment of the present application, such as Figure 7 As shown, the session activity of each session information in the DDR is obtained, whether the session information is in an inactive state is determined based on the session activity, and the inactive session information is aged, including steps S701-S703.

[0115] S701: For each third storage address in the DDR, obtain each third timestamp information corresponding to the current polling cycle, and determine the session activity of the corresponding session information based on the difference between the third timestamp information and the current polling time point;

[0116] S702: If the session activity is not greater than P times the preset polling period, the session information, the second hash address, and the third timestamp information corresponding to the third storage address remain unchanged;

[0117] S703: If the session activity is greater than P times the preset polling period, the session information, the second hash value, and the third timestamp information corresponding to the third storage address are aged.

[0118] For each session information stored in the third storage address of the DDR, the session activity of the session information is obtained. A polling period is pre-set, for example, 0.1ms or 0.2ms, which can be set by the user according to actual circumstances. The system periodically polls the DDR based on this polling period, namely, periodically reading the third timestamp information stored in each third storage address of the DDR. As can be seen from the above description, the third timestamp information is continuously refreshed. Therefore, the session activity of the corresponding session information is determined by the difference between the third timestamp information and the time of the current poll, thereby determining whether the session information is active.

[0119] For example, P is 15. If the session activity is no greater than 15 times the preset polling period, the session information is determined to be active, and the session information, the second hash value, and the third timestamp information corresponding to the third storage address remain stored in the DDR. If the session activity is greater than 15 times the preset polling period, the session information is determined to be inactive, the corresponding session information is aged, and the third storage address is released.

[0120] In this embodiment, when new session information is received, the DDR's third timestamp information is refreshed. This refresh of the third timestamp information can cause changes in the session information's activity level. By periodically polling the third timestamp information, the session activity level of each session information is determined, and session information with reduced activity is aged. This ensures that the DDR can store long-term inactive or rarely accessed session data, reducing the burden on the DDR and improving overall system performance. When session data is migrated within the hash structure, the system simultaneously updates the corresponding storage address, avoiding data redundancy or loss and ensuring system accuracy and stability during data migration. For example, for the large number of small-data-volume, long-lifecycle sessions generated by IoT devices, dynamic hash value compression can further optimize storage, while utilizing a hierarchical hash architecture to rationally allocate storage locations, improving the system's ability to manage new application sessions.

[0121] In one embodiment of the present application, for each first storage address in the BRAM, the corresponding session survival time is determined by the difference between the corresponding creation time and the current polling time point. If the session survival time exceeds the first time threshold, when the next time a to-be-processed message identical to the corresponding five-tuple information is received, the lower Y bits are selected from the corresponding second hash value as the second storage address, and the session information, the second hash value, and the second timestamp information corresponding to the storage of the session information in the to-be-processed message are stored in the second storage space corresponding to the second storage address in the HBM.

[0122] In this embodiment, session information in the BRAM is periodically polled to determine its lifetime. If the lifetime exceeds a first time threshold, the session is deemed inactive. The next time a message with the same five-tuple is received, the session information is stored in the HBM. By dynamically adjusting the length of the hash value corresponding to the five-tuple in the message, inactive session information is stored in the HBM, further improving system performance.

[0123] In one embodiment of the present application, for each second storage address in the HBM, the corresponding session survival time is determined by the difference between the corresponding creation time and the current polling time point. If the session survival time exceeds the second time threshold, when the next to-be-processed message with the same five-tuple information is received, the lower Z bits are selected from the corresponding second hash value as the third storage address, and the session information, the second hash value and the third timestamp information corresponding to the storage of the session information in the to-be-processed message are stored in the third storage space corresponding to the third storage address in the DDR.

[0124] In this embodiment, session information in the HBM is periodically polled to determine its lifetime. If the lifetime exceeds a second time threshold, the session is deemed inactive. The next time a message with the same five-tuple is received, the session information is stored in the DDR. By dynamically adjusting the length of the hash value corresponding to the five-tuple in the message, inactive session information is stored in the DDR, further improving system performance.

[0125] In one embodiment of the present application, a corresponding session management message is generated based on session information corresponding to each storage address in the BRAM, a corresponding session management message is generated based on session information corresponding to each storage address in the HBM, and a corresponding session management message is generated based on session information corresponding to each storage address in the DDR. For example, the session management message may use the Netflow protocol.

[0126] Based on the same inventive concept, an embodiment of the present application further provides an FPGA-based hierarchical session management device. The implementation solution provided by this device is similar to the implementation solution described in the above-mentioned method. Therefore, the specific limitations in the embodiments of one or more FPGA-based hierarchical session management devices provided below can be found in the above-mentioned limitations on the FPGA-based hierarchical session management method, and will not be repeated here.

[0127] Please refer to Figure 8 , an embodiment of the present application provides a hierarchical session management device based on FPGA, the device also including:

[0128] The acquisition module 801 is used to obtain the five-tuple information in the message to be processed;

[0129] a Bloom filter 802 configured to determine multiple first hash values corresponding to the quintuple information, match the multiple first hash values against an access control list (ACL) rule based on the Bloom filter, determine a session lifecycle type of the to-be-processed message based on a protocol type in the quintuple information in response to the quintuple information matching the ACL rule, and use any one of the multiple first hash values as a second hash value;

[0130] A block random access memory (BRAM) 803 is configured to, if the session lifecycle type is a short session, select the lower X bits from the second hash value as a first storage address, and store the quintuple information and the second hash value in a first storage space corresponding to the first storage address in the BRAM;

[0131] The high bandwidth memory HBM804 is configured to select the lower Y bits from the second hash value as a second storage address if the session lifecycle type is a medium session, and store the quintuple information and the second hash value in a second storage space corresponding to the second storage address in the HBM;

[0132] The dual-rate synchronous dynamic random access memory DDR805 is used to select the lower Z bits from the second hash value as the third storage address if the session life cycle type is a long session, and store the quintuple information and the second hash value in the third storage space corresponding to the third storage address in the DDR, where Y is greater than X and less than Z.

[0133] As an example, see Figure 9, which shows a schematic diagram of the structure of a communication device provided in an embodiment of the present application. The network device includes an FPGA-based hierarchical session management device 901, a communication interface 902, a processor 903, a memory 904, and a bus 905. The processor 903, the memory 904, the communication interface 902, and the FPGA-based hierarchical session management device 901 are communicatively connected to each other via the bus 905. The memory 904 can be used to store computer programs, which may include instructions and data. In the embodiment of the present application, the memory 904 may be various types of storage media, such as random access memory, static random access memory, non-volatile RAM, DDR, etc. The memory 904 may include a hard disk and / or internal memory. The processor 903 may be a general-purpose processor, which can be a processor that performs specific steps and / or operations by reading and executing a computer program stored in a memory (e.g., memory 904). The general-purpose processor is used to process data output by the FPGA-based hierarchical session management device 901. The general-purpose processor may be, for example, but not limited to, a central processing unit. In addition, the processor 903 may also be a dedicated processor. A dedicated processor may be a processor specially designed to perform specific steps and / or operations. A dedicated processor may be, for example, but not limited to, an ASIC and an FPGA. In addition, the processor 903 may also be a combination of multiple processors, such as a multi-core processor. The communication interface 902 may include input / output interfaces, physical interfaces, and logical interfaces for interconnecting devices within the network device, as well as interfaces for interconnecting the network device with other devices (such as network devices). The physical interface may be a Gigabit Ethernet interface, which may be used to interconnect the network device with other devices. The logical interface is an interface within the network device, which may be used to interconnect devices within the network device. The bus 905 may be of any type, such as a system bus, for interconnecting the processor 903, the memory 904, the communication interface 902, and the FPGA-based layered session management device 901. The structure of the FPGA-based layered session management device 901 can refer to Figure 8 The interconnection between any one of the processor 903, memory 904, and communication interface 902 and the FPGA-based hierarchical session management apparatus 901 may specifically refer to the interconnection between any one of the processor 903, memory 904, and communication interface 902 and a device in the FPGA-based hierarchical session management apparatus 901.

[0134] The embodiments disclosed in the present application also provide a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is executed on a computer, the computer executes the FPGA-based hierarchical session management method described in any one of the above embodiments.

[0135] Although the preferred embodiments of the present application have been disclosed for illustrative purposes, those skilled in the art will appreciate that various modifications, additions and substitutions are possible, without departing from the scope and spirit of the application as disclosed in the accompanying claims.

Claims

1. A hierarchical session management method based on FPGA, characterized in that: The FPGA includes a block random access memory (BRAM), a high bandwidth memory (HBM), and a double-rate synchronous dynamic random access memory (DDR). The method includes: Obtain the five-tuple information of the session information in the message to be processed; Determine multiple first hash values corresponding to the quintuple information, and match the multiple first hash values with access control list (ACL) rules based on a Bloom filter; In response to the five-tuple information hitting the ACL rule, determining the session lifecycle type of the to-be-processed message based on the protocol type in the five-tuple information, and using any one of the multiple first hash values as the second hash value; If the session lifecycle type is a short session, select the lower X bits from the second hash value as a first storage address, and store the quintuple information and the second hash value in a first storage space corresponding to the first storage address in the BRAM; If the session lifecycle type is a medium session, select the lower Y bits from the second hash value as a second storage address, and store the quintuple information and the second hash value in a second storage space corresponding to the second storage address in the HBM; If the session lifecycle type is a long session, select the lower Z bits from the second hash value as a third storage address, and store the quintuple information and the second hash value in a third storage space corresponding to the third storage address in the DDR, where Y is greater than X and less than Z; in, Obtaining timestamp information corresponding to each session information stored in the current polling cycle, determining session activity of the corresponding session information based on the difference between the timestamp information and the time point of the current polling, and determining whether the session information is in an inactive state based on the session activity; Obtaining session activity of each session information in the BRAM, and migrating inactive session information to a second storage space corresponding to a new second storage address in the HBM; Obtaining session activity of each session information in the HBM, and migrating inactive session information to a third storage space corresponding to a new third storage address in the DDR; The session activity of each session information in the DDR is obtained, and the session information in an inactive state is aged.

2. The FPGA-based hierarchical session management method according to claim 1, wherein: Determining multiple first hash values corresponding to the quintuple information, and matching the multiple first hash values with access control list (ACL) rules based on a Bloom filter, including: Performing hash operations on the five-tuple information using k different hash functions to obtain k first hash values; Based on the k first hash values, querying, in a plurality of fourth storage spaces of the Bloom filter, a fourth storage space that matches each of the k first hash values, and obtaining a bitmap index value in each matching fourth storage space, wherein the Bloom filter is configured to: for each ACL rule, use k different hash functions to perform calculations to obtain k corresponding hash arrays, and configure the bitmap index value in the fourth storage space corresponding to the k hash arrays to be 1; If all bitmap index values are 1, it is determined that the quintuple information matches the ACL rule; otherwise, the quintuple information is discarded.

3. The FPGA-based hierarchical session management method according to claim 1, wherein: The method further comprises: Obtaining session information from the message to be processed, the session information including quintuple information, session type, creation time, message statistics, byte statistics, and source port, wherein the creation time is the time when the message to be processed is first received; If the session lifecycle type is a short session, select the lower X bits from the second hash value as a first storage address, and store the session information, the second hash value, and the first timestamp information corresponding to the storage of the session information into a first storage space corresponding to the first storage address in the BRAM; If the session lifecycle type is a medium session, select the lower Y bits from the second hash value as a second storage address, and store the session information, the second hash value, and the second timestamp information corresponding to the storage of the session information into a second storage space corresponding to the second storage address in the HBM; If the session lifecycle type is a long session, select the lower Z bits from the second hash value as the third storage address, and store the session information, the second hash value, and the third timestamp information corresponding to the storage of the session information into the third storage space corresponding to the third storage address in the DDR.

4. The FPGA-based hierarchical session management method according to claim 3, wherein: Obtaining session activity of each session information in the BRAM and migrating inactive session information to a second storage space corresponding to a new second storage address in the HBM, including: For each first storage address in the BRAM, obtain each first timestamp information corresponding to the current polling period, and determine the session activity of the corresponding session information based on the difference between the first timestamp information and the current polling time point; If the session activity is not greater than M times the preset polling period, the session information, the second hash value, and the first timestamp information corresponding to the first storage address remain unchanged; If the session activity is greater than M times the preset polling period, obtain the second hash value corresponding to the first storage address, select the lower Y bits from the second hash value as the new second storage address, store the session information, the second hash value and the first timestamp information corresponding to the first storage address into the second storage space corresponding to the new second storage address in the HBM, and release the first storage address.

5. The FPGA-based hierarchical session management method according to claim 3, wherein: Obtaining session activity of each session information in the HBM and migrating inactive session information to a third storage space corresponding to a new third storage address in the DDR, including: For each second storage address in the HBM, obtain each second timestamp information corresponding to the current polling period, and determine the session activity of the corresponding session information based on the difference between the second timestamp information and the current polling time point; If the session activity is not greater than N times the preset polling period, the session information, the second hash value, and the second timestamp information corresponding to the second storage address remain unchanged; If the session activity is greater than N times the preset polling period, obtain the second hash value corresponding to the second storage address, select the lower Z bits from the second hash value as the new third storage address, store the session information, second hash value and second timestamp information corresponding to the second storage address into the third storage space corresponding to the new third storage address in the DDR, and release the second storage address.

6. The FPGA-based hierarchical session management method according to claim 3, characterized in that: Obtaining the session activity of each session information in the DDR and aging the inactive session information includes: For each third storage address in the DDR, obtain each third timestamp information corresponding to the current polling cycle, and determine the session activity of the corresponding session information based on the difference between the third timestamp information and the current polling time point; If the session activity is not greater than P times the preset polling period, the session information, the second hash address, and the third timestamp information corresponding to the third storage address remain unchanged; If the session activity is greater than P times the preset polling period, the session information, the second hash value, and the third timestamp information corresponding to the third storage address are aged.

7. The FPGA-based hierarchical session management method according to claim 3, wherein: The method further comprises: For each first storage address in the BRAM, determine the corresponding session lifetime based on the difference between the corresponding creation time and the current polling time point; if the session lifetime exceeds the first time threshold, when a to-be-processed message identical to the corresponding quintuple information is received next time, select the lower Y bits from the corresponding second hash value as the second storage address, and store the session information, the second hash value, and the second timestamp information corresponding to the storage of the session information in the to-be-processed message into the second storage space corresponding to the second storage address in the HBM; For each second storage address in the HBM, the corresponding session survival time is determined by the difference between the corresponding creation time and the time point of the current polling. If the session survival time exceeds the second time threshold, when a to-be-processed message identical to the corresponding quintuple information is received next time, the lower Z bits are selected from the corresponding second hash value as the third storage address, and the session information, the second hash value, and the third timestamp information corresponding to the storage of the session information in the to-be-processed message are stored in the third storage space corresponding to the third storage address in the DDR.

8. A hierarchical session management method and device based on FPGA, characterized in that: The device comprises: An acquisition module is used to obtain the five-tuple information of the session information in the message to be processed; a Bloom filter, configured to determine a plurality of first hash values corresponding to the quintuple information, match the plurality of first hash values with an access control list (ACL) rule based on the Bloom filter, and in response to the quintuple information hitting the ACL rule, determine a session lifecycle type of the to-be-processed message based on a protocol type in the quintuple information, and use any one of the plurality of first hash values as a second hash value; a block random access memory (BRAM) configured to, if the session lifecycle type is a short session, select the lower X bits from the second hash value as a first storage address, and store the quintuple information and the second hash value in a first storage space corresponding to the first storage address in the BRAM; a high-bandwidth memory (HBM), configured to, if the session lifecycle type is a medium session, select lower Y bits from the second hash value as a second storage address, and store the quintuple information and the second hash value in a second storage space corresponding to the second storage address in the HBM; A dual-rate synchronous dynamic random access memory DDR is configured to select the lower Z bits from the second hash value as a third storage address if the session lifecycle type is a long session, and store the quintuple information and the second hash value in a third storage space corresponding to the third storage address in the DDR, where Y is greater than X and less than Z. in, The device further comprises: Obtaining timestamp information corresponding to each session information stored in the current polling cycle, determining session activity of the corresponding session information based on the difference between the timestamp information and the time point of the current polling, and determining whether the session information is in an inactive state based on the session activity; Obtaining session activity of each session information in the BRAM, and migrating inactive session information to a second storage space corresponding to a new second storage address in the HBM; Obtaining session activity of each session information in the HBM, and migrating inactive session information to a third storage space corresponding to a new third storage address in the DDR; The session activity of each session information in the DDR is obtained, and the session information in an inactive state is aged.

9. A communication device, characterized in that: It includes the FPGA-based hierarchical session management device as described in claim 8.

Citation Information

Patent Citations

  • Network session management method and device, equipment and storage medium

    CN114221847A

  • Message processing method and device based on FPGA (Field Programmable Gate Array) and accelerator card

    CN118264615A

  • Fast routing lookup method applied to satellite-borne router

    CN119363661A