Memory architecture vector approximate retrieval method and system based on graph neural network

By using a graph neural network-based vector approximation retrieval method for memory architecture, the problem of balancing retrieval performance and resource cost in existing technologies is solved. This method achieves adaptive retrieval strategies and resource optimization, thereby improving the performance and user experience of the split memory architecture.

CN121636581APending Publication Date: 2026-03-10HARBIN INST OF TECH AT WEIHAI
View PDF 0 Cites 2 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-07
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing vector retrieval methods lack the ability to adapt to query characteristics and underlying hardware environment, making it difficult to balance retrieval performance, response latency and resource cost, especially in the case of a split memory architecture where storage resources cannot be effectively utilized.

Method used

A memory architecture vector approximation retrieval method based on graph neural networks is adopted. By constructing a historical query-hit vector association graph, a lightweight graph neural network model is used to predict the approximation retrieval tolerance and adaptively generate retrieval strategies. Under the separate memory architecture, memory-level access and computation granularity are coordinated and scheduled, combined with asynchronous backhaul and progressive refinement mechanisms.

Benefits of technology

It achieves intelligent and adaptive search strategies, deeply integrates with the split memory architecture, improves resource efficiency, balances low latency and high accuracy, optimizes user experience, significantly reduces memory resource consumption and data I/O overhead, and improves the stability and user experience of online search services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121636581A_ABST
    Figure CN121636581A_ABST
Patent Text Reader

Abstract

The invention relates to the field of distributed information retrieval, and particularly discloses a memory architecture vector approximate retrieval method based on a graph neural network, which comprises the following steps of: constructing and dynamically maintaining a historical query-hit vector association graph for modeling a deep semantic relationship between a historical query and a successful retrieval result; inputting the features of the current query vector, the information of the current query vector subjected to neighborhood sampling and feature aggregation in the graph and the service scene label into a lightweight graph neural network, and predicting the approximate retrieval tolerance level of the query; on the basis of the prediction result, an optimal retrieval strategy is generated in a self-adaptive mode; and in combination with asynchronous result return and a progressive refinement mechanism based on residual error reordering, a user is responded at the first time, and continuous optimization and pushing of a better result are realized. According to the method, a query-level personalized retrieval strategy is realized, the retrieval precision, the response delay and the system resource consumption are effectively balanced, and the method is suitable for a large-scale high-dimensional vector retrieval scene.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of distributed information retrieval, in particular to artificial intelligence and vector database technology, and more particularly to a vector approximate retrieval method based on a graph neural network in a memory architecture, which is an approximate nearest neighbor retrieval method and corresponding system for massive high-dimensional vector data in a separate memory architecture. BACKGROUND

[0002] With the wide application of deep learning and representation learning technology, embedding images, texts, speech and other unstructured data into high-dimensional vectors has become the mainstream data representation paradigm. In this context, vector similarity retrieval, i.e., quickly finding the topological neighbors most similar to the query vector in high-dimensional space, constitutes the key technical foundation of recommendation systems, search engines, image retrieval and large model (AIGC) applications.

[0003] In the face of massive high-dimensional vector data, accurate farthest neighbor search is difficult to meet the real-time requirements of large-scale online services due to high computational complexity and large memory consumption. Therefore, approximate nearest neighbor retrieval technology has emerged as the mainstream high-performance ANN solution. However, existing ANN retrieval methods still have obvious limitations. First, existing methods generally lack intelligent perception and adaptive ability for query requests. They usually rely on pre-constructed static indexes and fixed search parameters (such as efSearch in HNSW), using a "one-size-fits-all" retrieval mode. This mode cannot distinguish the differentiated needs of delay and accuracy in different business scenarios. Second, existing technologies are not well suited to the separate memory architecture. The separate memory architecture provides transparent access to computing nodes through the pooling of memory resources and high-speed networks (such as RDMA), achieving elastic expansion of memory capacity and optimization of cost. However, existing ANN algorithms are mostly designed for traditional single memory space and fail to effectively perceive and schedule hierarchical storage resources (such as cache, local memory, remote memory, and persistent storage), which leads to unnecessary remote data access or I / O overhead in the retrieval process, making it difficult to place appropriate computing tasks and data on appropriate storage levels at the architecture level, thus failing to fully realize the potential performance and cost advantages of the separate memory architecture.

[0004] Therefore, there is an urgent need in the art for a new vector approximate retrieval method that can intelligently understand the context and intent of each query request and adaptively drive underlying heterogeneous hardware resources, thereby achieving an optimal balance among retrieval performance, latency and resource cost in a three-way game. SUMMARY

[0005] The application aims to solve the technical problem that the retrieval performance, response delay and resource cost are difficult to balance in the prior art vector retrieval technology due to the lack of adaptive ability to query characteristics and underlying hardware environment, and proposes a vector approximate retrieval method based on a graph neural network memory architecture.

[0006] In order to achieve the above-mentioned purpose, the application adopts the following technical scheme: A vector approximate retrieval method based on a graph neural network memory architecture, comprising: S1: receiving and analyzing client requests: in a separate memory architecture including a cache layer, a main memory layer and a persistent storage layer, receiving a query request from a client, and extracting a query vector and associated business metadata from the query request; S2: association modeling and tolerance prediction: based on historical retrieval data, a historical query-hit vector association graph is constructed and maintained, and the current query vector features and the neighborhood information extracted from the association graph are jointly input into a lightweight graph neural network model to infer and output the approximate retrieval tolerance level of the query; S3: adaptive retrieval strategy generation: according to the approximate retrieval tolerance level, an adaptive retrieval strategy is generated which can coordinate the scheduling of memory level access and vector scanning calculation granularity; S4: preliminary retrieval execution: under the separate memory architecture, the retrieval strategy is executed to obtain a preliminary vector candidate set; S5: asynchronous retrieval and gradual refinement: the vector candidate set is immediately returned to the client through an asynchronous return mechanism; at the same time, the gradual refinement operation is started on the vector candidate set in the background, and when the refinement operation produces higher ranked or more relevant results, the updated results are pushed to the client in real time.

[0007] As a further technical scheme of the application, S2 specifically comprises: S21: construction and maintenance of a historical query-hit vector association graph; S22: structure and calculation logic of a lightweight graph neural network (GNN); S23: online incremental learning.

[0008] As a further technical scheme of the application, in S21, the construction of the historical query-hit vector association graph specifically comprises: defining the nodes in the graph as historical query nodes representing past queries and vector data nodes representing database vectors; and according to the historical retrieval log, when the preset "hit" condition (for example, a vector data node is ranked high or clicked by a user in the retrieval results of a certain historical query) is met, a weighted edge is established between the corresponding nodes.

[0009] As a further technical solution of the present application, in the S23, the online incremental learning, specifically comprising: the parameters of the lightweight graph neural network model are updated through online incremental learning: after each retrieval task, the features of this query, the final adopted retrieval strategy and the subsequent behavior feedback representing user satisfaction jointly constitute new training samples to iteratively optimize the lightweight graph neural network model.

[0010] As a further technical solution of the present application, in the S3, the adaptive generation of the retrieval strategy, specifically comprising: if the approximate retrieval tolerance is high, a strategy of preferentially accessing the cache layer and using coarse-grained vector scanning is generated; if the approximate retrieval tolerance is low, a strategy of loading refined index from the persistent storage layer and performing comprehensive vector comparison is generated.

[0011] As a further technical solution of the present application, the S4 specifically comprises: parsing and executing the approximate retrieval strategy generated in step S3, according to the retrieval strategy, distributing retrieval sub-tasks to different hardware levels (local cache, local main memory, remote main memory, remote persistent storage) in the separated memory architecture, and collecting the returned preliminary results to form a preliminary vector candidate set.

[0012] As a further technical solution of the present application, in the S5, the progressive refinement operation, specifically comprising at least one of the following: based on the inverted file index, performing secondary accurate distance calculation on the vectors in the vector candidate set; or calculating the residual vector between the query vector and the candidate vector, and reordering based on the norm of the residual vector.

[0013] As a further technical solution of the present application, the secondary accurate distance calculation on the vectors in the vector candidate set based on the inverted file index, specifically comprising: recalculating the true Euclidean distance or cosine similarity between the query vector and the full-precision candidate vector; the Euclidean distance formula: wherein: is the query vector, is the candidate vector, is the dimension number of the vector, are the position values of the query and candidate vectors in the dimension, respectively, denotes the Euclidean distance between the query vector and the candidate vector; the cosine similarity formula: wherein: is the dot product of the query vector and the candidate vector, and are the lengths of the query and candidate vectors, respectively; in this stage, the full-precision version of the candidate vector is loaded, and then the accurate calculation is performed using the above formula to replace the coarse-precision estimation result in the preliminary retrieval.

[0014] As a further technical solution of the present application, the residual vector between the query vector and the candidate vector is calculated, and reordering is performed based on the norm of the residual vector, specifically including: the index adopts product quantization (PQ), and the vector is approximated by the cluster center to which it belongs , The difference between the query vector and the cluster center to which it belongs is the residual vector ; After the preliminary retrieval obtains the candidate set, the refinement pipeline is executed: calculate the residual of the query: obtain the query vector to which it belongs , and calculate the residual of the query ; Load the residual of the candidate vector: batch load the residual vector of each vector in the preliminary candidate set from the persistent storage (the residual vector dimension is low, and the loading overhead is much smaller than the original vector); Residual distance reordering: calculate the exact distance (such as Euclidean distance) between the query residual and the residual of each candidate vector, and use it as the final sorting basis, as follows:

[0015] In this way, more accurate reordering than preliminary retrieval can be achieved at a lower cost without loading the complete vector.

[0016] A graph neural network-based in-memory architecture vector approximate retrieval system for implementing a graph neural network-based in-memory architecture vector approximate retrieval method, comprising: a request processing module: for receiving a query request from a client in a separate memory architecture comprising a cache layer, a main memory layer and a persistent storage layer, and extracting a query vector and associated business metadata from the request; A tolerance prediction module: for constructing and accessing a historical query-hit vector association graph based on historical retrieval data, and inputting the current query vector features and the neighborhood information extracted from the association graph into a lightweight graph neural network model to infer and output the approximate retrieval tolerance level of the query; A strategy generation module: for adaptively generating a retrieval strategy that can coordinate the scheduling of memory hierarchy access and vector scanning calculation granularity according to the approximate retrieval tolerance level; A preliminary retrieval execution module: for executing the retrieval strategy in the separate memory architecture to obtain a preliminary vector candidate set; Asynchronous refinement and back transmission module: used for immediately transmitting the vector candidate set to the client through an asynchronous mechanism, while starting a progressive refinement operation on the vector candidate set in the background, and pushing the new results generated by the refinement in real time.

[0017] The beneficial effects of the present application are: 1. Intelligent and adaptive retrieval strategy is realized: by constructing a historical query-hit vector association graph and using a graph neural network to accurately predict the approximate tolerance of each query, the traditional "one-size-fits-all" static retrieval mode is changed; the optimal retrieval strategy can be customized for each query request, thereby realizing the optimal allocation of resources in diverse business scenarios.

[0018] 2. Deeply compatible with separated memory architecture to improve resource efficiency: the adaptive strategy can coordinate the access of different levels of memory and different granularity of computing tasks. This perception and adaptation to the underlying hardware can maximize the advantages of the separated memory architecture, significantly reduce the occupation of expensive memory resources and data I / O overhead while ensuring performance, and effectively reduce the total cost of ownership of the system.

[0019] 3. Balancing low latency and high precision to optimize user experience: the asynchronous back transmission and progressive refinement mechanism ensures that users can obtain usable preliminary results in the first time, greatly reducing the perceived latency; at the same time, the continuous refinement operation in the background guarantees the high recall rate and high precision of the final results, realizing the unity of "fast" and "accurate", and significantly improving the stability and user experience of online retrieval services. BRIEF DESCRIPTION OF DRAWINGS

[0020] Figure 1 A flowchart of a vector approximate retrieval method based on a graph neural network memory architecture is proposed for the present application; Figure 2 A functional module schematic diagram of a vector approximate retrieval system based on a graph neural network memory architecture is proposed for the present application. DETAILED DESCRIPTION

[0021] To make the technical means, creative features, purposes and effects achieved by the present application easy to understand, the present application is further described below in conjunction with specific embodiments.

[0022] Please refer to the attached Figure 1 A vector approximate retrieval method based on a graph neural network memory architecture, comprising: S1: Receiving and Parsing Client Requests: In a separate memory architecture comprising a caching layer, a main memory layer, and a persistent storage layer, this system receives query requests from clients and extracts query vectors and associated business metadata from them. Specifically, when a user's upper-layer application (such as a recommendation engine or search engine) needs to perform vector retrieval, it sends an API request to this system. In a specific implementation, this request can be a JSON object containing all the information required to perform the retrieval task. For example, a request can be defined as follows: {"query_vector": [0.12, 0.45,..., -0.23], "top_k": 100, "business_label": "real-time_recommendation", "latency_threshold_ms": 50} Where: query_vector is the high-dimensional vector of this query; top_k is the expected number of results; business_label is the business scenario label, used to help the model make more accurate predictions; latency_threshold_ms is the maximum latency that this business scenario can tolerate; the request processing module is responsible for parsing the request, extracting these key metadata, and passing them to subsequent modules.

[0023] S2: Association Modeling and Tolerance Prediction: Based on historical retrieval data, a historical query-hit vector association graph is constructed and maintained. The current query vector features and neighborhood information extracted from the association graph are input into a lightweight graph neural network model to infer and output the approximate retrieval tolerance level of the query. Specifically, this includes: S21: Construction and Maintenance of the Historical Query-Hit Vector Association Graph: Nodes in the graph are defined as historical query nodes representing past queries and vector data nodes representing database vectors. Based on historical retrieval logs, when a preset "hit" condition is met (e.g., a vector data node ranks highly in the retrieval results of a historical query or is clicked by a user), weighted edges are established between the corresponding nodes. It is a heterogeneous graph, where: node set Includes historical query nodes and vector data nodes ,side , Indicates query Hit over vector Edge weight , This reflects the strength of the association and can be calculated using the following formula:

[0024] wherein: is a vector The number of times a query is clicked in the results of a query is the number of times it is exposed, is a preset click rate threshold; the formula takes into account both absolute clicks and relative click rate to more accurately model correlation strength; S22: structure and calculation logic of lightweight graph neural network (GNN); a lightweight GNN structure similar to GraphSAGE is adopted, specifically including an input layer, two layers of graph convolution layers, and an output layer: (A) Input layer: for a current query vector , first find its K most similar historical query nodes in the graph; the calculation of the GNN starts with these historical query nodes and their multi-hop neighbors; the initial feature vector of each node is concatenated from its own attributes, as follows:

[0025] wherein: is the vector embedding of the node, is the one-hot encoding of the node type (query / data), is other metadata features; (B) Graph convolution layer (neighborhood aggregation and update): the core of the GNN is to update the node representation through iterative neighborhood aggregation; for each node of the th layer , the calculation of its feature is divided into two steps: AGGREGATE: aggregate information from the neighbor node set of node , to ensure "lightweight", a mean aggregator is used, as follows:

[0026] UPDATE: concatenate the last layer representation of the node itself with the aggregated neighborhood representation , and get the new representation through a nonlinear transformation (a fully connected layer using ReLU activation function):

[0027] wherein: and are the Learnable parameters of the layer network; after two layers of graph convolution, each initial node incorporates information from its two-hop neighbors; (C) Output layer (tolerance prediction): Finally, the final representation of K similar historical query nodes is obtained. Aggregates into a graph-level representation through a single read operation (using mean pooling). As shown in the following formula:

[0028] Will With the current query vector Features, business tags After being stitched together, the data is fed into a multilayer perceptron (MLP), and finally the softmax function is used to calculate the... Probability distribution at each tolerance level As shown in the following formula: h

[0029] in: These are the logits output by the MLP; the highest probability level is the prediction result. S23: Online Incremental Learning: The parameters of the lightweight graph neural network model are updated through online incremental learning: After each retrieval task, the features of the query, the finally adopted retrieval strategy, and the subsequent behavioral feedback representing user satisfaction are used together to form new training samples to iteratively optimize the lightweight graph neural network model. To enable the model to continuously adapt, after each retrieval task, the system collects user feedback (such as whether a click was made, the duration of the visit, etc.) and converts it into a realistic tolerance level label. Then, the loss is calculated using the cross-entropy loss function. As shown in the following formula:

[0030] The system uses the loss value to calculate the gradient through the backpropagation algorithm and performs asynchronous mini-batch updates to the parameters of the GNN model.

[0031] S3: Adaptive Retrieval Strategy Generation: Based on the approximate retrieval tolerance level, an adaptive retrieval strategy is generated that can coordinate the scheduling of memory-level access and vector scan computation granularity. Specifically, this includes: receiving the tolerance level output from step S2, and generating a specific, executable retrieval strategy according to a preset mapping rule; if the approximate retrieval tolerance is high, a strategy is generated that prioritizes accessing the cache layer and uses coarse-grained vector scanning; if the approximate retrieval tolerance is low, a strategy is generated that loads a fine-grained index from the persistent storage layer and performs a comprehensive vector comparison. For example, one specific mapping rule can be defined as follows: Level-1 (Highest Tolerance / Lowest Latency): Strategy is to take a highly optimized Cache-Friendly computation path; in this path, the system loads a top-level index or quantization codebook with extremely small size (e.g., smaller than L1 data cache capacity); algorithm design maximizes data locality and computation compactness, ensuring that the core retrieval loop, when executed, operates on data that has a high probability of residing in CPU’s L1 / L2 cache, thus avoiding main memory access and achieving near-nanosecond-level retrieval latency; Level-2 (Higher Tolerance): Strategy is to use HNSW graph index in local main memory (DRAM) but set a smaller search range parameter (e.g., ef_search=32); Level-3 (Lower Tolerance): Strategy is to access remote DRAM nodes through high-speed network, load higher-quality HNSW index, and set a larger search range (e.g., ef_search=128); Level-4 (Lowest Tolerance / Highest Precision): Strategy is to access persistent storage (NVMe SSD), load partial partitions of the index, and perform precise distance computation on vectors within the partitions.

[0032] S4: Preliminary Retrieval Execution: Execute retrieval strategies to obtain a preliminary vector candidate set in a disaggregated memory architecture; specifically, parse and execute the approximate retrieval strategies generated in step S3, distribute retrieval subtasks to different hardware levels (local cache, local main memory, remote main memory, remote persistent storage) in the disaggregated memory architecture according to the retrieval strategies, and collect the returned preliminary results to form a preliminary vector candidate set.

[0033] S5: Asynchronous Retrieval and Gradual Refinement: Immediately return the vector candidate set to the client through an asynchronous return mechanism; at the same time, start gradual refinement operations on the vector candidate set in the background, and update the results in real time when the refinement operations produce higher-ranked or more relevant results. Asynchronous backhaul: once the preliminary candidate set is generated, it is immediately pushed to the client through API callback or long connection such as WebSocket, so as to minimize the user's perceived delay; Progressive refinement operation: the preliminary candidate set is sent to a background refinement pipeline, which can perform more time-consuming but more accurate calculations, and it reads the full-precision version of all vectors in the candidate set from the persistent storage; Specifically including at least one of the following: secondary accurate distance calculation on vectors in the vector candidate set based on the inverted file index: recalculate the true Euclidean distance or cosine similarity between the query vector and the full-precision candidate vector; Euclidean distance formula: Wherein: is the query vector, is the candidate vector, is the dimension number of the vector, are the position values of the query and candidate vectors in the th dimension, respectively, represents the Euclidean distance between the query vector and the candidate vector; Cosine similarity formula: Wherein: is the dot product of the query vector and the candidate vector, and are the lengths of the query and candidate vectors, respectively; In this stage, the full-precision version of the candidate vector is loaded, and then the accurate calculation is performed using the above formula to replace the rough-precision estimation result in the preliminary retrieval; Or calculate the residual vector between the query vector and the candidate vector, and reorder based on the norm of the residual vector: the index uses product quantization (PQ), and the vector is approximated by its corresponding cluster center , and The difference between the two is the residual vector ; After the preliminary retrieval obtains the candidate set, the refinement pipeline performs: calculate the query residual: obtain the cluster center of the query vector , and calculate the query residual ; Load the residual of the candidate vector: batch load the residual vector of each vector in the preliminary candidate set from the persistent storage (the residual vector has low dimension, and the loading overhead is much smaller than the original vector); Residual distance reordering: calculate the accurate distance (such as Euclidean distance) between the query residual and the residual of each candidate vector, and use it as the final sorting basis, as follows:

[0034] In this way, more accurate reordering than the preliminary search can be achieved at a lower cost without loading the complete vector.

[0035] Through the synergistic work of the above steps, highly intelligent and personalized services can be provided for each vector search request under a complex separated memory architecture, and finally the optimal balance of performance, delay and cost is achieved.

[0036] Please refer to the attached Figure 2 A vector approximate search system based on a graph neural network memory architecture is used to implement a vector approximate search method based on a graph neural network memory architecture, comprising: a request processing module: for receiving a query request from a client in a separated memory architecture comprising a cache layer, a main memory layer and a persistent storage layer, and extracting a query vector and associated business metadata from the request; The tolerance prediction module is used to construct and access a historical query-hit vector association graph based on historical search data, and input the current query vector features and the neighborhood information extracted from the association graph into a lightweight graph neural network model to infer and output the approximate search tolerance level of the query; The strategy generation module is used to adaptively generate a search strategy that can cooperatively schedule memory level access and vector scan calculation granularity according to the approximate search tolerance level; The preliminary search execution module is used to execute the search strategy to obtain a preliminary vector candidate set under the separated memory architecture; The asynchronous refinement and return module is used to immediately return the vector candidate set to the client through an asynchronous mechanism, while starting a progressive refinement operation on the vector candidate set in the background, and pushing the new results generated by the refinement in real time.

[0037] The system can be deployed on a typical separated memory architecture, and the overall architecture includes computing nodes and memory nodes interconnected by remote direct memory access technology (RDMA); the computing nodes are configured with high-performance multi-core CPUs, small-scale caches and small-scale main memories; the memory nodes are configured with large-scale main memories and large-scale persistent storage (such as SSD).

[0038] Embodiment 1 The present application proposes a vector approximate search method based on a graph neural network memory architecture, which is used to verify the effectiveness of the method in practical application, especially the comprehensive performance advantages in search accuracy, response delay and system resource consumption.

[0039] Experimental environment and configuration 1. Hardware platform A typical separated memory architecture cluster is built, and the specific configuration is as follows: Computing nodes: 2 Intel Xeon Gold 6248R CPUs, 512 GB DDR4 memory.

[0040] Memory nodes: 4 nodes in total, each equipped with 1 TB DRAM as the main memory layer and 4 TB NVMe SSD as the persistent storage layer.

[0041] Network interconnection: High-speed interconnection between computing nodes and memory nodes through 100 Gbps RDMA network.

[0042] Cache: Make full use of CPU multi-level cache (L1 / L2 / L3) as the system cache layer.

[0043] 2. Software and dataset Operating system: Ubuntu 20.04 LTS.

[0044] Vector dataset: Use the widely used SIFT1M benchmark dataset, which contains 1 million 128-dimensional vectors.

[0045] Query log: To simulate real business scenarios, a history query log containing 100,000 records is synthesized, each record containing query vector, user click behavior, and business scenario label (such as "real-time recommendation", "image retrieval", etc.).

[0046] 3. Comparison methods: Comparison method 1 (traditional HNSW): Load the full HNSW graph index into local DRAM for retrieval.

[0047] Comparison method 2 (PQ quantization retrieval): Static index retrieval method based on product quantization.

[0048] Comparison method 3 (cache priority): Fixed priority coarse-grained retrieval strategy from cache.

[0049] 4. Implementation process of the method of the present application System initialization and graph construction: Based on the synthesized 100,000 historical query logs, a historical query-hit vector association graph is constructed; the graph contains about 50,000 query nodes and 1 million vector data nodes, and the edge weight is dynamically calculated according to the number of clicks and click rate.

[0050] Training and deployment of lightweight GNN model: Use a two-layer GraphSAGE model as the core of the lightweight GNN, with a hidden layer dimension of 64; In the initial stage, use 70% of the historical data to train the model, and the remaining 30% for verification, and the model output is 4 levels of approximate retrieval tolerance. After the system goes online, the online incremental learning mechanism is started, and the model parameters are continuously optimized according to the real-time feedback of users.

[0051] Adaptive retrieval and refinement process: For each incoming query request, the system performs the following steps: Tolerance prediction: The GNN model predicts the tolerance level (Level-1 to Level-4) based on the current query features and their neighborhood information in the graph; Strategy generation and execution: Generate adaptive strategies according to the predicted level; for example, Level-1 queries will trigger the cache retrieval path, while Level-4 queries will guide the accurate comparison of SSD persistent storage; Asynchronous refinement: The preliminary candidate set is immediately returned to the client, and the progressive refinement process (such as reordering based on residual vectors) is started in the background, and the better results are pushed in real time.

[0052] 5. Experimental results and analysis To comprehensively evaluate the performance of the invention, quantitative comparison is made from three dimensions of prediction accuracy, retrieval efficiency and resource consumption.

[0053] (1) Tolerance prediction accuracy The following Table 1 shows the prediction performance of the lightweight GNN model for different tolerance levels: Table 1: Prediction performance table of lightweight GNN model

[0054] Result analysis: The average prediction accuracy of the model for each level reaches 89.3%, indicating that it can effectively perceive query characteristics and provide a reliable basis for subsequent adaptive strategy generation.

[0055] (2) Retrieval performance comparison (Top@100) The following Table 2 compares the performance of each method in terms of recall rate, average delay and memory occupation: Table 2: Comparison table of prediction performance of each method

[0056] Result analysis: The method of the invention is close to the optimal traditional HNSW method in recall rate (only 0.7 percentage points lower), but the average delay is significantly reduced by 66.4%, and the memory occupation is much lower than the traditional HNSW, reflecting its excellent balance ability in precision, delay and resource efficiency.

[0057] (3) Effect of progressive refinement mechanism The average recall rate in the preliminary retrieval stage is 89.2%, and the first result return delay is controlled within 3ms.

[0058] After the background asynchronous refinement, the final recall rate is increased to 97.8%, and the average time consumption of the refinement process is about 20 ms, which is not perceived by the user.

[0059] Result analysis: The mechanism successfully realizes the unification of "fast preliminary response" and "high-precision final result", and significantly optimizes the user experience.

[0060] 6. Experimental conclusion This embodiment fully shows through system verification on the above real hardware environment and standard data set that: The present application can accurately predict the query tolerance through a lightweight graph neural network, and adaptively schedule the multi-level storage and computing resources in the separated memory architecture according to the above, combined with the asynchronous progressive refinement mechanism, can greatly reduce the response delay (average 5.1 ms) and memory resource consumption (2.8 GB) while ensuring high retrieval accuracy (recall rate 97.8%), and the comprehensive performance is significantly better than the existing mainstream method, effectively solving the technical problem that performance, delay and resource cost are difficult to balance in large-scale vector retrieval scenarios.

[0061] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects: intelligentization and self-adaptation of retrieval strategy: by constructing a historical query-hit vector association graph and using a graph neural network to accurately predict the approximate tolerance of each query, the traditional method of "one-size-fits-all" static retrieval mode is changed; the optimal retrieval strategy can be customized for each query request, thereby realizing the optimal allocation of resources in diversified business scenarios.

[0062] Deeply fit the separated memory architecture and improve resource efficiency: the proposed adaptive strategy can cooperatively schedule the access of different levels of memory (cache, main memory, persistent storage) and computing tasks of different granularities. This perception and adaptation ability to the underlying hardware can maximize the advantages of the separated memory architecture, significantly reduce the occupation of expensive memory resources and data I / O overhead while ensuring performance, and effectively reduce the total cost of ownership of the system.

[0063] Consider low delay and high accuracy to optimize user experience: the asynchronous return and progressive refinement mechanism adopted ensures that users can obtain usable preliminary results in the first time, greatly reducing the perceived delay; at the same time, the continuous refinement operation in the background guarantees the high recall rate and high accuracy of the final result, realizes the unification of "fast" and "accurate", and significantly improves the stability and user experience of online retrieval service.

[0064] Those skilled in the art should understand that the above discussion of any embodiment is merely exemplary in nature and is not intended to imply that the present application is limited to these examples; any of the above embodiments or technical features between different embodiments can be combined, and steps can be implemented in any order, and there are many other changes to the different aspects of the present application as described above, which are not provided in detail for the sake of brevity.

[0065] The present application is intended to cover all such alternatives, modifications, and variations as fall within the broad scope of the disclosure. Accordingly, any and all such modifications, variations, and equivalents that fall within the spirit and scope of the present application are intended to be included within the scope of the present application.

Claims

1. A method for approximate search of graph neural network based in-memory architecture vectors, characterized in that, Comprise: S1: receiving and analyzing client requests: in a separate memory architecture including cache layer, main memory layer and persistent storage layer, receiving query requests from clients and extracting query vectors and associated business metadata from the query requests; S2: association modeling and tolerance prediction: based on historical retrieval data, a historical query-hit vector association graph is constructed and maintained, and the current query vector features and the neighborhood information extracted from the association graph are jointly input into a lightweight graph neural network model to infer and output the approximate retrieval tolerance level of the query; S3: adaptive retrieval strategy generation: according to the approximate retrieval tolerance level, an adaptive retrieval strategy is generated, which can coordinate the scheduling of memory level access and vector scanning calculation granularity; S4: preliminary retrieval execution: under the separate memory architecture, the retrieval strategy is executed to obtain a preliminary vector candidate set; S5: asynchronous retrieval and progressive refinement: the vector candidate set is immediately returned to the client through the asynchronous return mechanism; at the same time, the progressive refinement operation is started on the vector candidate set in the background, and when the refinement operation produces higher ranked or more relevant results, the updated results are pushed to the client in real time.

2. The method of claim 1, wherein the method is a graph neural network based in-memory architecture vector approximate search method. S2 specifically comprises: S21: construction and maintenance of historical query-hit vector association graph; S22: structure and calculation logic of lightweight graph neural network; S23: online incremental learning.

3. The method of claim 2, wherein the method is a graph neural network based in-memory architecture vector approximate search method. In S21, the construction of the historical query-hit vector association graph specifically comprises: defining the nodes in the graph as historical query nodes representing past queries and vector data nodes representing database vectors; and according to the historical retrieval log, a weighted edge is established between the corresponding nodes when the preset "hit" condition is met.

4. The method of claim 2, wherein the method is a graph neural network-based in-memory architecture vector approximate search method. In S23, online incremental learning specifically comprises: the parameters of the lightweight graph neural network model are updated through online incremental learning: after each retrieval task is completed, the features of this query, the final adopted retrieval strategy and the subsequent behavior feedback representing user satisfaction are jointly used to form new training samples to iteratively optimize the lightweight graph neural network model.

5. The method of claim 1, wherein the method is a graph neural network based in-memory architecture vector approximate search method. In S3, the adaptive generation of the retrieval strategy specifically comprises: if the approximate retrieval tolerance is high, a strategy of preferentially accessing the cache layer and using coarse-grained vector scanning is generated; if the approximate retrieval tolerance is low, a strategy of loading refined index from the persistent storage layer and performing comprehensive vector comparison is generated.

6. The method of claim 1, wherein the method is a graph neural network based in-memory architecture vector approximate search method. S4 specifically comprises: analyzing and executing the approximate retrieval strategy generated in step S3, according to the retrieval strategy, distributing retrieval sub-tasks to different hardware layers in the separate memory architecture, and collecting the returned preliminary results to form a preliminary vector candidate set.

7. The method of claim 1, wherein the method is based on a graph neural network-based memory architecture vector approximate retrieval method. In S5, the progressive refinement operation specifically comprises at least one of the following: performing secondary accurate distance calculation on the vectors in the vector candidate set based on the inverted file index; or calculating the residual vector between the query vector and the candidate vector, and reordering based on the norm of the residual vector.

8. The method of claim 7, wherein the method is a graph neural network-based in-memory architecture vector approximate search method. The process of performing a second precise distance calculation on the vectors within the candidate vector set based on the inverted file index specifically includes: recalculating the true Euclidean distance or cosine similarity between the query vector and the full-precision candidate vectors; Euclidean distance formula: ,in: It is a query vector. It is a candidate vector. It is the number of dimensions of the vector. These are the query and candidate vectors at the th... Dimensional position value, The cosine similarity formula represents the Euclidean distance between the query vector and the candidate vectors. ,in: It is the dot product of the query vector and the candidate vectors. and These are the magnitudes of the query and candidate vectors, respectively.

9. The method of claim 8, wherein the method is a graph neural network-based in-memory architecture vector approximate search method. The residual vector between the calculated query vector and the candidate vector, and the reordering based on the norm of the residual vector, specifically includes: the index adopts product quantization, the vector is approximated by the cluster center to which it belongs , The difference between the and the cluster center is the residual vector ; After the initial search yields a candidate set, a refinement pipeline executes: compute residuals for the query: get query vector The cluster centers to which the query belongs Compute query residuals ; Loading residuals of candidate vectors: loading residuals of each vector in the preliminary candidate set in bulk from persistent storage ;​ Residual distance reordering: calculate the exact distance between the query residual and each candidate vector residual, and use it as the final sorting basis, as follows: 。 10. A graph neural network based in-memory architecture vector approximate search system, characterized in that, The method for implementing the memory architecture vector approximate retrieval based on the graph neural network according to any one of claims 1-9 comprises: a request processing module, configured to receive a query request from a client in a separate memory architecture comprising a cache layer, a main memory layer and a persistent storage layer, and extract a query vector and associated business metadata from the request; A tolerance prediction module is configured to construct and access a historical query-hit vector association graph based on historical retrieval data, and input the current query vector features and the neighborhood information extracted from the association graph into a lightweight graph neural network model to infer and output the approximate retrieval tolerance level of the query; A strategy generation module is configured to adaptively generate a retrieval strategy that can coordinate the access of the memory hierarchy and the granularity of vector scanning calculation according to the approximate retrieval tolerance level; A preliminary retrieval execution module is configured to execute the retrieval strategy in the separate memory architecture to obtain a preliminary vector candidate set; An asynchronous refinement and return module is configured to immediately return the vector candidate set to the client through an asynchronous mechanism, while starting a progressive refinement operation on the vector candidate set in the background and pushing the new results generated by the refinement in real time.

Citation Information

Cited By

  • Heterogeneous data incremental retrieval index updating method and system

    CN122086983A

  • A method and system for incremental retrieval and index updating of heterogeneous data

    CN122086983B