Method and system for asynchronous distribution of multi-queue data packets based on atomic operations
By using a shared memory circular buffer and lock-free pointer management for atomic operations, the resource contention and memory consistency problems in traditional network packet processing systems are solved, enabling efficient asynchronous distribution of data packets from multiple clients and improving system performance and data processing efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SICHUAN JIUZHOU ELECTRONICS TECH
- Filing Date
- 2026-04-21
- Publication Date
- 2026-06-05
AI Technical Summary
Traditional network packet processing systems suffer from resource contention and high lock overhead, memory consistency issues, inefficient buffer management, and a lack of asynchronous dispatch capabilities.
By employing a shared memory circular buffer and atomic operations, and through lock-free head pointer management and independent tail pointer design, efficient asynchronous distribution of data packets from multiple clients is achieved.
It improves system throughput, reduces CPU resource consumption, and ensures memory consistency and data integrity, making it suitable for high-concurrency scenarios.
Smart Images

Figure CN122160351A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network packet processing technology, and more specifically to a method and system for asynchronous distribution of multi-queue packets based on atomic operations. Background Technology
[0002] In traditional network packet processing systems, queue mechanisms are often used for packet distribution in multi-threaded or distributed environments. However, traditional methods have the following problems:
[0003] 1. Resource contention and lock overhead: When multiple clients concurrently access a shared queue, traditional queues need to rely on mutexes or semaphores, resulting in high context switching overhead and reduced system throughput.
[0004] 2. Memory consistency issues: Pointer management that does not use atomic operations is prone to data races, leading to data packet loss or parsing errors.
[0005] 3. Inefficient buffer management: Fixed queues or non-circular buffers are prone to memory fragmentation and are difficult to support dynamic expansion.
[0006] 4. Lack of asynchronous dispatch capability: Traditional systems usually rely on polling or blocking reads, which are inefficient and cannot achieve true asynchronous processing.
[0007] In view of the above, this application is hereby submitted. Summary of the Invention
[0008] The technical problem this invention aims to solve is that existing methods suffer from resource contention and high lock overhead, memory consistency issues, inefficient buffer management, and a lack of asynchronous distribution capabilities. The purpose of this invention is to provide a method and system for asynchronous distribution of multi-queue data packets based on atomic operations. This method achieves efficient asynchronous distribution of data packets from multiple clients through a shared memory circular buffer and atomic operations, thereby resolving the aforementioned problems.
[0009] This invention is achieved through the following technical solution:
[0010] In a first aspect, the present invention provides a method for asynchronous distribution of multi-queue data packets based on atomic operations, the method comprising:
[0011] The server receives the original data packet and calculates the total length of the data packet; it reads the current header pointer in the circular buffer through atomic operations, and calculates the next write position based on the current header pointer and the total length of the data packet, and writes the data into the circular buffer; the server also updates the header pointer through atomic operations to record the current write position.
[0012] The circular buffer stores the raw data packets written by the server and the server's header pointer through a shared memory data storage area; the data storage area is a pre-allocated fixed-size memory region.
[0013] Each client reads the current header pointer, packet header, and raw data packet from the circular buffer and parses and processes them. Each client also has and maintains its own independent tail pointer to record its own consumption progress.
[0014] Furthermore, the server receives the original data packet and calculates the total length of the data packet, including:
[0015] The server receives raw data packets via hardware interrupts or network interfaces and concatenates the raw data packets into a contiguous memory region.
[0016] The original data packet is parsed and the total length of the data packet is calculated. A data packet header containing a dynamic total length field and a magic number check field is generated.
[0017] Furthermore, the current header pointer in the circular buffer is read through atomic operations, and the next write position is calculated based on the current header pointer and the total length of the data packet, and the data is written to the circular buffer, including:
[0018] Read the current head pointer from the circular buffer using atomic operations;
[0019] Calculate the next write position based on the current header pointer and the total length of the data packet;
[0020] Based on the next write position, write the current header pointer, packet header, and raw packet to the circular buffer;
[0021] The formula for calculating the next write position is: next_head = head + len, where next_head is the next write position, head is the current write position, and len is the total length of the data packet.
[0022] Furthermore, before writing the data to the circular buffer, the following steps are also included:
[0023] Based on the next write position, determine and handle any overflow in the circular buffer; the determination is as follows:
[0024] If the next write position is less than the buffer size (next_head < size, where size is the size of the circular buffer), it means that the circular buffer is not full, so the old original data packet is retained and execution continues;
[0025] Conversely, if the circular buffer is full, the head pointer is reset to 0, and the next write position (next_head = head + len) is recalculated.
[0026] Furthermore, each client reads the current header pointer, packet header, and raw data packet from the circular buffer and parses and processes them, including:
[0027] Each client starts a periodic check, determining whether to proceed with data parsing based on whether its own tail pointer is equal to the server's head pointer.
[0028] The client reads and parses data from the circular buffer based on its own tail pointer position, obtains the total length of the data packet and the magic number check field in the data packet header, and verifies the validity of the original data packet;
[0029] Calculate the next tail pointer position based on the total length of the data packet and the current tail pointer position;
[0030] Based on the position of the next tail pointer, the payload of the original data packet is read from the circular buffer, the processing logic of the original data packet is executed, and after the execution is completed, the next round of checks is initiated.
[0031] Furthermore, the determination of whether to proceed with data parsing is based on whether the server's head pointer and the client's tail pointer are equal, including:
[0032] If the two are equal, it means there is no new data in the circular buffer, the client enters a waiting state, and the next timed check is started; otherwise, it means there is new data in the circular buffer, and data parsing begins.
[0033] Furthermore, after calculating the position of the next tail pointer, it also includes:
[0034] Determine if the position of the next tail pointer exceeds the boundary of the circular buffer;
[0035] If the position of the next tail pointer exceeds the boundary of the circular buffer, then the position of the next tail pointer is reset to 0.
[0036] Secondly, this invention provides a multi-queue asynchronous data packet distribution system based on atomic operations, the system comprising:
[0037] The server receives raw data packets and calculates the total length of the data packets; it reads the current header pointer in the circular buffer through atomic operations, calculates the next write position based on the current header pointer and the total length of the data packets, and writes the data into the circular buffer; the server also updates the header pointer through atomic operations to record the current write position.
[0038] A circular buffer of shared memory is used to store the raw data packets written by the server and the server's header pointer through the shared memory data storage area; the data storage area is a pre-allocated fixed-size memory region.
[0039] The client is used to read the current header pointer, packet header and raw data packet from the circular buffer and parse and process them. Each client has and maintains its own independent tail pointer to record its own consumption progress.
[0040] Furthermore, the system also includes:
[0041] The atomic operation module is used to implement a lock-free head pointer update mechanism, including atomic load and atomic store operations;
[0042] The asynchronous dispatch module is used to implement asynchronous data processing on the client side through timers or event-driven mechanisms;
[0043] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0044] 1. The present invention provides a method and system for asynchronous distribution of multi-queue data packets based on atomic operations. It achieves efficient asynchronous distribution of multi-client data packets through a shared memory circular buffer and atomic operations, solving problems such as resource contention and large lock overhead, memory consistency issues, inefficient buffer management, and lack of asynchronous distribution capabilities in traditional data packet distribution.
[0045] 2. Atomic Lock-Free Pointer Management: This invention achieves lock-free updates of the head pointer through atomic loading and atomic storage operations, replacing traditional mutex locks and completely eliminating performance bottlenecks caused by lock contention. Specifically, the head pointer is atomically updated by the server, while the tail pointer array is independently maintained by each client, supporting thread-safe access in high-concurrency scenarios.
[0046] 3. Independent Tail Pointer Design for Multiple Clients: This invention provides each client with an independent tail pointer to record its consumption progress, avoiding resource contention when multiple clients share the same tail pointer. Furthermore, the client tail pointer works in conjunction with the global header pointer to support dynamic packet parsing and consumption.
[0047] 4. Asynchronous Dispatch Mechanism: This invention uses a timer-driven or event-driven approach to trigger the client to read data packets, avoiding busy waiting and reducing CPU resource consumption. When the head pointer and tail pointer are equal, the client automatically triggers a timer to wait for new data, instead of actively polling.
[0048] 5. Dynamic cyclic writing and memory reuse: The circular buffer of this invention supports dynamic cyclic writing. When the writing position exceeds the buffer boundary, it is automatically reset to 0, realizing efficient memory reuse. Attached Figure Description
[0049] The accompanying drawings, which are included to provide a further understanding of embodiments of the invention and form part of this application, do not constitute a limitation thereof. In the drawings:
[0050] Figure 1 This is a diagram illustrating the architecture of the multi-queue asynchronous data packet distribution system based on atomic operations according to the present invention.
[0051] Figure 2This is a flowchart of the asynchronous data packet distribution method based on atomic operations of the present invention.
[0052] Figure 3 This is a schematic diagram of the server-side execution logic in the multi-queue asynchronous data packet distribution method based on atomic operations of the present invention;
[0053] Figure 4 This is a schematic diagram illustrating the execution logic of client 1 in the multi-queue asynchronous data packet distribution method based on atomic operations of the present invention. Detailed implementation
[0054] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the embodiments and accompanying drawings. The illustrative embodiments and descriptions of the present invention are only used to explain the present invention and are not intended to limit the present invention.
[0055] This invention achieves efficient asynchronous distribution of data packets from multiple clients through a shared memory circular buffer and atomic operations, solving the performance bottleneck problem caused by resource contention in traditional methods. It employs an independent client tail pointer and an atomic server head pointer management mechanism to ensure thread safety and memory consistency in high-concurrency scenarios. A collaborative mechanism of dynamic circular writes and asynchronous updates of the client tail pointer avoids false sharing, significantly improving the performance of multi-core processors. This invention is applicable to high-performance network devices, distributed systems, and other similar scenarios.
[0056] Example 1
[0057] like Figure 1 As shown, Figure 1 This is an architecture diagram of the system of the present invention. The present invention provides a multi-queue asynchronous data packet distribution system based on atomic operations, the system comprising:
[0058] Server-side (producer): Responsible for receiving, concatenating, generating headers, and writing raw data packets. Specifically, it receives raw data packets via hardware interrupts, concatenates them into contiguous memory, and generates a data packet header containing a total packet length field and a magic number check field. It reads the current header pointer from the circular buffer using atomic operations, calculates the next write position based on the current header pointer and the total packet length, and writes the data to the circular buffer. The server also updates the header pointer using atomic operations to record the current write position.
[0059] Shared memory circular buffer: a core data structure containing two key parts:
[0060] An atomic head pointer: updated by the server through atomic operations, recording the current write position;
[0061] Data storage area: A pre-allocated, fixed-size circular memory area used to store data packets and their metadata;
[0062] Client (consumer): Used to read the server header pointer and raw data packets from the circular buffer and parse and process them. Each client has and maintains its own independent tail pointer to record its own consumption progress, thus achieving lock-free consumption.
[0063] Furthermore, the system also includes:
[0064] The atomic operation module is used to implement a lock-free head and tail pointer update mechanism, including atomic load and atomic store operations, to ensure data consistency in a multi-threaded environment.
[0065] The asynchronous dispatch module is used to enable asynchronous data processing on the client side through timers or event-driven mechanisms, avoiding busy waiting and improving system throughput.
[0066] The system of the present invention has the following advantages:
[0067] 1. Performance Improvement: Compared with the traditional data packet distribution mechanism based on mutex locks, the system of this invention significantly improves throughput (measured to over 90%) in high-concurrency data processing scenarios of data communication devices such as switches, routers, and optical modems. The performance optimization effect is even more prominent, especially under multi-core processor architecture.
[0068] 2. Thread safety: Through atomic operations and independent tail pointer design, it ensures that memory consistency and data integrity can still be maintained under high load environment of high-performance network equipment (such as enterprise-level switches, 5G CPE routers, gigabit optical modems), avoiding packet loss or parsing errors.
[0069] 3. Resource utilization: The asynchronous distribution mechanism effectively reduces CPU idle time and significantly reduces hardware resource overhead, making it particularly suitable for edge network devices (such as home gateways and industrial routers) with limited resources but high real-time requirements.
[0070] Example 2
[0071] like Figure 2 and Figure 3 As shown, the difference between this embodiment and Embodiment 1 is that, based on the multi-queue asynchronous data packet distribution system based on atomic operations in Embodiment 1, this invention also provides a system based on... Figure 1 An asynchronous packet distribution method based on atomic operations for an architecture, comprising:
[0072] Step 1: The server receives the original data packet and calculates the total length of the data packet; it reads the current header pointer in the circular buffer through atomic operations, and calculates the next write position based on the current header pointer and the total length of the data packet, and writes the data into the circular buffer; the server also updates the header pointer through atomic operations to record the current write position.
[0073] Step 2: The circular buffer stores the raw data packets written by the server and the header pointer of the server through a shared memory data storage area; the data storage area is a pre-allocated fixed-size memory region.
[0074] Step 3: Each client reads the current header pointer, data packet header and raw data packet from the circular buffer and parses and processes them. Each client also has and maintains its own independent tail pointer to record its own consumption progress.
[0075] Step 1 (including S1 to S6) mainly involves the server-side execution logic, such as... Figure 3 As shown; Step 2 mainly involves the execution logic of the circular buffer, and Step 3 (including S7 to S12) mainly involves the execution logic of each client, such as... Figure 4 As shown, Figure 1 The execution logic for client 1 is as follows; the execution logic for other clients is similar to that of client 1. The specific execution of this invention is as follows:
[0076] S1: The server receives the raw data packet.
[0077] The server receives raw data packets via hardware interrupts or network interfaces and concatenates them into a contiguous memory region in preparation for writing the raw data packets into a circular buffer.
[0078] S2: Calculate the total length of the data packet and generate the data packet header.
[0079] Parse the raw data packet and calculate the total length of the data packet (including the header and payload).
[0080] It generates a data packet header that includes a dynamic data packet total length field and a magic number check field. The data packet header contains key information such as the total data packet length and the magic number check code.
[0081] S3: Read the current head pointer in the circular buffer via atomic operations.
[0082] The server reads the atomic header pointer from the shared memory circular buffer through atomic operations (such as atomic_load); this ensures that the read header pointer is up-to-date and avoids memory consistency issues.
[0083] S4: Calculate the next write position
[0084] The current header pointer in the circular buffer is read through atomic operations, and the next write position is calculated based on the current header pointer and the total length of the data packet. The data is then written to the circular buffer. Specifically, this includes:
[0085] S41: Read the current head pointer in the circular buffer via atomic operations;
[0086] S42: Calculate the next write position based on the current header pointer and the total length of the data packet;
[0087] The formula for calculating the next write position is:
[0088] next_head = head + len;
[0089] Where next_head is the next write position, head is the current write position, and len is the total length of the data packet.
[0090] S43: Write the original data packet cyclically to the circular buffer according to the current write position.
[0091] S5: Detect and handle buffer overflow situations.
[0092] If the next write position is smaller than the buffer size (next_head < size, where size is the size of the circular buffer), it means that the circular buffer is not full, so the old original data packet is retained and execution continues;
[0093] Conversely, if the circular buffer is full, the head pointer is reset to 0, and the next write bit is recalculated as next_head = head + len.
[0094] S6: The server uses atomic operations to update the head pointer.
[0095] The server updates the header pointer to next_head using atomic operations (such as atomic_store) to ensure that the update is visible to all clients; atomic operations also guarantee the atomicity of write operations, avoid data races, and ensure memory consistency.
[0096] S7: Client-side periodic checks - asynchronous check mechanism
[0097] Each client sets a timer callback function getPktFromRingBuff to periodically check data packets;
[0098] Each client reads the server header pointer (atomic_load) through an atomic operation.
[0099] The above methods use asynchronous scheduled tasks to avoid busy waiting and improve system resource utilization.
[0100] S8: Determine whether to proceed with data parsing based on whether the client's own tail pointer is equal to the server's head pointer;
[0101] S8 specifically includes:
[0102] S81: If the server head pointer is equal to the client tail pointer, it means there is no new data in the circular buffer, the client enters a waiting state, and the next timed check is started;
[0103] Conversely, it indicates that there is new data in the circular buffer, and data parsing begins.
[0104] S9: The client parses the data packet header and verifies the validity of the data packet.
[0105] S9 specifically includes:
[0106] S91: Read the original data packet from the tail pointer position of the circular buffer, parse the original data packet, and obtain the total length of the data packet and the magic number check field in the data packet header;
[0107] S92: Verify that the magic number check field is correct and check that the data packet length meets expectations; if the data packet verification fails, the client re-enters the waiting state.
[0108] S10: Client-side handling of tail pointer boundaries
[0109] Calculate the next tail pointer position based on the total length of the data packet and the current tail pointer position;
[0110] The formula for calculating the position of the next tail pointer is:
[0111] next_tail = tail + len
[0112] Based on the position of the next tail pointer, determine whether next_tail exceeds the boundary of the circular buffer: if next_tail > size, reset the position of the next tail pointer to zero to avoid tail pointer out-of-bounds access.
[0113] S11: Client processes data packets
[0114] Based on the current tail pointer position, read the payload of the original data packet from the circular buffer and execute the processing logic of the original data packet (such as parsing, forwarding, and storage).
[0115] S12: The client updates the current tail pointer to the next tail pointer position next_tail to ensure that the data in the circular buffer can be read accurately next time. After execution, it enters the next round of exception checking.
[0116] The key points of the technical solution consisting of steps S1 to S12 above are explained as follows:
[0117] (1) Atomic operation mechanism:
[0118] In steps S3 and S6, the server reads and updates the header pointer through atomic operations; in steps S7 and S11, the client reads the server's header pointer through atomic operations. These atomic operations ensure the atomicity of pointer updates, avoiding data races and memory consistency issues.
[0119] (2) Asynchronous dispatch mechanism:
[0120] In step S7, the client avoids busy waiting through a timer-driven mechanism. An asynchronous triggering mechanism is used, triggering data packet reading based on whether the tail pointer and head pointer are equal, thus avoiding the inefficiencies of polling or blocking reads in traditional systems.
[0121] 3) Conflict and overflow handling:
[0122] In step S5, buffer overflow is handled (reset to 0 when next_head > size); in S10, tail pointer boundary issues are handled (reset to 0 when next_tail > size); through a collaborative mechanism of dynamic loop writing and asynchronous update of the client tail pointer, buffer overflow and invalid access are avoided.
[0123] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0124] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0125] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0126] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0127] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A multi-queue asynchronous data packet distribution method based on atomic operations, characterized in that, The method includes: The server receives the original data packet and calculates the total length of the data packet; it reads the current header pointer in the circular buffer through atomic operations, and calculates the next write position based on the current header pointer and the total length of the data packet, and writes the data into the circular buffer; the server also updates the header pointer through atomic operations to record the current write position. The circular buffer stores the raw data packets written by the server and the server's header pointer through a shared memory data storage area; the data storage area is a pre-allocated circular memory region of fixed size. Each client reads the current header pointer, data packet header, and the original data packet from the circular buffer and parses and processes them. Each client also has and maintains its own independent tail pointer to record its own consumption progress.
2. The asynchronous data packet distribution method based on atomic operations according to claim 1, characterized in that, The server receives the raw data packet and calculates the total length of the data packet, including: The server receives raw data packets via hardware interrupt or network interface and concatenates the raw data packets into a contiguous memory region. The original data packet is parsed and the total length of the data packet is calculated. A data packet header containing a dynamic total data packet length field and a magic number check field is generated.
3. The asynchronous data packet distribution method based on atomic operations according to claim 1, characterized in that, The process involves reading the current header pointer from the circular buffer using atomic operations, calculating the next write position based on the current header pointer and the total length of the data packet, and then writing the data into the circular buffer. Read the current head pointer from the circular buffer using atomic operations; Calculate the next write position based on the current header pointer and the total length of the data packet; Based on the next write position, write the current header pointer, packet header, and raw data packet into the circular buffer; The formula for calculating the next write position is: next_head = head + len, where next_head is the next write position, head is the current write position, and len is the total length of the data packet.
4. The asynchronous data packet distribution method based on atomic operations according to claim 1, characterized in that, Before writing the data to the circular buffer, the following steps are also included: Based on the next write position, determine and handle the overflow of the circular buffer; the determination is as follows: If the next write position is smaller than the buffer size, it means that the circular buffer is not full, so the old original data packet is retained and execution continues. Conversely, if the circular buffer is full, the head pointer is reset to 0, and the next write position next_head = head + len is recalculated.
5. The asynchronous data packet distribution method based on atomic operations according to claim 1, characterized in that, Each client reads the current header pointer, packet header, and raw data packet from the circular buffer and parses and processes them, including: Each client starts a periodic check, determining whether to proceed with data parsing based on whether the client's own tail pointer is equal to the server's head pointer; The client reads and parses data from the circular buffer based on its own tail pointer position, obtains the total length of the data packet and the magic number check field in the data packet header, and verifies the validity of the original data packet; Calculate the next tail pointer position based on the total length of the data packet and the current tail pointer position; Based on the position of the next tail pointer, the payload of the original data packet is read from the circular buffer, the processing logic of the original data packet is executed, and after the execution is completed, the next round of checks is initiated.
6. The asynchronous data packet distribution method based on atomic operations according to claim 5, characterized in that, The decision to proceed to data parsing is based on whether the client's own tail pointer is equal to the server's head pointer, including: If the client's own tail pointer is equal to the server's head pointer, it means there is no new data in the circular buffer, and the client enters a waiting state to start the next timed check; otherwise, it means there is new data in the circular buffer, and data parsing begins.
7. The asynchronous data packet distribution method based on atomic operations according to claim 5, characterized in that, After calculating the position of the next tail pointer, the following is also included: Determine whether the position of the next tail pointer exceeds the boundary of the circular buffer; If the position of the next tail pointer exceeds the boundary of the circular buffer, then the position of the next tail pointer is reset to 0.
8. The asynchronous data packet distribution method based on atomic operations according to claim 1, characterized in that, The method also includes: Align the array of tail pointers formed by the server's head pointer and each client's tail pointer to different cache lines in the circular buffer.
9. A multi-queue asynchronous data packet distribution system based on atomic operations, characterized in that, The system includes: The server receives raw data packets and calculates the total length of the data packets; it reads the current header pointer in the circular buffer through atomic operations, calculates the next write position based on the current header pointer and the total length of the data packets, and writes the data into the circular buffer; the server also updates the header pointer through atomic operations to record the current write position. A circular buffer of shared memory is used to store the raw data packets written by the server and the header pointer of the server through the data storage area of shared memory; the data storage area is a pre-allocated circular memory region of fixed size. The client is used to read the current header pointer, data packet header and the original data packet from the circular buffer and parse and process them. Each client has and maintains its own independent tail pointer to record its own consumption progress.
10. The multi-queue asynchronous data packet distribution system based on atomic operations according to claim 9, characterized in that, The system also includes: The atomic operation module is used to implement a lock-free head and tail pointer update mechanism, including atomic load and atomic store operations; The asynchronous dispatch module is used to implement asynchronous data processing on the client side through timers or event-driven mechanisms; The cache line alignment module is used to align the head pointer and the tail pointer array formed by each client's tail pointer to different cache lines in the circular buffer.