Information processing apparatus and method of controlling information processing apparatus
By performing data clustering and graphical search in the hierarchical memory structure of SSDs and DRAM, the problem of slow query response speed in the prior art is solved, and faster query response is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- KIOXIA CORP
- Filing Date
- 2022-07-28
- Publication Date
- 2026-05-19
AI Technical Summary
Existing approximate nearest neighbor search algorithms that use multiple heterogeneous memories have room for improvement in query response speed.
Using SSDs as high-capacity storage and DRAM as high-speed storage, the data is clustered into multiple clusters and hierarchical nearest neighbor search is performed at the L0 and L1 layers. Graphical information is used for fast filtering at the L1 layer, and then the cluster data is read together at the L0 layer for final determination.
It improves query response speed, reduces memory access time, and enhances query response efficiency.
Smart Images

Figure CN116257645B_ABST
Abstract
Description
[0001] This application enjoys priority based on Japanese Patent Application No. 2021-201065 (filed on December 10, 2021). This application incorporates the entire contents of that basic application by reference. Technical Field
[0002] This embodiment relates to an information processing apparatus and a method for controlling the information processing apparatus. Background Technology
[0003] Conventionally, there are apparatuses or methods that perform information processing by searching for similar data in response to a query that is taken as input data, and then outputting the results. In such apparatuses or methods, the information processing from query to output involves both query response speed and search accuracy. As an algorithm for nearest neighbor search that balances query response speed and search accuracy, the Approximate Nearest Neighbor Search (ANNS) algorithm, which utilizes multiple heterogeneous memories, is known.
[0004] However, based on existing algorithms that use approximate nearest neighbor search with multiple heterogeneous memories, there is room for improvement in query response speed. Summary of the Invention
[0005] One embodiment aims to provide an information processing apparatus that improves query response speed and a method for controlling the information processing apparatus.
[0006] According to one embodiment, an information processing apparatus includes a first memory, a second memory, and a processor. The first memory stores a plurality of first data, which are clustered into multiple clusters comprising one or more first data items based on the distance between them. The second memory stores a plurality of second data items, each corresponding one-to-one with one of the multiple clusters, and is capable of operation at a higher speed than the first memory. Each of the multiple second data items represents a corresponding cluster among the multiple clusters. The processor receives a query input and determines a third data item from the plurality of second data items as the closest second data item to the query. Furthermore, the processor reads one or more first data items contained in the clusters corresponding to the third data items from the first memory, and determines a fourth data item from the read first data items as the closest first data item to the query. The processor then outputs the fourth data item. Attached Figure Description
[0007] Figure 1This is a schematic diagram illustrating an example of the hardware structure of an information processing apparatus involved in an implementation.
[0008] Figure 2 This is a schematic diagram illustrating an example of SSD usage in an implementation method.
[0009] Figure 3 This is a schematic diagram used to illustrate the nearest neighbor search performed by the processor involved in the implementation.
[0010] Figure 4 This is a schematic diagram illustrating an example of DRAM usage in an implementation method.
[0011] Figure 5 This is a schematic diagram illustrating an example of representative data and a data configuration method involved in the implementation method.
[0012] Figure 6 This is a flowchart illustrating an example of the steps performed by the information processing apparatus according to the embodiment to save data to an SSD.
[0013] Figure 7 This is a flowchart illustrating an example of the nearest neighbor search steps performed by the information processing apparatus involved in the implementation.
[0014] Figure 8 This is a schematic diagram used to illustrate a clustering method involved in a variation of the implementation.
[0015] Figure 9 This is a schematic diagram illustrating an example of a data configuration method involved in a variation of the implementation method.
[0016] Label Explanation
[0017] 1. Information processing device; 2. Processor; 3. SSD; 4. DRAM; 5. Bus; 31. Graph information; 32. Search program; 33. Configuration program; 41. Working area; ADR address; S-size; CL cluster; D-data; RD-representative data. Detailed Implementation
[0018] The nearest neighbor search involved in the implementation is performed, for example, by an information processing device equipped with a processor, a first memory, and a second memory. The first memory is a memory with a larger capacity than the second memory. The second memory is a memory capable of operating at a higher speed than the first memory. Hereinafter, an example of implementing the nearest neighbor search involved in the implementation in a computer equipped with an SSD (Solid State Drive) as the first memory and DRAM (Dynamic Random Access Memory) as the second memory will be described.
[0019] Furthermore, the nearest neighbor search according to the embodiment can also be performed through the cooperation of two or more information processing devices interconnected by a network. Additionally, the nearest neighbor search according to the embodiment can also be performed in a storage device that uses a storage medium such as a NAND flash memory chip as the first memory, DRAM as the second memory, and a processor.
[0020] The information processing apparatus and method according to the embodiments will be described in detail below with reference to the accompanying drawings. However, this invention is not limited to these embodiments.
[0021] (Implementation Method)
[0022] Figure 1 This is a schematic diagram illustrating an example of the hardware structure of an information processing apparatus involved in an implementation.
[0023] Information processing device 1 is a computer comprising a processor 2, an SSD 3 (an example of a first memory), a DRAM 4 (an example of a second memory), and a bus 5 electrically connecting these components. However, the first and second memories are not limited to these. For example, the first memory can be any storage memory. The first memory can also be a UFS (Universal Flash Storage) device or a disk drive.
[0024] Processor 2 executes predetermined operations according to a computer program. Processor 2 is, for example, a CPU (Central Processing Unit). When a query is input as input data to information processing device 1, processor 2 uses SSD 3 and DRAM 4 to execute predetermined operations based on the input query.
[0025] SSD3 is a high-capacity storage device. SSD3 uses NAND flash memory as its storage medium.
[0026] DRAM4 has a smaller capacity than SSD3, but it can perform operations at a higher speed than SSD3.
[0027] Furthermore, the information processing device 1 can be connected to any input / output device. Input / output devices may include, for example, input devices, display devices, network devices, or printers.
[0028] Figure 2 This is a schematic diagram illustrating an example of using the SSD3 according to the implementation method.
[0029] Multiple data points D are stored in the SSD3. The type of each data point D is not limited to a specific category. Each data point D can be an image, a document, or any other type of information. The size of each data point D is set to be common across all data points D. Multiple data points D can be used as objects for nearest neighbor searches.
[0030] When a query is input as input data to the information processing device 1, the processor 2 searches for the nearest data D to the input query from the multiple data D stored in the SSD 3.
[0031] In this specification, distance is a measure of the similarity between data. Mathematically, distance is, for example, the Euclidean distance. However, the mathematical definition of distance is not limited to the Euclidean distance.
[0032] In addition, processor 2 can also search for multiple data D closest to the query in nearest neighbor search.
[0033] Multiple data points D constitute a diagram. In this specification, a diagram is data with a structure obtained by connecting multiple nodes with edges. In this case, each data point D is equivalent to a node. Diagram information 31, which specifies the connection relationships between nodes, is generated in advance by the designer or a predetermined computer program. Diagram information 31 is stored in SSD3.
[0034] Additionally, a search program 32 and a configuration program 33 are stored in the SSD3. The search program 32 is a computer program that causes the processor 2 to perform a nearest neighbor search. The configuration program 33 is a computer program that causes the processor 2 to configure data D, etc. The processor 2 loads the search program 32 and the configuration program 33 stored in the SSD3 into the DRAM4 for execution. The configuration method for data D, etc., according to the configuration program 33 will be described later.
[0035] Figure 3 This is a schematic diagram illustrating the nearest neighbor search performed by the processor 2 according to the embodiment.
[0036] In this implementation, the search space is divided into multiple layers. Here, as an example, the search space includes two layers: L0 and L1.
[0037] Layer L0 is the spatial distribution of data D stored on the SSD3. Data D stored on the SSD3 that are close to each other form a cluster CL. Therefore, Layer L0 includes multiple clusters CL. That is, the multiple data D that constitute Layer L0 are clustered into multiple clusters CL based on the distance between data D. Clustering can be performed in any way as long as it is based on the distance between data D. For example, the space of Layer L0 can be divided into a grid, and the dataset of data D within each grid can be set as a cluster CL. This allows two or more data D that are close to each other to be classified into a single cluster CL.
[0038] The number of data D that constitutes each cluster CL can be common to all cluster CLs, or it can be not. Alternatively, there can exist a cluster CL consisting of only one data D.
[0039] exist Figure 3 The data D is described in the middle. a ~D a+21 A total of 22 data points D are used as part of the data D contained in layer L0. Data D a ~D a+3 The datasets constitute a cluster CL b Data D a+4 constituting a cluster CL b+1 Data D a+5 ~D a+8 The datasets constitute a cluster CL b+2 Data D a+9 ~D a+13 The datasets constitute a cluster CL b+3 Data D a+14 ~D a+17 The datasets constitute a cluster CL b+4 Data D a+18 ~D a+21 The datasets constitute a cluster CL b+5 In this example, each data point D can belong to only one cluster CL.
[0040] A diagram illustrating the data set structure of the data D that makes up each cluster CL. Figure 3 In the diagram, the single-dotted line within layer L0 represents the edge connecting the data D. Data D is represented by a circle with a dotted shading. a+1 D a+4 D a+6 D a+9 D a+16 Da+20 These are the nodes that serve as the starting point for the search within a cluster CL, i.e., the entry points. Entry points are set according to the cluster CL. Furthermore, the construction of the diagram for each cluster CL in the L0 layer is described as diagrammatic information 31. The entry points in each cluster CL can be described as diagrammatic information 31, or as any other arbitrary information.
[0041] Representative data RD is calculated based on each cluster CL. This representative data RD is data that represents the dataset D belonging to that cluster. Subsequently, the cluster CL that forms the basis for calculating a particular representative data RD is recorded as the cluster CL corresponding to that representative data RD.
[0042] The method for calculating the representative data RD is not limited to a specific method. In one example, the representative data RD can also be data D selected from the dataset of data D constituting the corresponding cluster CL by any method. For example, the data D closest to the center of the cluster CL in the dataset constituting the cluster CL can be set as the representative data RD of the cluster CL. Alternatively, the representative data RD can also be data calculated using any arithmetic operation on the dataset of data D constituting the corresponding cluster CL. For example, the average of the dataset of data D constituting the cluster CL can be set as the representative data RD of the cluster CL. The representative data RD of each cluster CL can be calculated by the processor 2 or pre-calculated by the designer, etc. Furthermore, the size of each representative data RD is set to be common to all representative data RDs of all cluster CLs.
[0043] The representative data RDs of all clusters CL constitute the L1 layer.
[0044] exist Figure 3 The text describes representative data RD. c ~RD c+16 A total of 17 representative data points (RD) are used as part of the representative data RD constituting the L1 layer. c ~RD c+16 Each corresponds one-to-one with one of the multiple clusters CLs contained in the L0 layer. This example shows representative data RD. c+12 With cluster CL b+4 Correspondingly, representing data RD c+13 With cluster CL b+5 Correspondingly, representing data RD c+16 With cluster CL b correspond.
[0045] A diagram illustrating the structure of the dataset representing the data RD within layer L1. Figure 3In the diagram, the dashed lines within layer L1 represent the edges connecting data RDs. The circles marked with black represent data RDs. c This represents the entry point within layer L1. The construction of the diagram in layer L1 is recorded as diagram information 31. The entry point within layer L1 can be described as diagram information 31 or any other arbitrary information.
[0046] The representative data RD of the entire cluster CL is stored in DRAM4. Furthermore, when a query is input, processor 2 first performs a nearest neighbor search in the L1 layer according to the graph. Access to DRAM4 is faster than access to SSD3. Therefore, the nearest neighbor search performed in the L1 layer is executed at high speed.
[0047] For example, processor 2 first selects representative data RD as the entry point. c Next, processor 2 processes the representative data RD. c And connected by the edge to represent data RD c Representative data RD c+1 RD c+4 RD c+7 RD c+9 Calculate the distance to the query from the representative data RD. c RD c+1 RD c+4 RD c+7 RD c+9 Select the representative data RD that is closest to the query. c+7 Then, processor 2 processes the selected representative data RD. c+7 and connected by the edge to represent data RD c+7 Representative data RD c RD c+4 RD c+9 RD c+11 RD c+14 Calculate the distances to the query from each of these distances, and then select the representative data RD that is closest to the query from these distances. c+14 In this way, processor 2 determines the closest representative data RD to the query from all representative data RD by performing a graph-based nearest neighbor search.
[0048] Furthermore, in the diagram, a new selection connected to other nodes of a selected node by an edge is denoted as a hop.
[0049] After determining the representative data RD closest to the query, processor 2 reads the dataset D, which constitutes the cluster CL corresponding to the representative data RD, from SSD3 and stores it in DRAM4. Then, processor 2 performs a graph-based nearest neighbor search on the dataset D stored in DRAM4 to obtain the data D closest to the query. Finally, processor 2 outputs the determined data D as a response to the query.
[0050] exist Figure 3 In the example shown, when a query is input, processor 2 will represent the data RD c Starting from this point, jump in the order of the arrows to represent the data RD. c+16 The representative data RD is determined to be the closest to the query result. Then, processor 2 reads the data from SSD3 that is consistent with the representative data RD. c+16 Corresponding cluster CL b All data D a ~D a+3 And stored in DRAM4, for the data stored in DRAM4 D a ~D a+3 Perform a nearest neighbor search. In cluster CL b In the middle, data D a+1 It is set as the entry point. Processor 2 retrieves data from D. a+1 Begin the jump indicated by the arrow, transferring data D. a+3 The data D that is closest to the query result is identified, and the data D is output. a+3 This will be used as the query response. Furthermore, in Figure 3 In order to simplify the explanation, it is indicated that for data D... a ~D a+3 Arrows representing the order of jumps in the nearest neighbor search are depicted within the SSD3 data D. a ~D a+3 On the group. However, in reality, as mentioned above, data D a ~D a+3 The data stored in DRAM4, D a ~D a+3 Perform the jumps for nearest neighbor search in the order indicated by the arrows.
[0051] A technique compared to the implementation method will be described. The technique compared to the implementation method will be described as a comparative example. According to the comparative example, L1 layer is composed of several data points within L0 layer. A graph is constructed from all the data within L0 layer, and another graph is constructed from all the data within L1 layer. All the data within L0 layer is stored in a storage memory such as an SSD. All the data within L1 layer is stored in a memory capable of operating at a higher speed than storage memory such as DRAM. When a query is input, a graph-based nearest neighbor search is performed in L1 layer. Then, after determining the data closest to the query in L1 layer, the determined data is used as the entry point in L0 layer, and a graph-based nearest neighbor search is performed.
[0052] According to the comparative example, during nearest neighbor search in layer L0, access to storage memory is performed by skipping steps. Specifically, skipping steps execute the process of reading all data from storage memory that is edge-connected to the selected data. Therefore, the more skips, the longer the query response time.
[0053] In contrast, according to the implementation method, during the nearest neighbor search in layer L0, all data D of the cluster CL that constitutes the closest query are read together. Furthermore, by using only the read data D in the nearest neighbor search, the data closest to the query is determined. Therefore, according to the implementation method, compared to the comparative example, the time required to access the storage memory can be suppressed, and the time required for query response can be shortened. That is, the query response speed is improved.
[0054] Figure 4 This is a schematic diagram illustrating an example of the use of DRAM4 in an implementation method.
[0055] All representative data RD is stored in DRAM4.
[0056] Additionally, a working area 41 for the processor 2 is provided in DRAM4. Various programs (configuration program 33 or search program 32) are loaded in the working area 41 to cache the graphical information 31 and temporarily store the dataset that constitutes the cluster CL determined by the nearest neighbor search in the L1 layer.
[0057] Figure 5 This is a schematic diagram illustrating an example of a configuration method for representative data RD and data D involved in an implementation. The address space of DRAM4 and the address space of SSD3 are depicted in this diagram. The address space of DRAM4 is defined by the range of addresses that can be specified when the processor 2 accesses DRAM4. The address space of SSD3 is defined by the range of addresses that can be specified when the processor 2 accesses SSD3.
[0058] The datasets D constituting each cluster CL are configured in contiguous regions within the address space of SSD3. That is, the datasets D constituting a cluster CL are not configured in more than two separate regions. For example, processor 2 sends a read command to SSD3 containing the starting address of the region where the object set is configured and the size of the object set, for the dataset (object set) constituting the desired cluster CL. Thus, processor 2 can obtain the object set from SSD3 with a single read command. In other words, processor 2 can obtain all the data D required for nearest neighbor search in layer L0 with just one read from SSD3.
[0059] Each representative data RD within DRAM4 is configured in the address space of DRAM4 in association with the address ADR at the beginning of the represented region and the size S of that region, which is a region containing a dataset of data D constituting the corresponding cluster CL. Thus, processor 2 can determine, based on the representative data RD, the region containing the dataset of data D constituting the cluster CL corresponding to that representative data RD.
[0060] exist Figure 5 In the example shown, cluster CL f From data D e ~D e+3 The dataset consists of data D. e ~D e+3 The dataset is configured in a contiguous region within the SSD3 address space. From the cluster CL... f Calculated representative data RD d Data D was saved e ~D e+3 The address of the beginning of the region of the dataset (ADR) d and the size S of the area d It is associated with DRAM4.
[0061] Additionally, cluster CL f+1 From data D e+4 ~D e+7 The dataset consists of data D. e+4 ~D e+7 The dataset is configured in the address space of the SSD3, next to the configured data D. e ~D e+3 The contiguous region following the region of the dataset. From cluster CL f+1 Calculated representative data RD d+2 Data D was saved e+4 ~D e+7 The address of the beginning of the region of the dataset (ADR) d+2 and the size S of the area d+2It is associated with DRAM4.
[0062] Additionally, cluster CL f+2 From data D e+8 ~D e+11 The dataset consists of data D. e+8 ~D e+11 The dataset is configured in the address space of the SSD3, next to the configured data D. e+4 ~D e+7 The contiguous region following the region of the dataset. From cluster CL f+2 Calculated representative data RD d+1 Data D was saved e+8 ~D e+11 The address of the beginning of the region of the dataset (ADR) d+1 and the size S of the area d+1 It is associated with DRAM4.
[0063] Furthermore, if the amount of data D constituting each cluster CL is common across all cluster CLs, the size S can be omitted from the information associated with each representative data RD. In such a case, processor 2 specifies the fixed size when reading the dataset of data D constituting the desired cluster CL from SSD3.
[0064] Figure 6 This is a flowchart illustrating an example of the steps performed by the information processing apparatus 1 according to the embodiment to save data D to SSD 3. The series of actions shown in this figure are implemented by the processor 2 executing the configuration program 33. Alternatively, some or all of these actions may be performed by the designer, not the processor 2.
[0065] Multiple data points D are input to the information processing device 1 (S101). Then, the processor 2 clusters the multiple data points D into multiple clusters CL based on the distance between the data points D (S102).
[0066] Next, processor 2 configures each cluster CL on SSD3 (S103). In S103, processor 2 uses... Figure 5 As explained, the datasets that constitute the data D of each cluster CL are configured in contiguous regions within the address space of the SSD3. For example, processor 2 configures each cluster CL by sending write commands to the SSD3 specifying the regions to which the configuration destinations for each cluster CL are located.
[0067] Further, processor 2 calculates representative data RD according to cluster CL (S104). Then, processor 2 configures each representative data RD in DRAM4 in association with the start address of a region in the address space of the SSD3 configured with the corresponding cluster and the size of that region (S105).
[0068] Then, processor 2 generates diagrams in layer L0 and layer L1 (S106). Processor 2 describes the structure of the generated diagrams as diagram information 31 and saves the diagram information 31 in SSD3 (S107).
[0069] After S107, the process of saving data D to SSD3 is completed.
[0070] Furthermore, if a new data D is input while multiple data Ds are already stored in SSD3, processor 2 executes the processing after S102 again. When executing the processing after S102 again, processor 2 can perform processing on all data D obtained by adding the data D already stored in SSD3 to the newly input data D. Alternatively, processor 2 can perform processing only on data D obtained by adding the cluster CL near the newly input data D.
[0071] Furthermore, the series of steps described above is just one example. As long as... Figure 5 The steps for configuring data D and representative data RD as shown, and saving data D to SSD3, are not limited to the example above.
[0072] Figure 7 This is a flowchart illustrating an example of the nearest neighbor search steps performed by the information processing apparatus 1 according to the embodiment. The series of actions shown in this figure are implemented by the processor 2 executing the search program 32.
[0073] A query is input to the information processing device 1 (S201). Then, the processor 2 determines the representative data RD that is closest to the query in the L1 layer through the processing of S202 to S206.
[0074] Specifically, processor 2 retrieves the representative data RD of the entry point from DRAM 4 and sets it as the object representative data RD (S202). Processor 2 retrieves all representative data RDs connected to the object representative data RD by the edge from DRAM 4 (S203). Processor 2 calculates the distance from the object representative data RD and the distance from each of the representative data RDs connected to the object representative data RD by the edge to the query (S204). Processor 2 sets the representative data RD with the closest distance to the query as the object representative data RD (S205). Through the processing of S203 to S205, one jump in the L1 layer is completed.
[0075] Next, in S205, processor 2 determines whether the current object representative data RD is the closest to the query among all representative data RDs (S206). The determination method in S206 is not limited to a specific method. For example, if the object representative data RD has not been changed in the last executed processes S203 to S205, it can be presumed that the current object representative data RD is the closest to the query among all representative data RDs. Therefore, if the object representative data RD has not been changed in the last executed processes S203 to S205, processor 2 determines that the current object representative data RD is the closest to the query among all representative data RDs. If the object representative data RD has been changed in the last executed processes S203 to S205, processor 2 does not determine that the current object representative data RD is the closest to the query.
[0076] If it is not determined that the current object representative data RD is the closest to the query among all representative data RDs (S206: No), processor 2 executes the processing of S203 to S206 again.
[0077] If it is determined that the current object representative data RD is the closest to the query among all representative data RDs (S206: Yes), the processor 2 determines the region where the dataset constituting the cluster of data D corresponding to the current object representative data RD is stored (S207). In S207, the processor 2 determines the region where the dataset constituting the cluster of data D corresponding to the current object representative data RD is stored by obtaining the address ADR and size S associated with the current object representative data RD from DRAM 4.
[0078] Processor 2 sends a read command specifying the determined region to SSD3 (S208). Then, processor 2 saves the dataset of data D output by SSD3 in response to the read command in working area 41 (S209). Then, through the processing of S210 to S214, a nearest neighbor search is performed to determine the closest data D to the query in L0 layer.
[0079] Specifically, processor 2 retrieves the entry point data from the dataset D stored in working area 41 and sets it as object data (S210). Then, processor 2 retrieves all data D connected to object data D by edges from working area 41 (S211). Processor 2 retrieves the distances from object data D and all data D connected to object data D by edges to the query (S212). Processor 2 sets the data D with the closest distance to the query as object data D (S213). Through the processing of S211 to S213, one jump of the nearest neighbor search in L0 layer is completed.
[0080] Next, in S213, processor 2 determines whether the current object data D is closest to the query in the dataset of data D stored in work area 41, in other words, in the dataset of data D that constitutes the cluster CL corresponding to the representative data RD that is closest to the query (S214). The determination method in S214 is not limited to a specific method. For example, if the object data D has not been changed in the last executed processes S211 to S213, it can be presumed that the current object data D is closest to the query in the set of data D stored in work area 41. Therefore, if the object data D has not been changed in the last executed processes S211 to S213, processor 2 determines that the current object data D is closest to the query in the set of data D stored in work area 41. If the object data D has been changed in the last executed processes S211 to S213, processor 2 does not determine that the current object data D is closest to the query.
[0081] If it is not determined that the current object data D is closest to the query in the set of data D stored in the work area 41 (S214: No), the processor 2 executes the processing of S211 to S214 again.
[0082] If it is determined that the current object data D is closest to the query in the set of data D stored in the working area 41 (S214: Yes), the processor 2 outputs the current object data D as a query response (S215). Then, the series of actions of the nearest neighbor search ends.
[0083] Furthermore, the method of outputting the query response is arbitrary. Processor 2 can also generate data containing the query response and store it in a predetermined memory (e.g., SSD 3). If information processing device 1 is connected to a printer or display device, processor 2 can also output the query response to the printer or display device. If information processing device 1 is connected to a network, processor 2 can also output the query response to other computers via the network.
[0084] In the above description, processor 2 performed graph-based nearest neighbor search within the L1 layer and within the cluster CL corresponding to the closest queried representative data RD. Processor 2 can also perform nearest neighbor search in one or both of the L1 layer and within the cluster CL corresponding to the closest queried representative data RD using any method without using graphs.
[0085] For example, processor 2 can also determine the representative data RD closest to the query from all representative data RD in L1 layer by calculating the distance between all representative data RD in L1 layer and the query. Similarly, processor 2 can also determine the data D closest to the query by calculating the distance between all data D constituting the cluster CL corresponding to the representative data RD closest to the query and the query.
[0086] As described above, according to the implementation method, SSD3 stores multiple data Ds clustered into multiple clusters CLs based on the distance between data Ds. DRAM4 stores multiple representative data RDs, each corresponding one-to-one with one of the multiple clusters CLs. Each representative data RD is data representing the dataset of data D constituting its corresponding cluster CL. When processor 2 receives a query input, it determines the representative data RD closest to the input query from the multiple representative data RDs. Then, processor 2 reads the dataset of data D constituting the cluster CL corresponding to the determined representative data RD from SSD3. Then, processor 2 determines the data D closest to the query from the dataset of the read data Ds and outputs the determined data D as a query response.
[0087] Because the data D required for the nearest neighbor search within layer L0 is read from SSD3 simultaneously, the query response time is reduced compared to the comparative example where data needs to be read from SSD in jumps. In other words, according to the implementation method, the query response speed is improved.
[0088] In addition, according to the implementation method, multiple cluster CLs are each configured in a contiguous region of the SSD3 address space.
[0089] Therefore, processor 2 can obtain the required dataset D through a read command.
[0090] Furthermore, according to the implementation method, each representative data RD is stored in DRAM4 in association with the address at the beginning of the region configured with the corresponding cluster CL. Processor 2 obtains the address associated with the representative data RD determined to be the closest to the queried representative data RD, and sends a read command specifying the obtained address to SSD3.
[0091] In addition, each representative data RD is calculated from the dataset of data D that constitutes the corresponding cluster CL.
[0092] (Modified Example)
[0093] The above explanation assumes that each data point D belongs to only one cluster CL. However, each data point D can also belong to more than two cluster CLs.
[0094] Figure 8 This is a schematic diagram used to illustrate a clustering method involved in a variation of the implementation.
[0095] exist Figure 8 The data D is described in the text. g ~D g+19A total of 20 data points D are used as part of the data D contained in layer L0. Data D g ~D g+3 The datasets constitute a cluster CL h Data D g+3 ~D g+7 The datasets constitute a cluster CL h+1 Data D g+5 D g+7 ~D g+9 The datasets constitute a cluster CL h+2 Data D g+10 ~D g+14 The datasets constitute a cluster CL h+3 Data D g+14 ~D g+17 The datasets constitute a cluster CL h+4 Data D g+8 D g+12 D g+13 D g+18 The datasets constitute a cluster CL h+5 Data D g+9 D g+19 The datasets constitute a cluster CL h+6 .
[0096] Data D g+3 D g+5 D g+7 D g+8 D g+9 D g+12 D g+13 D g+14 Each belongs to one of two clusters CL. This allows a data point D to belong to two clusters CL. That is, it allows for a greater number of clusters CL to be set up while ensuring that the distribution ranges of the groups formed by the data D partially overlap between adjacent clusters CL. This enables more accurate nearest neighbor searches.
[0097] In addition, it is also permissible for a data D to belong to more than 3 clusters CL.
[0098] When multiple cluster CLs are configured so that a data D belongs to more than two cluster CLs, in the SSD3 address space, for example... Figure 9 Configure data D as shown. Figure 9 This is a schematic diagram illustrating a method for configuring data D in a variation of the implementation.
[0099] exist Figure 9 In the example shown, data D i ~D i+3 The datasets constitute a cluster CL jConfigured in a contiguous area of the SSD3. Data D i+3 ~D i+6 The datasets constitute a cluster CL j+1 In the address space of SSD3, the configuration is located at the address space where data D is stored. i ~D i+3 The region following the region of the dataset. Additionally, data D... i+2 D i+3 D i+7 D i+8 The datasets constitute a cluster CL j+2 In the address space of SSD3, it is configured to be connected to the D drive where the data is stored. i+3 ~D i+6 The region following the region of the dataset.
[0100] exist Figure 9 In the example shown, data D i+2 Belongs to cluster CL j and cluster CL j+2 Data D i+3 Belongs to cluster CL j Cluster CL j+1 and cluster CL j+2 Therefore, data D i+2 Configured in the configuration that constitutes the cluster CL j The data set D's regions and configurations constitute the cluster CL j+2 The dataset D consists of regions on both sides. Additionally, data D... i+3 Configured in the configuration that constitutes the cluster CL j The data set D is configured to be located in the region of the cluster CL. j+1 The data set region of data D and the configuration that makes up the cluster CL j+2 The entire dataset region of data D should be allocated. Thus, data D belonging to more than two clusters CL is configured in more than two locations within the SSD3 address space.
[0101] As described above, multiple data D stored in SSD3 can also include data D belonging to both a certain cluster CL and other cluster CLs.
[0102] As described in the embodiments and variations thereof, the space for nearest neighbor search is layered into two layers, one layer being configured in SSD3 as a first memory and the other layer being configured in DRAM4 as a second memory. Specifically, SSD3, serving as the first memory, stores multiple data Ds clustered into multiple clusters CLs based on the distances between data Ds. DRAM4, serving as the second memory, stores multiple representative data RDs, each corresponding one-to-one with one of the multiple clusters CLs. Each representative data RD is data representing the dataset of data D constituting its corresponding cluster CL.
[0103] Therefore, processor 2 can read the required data set D from the layer configured on SSD 3. Thus, according to the embodiment and its variations, the query response speed is improved compared to the comparative example. SSD 3, serving as the first memory, and DRAM 4, serving as the second memory, are connected to bus 5. The device (first device) having at least SSD 3, DRAM 4, and bus 5 can also be configured as a different device from the device having at least processor 2 (second device). The first device and the second device are connected via a predetermined interface and circuitry.
[0104] Furthermore, the space for nearest neighbor search can be divided into three or more layers. For example, the top layer of the three or more layers can be configured in DRAM4 as the second memory, and all other layers can be configured in SSD3 as the second memory.
[0105] Several embodiments of the present invention have been described above, but these embodiments are merely illustrative and not intended to limit the scope of the invention. These new embodiments can be implemented in a wide variety of other ways, and various omissions, substitutions, and modifications can be made without departing from the spirit of the invention. These embodiments and their variations are included within the scope and spirit of the invention, and are included within the scope of the invention as described in the claims and its equivalents.
Claims
1. An information processing device, comprising: The first memory stores a plurality of first data, which are clustered into multiple clusters including more than one first data based on the distance between the first data; The second memory stores multiple second data that correspond one-to-one with one of the multiple clusters, and is capable of operating at a higher speed than the first memory. The multiple second data represent data for one of the multiple clusters. as well as The processor accepts the input of the query, determines the third data as the closest second data to the query from the plurality of second data, reads the cluster corresponding to the third data from the plurality of clusters from the first memory, determines the fourth data as the closest first data to the query from one or more first data contained in the cluster read from the first memory, and outputs the fourth data.
2. The information processing device according to claim 1, The plurality of clusters are respectively configured in consecutive regions within the address space of the first memory used by the processor.
3. The information processing device according to claim 2, The plurality of second data are each stored in the second memory in association with the starting address of the region configured for the corresponding cluster. The processor obtains the address associated with the third data and sends a read command specifying the obtained address to the first memory.
4. The information processing apparatus according to any one of claims 1 to 3, The plurality of first data includes fifth data, which belongs to both the first cluster and the second cluster, which is different from the first cluster.
5. The information processing apparatus according to any one of claims 1 to 3, The plurality of second data are respectively calculated from one or more first data contained in one of the corresponding clusters of the plurality of clusters.
6. A method for controlling an information processing device, the information processing device comprising a first memory and a second memory, the first memory storing a plurality of first data, the plurality of first data being clustered into multiple clusters comprising one or more first data based on the distance between the first data, the second memory storing a plurality of second data corresponding one-to-one with one of the multiple clusters, capable of operations faster than the first memory, the plurality of second data being data representing a corresponding one of the multiple clusters, the method comprising: Input for accepting inquiries; From the plurality of second data, determine the third data that is closest to the second data in the query; The cluster corresponding to the third data is read from the first memory along with the clusters from the plurality of clusters. The fourth data is determined from the cluster containing more than one first data item read from the first memory as the first data item closest to the query; and Output the fourth data point.
7. An information processing device, comprising: The first memory stores a plurality of first data, which are clustered into multiple clusters including more than one first data based on the distance between the first data; The second memory stores multiple second data that correspond one-to-one with one of the multiple clusters, and is capable of operating at a higher speed than the first memory. The multiple second data represent data for one of the multiple clusters. as well as A bus that connects the first memory and the second memory.