Data search method and device

By uninstalling ANNS calculations on the CMM-DC device, the problems of high CPU occupancy and long query delay in the prior art are solved, and more efficient data search and query are achieved.

CN120277244APending Publication Date: 2025-07-08SAMSUNG (CHINA) SEMICONDUCTOR CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510272718.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-07
Publication Date
2025-07-08

AI Technical Summary

Technical Problem

The existing approximate nearest neighbor search (ANNS) schemes have problems such as high CPU occupancy, long query delay, frequent data transfer and invalid data transfer when processing massive data sets, resulting in system performance degradation.

Method used

By unloading part of the ANNS's calculations using the CMM-DC device, using its integrated computing and storage capabilities, reducing CPU load and optimizing data processing flow, including performing conditional filtering and distance calculations in the CMM-DC device, reducing invalid data transmission.

Benefits of technology

It reduces the computing pressure and inventory of CPU, improves query efficiency, reduces latency, optimizes data transmission, and improves query accuracy and system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120277244A_ABST
    Figure CN120277244A_ABST
Patent Text Reader

Abstract

The invention provides a data searching method and device. The method comprises the steps that a user input vector is obtained through a host; determining, by at least one CMM-DC device, M objects closest to the user input vector distance from a data set stored in the at least one CMM-DC device; and the host determines K objects closest to the user input vector from the M objects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of data search, and more specifically, to a data search method and device. Background Art

[0002] Approximate Nearest Neighbor Search (ANNS) is widely used as a core subroutine for search recommendation, machine learning, and information retrieval, and serves as one of the infrastructures for ChatGPT and other related applications based on the Large Language Model (LLM). With the rapid development of modern artificial intelligence applications, it has become increasingly important to establish an efficient ANNS solution to handle massive datasets.

[0003] Currently, many AI systems (e.g., production-level recommendation systems) can generate datasets in the order of billions. To perform ANNS, tens of terabytes of working memory space are required, which significantly increases the memory demand and pressure. Due to the limitation of memory capacity, the ANNS algorithm faces a fundamental trade-off between query latency and accuracy. Existing ANNS solutions usually use compressed data or hierarchical storage to expand memory, such as using Solid State Drives (SSDs) to expand memory, to address this issue.

[0004] Most current ANNS solutions are based on heterogeneous storage hardware architectures to store and process datasets in the order of billions, but still have the following problems:

[0005] 1) High CPU occupancy

[0006] Almost all calculations rely on the CPU, thus increasing the CPU occupancy and resulting in relatively high latency.

[0007] 2) Massive data transfer

[0008] A large amount of data is transferred between the CPU and memory, resulting in a relatively low Queries Per Second (QPS).

[0009] 3) Transfer of invalid data

[0010] Condition filtering is placed before or after ANNS processing, resulting in the transfer of a large amount of invalid data, thus wasting bandwidth and CPU resources.

[0011] Therefore, there is an urgent need for an ANNS method and device that can improve query accuracy while reducing query latency. Summary of the Invention

[0012] The object of the present invention is to provide a data search method and device to at least solve the problems in the above related technologies, or may not solve any of the above problems.

[0013] According to one aspect of an embodiment of the present disclosure, a data search method is provided, including: obtaining a user input vector by a host; determining M objects closest to the user input vector from a data set stored in the at least one CMM-DC device by the at least one CMM-DC device; and determining K objects closest to the user input vector from the M objects by the host.

[0014] According to an embodiment of the present disclosure, first the CMM-DC device performs ANNS, and then the host determines the final ANNS result based on the ANNS result of the CMM-DC device, which enables part of the calculation of ANNS to be offloaded to the CMM-DC device, thereby reducing the computational pressure on the CPU and at the same time reducing the memory access volume of the host CPU.

[0015] Optionally, the data set includes a plurality of data subsets, the number of the at least one CMM-DC device is n, and the step of determining M objects closest to the user input vector includes determining K objects closest to the user input vector from the data subsets corresponding to each CMM-DC device among the plurality of data subsets by each CMM-DC device in the at least one CMM-DC device; and determining n*K objects closest to the user input vector in each data subset determined by each CMM-DC device as the M objects, where n is the number of CMM-DC devices in the at least one CMM-DC device.

[0016] According to an embodiment of the present disclosure, through the parallel computing of the CMM-DC device, the time delay of ANNS can be reduced.

[0017] Optionally, the step of determining K objects closest to the user input vector from the data subsets corresponding to each CMM-DC device among the plurality of data subsets by each CMM-DC device in the at least one CMM-DC device includes: filtering the objects in the data subsets corresponding to each CMM-DC device based on the filtering conditions included in the user input vector to obtain the filtered data subsets corresponding to each CMM-DC device; and determining K objects closest to the user input vector from the filtered data subsets corresponding to each CMM-DC device as the K objects closest to the user input vector determined from the data subsets corresponding to each CMM-DC device.

[0018] According to an embodiment of the present disclosure, since conditional filtering is performed in the CMM-DC device, invalid data (i.e., data that does not meet the filtering conditions) can be prevented from being sent to the host.

[0019] Optionally, the distance indicates Euclidean distance, inner product distance, or cosine distance.

[0020] Optionally, the method further includes: dividing the data set into the multiple data subsets by the at least one CMM-DC device.

[0021] Optionally, the data subset corresponding to each CMM-DC device is stored in each CMM-DC.

[0022] Optionally, the method further includes: dividing the data set into the multiple data subsets by the host.

[0023] According to another aspect of an embodiment of the present disclosure, there is provided a data search device, including: a host configured to obtain a user input vector; and at least one CMM-DC device configured to: determine M objects closest in distance to the user input vector from a data set stored in the at least one CMM-DC device, wherein the host is further configured to: determine K objects closest in distance to the user input vector from the M objects.

[0024] Optionally, the data set includes multiple data subsets, the number of the at least one CMM-DC device is n, and each CMM-DC device in the at least one CMM-DC device is configured to: determine K objects closest in distance to the user input vector from the data subset corresponding to each CMM-DC device among the multiple data subsets, wherein the n*K objects determined by the at least one CMM-DC device from the data subsets corresponding to the at least one CMM-DC device among the multiple data subsets are determined as the M objects.

[0025] Optionally, each CMM-DC device in the at least one CMM-DC device is configured to: filter the objects in the data subset corresponding to each CMM-DC device based on a filtering condition included in the user input vector to obtain a filtered data subset corresponding to each CMM-DC device; and determine K objects closest to the user input vector from the filtered data subset corresponding to each CMM-DC device as the K objects closest in distance to the user input vector determined from the data subset corresponding to each CMM-DC device.

[0026] Optionally, the distance indicates Euclidean distance, inner product distance, or cosine distance.

[0027] Optionally, the at least one CMM-DC device is further configured to: divide the data set into the multiple data subsets.

[0028] Optionally, the data subset corresponding to each CMM-DC device is stored in each CMM-DC.

[0029] Optionally, the host is further configured to: divide the data set into the multiple data subsets.

[0030] According to another aspect of an embodiment of the present disclosure, there is provided a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor implements the data search method as described above. Description of the Drawings

[0031] Through the following description with reference to the drawings exemplarily showing embodiments, the above and other objects and features of the present invention will become clearer, where:

[0032] Figure 1 A flowchart of the ANNS method according to an embodiment of the present disclosure is shown;

[0033] Figure 2 An overall architecture diagram of the ANNS method according to an embodiment of the present disclosure is shown;

[0034] Figure 3 A schematic diagram of a single CMM-DC device performing Top-K calculation is shown;

[0035] Figure 4 A flowchart of the ANNS method with filtering conditions according to an embodiment of the present disclosure is shown;

[0036] Figure 5 A flowchart of the process of storing a data set or a data subset according to an embodiment of the present disclosure is shown; and

[0037] Figure 6 A block diagram of the structure of a data search device according to an embodiment of the present disclosure is shown. Detailed Description of the Embodiments

[0038] In the following, various embodiments of the present disclosure will be described with reference to the accompanying drawings, in which the same reference numerals are used to denote the same or similar elements, features, and structures. However, it is not intended to limit the present disclosure to the specific embodiments described herein, and it is intended that the present disclosure cover all modifications, equivalents, and / or alternatives thereof, as long as they are within the scope of the appended claims and their equivalents. The terms and words used in the following description and claims are not limited to their dictionary meanings, but are used only to enable a clear and consistent understanding of the present disclosure. Therefore, it should be apparent to those skilled in the art that the following description of the various embodiments of the present disclosure is for illustrative purposes only and not for the purpose of limiting the present disclosure defined by the appended claims and their equivalents.

[0039] It should be understood that, unless the context clearly indicates otherwise, the singular forms include the plural forms. The terms "comprising", "including", and "having" used herein indicate the presence of the disclosed functions, operations, or elements, but do not exclude other functions, operations, or elements.

[0040] For example, the expression "A or B", or "at least one of A and / or B" may indicate A and B, A or B. For example, the expression "A or B" or "at least one of A and / or B" may indicate (1) A, (2) B, or (3) both A and B.

[0041] In various embodiments of the present disclosure, it is intended that when a component (e.g., a first component) is referred to as being "coupled" or "connected" to another component (e.g., a second component) or being "coupled" or "connected" to another component (e.g., a second component), the component may be directly connected to the other component, or may be connected through another component (e.g., a third component). In contrast, when a component (e.g., a first component) is referred to as being "directly coupled" or "directly connected" to another component (e.g., a second component) or being directly coupled to or directly connected to another component (e.g., a second component), there is no other component (e.g., a third component) between the component and the other component.

[0042] The expression "configured to" used in describing various embodiments of the present disclosure may be interchangeably used with expressions such as "suitable for", "capable of...", "designed to", "fitted to", "manufactured to", and "able to", for example, according to circumstances. The term "configured to" does not necessarily indicate "specially designed" in accordance with hardware. Instead, in some cases, the expression "a device configured to..." may indicate that the device and another device or part "are capable of...". For example, the expression "a processor configured to execute A, B, and C" may indicate a dedicated processor (e.g., an embedded processor) for executing the corresponding operations or a general-purpose processor (e.g., a central processing unit CPU or an application processor (AP)) for executing the corresponding operations by executing at least one software program stored in a memory device.

[0043] The terms used herein are for describing certain embodiments of the present disclosure, but are not intended to limit the scope of other embodiments. Unless otherwise indicated herein, all terms used herein (including technical or scientific terms) may have the same meaning as commonly understood by those skilled in the art. Generally, terms defined in a dictionary should be regarded as having the same meaning as their context in the relevant art, and should not be construed differently or be construed as having an overly formal meaning unless explicitly defined herein. In any case, the terms defined in the present disclosure are not intended to exclude embodiments of the present disclosure.

[0044] As understood by those skilled in the art, ANNS refers to a method for searching for approximate nearest neighbor points (or objects) of a given query point (or input vector) in a large dataset, which can reduce the computational amount required for searching for nearest neighbor points in a high-dimensional space by constructing a specific data structure (e.g., a KD-Tree based on space partitioning, locality-sensitive hashing (LSH), etc.) or using specific algorithmic logic. ANNS is widely applied in fields such as recommendation systems, image retrieval, and pattern recognition.

[0045] To solve the problem of memory capacity limitations for ANNS, most current ANNS solutions are based on heterogeneous storage hardware architectures to store and process datasets.

[0046] For example, Microsoft's HM-ANN solution based on heterogeneous storage (where Optane Persistent Memory module (PMM) and DRAM are used to build heterogeneous storage) stores data in a hierarchical manner when building a system. It stores the Navigation Graph in a fast storage device (e.g., DRAM), and other data in a relatively slow storage device (e.g., Optane PMM). By building a high-quality navigation graph, most accesses during search occur in DRAM, and accesses in PMM are reduced, that is, most searches occur in fast memory, and searches in slow memory are minimized as much as possible to improve the ANNS speed.

[0047] However, this solution still stores the complete data set in PMM and the navigation graph in DRAM. There is a large amount of data transfer between the CPU, memory, and PMM, which consumes a large amount of bandwidth. Operations such as vector distance calculation, candidate update, and navigation graph update all rely on the CPU, resulting in a high CPU occupancy rate.

[0048] For another example, Microsoft's DiskAN solution proposes a new algorithm called Vamana. This algorithm can generate a graph index with a diameter smaller than that of the Navigating Spreading-out Graph (NSG) and the Hierarchical Navigable Small World Graph (HNSW), enabling DiskANN to minimize the number of disk sequential reads to the greatest extent. Then, it stores the compressed graph index in DRAM, and the remaining data in SSD. Finally, it accelerates ANNS by prefetching and caching possible nodes in advance. This solution can help commodity-level solid-state drives effectively support large-scale ANNS.

[0049] However, this solution uses a compression method, considering that a query hitting the compressed index is considered a hit on the data, which will have a negative impact on the accuracy and recall rate of the results. This solution stores all data in SSD, and its read and write performance is much lower than that of DRAM, resulting in higher latency. For this solution, all calculations are completed by the CPU, resulting in a large amount of compressed data and raw data being exchanged between SSD, DRAM, and CPU, which reduces the system performance.

[0050] Figure 1 The flowchart of the data search method according to an embodiment of the present disclosure is shown.

[0051] Referring to Figure 1 , in step S101, a user input vector is obtained by the host.

[0052] For ease of description, the host and user input vector described herein may also be referred to as a host device and a user query vector, respectively.

[0053] As an example, the user input vector may or may not include a filtering condition.

[0054] Those skilled in the art should understand that the operations performed by the host described herein may also be expressed as operations performed by the host CPU.

[0055] In step S102, M objects closest in distance to the user input vector are determined from the data set stored in the at least one CMM-DC (CXL Memory Module, D: DRAM, C: Compute) device through the at least one CMM-DC device.

[0056] Those skilled in the art should understand that the M objects indicate approximate nearest neighbors found based on ANNS from the data set stored in the at least one CMM-DC device.

[0057] As understood by those skilled in the art, the CMM-DC device is a computing memory developed by Samsung, which includes a computing unit (or accelerator) and a storage unit (DRAM bank). Since the CMM-DC device supports the CXL specification, its connection speed and efficiency with the CPU can be improved.

[0058] As an example, the step of determining M objects closest in distance to the user vector may be performed by adding corresponding logic in the CMM-DC device or the accelerator of the CMM-DC device.

[0059] As an example, the CMM-DC device may send the distances between the obtained M objects and the user query vector and / or the M objects to the host memory.

[0060] In step S103, K objects closest in distance to the user input vector are determined by the host from the M objects.

[0061] Those skilled in the art should understand that the K objects indicate approximate nearest neighbors found based on ANNS from the M objects.

[0062] As an example, the step of determining K objects closest in distance to the user vector may be performed by adding corresponding logic in the host CPU.

[0063] As an example, K is a preset value or is determined based on user input.

[0064] As an example, K may be included in the user input vector.

[0065] As an example, the host can determine K objects that are closest in distance to the user input vector from M objects based on the distance between each of the M objects and the user query vector.

[0066] According to an embodiment of the present disclosure, first, the CMM-DC device performs ANNS, and then the host determines the final ANNS result based on the ANNS result of the CMM-DC device. This enables part of the calculation of ANNS to be offloaded to the CMM-DC device, thereby reducing the computational pressure on the CPU and reducing the memory access volume of the CPU.

[0067] In addition, since the full amount of data is stored in the DRAM bank of the CMM-DC device and the CMM-DC device supports the CXL specification, the embodiments of the present application can reduce the query latency.

[0068] As an example, the data set includes multiple data subsets (or sub-data sets), the number of the at least one CMM-DC device is n, and the step of determining M objects that are closest in distance to the user input vector includes: determining, by each CMM-DC device among the at least one CMM-DC device, K objects that are closest to the user input vector from the data subset corresponding to each CMM-DC device among the multiple data subsets; and determining the n*K objects determined by the at least one CMM-DC device from the data subsets corresponding to the at least one CMM-DC device among the multiple data subsets as the M objects.

[0069] As an example, the at least one CMM-DC device can form a CMM-DC pool or a CMM-DC device pool.

[0070] Figure 2 Shows an overall architecture diagram of a data search method according to an embodiment of the present disclosure.

[0071] Refer to Figure 2 , each CMM-DC device can perform ANNS on the data subset corresponding to each CMM-DC device to obtain ANNS sub-results. However, the host aggregates the ANNS sub-results obtained by each CMM-DC device and determines the final ANNS result from the aggregated sub-results through collaborative computing.

[0072] Those skilled in the art should understand that although Figure 2 shows that each CMM-DC device includes a filter, this is only an example. For example, each CMM-DC device may not include a filter.

[0073] Those skilled in the art should understand that the filter can be a logic unit built in the accelerator of the CMM-DC device.

[0074] As an example, the step of determining, by each of the at least one CMM-DC device, the K objects closest to the user input vector from the data subsets corresponding to each of the CMM-DC devices among the multiple data subsets includes: filtering the objects in the data subsets corresponding to each of the CMM-DC devices based on the filtering conditions included in the user input vector to obtain the filtered data subsets corresponding to each of the CMM-DC devices; and determining the K objects closest to the user input vector from the filtered data subsets corresponding to each of the CMM-DC devices as the K objects closest to the user input vector determined from the data subsets corresponding to each of the CMM-DC devices.

[0075] Those skilled in the art should understand that although the filtering conditions are described as being included in the user input vector above, this is only an example and does not limit the present disclosure. For example, the user input vector may not include filtering conditions, the user input vector and the filtering conditions may be included in the user input, or may be input into the host as different user inputs.

[0076] For example, CMM-DC may filter the objects in the data subsets corresponding to each of the CMM-DC devices based on a first user input indicating the filtering conditions to obtain the filtered data subsets, and then determine the K objects closest to the user input vector from the filtered data subsets corresponding to each of the CMM-DC devices based on a second user input indicating the user input vector.

[0077] As an example, the first user input and the second user input may be included in one user input.

[0078] For example, in order to search for a person corresponding to a certain picture in a database, if the picture and a height of not less than 170 are used as the input, the picture can be regarded as the user input vector, and a height of not less than 170 cm can be regarded as the filtering condition.

[0079] As an example, the filtering operation may be performed by adding corresponding logic in the CMM-DC device or the accelerator of the CMM-DC device.

[0080] As an example, the filtering operation may be performed by a filtering unit in the accelerator of the CMM-DC device based on the filtering conditions. Specifically, the host may send a filtering command to each of the parallel CMM-DC devices, and the CMM-DC device performs filtering on the objects in its corresponding data subset based on the filtering command.

[0081] As an example, each CMM-DC device can quantize the data in the data subset into INT8, FP16, or FP32 type, and then perform filtering on the quantized objects.

[0082] According to the embodiments of the present disclosure, since conditional filtering is performed in the CMM-DC device, invalid data (i.e., data that does not meet the filtering conditions) can be prevented from being sent to the host.

[0083] As an example, the distance described herein can indicate Euclidean distance (or L2 distance (L2-dist)), inner product (InnerProduct, IP) distance (IP-dist), or cosine distance (Cosine Distance, C-dist).

[0084] The CMM-DC device provides a set of Basic Linear Algebra Subprogram (BLAS) functions. For example, this set of functions includes BLAS1 for element-wise addition / multiplication or layer normalization and BLAS2 for vector matrix multiplication. Therefore, the CMM-DC device can use this set of functions to perform distance calculation between the user input vector and the objects in the data subset and update the candidate results. In addition, the CMM-DC device can perform parallel processing to accelerate the Top-K calculation.

[0085] Figure 3 A schematic diagram showing a single CMM-DC device performing Top-K calculation is shown.

[0086] Referring to Figure 3 , the CMM-DC device moves the objects in the data subset to the accelerator. The accelerator can use L2, IP, COSINE operators to parallelly calculate the distance between the user input vector and the objects in the data subset (which can be called potential neighbors or potential nodes), and then use the Max operator to determine the K objects with the closest distance query vector among the potential neighbors or the K shortest distances among the calculated distances.

[0087] Returning to Figure 2 or Figure 3 , after parallel calculation within the CMM-DC device, it is necessary to merge, summarize, and calculate the sub-results of each CMM-DC device in the CPU / DRAM, and then obtain the final ANNS result.

[0088] Specifically, the CMM-DC device sends the determined local Top-K results to the host memory, where the host can perform aggregation on the local Top-K results of at least one CMM-DC device using an aggregation operator, and then can use the MAX / Sort / SUM operator to determine the final Top-K results from the local Top-K results obtained from at least one CMM-DC device.

[0089] Figure 4 A flowchart showing a data search method with filtering conditions according to an embodiment of the present disclosure.

[0090] Referring to Figure 4 , in step S401, the host obtains a user input vector.

[0091] In step S402, a filtering unit is constructed in the CMM-DC device.

[0092] In step S403, the host sends the user input vector to each CMM-DC device.

[0093] In step S404, the filter unit is used in the CMM-DC device to parallelly filter nodes in the data subset.

[0094] In step S405, the distance calculation unit is used in the CMM-DC device to parallelly calculate the distance between the user input vector and potential nodes.

[0095] In step S406, the MAX calculation unit is used in the CMM-DC device to parallelly calculate the result set (or sub-result set) of the updated data subset.

[0096] In step S407, the result set of the data subset is obtained.

[0097] In step S408, the CMM-DC device sends the result set of the data subset to the host.

[0098] In step S409, the host performs aggregation and collaborative calculation on the result set of the data subset to obtain the final TOP-K result.

[0099] As an example, for the ANNS method without filtering conditions, steps S402 and S404 in Figure 4 can be omitted.

[0100] As an example, Figure 1 the method shown may further include: dividing the data set into the multiple data subsets by the at least one CMM-DC device.

[0101] As an example, the data subset corresponding to each CMM-DC device is stored in each CMM-DC device.

[0102] As an example, Figure 1 the method shown may further include: dividing the data set into the plurality of data subsets by the host.

[0103] Figure 5 A flowchart showing a process of storing a data set or a data subset according to an embodiment of the present disclosure is shown.

[0104] Referring to Figure 5 , in step S501, it is determined whether it is necessary to divide the data set or data into n data subsets, where n is an integer greater than 1.

[0105] As an example, it may be determined whether it is necessary to divide the data set into n data subsets according to the number of CMM-DC devices.

[0106] As an example, when it is determined that there is only one CMM-DC device, it may be determined that it is not necessary to divide the data set into n data subsets, and when it is determined that there are n CMM-DC devices, it may be determined that it is necessary to divide the data set into n data subsets.

[0107] In step S502, it is determined whether the CMM-DC device supports a computing logic unit.

[0108] In step S503, the computing logic unit of the CMM-DC device is used to perform distance calculations between objects in the data set to divide the data set into n data subsets.

[0109] As an example, a clustering method may be used to divide the data set into n data subsets.

[0110] In step S504, the data subsets are stored in the corresponding CMM-DC devices.

[0111] As an example, each CMM-DC device may store only one data subset.

[0112] In step S505, the data set is stored in one CMM-DC device.

[0113] In step S506, the host divides the data set into n subsets.

[0114] According to an embodiment of the present disclosure, using a CMM-DC device to store all data can avoid the influence of compressed data on the accuracy and recall rate of query results.

[0115] As an example, in a scenario where the data volume increases, only additional CMM-DC devices need to be added without special modification. Thus, the ANNS according to the embodiment of the present disclosure has good scalability.

[0116] In addition, for simple data filtering and distance calculation, the CMM-DC device is more environmentally friendly than the CPU / GPU, and the efficiency of the CMM-DC device is much higher than that of the GPU device, thereby reducing the energy consumption of ANNS.

[0117] Table 1 shows a comparison of the performance metrics of the ANNS method according to an embodiment of the present disclosure with the ANNS method in the related art.

[0118] Table 1

[0119]

[0120] Referring to Table 1, n represents the number of CMM-DC devices in the CMM-DC device pool, and this value is much smaller than N; K represents the number of results generated by a single CMM-DC device, which depends on the K parameter of the Top-K query, and the data volume of n*K results is much smaller than the data volume of the potential data.

[0121] According to an embodiment of the present disclosure, by offloading data-intensive calculations (e.g., distance calculation, conditional filtering) to the CMM-DC device, the host CPU occupancy and a large amount of data interaction between the CPU and memory are reduced, thereby improving the efficiency of ANNS.

[0122] The above reference Figures 1 to 5 The description of the data search method according to an embodiment of the present disclosure will be followed by a reference to Figure 6 Describe the data search device according to an embodiment of the present disclosure.

[0123] Figure 6 A block diagram showing the structure of a data search device according to an embodiment of the present disclosure.

[0124] Referring to Figure 6 , the data search device 600 may include: a host 610 and at least one CMM-DC device 620. Those skilled in the art should understand that the data search device 600 may additionally include other components, and at least one of the components included in the data search device 600 may be combined or split.

[0125] As an example, the host 610 may be configured to obtain a user input vector.

[0126] As an example, at least one CMM-DC device 620 may be configured to: determine M objects closest in distance to the user input vector from the data set stored in the at least one CMM-DC device.

[0127] As an example, the host 610 may further be configured to: determine K objects closest in distance to the user input vector from the M objects.

[0128] As an example, the data set includes a plurality of data subsets, the number of the at least one CMM-DC device 620 is n, and each of the at least one CMM-DC device 620 can be configured to: determine K objects closest to the user input vector from the data subset corresponding to each CMM-DC device among the plurality of data subsets, wherein, the n*K objects determined from the data subsets corresponding to the at least one CMM-DC device 620 among the plurality of data subsets by the at least one CMM-DC device 620 are determined as the M objects.

[0129] As an example, the at least one CMM-DC device 620 can be configured to: filter the objects in the data subset corresponding to each CMM-DC device based on the filtering conditions included in the user input vector to obtain a filtered data subset corresponding to each CMM-DC device; and determine K objects closest to the user input vector from the filtered data subset corresponding to each CMM-DC device as the K objects closest to the user input vector determined from the data subset corresponding to each CMM-DC device.

[0130] As an example, the distance indicates Euclidean distance, inner product distance or cosine distance.

[0131] As an example, the at least one CMM-DC device can also be configured to divide the data set into the plurality of data subsets.

[0132] As an example, the data subset corresponding to each CMM-DC device is stored in each CMM-DC.

[0133] As an example, the host can also be configured to divide the data set into the plurality of data subsets.

[0134] According to an embodiment of the present disclosure, a computer-readable storage medium storing instructions may also be provided, wherein when the instructions are run by at least one processor, the at least one processor is caused to execute the data search method according to the embodiment of the present disclosure. Examples of such computer-readable storage media include: read-only memory (ROM), programmable read-only memory (PROM), electrically erasable programmable read-only memory (EEPROM), random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), flash memory, non-volatile memory, CD-ROM, CD-R, CD+R, CD-RW, CD+RW, DVD-ROM, DVD-R, DVD+R, DVD-RW, DVD+RW, DVD-RAM, BD-ROM, BD-R, BD-R LTH, BD-RE, Blu-ray or optical disc memory, hard disk drive (HDD), solid state drive (SSD), cartridge memory (such as, multimedia card, secure digital (SD) card or extreme digital (XD) card), magnetic tape, floppy disk, magneto-optical data storage device, optical data storage device, hard disk, solid state disk, and any other device configured to store a computer program and any associated data, data files, and data structures in a non-transitory manner and to provide the computer program and any associated data, data files, and data structures to a processor or computer such that the processor or computer can execute the computer program. The computer program in the above computer-readable storage medium may run in an environment deployed in computer devices such as clients, hosts, proxy devices, servers, etc. In addition, in one example, the computer program and any associated data, data files, and data structures are distributed on a networked computer system such that the computer program and any associated data, data files, and data structures are stored, accessed, and executed in a distributed manner by one or more processors or computers.

[0135] According to an embodiment of the present disclosure, a computer program product may also be provided, and the instructions in the computer program product may be executed by a processor of a computer device to complete the data search method described herein.

[0136] Those skilled in the art will readily conceive of other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure, which follow the general principles of the present disclosure and include known common knowledge or conventional technical means in the technical field not disclosed by the present disclosure. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of the present disclosure are pointed out by the following claims.

Claims

1. A data search method, comprising: Obtaining a user input vector by a host; Determining M objects closest in distance to the user input vector from a data set stored in the at least one CMM-DC device by the at least one CMM-DC device; And Determining K objects closest in distance to the user input vector from the M objects by the host.

2. The method according to claim 1, wherein, The data set includes a plurality of data subsets, the number of the at least one CMM-DC device is n, and the step of determining M objects closest in distance to the user input vector includes: Determining K objects closest in distance to the user input vector from the data subsets corresponding to each CMM-DC device among the plurality of data subsets by each CMM-DC device in the at least one CMM-DC device; and Determining the n*K objects determined by the at least one CMM-DC device from the data subsets corresponding to the at least one CMM-DC device among the plurality of data subsets as the M objects.

3. The method according to claim 2, wherein, The step of determining K objects closest in distance to the user input vector from the data subsets corresponding to each CMM-DC device by each CMM-DC device in the at least one CMM-DC device includes: Filtering the objects in the data subsets corresponding to each CMM-DC device based on the filtering conditions included in the user input vector to obtain filtered data subsets corresponding to each CMM-DC device; and Determining K objects closest to the user input vector from the filtered data subsets corresponding to each CMM-DC device as the K objects closest in distance to the user input vector determined from the data subsets corresponding to each CMM-DC device.

4. The method according to claim 1, wherein The distance indicates Euclidean distance, inner product distance or cosine distance.

5. The method according to claim 2, further comprising: Dividing the data set into the plurality of data subsets by the at least one CMM-DC device.

6. The method according to claim 2, wherein the data subsets corresponding to each CMM-DC device are stored in each CMM-DC device.

7. The method according to claim 2, further comprising: Dividing the data set into the plurality of data subsets by the host.

8. A data search device, comprising: A host configured to obtain a user input vector; And At least one CMM-DC device configured to: determine M objects closest in distance to the user input vector from a data set stored in the at least one CMM-DC device, wherein The host is further configured to: determine K objects closest in distance to the user input vector from the M objects.

9. A computer-readable storage medium storing a computer program, wherein, When the computer program is executed by a processor, the processor is caused to implement the data search method according to any one of claims 1-7.