Selective selection of items of a set
By determining the density in large project datasets and selecting appropriate project selection methods (EIS or NIS), the complexity problem caused by dataset size in the prior art is solved, and efficient project selection is achieved.
Patent Information
- Application Number
- CN202411497670.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2017-08-30
- Filing Date
- 2018-08-29
- Publication Date
- 2025-02-18
AI Technical Summary
When selecting projects one by one from large project datasets, the complexity is proportional to the dataset size, resulting in an increase in the average time for extracting or picking options, and the response time may deteriorate.
By determining whether the density of the dataset is sparse, if it is sparse, the items are repeatedly selected and removed using the Extreme Project Selection Method (EIS); if the density is not sparse, the linked list of items is created using the Next Index Selection Method (NIS) and the items are repeatedly selected using the Next Index Selection Method (NIS). .
It effectively reduces the computational complexity of selecting items from large data sets, improves selection efficiency, and reduces calculation time.
Smart Images

Figure CN119474478A_ABST
Abstract
Description
[0001] This application is a divisional application of application number 201810992966.6, filed on August 29, 2018, and entitled “One-by-one selection of items in a collection”.
[0002] CROSS-REFERENCE TO RELATED APPLICATIONS
[0003] This application claims priority from U.S. Patent Application No. 15 / 690,305, filed on August 30, 2017, which is incorporated herein by reference. Technical Field
[0004] The present invention relates generally to association computing, and more particularly to data mining algorithms using association computing. Background Art
[0005] Applications often need to pick or retrieve a few selected items one by one from a large dataset of items. The collection of selected items can be created in one of the following ways: manually selected by a user; created by an algorithm; or as a result of searching or any other process that produces the collection of items required by the application.
[0006] In a data set, items belonging to a collection are explicitly identified as being part of the collection. The items in the collection can be retrieved one by one, so that in each retrieval step, a single item from the collection is retrieved. After its retrieval, the retrieved item can be removed from the collection so that it is no longer retrieved. The method for picking which item to retrieve in each particular step is referred to herein as "item selection." It can be appreciated that the application can repeat the retrieval steps until all items in the collection have been retrieved and the collection is emptied.
[0007] It is assumed that the order in which items are retrieved from a collection has no implicit importance as long as all items in the collection are eventually retrieved. A naive "item selection" approach can be used to select items by their position in the data set. In each retrieval operation, the entire data set can be scanned, starting with the first item until an item belonging to the collection is found. Once read, a "read" indication can be assigned to the item that was read, and the application can perform the next retrieval operation.
[0008] It can be appreciated that the complexity of a single retrieval operation scanning the entire data set is O(N), where N is the size of the data set, and the complexity of reading the entire collection of P items is O(P*N). Summary of the invention
[0009] According to a preferred embodiment of the present invention, a method for selecting items one by one from a selected set of items in a large set of item data is provided. The method includes determining whether the density of the set is sparse. If the density is sparse, the method includes repeatedly performing an extreme item selection (EIS) method to select the next item in the selected items from the set and removing the next item from the set to create a next set. If the density is not sparse, the method includes performing a next index selection (NIS) method to create a linked list of selected items and repeatedly selecting the next selected item from the set.
[0010] Furthermore, in accordance with a preferred embodiment of the present invention, the data set is stored in an associative memory array.
[0011] Furthermore, according to a preferred embodiment of the present invention, the method further comprises: creating a label vector having the same size as the data set, wherein all indexes of selected items have a first value and all indexes of non-selected items have a second value.
[0012] Furthermore, according to a preferred embodiment of the present invention, the first value is "1" and the second value is "0".
[0013] Additionally, in accordance with a preferred embodiment of the present invention, the determining includes counting the number of first values in the tag vector to produce a size, dividing the size by the number of items in the data set, and comparing the division result with a predefined value to provide a density.
[0014] Furthermore, in accordance with a preferred embodiment of the present invention, the determining comprises counting the number of first values in the tag vector to produce a magnitude, and comparing the magnitude to a predefined value to provide a density.
[0015] According to a preferred embodiment of the present invention, a method for selecting a desired item from a set of selected items in a large data set of items is provided. The method comprises: for each tag bit in a tag vector, creating a combined value (CV) as the most significant bit (MSB) of the CV and creating an index of the items of the data set from the tag bit, the tag bit having a first value associated with each item in the set and a second value associated with each item not in the set; and selecting the desired item as the item whose CV has an extreme value.
[0016] Furthermore, according to a preferred embodiment of the present invention, the extreme value is a maximum value or a minimum value.
[0017] Furthermore, according to a preferred embodiment of the present invention, the MSB is the value of the mark bit when the extreme value is a maximum value, and the MSB is the inverse of the value of the mark bit when the extreme value is a minimum value.
[0018] According to a preferred embodiment of the present invention, a method for selecting one item at a time from a set of selected items in a large data set of items is provided. The method comprises: having a tag vector, wherein all indexes of selected items have a first value and all indexes of non-selected items have a second value. For a bit having a first value, the method comprises: calculating an increment from a first bit having the first value to a next bit having the first value in the tag vector, adding the increment to the index to create a linked list of indices of the items, selecting a first item of the list, and repeatedly selecting the next item whose tag bit has the first value from the linked list.
[0019] Additionally, according to a preferred embodiment of the present invention, the next item is an item whose index is a subsequent item in the linked list and whose flag bit has a first value.
[0020] Furthermore, in accordance with a preferred embodiment of the present invention, the increment has a maximum size.
[0021] Furthermore, according to a preferred embodiment of the present invention, the linked list further comprises an intermediate item whose tag bit has a second value, and wherein the selecting comprises: when the next item is the intermediate item, selecting the next item indicated by the intermediate item.
[0022] In addition, according to a preferred embodiment of the present invention, calculating the increment includes: creating an increment vector; starting all elements of the increment vector to a "0" value; for all bits in the increment vector simultaneously, if the value of the mark vector is a second value, adding 1 to the value of the current bit in the increment vector; and for all bits in the mark vector simultaneously, updating the mark vector by performing a Boolean operation between the value of a subsequent bit in the mark vector and the value of the current bit in the mark vector, thereby shifting the mark bit having the first value; and repeating the addition and updating a predetermined number of times.
[0023] Furthermore, according to a preferred embodiment of the present invention, when the first value is "1" and the second value is "0", the Boolean operation is an OR operation, and when the first value is "0" and the second value is "1", the Boolean operation is an AND operation.
[0024] According to a preferred embodiment of the present invention, an associative memory array is provided. The associative memory array comprises a plurality of associative memory cells arranged in rows and columns, wherein each first cell in a first row and first column can access the contents of a second cell in a second row in an adjacent column.
[0025] Furthermore, according to a preferred embodiment of the present invention, the first row and the second row are the same row.
[0026] In addition, according to a preferred embodiment of the present invention, the associative memory array further comprises, for each column, a multiplexer unit for selecting an adjacent column on the left side of the first column or an adjacent column on the right side of the first column.
[0027] Furthermore, according to a preferred embodiment of the present invention, the associative memory array further comprises, for each column, a logic unit for performing a Boolean operation between the content read from the first column and the content read from the second column.
[0028] Furthermore, in accordance with a preferred embodiment of the present invention, the associative memory array further comprises circuitry for storing the result of the Boolean operation in a cell in the first column.
[0029] According to a preferred embodiment of the present invention, a system for selecting items one by one from a set of items selected from a large set of item data is provided. The system includes an item selector, an extreme item selector (EIS), and a next index selector (NIS). The item selector determines whether the density of the set is sparse. If the set is sparse, the EIS repeatedly selects the next item of the selected item from the set and removes the next item from the set to create the next set. If the set is not sparse, the NIS creates a linked list of selected items and repeatedly selects the next selected item from the set.
[0030] Furthermore, in accordance with a preferred embodiment of the present invention, the system further comprises an associative memory array for storing the data set.
[0031] Furthermore, according to a preferred embodiment of the present invention, the system comprises: a labeling vector having the same size as the data set, wherein the indexes of the selected items are labeled with a first value and the indexes of the non-selected items are labeled with a second value.
[0032] Furthermore, according to a preferred embodiment of the present invention, the first value is "1" and the second value is "0".
[0033] According to a preferred embodiment of the present invention, a system for selecting a desired item from a set of selected items in a large item data set is provided. The system includes an associative memory array and an EIS. The associative memory includes a plurality of columns, each column for storing a combination value (CV), wherein a marker bit associated with each item of the item data set is the most significant bit (MSB) of each of the CVs, and an index associated with each item of the item data set provides the other bits of each of the CVs. The EIS selects the item associated with the CV having an extreme value.
[0034] Furthermore, according to a preferred embodiment of the present invention, the MSB is the value of the mark bit when the extreme value is the maximum value, and the MSB is the inverse of the value of the mark bit when the extreme value is the minimum value.
[0035] According to a preferred embodiment of the present invention, a system for selecting one item at a time from a set of selected items to be picked in a large data set of items is provided. The system includes an associative memory array and a NIS. The associative memory array includes a plurality of columns, each column being used to store a bit from a tag vector. The NIS initially calculates an increment from a first bit having a first value to a next bit having the first value in the tag vector, adds the increment to an index to create a linked list of indices of the tagged items, then selects the first item of the linked list, and repeatedly selects an item whose index is the next item in the linked list. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The subject matter which is regarded as the invention is particularly pointed out and distinctly claimed in the concluding portion of the specification. However, the invention (both as to its organization and method of operation, together with objects, features, and advantages thereof) may be further desirably described by reference to the following detailed description when read in conjunction with the accompanying Figure 1 is best understood when read together:
[0037] Figure 1 is a schematic diagram of an item selection system constructed and operative in accordance with a preferred embodiment of the present invention;
[0038] Figure 2A and Figure 2B is constructed and operated in accordance with a preferred embodiment of the present invention Figure 1 a schematic diagram of a portion of an associative memory array of a portion of a system;
[0039] Figure 3 is a schematic diagram of data stored in an associative memory array component according to a preferred embodiment of the present invention;
[0040] Figure 4 The description of the preferred embodiment according to the present invention is made by Figure 1 The state machine of the method used by the system;
[0041] Figure 5 is stored in the Figure 1 A schematic diagram of exemplary data in a system of and use of the extreme item selector therewith;
[0042] Figure 6 is stored in the Figure 1 A schematic diagram of exemplary data in a system of and use of the same by a next item selector;
[0043] Figure 7 is a diagram showing a preferred embodiment of the present invention. Figure 6 A flowchart of the steps performed by the next item selector of for building a linked list;
[0044] Figure 8 and Fig. 9 According to a preferred embodiment of the present invention, Figure 7 A schematic diagram of the process of creating and manipulating data to create deltas between items in a collection;
[0045] Fig.10 According to a preferred embodiment of the present invention, Figure 7 A schematic diagram of the final linked list created by the process; and
[0046] Fig.11 This is the project extraction process implemented by the next project selector according to the preferred embodiment of the present invention.
[0047] It should be appreciated that, for simplicity and clarity of illustration, the elements shown in the drawings are not necessarily drawn to scale. For example, for clarity, the size of some of the elements may be enlarged relative to other elements. In addition, reference numerals may be repeated in the drawings to indicate corresponding or similar elements where deemed appropriate. DETAILED DESCRIPTION
[0048] In the following detailed description, many specific details are set forth in order to provide a thorough understanding of the present invention. However, it will be appreciated by those skilled in the art that the present invention may be practiced without these specific details. In other instances, well-known methods, processes, and components are not described in detail to avoid obscuring the present invention.
[0049] Applicants have recognized that selecting items by scanning the entire data set, starting with the first item and then scanning all over again for each item in the set is not efficient because the complexity is proportional to the size of the data set. As the data set grows, the average time to extract or pick or select an item will increase, and response time may deteriorate.
[0050] Applicants have also recognized that associative memory devices can be used to store large data sets and can provide an efficient in-memory system that can perform an "item selection" method with a constant computational complexity of O(1) regardless of the size of the data set.
[0051] Memory devices that can provide such constant complexity are described in the following documents: U.S. Patent No. 8,238,173, entitled “USING STORAGE CELLS TO PERFORM COMPUTATION,” issued on August 7, 2012; U.S. Patent Publication No. US2015 / 0131383, entitled “NON-VOLATILE IN-MEMORY COMPUTING DEVICE,” published on May 14, 2015; U.S. Patent Publication No. 2015 / 0200009, entitled “MEMORY DEVICE,” published on July 16, 2015, which was issued as U.S. Patent No. 9,859,005 on January 2, 2018; U.S. Patent No. 9,418,719, entitled “IN-MEMORY COMPUTING DEVICE,” issued on August 16, 2016 COMPUTATIONAL DEVICE”) and U.S. Patent No. 9,558,812, issued on January 31, 2017, entitled “SRAM MULTI-CELLOPERATIONS”, which are assigned to the common assignee of the present invention and are incorporated herein by reference.
[0052] Now refer to Figure 1 Schematically illustrated is an item selection system 100 constructed and operative in accordance with a preferred embodiment of the present invention. Item selection system 100 includes an item selector 110 and an associative memory array 120 that can store a data set and any related information.
[0053] The item selector 110 may select an item from the collection according to one of the selection methods described below. The item selector 110 also includes a find and select (FS) vector 112, described in detail below, an "extreme item selector" (EIS) 114 that selects the item with the highest / lowest index in the collection, and a "next index selector" (NIS) 116 that selects the next item in the linked list of items.
[0054] The item selector 110 may add an indication of the selected item to the FS 112, which may be used to extract or pick the selected item. The item selector 110 may remove the indication from the FS 112 after the item is extracted. It may be appreciated that in each extraction operation, there is a single indication in the FS vector 112. The item selector 110 may also remove the item from the collection after the item has been extracted.
[0055] Associative memory array 120 may be constructed and operated in accordance with a preferred embodiment of the present invention and as now referred to Figure 2A and Figure 2B1 and 12. A memory device including a plurality of portions 122 is shown in more detail in FIG. The portions 122 may be arranged in rows 210 and columns 220 of memory cells 230, wherein the three columns are labeled LJ, J, and RJ. Each memory cell 230 may store its own data 232 and may access data 232 stored in adjacent memory cells on each side. As indicated by dashed arrow 241, MU-J may read data 232 stored in memory cell 230MU-LJ to its left, or may read data 232 stored in memory cell 230MU-RJ to its right, as indicated by dashed arrow 242.
[0056] Figure 2B Schematically shows a preferred embodiment of the present invention, constructed and operated with ( Figure 2A Circuit 200 may be associated with column J of portion 122 of memory cell MU-J. Circuit 200 may enable memory cell MU-J to access adjacent memory cells MU-RJ and MU-LJ, and may optionally perform Boolean operations between data 232 stored therein and data 232 of MU-J.
[0057] Circuit 200 includes two elements: a multiplexer (mux) 260 and a logic unit 280 and wires. The wires of circuit 200 provide connections between the memory cells 230 of column J and the elements of circuit 200. Wire 250-J can provide connections between the memory cells 230 of column J and logic unit 280. Wire 250-LJ can provide connections between the memory cells 230 of column-LJ and mux 260. Wire 250-RJ can provide connections between the memory cells 230 of column RJ and mux 260. It can be appreciated that the wires (250-LJ, 250-J, 250-RJ) between the columns (LJ, J, RJ) and the elements in circuit 200 can read the data 232 stored in any memory cell 230 in the column. Additionally or alternatively, the conductive lines 250 -LJ, 250 -J, and 250 -RJ may provide the results of performing a Boolean operation between the data 232 stored in the cells of the several memory cells 230 in the columns LJ, J, RJ, respectively.
[0058] Conductor 270 may provide a connection between mux 260 and logic unit 280, and conductor 290 may provide a connection between logic unit 280 and MU-J. Mux 260 may choose to read data 232 from MU-LJ or MU-RJ. Logic unit 280 may read data 232 from MU-J and may receive data from mux 260. Logic unit 280 may perform Boolean operations between data 232 read from MU-J and data received from mux 260. Logic unit 280 may write the result to memory cell 230 of column J, e.g., MU-J.
[0059] It can be appreciated that memory cell MU-J can replace its own stored data with data from neighboring memory cells using circuit 200. Memory cell MU-J can alternatively perform a Boolean operation between its own stored data 232 and data from neighboring memory cells, and can replace its own data with the result of the performed Boolean operation.
[0060] It can be appreciated that a similar circuit can be used with ( Figure 1 of the associative memory array 120 ( Figure 2A ) is associated with each column of each portion 122.
[0061] Now refer to Figure 3 1 shows data and how it is stored in an associative memory array 120. An associative memory array 120 may store a data set 310, an index 320 having a unique value associated with each item, and a tag vector 330. Each item of the data set 310 may be stored in a dedicated column 220 across several rows. An index associated with a particular item may be stored in the same column 220 as the particular item. The index may form a vector 320 stored in several rows of a memory portion 122. The rows 210 ( Figure 2A ) may be stored in the same column as a particular item and may indicate whether the item stored in the column is part of a set. In one embodiment of the invention, a value of 1 in a cell of the tag vector 330 may indicate that the item stored in the column is in the set (thus, a value of 0 in a cell of the tag vector 330 may indicate that the item stored in the column is not in the set).
[0062] like Figure 3 As shown, actual storage and most computations are done vertically in the columns. It can be appreciated that logical operations are performed in parallel on all columns 220, ie, simultaneously on data associated with all items stored in the data set.
[0063] Figure 3 An example data set 310 is provided that is stored in the associative memory array 120. The data set 310 stores data items: Data-0, Data-1, ... Data-n. In this example, of the entire data set, three items are in the selected set, namely those items with a value of 1 in the tag vector 330, and it can be appreciated that in this example, the data items Data-1, Data-2, and Data-x are selected and should be read.
[0064] Item selector 110 may use any suitable "item selection" method. As described above, EIS 114 may select the item with the highest / lowest index in the collection. And if a linked list of items in the collection is established and can be accessed in advance, NIS 116 may select the next item in the linked list of items starting from the first item in the list. Both EIS 114 and NIS 116 are described in detail below.
[0065] In one embodiment, the item selector 110 may select to use a method based on the density of the tag vector 330. As now referenced Figure 4 As shown, the item selector 110 may check (step 410) the density of the tag vector 330. The check may be done by counting the number of tags in the tag vector 330 and dividing the result by the number of items in the entire data set. If the ratio is less than a predefined value (e.g., 5%, 10%, 15%, etc.), the tag vector 330 may be considered sparse, otherwise it may be considered dense. Alternatively, the density may be determined by comparing the number of items in the set to a predefined value, and if the number of items in the set is less than the predefined value, the tag vector 330 may be considered sparse.
[0066] It can be appreciated that the density of tags can be evaluated in any other manner. When the tag vector 330 is sparse, as indicated in step 420, the item selector 110 can use the EIS 114, and when the tag vector 330 is dense, as indicated in step 430, the item selector 110 can use the NIS 116.
[0067] It may also be appreciated that the item selector 110 may select the EIS 114 or the NIS 116 based on considerations other than the density of the marker vectors 330. The item selector 110 may use only the EIS 114, only the NIS 116, or any mixture of the EIS 114 and the NIS 116.
[0068] The EIS 114 can consider the index associated with the data item stored in the data set and the tag associated with the data item (both stored in the same column) as one combined value (CV) associated with the data item, where the tag bit is the most significant bit (MSB) of the combined value and the index provides the remaining bits. Considering the CV in this way, it is guaranteed that: the selected item marked with a "1" in the tag vector 330 will have a greater value than the non-selected items marked with a "0" because a binary number with a 1 in its MSB is greater than a binary number with a 0 in its MSB; and that a single item will eventually be picked because each item has a unique index, so the CV is unique, and there will be a single extreme CV.
[0069] It can be appreciated that the EIS 114 can also consider the inverse of the index and tag bits (NOT-tag) as the MSB of the CV and find the lowest index in the set. Considering the CV in this manner, it is guaranteed that the selected items marked with "1" in the tag vector 330 will have 0 (not 1) as the MSB of their CV, thereby ensuring that they have a smaller value than the non-selected items that have 1 (not 0) in their MSB.
[0070] The EIS 114 may use any search method to find the maximum or minimum between CVs. It may be appreciated that US Pat. No. 9,859,005, incorporated by reference, may describe a method for finding the maximum in a data set that has a constant computational complexity regardless of the size of the data set and may be used by the EIS 114.
[0071] Now refer to Figure 5 Exemplary data stored in the system 100 and its use by the EIS 114 method are shown. The different data items stored in the system 100 are represented by several horizontal vectors: data 510 storing the actual data; index 520 storing the index of the stored items; and label vector 530 storing the selected set of items. Additional information used by the item selector 110 is the CV vector 540 and the FS vector 112, which have an indication of the items selected by the item selector 110 in a particular extraction request. It can be appreciated that the CV 540 may not actually be stored in the item selection system 100 and is shown here for clarity. Figure 5 It will be appreciated that for clarity, the value stored in position x of a vector is represented herein as vector[x].
[0072] exist Figure 5 In the example of , tag vector 530 includes indications in tag [2], tag [4], tag [7], tag [8], tag
[10] , and tag
[14] , which indicate that the items indexed 4, 7, 8, 10, and 14, respectively, are in the set of selected items. It can be appreciated that the data items located in those indices are data-2, data-4, data-7, data-8, data-10, and data-14, respectively. CV 540 can be created by referring to the bits of tag vector 530 as the MSB of the value created by the tag and the index of the data item. It can also be appreciated that the maximum values in CV 540 are 18, 20, 23, 24, 26, 30, which are associated with items data-2, data-4, data-7, data-8, data-10, and data-14 as expected.
[0073] Using the method described in U.S. Patent 9,859,005, item selector 110 may find the maximum number in CV 540. It may be appreciated that data item data-14 is associated with 30, which is the maximum value in CV 540. As shown, item selector 110 may set the value of FS
[14] to 1 in FS 112, and may then read the item associated with FS
[14] .
[0074] After reading / extracting an item, the item selector 110 may zero the flag
[14] (i.e., the bit associated with the relevant read data item), essentially removing the read item from the set. After zeroing the flag bit, CV
[14] may be recalculated and FS
[14] may be zeroed. The original value is indicated by column 220A, and the modified value is indicated by column 220B. The item selector 110 may now be ready for another operation of the EIS 114.
[0075] It can be appreciated that these steps of finding the maximum value and zeroing the entries in the tag vector 530 are repeated until there are no more marked objects in the tag vector 530, ie, the set is empty.
[0076] As already mentioned above, NIS 116 can be more efficient when the number of items in the collection is large, because the linked list is built once, and once built, all related items can be accessed directly (rather than a maximum or minimum search operation).
[0077] NIS 116 can create a linked list of indices of marked items by calculating "deltas" between markings. The delta is the number of cells with value "0" between each two consecutive cells with value "1" in the marking vector. Each calculated delta can be added to the index of the currently selected item to obtain the index of the next selected item.
[0078] Now refer to Figure 6 Exemplary data stored in the system 100 and its use by the NIS 116 are shown. The different data items stored in the system 100 are represented by several horizontal vectors: Index 610 containing the index of the stored items; Data 620 containing the actual data; and Tag vector 630 containing the selected set of items. The NIS 116 may use additional information: Temporary vector Temp 635 for intermediate calculations; Delta vector 640; List 650 and FS vector 112 with an indication of one item currently selected by the item selector 110.
[0079] exist Figure 6In the example, tag vector 630 includes indications in tag [3], tag [5], tag
[10] , tag
[19] , tag
[20] , tag
[23] , tag
[25] , and tag
[27] , which indicate that the items whose values are indexed by index [3], index [5], index
[10] , index
[19] , index
[20] , index
[23] , index
[25] , and index
[27] , respectively (i.e., data-3, data-5, data-10, data-19, data-20, data-23, data-25, and data-27) are in the set of selected items and that linked list 650 should include these indices.
[0080] NIS 116 may first simultaneously calculate the increment between the marks in the mark vector 630, where the increment is the number of zeros between each two consecutive marks in the mark vector 630. The first item in the linked list may be the value of the first increment. In the example, the first mark bit is associated with the item whose index is 3, so the first value in column 650 (i.e., the value located in index 0) is 3 (list [0] = 3). The next item in list 650 may be calculated by adding the increment (to the next mark) to the index of the currently marked item plus one (which is the space occupied by the currently marked item). The formula for calculating the value of an item in list 650 is defined in Equation 1.
[0081] List[x] = Index[x] + Increment[x+1] + 1 Equation 1
[0082] In the example, the next item in list 650 is list [3]. The value to be stored in list [3] is calculated by adding the relevant value from increment 640 (increment [3+1]) (which is 1 in this example) and adding another 1, i.e., list [3] = 3 + 1 + 1 = 5. Arrow 651 visually points to the column pointed to by the first item in list 650. The next item in list 650 is stored in the position pointed to by the previous item, i.e., list [3]. Arrow 652 visually points to the item pointed to by list [3], and arrow 653 visually points to the next item in the list. It can be appreciated that the value of the last item in list 650 may be invalid because it may point outside the linked list. In the example and as shown by arrow 654, the last bit set in tag 630 is tag
[27] , and it "points" to 29 outside the list. The detailed mechanism for building a linked list and for using it is described below.
[0083] Reference now Figure 7 , Figure 8 and Fig. 9 . Figure 7 is a flowchart 700 describing the steps performed by NIS 116 to construct a linked list. Figure 8 and Fig. 9 The data of the delta 640 and list 650 are shown while executing the steps of flow 700. In step 710, the NIS 116 may create the delta 640 and list 650 and may initialize them to 0. Additionally, the NIS 116 may create a Temp 635 to store a copy of the tag 630 to be used and manipulated during calculations while keeping the original value of the tag 630 unchanged for later use.
[0084] Figure 8 Shown in Figure 7 An example of the values stored in Index 610, Tag 630, Temp 635, Increment 640, and List 650 in step 710 of FIG. Return to Figure 7 , step 720 is a loop that can repeat the calculation of step 730 K times. K is some predefined value that can be defined by any heuristic, such as a fixed number, the size of the data set divided by the number of tags, the size of the data set divided by the number of tags times 2, or any other heuristic.
[0085] Step 730 describes how the increment is calculated simultaneously throughout the vector. As long as there is a "0" in position i (i = 0...N, N is the size of the data set) of the temporary vector (i.e., in Temp[i]), the value increment[i] in each identical position i of increment 640 is incremented. In each iteration, the value in each cell i of Temp vector 635 can be calculated as the result of a Boolean OR of the value of cell i and the value of cell i+1, which is the next cell in the vector, as defined in Equation 2.
[0086] Temp[i] = Temp[i] OR Temp[i +1] Equation 2
[0087] It can be appreciated that the effect of the Boolean OR operation on the entries of Temp 635 is essentially to copy the entries with a value of "1" to the left at most K times. It can be appreciated that only the value of 1 is copied to the left, and the value of 0 is not copied. As long as the value of the entry in Temp 635 is "0", the value of increment 640 is incremented. That is, in each iteration, the value of each cell increment[i] in increment vector 640 can be calculated as increment[i] plus the inverse of the value stored in the corresponding cell Temp[i] in Temp 635, as defined in Formula 3.
[0088] Increment[i] = Increment[i] + NOT(Temp[i]) Equation 3
[0089] The result is that during the iteration, each Increment[i] will be incremented by 1 until Temp[i] becomes 1.
[0090] Now refer to Fig. 9 Increment 640 and the value of Temp 635 after several iterations are shown. Temp1 shows the value of Temp 635 after the first iteration, Temp2 shows the value of Temp 635 after the second iteration, and Temp k The value of Temp 635 after the last (Kth) iteration is shown, where the value of each cell in Temp 635 is calculated using Equation 2. It can be appreciated that the value of the last cell of Temp 635 does not change because there are no cells after the last cell. Note that the value of a cell in Temp 635 can change from 0 to 1, but not vice versa. It can be appreciated that after the last iteration, the increment k The distance between [0] and the nearest collection marker (marker 630) is 3, increment k [1] The distance to the nearest marker is 2, increment k [2] The distance to the nearest marker is 1, and the increment k [3] is the actual position of the marker, so the distance to the nearest marker is 0.
[0091] Increment 1 shows the value of increment 640 after the first iteration, Increment 2 shows the value of increment 640 after the next iteration, and Increment k The value of Increment 640 after the last (Kth) iteration is shown, where the value of each cell in Increment 640 is calculated using Equation 3. Note that the value of the cell increases and represents the number of zeros encountered in Temp 635 in the past iteration for each i, and ultimately represents the number of zeros between the item and the next marked item.
[0092] Back to Figure 7 , step 740 describes the computation of list 650 after the last iteration of step 730. List 650 may be created from index 610 and the increment stored in increment 640. The first item in list 650 may be the value of a first increment, which may be associated with the first item in the data set having index 0. All items of list 650 except the first item may be computed as a function of the increment and the index of the item "pointing to" the next item, as defined in Equation 1 above.
[0093] Now refer to Fig.10The values of list 650 are shown calculated using the values stored in Temp 635 and delta 640, as shown. It can be appreciated that the first item in list 650 points to the first marked item, i.e., list[0] = 3. The next item in list 650 is list[3], which points to 5. Arrows point to entries of list 650, and the other entries of the list have meaningless values that are not used by NIS 116.
[0094] It should be noted that K (number of iterations) is selected without any association with the actual increment between the marks in the actual mark vector. Therefore, it is possible that there is an increment greater than K. In this case, a large increment cannot be calculated in only K iterations, so it will not be listed in list 650. On the contrary, list 650 can include entry list [x], which is an intermediate pointer to an unmarked item, i.e., the value of mark [x] can be 0. Nevertheless, list [x] can point to another entry in list 650 that can eventually be associated with the marked entry.
[0095] Once the list 650 is prepared, it can be used to read items. Fig.11 1100 describes the item extraction process implemented by NIS 116. Process 1100 describes in step 1110 that the first item to be read may be the item with an index located in the first item of the list, i.e., index = list [0]. Step 1130 indicates that if the flag is set (i.e., flag [index] == 1), then ( Figure 1 ) NIS 116 may extract data [index], and in step 1140, NIS 116 may read the index of the next item to extract from the current position in the list, i.e., index = list [index]. Step 1145 checks that the index is valid, i.e., its value is less than N, where N is the size of the collection. If the index is larger than the collection, the process terminates in step 1150.
[0096] Those skilled in the art will appreciate that the steps shown in flow 700 and flow 1100 are not intended to be limiting and both flows may be practiced with more or fewer steps or using a different order of steps or any combination thereof.
[0097] It can be appreciated that the item selection system 100 can reduce the computation time for extracting selected items from a database. The computation steps can be performed simultaneously on all cells of the vectors Temp 635 and Increment 640. The capabilities of the associative memory device (i.e., simultaneous Boolean operations on all columns and simultaneous access to data stored in adjacent cells in the same row) can provide both item selection methods with a computational complexity that is independent of the size of the vector. For a set of size P, the computational complexity of EIS 114 is O(P), and the computational complexity of NIS 116 is O(K).
[0098] Although certain features of the present invention have been shown and described herein, many modifications, substitutions, changes and equivalents will now occur to those skilled in the art. It is therefore to be understood that the appended claims are intended to cover all such modifications and changes that fall within the true spirit of the invention.
Claims
1. An associative memory array comprising: A plurality of associative memory cells are arranged in rows and columns and have logic operations performed in parallel in the columns, wherein each first cell in a first row and a first column accesses the contents of a second cell in a second row in an adjacent column.
2. The associative memory array of claim 1, wherein the first row and the second row are the same row.
3. The associative memory array of claim 1 , further comprising: A multiplexer cell for each column to select one of the following: the adjacent column to the left of the first column, and The adjacent column to the right of the first column.
4. The associative memory array of claim 1 further comprising: A logic unit for each column to perform a Boolean operation between what is read from the first column and what is read from the second column.
5. The associative memory array of claim 4, further comprising: Circuitry stores a result of the Boolean operation in a cell of the first column.
Citation Information
Patent Citations
Non-volatile in-memory computing device
US20150131383A1
Memory device
US20150200009A1
Using storage cells to perform computation
US8238173B2
In-memory computational device
US9418719B2
SRAM multi-cell operations
US9558812B2