Information retrieval method and device, electronic equipment, storage medium and program product

By quantizing candidate information into vectors and storing it hierarchically in RRAM, DRAM, and SSD/HDD, the problem of low retrieval efficiency in multimodal retrieval scenarios is solved, achieving efficient and accurate information retrieval.

CN122196203APending Publication Date: 2026-06-12BEIJING ZITIAO NETWORK TECH CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING ZITIAO NETWORK TECH CO LTD
Filing Date
2026-03-06
Publication Date
2026-06-12

Smart Images

  • Figure CN122196203A_ABST
    Figure CN122196203A_ABST
Patent Text Reader

Abstract

Some cases involve retrieval technology field, information retrieval method, device, electronic equipment, storage medium and program product are disclosed, the method comprises: obtaining first information;Obtain the first feature vector of the first information and the first discrete code word of the first information;Contrast the first discrete code word and the second discrete code word, obtain the first contrast result, the second discrete code word corresponds to the second information;Filter the second information by using the first contrast result, obtain the third information;Contrast the first feature vector and the second feature vector, obtain the second contrast result, the second feature vector corresponds to the third information;Filter the third information by using the second contrast result, obtain the fourth information, the fourth information is used to represent the retrieval result of the first information. Through the implementation of the information retrieval method, the retrieval accuracy and the overall retrieval efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] In some cases, the field of retrieval technology is involved, specifically information retrieval methods, devices, electronic devices, storage media, and program products. Background Technology

[0002] In multimodal retrieval scenarios such as semantic retrieval, voice retrieval, and video retrieval, the complete vectors corresponding to the input retrieval information (text, voice, video, etc.) are typically compared one by one with the complete vectors of candidate information in the database to obtain the retrieval results. However, the above-mentioned approach of retrieving information using complete vectors suffers from low retrieval efficiency due to the large amount of data involved in the comparison. Summary of the Invention

[0003] In some cases, an information retrieval method, device, electronic device, storage medium, and program product are provided to solve the problem of low retrieval efficiency in retrieval scenarios.

[0004] In a first aspect, an information retrieval method is provided, comprising: acquiring first information; acquiring a first feature vector of the first information and a first discrete codeword of the first information; comparing the first discrete codeword with a second discrete codeword to obtain a first comparison result, wherein the second discrete codeword corresponds to the second information; filtering the second information using the first comparison result to obtain third information; comparing the first feature vector with a second feature vector to obtain a second comparison result, wherein the second feature vector corresponds to the third information; filtering the third information using the second comparison result to obtain fourth information, wherein the fourth information is used to characterize the retrieval result of the first information.

[0005] Secondly, an information retrieval device is provided, comprising: a first acquisition module for acquiring first information; a second acquisition module for acquiring a first feature vector and a first discrete codeword of the first information; a first comparison module for comparing the first discrete codeword with a second discrete codeword to obtain a first comparison result, wherein the second discrete codeword corresponds to the second information; a first filtering module for filtering the second information using the first comparison result to obtain third information; a second comparison module for comparing the first feature vector with a second feature vector to obtain a second comparison result, wherein the second feature vector corresponds to the third information; and a second filtering module for filtering the third information using the second comparison result to obtain fourth information, wherein the fourth information is used to characterize the retrieval result of the first information.

[0006] Thirdly, an electronic device is provided, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to perform the information retrieval method described in the first aspect or any corresponding embodiment thereof.

[0007] Fourthly, a computer-readable storage medium is provided, on which computer instructions are stored, for causing a computer to perform the information retrieval method described in the first aspect or any of its corresponding embodiments.

[0008] Fifthly, a computer program product is provided, including computer instructions for causing a computer to execute the information retrieval method described in the first aspect or any corresponding embodiment thereof.

[0009] In some cases, the first discrete codeword corresponding to the first information is compared with the second discrete codeword corresponding to the second information to obtain the first comparison result. Then, based on the first comparison result, the third information can be quickly filtered out from the second information, which can significantly reduce the amount of data of the second information that needs to be precisely matched. Then, the first feature vector corresponding to the first information is precisely compared with the second feature vector corresponding to the third information to obtain the second comparison result. Finally, based on the second comparison result, the fourth information can be quickly and accurately filtered out from the third information. In this way, it is not necessary to compare the feature vector of the first information with all the feature vectors of the second information, which can reduce the amount of data involved in the comparison and reduce the input and output overhead, thereby improving the retrieval accuracy and overall retrieval efficiency. Attached Figure Description

[0010] To more clearly illustrate the technical solutions in specific implementation methods or related technologies under certain circumstances, the accompanying drawings used in the description of specific implementation methods or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are some implementation methods under certain circumstances. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0011] Figure 1 These are schematic diagrams illustrating application scenarios in various situations; Figure 2 This is a flowchart illustrating the first type of information retrieval method in some situations; Figure 3 This is a second flowchart illustrating information retrieval methods in other situations; Figure 4 This is a flowchart illustrating the third type of information retrieval method in certain situations; Figure 5 These are schematic diagrams illustrating specific information retrieval methods in certain situations; Figure 6 These are structural block diagrams of information retrieval devices in some scenarios; Figure 7 These are schematic diagrams of the hardware structure of electronic devices in some scenarios. Detailed Implementation

[0012] To make the objectives, technical solutions, and advantages of the embodiments clearer, the technical solutions in the embodiments will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments, not all embodiments. Based on the embodiments, all other embodiments obtained by those skilled in the art without creative effort fall within the corresponding protection scope.

[0013] It is understood that before using the technical solutions disclosed in each embodiment, users should be informed of the type, scope of use, and usage scenarios of the personal information involved in accordance with relevant laws and regulations, and user authorization should be obtained.

[0014] For example, upon receiving a user's proactive request, a prompt message can be sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware such as electronic devices, applications, servers, or storage media that perform the technical solution, based on the prompt message.

[0015] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0016] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of information retrieval methods. Other methods that comply with relevant laws and regulations may also be applied to the implementation of information retrieval methods.

[0017] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.

[0018] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature marked "first" or "second" may explicitly or implicitly include one or more of that feature. In some descriptions, "multiple" means two or more, unless otherwise explicitly specified.

[0019] In multimodal retrieval scenarios such as semantic retrieval, voice retrieval, and video retrieval, the complete vectors corresponding to the input retrieval information (text, voice, video, etc.) are usually compared one by one with the complete vectors of candidate information in the database to obtain the retrieval results.

[0020] Currently, the common practice is to store the complete vectors of candidate information in the database into Dynamic Random Access Memory (DRAM), or to store the complete vectors of candidate information in the database into Solid State Drive (SSD) or Hard Disk Drive (HDD).

[0021] Accordingly, the retrieval strategy for this storage architecture can be as follows: quickly filter out a portion of candidate information from DRAM using cluster centers or graph traversal, then obtain the complete vectors corresponding to this portion of candidate information by accessing DRAM, thereby performing a secondary filter on this portion of candidate information to obtain the final retrieval results. Since all complete vectors in this storage architecture are stored in DRAM, the size of the candidate information in the database is limited by the capacity and cost of DRAM. Furthermore, the complete vectors stored in the SSD do not participate in the retrieval process.

[0022] To reduce DRAM usage, in some cases, it is proposed to perform low-bit quantization, residual quantization, or multi-level quantization on the complete vector of candidate information in the database, and to store the information required during the retrieval process in multiple levels. For example, the low-bit codewords and complete vectors corresponding to the candidate information in the database can be stored simultaneously in DRAM; while the complete vectors of the candidate information in the database can be stored in SSD or HDD.

[0023] Correspondingly, the retrieval strategy for this storage architecture can be as follows: a subset of candidate information is selected using low-bit codewords in DRAM, and then the complete vector corresponding to this subset of candidate information is obtained by accessing DRAM. This allows for a secondary selection of the candidate information to obtain the final retrieval result. Although a quantization structure is added to this storage architecture, the full vector is still stored in DRAM, meaning that the pressure on DRAM capacity and cost is not alleviated. Furthermore, the full vector stored in the SSD or HDD is still not included in the overall retrieval process.

[0024] With the development of new types of memory, in some cases, resistive random access memory (RRAM) and other devices are used to implement compute-in-memory (CIM) computing. Typically, the low-bit codewords corresponding to candidate information in the database are stored in RRAM, the complete vectors corresponding to candidate information in the database are stored in DRAM, and a complete vector of candidate information is stored in an SSD or HDD.

[0025] Correspondingly, the retrieval strategy for this storage architecture can be as follows: a subset of candidate vectors is initially selected using low-bit codewords stored in RRAM; then, the complete vectors corresponding to these candidate vectors are obtained by accessing DRAM, thus performing a secondary selection to obtain the final retrieval result. However, this storage architecture stores the complete vectors of candidate information in different precision formats in RRAM, DRAM, and SSD (or HDD). Since the complete vectors corresponding to candidate information in the database are still stored in DRAM, the overall storage cost remains high. Moreover, in practical engineering design, RRAM CIM has error sources such as device variations, noise, and nonlinearity in the analog domain, requiring frequent access to the complete vectors in RRAM for secondary selection. This results in significant input / output (I / O) overhead and latency, leading to low overall retrieval efficiency.

[0026] Therefore, in some cases, the complete vector of candidate information in the database is quantized and split into low-order codewords and high-order codewords. The high-order codewords are stored in RRAM, the low-order codewords in DRAM, and the complete vector is stored in SSD / HDD. In this way, DRAM does not need to store the complete vector of candidate information, thus reducing DRAM capacity and cost. Furthermore, during retrieval, candidate information can be sequentially filtered based on the high-order codewords in RRAM, the low-order codewords in DRAM, and the complete feature vector in SSD / HDD to obtain the final retrieval results. This multi-level retrieval method reduces the access volume to DRAM and SSD / HDD to a low level, improving retrieval efficiency and accuracy. Moreover, the complete vector stored in SSD / HDD can participate in the entire retrieval process.

[0027] As an optional application scenario in some situations, such as Figure 1 As shown, the information retrieval system may include at least one electronic device and at least one server. Figure 1 The system is illustrated in the example, which includes a computer 101, a mobile terminal 102, and a server 103, and the electronic devices such as the computer 101 and the mobile terminal 102 are connected to the server 103 via a network 110.

[0028] Specifically, electronic devices can be smartphones, tablets, laptops, PDAs, desktop computers, game consoles, smart TVs, smart wearable devices, in-vehicle terminals, virtual reality (VR) devices, augmented reality (AR) devices, etc. Server 103 can be a standalone physical server, a server cluster, a distributed system, or a cloud server providing cloud services. Network 110 can be a wired or wireless network, examples of which include, but are not limited to, the Internet, corporate intranets, local area networks, wide area networks, mobile communication networks, and combinations thereof.

[0029] As one embodiment of some scenarios, an information retrieval method embodiment is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0030] As one embodiment in certain situations, an information retrieval method is provided that can be used in electronic devices. Figure 2 This is a flowchart corresponding to information retrieval methods, such as... Figure 2 As shown, the process includes the following steps: Step S201: Obtain the first information.

[0031] The first piece of information can be the query content entered by the user. For example, the first piece of information can be, but is not limited to, text, video, audio, etc.

[0032] In some cases, electronic devices can be equipped with information retrieval applications that provide an interactive interface through which users can input initial information. The electronic device can then respond to the user's input and retrieve the initial information.

[0033] In other cases, information retrieval methods can be deployed as independent services in electronic devices. Other applications or modules in the electronic devices can send query commands to this independent service through a preset communication interface. The independent service can parse and process the query commands to obtain the initial information.

[0034] Step S202: Obtain the first feature vector of the first information and the first discrete codeword of the first information.

[0035] The first feature vector can be a high-dimensional vector data obtained after feature extraction of the first information. The first feature vector can be used to reflect the content, semantics, structure or attributes of the first information, etc.

[0036] After acquiring the first information, the electronic device can determine a feature extraction algorithm that matches the type of the first information, and then use the feature extraction algorithm to extract features from the first information to obtain a first feature vector. For example, if the first information is text, word vector models, recurrent neural networks, long short-term memory networks, etc., can be used to extract features from the text to obtain the first feature vector. If the first information is an image, convolutional neural networks, visual transformer models, etc., can be used to extract features from the image to obtain the first feature vector. If the first information is audio, a pre-trained convolutional neural network or recurrent neural network can be used to extract acoustic features from the audio to obtain the first feature vector. If the first information is video, image features can be extracted frame by frame from the video, and then the image features can be fused according to time sequence to obtain the first feature vector.

[0037] The first discrete codeword can be a fixed-length discrete codeword obtained by quantizing the first feature vector using a vector quantization algorithm. In some cases, the first discrete codeword can be represented by multiple binary values. For example, the first discrete codeword can be an 8-bit binary code. Of course, the first discrete codeword can also be a 16-bit binary code; the specific length of the first discrete codeword is not specifically limited here.

[0038] Furthermore, vector quantization algorithms can be any quantization algorithm capable of outputting a first discrete codeword with definable error and divisible codewords. For example, regarding definable error, the distance estimate between the complete feature vectors corresponding to the discrete codewords can be represented by the quantization distance between them; moreover, there is a computable upper bound on the error between the quantization distance and the true distance between the discrete codewords. As another example, in terms of the organization of the discrete codewords, vector quantization algorithms can output a fixed-length discrete codeword, such as an 8-bit binary code; moreover, this discrete codeword can be logically decomposed, such as into high-order codewords and low-order codewords. As a specific example, a vector quantization algorithm can be an extended RaBitQ (E-RaBitQ) multi-bit vector quantization algorithm.

[0039] In addition, before using the vector quantization algorithm to quantize the first feature vector corresponding to the first information, the first feature vector can be preprocessed, such as normalization, centering, dimensionality reduction, etc.

[0040] Step S203: Compare the first discrete codeword with the second discrete codeword to obtain the first comparison result, and the second discrete codeword corresponds to the second information.

[0041] The second information can be candidate information pre-stored in the database for retrieval. If the first information represents a query for a certain type of short video, then the second information stored in the database can be short videos of various types; if the first information represents a query for a certain type of book, then the second information stored in the database can be books of various types; if the first information represents a query for a song, then the second information stored in the database can be multiple songs.

[0042] The second discrete codeword can be obtained by quantizing the feature vector corresponding to the second information using a vector quantization algorithm. The process is similar to quantizing the first feature vector to obtain the first discrete codeword, and will not be repeated here. Furthermore, the length of the second discrete codeword is the same as the length of the first discrete codeword. For example, if the first discrete codeword is an 8-bit binary code, then the second discrete codeword is also an 8-bit binary code, which facilitates comparison between the first and second discrete codewords.

[0043] Here, the Hamming distance, Euclidean distance, dot product, or codeword matching degree between the first discrete codeword and the second discrete codeword can be calculated to obtain the first comparison result used to characterize the similarity between the first information and the second information.

[0044] In some cases, the first discrete codeword can be loaded onto the input of the RRAM crossbar, and the second discrete codeword stored in the RRAM can be calculated in parallel or approximate distance in the analog domain of the RRAM through the computation storage mechanism to obtain the first comparison result.

[0045] Step S204: Use the first comparison result to filter the second information and obtain the third information.

[0046] Here, we can first determine the first quantity that needs to be recalled, which is the quantity of the fourth information shown below, and then determine the second quantity corresponding to the third information based on the first quantity; finally, based on the first comparison result, we can select the second quantity of the third information from the second information.

[0047] In some cases, the second information can be sorted according to the first comparison result to obtain a sorting result, and a second number of second information pieces can be selected as the third information based on the sorting result. For example, if the first comparison result represents the similarity between the first discrete codeword and the second discrete codeword, the second information corresponding to each second discrete codeword can be sorted according to the order of similarity from largest to smallest to obtain a sorting result, and the first second number of second information pieces can be selected as the third information based on the sorting result.

[0048] Step S205: Compare the first feature vector with the second feature vector to obtain the second comparison result. The second feature vector corresponds to the third information.

[0049] Here, the second feature vector can be the feature vector of the third information. In some cases, feature extraction algorithms can be used to extract features from the third information to obtain its corresponding second feature vector. For details, please refer to the process of using feature extraction algorithms to extract features from the first information to obtain the first feature vector, which will not be repeated here.

[0050] In some cases, the cosine similarity, Euclidean distance, or inner product between the first and second eigenvectors can be calculated to obtain a second comparison result that characterizes the similarity between the first and second eigenvectors.

[0051] In other cases, the complete feature vector corresponding to the second information can be stored in a third storage unit such as an SSD or HDD. After selecting the third information from a massive amount of second information, the second feature vector corresponding to the third information can be read from the third storage unit to compare it with the first feature vector of the first information, thus obtaining a second comparison result. This on-demand reading method can also reduce the amount of access to the third storage unit.

[0052] Step S206: Use the second comparison result to filter the third information to obtain the fourth information. The fourth information is used to characterize the retrieval result of the first information.

[0053] Here, the third information can be sorted according to the second comparison result, and a first number of third information items can be selected as the fourth information item based on the sorting result, thereby obtaining the retrieval result of the first information. For example, if the second comparison result is used to characterize the similarity between the first feature vector and the second feature vector corresponding to each third information item, the third information items can be sorted in descending order of similarity to obtain the sorting result, and the first number of third information items selected from the sorting result can be selected as the fourth information.

[0054] For example, if the first information represents "recommending animated short films suitable for group A", then the fourth information can be the animated short film that best matches the first information; if the first information represents "querying images including white kittens", then the fourth information can be the image that best matches the first information; if the first information represents an audio clip of a song being hummed, then the fourth information can be the audio data of the song that best matches the first information; if the first information represents a clip of a basketball game, then the fourth information can be the complete basketball video data that best matches the first information.

[0055] In some cases, the first discrete codeword corresponding to the first information is compared with the second discrete codeword corresponding to the second information to obtain the first comparison result. Then, based on the first comparison result, the third information can be quickly filtered out from the second information, which can significantly reduce the amount of data of the second information that needs to be precisely matched. Then, the first feature vector corresponding to the first information is precisely compared with the second feature vector corresponding to the third information to obtain the second comparison result. Finally, based on the second comparison result, the fourth information can be quickly and accurately filtered out from the third information. In this way, it is not necessary to compare the feature vector of the first information with all the feature vectors of the second information, which can reduce the amount of data involved in the comparison and reduce the input and output overhead, thereby improving the retrieval accuracy and overall retrieval efficiency.

[0056] As one embodiment of other scenarios, an information retrieval method is provided that can be used in electronic devices. Figure 3 This is a flowchart corresponding to information retrieval methods, such as... Figure 3 As shown, the process includes the following steps: Step S301: Obtain the first information. For details, please refer to [link to relevant documentation]. Figure 2 Step S201 of the illustrated embodiment will not be described again here.

[0057] Step S302: Obtain the first feature vector of the first information and the first discrete codeword of the first information. For details, please refer to [link to details]. Figure 2 Step S202 of the illustrated embodiment will not be described again here.

[0058] Step S303: Compare the first discrete codeword with the second discrete codeword to obtain the first comparison result, and the second discrete codeword corresponds to the second information.

[0059] In some cases, the first discrete codeword includes a first sub-codeword, which is used to characterize the codeword in the first discrete codeword that is located in the first bit interval, which includes the most significant bit. For example, the first discrete codeword can be an 8-bit binary code, while the first sub-codeword can be the high four bits of the 8-bit binary code.

[0060] Since the first bit interval corresponding to the first subcodeword includes the highest bit, the first subcodeword can usually carry core information with high energy, strong discriminative power, and significant impact on similarity from the first information. That is, the first subcodeword can encode the coarse cluster center or main class information where the feature vector corresponding to the first information is located, and can better distinguish the approximate position of the feature vector corresponding to the first information in the entire vector space.

[0061] Specifically, step S303 includes: Step S3031: Obtain the third sub-codeword from the first storage and computing unit. The third sub-codeword is used to characterize the codeword in the first bit interval of the second discrete codeword.

[0062] In some cases, the first storage and computation unit can be the RRAM shown above. For example, the second discrete codeword can be an 8-bit binary code, and the third sub-codeword can be the high four bits of the 8-bit binary code. That is, the first discrete codeword and the second discrete codeword are discrete codewords of equal length, and the first sub-codeword in the first discrete codeword and the third sub-codeword in the second discrete codeword have the same length and correspond to the same bit interval, which is the first bit interval.

[0063] Since the third sub-codeword is located in the first bit interval of the second discrete codeword, it can carry the core information of the second information that has high energy, strong discriminative power, and a significant impact on similarity. In other words, the third sub-codeword can encode the coarse cluster center or main class information where the feature vector corresponding to the second information is located, and can effectively distinguish the approximate position of the feature vector corresponding to the second information in the entire vector space.

[0064] Step S3032: Compare the first sub-codeword with the third sub-codeword to obtain the first comparison result. See the comparison process between the first discrete codeword and the second discrete codeword for details, which will not be repeated here.

[0065] Reading the third sub-codeword corresponding to the second information from the first storage and computing unit reduces the amount of data read, as well as input / output overhead and latency. Moreover, since both the first and third sub-codewords carry core information, comparing them reduces the amount of data involved in the computation and, while ensuring the distinguishability of key features, allows for a fast and efficient first comparison result, thereby further improving overall retrieval efficiency.

[0066] Step S304: Use the first comparison result to filter the second information and obtain the third information.

[0067] In some cases, the first discrete codeword also includes a second sub-codeword. The second sub-codeword is used to represent the codeword in the second bit interval of the first discrete codeword. The second bit interval is used to represent the bit intervals in the first discrete codeword other than the first bit interval. For example, the first discrete codeword can be an 8-bit binary code, and the first sub-codeword is the high four bits of the 8-bit binary code. Therefore, the second sub-codeword can be the low four bits of the 8-bit binary code.

[0068] Since the second sub-codeword is located in the second bit interval of the first discrete codeword, and the second bit interval is the bit interval of the first discrete codeword excluding the first bit interval, the second bit interval can be an interval including the least significant bit. Accordingly, the second sub-codeword can typically be used to characterize detailed features, auxiliary distinguishing information, or refined difference features of the first information, further improving the distinguishing accuracy between information based on the core features. That is, the second sub-codeword can be used to encode the further distinguishing vector within the coarse cluster center of the feature vector corresponding to the first information.

[0069] Specifically, step S304 includes: Step S3041: Use the first comparison result to filter the second information to obtain the fifth information.

[0070] Here, we can first determine the first quantity that needs to be recalled, which is the quantity of the fourth information shown below. Then, we can determine the third quantity corresponding to the fifth information based on the product between the first quantity and the preset multiple. Finally, we can select the third quantity of the fifth information from the second information based on the first comparison result.

[0071] In some cases, if the first comparison result represents the similarity between the first and third sub-codewords, the second information can be sorted in descending order of similarity, and the top three numbers of second information in the sorted results can be selected as the fifth information. For example, if the first number is set to 10 and the preset multiple is 4, then the third number is 40; correspondingly, the top 40 second information items can be selected from the sorted results as the fifth information.

[0072] Step S3042: Obtain the fourth sub-codeword from the second storage unit and the fifth sub-codeword from the first storage and computing unit. The fourth sub-codeword is used to characterize the codeword in the second bit interval of the third discrete codeword. The third discrete codeword corresponds to the fifth information. The fifth sub-codeword is used to characterize the codeword in the first bit interval of the third discrete codeword.

[0073] In some cases, the first storage and computation unit can be the RRAM shown above, and the second storage unit can be the DRAM shown above. Here, the fourth sub-codeword is stored in the second storage unit DRAM, and the fifth sub-codeword is stored in the first storage and computation unit RRAM. Correspondingly, the storage architecture is to write the high-order codeword of the second information, as shown above, into the corresponding position of the RRAM array. This serves both as the RRAM's on state and as weight data during CIM calculation. Additionally, a compact structure is created by writing the low-order codeword of the second information into the DRAM, ensuring that the feature vector corresponding to the second information occupies only a small number of bits in the DRAM. Furthermore, to facilitate the subsequent concatenation of the fourth and fifth sub-codewords, the DRAM can also store shared parameters related to the vector quantization algorithm, such as the codebook, rotation matrix, lookup table data structure, and error upper bound configuration.

[0074] In addition, reading the fifth sub-codeword corresponding to the fifth information from the first storage and computing unit and reading the fourth sub-codeword corresponding to the fifth information from the second storage unit can reduce the number of accesses to the first storage and computing unit and the second storage unit, reduce input and output and latency, and further improve retrieval efficiency.

[0075] In some optional implementations, step S3042 above further includes: Step a1: Obtain the residual vector from the second storage unit. The residual vector corresponds to the fifth piece of information.

[0076] Step a2: Quantize the residual vector to obtain the fourth subcodeword.

[0077] Here, the residual vector can be the difference vector between the feature vector of the fifth information and the coarse cluster center to which that feature vector belongs. In some cases, the residual vector corresponding to the second information can also be directly stored in DRAM, and then read from DRAM as needed. For example, after the fifth information is selected through the first comparison result, the residual vector corresponding to the fifth information can be read from the second storage unit. Finally, the vector quantization algorithm shown above is used to quantize the residual vector corresponding to the fifth information to obtain the fourth sub-codeword.

[0078] Since the second storage unit stores the residual vector instead of the complete feature vector, the capacity and cost of the second storage unit can be reduced.

[0079] Step S3043: Concatenate the fourth sub-codeword and the fifth sub-codeword to obtain the fourth discrete codeword.

[0080] In some cases, the fourth and fifth sub-codewords can be concatenated sequentially from the most significant bit to the least significant bit to obtain the fourth discrete codeword corresponding to the fifth information. For example, the fifth sub-codeword represents the high four-bit codeword and the fourth sub-codeword represents the low four-bit codeword. Therefore, the high four-bit codeword and the low four-bit codeword can be directly concatenated in descending order to obtain the fourth discrete codeword.

[0081] In other cases, the fourth and fifth subcodewords can be input into a pre-trained concatenation model, which then concatenates the fourth and fifth subcodewords according to the shared parameters shown above to obtain the fourth discrete codeword.

[0082] Step S3044: Obtain the first quantization distance between the first discrete codeword and the fourth discrete codeword.

[0083] Here, the Hamming distance, Euclidean distance, dot product, or codeword matching degree between the first discrete codeword and the fourth discrete codeword can be calculated to obtain the first quantization distance between the first discrete codeword and the fourth discrete codeword.

[0084] In some cases, the shared quantization parameters in DRAM can be used to calculate the first quantization distance between the first and fourth discrete codewords on a central processing unit (CPU) or a dedicated accelerator. Since the discrete codeword corresponding to the fifth information is read out at this time, and the calculation is performed in the digital domain, the error at this stage mainly comes from the vector quantization algorithm itself. Therefore, it can be ensured that there is a calculable upper bound on the error between the quantization distance and the true distance.

[0085] Step S3045: Use the first quantization distance to filter the fifth information and obtain the third information.

[0086] For example, the first quantization distance can be compared with a preset quantization distance. If the first quantization distance is less than or equal to the preset quantization distance, the corresponding fifth piece of information is determined as the third piece of information. If the first quantization distance is greater than the preset quantization distance, the fifth piece of information can be excluded from the definition of the third piece of information. Furthermore, the preset quantization distance can be flexibly set according to actual conditions.

[0087] In some optional implementations, step S3045 above further includes: Step b1: Use the fifth information of the first quantization distance to obtain the first sorting result.

[0088] Step b2: Use the first sorting result to filter the fifth information to obtain the third information.

[0089] In some cases, the fifth information can be sorted in descending order of the first quantization distance to obtain the first sorting result; then, the second-highest number of the fifth information items can be selected as the third information items according to the first sorting result.

[0090] In other cases, the fifth information can be sorted in ascending order of the first quantization distance to obtain the first sorting result; then, the second number of fifth information items can be selected as the third information according to the first sorting result.

[0091] Based on the first quantization distance, the fifth piece of information can be sorted relatively accurately. Then, based on the first sorting result obtained from the sorting, the third piece of information can be quickly and efficiently filtered out from the fifth piece of information, which can further improve the retrieval efficiency.

[0092] In some cases, the retrieval strategy corresponding to the above storage architecture can be as follows: First, input the high-order codeword of the first information into the RRAM, compare the high-order codeword of the first information with the high-order codeword of the second information stored in the RRAM to obtain a first comparison result, and then filter out the fifth information from the second information based on the first comparison result. Next, read the high-order codeword corresponding to the fifth information from the RRAM and the low-order codeword corresponding to the fifth information from the DRAM. Since the first discrete codeword corresponding to the first information is its complete codeword, the high-order codeword and low-order codeword of the fifth information can be concatenated to obtain a fourth discrete codeword. Therefore, based on the first quantization distance between the first discrete codeword and the fourth discrete codeword, the fifth information can be filtered to obtain the second number of third information items as shown above.

[0093] Based on the first comparison result, the second information is initially filtered to obtain the fifth information. This reduces the number of times the second information is filtered directly by quantization distance. Furthermore, when reading the fifth sub-codeword corresponding to the fifth information from the first storage and computing unit and the fourth sub-codeword corresponding to the fifth information from the second storage unit, in terms of storage architecture, the second storage unit does not need to store the complete discrete codeword, which reduces the capacity and cost of the second storage unit. In terms of access, only the fifth and fourth sub-codewords corresponding to the fifth information need to be read, which reduces the number of accesses to the first and second storage units. Moreover, the fifth information is further filtered based on the first quantization distance between the fourth discrete codeword (concatenated from the fourth and fifth sub-codewords) and the first discrete codeword. This ensures the accuracy of the obtained third information, further ensuring the accuracy of the retrieval results.

[0094] In some optional implementations, step S304 above further includes: Step c1: Use the first comparison result to filter the second information to obtain the fifth information.

[0095] Step c2: Obtain the third feature vector from the third storage unit. The third feature vector corresponds to the fifth information.

[0096] Step c3: Quantize the third feature vector to obtain the fifth discrete codeword.

[0097] Step c4: Obtain the second quantization distance between the first discrete codeword and the fifth discrete codeword.

[0098] Step c5: Use the second quantization distance to filter the fifth information and obtain the third information.

[0099] The third storage unit here can be an SSD or HDD as described above. Accordingly, the storage architecture corresponding to this embodiment can be storing the high-order codeword of the second information in RRAM and storing the complete feature vector of the second information in the SSD or HDD. In this way, it is not necessary to store the complete feature vector of the second information in DRAM; only the relevant shared parameters need to be stored in DRAM. Therefore, the capacity and cost of DRAM can be reduced.

[0100] Accordingly, after reading the complete feature vector of the fifth information, i.e. the third feature vector, from the SSD / HDD, the vector quantization algorithm shown above can be used to quantize the third feature vector into the fifth discrete codeword. Thus, the second quantization distance between the first discrete codeword corresponding to the first information and the fifth discrete codeword corresponding to each fifth information can be obtained. Therefore, the fifth information can be filtered according to the second quantization distance to obtain the third information.

[0101] The process of using the second quantization distance to filter the fifth information to obtain the third information can be referred to the process of using the first quantization distance to filter the fifth information to obtain the third information as shown above, and will not be repeated here.

[0102] From a storage architecture perspective, the complete feature vector of the second information can be stored in the third storage unit, and the third storage unit can be read as needed, such as reading the third feature information corresponding to the fifth information. In this way, it is not necessary to store the feature vector or sub-codeword of the second information in DRAM, which can reduce the capacity occupation and cost of DRAM.

[0103] From the perspective of retrieval strategy, the first comparison result is used to preliminarily filter the second information to obtain the fifth information; then the second quantization distance between the fourth discrete codeword corresponding to the fifth information and the first discrete codeword corresponding to the first information is used to filter the fifth information to obtain the third information. This can ensure that the filtered third information is relatively accurate.

[0104] Step S305: Compare the first feature vector with the second feature vector to obtain a second comparison result. The second feature vector corresponds to the third information. For details, please refer to [link to details]. Figure 2Step S205 of the illustrated embodiment will not be described again here.

[0105] Step S306: The second comparison result is used to filter the third information to obtain the fourth information. The fourth information is used to characterize the retrieval results of the first information. For details, please refer to [link to details]. Figure 2 Step S206 of the illustrated embodiment will not be described again here.

[0106] In some cases, the first sub-codeword is compared with the third sub-codeword to obtain the first comparison result; then the second information is filtered according to the first comparison result to obtain the fifth information; then, based on the quantization distance between the complete discrete codeword of the fifth information and the complete discrete codeword of the first information (i.e., the first discrete codeword), the fifth information is filtered again to obtain the third information. This can ensure that the filtered third information is relatively accurate.

[0107] As one embodiment of another scenario, an information retrieval method is provided that can be used in electronic devices. Figure 4 This is a flowchart corresponding to information retrieval methods, such as... Figure 4 As shown, the process includes the following steps: Step S401: Obtain the first information. For details, please refer to [link / reference]. Figure 2 Step S201 of the illustrated embodiment will not be described again here.

[0108] Step S402: Obtain the first feature vector of the first information and the first discrete codeword of the first information. For details, please refer to [link to details]. Figure 2 Step S202 of the illustrated embodiment will not be described again here.

[0109] Step S403: Compare the first discrete codeword with the second discrete codeword to obtain the first comparison result. The second discrete codeword corresponds to the second information. For details, please refer to [link to details]. Figure 2 Step S203 of the illustrated embodiment will not be described again here.

[0110] Step S404: Use the first comparison result to filter the second information to obtain the third information. For details, please refer to [link to relevant documentation]. Figure 2 Step S204 of the illustrated embodiment will not be described again here.

[0111] Step S405: Compare the first feature vector with the second feature vector to obtain the second comparison result. The second feature vector corresponds to the third information. For details, please refer to [link to details]. Figure 2 Step S205 of the illustrated embodiment will not be described again here.

[0112] Step S406: Use the second comparison result to filter the third information to obtain the fourth information. The fourth information is used to characterize the retrieval result of the first information.

[0113] Specifically, step S406 includes: Step S4061: Obtain the initial sorting result. The initial sorting result corresponds to the third information, and the initial sorting result is obtained using the first comparison result corresponding to the third information.

[0114] The initial sorting result here can be the initial sorting result among the third information. In some cases, the initial sorting result among the third information can be the result of sorting according to the quantization distance shown above, that is, the sorting result among the third information when the first quantization distance is used to filter out the third information.

[0115] Step S4062: Obtain the third quantization distance. The third quantization distance is used to characterize the distance between adjacent sixth discrete codewords. The sixth discrete codeword corresponds to the third information.

[0116] For the third information with an initial sorting result, we can start from the first third information and the second third information, calculating the third quantization distance between the sixth discrete codewords corresponding to the first and second third information; then, we can calculate the third quantization distance between the sixth discrete codewords corresponding to the second and third third information. This process continues until we calculate the third quantization distance between the sixth discrete codewords corresponding to the penultimate and last third information.

[0117] In step S4063, in response to the third quantization distance being located in the first distance interval, the sorting order between the third information is corrected using the first sub-comparison result to obtain the first correction result. The first sub-comparison result is used to characterize the comparison result between the first feature vector and the fourth feature vector. The fourth feature vector is stored in the third storage unit and corresponds to the third information. The first sub-comparison result is in the second comparison result.

[0118] The first distance interval here can be a pre-set distance interval. In some cases, the error upper bound shown above can be used to determine the first distance interval; for example, the positive and negative values ​​corresponding to the error upper bound can be used to construct the first distance interval. The first correction result can be used to characterize the sorting order between two adjacent pieces of third information after correction.

[0119] If the third quantization distance is not located within the first distance interval, it indicates that the order of the two adjacent third pieces of information corresponding to the third quantization distance will not be reversed under the true distance. Therefore, the order of the two adjacent third pieces of information corresponding to the third quantization distance is correct and does not require correction. If the third quantization distance is located within the first distance interval, it indicates that the order of the two adjacent third pieces of information corresponding to the third quantization distance may be flipped under the true distance. Therefore, the order of the two adjacent third pieces of information can be corrected by using the comparison result between the complete feature vectors of the two adjacent third pieces of information to ensure the accuracy of the order. It should be understood that the comparison result between the complete feature vectors of the two adjacent third pieces of information is the first sub-comparison result shown above.

[0120] In addition, when the third quantization distance is within the first distance interval, the fourth feature vector corresponding to the two adjacent third information is read from the third storage unit. This can reduce the number of accesses to the third storage unit and further improve the retrieval efficiency.

[0121] Step S4064: Update the initial sorting result using the first correction result to obtain the second sorting result.

[0122] Updating the initial sorting result using the first correction result allows for adjusting the sorting order between two adjacent pieces of third information corresponding to the first correction result in the initial sorting result. For example, the third information with the initial sorting result can be represented as A, B, C, D, E. Through the above calculation process, the sorting order between A and B is reversed, and the sorting order between D and E is reversed. Therefore, the final third information with the second sorting result can be represented as B, A, C, E, D.

[0123] Step S4065: Use the second sorting result to filter the third information to obtain the fourth information.

[0124] In some cases, if the second sorting result is sorted in descending order according to the first quantization distance, the first number of third information can be selected as the fourth information based on the second sorting result, thereby obtaining the search result corresponding to the first information.

[0125] In other cases, if the second sorting result is sorted in ascending order according to the first quantization distance, then the third information of the first quantity after the second sorting result can be selected as the fourth information, thereby obtaining the search result corresponding to the first information.

[0126] For two adjacent third pieces of information corresponding to the third quantization distance located in the first preset interval, the initial sorting result is corrected based on the comparison results between the complete feature vectors of these two third pieces of information and the complete feature vector of the first information. This ensures that the sorting of the third pieces of information with the second sorting result is accurate, and further enables the more accurate selection of the fourth information.

[0127] Specifically, step S406 above also includes: Step 4066: Obtain the initial sorting result. The initial sorting result corresponds to the third information, and the initial sorting result is obtained using the first comparison result corresponding to the third information. Please refer to the previous text for the specific process.

[0128] Step 4067: Select the sixth information from the third information. The sixth information is used to represent multiple third information items that are in consecutive positions in the initial sorting result.

[0129] In some cases, the sixth piece of information can be selected from the first predetermined number of third pieces of information that have an initial sorting result. For example, if the third pieces of information with an initial sorting result can be represented as A, B, C, D, and E, and the first predetermined number is 3, then A, B, and C can be selected as the sixth piece of information.

[0130] In other cases, a second predetermined number of sixth pieces of information can be determined based on the quantity of the third information. Then, starting from any position with the initial sorting result, the second predetermined number of third pieces of information can be selected as the sixth information. For example, if the third information with the initial sorting result can be represented as A, B, C, D, and E, and the second predetermined number is 2, then B and C can be selected as the sixth information, or D and E can be selected as the sixth information.

[0131] Step 4068: Update the initial sorting result using the second sub-comparison result to obtain the third sorting result. The second sub-comparison result is used to characterize the comparison result between the first feature vector and the fifth feature vector. The fifth feature vector corresponds to the sixth information. The fifth feature vector is stored in the third storage unit. The second sub-comparison result is in the second comparison result.

[0132] Here, the fifth feature vector corresponding to the sixth information can be read from the third storage unit. Then, the comparison result between the first feature vector corresponding to the first information and each fifth feature vector is calculated to obtain the second sub-comparison result. Then, the sorting order of the sixth information in the third information with the initial sorting result is corrected according to the second sub-comparison result to obtain the third sorting result. For example, the third information with the initial sorting result can be represented as A, B, C, D, E. If B and C are set as the sixth information, after calculation, the sorting order between B and C is reversed. Therefore, the third information with the third sorting result can be represented as A, C, B, D, E.

[0133] Step 4069: Use the third sorting result to filter the third information to obtain the fourth information. Please refer to the previous text for the specific process.

[0134] The sixth piece of information is randomly selected from the third information. Based on the comparison between the feature vector corresponding to the sixth piece of information and the first feature vector of the first information, the sorting order of the sixth pieces of information is corrected to obtain the second correction result. The initial sorting result is then corrected based on the second correction result. This ensures that the third sorting order is accurate, and thus ensures that the third information selected based on the third sorting result is accurate.

[0135] It should be understood that the storage architecture corresponding to the above retrieval strategy can be: storing the high-order codeword of the second information in RRAM, storing the low-order codeword of the second information in DRAM, and storing the complete feature vector of the second information in SSD / HDD. Specifically, the high-order codeword stored in RRAM is used for preliminary filtering of the second information to obtain the fifth information; the low-order codeword stored in DRAM is used for secondary filtering of the fifth information to obtain the third information; and the complete feature vector stored in SSD / HDD is used for a third filtering of the third information to obtain the fourth information.

[0136] From the perspective of storage architecture, only one copy of the complete feature vector of the second information is stored in SSD / HDD; the complete feature vector of the second information is no longer stored in DRAM, but the low-order codeword of the second information and a small number of shared parameters are stored, so the DRAM capacity requirement is greatly reduced.

[0137] From a computational perspective, RRAM undertakes the main computational load of the initial screening, the second screening stage only processes the fifth information obtained from the initial screening, and the third screening further restricts it to a very small number of third information with sorting uncertainty, which can achieve a comprehensive balance between energy consumption, latency and accuracy.

[0138] From the perspective of accuracy, the accuracy of the final fourth piece of information can be ensured through three rounds of screening.

[0139] In some cases, by comparing the feature vector corresponding to the first information with the feature vector corresponding to the third information whose sorting order may be reversed, the initial sorting result corresponding to the third information can be corrected. This can ensure the correctness of the sorting of the third information with the final sorting result, such as the first or second sorting result, and thus ensure the accuracy of the final selected fourth information.

[0140] As a specific implementation method in some situations, such as Figure 5 As shown, the electronic device acquires the retrieval input information, which corresponds to a complete feature vector and a complete discrete codeword. Furthermore, the first calculation and storage unit stores the high-order codewords of the first to seventh candidate information, the second storage unit stores the low-order codewords of the first to seventh candidate information, and the third storage unit stores the complete feature vectors of the first to seventh candidate information.

[0141] First, the complete discrete codeword of the retrieval input information is split into high-order codewords and low-order codewords. Then, the high-order codeword of the retrieval input information is compared with the high-order codewords of the first to seventh candidate information stored in the first computing and storage unit to obtain a first comparison result. Based on the first comparison result, the first to seventh candidate information is filtered to obtain preliminary filtered candidate information, such as the first to fourth candidate information, the sixth candidate information, and the seventh candidate information. Next, the low-order codewords of the first to fourth candidate information, the sixth candidate information, and the seventh candidate information are read from the second storage unit, and the high-order codewords of the first to fourth candidate information, the sixth candidate information, and the seventh candidate information are read from the first computing and storage unit. These are then concatenated to obtain the complete discrete codewords corresponding to the first to fourth candidate information, the sixth candidate information, and the seventh candidate information.

[0142] Furthermore, the first quantization distance is calculated between the complete discrete codewords of the retrieved input information and the complete discrete codewords of the first to fourth, sixth and seventh candidate information, respectively. The first to fourth, sixth and seventh candidate information are then reordered in descending order of the first quantization distance as the first candidate information, second candidate information, third candidate information, fourth candidate information, seventh candidate information and sixth candidate information. The first four are then selected to obtain the first to fourth candidate information.

[0143] Furthermore, based on the quantized distances between the first and second candidate information, the second and third candidate information, and the third and fourth candidate information, the second and third candidate information whose ranking might be reversed are selected. Next, the complete feature vectors of the second and third candidate information are read from the third storage unit. Based on the comparison results between the complete feature vector of the retrieval input information and the complete feature vector of the second and third candidate information, and the comparison results between the complete feature vector of the retrieval input information and the complete feature vector of the third candidate information, the ranking order between the second and third candidate information is corrected, resulting in the final ranking result from first to fourth candidate information, such as first candidate information, third candidate information, second candidate information, and fourth candidate information. Finally, based on the final ranking result, the first and third candidate information are selected as the retrieval results for the retrieval input information.

[0144] By adjusting the complete feature vector of candidate information stored in the second storage unit, DRAM, to low-order codewords and shared parameters, the capacity and cost of DRAM can be reduced. Furthermore, the complete feature vector of candidate information is only retained in the third storage unit, SSD / HDD, eliminating the need for DRAM to mirror and store an entire set of complete feature vectors, thus avoiding structural redundancy caused by storing two sets of complete feature vectors. Moreover, the three-stage process—initial screening using the first computing and storage unit, RRAM; second screening using RRAM combined with DRAM; and third screening using SSD / HDD—ensures the reliability and accuracy of the final retrieval results while keeping the I / O count and overall computational load of SSD / HDD at a low level. Additionally, the initial screening stage utilizes RRAM crossbars to perform large-scale parallel multiplication and addition in the analog domain, reducing reliance on general-purpose CPUs / Graphics Processing Units (GPUs) and DRAM bandwidth, which is beneficial for supporting large-scale vector retrieval services under the same computing power conditions. As the number of candidate information increases, the storage and computing power requirements of DRAM grow slowly, and the complete feature vector is mainly accumulated in SSD / HDD. This is beneficial for expansion methods that mainly increase SSD / HDD in ultra-large-scale scenarios such as recommendation systems and search systems, making the overall total cost of ownership easier to control.

[0145] In some cases, an information retrieval device is also provided for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0146] As one embodiment in certain situations, an information retrieval device is provided, such as Figure 6 As shown, it includes: The first acquisition module 610 is used to acquire the first information.

[0147] The second acquisition module 620 is used to acquire the first feature vector of the first information and the first discrete codeword of the first information.

[0148] The first comparison module 630 is used to compare the first discrete codeword with the second discrete codeword to obtain the first comparison result, and the second discrete codeword corresponds to the second information.

[0149] The first filtering module 640 is used to filter the second information using the first comparison result to obtain the third information.

[0150] The second comparison module 650 is used to compare the first feature vector with the second feature vector to obtain a second comparison result, and the second feature vector corresponds to the third information.

[0151] The second filtering module 660 is used to filter the third information using the second comparison result to obtain the fourth information, which is used to characterize the retrieval result of the first information.

[0152] In some optional implementations, the first discrete codeword includes a first sub-codeword, which is used to characterize the codeword in the first discrete codeword that is located in a first bit interval, the first bit interval including the highest bit; the first comparison module 630 is further used to obtain a third sub-codeword from the first storage and computing unit, which is used to characterize the codeword in the second discrete codeword that is located in the first bit interval; and compare the first sub-codeword and the third sub-codeword to obtain a first comparison result.

[0153] In some optional implementations, the first discrete codeword further includes a second sub-codeword, which is used to characterize the codeword in the second bit interval of the first discrete codeword. The second bit interval is used to characterize the bit intervals in the first discrete codeword other than the first bit interval. The first filtering module 640 is further used to filter the second information using the first comparison result to obtain the fifth information; obtain the fourth sub-codeword from the second storage unit and the fifth sub-codeword from the first storage and computing unit. The fourth sub-codeword is used to characterize the codeword in the second bit interval of the third discrete codeword. The third discrete codeword corresponds to the fifth information, and the fifth sub-codeword is used to characterize the codeword in the first bit interval of the third discrete codeword; concatenate the fourth sub-codeword and the fifth sub-codeword to obtain the fourth discrete codeword; obtain the first quantization distance between the first discrete codeword and the fourth discrete codeword; and use the first quantization distance to filter the fifth information to obtain the third information.

[0154] In some optional implementations, the first filtering module 640 is further configured to obtain a residual vector from the second storage unit, the residual vector corresponding to the fifth information; and quantize the residual vector to obtain the fourth subcodeword.

[0155] In some optional implementations, the first filtering module 640 is further configured to sort the fifth information using a first quantization distance to obtain a first sorting result; and to filter the fifth information using the first sorting result to obtain the third information.

[0156] In some optional implementations, the first filtering module 640 is further configured to: filter the second information using the first comparison result to obtain the fifth information; obtain the third feature vector from the third storage unit, the third feature vector corresponding to the fifth information; quantize the third feature vector to obtain the fifth discrete codeword; obtain the second quantization distance between the first discrete codeword and the fifth discrete codeword; and filter the fifth information using the second quantization distance to obtain the third information.

[0157] In some optional implementations, the second filtering module 660 is used to obtain an initial sorting result, which corresponds to the third information, and the initial sorting result is obtained using the first comparison result corresponding to the third information; obtain a third quantization distance, which is used to characterize the distance between adjacent sixth discrete codewords, and the sixth discrete codeword corresponds to the third information; in response to the third quantization distance being located in the first distance interval, the sorting order between the third information is corrected using the first sub-comparison result to obtain a first correction result, which is used to characterize the comparison result between the first feature vector and the fourth feature vector, the fourth feature vector is stored in the third storage unit, and the fourth feature vector corresponds to the third information, and the first sub-comparison result is in the second comparison result; update the initial sorting result using the first correction result to obtain a second sorting result; and filter the third information using the second sorting result to obtain the fourth information.

[0158] In some optional implementations, the second filtering module 660 is used to obtain an initial sorting result, which corresponds to the third information and is obtained based on the first comparison result corresponding to the third information; select a sixth piece of information from the third information, which is used to represent multiple pieces of third information in consecutive positions in the initial sorting result; update the initial sorting result using the second sub-comparison result to obtain a third sorting result, which is used to represent the comparison result between the first feature vector and the fifth feature vector, which corresponds to the sixth information and is stored in the third storage unit, and the second sub-comparison result is in the second comparison result; and filter the third information using the third sorting result to obtain the fourth information.

[0159] In some cases, the provided information retrieval device can execute information retrieval methods, possessing corresponding functional modules and beneficial effects for executing the methods. Further functional descriptions of the various modules and units described above are the same as those in the corresponding embodiments described above, and will not be repeated here.

[0160] Figure 7 This is a schematic diagram of the structure of an electronic device.

[0161] The following is a detailed reference. Figure 7 This diagram illustrates the structure of an electronic device suitable for implementing embodiments. The electronic device may include a processor (e.g., a central processing unit, graphics processor, etc.) 701, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 702 or a program loaded from memory 708 into random access memory (RAM) 703. The RAM 703 also stores various programs and data required for the operation of the electronic device. The processor 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output interface 705 is also connected to the bus 704.

[0162] Typically, the following devices can be connected to the input / output interface 705: input devices 706 including, for example, a touchscreen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 707 including, for example, a liquid crystal display, speaker, vibrator, etc.; memory devices 708 including, for example, magnetic tape, hard disk, etc.; and communication devices 709. Communication devices 709 allow electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 7 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown, and more or fewer devices may be implemented or have instead.

[0163] Specifically, the processes described in the flowchart above can be implemented as computer software programs. For example, a computer program product includes a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network via communication device 709, or installed from memory 708, or installed from ROM 702. When the computer program is executed by processor 701, it performs the functions defined in the information retrieval method.

[0164] Figure 7 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments.

[0165] In other cases, a computer-readable storage medium is also provided, in which the methods described in the embodiments can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code originally stored on a remote storage medium or a non-transitory machine-readable storage medium and subsequently stored on a local storage medium after being downloaded over a network. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium may be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium may also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the information retrieval methods shown in the embodiments described above.

[0166] In some cases, certain components can be used as computer program products, such as computer program instructions. When executed by a computer, these instructions, through the operation of the computer, can invoke or provide information retrieval methods and / or technical solutions. Those skilled in the art will understand that the forms in which computer program instructions exist in computer-readable media include, but are not limited to, source files, executable files, and installation package files. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instruction; the computer compiling the instruction and then executing the corresponding compiled program; the computer reading and executing the instruction; or the computer reading and installing the instruction and then executing the corresponding installed program. Here, computer-readable media can be any available computer-readable storage medium or communication medium accessible to a computer.

[0167] Although some embodiments have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the information retrieval method described above, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. An information retrieval method, the method comprising: Obtain first information; Obtain the first feature vector of the first information and the first discrete codeword of the first information; By comparing the first discrete codeword with the second discrete codeword, a first comparison result is obtained, and the second discrete codeword corresponds to the second information. The second information is filtered using the first comparison result to obtain the third information; By comparing the first feature vector with the second feature vector, a second comparison result is obtained, and the second feature vector corresponds to the third information; The third information is filtered using the second comparison result to obtain the fourth information, which is used to characterize the retrieval result of the first information.

2. The method according to claim 1, wherein the first discrete codeword includes a first sub-codeword, the first sub-codeword being used to characterize the codeword in the first discrete codeword that is in a first bit interval, the first bit interval including the highest bit; The comparison of the first discrete codeword and the second discrete codeword to obtain the first comparison result includes: A third sub-codeword is obtained from the first storage and computing unit, the third sub-codeword being used to characterize the codeword in the second discrete codeword that is located in the first bit interval; By comparing the first sub-codeword with the third sub-codeword, the first comparison result is obtained.

3. The method according to claim 2, wherein the first discrete codeword further includes a second sub-codeword, the second sub-codeword being used to characterize a codeword in a second bit interval of the first discrete codeword, and the second bit interval being used to characterize bit intervals in the bit intervals of the first discrete codeword other than the first bit interval; The step of filtering the second information using the first comparison result to obtain the third information includes: Using the first comparison result to filter the second information, we obtain the fifth information; A fourth sub-codeword is obtained from the second storage unit, and a fifth sub-codeword is obtained from the first storage and computing unit. The fourth sub-codeword is used to characterize the codeword in the third discrete codeword that is located in the second bit interval. The third discrete codeword corresponds to the fifth information. The fifth sub-codeword is used to characterize the codeword in the third discrete codeword that is located in the first bit interval. By concatenating the fourth sub-codeword with the fifth sub-codeword, a fourth discrete codeword is obtained; Obtain the first quantization distance between the first discrete codeword and the fourth discrete codeword; The third information is obtained by filtering the fifth information using the first quantization distance.

4. The method according to claim 3, wherein obtaining the fourth subcodeword from the second storage unit comprises: Obtain the residual vector from the second storage unit, the residual vector corresponding to the fifth information; The residual vector is quantized to obtain the fourth subcodeword.

5. The method according to claim 3, wherein filtering the fifth information using the first quantization distance to obtain the third information comprises: The fifth information is sorted using the first quantized distance to obtain a first sorting result; The third information is obtained by filtering the fifth information using the first sorting result.

6. The method according to claim 2, wherein filtering the second information using the first comparison result to obtain the third information includes: Using the first comparison result to filter the second information, we obtain the fifth information; A third feature vector is obtained from the third storage unit, and the third feature vector corresponds to the fifth information; The third feature vector is quantized to obtain the fifth discrete codeword; Obtain the second quantization distance between the first discrete codeword and the fifth discrete codeword; The third information is obtained by filtering the fifth information using the second quantization distance.

7. The method according to claim 1, wherein filtering the third information using the second comparison result to obtain the fourth information includes: Obtain an initial sorting result, which corresponds to the third information, and the initial sorting result is obtained using the first comparison result corresponding to the third information; Obtain the third quantization distance, which is used to characterize the distance between adjacent sixth discrete codewords, and the sixth discrete codeword corresponds to the third information; In response to the third quantization distance being located in the first distance interval, the sorting order between the third information is corrected using the first sub-comparison result to obtain a first correction result. The first sub-comparison result is used to characterize the comparison result between the first feature vector and the fourth feature vector. The fourth feature vector is stored in the third storage unit and corresponds to the third information. The first sub-comparison result is in the second comparison result. The initial sorting result is updated using the first correction result to obtain the second sorting result; The third information is filtered using the second sorting result to obtain the fourth information.

8. The method according to claim 1, wherein filtering the third information using the second comparison result to obtain the fourth information includes: Obtain an initial sorting result, which corresponds to the third information, and the initial sorting result is obtained using the first comparison result corresponding to the third information; A sixth piece of information is selected from the third piece of information, and the sixth piece of information is used to characterize multiple pieces of the third piece of information that are in consecutive positions in the initial sorting result; The initial sorting result is updated using the second sub-comparison result to obtain the third sorting result. The second sub-comparison result is used to characterize the comparison result between the first feature vector and the fifth feature vector. The fifth feature vector corresponds to the sixth information. The fifth feature vector is stored in the third storage unit. The second sub-comparison result is in the second comparison result. The third information is filtered using the third sorting result to obtain the fourth information.

9. An information retrieval device, the device comprising: The first acquisition module is used to acquire first information; The second acquisition module is used to acquire the first feature vector of the first information and the first discrete codeword of the first information; The first comparison module is used to compare the first discrete codeword with the second discrete codeword to obtain a first comparison result, wherein the second discrete codeword corresponds to the second information. The first filtering module is used to filter the second information using the first comparison result to obtain the third information; The second comparison module is used to compare the first feature vector with the second feature vector to obtain a second comparison result, wherein the second feature vector corresponds to the third information. The second filtering module is used to filter the third information using the second comparison result to obtain the fourth information, which is used to characterize the retrieval result of the first information.

10. An electronic device, comprising: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the information retrieval method of any one of claims 1 to 8 by executing the computer instructions.

11. A computer-readable storage medium storing computer instructions for causing a computer to perform the information retrieval method according to any one of claims 1 to 8.

12. A computer program product comprising computer instructions for causing a computer to perform the information retrieval method according to any one of claims 1 to 8.