Distributed query method, apparatus, system and storage medium

By integrating multiple modules onto a programmable network interface card (NIC), data can be processed directly at the NIC level, solving the performance bottlenecks and reliability issues of traditional NICs and distributed query systems. This enables efficient and flexible data processing and management, making it suitable for various application scenarios.

CN120910129BActive Publication Date: 2026-01-27BEIJING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511431756.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-09
Publication Date
2026-01-27
Estimated Expiration
2045-10-09

AI Technical Summary

Technical Problem

Traditional network interface cards (NICs) face performance bottlenecks when handling high-throughput, low-latency network traffic. Existing programmable NICs have insufficient embedded CPU core performance, low packet processing efficiency, and distributed query systems suffer from performance bottlenecks, network latency and bandwidth limitations, poor security and reliability, and insufficient scalability and flexibility.

Method used

By introducing a network card hardware acceleration module, a KV Store integration module, a query optimization module, a configurable matching table module, a traffic aggregation module, and a sending module onto the programmable network card, data filtering, aggregation, and sorting operations can be performed directly at the network card level through hash collision handling, remote memory access, rate control, and multicast transmission, thereby reducing CPU and network overhead.

Benefits of technology

It improves the performance and efficiency of distributed systems, provides more reliable and flexible data processing and management services, and is suitable for distributed storage systems, high-performance computing clusters and real-time data processing, overcoming the limitations of traditional technologies in terms of performance, flexibility and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120910129B_ABST
    Figure CN120910129B_ABST
Patent Text Reader

Abstract

The application discloses a distributed query method, device, system and storage medium, comprising: obtaining a query operation request of a user; obtaining key-value pair data according to the query operation request of the user, and outputting a correct multicast sent data packet after processing; obtaining a batch processed data stream operation request according to the key-value pair data; performing remote memory access processing on the batch processed data stream operation request to obtain a correct multicast sent data packet; processing the correct multicast sent data packet to obtain a rate limited data packet; sending the rate limited data packet to a remote memory; and tracking a transmission state of the data packet. The application optimizes data transmission and query processing between nodes in a distributed architecture.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of network interface card (NIC) technology, and particularly relates to a distributed query method, device, system, and storage medium. Background Technology

[0002] Traditional network interface cards (NICs) are primarily used for receiving and sending data packets. Their functions are fixed in hardware, lacking flexibility. For example, traditional NICs typically support the basic functions of the Ethernet protocol and TCP / IP protocol stack, but cannot be customized to meet specific needs. With the rapid growth of network bandwidth (from 10Gbps to 100Gbps or even higher), traditional NICs face performance bottlenecks when handling high-throughput, low-latency network traffic. Especially in data center and cloud computing environments, the hardware architecture of traditional NICs struggles to meet the diverse application requirements. Although modern NICs support hardware offloading of some protocol stack functions (such as TCP segmentation, checksum calculation, encryption, etc.), their offloading capabilities are limited, and they cannot handle complex network functions (such as deep packet inspection, dynamic load balancing, custom protocol processing, etc.).

[0003] Programmable network interface cards (NICs) introduce programmable hardware (such as FPGAs and ASICs) and software-defined networking (SDN) technology, allowing users to customize packet processing logic according to specific needs. For example, users can implement custom protocols, advanced traffic scheduling, and multi-tenant isolation using programmable NICs. Through hardware acceleration technology, complex network functions (such as encryption, compression, and neural network inference) are offloaded to hardware, significantly improving performance and reducing CPU load. In cloud computing and data center environments, programmable NICs can provide isolated network resources for different tenants and dynamically allocate bandwidth, priority, and traffic scheduling strategies according to demand. However, existing programmable NICs suffer from insufficient embedded CPU core performance, low packet processing efficiency, and arbitrary task partitioning.

[0004] In traditional distributed query systems, query request processing typically relies on general-purpose processors (CPUs). This leads to performance bottlenecks when handling large-scale data, as the CPU must handle significant data transfer and query logic, resulting in long query response times and low system throughput. Furthermore, data transfer heavily depends on the network, and network latency and bandwidth limitations severely impact query performance. The utilization of CPU and network resources is often low, with network bandwidth frequently underutilized due to inefficient data transfer. Existing distributed query systems also suffer from poor scalability and flexibility. Expansion requires continuous hardware resource allocation, and the system necessitates complex modifications and redeployments to accommodate new query patterns or data types. Finally, current distributed query systems exhibit security and reliability issues during data transfer and storage, making data vulnerable to theft or tampering. Additionally, the system's resilience to network attacks and hardware failures is weak. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to provide a distributed query method, apparatus, system and storage medium to optimize data transmission and query processing between nodes in a distributed architecture; to enable data filtering, aggregation and sorting operations to be performed directly at the network interface card level, reducing CPU and network overhead; and to enable network traffic to be preprocessed before data arrives at the host, reducing data transmission volume and latency.

[0006] To achieve the above objectives, the present invention adopts the following technical solution:

[0007] A distributed query method, comprising:

[0008] Step S1: Obtain the user's query operation request;

[0009] Step S2: Obtain key-value pair data based on the user's query operation request; at the same time, handle hash collisions of erroneous multicast data packets and output the correct multicast data packets after processing.

[0010] Step S3: Based on the key-value pair data, obtain the batch-processed data stream operation request;

[0011] Step S4: Perform remote memory access processing on the batch-processed data stream operation requests to obtain the correct multicast data packets;

[0012] Step S5: Obtain the rate-limited data packets based on the correctly sent multicast data packets;

[0013] Step S6: Send the rate-limited data packets to remote memory;

[0014] Step S2 includes:

[0015] It receives user query requests as input, parses and executes read, write or delete operations, and outputs the operation results or key-value pairs that need to be stored.

[0016] Receives problematic data packets from multicast packets, calculates their storage location using a hash table and handles hash collisions, and outputs the correct multicast packets after processing.

[0017] Step S4 includes:

[0018] Based on the predetermined routing information, the batch-processed data stream operation requests are forwarded to the next network node, and the forwarded data packets are output.

[0019] The forwarded data packets are copied and sent to multiple target nodes, and the multicast data packets are output. In this process, erroneous data packets are handled by hash collision processing.

[0020] The present invention also provides a distributed query device, comprising: a network card hardware acceleration module integrated on a programmable network card, a KV Store integration module, a query optimization module, a configurable matching table module, a traffic aggregation module, a sending module, and a tracking module; wherein,

[0021] The network card hardware acceleration module is used to obtain user query operation requests;

[0022] The KV Store integration module is used to obtain key-value pair data based on user query requests; it also handles hash collisions in erroneous multicast packets and outputs the corrected multicast packets.

[0023] The query optimization module is used to obtain batch-processed data stream operation requests based on key-value pair data;

[0024] The configurable matching table module is used to perform remote memory access processing on batch-processed data stream operation requests to obtain the correct multicast data packets;

[0025] The traffic aggregation module is used to process correctly sent multicast data packets and obtain the data packets after rate limiting.

[0026] The sending module is used to send rate-limited data packets to remote memory.

[0027] The tracking module is used to track the transmission status of data packets.

[0028] Preferably, the KV Store module includes a RISC-V Processor component and a Hash Into Memory component. The RISC-V Processor component is used to receive user query operation requests as input, parse and execute read, write or delete operations, and output the operation results or the key-value pair data that needs to be stored. The Hash Into Memory component is used to receive data packets with problems in multicast packets, calculate the storage location through a hash table and handle hash collisions, and output the correct multicast packets after processing.

[0029] Preferably, the data query optimization module includes a Rate Limiter component and a Batching component. The Rate Limiter component is used to rate limit and transform key-value pair data, and output multiple data streams after rate adjustment. The Batching component is used to merge multiple data stream operation requests into batch processing, and output batch-processed data stream operation requests.

[0030] Preferably, the configurable matching table module includes a Forwarder and a Multicaster. The Forwarder forwards batch-processed data stream operation requests to the next network node according to predetermined routing information and outputs the forwarded data packets. The Multicaster copies the forwarded data packets and sends them to multiple target nodes, outputting the multicast data packets. Correct data packets are sent to the traffic aggregation module, and incorrect data packets are sent to the KV Store module.

[0031] Preferably, the traffic aggregation module includes: Traffic Manager, Aggregator, and RDMA Limiter; wherein, Traffic Manager is used to process correctly sent multicast packets according to priority and output scheduled packets; Aggregator is used to aggregate scheduled packets; RDMA Limiter is used to control the rate of remote direct memory access operations on the aggregated packets and output packets with limited rate.

[0032] Preferably, the sending module includes a RoCEv2 Crafter component and an RDMA Emitter component; wherein, the RoCEv2 Crafter component is used to encapsulate the rate-limited data packets into a format conforming to the RoCEv2 protocol and output the encapsulated RoCEv2 data packets; the RDMA Emitter component is used to send the RoCEv2 data packets directly to remote memory and output the successfully sent data packets.

[0033] The present invention also provides a distributed query system, comprising: a memory and a processor, wherein the memory stores a computer program executed by the processor, and the computer program executes a distributed query method when run by the processor.

[0034] The present invention also provides a storage medium storing a computer program, which executes the distributed query method during runtime.

[0035] The present invention has the following technical effects:

[0036] 1. Programmable network interface cards (NICs) employ configurable matching table modules. Through optimizations in low latency, high throughput, load balancing, resource reuse, reliability assurance, strong scalability, programmability, and modular design, they effectively improve system performance and efficiency, providing robust technical support and solutions for modern distributed systems. This technology is suitable for various application scenarios such as distributed storage systems, high-performance computing clusters, and real-time data processing. It effectively addresses the limitations of traditional RMT technology in terms of performance, flexibility, and scalability, providing users with more efficient, reliable, and flexible data transmission and processing services.

[0037] 2. Introducing a Hash Into Memory component into a programmable network interface card (NIC) to handle hash collisions offers significant benefits, including efficient handling of complex hash collisions, low latency and high throughput, high resource utilization, strong reliability and security, and ease of development and maintenance. This design not only improves system performance and efficiency but also provides users with more reliable, secure, and flexible data processing and management services. It is suitable for various application scenarios such as distributed storage systems, high-performance computing clusters, and real-time data processing, effectively addressing the limitations of traditional hash collision handling technologies in terms of performance, flexibility, and reliability, and providing robust technical support and solutions for modern distributed systems.

[0038] 3. A programmable network interface card (NIC) is introduced into the distributed storage architecture. This architecture significantly improves the system's performance, flexibility, resource utilization efficiency, and reliability through its advantages in high-performance hardware acceleration, flexible programmability, efficient resource utilization, reliability and security, ease of development and maintenance, and wide applicability. This design not only meets the high-performance and low-latency requirements of modern distributed systems but also provides users with more reliable, secure, and flexible data processing and management services.

[0039] 4. A full-link architecture optimization scheme for traffic aggregation technology was designed. This optimization scheme not only improves system performance and efficiency but also provides users with more reliable, secure, and flexible data processing and management services. It is applicable to various application scenarios such as distributed storage systems, high-performance computing clusters, and real-time data processing, effectively addressing the limitations of traditional technologies in terms of performance, flexibility, and reliability, and providing strong technical support and solutions for modern distributed systems. Attached Figure Description

[0040] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0041] Figure 1 A flowchart of the distributed query method;

[0042] Figure 2 This is a schematic diagram of the distributed query device structure;

[0043] Figure 3 This is a schematic diagram of data processing for a distributed query device.

[0044] Figure 4 This is a schematic diagram of the data packets for a distributed query device;

[0045] Figure 5 This is a schematic diagram of the relevant functions for hash tables on RISCV. Detailed Implementation

[0046] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0047] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0048] Example 1:

[0049] like Figure 1 As shown, this embodiment of the invention provides a distributed query method, including:

[0050] Step S1: Obtain the user's query operation request;

[0051] Step S2: Obtain key-value pair data based on the user's query operation request; at the same time, handle hash collisions of erroneous multicast data packets and output the correct multicast data packets after processing.

[0052] Step S3: Based on the key-value pair data, obtain the batch-processed data stream operation request;

[0053] Step S4: Perform remote memory access processing on the batch-processed data stream operation requests to obtain the correct multicast data packets;

[0054] Step S5: Obtain the rate-limited data packets based on the correctly sent multicast data packets;

[0055] Step S6: Send the rate-limited data packets to remote memory;

[0056] Step S7: Track the transmission status of data packets;

[0057] Step S2 includes:

[0058] It receives user query requests as input, parses and executes read, write or delete operations, and outputs the operation results or key-value pairs that need to be stored.

[0059] Receives problematic data packets from multicast packets, calculates their storage location using a hash table and handles hash collisions, and outputs the correct multicast packets after processing.

[0060] Step S4 includes:

[0061] Based on the predetermined routing information, the batch-processed data stream operation requests are forwarded to the next network node, and the forwarded data packets are output.

[0062] The forwarded data packets are copied and sent to multiple target nodes, and the multicast data packets are output. In this process, erroneous data packets are handled by hash collision processing.

[0063] Example 2:

[0064] like Figure 2 As shown, this embodiment of the invention provides a distributed query device, including: a network card hardware acceleration module integrated on a programmable network card, a KV Store integration module, a query optimization module, a configurable matching table module, a traffic aggregation module, a sending module, and a tracking module; wherein,

[0065] The network card hardware acceleration module is used to obtain user query operation requests;

[0066] The KV Store integration module is used to obtain key-value pair data based on user query requests; it also handles hash collisions in erroneous multicast packets and outputs the corrected multicast packets.

[0067] The query optimization module is used to obtain batch-processed data stream operation requests based on key-value pair data;

[0068] The configurable matching table module is used to perform remote memory access processing on batch-processed data stream operation requests to obtain the correct multicast data packets;

[0069] The traffic aggregation module is used to process correctly sent multicast data packets and obtain the data packets after rate limiting.

[0070] The sending module is used to send rate-limited data packets to remote memory.

[0071] The tracking module is used to track the transmission status of data packets.

[0072] As one embodiment of the present invention, the network card hardware acceleration module includes: a RIAT component, used to convert user query operation requests into executable instructions.

[0073] As one embodiment of the present invention, the KV Store module includes: a RISC-V Processor component and a Hash Into Memory component; the RISC-V Processor module is used to receive user query operation requests as input, parse and execute read, write or delete operations, and output the operation results or key-value pair data that needs to be stored; the Hash Into Memory module is used to receive data packets with problems in multicast data packets, calculate the storage location through a hash table and handle hash collisions, and output the correct multicast data packets after processing.

[0074] As one embodiment of the present invention, the data query optimization module includes: a Rate Limiter component and a Batching component; wherein, the Rate Limiter component is used to rate limit and transform the output key-value pair data into ordered data packets and aggregate them into multiple data streams, and output the data stream after rate adjustment; the Batching component is used to merge multiple data streams for batch processing and output the data stream operation requests required for batch processing.

[0075] As one embodiment of the present invention, the configurable matching table module includes: a Forwarder receiver and a Multicaster; wherein, the Forwarder is used to forward batch-processed data stream operation requests to the next network node according to predetermined routing information, and output forwarded data packets according to the data stream operation requests; the Multicaster is used to copy the forwarded data packets and send them to multiple target nodes, and output multicast data packets, wherein correct data packets are sent to the traffic aggregation module, and incorrect data packets are sent to the KV Store module.

[0076] As one embodiment of the present invention, the traffic aggregation module includes: a Traffic Manager, an Aggregator, and an RDMA Limiter; wherein, the Traffic Manager is used to manage correctly transmitted multicast data packets and output scheduled data packets; the Aggregator is used to aggregate the scheduled data packets; and the RDMA Limiter is used to control the rate of remote direct memory access operations on the aggregated data packets and output data packets with limited rate.

[0077] In one embodiment of the present invention, the sending module includes a RoCEv2 Crafter component and an RDMA Emitter component; wherein, the RoCEv2 Crafter component is used to encapsulate the rate-limited data packets into a format conforming to the RoCEv2 protocol and output the encapsulated RoCEv2 data packets; the RDMA Emitter component is used to directly send the rate-limited data packets to remote memory and output the successfully sent data packets.

[0078] As one embodiment of the present invention, the tracking module includes: a PSN Tracker component, used to track the transmission status of data packets, record their sequence numbers, and output tracking information containing sequence numbers and transmission status.

[0079] like Figure 3 As shown, further details have been added. Figure 1The internal processes of different modules illustrate the specific data packet flow and processing details. The execution flow of the distributed query architecture of this invention is roughly as follows: User-initiated query operation requests, including reading key-value pairs, writing key-value pairs, checking data, and deleting key-value pairs, are connected to the network interface card (NIC) via a switch and enter the subsequent processing flow. These requests are uniformly classified as "User Traffic" and access the system through the switch. User requests first reach the RIAT (Reconfigurable Instruction Address Translation) component, which is part of the NIC hardware acceleration module. It is responsible for converting the request into executable instructions and performing address translation to ensure that the request can be correctly parsed and processed. Next, the RISC-V Processor component, as part of the KV Store integration module, uses a RISC-V architecture processor to execute the instructions translated by RIAT, performing preliminary data processing and logical operations. The Rate Limiter, belonging to the query optimization module, controls the speed of request processing to prevent overload and congestion, ensuring system stability and responsiveness. The main task of this stage is to convert user requests into executable instructions and perform preliminary processing and rate control, preparing for subsequent batch processing and forwarding. The requests, after initial processing, then enter the Batching component, part of the query optimization module, for batch processing, reducing the processing overhead of individual requests and improving overall processing efficiency. The Forwarder and Multicaster, as part of the configurable matching table module, forward processed requests or packets to the next processing node or replicate and send them to multiple target nodes, supporting distributed processing and load balancing. This stage achieves efficient data transmission and processing through batch processing, negative acknowledgment mechanisms, and multicast technology. The Hash Into Memory component, as part of the KV Store integration module, hashes data into memory, enabling fast data lookup and access, and improving data processing speed. The Traffic Manager, part of the traffic aggregation module, manages and schedules network traffic, ensuring orderly transmission and processing of packets and avoiding network congestion and resource contention. This stage ensures fast data access and reliable transmission through memory hashing, traffic management, and checksum calculation. The Aggregator, also part of the traffic aggregation module, merges and processes multiple packets or requests, reducing network transmission frequency and overhead, and improving transmission efficiency. The RDMA Limiter, a remote direct memory access (RDMA) rate limiter, is part of a traffic aggregation module. It controls the rate of RDMA operations to avoid network congestion and resource contention, ensuring system stability and performance.The RoCEv2 Crafter component constructs data packets conforming to the RoCEv2 protocol. The RDMA Emitter component sends the constructed data packets to the target node using RDMA technology. The Egress output sends the processed data packets to an external network or storage device. The PSN Tracker, a part of the tracking module, records and manages the sequence numbers of data packets, supporting reliable transmission and retransmission mechanisms. This stage, through the RoCEv2 protocol, RDMA technology, and packet sequence number tracking, achieves efficient and reliable data transmission and delivery, completing the entire processing flow.

[0080] Combination Figure 2 and Figure 3 The query optimization module optimizes distributed queries through the Rate Limiter and Batching modules, improving query execution efficiency. By dynamically adjusting execution strategies, flow control, and scheduling strategies, as well as merging and processing multiple data packets or requests, the module significantly improves query efficiency and reduces query latency. The network card hardware acceleration module, through the RIAT module, converts user requests into executable instructions and performs address translation, ensuring that requests are correctly parsed and processed, thereby improving the efficiency and accuracy of request processing. The configurable matching table module, through the Forwarder and Multicaster, implements remote memory access, supporting distributed processing and load balancing; the sending module, through the RoCEv2 Crafter and RDMA Emitter components, achieves efficient data transmission; and the tracking module, through the PSN tracker, ensures reliable data transmission. These three modules work together to ensure data transmission reliability and system stability. The KV Store (key-value store) integration module, through the RISC-V Processor and Hash IntoMemory components, enables rapid data processing and logical operations, as well as fast data lookup and access, improving data processing speed and system performance. The traffic aggregation module preprocesses, aggregates, and manages network traffic through Traffic Manager, Aggregator, and RDMA Limiter, reducing data transmission volume and network bandwidth consumption, and improving transmission efficiency and system performance. By dynamically adjusting execution strategies, traffic control, and scheduling strategies, as well as merging and processing multiple packets or requests, it significantly improves query efficiency and reduces query latency.

[0081] like Figure 4The diagram illustrates the structure of a data packet, which consists of multiple fields, each with a specific bit width and function. These fields include: an opcode specifying the operation type (e.g., read, write, delete, or conditional); a key identifying the data item; a value for storing or transmitting the data; a result indicating the existence of the data; a status indicating success; a memory address specifying the data storage location; and a checksum verifying data integrity. The diagram also includes request and response formats, with the request portion containing the opcode, key, and value, and the response portion containing the result, status, memory address, and checksum. This structure is typically used to ensure the accuracy and reliability of data during network transmission or storage operations.

[0082] like Figure 5 The diagram illustrates a series of operation functions for a HashTable object on RISC-V, each responsible for a specific task: `handleMergeMessage` handles merge messages involving merging multiple hash tables; `insertHashTable` inserts new data into the hash table; `searchHashTable` searches for specific data within the hash table; `deleteHashTable` removes data from the hash table; `freeHashTable` releases the resources occupied by the hash table; `processData` performs some form of processing or transformation on data from the hash table and other sources; and `resizeHashTable` resizes the hash table to optimize performance or adapt to changes in data volume. These functions collectively form the core of hash table operations, ensuring efficient data management and manipulation.

[0083] This invention enables data processing and computation directly on the network interface card (NIC), significantly reducing latency and overhead in data transmission to the host CPU. For example, packet parsing, hash calculation, and aggregation operations can be completed directly on the NIC, significantly improving processing speed. The Batching module processes multiple requests in batches, reducing the processing overhead of individual requests and improving overall throughput and efficiency. Simultaneously, support for Remote Direct Memory Access (RDMA) further reduces network transmission latency, achieving efficient data transmission. The programmable NIC allows users to customize and configure data processing flows according to specific needs, flexibly responding to different application scenarios and business requirements. For example, instruction address translation can be performed through the RIAT module. The entire architecture adopts a modular design, with each module working and optimizing independently, facilitating functional expansion and upgrades. For example, new processing modules can be added or existing modules optimized as needed to adapt to changing demands and technological advancements. Distributed processing and load balancing are achieved through the Multicaster and Traffic Manager, avoiding single-point bottlenecks and resource waste. Meanwhile, the Rate Limiter controls the request processing speed, preventing overload and congestion, ensuring system stability and responsiveness. Programmable network interface cards (NICs) can implement multiple functions and applications on a single hardware platform, reducing the number and cost of hardware devices. For example, a single NIC can simultaneously support multiple functions such as data processing, storage management, and network communication, improving resource utilization. Through technologies such as PSN Tracker packet sequence number tracking, the integrity and correctness of data transmission are ensured, improving system reliability and stability. Simultaneously, retransmission and error recovery mechanisms are supported, enhancing the system's fault tolerance. Finally, this architecture supports distributed deployment and horizontal scaling, allowing for dynamic adjustment of the number of nodes and processing capacity as needed. For example, by adding more programmable NICs and processing nodes, linear scaling and performance improvements can be achieved, meeting the requirements of large-scale distributed systems.

[0084] Distributed query systems based on programmable network interface cards (NICs) can effectively address several shortcomings of existing distributed query technologies by offloading some query processing tasks to the NIC hardware level.

[0085] 1. CPU bottleneck issue

[0086] In traditional distributed query systems, query processing tasks are primarily handled by the CPU. However, with increasing network bandwidth and data volume, the CPU becomes a performance bottleneck, especially in high-concurrency query scenarios where its computing power and memory bandwidth cannot meet the demands. Programmable network interface cards (NICs) utilize hardware acceleration technology to offload some query processing tasks (such as data filtering, aggregation, and sorting) to the NIC, reducing the CPU load and thus alleviating the CPU bottleneck problem and improving query processing efficiency.

[0087] 2. Network transmission overhead

[0088] In distributed queries, data needs to be frequently transmitted between nodes, resulting in high network bandwidth consumption and increased query latency. Programmable network interface cards (NICs) can preprocess data (such as filtering or compressing it) before it reaches the host, reducing the amount of data that needs to be transmitted, thereby reducing network bandwidth consumption and transmission latency, and improving overall query performance.

[0089] 3. Query delay

[0090] In traditional distributed query systems, query tasks require navigating through multiple software stacks (such as the operating system kernel and network protocol stack), resulting in high processing latency. Programmable network interface cards (NICs), through hardware acceleration and kernel-bypassing mechanisms, process query tasks directly at the NIC level, reducing software stack overhead and significantly lowering query latency, especially in low-latency query scenarios.

[0091] 4. Multi-tenant resource isolation

[0092] In a multi-tenant environment, query tasks from different tenants may interfere with each other, leading to unfair resource allocation or performance degradation. Programmable network interface cards (NICs) ensure that each tenant's query task can run independently through hardware-level resource isolation mechanisms, avoiding resource contention issues, while also guaranteeing the fairness of resource allocation through fair scheduling algorithms.

[0093] 5. Flexibility and scalability

[0094] Traditional distributed query systems typically rely on fixed hardware and software designs, making it difficult to flexibly adapt to different query needs or expand with new functionalities. Programmable network interface cards (NICs) support the implementation of custom query processing logic through programming, enabling flexible adaptation to different query requirements. Furthermore, their modular design supports functional expansion, improving the system's flexibility and scalability.

[0095] 6. Energy efficiency

[0096] In traditional distributed query systems, the high power consumption of CPU and network devices leads to low energy efficiency, especially in large-scale data centers where energy costs become a significant issue. Programmable network interface cards (NICs) reduce the load on the CPU and network through hardware acceleration and efficient resource utilization, thereby lowering the overall system power consumption and improving energy efficiency.

[0097] 7. Optimization of complex queries

[0098] In traditional architectures, complex queries (such as multi-table joins and nested queries) require multiple data transfers and computations, leading to performance degradation. Programmable network interface cards (NICs) can optimize the execution of complex queries through hardware acceleration and parallel processing technologies. For example, they can implement partial join operations or aggregation calculations at the NIC level, thereby reducing data transfer and computational overhead and improving the performance of complex queries.

[0099] 8. Data consistency guarantee

[0100] In distributed queries, data consistency typically requires complex software protocols (such as distributed transactions) to ensure, increasing system complexity and overhead. Programmable network interface cards (NICs) can simplify data consistency mechanisms, reduce software overhead, and improve query reliability through hardware-level atomic operations and consistency protocols.

[0101] This invention presents a distributed query system based on a programmable network interface card (NIC), which has broad applicability across multiple fields. Distributed query systems are widely used in large-scale data analysis platforms such as Hadoop, Spark, and Presto. Programmable NICs can accelerate data filtering, aggregation, and sorting operations, reducing CPU and network overhead. In data-intensive queries, NIC hardware acceleration can significantly improve query performance and reduce latency. It can also be used in real-time data processing systems, such as stream processing platforms (Apache Kafka, Flink) and real-time databases (TimescaleDB, InfluxDB). Programmable NICs can preprocess data before it reaches the host, reducing data transmission and computation latency, and supporting low-latency queries, making it suitable for real-time monitoring, alerting, and decision-making systems. Furthermore, it can be used in cloud computing platforms (such as AWS, Azure, Google Cloud) and multi-tenant databases (such as Snowflake, CockroachDB). Programmable NICs ensure that query tasks from different tenants do not interfere with each other through hardware-level resource isolation. Moreover, it supports dynamic resource allocation and load balancing, improving resource utilization and system stability. It can also be used in distributed database systems (such as Cassandra, MongoDB, and CockroachDB). The programmable network interface card (NIC) in this invention can accelerate the execution of distributed queries, reduce data transmission and coordination overhead between nodes, and support efficient data sharding and query optimization, improving the scalability and performance of the database. It can also be used in artificial intelligence and machine learning, such as distributed machine learning platforms (such as TensorFlow and PyTorch) and AI inference systems. Programmable NICs can accelerate data preprocessing and feature extraction, improve the efficiency of model training and inference, support low-latency queries, and are suitable for real-time AI applications. Its core advantage lies in significantly improving query performance and reducing latency through hardware acceleration and resource optimization, and supporting efficient resource management in complex queries and multi-tenant environments. With the continuous increase in data scale and computing demands...

[0102] Furthermore, Field-Programmable Gate Arrays (FPGAs) are highly programmable hardware devices that can implement various functions by configuring different logic circuits and algorithms. In distributed query systems, customized query processing modules and algorithms can be implemented on FPGAs to achieve efficient data processing and optimization. FPGA-based distributed query systems leverage the high programmability and powerful parallel computing capabilities of FPGAs to provide efficient, flexible, and low-power solutions for large-scale and complex data query tasks. By customizing specific query processing modules and algorithms on FPGAs, the speed and efficiency of data processing can be significantly improved, while reducing system latency and energy consumption. This architecture is particularly suitable for applications requiring high performance and real-time response, such as data center networks, high-performance computing clusters, and real-time data analysis. Although the development difficulty is relatively high, the flexibility and reconfigurability of FPGAs allow them to be optimized and adjusted according to specific needs, thereby achieving optimal performance. In addition, the low-power characteristics of FPGAs also make them ideal for energy-sensitive applications, reducing operating costs and environmental impact while ensuring high efficiency.

[0103] Furthermore, the distributed query system based on programmable switches leverages the powerful capabilities of programmable switches to achieve efficient management and querying of distributed data by running customized network processing and query algorithms on the switches. The core of this architecture lies in the programmable switch, which not only possesses the basic forwarding functions of a traditional switch but also supports user-defined network protocols and data processing logic, flexibly adapting to various complex application requirements. In addition, the distributed query system based on programmable switches also boasts high flexibility and scalability, allowing for dynamic adjustment and optimization based on specific application scenarios and business needs. For example, in large-scale data center networks, deploying different query processing modules and strategies on the switches enables rapid retrieval and analysis of massive amounts of data; in high-performance computing clusters, optimizing data transmission paths and scheduling strategies improves system concurrency and throughput.

[0104] Example 3:

[0105] This invention also provides a distributed query system, including: a memory and a processor, wherein the memory stores a computer program executed by the processor, and the computer program executes a distributed query method when run by the processor.

[0106] Example 4:

[0107] The present invention also provides a storage medium storing a computer program, which executes the distributed query method during runtime.

[0108] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made by those skilled in the art to the technical solutions of the present invention without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.

Claims

1. A distributed query method, characterized in that, include: Step S1: Obtain the user's query operation request; Step S2: Obtain key-value pair data based on the user's query operation request; at the same time, handle hash collisions of erroneous multicast data packets and output the correct multicast data packets after processing. Step S3: Based on the key-value pair data, obtain the batch-processed data stream operation request; Step S4: Perform remote memory access processing on the batch-processed data stream operation requests to obtain the correct multicast data packets; Step S5: Obtain the rate-limited data packets based on the correctly sent multicast data packets; Step S6: Send the rate-limited data packets to remote memory; Step S7: Track the transmission status of data packets; Step S2 includes: It receives user query requests as input, parses and executes read, write or delete operations, and outputs the operation results or key-value pairs that need to be stored. Receives problematic data packets from multicast packets, calculates their storage location using a hash table and handles hash collisions, and outputs the correct multicast packets after processing. Step S4 includes: Based on the predetermined routing information, the batch-processed data stream operation requests are forwarded to the next network node, and the forwarded data packets are output. The forwarded data packets are copied and sent to multiple target nodes, and the multicast data packets are output. In this process, erroneous data packets are handled by hash collision processing.

2. A distributed query device, characterized in that, include: The network interface card (NIC) integrates a hardware acceleration module, a KV Store integration module, a query optimization module, a configurable matching table module, a traffic aggregation module, a sending module, and a tracking module. The network card hardware acceleration module is used to obtain user query operation requests; The KV Store integration module is used to obtain key-value pair data based on user query requests; it also handles hash collisions in erroneous multicast packets and outputs the corrected multicast packets. The query optimization module is used to obtain batch-processed data stream operation requests based on key-value pair data; The configurable matching table module is used to perform remote memory access processing on batch-processed data stream operation requests to obtain the correct multicast data packets; The traffic aggregation module is used to process correctly sent multicast data packets and obtain the data packets after rate limiting. The sending module is used to send rate-limited data packets to remote memory. The tracking module is used to track the transmission status of data packets.

3. The distributed query device as described in claim 2, characterized in that, The KV Store module includes a RISC-V Processor component and a Hash Into Memory component. The RISC-V Processor component receives user query requests as input, parses and executes read, write, or delete operations, and outputs the operation results or the key-value pair data that needs to be stored. The Hash Into Memory component receives problematic data packets in multicast packets, calculates the storage location using a hash table and handles hash collisions, and outputs the correctly processed multicast packets.

4. The distributed query device as described in claim 3, characterized in that, The data query optimization module includes a RateLimiter component and a Batching component. The RateLimiter component is used to rate limit and transform key-value pair data, and output multiple data streams after rate adjustment. The Batching component is used to merge multiple data stream operation requests into batch processing, and output the batch-processed data stream operation requests.

5. The distributed query device as described in claim 4, characterized in that, The configurable matching table module includes a Forwarder and a Multicaster. The Forwarder forwards batch-processed data stream operation requests to the next network node based on predetermined routing information and outputs the forwarded data packets. The Multicaster copies the forwarded data packets and sends them to multiple target nodes, outputting the multicast data packets. Correct data packets are sent to the traffic aggregation module, while incorrect data packets are sent to the KV Store module.

6. The distributed query device as described in claim 5, characterized in that, The traffic aggregation module includes: TrafficManager, Aggregator, and RDMA Limiter. TrafficManager processes correctly sent multicast packets according to priority and outputs scheduled packets. Aggregator aggregates the scheduled packets. RDMA Limiter controls the rate of remote direct memory access operations on the aggregated packets and outputs packets with limited rates.

7. The distributed query device as described in claim 6, characterized in that, The sending module includes a RoCEv2 Crafter component and an RDMA Emitter component. The RoCEv2 Crafter component is used to encapsulate the rate-limited data packets into a format that conforms to the RoCEv2 protocol and output the encapsulated RoCEv2 data packets. The RDMA Emitter component is used to send the RoCEv2 data packets directly to remote memory and output the successfully sent data packets.

8. A distributed query system, characterized in that, include: A memory and a processor, wherein the memory stores a computer program executed by the processor, the computer program performing the distributed query method as described in claim 1 when executed by the processor.

9. A storage medium, characterized in that, The storage medium stores a computer program, which executes the distributed query method as described in claim 1 when it runs.

Citation Information

Patent Citations

  • Key value partition routing method and system based on distributed storage and in-network calculation

    CN116455848A

  • Remote memory access method suitable for multi-tenant data center

    CN118312337A