Information retrieval method, device, equipment and computer-readable storage medium

By vectorizing the search text data and building a hierarchical index structure, the problem of not being able to fully utilize the parallel computing power of image processing units in the information retrieval method is solved, and performance and efficiency are improved.

CN120386832BActive Publication Date: 2025-09-02INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510874242.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-27
Publication Date
2025-09-02
Estimated Expiration
2045-06-27

AI Technical Summary

Technical Problem

In the prior art, the information retrieval method cannot fully utilize the parallel computing power of the image processing unit, resulting in limited performance improvement.

Method used

By vectorizing the text data to be retrieved, a hierarchical index structure is constructed, and parallel information is searched layer by layer in the graphics processing unit, and adjacent tables are retrieved using a preset number of similar vector nodes to adapt to the parallel computing architecture of the graphics processing unit.

Benefits of technology

It improves the efficiency of information retrieval, makes full use of the parallel processing capabilities of the graphics processing unit, and improves performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120386832B_ABST
    Figure CN120386832B_ABST
Patent Text Reader

Abstract

The present application discloses an information retrieval method, apparatus, device and computer-readable storage medium, which relate to the technical field of natural language processing. The method includes, after receiving text data to be retrieved, performing vectorization processing on the text data to be retrieved, thereby greatly reducing storage space and computing overhead, pre-building a hierarchical index structure, and setting the adjacency list corresponding to each vector node in the hierarchical index structure to contain a fixed preset number of similar vectors, adapting to the parallel computing architecture of a graphics processing unit, facilitating the graphics processing unit to perform parallel information retrieval, and accelerating the information retrieval process by transitioning from rough information retrieval at a coarse-grained index end to fine information search layer by layer, solving the technical problem of not being able to fully utilize the parallel computing capability of the graphics processing unit, and achieving the technical effect of fully utilizing the parallel processing capability of the graphics processing unit, greatly improving performance, and improving information retrieval efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of natural language processing technology, and in particular to an information retrieval method, apparatus, device, and computer-readable storage medium. Background Art

[0002] With the continuous advancement of artificial intelligence and natural language processing technologies, retrieval-augmented generation (RAG) systems have been widely used in various generation tasks.

[0003] Currently, commonly used information retrieval methods primarily rely on searching for shorter paths. Neighbor node selection and traversal rely on a dynamic graph structure, making them unsuitable for the single instruction, multiple data (SIMD) parallel architecture of graphics processing units (GPUs). This inability to fully utilize the parallel computing capabilities of GPUs results in limited performance improvements. Summary of the Invention

[0004] The present application provides an information retrieval method, apparatus, device and computer-readable storage medium to at least solve the problem in the related art that the parallel computing capability of the image processing unit cannot be fully utilized, resulting in limited performance improvement.

[0005] This application provides an information retrieval method, including:

[0006] Perform vectorization processing on the received text data to be retrieved to obtain the target query vector;

[0007] Retrieving the target query vector using a first-level index of a coarse-grained index end in a pre-built hierarchical index structure to obtain a first adjacency list containing a preset number of candidate vector nodes;

[0008] According to the arrangement order of each index layer in the hierarchical index structure, information is searched in parallel layer by layer starting from the first adjacency table to obtain a target search result.

[0009] This application also provides an information retrieval device, comprising:

[0010] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any one of the above-mentioned information retrieval methods when executing the computer program.

[0011] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned information retrieval methods are implemented.

[0012] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above-mentioned information retrieval methods when executed by a processor.

[0013] Through the present application, after receiving the text data to be retrieved, the storage space and computing overhead are greatly reduced by vectorizing the text data to be retrieved, a hierarchical index structure is pre-built, and the adjacency list corresponding to each vector node in the hierarchical index structure is set to contain a fixed preset number of similar vectors, which is adapted to the parallel computing architecture of the graphics processing unit, thereby facilitating the graphics processing unit to perform parallel information retrieval, and accelerating the information retrieval process by transitioning from rough information retrieval at the coarse-grained index end to fine information search layer by layer. Therefore, the technical problem of not being able to fully utilize the parallel computing capabilities of the image processing unit, resulting in limited performance improvement, can be solved, and the technical effect of fully utilizing the parallel processing capabilities of the graphics processing unit, greatly improving performance, and improving information retrieval efficiency is achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0015] Figure 1 A flowchart of an implementation of an information retrieval method provided in an embodiment of the present application;

[0016] Figure 2 A flowchart of another information retrieval method according to an embodiment of the present application;

[0017] Figure 3 This is a structural block diagram of an information retrieval device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0018] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0019] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.

[0020] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0021] In conjunction with the specific application environment architecture or specific hardware architecture on which the execution of the information retrieval method depends, the specific application environment architecture or specific hardware architecture is described herein.

[0022] The embodiments of the present application provide an information retrieval method, and the method is described in detail in conjunction with the execution process of the information retrieval method.

[0023] See also Figure 1 , Figure 1 This is a flowchart of an implementation of an information retrieval method provided in an embodiment of the present application. The method may include the following steps.

[0024] S101: Perform vectorization processing on the received text data to be retrieved to obtain a target query vector.

[0025] After receiving the text data to be retrieved, since the text data to be retrieved is in text format, it occupies a large storage space and has a high computational overhead. Therefore, the received text data to be retrieved is vectorized to obtain a target query vector, thereby greatly reducing the storage space and computational overhead.

[0026] S102: Searching the target query vector using the first-level index of the coarse-grained index end in the pre-built hierarchical index structure to obtain a first adjacency list containing a preset number of candidate vector nodes.

[0027] A hierarchical index structure is pre-built, with each index layer sorted by coarse and fine granularity. Each index layer corresponds to a different granularity. For example, the top index can be set to provide fast, rough searches, while the bottom index can provide fine searches. The adjacency list corresponding to each vector node in the hierarchical index structure is set to contain a fixed, preset number of similar vector nodes. For example, based on the similarity or distance between vector nodes, an approximate algorithm is used to select the most relevant vector nodes as neighbors to construct an efficient adjacency list. After vectorizing the text data to be retrieved to obtain the target query vector, the target query vector is retrieved using the first-level index at the coarse-grained index end of the pre-built hierarchical index structure, resulting in a first adjacency list containing a preset number of candidate vector nodes, thereby obtaining a preset number of coarse-grained candidate vector nodes.

[0028] It should be noted that the preset number can be set and adjusted according to actual conditions, and the embodiment of the present application does not limit this. For example, it can be set to 5.

[0029] S103: performing parallel information search layer by layer starting from the first adjacency table according to the arrangement order of each index layer in the hierarchical index structure to obtain a target search result.

[0030] After obtaining a first adjacency list containing a preset number of candidate vector nodes, information is retrieved layer by layer in parallel, starting from the first adjacency list according to the order of the index layers in the hierarchical index structure, to obtain the target search results. For example, the GPU's warp structure can be used to perform parallel computations on multiple candidate vector nodes for a single search task, accelerating similarity calculations and enabling batch queries, fully utilizing the GPU's computing power. The Compute Unified Device Architecture (CUDA) programming model can also be used to distribute multiple computational tasks during the search process across multiple threads, enabling parallel execution of multiple search tasks.

[0031] Through the present application, after receiving the text data to be retrieved, the storage space and computing overhead are greatly reduced by vectorizing the text data to be retrieved, a hierarchical index structure is pre-built, and the adjacency list corresponding to each vector node in the hierarchical index structure is set to contain a fixed preset number of similar vectors, which is adapted to the parallel computing architecture of the graphics processing unit, thereby facilitating the graphics processing unit to perform parallel information retrieval, and accelerating the information retrieval process by transitioning from rough information retrieval at the coarse-grained index end to fine information search layer by layer. Therefore, the technical problem of not being able to fully utilize the parallel computing capabilities of the image processing unit, resulting in limited performance improvement, can be solved, and the technical effect of fully utilizing the parallel processing capabilities of the graphics processing unit, greatly improving performance, and improving information retrieval efficiency is achieved.

[0032] See also Figure 2 , Figure 2 This is a flowchart of another information retrieval method provided in an embodiment of the present application. The method may include the following steps.

[0033] S201: Use a pre-trained language model to convert the text data to be retrieved into an initial query vector.

[0034] A language model for converting text data into vectors can be pre-trained, and the pre-trained language model can be used to convert the text data to be retrieved into an initial query vector. The initial query vector is generally a vector with a relatively high dimensionality.

[0035] The pre-trained language model can be BERT (Bidirectional Encoder Representations from Transformers), GPT (Generative Pre-trained Transformer), etc.

[0036] Before converting the text data to be retrieved into the initial query vector, the text data to be retrieved can also be subjected to preprocessing operations such as text cleaning, word segmentation, stop word removal, and word form restoration to improve the text quality.

[0037] S202: Perform dimensionality reduction processing on the initial query vector to obtain a target query vector.

[0038] After converting the text data to be retrieved into an initial query vector, dimensionality reduction is performed on the initial query vector. Principal Component Analysis (PCA) or random projection methods are used to reduce the high-dimensional initial query vector to a lower dimension, resulting in the target query vector. This dimensionality reduction process compresses the high-dimensional vector, reducing video memory usage, computational and storage overhead, and improving retrieval efficiency.

[0039] After performing dimensionality reduction on the initial query vector to obtain the target query vector, vector compression can also be performed on the target query vector. For example, the target query vector represented by floating-point numbers can be converted to half-precision floating-point numbers (FP16), thereby reducing the storage space of the vector and thus reducing the memory usage.

[0040] You can also use the Product Quantization (PQ) method to split the target query vector into multiple sub-vectors, cluster each sub-vector, and replace the original sub-vector with the index of the cluster center to achieve efficient compression.

[0041] Vector quantization and compression may affect retrieval accuracy. In practical applications, it is necessary to adjust the quantization parameters according to specific needs, and balance the compression rate and retrieval accuracy.

[0042] When video memory is insufficient, video memory paging technology can be used to temporarily store some data in high-speed storage media such as solid state drives (SSDs) and quickly load them when needed.

[0043] S203: Searching the target query vector using the first-level index of the coarse-grained index end in the pre-built hierarchical index structure to obtain a first adjacency list containing a preset number of candidate vector nodes.

[0044] S204: performing parallel information retrieval layer by layer starting from the first adjacency table according to the arrangement order of the index layers in the hierarchical index structure, and obtaining second adjacency tables corresponding to the index layers other than the first index layer in the hierarchical index structure.

[0045] Each second adjacency list includes a preset number of candidate vector nodes.

[0046] After obtaining a first adjacency list containing a preset number of candidate vector nodes, the system then performs a parallel search, starting with the first adjacency list and following the order of the index levels in the hierarchical index structure. This process results in a second adjacency list corresponding to each index level except the first. This process accelerates the information retrieval process by gradually transitioning from a coarse-grained index search to a more refined search.

[0047] S205: Determine the first-level index at the coarse-grained index end in the layered index structure as the top-level index.

[0048] The index layers in the hierarchical index structure are arranged according to coarse and fine granularity, and the first layer index at the coarse-grained index end in the hierarchical index structure is determined as the top-level index.

[0049] S206: Obtain a second adjacency list corresponding to the bottom-level index in the retrieved hierarchical index structure.

[0050] The index layers in the hierarchical index structure are arranged according to coarse and fine granularity, with the top layer being the coarse-grained index end and the bottom layer being the fine-grained index end. The second adjacency list corresponding to the bottom-level index in the retrieved hierarchical index structure is obtained. The second adjacency list corresponding to the retrieved bottom-level index also contains a preset number of candidate vector nodes.

[0051] S207: Calculate the similarity between each candidate vector node in the second adjacency table corresponding to the bottom-level index and the target query vector, and sort the calculated similarities.

[0052] After obtaining the second adjacency list corresponding to the bottom-level index in the retrieved hierarchical index structure, the similarity between each candidate vector node in the second adjacency list corresponding to the bottom-level index and the target query vector is calculated respectively, and the calculated similarities are sorted by size. For example, the candidate vector nodes can be sorted in descending order of similarity, or the candidate vector nodes can be sorted in ascending order of similarity.

[0053] S208: Determine the candidate vector node corresponding to the largest similarity in the sorted results obtained by sorting the similarities as the target retrieval result.

[0054] After sorting the calculated similarities, the candidate vector node with the highest similarity in the sorted results is selected as the target retrieval result. By sorting the similarities between each candidate vector node and the target query vector and selecting the candidate vector node with the highest similarity in the sorted results as the target retrieval result, fine-grained information retrieval is achieved, improving the accuracy of the retrieved information.

[0055] S209: Combine the target retrieval result with the pre-trained generation model to generate a target response result.

[0056] A generative model is pre-trained for information retrieval. After the candidate vector node with the highest similarity among the sorted similarity results is identified as the target retrieval result, the target retrieval result is combined with the pre-trained generative model to generate the target response result. By combining the target retrieval result with the pre-trained generative model, the generative model is provided with rich context, enabling the generation of high-quality responses or content, improving the relevance and accuracy of the generated content.

[0057] The generated model can also be fine-tuned or optimized to better utilize the retrieved information and generate high-quality content. The generated model can also be compressed and pruned to reduce the number of model parameters and lower video memory usage. Model parameters can also be loaded in segments as needed during the generation process, avoiding the need to load the entire model all at once and reducing video memory pressure.

[0058] The target retrieval result and the generative model may be combined by input fusion, where the target retrieval result is used as the input of the generative model and directly embedded into the input layer of the generative model. For example, the target retrieval result is spliced ​​behind the target query vector as the input of the generative model. It can also include combining by feature fusion, where the target retrieval result is converted into a feature vector and fused with the internal features of the generative model. For example, the target retrieval result is encoded as a vector and then added or spliced ​​with the hidden layer features of the generative model. In addition, the target retrieval result and the generative model can be combined by conditional generation, multimodal fusion, etc., which is not limited in the embodiments of the present application.

[0059] The embodiments of the present application solve the problems of high video memory usage, slow index access speed, and inability to meet the efficient retrieval requirements of the Retrieval-Augmented Generation (RAG) system for large-scale knowledge bases in a GPU environment. They optimize video memory usage, improve index access speed, and meet the real-time and large-scale data processing requirements of the RAG system.

[0060] The RAG system places high demands on the real-time and relevance of indexes. The hierarchical index structure should support dynamic updates to facilitate the timely addition of new knowledge to the system and keep the knowledge base up to date.

[0061] You can also set task scheduling policies to rationally allocate computing resources based on the urgency and importance of search requests, ensuring timely responses to high-priority tasks. In multi-GPU or multi-node environments, tasks can be evenly distributed to avoid excessive concentration or idle resources, improving overall system efficiency. You can also monitor system resource usage, including GPU memory, internal memory, and computing load, and dynamically adjust resource allocation. You can also leverage historical data and current status to predict resource usage trends, enabling proactive resource scheduling or expansion to prevent system overload.

[0062] In a specific embodiment of the present application, the method may further include the following steps:

[0063] Step 1: Obtain the access frequency corresponding to each vector node in the hierarchical index structure;

[0064] Step 2: Divide each vector node into a hot node set and a cold node set according to the access frequency;

[0065] Step 3: Storing the hot node set in the graphics processing unit memory, and storing the cold node set in a storage medium other than the graphics processing unit memory.

[0066] For the convenience of description, the above three steps can be combined for explanation.

[0067] The information retrieval method provided in the embodiments of the present application can also obtain the access frequency corresponding to each vector node in the hierarchical index structure, divide each vector node into a hot node set and a cold node set based on the access frequency, store the hot node set in the graphics processing unit memory, and store the cold node set in a storage medium other than the graphics processing unit memory. By storing frequently accessed data in the GPU memory and less frequently accessed data in other storage media (such as host memory) based on the data access frequency, hierarchical data storage is achieved, memory utilization is improved, and information retrieval efficiency is thereby improved.

[0068] In a specific embodiment of the present application, after storing the hot node set in the graphics processing unit memory and storing the cold node set in a storage medium other than the graphics processing unit, the method may further include the following steps:

[0069] Step 1: Update the hot node set and the cold node set according to the access frequency corresponding to each vector node in the dynamically collected hierarchical index structure to obtain the update result;

[0070] Step 2: Migrate and adjust each vector node in the graphics processing unit memory and other storage media according to the update result.

[0071] For the convenience of description, the above two steps can be combined for explanation.

[0072] After storing the hot node set in the GPU memory and the cold node set in a storage medium other than the GPU, the hot and cold node sets are updated based on the dynamically collected access frequencies corresponding to each vector node in the hierarchical index structure. Updated results are then obtained, and the vector nodes in the GPU memory and other storage media are migrated and adjusted based on the updated results. By updating the hot and cold node sets based on the access frequencies corresponding to each vector node, required data can be dynamically loaded from other storage media into the GPU memory, or idle data can be unloaded from the GPU memory to other storage media, depending on the system's real-time load and query requirements. This optimizes memory usage, reduces GPU memory pressure, further improves memory utilization, and enhances information retrieval efficiency. The data transmission path between the GPU and the Central Processing Unit (CPU) is optimized, reducing data transmission bottlenecks.

[0073] In a specific embodiment of the present application, migrating and adjusting each vector node in the graphics processing unit memory and other storage media according to the update result may include the following steps:

[0074] The asynchronous data copy mechanism of the unified computing device architecture is used to migrate and adjust each vector node in the graphics processing unit video memory and other storage media according to the update result.

[0075] When migrating and adjusting vector nodes in the GPU's memory and other storage media, the UCA's asynchronous data copy mechanism is used to migrate and adjust the vector nodes based on the update results. This allows for the overlap of data transfer and computation, reducing the impact of data transfer on computation.

[0076] It can also prefetch potentially needed data in advance based on query predictions and access patterns, reducing data loading latency.

[0077] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.

[0078] An embodiment of the present application also provides an information retrieval device.

[0079] See also Figure 3 , Figure 3 This is a structural block diagram of an information retrieval device provided in an embodiment of the present application. The device may include:

[0080] A target query vector obtaining module 31 is used to perform vectorization processing on the received text data to be retrieved to obtain a target query vector;

[0081] An adjacency list obtaining module 32 is configured to retrieve the target query vector using the first-level index of the coarse-grained index end in the pre-built hierarchical index structure to obtain a first adjacency list containing a preset number of candidate vector nodes;

[0082] The search result obtaining module 33 is used to perform parallel information search layer by layer starting from the first adjacency table according to the arrangement order of each index layer in the hierarchical index structure to obtain the target search result.

[0083] Through the present application, after receiving the text data to be retrieved, the storage space and computing overhead are greatly reduced by vectorizing the text data to be retrieved, a hierarchical index structure is pre-built, and the adjacency list corresponding to each vector node in the hierarchical index structure is set to contain a fixed preset number of similar vectors, which is adapted to the parallel computing architecture of the graphics processing unit, thereby facilitating the graphics processing unit to perform parallel information retrieval, and accelerating the information retrieval process by transitioning from rough information retrieval at the coarse-grained index end to fine information search layer by layer. Therefore, the technical problem of not being able to fully utilize the parallel computing capabilities of the image processing unit, resulting in limited performance improvement, can be solved, and the technical effect of fully utilizing the parallel processing capabilities of the graphics processing unit, greatly improving performance, and improving information retrieval efficiency is achieved.

[0084] In a specific embodiment of the present application, the device may further include:

[0085] An access frequency acquisition module is used to obtain the access frequency corresponding to each vector node in the hierarchical index structure;

[0086] A hot and cold node set partitioning module is used to partition each vector node into a hot node set and a cold node set according to each access frequency;

[0087] The node set storage module is used to store the hot node set in the graphics processing unit memory and store the cold node set in other storage media except the graphics processing unit memory.

[0088] In a specific embodiment of the present application, the device may further include:

[0089] An update result acquisition module is used to update the hot node set and the cold node set according to the access frequency corresponding to each vector node in the hierarchical index structure collected dynamically to obtain an update result;

[0090] The vector node migration adjustment module is used to migrate and adjust each vector node in the graphics processing unit memory and other storage media according to the update result.

[0091] In a specific embodiment of the present application, the vector node migration adjustment module is a module that uses the asynchronous data copy mechanism of the unified computing device architecture to migrate and adjust each vector node in the graphics processing unit memory and other storage media according to the update result.

[0092] In a specific embodiment of the present application, the target query vector obtaining module 31 may include:

[0093] The initial query vector acquisition submodule is used to convert the text data to be retrieved into the initial query vector using the pre-trained language model;

[0094] The target query vector acquisition submodule is used to perform dimensionality reduction processing on the initial query vector to obtain the target query vector.

[0095] In a specific embodiment of the present application, the device may further include:

[0096] The response result generation module is used to combine the target retrieval result with the pre-trained generation model to generate the target response result after obtaining the target retrieval result.

[0097] In a specific embodiment of the present application, the search result obtaining module 33 may include:

[0098] A second adjacency list obtaining submodule is configured to perform parallel information retrieval layer by layer starting from the first adjacency table according to the arrangement order of each index layer in the hierarchical index structure, to obtain a second adjacency table corresponding to each index layer in the hierarchical index structure except the first index layer; wherein each second adjacency table contains a preset number of candidate vector nodes;

[0099] A top-level index determination submodule, configured to determine the first-level index at the coarse-grained index end in the hierarchical index structure as the top-level index;

[0100] A second adjacency list acquisition submodule is used to acquire a second adjacency list corresponding to the bottom index in the retrieved hierarchical index structure;

[0101] The similarity ranking submodule is used to calculate the similarity between each candidate vector node in the second adjacency table corresponding to the underlying index and the target query vector, and to sort the calculated similarities;

[0102] The retrieval result determination submodule is used to determine the candidate vector node corresponding to the largest similarity in the sorted results obtained by sorting the similarities as the target retrieval result.

[0103] For the description of the features in the embodiment corresponding to the information retrieval device, reference can be made to the relevant description of the embodiment corresponding to the information retrieval method, which will not be repeated here.

[0104] An embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above-mentioned information retrieval method embodiments.

[0105] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any of the above-mentioned information retrieval method embodiments when run.

[0106] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0107] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above-mentioned information retrieval method embodiments are implemented.

[0108] An embodiment of the present application further provides another computer program product, comprising a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above-mentioned information retrieval method embodiments are implemented.

[0109] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0110] The above is a detailed introduction to the information retrieval method, device, equipment and computer-readable storage medium provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only intended to help understand the method and core ideas of the present application. It should be noted that for those skilled in the art, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the present application.

Claims

1. An information retrieval method, characterized in that: include: Perform vectorization processing on the received text data to be retrieved to obtain the target query vector; Retrieving the target query vector using the first-level index at the coarse-grained index end of a pre-built hierarchical index structure in which each index level is sorted according to coarse and fine granularity, and obtaining a first adjacency list containing a preset number of candidate vector nodes; Starting from the first adjacency table, parallel information search is performed layer by layer according to the arrangement order of each index layer in the hierarchical index structure to obtain second adjacency tables corresponding to each index layer in the hierarchical index structure except the first index layer; wherein each second adjacency table contains the preset number of candidate vector nodes; Determine the first layer index at the coarse-grained index end in the hierarchical index structure as the top layer index; Obtaining a second adjacency list corresponding to the bottom-level index in the retrieved hierarchical index structure; Calculating the similarity between each candidate vector node in the second adjacency table corresponding to the bottom-level index and the target query vector, and sorting the calculated similarities; The candidate vector node corresponding to the largest similarity in the sorted results obtained by sorting the similarities is determined as the target retrieval result.

2. The information retrieval method according to claim 1, wherein: Also includes: Obtaining the access frequency corresponding to each vector node in the hierarchical index structure; Divide each vector node into a hot node set and a cold node set according to each access frequency; The hot node set is stored in a graphics processing unit memory, and the cold node set is stored in a storage medium other than the graphics processing unit memory.

3. The information retrieval method according to claim 2, wherein: After storing the hot node set in the graphics processing unit memory and storing the cold node set in a storage medium other than the graphics processing unit memory, the method further includes: The hot node set and the cold node set are updated according to the dynamically collected access frequencies corresponding to the respective vector nodes in the hierarchical index structure to obtain an update result; Each vector node in the graphics processing unit video memory and other storage media is migrated and adjusted according to the update result.

4. The information retrieval method according to claim 3, wherein: Migrating and adjusting each vector node in the graphics processing unit memory and other storage media according to the update result includes: The asynchronous data copy mechanism of the unified computing device architecture is utilized to migrate and adjust each vector node in the graphics processing unit memory and other storage media according to the update result.

5. The information retrieval method according to claim 1, wherein: Perform vectorization on the received text data to be retrieved to obtain the target query vector, including: Using a pre-trained language model to convert the text data to be retrieved into an initial query vector; Performing dimensionality reduction processing on the initial query vector to obtain the target query vector.

6. The information retrieval method according to claim 1, wherein: After obtaining the target search results, it also includes: The target retrieval result is combined with the pre-trained generation model to generate a target response result.

7. An information retrieval device, characterized in that: include: A target query vector obtaining module is used to perform vectorization processing on the received text data to be retrieved to obtain a target query vector; An adjacency list obtaining module is used to retrieve the target query vector using the first-level index at the coarse-grained index end of a pre-built hierarchical index structure in which each index level is sorted according to coarse and fine granularity, and obtain a first adjacency list containing a preset number of candidate vector nodes; The retrieval result acquisition module includes: A second adjacency list obtaining submodule is configured to perform parallel information retrieval layer by layer starting from the first adjacency table according to the arrangement order of each index layer in the hierarchical index structure, to obtain a second adjacency table corresponding to each index layer in the hierarchical index structure except the first index layer; wherein each second adjacency table contains a preset number of candidate vector nodes; A top-level index determination submodule, configured to determine the first-level index at the coarse-grained index end in the hierarchical index structure as the top-level index; A second adjacency list acquisition submodule is used to acquire a second adjacency list corresponding to the bottom index in the retrieved hierarchical index structure; The similarity ranking submodule is used to calculate the similarity between each candidate vector node in the second adjacency table corresponding to the underlying index and the target query vector, and to sort the calculated similarities; The retrieval result determination submodule is used to determine the candidate vector node corresponding to the largest similarity in the sorted results obtained by sorting the similarities as the target retrieval result.

8. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the information retrieval method according to any one of claims 1 to 6 when executing the computer program.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the information retrieval method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Cold data placement strategy based on frequency correlation under low-power-consumption clustering environment

    CN107728938A

  • Information retrieval method and device based on text extension, electronic equipment and medium

    CN117992573A