A zero memory occupation FPGA near-memory acceleration engine and method for image retrieval approximate nearest neighbor search
By hardware-accelerating the core computation through an FPGA hardware acceleration engine and constructing a deep asynchronous pipelined execution system, the high memory consumption and CPU computation bottleneck of graph retrieval near nearest neighbor search in large-scale data scenarios are solved, achieving efficient and low-power retrieval performance.
Patent Information
- Application Number
- CN202611294212.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-25
- Publication Date
- 2026-11-27
AI Technical Summary
Existing graph retrieval near nearest neighbor search technology suffers from high memory consumption, CPU computation bottlenecks, and I/O latency issues in large-scale data scenarios, making it difficult to balance high performance and low power consumption.
By employing an FPGA hardware acceleration engine, core operations such as distance calculation, deduplication filtering, and priority queue maintenance are hardware-based, and an asynchronous pipelined execution system with deep overlap between computation and storage I/O is constructed, achieving zero memory usage and efficient retrieval.
It significantly reduces retrieval latency, improves query throughput and energy efficiency, supports storage expansion, and avoids memory capacity limitations and CPU computing bottlenecks.
Smart Images

Figure CN123178340A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of nearest neighbor search and hardware acceleration technology, specifically to a zero-memory-occupancy FPGA near-memory acceleration engine and method for graph-oriented retrieval approximate nearest neighbor search. Background Technology
[0002] In recent years, Large Language Models (LLMs) have achieved remarkable success in the field of natural language processing, but they still suffer from inherent defects such as knowledge lag and generation illusion. To overcome these defects, Retrieval-Augmented Generation (RAG) technology has emerged. RAG improves output accuracy by introducing an external knowledge base during the inference stage and has become a mainstream solution in industry. The typical RAG process consists of three stages: the indexing stage, which segments the document into semantic chunks, encodes them into vectors, and stores them in a vector database; the retrieval stage, which vectorizes the query and retrieves the top-k similar semantic chunks in the database using Approximate Nearest Neighbor Search (ANNS); and the generation stage, which inputs the retrieval results and the query into the LLM to generate the final answer. Among these, the recall rate in the retrieval stage determines knowledge relevance, latency determines response experience, and scalability determines the upper limit of knowledge base growth, all of which are directly determined by the ANNS algorithm.
[0003] Common implementation paths for ANNS include tree structures, hashing, quantization, and graph structures. Among them, the graph structure scheme has become the mainstream in the industry due to its optimal balance between accuracy and speed. However, when the data scale reaches billions or even higher, graph structure ANNS faces severe storage and computation challenges.
[0004] In existing technologies, pure in-memory graph indexing schemes (represented by HNSW) reside the complete hierarchical navigable small-world graph index in memory (DRAM / VRAM), and perform greedy graph traversal directly in memory during retrieval. However, its memory footprint increases linearly with the data size, making it only suitable for small to medium-sized scenarios, and its cost rises sharply with the amount of data. At the same time, the storage of graph nodes in memory is highly dispersed, and the memory access mode for distance calculation is extremely unfriendly to CPU cache, further limiting the system's scalability.
[0005] Disk-assisted graph indexing schemes (represented by DiskANN and LM-DiskANN) use Vaman graphs as the index structure, setting strict upper limits on node out-degrees to ensure the size of the neighbor list read from the disk is predictable each time. During retrieval, starting from the entry node, a best-first search is performed based on the candidate set and the result set. In each iteration, the nearest unexpanded node to the query vector in the candidate set is selected, its neighbor list is read from the disk, and the distance to unvisited neighbors is calculated. If a neighbor is better than the farthest element in the result set, it is added to both the candidate set and the result set. This process continues until the candidate set can no longer improve the result set. Its core mechanisms include: asynchronous prefetching to hide I / O latency; introducing a bundle width parameter to control the exploration breadth; caching hot nodes; optimizing data layout on the SSD based on access patterns; and compressing node vectors through product quantization (PQ) to reduce memory usage. However, DiskANN and its variants still have two major drawbacks: First, distance calculation and candidate set maintenance are highly dependent on CPU execution, involving a large number of high-dimensional arithmetic operations and priority queue operations, and CPU computation quickly becomes the main bottleneck; Second, candidate expansion usually has to wait for the neighbor data to be read from the SSD before it can continue, making it difficult to build a truly highly asynchronous pipeline, resulting in I / O latency not being fully hidden by computation.
[0006] All-storage solutions (represented by AiSAQ) further offload the PQ compression vector to disk instead of resident memory, building upon DiskANN, achieving near-zero DRAM usage. However, since all computations are handled by the CPU, the CPU overhead is high, and frequent I / O further increases latency; limited by the parallelism of the CPU architecture, performance degrades significantly in ultra-large-scale data scenarios, highlighting the need for dedicated hardware acceleration.
[0007] In summary, the existing technologies share the following problems: the three types of ANNS solutions—memory-based, GPU-based, and storage-based—are positioned at different points on the Pareto frontier of performance, capacity, and cost, and are suitable for different scenarios. While the centralized storage paradigm can achieve low-cost scalability for massive amounts of data, it is limited by two core drawbacks: CPU computing bottlenecks and insufficient computation-I / O asynchronicity, making it difficult to balance high performance and low power consumption. Therefore, there is an urgent need for an acceleration solution that can fully hardware-enable core computing and build a deeply asynchronous pipeline within the centralized storage paradigm. Summary of the Invention
[0008] The purpose of this invention is to provide a zero-memory FPGA near-memory acceleration engine and method for graph-oriented near-nearest neighbor search. By hardwareifying all core operations originally handled by the CPU, such as distance calculation, deduplication filtering, and priority queue maintenance, and constructing a highly asynchronous pipelined execution system with deep overlap between computation and storage I / O, the invention significantly reduces retrieval latency and improves query throughput per unit power consumption while maintaining compatibility with existing standard SSD devices and zero memory usage. At the same time, it provides transparent storage expansion capabilities without changing the core computation logic.
[0009] The present invention achieves the above objectives by adopting the following technical solution. Firstly, the present invention provides a zero-memory FPGA near-memory acceleration engine for graph retrieval approximate nearest neighbor search. The acceleration engine is deployed on an FPGA and has a heterogeneous three-layer structure consisting of an interface layer, a scheduling layer, and a computation layer. Each layer works collaboratively through separate control and data paths.
[0010] The interface layer includes a network interface unit for receiving query requests and configuration parameters from the host and returning near nearest neighbor search results. The network interface unit communicates with the external network through an on-chip Ethernet MAC hard core. The query requests and the search results are transmitted through the network interface unit. All graph index data, product quantization compressed vectors and full-precision vectors are stored in the onboard NVMe storage subsystem and are directly accessed by the acceleration engine.
[0011] The scheduling layer includes a processing system core and a RAID controller. The processing system core sets parameters for each computing core of the computing layer through the control bus and only intervenes in synchronization at the stage boundary. The RAID controller directly sends read commands to the NVMe storage subsystem as the PCIe root port, without going through the host CPU to participate in the steady-state data path.
[0012] The computing layer includes four dedicated hardware cores: a quantized distance lookup table accelerator, a neighbor deduplication and filtering unit, a priority queue maintenance engine, and a full-precision vector distance processor. Each hardware core is interconnected with a shared on-chip buffer through an AXI channel and performs beam search collaboratively in a deep pipeline manner.
[0013] The four dedicated hardware cores work together through a fine-grained asynchronous event-driven scheduling mechanism. In this scheduling mechanism, each module interacts and is driven only by handshake signals, without global synchronization. This allows storage I / O, queue maintenance, and distance calculation to proceed concurrently rather than sequentially, thereby achieving deep overlap between computation and storage I / O.
[0014] Furthermore, the network interface unit includes a clock domain bridge adapter and a user logic area:
[0015] The clock domain bridging adapter bridges the Ethernet MAC clock domain and the accelerator clock domain, and contains elastic buffers and rate matching logic to ensure that back pressure on the accelerator side is not transmitted to the Ethernet MAC and external network links.
[0016] The user logic area carries all application-related message processing logic, including: terminating the UDP header, verifying the checksum, and decoding the lightweight application layer header containing the query identifier, top-k parameters, and algorithm configuration flags on the receiving path; and packaging the results output by the full-precision vector distance processor into a response record on the sending path, encapsulating it together with the query identifier into a UDP payload, attaching UDP, IPv4, and Ethernet headers, and forwarding it back to the Ethernet MAC via the clock domain bridging adapter.
[0017] Furthermore, the RAID controller aggregates the bandwidth of multiple NVMe storage devices into a unified storage interface that is transparent to the graph traversal engine through striping and parallel read scheduling. Graph nodes, along with their outgoing neighbor lists and product quantization compression vectors, are packaged into one or more 4KiB aligned logical blocks and designed in conjunction with the RAID striping layout, so that each node access triggers a page-aligned block read that covers all the data required for node expansion and distance evaluation.
[0018] Furthermore, the quantization distance lookup table accelerator includes:
[0019] A 128×256 on-chip URAM array stores the distance table in row-major order. Each row contains 256 floating-point values, corresponding to the cluster center distance of a product quantized subspace.
[0020] The 128-channel parallel URAM read port uses 128 indices of the input product quantization vector as column addresses for parallel table lookup.
[0021] A 7-level binary addition tree, the first level consists of 64 adders, and the number of adders is halved in each subsequent level. It is used to accumulate the floating-point distance values obtained from 128 lookup tables to calculate the final asymmetric distance value.
[0022] The quantized distance lookup accelerator is configured to complete the distance lookup and accumulation calculation for all 128 subspaces within a single clock cycle.
[0023] Furthermore, the neighbor deduplication and filtering unit adopts a three-level hierarchical filtering architecture:
[0024] The first stage is a Bloom filter, which uses a 4-way parallel hash function to generate 4 indices for the neighbor ID and queries the corresponding bits in a 512-bit register array in parallel; if any bit is 0, it is determined that the ID has not been accessed and is allowed directly; if all 4 bits are 1, it proceeds to the second stage.
[0025] The second stage is a dual-port BRAM pipeline scanner. One port sequentially reads the accessed ID list entries and compares them with the query ID, while the other port simultaneously prefetches the next batch of entries to form a pipeline, using overlapping comparison for judgment and data prefetching.
[0026] The third stage reuses the on-chip URAM distance table and addition tree architecture of the quantization distance lookup table accelerator, instantiates 4 parallel units to process the product quantization vector distance calculation of 4 neighbors simultaneously, and appends the calculated neighbors and their distances to the visited list through port B, and simultaneously sets the corresponding position of the Bloom filter to 1.
[0027] Furthermore, the priority queue maintenance engine includes an address generation unit and a shift engine:
[0028] When the address generation unit receives a new node, it initializes the left and right boundary pointers of the binary search, calculates the midpoint index through a hardware divider, reads the distance field of the BRAM storage location pointed to by the midpoint index through the BRAM dual port, compares it with the distance to be inserted, and halves the search range until the insertion position is determined.
[0029] When the shift engine is activated, one port reads four consecutive entries from the tail of the queue at a time, while another port simultaneously shifts the entire entry forward by one position. The four-way parallel shift proceeds from the tail of the queue toward the insertion position until an empty space is created at the insertion position, after which the new node is written to that position.
[0030] The priority queue maintenance engine also maintains a 512-bit accessed flag vector register. When inserting, the corresponding bit is set synchronously, and the accessed flag vector is scanned in conjunction with a hardware leading zero counter to locate the first zero bit as the next node to be accessed.
[0031] Furthermore, the full-precision vector distance processor employs a double-buffering mechanism and a three-stage pipelined computing architecture:
[0032] In the dual buffering mechanism, the control state machine reads the node data block from the current buffer and parses out the full-precision vector. At the same time, the AXI main interface prefetches the next data block through the storage master control interface and writes it into the spare buffer. After the calculation is completed, the roles of the two buffers are swapped.
[0033] In the three-stage pipelined computing architecture, the first stage uses 128 floating-point subtractors to calculate the difference between the query vector and the node vector dimension by dimension in parallel. The second stage uses 128 floating-point multipliers to square each difference. The third stage uses a 7-layer floating-point addition tree to accumulate 128 squared differences and output the sum of squared Euclidean distances.
[0034] Furthermore, the specific implementation of the fine-grained asynchronous event-driven scheduling mechanism includes:
[0035] The quantized distance lookup table accelerator calculates the asymmetric distance calculation value of the entry point at the start of the retrieval and forwards it to the priority queue maintenance engine, which can be completed without any preceding storage I / O.
[0036] Upon receiving the distance value, the priority queue maintenance engine immediately updates the candidate queue and issues storage read requests in parallel. Meanwhile, the quantized distance lookup table accelerator, the neighbor deduplication and filtering unit, and the full-precision vector distance processor remain active to process the previously retrieved data.
[0037] After the AXI main interface sends the node data block into the on-chip BRAM buffer, the neighbor deduplication and filtering unit starts neighbor parsing and deduplication processing as soon as the first batch of data words arrive, before the entire block transmission is completed.
[0038] While storing the remaining part of the I / O return request block, the full-precision vector distance processor initiates product-quantized vector distance evaluation and streams the results back to the priority queue maintenance engine, so that new candidate queue updates can be performed before the storage I / O is completed.
[0039] Furthermore, in the storage scalable architecture of the acceleration engine, graph nodes, neighbor lists, and product quantization compression vectors are packaged in the NVMe storage subsystem according to the logical block size of the storage medium; this storage scalable architecture supports transparent expansion of storage capacity by increasing the number of NVMe storage devices, without changing the hardware core structure of the computing layer, only requiring updating the RAID stripe mapping relationship.
[0040] All graph index data, product quantization compression vectors, and full-precision vectors of the acceleration engine are stored in the onboard NVMe storage subsystem and do not occupy host DRAM space. The processing system core only intervenes in the stage boundary synchronization when entering the fine sorting stage after the beam search converges. At other times, the four dedicated hardware cores work asynchronously and collaboratively without relying on the processing system core for gradual synchronization.
[0041] Secondly, the present invention provides a zero-memory-occupancy FPGA near-memory acceleration method for graph retrieval approximate nearest neighbor search, applied to the aforementioned zero-memory-occupancy FPGA near-memory acceleration engine for graph retrieval approximate nearest neighbor search, comprising the following steps:
[0042] Step 1: The network interface unit receives a query request from the host, decodes the application layer header containing the query identifier, top-k parameters, and algorithm configuration flags, and injects the query vector and configuration parameters into the computation layer pipeline.
[0043] Step 2: The quantization distance lookup accelerator loads the product quantization compression vector of the entry node, completes the distance lookup and accumulation of all subspaces within one clock cycle, calculates the asymmetric distance of the entry point, and sends the calculated distance value to the priority queue maintenance engine.
[0044] Step 3: After receiving the distance value, the priority queue maintenance engine immediately updates the candidate queue and issues NVMe read requests in parallel to read the neighbor list and product quantization compression vector of the candidate node from the RAID controller.
[0045] Step 4: The neighbor deduplication and filtering unit performs three-level hierarchical filtering on the returned neighbor IDs. Unvisited neighbors are processed by the quantized distance lookup table accelerator to calculate the distance and then fed back to the priority queue maintenance engine to complete the queue update.
[0046] Step 5: Repeat the bundle search iterations from Step 3 to Step 4 until convergence;
[0047] Step 6: After convergence, the full-precision vector distance processor obtains the full-precision vectors of the candidate nodes from the NVMe storage subsystem through the AXI main interface, performs double-buffered three-stage pipelined full-precision distance calculation, and completes the fine sorting of the candidate list;
[0048] Step 7: The full-precision vector distance processor returns the sorted top-k results to the network interface unit. The network interface unit encapsulates the result pairs and query identifiers into a UDP payload and returns it to the host via Ethernet MAC.
[0049] Compared with the prior art, the present invention has the following advantages:
[0050] Complete FPGA offloading and zero memory footprint. By hardware-enabling all core computations originally handled by the CPU, such as distance calculation, deduplication filtering, and priority queue maintenance, this invention achieves complete FPGA hardware offloading of the ANNS retrieval process. All graph index data, PQ compressed vectors, and full-precision vectors are stored in the onboard NVMe storage subsystem, with host DRAM usage always at zero, fundamentally eliminating the limitation of memory capacity on data scale. Compared to DiskANN's 0.15GB (SIFT1M) and AiSAQ's 0.012GB (SIFT1M) memory footprint, this invention achieves a qualitative leap from "near zero" to "absolute zero".
[0051] Significantly reduced retrieval latency and improved throughput. Experimental results show that, under the same recall@10 conditions, compared to the AiSAQ baseline running on an Intel Core Ultra 7 265 CPU, this invention achieves a 1.95x reduction in average latency and p99 latency on SIFT1M and a 1.82x speedup on GIST1M; the speedup effect is also verified on the SIFT1B billion-dataset. QPS increased from the baseline of 11,763.20 to 19,230.77, a geometric mean improvement of 1.6x.
[0052] The query throughput per unit power consumption (energy efficiency) is significantly improved. The accelerator of this invention consumes only 25W, which is about 67% lower than AiSAQ's 75W; QPS / W increases from 156.84 to 769.23, achieving a 5.4-fold improvement in energy efficiency, fully demonstrating the advantages of dedicated hardware in terms of energy efficiency.
[0053] Highly asynchronous pipelined execution with deep overlap between computation and storage I / O. Through a fine-grained event-driven scheduling mechanism, I / O generation, queue maintenance, and distance calculation proceed concurrently rather than sequentially; data processing begins before the entire block is transferred, forming a multi-stage pipeline where multiple batches of data are simultaneously in different stages of the pipeline, ensuring that computation never stalls due to I / O, and all non-I / O latency is hidden except for unavoidable SSD access latency.
[0054] Compatible with standard SSD devices and transparent storage expansion. This invention uses standard NVMe SSDs (not dedicated computing storage devices such as SmartSSDs), which are directly accessed through a custom RAID controller within the FPGA; transparent expansion of storage capacity is achieved by increasing the number of NVMe storage devices, without changing any core hardware structure of the computing layer, only requiring updating the RAID stripe mapping relationship. Attached Figure Description
[0055] Figure 1 This is a block diagram of a zero-memory-occupancy FPGA near-memory acceleration engine for graph-oriented retrieval approximate nearest neighbor search provided in an embodiment of the present invention. Detailed Implementation
[0056] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.
[0057] 1. Overall Architecture
[0058] like Figure 1As shown, the system proposed in this invention comprises a heterogeneous three-layer structure consisting of an interface layer, a scheduling layer, and a computing layer; wherein, the interface layer, scheduling layer, and computing layer together constitute a near-memory acceleration engine deployed on an FPGA. Each layer works collaboratively through separate control paths and data paths.
[0059] In the control path, the Processing System (PS) core sets parameters for each IP core via the AXI-Lite bus and synchronizes the switching signals at each stage. In the data path, vector data and graph data are directly transmitted between each accelerator core and the RAID subsystem via AXI-Stream and DMA channels, achieving direct transmission from IP core to IP core without processor intervention.
[0060] During the graph traversal (beam search) process, the RAID controller reads multiple node data blocks in parallel and writes them into the on-chip temporary RAM (BRAM) for downstream modules to consume immediately upon data arrival.
[0061] 2. Interface Layer: Network Interface Unit (NIU)
[0062] To expose the entire offloading engine as a transparent network mount accelerator, this invention designs a custom 100Gbps network interface unit, which is tightly integrated with the on-chip 100G CMAC hard core.
[0063] The network interface unit includes a CMAC-to-user adapter bridging the CMAC clock domain (322.265 MHz) and the accelerator clock domain (250 MHz); and a 250 MHz user logic area carrying all application-related packet processing logic. The 322-250 MHz adapter contains flexible buffering and rate matching logic to ensure that backpressure from the accelerator side is not transmitted to the CMAC and the 100Gbps link itself.
[0064] On the receive path, CMAC receives a 512-bit AXI-Stream frame into the 322-250 MHz adapter. After clock domain traversal, word alignment, and segmentation, the adapter outputs a regularized AXI-Stream to the NIU pipeline. NIU then terminates the UDP header and checksum verification, and decodes a lightweight application layer header containing a query identifier, top-k parameters, and algorithm configuration flags. The remaining payload is the query embedding vector. These fields are written to the request FIFO and a small register file mapped to the control processor via an AXI-Lite address. After the control processor completes accelerator configuration and enables the engine, NIU injects the request tuple into the ANNS pipeline via a dedicated AXI-Stream channel, directly to the quantization distance lookup table accelerator.
[0065] On the transmission path, after the full-precision vector distance processor completes the reordering and outputs the final top-k result list, the NIU collects (ID, distance) result pairs, packs them into a compact response record, and encapsulates them together with the original query identifier into a UDP payload. The packing stage then appends UDP, IPv4 and Ethernet headers, and forwards them back to CMAC through the 322-250 MHz adapter to complete the transmission.
[0066] The backpressure generated by the ANNS accelerator is absorbed by the decoupled FIFO at the NIU boundary and inside the adapter. As long as the request queue is not saturated, lossless operation at 100Gbps line speed can be guaranteed. Since the network card is only used to transmit query vectors, configuration commands, and return top-k results, all graph data, PQ compressed vectors, and full-precision vectors are stored in the onboard NVMe RAID subsystem and directly accessed by the accelerator engine. There is no large-scale vector or graph data transmitted through the NIU, which significantly simplifies the data path and the complexity of the interface visible to the software.
[0067] 3. Scheduling Layer: Processing System and RAID Controller
[0068] like Figure 1 As shown, the core of the processing system sets parameters for the four computing cores (QDL / NDF / PQM / FVD) through the AXI-Lite control bus, and only intervenes in synchronization at the stage boundary (i.e., key nodes such as entering the fine sorting stage after the beam search converges). The rest of the modules coordinate asynchronously on their own and do not rely on PS for gradual synchronization.
[0069] The custom RAID controller directly initiates read commands to multiple NVMe SSDs as the PCIe root port, without involving the host CPU in the steady-state data path; through striping and parallel read scheduling, the bandwidth of multiple NVMe devices is aggregated into a unified storage interface that is transparent to the graph traversal engine.
[0070] In the storage physical layout, graph nodes, along with their outgoing neighbor lists and PQ compression vectors, are packaged into one or more 4KiB aligned logical blocks. This is designed in conjunction with a two-way RAID-0 striped layout to minimize the number of random reads required for each node access and maximize the sequential bandwidth utilization of the two NVMe devices. The system avoids any unaligned partial page accesses—each node access triggers a page-aligned 4KiB block read that covers all the data required for node expansion and distance assessment.
[0071] 4. Computing Layer: Four Dedicated Hardware Cores
[0072] like Figure 1As shown, the computation layer implements all the core computations for ANNS retrieval through four dedicated hardware cores cascaded in a deep pipeline. Each core is interconnected with a shared on-chip URAM buffer via an AXI channel.
[0073] (1) Quantization Distance Lookup Table Accelerator (QDL)
[0074] The quantization distance lookup accelerator employs a memory-centric lookup pipeline architecture. The distance table is stored in a 128×256 URAM array in row-major order, with each row containing 256 floating-point values, corresponding to the cluster center distance of a PQ subspace. The input PQ vector is split into 128 indices (each index ranging from 0 to 255), which also serve as column addresses, accessing multiple URAM read ports in parallel. Thus, QDL can complete the distance lookup for all 128 subspaces within a single clock cycle. The floating-point distance values obtained from the 128 lookup paths are then fed into a 7-level binary adder tree: the first level consists of 64 adders, and the number of adders is halved in each subsequent level until the seventh level outputs the final asymmetric distance computation (ADC) distance value.
[0075] (2) Neighbor Deduplication and Filtering Unit (NDF)
[0076] The neighbor deduplication and filtering unit adopts a three-level hierarchical filtering architecture.
[0077] The first level is a Bloom filter: it uses a 4-way parallel hash function to generate 4 indices for the neighbor ID and queries the corresponding bits in a 512-bit register array in parallel; if any bit is 0, it is determined that the ID has not been accessed and is allowed directly; if all 4 bits are 1, it proceeds to the second level.
[0078] The second stage is a dual-port BRAM pipeline scanner: one port sequentially reads the accessed ID list entries and compares them with the query ID, while the other port simultaneously prefetches the next batch of entries to form a pipeline, thus overlapping the comparison judgment and data prefetching; if the comparison matches, the data is rejected, otherwise it is allowed.
[0079] The third-level multiplexing QDL's URAM distance table and additive tree architecture: instantiate 4 parallel units to process the PQ vector distance calculation of 4 neighbors simultaneously; the calculated neighbors and their distances are appended to the visited list through port B, and the corresponding position of the Bloom filter is set to 1 at the same time.
[0080] (3) Priority Queue Maintenance Engine (PQM)
[0081] The priority queue maintenance engine adopts a hybrid architecture of hardware binary search and multi-way parallel shift, consisting of an address generation unit and a shift engine.
[0082] When the address generation unit receives a new node, it initializes the left and right boundary pointers for the binary search; the hardware divider calculates the midpoint index; the BRAM dual-port reads the distance field of the BRAM storage location pointed to by the midpoint index, compares it with the distance to be inserted, and halves the search range accordingly. This process is repeated until the insertion position is determined.
[0083] When the shift engine is activated, one port reads four consecutive entries from the tail of the queue at a time, while another port simultaneously shifts the entire queue forward by one position. The four-way parallel shifts proceed from the tail of the queue towards the insertion position until an empty space is created at the insertion position. Then, the new node is written to the insertion position, and the queue length is incremented by 1.
[0084] The priority queue maintenance engine also maintains a 512-bit visited flag vector (implemented in registers), which is synchronously set to the corresponding bit during insertion. This vector is scanned in conjunction with a hardware leading zero counter to locate the first zero bit, which is the next node to be visited. In each search iteration, the queue outputs the top-w candidate nodes for beam search expansion.
[0085] (4) Full-precision vector distance processor (FVD)
[0086] The full-precision vector distance processor employs a double-buffering mechanism and a three-stage pipelined fine sorting architecture.
[0087] In the double buffering mechanism, the control state machine reads the node data block from the current buffer and parses out a 128-dimensional full-precision vector. At the same time, the AXI master interface prefetches the next data block through the storage master control interface and writes it into the spare buffer.
[0088] In the three-stage pipelined computation, the first stage uses 128 floating-point subtractors to calculate the difference between the query vector and the node vector dimension by dimension in parallel (the query vector is accessed simultaneously through 128 read ports of a dedicated BRAM); the second stage uses 128 floating-point multipliers to square each difference; and the third stage uses a 7-layer floating-point addition tree to accumulate the 128 squared differences, finally outputting the sum of squared Euclidean distances.
[0089] After the calculation is completed, the two buffers switch roles and continue to process the next node and overlap with I / O; the distance result is located to the corresponding node ID in the full-precision vector distance BRAM through index matching logic, and its distance field is updated to complete the reordering.
[0090] 5. Asynchronous event-driven scheduling mechanism
[0091] Each module operates in a decoupled, event-driven manner, without waiting for other stages to complete their current tasks.
[0092] At the start of the retrieval, QDL calculates the ADC distance to the entry point and forwards it to PQM without any preceding I / O.
[0093] Upon receiving the distance, PQM immediately updates the candidate queue and issues SSD read requests in parallel; meanwhile, QDL, NDF, and FVD remain active, processing previously retrieved data at any time; that is, I / O generation, queue maintenance, and distance calculation proceed concurrently rather than sequentially.
[0094] After the AXI master interface sends the node data block into the BRAM buffer, NDF begins neighbor resolution and deduplication as soon as the first batch of data words arrive, before the entire block transmission is completed.
[0095] FVD initiates PQ vector distance evaluation and streams the results back to PQM while the SSD returns the remaining part of the requested block, so that new candidate queue updates can be performed before storage I / O is complete.
[0096] The aforementioned fine-grained producer-consumer interaction forms a multi-stage pipeline with multiple batches of data simultaneously in different stages of the pipeline, ensuring that computation never stops due to I / O;
[0097] The beam search continues under this overlapping mechanism until convergence; after convergence, PQM provides FVD with a list of visited nodes to complete the configuration; FVD autonomously obtains the full-precision vector through the AXI main interface and performs precise distance calculation, and the result is stored in the full-precision vector distance BRAM;
[0098] Throughout this process, the modules interact only through lightweight handshake signals, ensuring that each stage can run as soon as its local input is ready, rather than waiting for global synchronization; PS only intervenes at the stage boundaries.
[0099] 6. Scalable storage architecture
[0100] This invention implements a scalable storage architecture based on a combination of Ethernet interconnect and an on-chip RAID controller. Graph nodes, their neighbor lists, and PQ compression vectors are packaged according to the logical block size alignment of the storage medium. This scalable architecture supports transparent capacity expansion by increasing the number of NVMe storage devices without modifying any core hardware structure in the computing layer; only the RAID stripe mapping relationship needs to be updated.
[0101] Example 1: Hardware Platform and Overall Architecture Implementation
[0102] The acceleration engine of this invention is implemented on the Xilinx Virtex XCVU13P development board, which features an onboard 100G QSFP28 Ethernet interface and two NVMe connectors. The accelerator core operates at a frequency of 250 MHz and communicates with the host via a 100GbE Ethernet link; all ANNS computations and NVMe I / O scheduling are performed in hardware. The processing system core sets parameters for the four computation cores via the AXI-Lite control bus and intervenes in synchronization only at stage boundaries.
[0103] Example 2: Implementation of Network Interface Unit
[0104] Taking the specific implementation of the 100Gbps network interface unit as an example, the CMAC hard core operates at a 322.265 MHz clock domain, receiving frame data from the 100G Ethernet link with a 512-bit AXI-Stream data width. The CMAC-to-user adapter crosses the data from the 322.265 MHz clock domain to the accelerator's 250 MHz clock domain. This adapter contains elastic buffering and rate matching logic, which can absorb backpressure from the accelerator side without affecting link-layer flow control. On the receive path, the NIU terminates the UDP header, checks the IPv4 header and UDP checksum, and then decodes an 8-byte lightweight application layer header, where the lower 32 bits contain the query identifier, and the higher 32 bits contain the top-k parameters and reserved algorithm configuration flags. The query vector payload follows immediately. After confirming the checksum is correct, the query identifier and top-k parameters are written to the AXI-Lite register file for the PS to read, and the query vector is pushed into the request FIFO. After the PS completes the accelerator configuration, it starts the acceleration engine by writing to the enable register. The NIU then injects the request tuple (including the query vector) into the ANNS pipeline via a dedicated AXI-Stream channel, directly reaching the QDL module.
[0105] Example 3: Storage Configuration and RAID Controller Implementation
[0106] All indexes and graph structures are stored in a RAID-0 array composed of two NVMe SSDs, with a logical block size of 4KiB. All on-chip data structures (graph nodes, PQ codes, and full-precision vectors) are stored in 4KiB alignment. A custom RAID controller within the FPGA directly initiates NVMe read commands to the SSDs via the PCIe root port, ensuring that the steady-state data path does not involve the host CPU. Each graph node, along with its outgoing neighbor list and PQ compression vector, is packaged into one or more 4KiB blocks, designed in conjunction with a two-way RAID-0 striped layout to avoid accessing non-aligned partial pages. In a typical query, the RAID controller issues multiple 4KiB block read requests in parallel. After the data returns, it is directly written to the on-chip temporary storage (BRAM) via AXI-Stream and consumed by the downstream NDF as soon as the first batch of data words arrives.
[0107] Example 4: Working process of the Quantization Distance Lookup Table Accelerator (QDL)
[0108] The working process of QDL is illustrated using a 128-dimensional vector, a PQ codebook containing 128 subspaces, and each subspace having 256 cluster centers as an example. The distance table is stored in the on-chip URAM as a 128×256 array in row-major order, containing a total of 128×256=32,768 floating-point values. The input PQ vector is split into 128 indices (each index is 8 bits, with a value range of 0~255). Within one clock cycle, the 128 indices are simultaneously sent to 128 URAM read ports as column addresses. Each read port selects a floating-point value from the 256 columns of its corresponding row and outputs it. The 128 distance values obtained from the lookup table are then fed into a 7-level binary adder tree: 64 adders in the first level, 32 adders in the second level, 16 adders in the third level, 8 adders in the fourth level, 4 adders in the fifth level, 2 adders in the sixth level, and 1 adder in the seventh level, outputting the final ADC distance value after 7 clock cycles. The entire calculation process requires only 8 clock cycles (1 cycle for table lookup + 7 cycles for addition tree), which is significantly better than the software implementation that requires CPU to calculate and accumulate the squared differences dimension by dimension.
[0109] Example 5: Working process of the Neighbor Deduplication and Filtering Unit (NDF)
[0110] In a single bundle search iteration, the RAID controller returns a 4KiB data block containing a list of neighbor IDs for candidate nodes. The NDF performs a three-stage filtering process for each neighbor ID in this list. The first stage, a Bloom filter, uses a 4-way parallel hash function to query the 512-bit register array; if a hash bit is 0, the ID is considered unvisited and allowed to proceed directly to QDL distance calculation. If all four bits are 1, the ID enters the second stage, a dual-port BRAM pipeline scanner, for precise comparison with the visited ID list; if a match is found, the ID is rejected, otherwise allowed. The third stage uses the 4-way parallel distance calculation unit of QDL to simultaneously calculate the ADC distance for the four allowed neighbors; after calculation, the new neighbor and its distance are written to the visited list, and the corresponding bit in the Bloom filter is simultaneously set to 1. Experiments show that the Bloom filter can filter out over 85% of duplicate accesses in the first stage, significantly reducing the number of BRAM accesses for precise comparison.
[0111] Example 6: Priority Queue Maintenance Engine (PQM) Working Process
[0112] The working process of PQM is illustrated using a priority queue with a beam width w=32 as an example. Assume there are already 30 candidate items in the queue, sorted in ascending order of distance, and the distance to the new node is d_n. The address generation unit initializes the left boundary to 0 and the right boundary to 30, and the hardware divider calculates the midpoint index 15. The BRAM dual-port reads the distance d_15 of the 15th candidate item and compares it with d_n. If d_n ≥ d_15, the left boundary moves to 16; otherwise, the right boundary moves to 15. This process is repeated until the left and right boundaries converge, determining the insertion position pos. The shift engine is then activated: Port A reads four consecutive entries (positions 30, 29, 28, and 27) from the tail (position 30), while Port B simultaneously writes these four entries to positions 31, 30, 29, and 28 respectively; this operation is repeated until the insertion position pos is reached. After an empty space is created, the new node is written to pos, and the queue length is incremented by 1. The bit corresponding to the new node ID in the visited flag vector is synchronously set to 1, and the hardware leading zero counter scans the vector and returns the first zero bit as the node to be visited in the next round. The above hardware binary search only requires log2(32) = 5 clock cycles to determine the insertion position, which is significantly better than the linear search with an average of 15 comparisons in the software implementation.
[0113] Example 7: Working process of a full-precision vector distance processor (FVD)
[0114] After the beam search converges, PQM provides FVD with a candidate list (typically containing 100-200 candidate node IDs). FVD performs fine sorting using a double-buffering mechanism: assuming Buffer A currently holds a data block with node ID=1001, the control state machine parses a 128-dimensional full-precision vector (each dimension is float32) from it, while the query vector is simultaneously output from a dedicated BRAM via 128 read ports. A three-stage pipeline then starts: the first stage, with 128 floating-point subtractors, completes dimension-by-dimensional subtraction within one clock cycle; the second stage, with 128 floating-point multipliers, completes dimension-by-dimensional squaring in the next cycle; the third stage, with a 7-layer floating-point addition tree, completes accumulation over the following 7 clock cycles, outputting the final sum of squared Euclidean distances. During vector computation in Buffer A, the AXI master interface prefetches a data block with node ID=1002 through the storage master interface and writes it to Buffer B; after computation, the two buffers switch roles, and FVD seamlessly switches to process the next node, achieving complete overlap between computation and I / O. After all candidate nodes have been calculated, FVD writes the distance results into the full-precision vector distance BRAM, completes the fine sorting, and outputs the final top-k results.
[0115] Example 8: Asynchronous Event-Driven Scheduling Process
[0116] The asynchronous scheduling mechanism is illustrated using a complete bundle search iteration as an example. At a certain time, QDL completes the entry point ADC distance calculation and forwards it to PQM. PQM then... At +1, the candidate queue is updated, and the first SSD read request (requesting node A) is immediately sent to the RAID controller. During the approximately 10-20 μs wait for the SSD to return, QDL, NDF, and FVD remain active: QDL processes candidate nodes previously stored in the on-chip BRAM, and NDF parses and deduplicates the arriving neighbor data. When the first batch of data words (approximately 64 bytes) of node A's data block arrives... Upon arrival at +15μs, NDF begins consumption without waiting for the entire transmission block to complete; simultaneously, PQM uses the distance feedback from NDF to... +20μs to issue an SSD read request to node B. At +25μs, the entire data block from node A arrives, and the first batch of data words from node B begin to arrive simultaneously. The two batches of data are in different pipeline stages: FVD fine sorting (for candidates after convergence) and NDF deduplication (for newly arrived neighbors). Throughout the process, SSD I / O, queue maintenance, and distance calculation proceed concurrently, and the PS does not intervene in any synchronization before convergence.
[0117] Example 9: Experimental Verification and Performance Comparison
[0118] This invention was experimentally validated on three datasets: SIFT1M, GIST1M, and SIFT1B. The measurement method was as follows: the query set was randomly shuffled, and all queries were initiated sequentially; a warm-up run was performed first to fill the operating system and device caches (the warm-up result was discarded), followed by three complete measurements, with the median reported. The main performance metrics were QPS, QPS / W, average latency under a fixed candidate list size, and p99 latency.
[0119] The storage configuration consists of two NVMe SSDs forming a RAID-0 array with a logical block size of 4KiB. All on-chip data structures (graph nodes, PQ codes, and full-precision vectors) are stored aligned to 4KiB. The RAID controller within the FPGA directly initiates read commands to the SSDs via the PCIe root port. The experimental results are shown in Table 1 below.
[0120] Table 1 Experimental verification results
[0121]
[0122] In terms of memory usage, this invention achieves 0 GB memory usage on both SIFT1M and GIST1M, which is significantly better than DiskANN (0.15 GB / 1.12 GB) and AiSAQ (0.012 GB / 0.018 GB).
[0123] In terms of energy efficiency, this invention consumes only 25 W (QPS / W = 769.23), compared to AiSAQ's 75 W (QPS / W = 156.84), achieving a 5.4-fold improvement in energy efficiency. Geometric mean results across two datasets show a 1.6×QPS improvement and a 1.82×~1.95×latency / throughput acceleration.
[0124] In terms of resource usage, on the XCVU13P-fhgb2014-2L-e target device, the overall resource usage is as follows: LUT 301,878 (17.5%), FF 288,224 (8.3%), DSP 1,282 (10.4%), BRAM 679 blocks (25.3%), and URAM 66 blocks (5.2%). Among them, the ANNS compute pipeline accounts for approximately 14.60% of the total LUTs and 7.80% of the total DSPs.
[0125] The experimental data above fully demonstrates the advantages of this invention in terms of high performance, zero memory usage, and high energy efficiency under the centralized storage paradigm.
[0126] This invention can be implemented on an FPGA accelerator card and is suitable for cloud computing data centers, edge computing devices, and embedded AI inference systems. This invention is particularly suitable for the following application scenarios:
[0127] RAG system retrieval acceleration: Deployed on FPGA acceleration cards in data centers, it provides high-throughput, low-latency, zero-DRAM-occupancy ANNS retrieval services for large-scale vector databases, freeing up GPU resources for LLM inference itself;
[0128] Large-scale vector retrieval system: suitable for approximate nearest neighbor search scenarios with billions or even tens of billions of vector data, such as recommendation systems, face recognition, image search, etc.
[0129] Near-storage computing platform: Works with standard NVMe SSDs to perform ANNS calculations directly on the storage side, significantly reducing data migration and suitable for storage-intensive applications.
[0130] Because this invention uses standard NVMe SSDs (non-dedicated computing storage devices) and achieves transparent storage expansion through RAID+Ethernet, it does not change any core hardware structure of the computing layer during expansion. The same FPGA hardware can be adapted to storage systems of different sizes by updating the RAID stripe mapping relationship, which has high flexibility and scalability.
[0131] The above description is merely a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the forms disclosed herein and should not be construed as excluding other embodiments. It can be used in various other combinations, modifications, and environments, and can be altered within the scope of the concept described herein through the above teachings or related technologies or knowledge. Modifications and variations made by those skilled in the art that do not depart from the spirit and scope of the present invention should be within the protection scope of the appended claims.
Claims
1. A zero-memory FPGA near-memory acceleration engine for graph-oriented retrieval approximate nearest neighbor search, characterized in that, The acceleration engine is deployed on an FPGA and has a heterogeneous three-layer structure consisting of an interface layer, a scheduling layer, and a computing layer. Each layer works together through separate control and data paths. The interface layer includes a network interface unit for receiving query requests and configuration parameters from the host and returning near nearest neighbor search results. The network interface unit communicates with the external network through an on-chip Ethernet MAC hard core. The query requests and the search results are transmitted through the network interface unit. All graph index data, product quantization compressed vectors and full-precision vectors are stored in the onboard NVMe storage subsystem and are directly accessed by the acceleration engine. The scheduling layer includes a processing system core and a RAID controller. The processing system core sets parameters for each computing core of the computing layer through the control bus and only intervenes in synchronization at the stage boundary. The RAID controller directly sends read commands to the NVMe storage subsystem as the PCIe root port, without going through the host CPU to participate in the steady-state data path. The computing layer includes four dedicated hardware cores: a quantized distance lookup table accelerator, a neighbor deduplication and filtering unit, a priority queue maintenance engine, and a full-precision vector distance processor. Each hardware core is interconnected with a shared on-chip buffer through an AXI channel and performs beam search collaboratively in a deep pipeline manner. The four dedicated hardware cores work together through a fine-grained asynchronous event-driven scheduling mechanism. In this scheduling mechanism, each module interacts and is driven only by handshake signals, without global synchronization. This allows storage I / O, queue maintenance, and distance calculation to proceed concurrently rather than sequentially, thereby achieving deep overlap between computation and storage I / O.
2. The zero-memory FPGA near-memory acceleration engine for graph-oriented retrieval approximate nearest neighbor search according to claim 1, characterized in that, The network interface unit includes a clock domain bridge adapter and a user logic area: The clock domain bridging adapter bridges the Ethernet MAC clock domain and the accelerator clock domain, and contains elastic buffers and rate matching logic to ensure that back pressure on the accelerator side is not transmitted to the Ethernet MAC and external network links. The user logic area carries all application-related message processing logic, including: terminating the UDP header on the receiving path, verifying the checksum, and decoding the lightweight application layer header containing the query identifier, top-k parameters and algorithm configuration flags; The results output by the full-precision vector distance processor are packaged into a response record along the transmission path and encapsulated together with the query identifier into a UDP payload. After attaching UDP, IPv4 and Ethernet headers, the payload is forwarded back to the Ethernet MAC via the clock domain bridging adapter.
3. The zero-memory FPGA near-memory acceleration engine for graph-oriented retrieval approximate nearest neighbor search according to claim 1, characterized in that, The RAID controller aggregates the bandwidth of multiple NVMe storage devices into a unified storage interface that is transparent to the graph traversal engine through striping and parallel read scheduling. Graph nodes, along with their outgoing neighbor lists and product quantization compression vectors, are packaged into one or more 4KiB aligned logical blocks and designed in conjunction with the RAID striping layout so that each node access triggers a page-aligned block read that covers all the data required for node expansion and distance evaluation.
4. The zero-memory FPGA near-memory acceleration engine for graph-oriented retrieval approximate nearest neighbor search according to claim 1, characterized in that, The quantization distance lookup table accelerator includes: A 128×256 on-chip URAM array stores the distance table in row-major order. Each row contains 256 floating-point values, corresponding to the cluster center distance of a product quantized subspace. The 128-channel parallel URAM read port uses 128 indices of the input product quantization vector as column addresses for parallel table lookup. A 7-level binary addition tree, the first level consists of 64 adders, and the number of adders is halved in each subsequent level. It is used to accumulate the floating-point distance values obtained from 128 lookup tables to calculate the final asymmetric distance value. The quantized distance lookup accelerator is configured to complete the distance lookup and accumulation calculation for all 128 subspaces within a single clock cycle.
5. The zero-memory FPGA near-memory acceleration engine for graph-oriented retrieval approximate nearest neighbor search according to claim 1, characterized in that, The neighbor deduplication and filtering unit adopts a three-level hierarchical filtering architecture: The first stage is a Bloom filter, which uses a 4-way parallel hash function to generate 4 indexes for the neighbor ID and queries the corresponding bits in a 512-bit register array in parallel; If any bit is 0, it is determined that the ID has not been accessed and access is granted directly; If all four digits are 1, then proceed to the second level; The second stage is a dual-port BRAM pipeline scanner. One port sequentially reads the accessed ID list entries and compares them with the query ID, while the other port simultaneously prefetches the next batch of entries to form a pipeline, using overlapping comparison for judgment and data prefetching. The third stage reuses the on-chip URAM distance table and addition tree architecture of the quantization distance lookup table accelerator, instantiates 4 parallel units to process the product quantization vector distance calculation of 4 neighbors simultaneously, and appends the calculated neighbors and their distances to the visited list through port B, and simultaneously sets the corresponding position of the Bloom filter to 1.
6. The zero-memory FPGA near-memory acceleration engine for graph-oriented retrieval approximate nearest neighbor search according to claim 1, characterized in that, The priority queue maintenance engine includes an address generation unit and a shift engine: When the address generation unit receives a new node, it initializes the left and right boundary pointers of the binary search, calculates the midpoint index through a hardware divider, reads the distance field of the BRAM storage location pointed to by the midpoint index through the BRAM dual port, compares it with the distance to be inserted, and halves the search range until the insertion position is determined. When the shift engine is activated, one port reads four consecutive entries from the tail of the queue at a time, while another port simultaneously shifts the entire entry forward by one position. The four-way parallel shift proceeds from the tail of the queue toward the insertion position until an empty space is created at the insertion position, after which the new node is written to that position. The priority queue maintenance engine also maintains a 512-bit accessed flag vector register. When inserting, the corresponding bit is set synchronously, and the accessed flag vector is scanned in conjunction with a hardware leading zero counter to locate the first zero bit as the next node to be accessed.
7. The zero-memory FPGA near-memory acceleration engine for graph-oriented retrieval approximate nearest neighbor search according to claim 1, characterized in that, The full-precision vector distance processor employs a double-buffering mechanism and a three-stage pipelined computing architecture. In the dual buffering mechanism, the control state machine reads the node data block from the current buffer and parses out the full-precision vector. At the same time, the AXI main interface prefetches the next data block through the storage master control interface and writes it into the spare buffer. After the calculation is completed, the roles of the two buffers are swapped. In the three-stage pipelined computing architecture, the first stage uses 128 floating-point subtractors to calculate the difference between the query vector and the node vector dimension by dimension in parallel. The second stage uses 128 floating-point multipliers to square each difference. The third stage uses a 7-layer floating-point addition tree to accumulate 128 squared differences and output the sum of squared Euclidean distances.
8. The zero-memory FPGA near-memory acceleration engine for graph-oriented retrieval approximate nearest neighbor search according to claim 1, characterized in that, The specific implementation of the fine-grained asynchronous event-driven scheduling mechanism includes: The quantized distance lookup table accelerator calculates the asymmetric distance calculation value of the entry point at the start of the retrieval and forwards it to the priority queue maintenance engine, which can be completed without any preceding storage I / O. Upon receiving the distance value, the priority queue maintenance engine immediately updates the candidate queue and issues storage read requests in parallel. Meanwhile, the quantized distance lookup table accelerator, the neighbor deduplication and filtering unit, and the full-precision vector distance processor remain active to process the previously retrieved data. After the AXI main interface sends the node data block into the on-chip BRAM buffer, the neighbor deduplication and filtering unit starts neighbor parsing and deduplication processing as soon as the first batch of data words arrive, before the entire block transmission is completed. While storing the remaining part of the I / O return request block, the full-precision vector distance processor initiates product-quantized vector distance evaluation and streams the results back to the priority queue maintenance engine, so that new candidate queue updates can be performed before the storage I / O is completed.
9. The zero-memory FPGA near-memory acceleration engine for graph-oriented retrieval approximate nearest neighbor search according to claim 1, characterized in that, In the storage scalable architecture of the acceleration engine, graph nodes, neighbor lists, and product quantization compression vectors are packaged in the NVMe storage subsystem according to the logical block size of the storage medium. This storage scalable architecture supports transparent expansion of storage capacity by increasing the number of NVMe storage devices. During expansion, the hardware core structure of the computing layer is not changed, only the RAID stripe mapping relationship needs to be updated. All graph index data, product quantization compression vectors, and full-precision vectors of the acceleration engine are stored in the onboard NVMe storage subsystem and do not occupy host DRAM space. The processing system core only intervenes in the stage boundary synchronization when entering the fine sorting stage after the beam search converges. At other times, the four dedicated hardware cores work asynchronously and collaboratively without relying on the processing system core for gradual synchronization.
10. A zero-memory FPGA near-memory acceleration method for graph-oriented retrieval approximate nearest neighbor search, applied to the zero-memory FPGA near-memory acceleration engine for graph-oriented retrieval approximate nearest neighbor search as described in any one of claims 1-9, characterized in that, Includes the following steps: Step 1: The network interface unit receives a query request from the host, decodes the application layer header containing the query identifier, top-k parameters, and algorithm configuration flags, and injects the query vector and configuration parameters into the computation layer pipeline. Step 2: The quantization distance lookup accelerator loads the product quantization compression vector of the entry node, completes the distance lookup and accumulation of all subspaces within one clock cycle, calculates the asymmetric distance of the entry point, and sends the calculated distance value to the priority queue maintenance engine. Step 3: After receiving the distance value, the priority queue maintenance engine immediately updates the candidate queue and issues NVMe read requests in parallel to read the neighbor list and product quantization compression vector of the candidate node from the RAID controller. Step 4: The neighbor deduplication and filtering unit performs three-level hierarchical filtering on the returned neighbor IDs. Unvisited neighbors are processed by the quantized distance lookup table accelerator to calculate the distance and then fed back to the priority queue maintenance engine to complete the queue update. Step 5: Repeat the bundle search iterations from Step 3 to Step 4 until convergence; Step 6: After convergence, the full-precision vector distance processor obtains the full-precision vectors of the candidate nodes from the NVMe storage subsystem through the AXI main interface, performs double-buffered three-stage pipelined full-precision distance calculation, and completes the fine sorting of the candidate list; Step 7: The full-precision vector distance processor returns the sorted top-k results to the network interface unit. The network interface unit encapsulates the result pairs and query identifiers into a UDP payload and returns it to the host via Ethernet MAC.
