WO2017221857A1 - 類似演算装置、方法および記憶媒体 - Google Patents

類似演算装置、方法および記憶媒体 Download PDF

Info

Publication number
WO2017221857A1
WO2017221857A1 PCT/JP2017/022440 JP2017022440W WO2017221857A1 WO 2017221857 A1 WO2017221857 A1 WO 2017221857A1 JP 2017022440 W JP2017022440 W JP 2017022440W WO 2017221857 A1 WO2017221857 A1 WO 2017221857A1
Authority
WO
WIPO (PCT)
Prior art keywords
similarity
data
label
index
information
Prior art date
Application number
PCT/JP2017/022440
Other languages
English (en)
French (fr)
Inventor
祥治 西村
Original Assignee
日本電気株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 日本電気株式会社 filed Critical 日本電気株式会社
Priority to US16/310,845 priority Critical patent/US11113314B2/en
Priority to JP2018524062A priority patent/JP7099316B2/ja
Publication of WO2017221857A1 publication Critical patent/WO2017221857A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • G06F16/285Clustering or classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2272Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/9035Filtering based on additional data, e.g. user or group profiles

Definitions

  • the present invention relates to a technique for performing an operation based on similarity to data.
  • the similar combination is an operation for combining two pieces of data into one when two pieces of data in the data set are within a predetermined similar range. For example, when there are two face images, similar combinations are combined into one when the faces are so similar that they can be regarded as the same person, and calculation is performed so as to divide as another person otherwise.
  • Patent Document 1 An example of a technique related to the above problem is described in Patent Document 1.
  • This related technique is based on the premise that the attribute of the target data is a multidimensional value and that the value of each dimension can be referred to. Under this assumption, this related technique builds a similarity index called ⁇ -kd tree.
  • the ⁇ -kd tree associates each level of the tree with each dimension of data. For example, a first-stage node that is a child node of the root node corresponds to the first dimension, and a second-stage node group that is the child node corresponds to the second dimension. In each stage, nodes into which data is to be entered are determined in the order in which the data is sorted by the dimension value corresponding to that stage.
  • the similar connection may be performed only on the data in the node and the data between adjacent nodes.
  • This related technique uses this property of the ⁇ -kd tree and divides the data set into subtrees below a certain level in the ⁇ -kd tree. In this related technique, similar joins are performed in subtrees, and data at the leftmost and rightmost nodes are similarly joined between adjacent subtrees.
  • Patent Document 2 Another example of the technology related to the above-described problem is described in Patent Document 2.
  • a search for data similar to given data is executed using a classification search tree.
  • this related technique generates a classification search tree based on keywords automatically or manually tagged to data.
  • the classification search tree is a classification classifier that classifies data.
  • given data is classified by a classifier of a classification search tree, and subsequently classified by a lower classifier to search for similar data.
  • this related technique makes the search process more efficient by limiting the search process for data similar to given data to a range along the branches of the classification search tree.
  • each of a plurality of processors stores a sub-tree below a certain level in the ⁇ -kd tree in a memory as a local similarity index, and makes it a target of calculation.
  • this related technique unifies the local similarity index in the memory referenced by each processor. Need to be integrated. Since the structure of local similar indexes greatly depends on the data inserted in them, the cost related to this integration operation is almost equivalent to the cost of constructing a new similar index. In particular, assuming that multiple processors and memory are deployed in a distributed environment, this consolidation operation aggregates data that falls in one location and reconstructs a similar index, which is significantly It becomes a factor which reduces performance.
  • Patent Document 2 searches for similar data along a classification search tree constructed for a data set, it searches for similar data for any subset thereof. There is no description. Therefore, in this case, this related technique requires the classification search tree to be reconstructed for an arbitrary subset, which causes a decrease in performance.
  • an object of the present invention is to provide a technique for facilitating the reconstruction of a similarity index related to an arbitrary subset of data in a similarity index used when performing an operation based on data similarity.
  • the similarity calculation device of the present invention stores a similarity index hierarchically configured so that nodes storing attribute values related to data similarity represent similarity relationships between the data.
  • Similar index storage means label generation means for generating a label based on a path indicating the position of the node where the attribute value is stored in the similarity index for each data, and the attribute value and the label for each data
  • Data storage means for storing information associated with the data, and for the data indicated by all or part of the information stored in the data storage means, the similarity index is reconstructed based on the label, and the reconstructed similarity index is
  • similarity calculation means for performing calculation based on similarity for all or part of the data. That.
  • the method of the present invention provides a computer device that uses a similarity index that is hierarchically configured so that nodes storing attribute values related to data similarity represent the similarity relationship between the data. Generating a label based on a path indicating a position of the node in which the attribute value is stored in the similarity index, and storing, for each data, information relating the attribute value and the label in a data storage unit, For the data indicated by all or part of the information stored in the data storage means, the similar index is reconstructed based on the label, and all or part of the data is targeted using the reconstructed similar index Perform operations based on similarity.
  • the storage medium of the present invention uses a similarity index hierarchically configured so that nodes storing attribute values related to data similarity represent the similarity relationship between the data, and for each data, the storage medium
  • a label generating step for generating a label based on a path indicating a position of a node in which the attribute value is stored in the similar index, and data for storing, in the data storage unit, information relating the attribute value and the label for each data
  • the similarity index is reconstructed based on the label, and the all or part of the similarity index is reconstructed using the reconstructed similarity index.
  • a similarity operation step for performing an operation based on similarity for data, and causing a computer device to execute the similarity operation step It stores the program.
  • the present invention can provide a technique for facilitating the reconstruction of a similar index related to an arbitrary subset of data in a similar index used when performing an operation based on the similarity of data.
  • FIG. 1 shows a functional block configuration of a similar arithmetic device 1 as a first embodiment of the present invention.
  • the similarity calculation device 1 includes a similarity index storage unit 11, a label generation unit 12, a data storage unit 13, and a similarity calculation unit 14.
  • the similar computing device 1 can be configured by hardware elements as shown in FIG.
  • the similar arithmetic device 1 includes a CPU (Central Processing Unit) 1001, a memory 1002, an output device 1003, and an input device 1004.
  • the memory 1002 includes a RAM (Random Access Memory), a ROM (Read Only Memory), an auxiliary storage device (such as a hard disk), and the like.
  • the output device 1003 is configured by a device that outputs information, such as a display device or a printer.
  • the input device 1004 is configured by a device that receives an input of a user operation, such as a keyboard or a mouse.
  • the similar index storage unit 11 and the data storage unit 13 are configured by the memory 1002.
  • the label generation unit 12 and the similarity calculation unit 14 are configured by a CPU 1001 that reads and executes a computer program stored in the memory 1002 and controls each unit such as the output device 1003 and the input device 1004. Note that the hardware configuration of the similar arithmetic device 1 and each functional block thereof is not limited to the above-described configuration.
  • the similar index storage unit 11 stores a similar index.
  • the similarity index is information that is hierarchically configured so that nodes storing attribute values related to data similarity represent similarity relationships between data.
  • the similarity index may store the attribute value itself related to the similarity of data in the node, or may store reference information to the attribute value related to the similarity.
  • the similarity index indicates that the attribute value related to the similarity of other data determined to have similarity to the attribute value related to the similarity of data stored in a node is the value of the data in the node. It may be configured to be stored in a subordinate node. In this case, each node stores an attribute value related to the similarity of one or a plurality of data. At this time, by applying a condition indicating that the similarity is higher as the level is lower, as a determination condition for determining whether or not there is similarity, each node is more similar as the level is lower. For one or more data, an attribute value related to the similarity is stored. In each node, attribute values related to the similarity of one or more stored data may be arranged in the order of similarity to data in the parent node.
  • the label generation unit 12 generates, for each data, a label based on the path indicating the position of the node in which the attribute value related to similarity is stored in the similarity index. And the label production
  • the path is represented by a sequence of nodes from the root node to a node storing attribute values related to similarity of corresponding data.
  • the label may be information obtained by concatenating information for identifying nodes included in the path as a character string in the order of arrangement in the path.
  • attribute values related to the similarity of one or more stored data are arranged in the order of similarity with the data in the parent node.
  • the path is represented by a sequence of information indicating the order of arrangement within the node from the root node to the corresponding node.
  • the label may be obtained by concatenating information indicating the nodes included in the path and the arrangement order thereof as a character string in the order of arrangement in the path.
  • the label generation unit 12 acquires an attribute value related to the similarity of the target data as an input. Then, the label generation unit 12 may determine which node of the similarity index to store the acquired attribute value related to similarity, and store it in the determined node. At this time, if the node that can store the acquired attribute value related to similarity is already included in the similarity index, the label generation unit 12 stores the attribute value related to the similarity in that node. If the node that can store the acquired attribute value related to similarity is not yet included in the similarity index, the label generation unit 12 generates a new node and stores the attribute value related to similarity in the node. To do.
  • the data storage unit 13 stores attribute values and labels related to similarity in association with each data.
  • the data storage unit 13 may provide a column for storing a label in a record for storing an attribute value related to similarity for each data.
  • the data storage unit 13 may store data in any format as long as the method can identify the relationship between the attribute value related to the similarity of data and the label.
  • the data storage unit 13 may store information in which attribute values and labels related to the similarity of each data are associated with each other in a plurality of blocks. In this case, each block may be distributed to a plurality of physically different devices (for example, a plurality of memories 1002).
  • the similarity calculation unit 14 reconstructs a similarity index using labels for all or part of the data stored in the data storage unit 13. And the similarity calculation part 14 performs the calculation based on similarity for all or a part of data using the reconstructed similarity index. For example, the similarity calculation unit 14 may acquire a calculation condition as an input. And the similarity calculation part 14 may perform the calculation based on similarity using the reconstructed similarity index based on the condition of the acquired calculation.
  • the similarity calculation unit 14 sorts all or part of the data stored in the data storage unit 13 based on the labels. Since the label represents a path in the similar index, the similar index is reconstructed by sorting.
  • the calculation based on similarity may be a similar combination.
  • the similarity calculation unit 14 may acquire the condition for the similar coupling as an input, and may perform the calculation for the similarity coupling using the condition for the similar coupling in the reconstructed similarity index. It should be noted that a known technique that realizes a similar connection using a similar index can be applied to the similar connection.
  • the label generation unit 12 acquires an attribute value related to the similarity of the target data (step A1).
  • the label generation unit 12 inserts the acquired attribute value related to the similarity into the node of the similar index stored in the similar index storage unit 11 (step A2).
  • the label generation unit 12 generates a label based on the path indicating the node into which the attribute value related to similarity is inserted (step A3).
  • the label generation unit 12 causes the data storage unit 13 to store information in which the generated label is associated with the acquired attribute value related to similarity (step A4).
  • the similar computing device 1 ends the operation of storing information in the data storage unit 13.
  • FIG. 4 shows an operation in which the similar operation device 1 performs an operation based on similarity.
  • the similarity calculation unit 14 reconstructs a similarity index using a label for data to be calculated among the data indicated by the information stored in the data storage unit 13 (step B1).
  • the target data may be data indicated by all information stored in the data storage unit 13 or may be data indicated by some information.
  • the similarity calculation unit 14 uses the reconstructed similarity index to perform an operation based on the similarity for the set of data to be calculated (step B2).
  • the similarity calculation unit 14 may perform a calculation based on similarity based on a calculation condition acquired as an input. Further, as described above, the similarity calculation unit 14 may perform similar combination as the calculation based on similarity.
  • the similar calculation device 1 ends the operation for performing the calculation based on the similarity.
  • rectangles connected to rectangles represent nodes.
  • a rectangle obtained by connecting rectangles A1 to An represents the node A.
  • Each rectangle represents an attribute value related to the similarity of each data stored in the node.
  • a character string such as A1 and B1 surrounded by a rectangle represents a node and an arrangement order in the node.
  • A1 represents that the arrangement order in the node A is the first.
  • the fact that the arrangement order is the first in node A is also referred to as node A1.
  • FIG. 5 shows an example in which n (n is an integer of 1 or more) data is stored in each node. However, the number of data stored in one node is stored in another node. The number of data to be processed is not necessarily the same.
  • the label generation unit 12 acquires an attribute value related to the similarity of the target data (step A1) and inserts it into the node of the similar index stored in the similar index storage unit 11 (step A2).
  • an attribute value related to the acquired similarity is inserted into the node C1.
  • the label generation unit 12 generates a label based on the path from the root node to the inserted node C1 (step A3).
  • the path to the node C1 is represented by a sequence of information indicating the nodes and the arrangement order, A1, B1, and C1. Therefore, the label generation unit 12 generates a label “A1-B1-C1” by concatenating information representing these nodes and the arrangement order as a character string in the order of arrangement.
  • “-” (hyphen) is used as a character string to be connected.
  • the label generation unit 12 stores the information in which the generated label “A1-B1-C1” is associated with the attribute value related to the similarity of the data in the data storage unit 13 (step A4).
  • the data storage unit 13 stores information in which attribute values and labels related to similarity are associated with each other in a plurality of blocks.
  • similar coupling is performed in a block.
  • the similarity calculation unit 14 reconstructs a similarity index by sorting the information stored in the data storage unit 13 using a label for each block (step B1).
  • the similarity calculation unit 14 sorts the information stored in the data storage unit 13 in ascending order of the character string of the label.
  • the label length represents the depth of the hierarchy in the similarity index.
  • data that continues in the front and back with the same length label represents adjacent nodes in the same subtree. Therefore, the similarity calculation unit 14 can reconstruct the similarity index by sorting the information stored in the data storage unit 13 by the label.
  • the similarity calculation unit 14 uses the reconstructed similarity index to perform similarity coupling for each block (step B2). For example, the similarity calculation unit 14 may similarly combine adjacent nodes in the reconfigured similarity index.
  • the similar arithmetic device 1 can easily reconstruct a similar index for each block of data that is a subset of data.
  • the similarity calculation apparatus facilitates the reconstruction of a similarity index related to a subset of arbitrary data in the similarity index used when performing an operation based on the similarity of data. it can.
  • the similarity index storage unit stores a similarity index hierarchically configured so that nodes storing attribute values related to data similarity represent similarity relationships between data.
  • generation part produces
  • generation part memorize
  • the similarity calculation unit reconstructs the similarity index using the label for the data indicated by all or part of the information stored in the data storage unit. This is because the similarity calculation unit executes an operation based on similarity for all or a part of data using the reconstructed similarity index.
  • the similar index can be easily reconfigured without referring to the similar index in the similar index storage unit.
  • FIG. 6 shows a functional block configuration of the similar arithmetic device 2 as the second embodiment of the present invention.
  • the similar calculation device 2 is similar to the similar calculation device 1 according to the first embodiment of the invention in place of the data storage unit 13 and the similar calculation unit 14 instead of the data storage unit 13. The difference is that the calculation unit 24 is included.
  • the similar arithmetic device 2 and each functional block thereof can be configured by the same hardware elements as those in the first embodiment of the present invention described with reference to FIG. However, the hardware configuration of the similar arithmetic device 2 and each functional block thereof is not limited to the above-described configuration.
  • the data storage unit 23 stores information associated with attribute values and labels related to data similarity in a plurality of blocks.
  • a publicly-known technique can be applied to the method for distributing the plurality of blocks.
  • the similarity calculation unit 24 redistributes information associated with attribute values and labels related to data similarity to a plurality of blocks based on the prefix in the label. That is, the similarity calculation unit 24 may acquire data associated with a label having the same prefix from one or more blocks and store the acquired data in the same block. For example, as a prefix, a character string representing a path up to a predetermined level in a similar index among character strings of labels may be applied.
  • the similarity calculation unit 24 reconstructs a similarity index based on the label for the data indicated by the information stored in each block. In addition, the similarity calculation unit 24 performs a calculation based on similarity using the respective similarity indexes for the data indicated by the information stored in each block.
  • each CPU 1001 may reconstruct a similar index for a corresponding block, and perform a calculation based on similarity using the reconstructed similarity index. .
  • FIG. 7 shows an operation in which the similar operation device 2 performs an operation based on similarity.
  • the similarity calculation unit 24 redistributes the information stored in the data storage unit 23 into a plurality of blocks based on the prefix (step B21).
  • the similarity calculation unit 24 reconstructs the similarity index using the label for the data indicated by the information stored in each block (step B22).
  • the similarity calculation unit 24 performs an operation based on similarity using the reconstructed similarity index for the data indicated by the information stored in each block (step B23).
  • the similar calculation device 2 ends the operation for performing the calculation based on the similarity.
  • the data storage unit 23 stores information associated with data and labels in a plurality of blocks using an arbitrary division method. At this time, a case where similar coupling is performed across blocks arranged in a distributed manner will be described. Further, it is assumed that the similar index storage unit 11 stores a similar index similar to the specific example of the first exemplary embodiment of the present invention described with reference to FIG.
  • the similarity calculation unit 24 performs hash combination on the information stored in the data storage unit 23 using the label prefix as a key (step B21).
  • FIG. 8 shows an example in which, in the similar index of FIG. 5, a path up to the third layer node is applied as a label prefix.
  • the attribute values related to the similarity of the data stored in the subtree below the node C1 are associated with the label having the prefix “A1-B1-C1”.
  • the attribute value related to the similarity of the data stored in the subtree below the node J1 is associated with the label having the prefix “An-I1-J1”. Therefore, the similarity calculation unit 24 performs hash join using the prefix “A1-B1-C1”, the prefix “An-I1-J1”, and the like as a redistribution key. Therefore, attribute values related to the similarity of data associated with labels having the same prefix are collected in the same block by hash join.
  • the similarity calculation unit 24 may reconstruct the similarity index using the label in each block (step B22), and perform similar combination in the block using the reconstructed similarity index (step B23).
  • the similarity calculation apparatus uses an attribute value related to the similarity of data that is distributed and stored in a plurality of blocks, and performs an operation based on similarity across blocks. Can be executed automatically.
  • the data storage unit stores information that associates attribute values and labels related to data similarity in a plurality of blocks. Then, the similarity calculation unit redistributes the information associated with the attribute value and the label related to the similarity of the data into a plurality of blocks based on the prefix, and uses the label for the data indicated by the information stored in each block. Reconstruct the similarity index. This is because the similarity calculation unit executes an operation based on similarity using the reconstructed similarity index for the data indicated by the information stored in each block.
  • the data storage unit may store a plurality of blocks in a plurality of physically different storage devices.
  • redistribution can be performed by applying an efficient hash join algorithm.
  • the present embodiment can efficiently collect data to be subjected to calculation based on similarity in the same storage device. Thereby, this Embodiment can improve the efficiency of the calculation based on the similarity in a distributed environment.
  • FIG. 9 shows a functional block configuration of the similar arithmetic device 3 according to the third embodiment of the present invention.
  • the similar calculation device 3 is similar to the similar calculation device 2 according to the second embodiment of the present invention in that the similar index storage unit 31 is replaced with the similar index storage unit 11 and the label generation unit 32 is replaced with the label generation unit 12.
  • the difference is that a similar calculation unit 34 is provided instead of the similar calculation unit 24.
  • the similar arithmetic device 3 and each functional block thereof can be configured by the same hardware elements as those of the first embodiment of the present invention described with reference to FIG.
  • the hardware configuration of the similar arithmetic device 3 and each functional block thereof is not limited to the above-described configuration.
  • the similar index storage unit 31 stores a similar index.
  • the similarity index is configured so that an attribute value related to the similarity of other data whose similarity to the attribute value related to the similarity of the data stored in the node is stored below the arbitrary threshold is stored below an arbitrary node. . That is, in such a similarity index, a similarity threshold is set for the relationship between the attribute value related to the similarity of data stored in a certain node and its child node.
  • the similarity threshold for example, a value indicating that the similarity is higher as the level is lower may be set.
  • the label generation unit 32 further includes information indicating the similarity threshold applied in the path indicating the position of the node in which the attribute value related to the similarity of data is stored in the label.
  • the label is information indicating a set of similarity thresholds set in the node, the arrangement order in the node, and the relationship with the child node. May be a character string concatenated in the order of arrangement in the path.
  • the similarity calculation unit 34 determines a prefix to be used for redistribution based on information representing a similarity threshold included in the label. For example, as described above, it is assumed that a value indicating that the similarity is higher as the level is lower is set as the similarity threshold. The similarity threshold is assumed to be higher as the value increases. In this case, the similarity calculation unit 34 may apply, as a prefix, a character string representing a path to a node to which a similarity threshold equal to or greater than a predetermined value is applied in the label character string. Then, the similarity calculation unit 34 performs a calculation based on information re-distribution and similarity, similarly to the similarity calculation unit 24 in the second embodiment of the present invention, using the determined prefix.
  • FIG. 10 illustrates an operation in which the similar arithmetic device 3 stores information in the data storage unit 23.
  • the similar arithmetic device 3 operates in the same manner as in the first embodiment of the present invention from step A1 to A2. Thereby, the attribute value related to the similarity of the newly acquired data is inserted into the node of the similar index stored in the similar index storage unit 31.
  • the label generation unit 32 generates a label based on the path from the root node to the inserted node and the similarity threshold applied in the path (step A33).
  • the similar computing device 3 executes step A4 in the same manner as in the first embodiment of the present invention.
  • the generated label including the similarity threshold is associated with the attribute value related to the similarity of the target data and stored in the data storage unit 23.
  • the similar arithmetic device 3 finishes the operation of storing information in the data storage unit 23.
  • FIG. 11 shows an operation in which the similar operation device 3 performs an operation based on similarity.
  • the similarity calculator 34 determines a prefix used for redistribution based on the similarity threshold (step B31).
  • the similarity calculation unit 34 may determine, as a prefix, a character string representing a path until the similarity threshold exceeds a predetermined value in each path following the similarity index from the root.
  • the similar computing device 3 operates in the same manner as in the second embodiment of the present invention from step B21 to B23. Thereby, a similarity index is reconfigure
  • the similar calculation device 3 ends the operation of performing the calculation based on the similarity.
  • the data storage unit 23 stores information in which attribute values and labels related to data similarity are associated with each other in a plurality of blocks. At this time, a case where similar coupling is performed in a block will be described.
  • the similar index storage unit 31 stores the information shown in FIG.
  • a related technique showing an example of such a similar index is described in the following publicly known document.
  • the similarity index shown in this publicly known document is data that is equal to or higher than a similarity threshold ( ⁇ x) with respect to an attribute value related to the similarity of each data stored in the node below a certain node.
  • ⁇ x similarity threshold
  • the attribute value related to similarity That is, the data stored in all the nodes in the subtree under the attribute value related to the similarity of the data stored in the node A1 has a similarity higher than ⁇ 1 with the data stored in the node A1. Represents that.
  • the label generation unit 32 acquires an attribute value related to the similarity of the target data (step A1) and inserts it into the node of the similar index stored in the similar index storage unit 31 (step A2).
  • an attribute value related to this similarity is inserted into the node C1.
  • the label generation unit 32 concatenates the path from the node A1 that is the root node to the node C1 into which the data is inserted and the similarity threshold applied in the path as a character string. To generate a label. As shown in FIG. 13, the generated label is “(A1, ⁇ 1)-(B1, ⁇ 2) -C1”.
  • the similarity calculation unit 34 determines, as a prefix (that is, a redistribution key), a character string up to an element whose similarity threshold exceeds ⁇ q for the first time in each path from the root of the similarity index (step B31). For example, as shown in FIG. 14, it is assumed that the similarity threshold exceeds ⁇ q for the first time in each path from the root node to the leaf node, that is, ⁇ 3, ⁇ 10, and ⁇ 11.
  • the similarity calculation unit 34 uses (A1, ⁇ 1) ⁇ (B1, ⁇ 2) ⁇ (C1, ⁇ 3), (An, ⁇ 8) ⁇ (I1, ⁇ 9) ⁇ (J1, ⁇ 10), It is decided to use (An, ⁇ 8)-(I1, ⁇ 9)-(Jn, ⁇ 11).
  • the similarity calculation unit 34 redistributes the data using these prefixes as the redistribution key. Thereby, in FIG. 14, data is redistributed for each subtree surrounded by a broken line (step B21).
  • the similarity calculation unit 34 may reconstruct the similarity index using the label in each block (step B22), and perform similarity combination in the block using the reconstructed similarity index (step B23).
  • the similarity calculation apparatus can more efficiently execute an operation based on similarity across blocks on data that is distributed and stored in a plurality of blocks. it can.
  • the similarity index storage unit stores an attribute value related to the similarity of data whose similarity with respect to the attribute value related to the similarity of the data stored in the node is equal to or greater than the similarity threshold, below an arbitrary node.
  • a similar index configured to be stored is stored.
  • the label generation unit generates, for each data, a label including a path indicating the position of the node in which the data is stored in the similarity index and information indicating the similarity threshold applied in the path. This is because the similarity calculation unit determines a prefix to be used for redistribution based on information representing the similarity threshold included in the label.
  • a prefix more appropriate for redistribution performed for similarity-based computation can be determined by using a similarity threshold included in a label.
  • the related technology described in Patent Document 1 described in the background art significantly reduces the execution efficiency of operations based on similarity.
  • the data is a video including a face image.
  • the face image is not only the feature quantity (attribute related to the similarity of multi-dimensional values) related to the face shown in the face image, but also information such as the location and time when it was taken (attributes other than attributes related to similarity) )have.
  • the similarity combination based only on the feature amount related to the face does not use the attribute regarding the place or time, it is sufficient to apply the similarity index described in Patent Document 1.
  • FIG. 15 shows a functional block configuration of the similar arithmetic device 4 as the fourth embodiment of the present invention.
  • the similar calculation device 4 is different from the similar calculation device 2 according to the second embodiment of the present invention in that a data storage unit 43 instead of the data storage unit 23 and a similar calculation unit 44 instead of the similar calculation unit 24 are provided.
  • the point to prepare is different.
  • the similar arithmetic device 4 and each functional block thereof can be configured by the same hardware elements as those of the first embodiment of the present invention described with reference to FIG.
  • the hardware configuration of the similar arithmetic device 4 and each functional block thereof is not limited to the above-described configuration.
  • the data storage unit 43 further allows selection of those data based on other attribute values other than the attribute values related to similarity.
  • Store information For example, the data storage unit 43 may store information in which attribute values related to similarity, labels, and other attribute values are associated for each data.
  • the similarity calculation unit 44 extracts information satisfying selection conditions regarding other attribute values from the data storage unit 43. And the similarity calculation part 44 performs the calculation based on similarity using the similarity index reconfigure
  • FIG. 16 shows an operation in which the similar calculation device 4 performs a calculation based on similarity.
  • the similarity calculation unit 44 extracts information satisfying the selection condition from the information stored in the data storage unit 43 (step B41).
  • the similar computing device 4 executes steps B1 and B2 using the extracted information in the same manner as in the first embodiment of the present invention. Thereby, a similarity index is reconfigure
  • the similarity calculation device 4 ends the operation for performing the calculation based on the similarity.
  • the data is assumed to have two attributes: a feature amount and a time.
  • the feature amount is an attribute value related to similarity.
  • the time is an attribute value other than the attribute value related to similarity.
  • each row represents information that associates, for each data, a label generated based on the similarity index of the feature amount and the time of the data.
  • Each row further includes information representing the feature amount or reference information thereof, but is not shown.
  • the similarity calculation unit 44 extracts data satisfying a selection condition based on time from the information shown in FIG. If the selection condition is “the time is in the range of 11:00 to 12:00”, the similarity calculation unit 44 extracts the information on the 5th to 8th lines (step B41).
  • the similarity calculation unit 44 reconstructs the similarity index using the labels for the information on the 5th to 8th lines (step B1).
  • the similarity calculation unit 44 uses the reconstructed similarity index to perform similarity coupling (step B2).
  • the data storage unit 43 stores data by dividing it into blocks within a range of attributes relating to time.
  • the similarity calculation unit 44 acquires block information satisfying the selection condition given with respect to the time in step B41. Then, the similarity calculation unit 44 may reconstruct the similarity index based on the label for the acquired block data, and execute the similarity combination. As described above, when a selection condition based on another attribute value is assumed in advance, the data storage unit 43 may distribute and store data in a plurality of blocks based on the other attribute value.
  • the similarity calculation apparatus can easily allow a similarity index and any other index to coexist when performing an operation based on the similarity of data.
  • the data storage unit enables data selection based on other attribute values other than the attribute values related to similarity Information is stored further. This is because the similarity calculation unit performs an operation based on similarity using the similarity index reconstructed based on the label for data satisfying the selection condition regarding other attribute values.
  • similar indexes are reconstructed for a subset of data that satisfies a selection condition based on other attribute values, using labels generated in the same manner as in the first embodiment of the present invention. make it easier. That is, the present embodiment enables a combination of a similarity index based on an attribute value related to similarity and an index of another method. As a result, the present embodiment can easily determine the similarity in the reconstructed similarity index for the subset of data that satisfies the selection condition based on other attribute values, and facilitates the calculation based on the similarity.
  • this embodiment is a case where the data set is large in size and distributed, and includes operations related to complex similarity including conditions related to attributes other than the attributes related to similarity.
  • the calculation related to similarity can be made efficient.
  • the similar index storage unit stores a similar index having a tree structure.
  • the similar index stored in the similar index storage unit may be a forest structure that is a set of tree structures.
  • the label generation unit converts a character string representing a node and an arrangement order in the node as a label, with a hyphen in the order of arrangement included in the path.
  • the description has been focused on the example of generation.
  • the present invention is not limited to this, and the label generation unit may generate a label having a common prefix between data inserted into arbitrary subtrees in the similar index.
  • the label may be a concatenation of the arrangement order in the nodes included in the path.
  • the attribute value arranged second in the child node of the attribute value arranged third in the child node of the attribute value arranged first in the root node includes “1-3-2”. May be generated.
  • the label generation unit numbers the tree and generates a label based on the tree number and the path indicating the data insertion position from the root node of the tree. Good.
  • the description has been made centering on an example in which the similar calculation unit executes the similar combination as the calculation based on the similarity.
  • the calculation based on the similarity is not limited to the similar combination, and may be another calculation performed using the similarity index.
  • each functional block of the similar arithmetic device is realized by a CPU that executes a computer program stored in a memory.
  • the present invention is not limited to this, and some, all, or a combination of each functional block may be realized by dedicated hardware.
  • the functional blocks of the similar arithmetic device may be distributed and realized in a plurality of devices.
  • the operation of the similar arithmetic device described with reference to each flowchart is stored in a storage device (storage medium) of the computer device as a computer program of the present invention. Then, the computer program may be read and executed by the CPU. In such a case, the present invention is constituted by the code of the computer program or a storage medium.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本発明は、データの類似性に基づく演算を行う際に、データの任意のサブセットに関する類似インデックスの再構築を容易にする。 類似インデックス記憶部11は、データの類似性に関わる属性値を格納したノードが、データ間の類似関係を表すよう階層的に構成された類似インデックスを記憶する。ラベル生成部12は、データ毎に、類似インデックスにおいて類似性に関わる属性値が格納されたノードの位置を示すパスに基づくラベルを生成する。データ記憶部13は、データ毎に、類似性に関わる属性値およびラベルを関連付けた情報を記憶する。類似演算部14は、データ記憶部13に記憶された全てまたは一部の情報が示すデータについて、ラベルに基づき類似インデックスを再構成し、再構成した類似インデックスを用いて全てまたは一部のデータを対象とする類似性に基づく演算を実行する

Description

類似演算装置、方法および記憶媒体
 本発明は、データに対して類似性に基づく演算を行う技術に関する。
 データに対して類似性に基づく演算を行う技術がある。類似性に基づく演算の一例としては、例えば、類似結合が知られている。類似結合とは、データセットにおいてある2つのデータが所定の類似範囲内にある際に、それらのデータを1つにまとめる演算である。例えば、顔画像が2枚あった場合、類似結合は、それらの顔が同一人物とみなせるほど類似している場合に1つにまとめ、そうでなければ別の人物として分けるような演算を行う。
 一般的にデータセットの規模が増大するほど、類似性に基づく演算のコストが大きくなる。そこで、データセットを分割し、複数のプロセッサで類似性に基づく演算を実行する手段がとられる。この時に問題となるのは、データセットをどのように分割するか、そして、分割したサブデータセットにまたがるデータ間での類似性に基づく演算をどのように実現するかである。
 上述の問題に関連する技術の一例が、特許文献1に記載されている。この関連技術は、対象とするデータの属性が多次元値であり、かつ、各次元の値を参照できることを前提とする。この前提の下に、この関連技術は、ε-k-dツリーという類似インデックスを構築する。ε-k-dツリーは、ツリーの各段をデータの各次元に対応させている。例えば、ルートノードの子ノードである第1段目のノードは、第1次元に対応し、その子ノードである第2段目のノード群は第2次元に対応する。そして、各段において、その段に対応する次元の値でデータをソートした順で、データが入るべきノードが決められる。各段である次元の値でデータがソートされているので、類似結合は、ノード内のデータおよび隣り合うノード間のデータだけを対象とすればよい。この関連技術は、ε-k-dツリーのこの性質を用い、ε-k-dツリーにおけるある段以下のサブツリーごとに、データセットを分割する。そして、この関連技術は、サブツリー内で類似結合を実行するとともに、隣り合うサブツリー間でそれぞれの最左と最右のノードにあるデータを類似結合する。
 また、上述の問題に関連する技術の他の一例が、特許文献2に記載されている。この関連技術は、類似性に基づく演算として、与えられたデータに類似するデータの検索を、分類検索ツリーを用いて実行する。具体的には、この関連技術は、データに自動または手動でタグ付けされたキーワードを基に、分類検索ツリーを生成する。分類検索ツリーは、データを分類する分類器がツリー上に構成されたものである。そして、この関連技術は、与えられたデータを分類検索ツリーの分類器により分類し、続けて、下位の分類器により分類していくことにより、類似するデータを検索する。このように、この関連技術は、与えられたデータに類似するデータの検索処理を、分類検索ツリーの枝に沿う範囲に制限することにより、検索処理を効率化する。
特開平11-242688号公報 特開2014-197412号公報
 しかしながら、上述の関連技術には、以下の課題がある。
 データの類似性に基づく演算を行う際には、与えられたデータセット全てを対象とせずに、任意のサブセットに対して行いたい場合がある。
 ところが、特許文献1に記載された関連技術では、複数のプロセッサのそれぞれが、ε-k-dツリーにおけるある段以下のサブツリーを、ローカルな類似インデックスとしてメモリに記憶し、演算の対象とする。したがって、ローカルな類似インデックスが表すサブセットとは異なる任意のサブセットに対して類似性に基づく演算を行いたい場合、この関連技術は、各プロセッサによって参照されるメモリにあるローカルな類似インデックスを1つに統合する必要が生じる。ローカルな類似インデックスの構造はそれらに挿入されたデータに大きく依存するため、この統合操作に係るコストは、新規に類似インデックスを構築するコストとほぼ等価になる。特に、複数のプロセッサおよびメモリが分散環境に配置されていることを想定する場合、この統合操作は、一か所に該当するデータを集約して、類似インデックスを再構築することになるため、著しく性能を低下させる要因となる。
 また、特許文献2に記載された関連技術は、データセットについて構築した分類検索ツリーに沿って類似するデータの検索を行うものの、その任意のサブセットを対象として類似するデータの検索を行うことについては記載がない。したがって、この場合、この関連技術は、任意のサブセットについて分類検索ツリーを再構築する必要があり、性能を低下させる要因となる。
 本発明は、上述の課題を解決するためになされたものである。すなわち、本発明は、データの類似性に基づく演算を行う際に用いられる類似インデックスにおいて、任意のデータのサブセットに関する類似インデックスの再構築を容易にする技術を提供することを目的とする。
 上記目的を達成するために、本発明の類似演算装置は、データの類似性に関わる属性値を格納したノードが、前記データ間の類似関係を表すよう階層的に構成された類似インデックスを記憶した類似インデックス記憶手段と、前記データ毎に、前記類似インデックスにおいて前記属性値が格納されたノードの位置を示すパスに基づくラベルを生成するラベル生成手段と、前記データ毎に、前記属性値および前記ラベルを関連付けた情報を記憶するデータ記憶手段と、前記データ記憶手段に記憶された全てまたは一部の情報が示すデータについて、前記ラベルに基づき前記類似インデックスを再構成し、再構成した前記類似インデックスを用いて前記全てまたは一部のデータを対象とする類似性に基づく演算を実行する類似演算手段と、を備える。
 また、本発明の方法は、コンピュータ装置が、データの類似性に関わる属性値を格納したノードが、前記データ間の類似関係を表すよう階層的に構成された類似インデックスを用いて、前記データ毎に、前記類似インデックスにおいて前記属性値が格納されたノードの位置を示すパスに基づくラベルを生成し、前記データ毎に、前記属性値および前記ラベルを関連付けた情報をデータ記憶手段に記憶し、前記データ記憶手段に記憶された全てまたは一部の情報が示すデータについて、前記ラベルに基づき前記類似インデックスを再構成し、再構成した前記類似インデックスを用いて前記全てまたは一部のデータを対象とする類似性に基づく演算を実行する。
 また、本発明の記憶媒体は、データの類似性に関わる属性値を格納したノードが、前記データ間の類似関係を表すよう階層的に構成された類似インデックスを用いて、前記データ毎に、前記類似インデックスにおいて前記属性値が格納されたノードの位置を示すパスに基づくラベルを生成するラベル生成ステップと、前記データ毎に、前記属性値および前記ラベルを関連付けた情報をデータ記憶手段に記憶するデータ記憶ステップと、前記データ記憶手段に記憶された全てまたは一部の情報が示すデータについて、前記ラベルに基づき前記類似インデックスを再構成し、再構成した前記類似インデックスを用いて前記全てまたは一部のデータを対象とする類似性に基づく演算を実行する類似演算ステップと、をコンピュータ装置に実行させるプログラムを記憶している。
 本発明は、データの類似性に基づく演算を行う際に用いられる類似インデックスにおいて、任意のデータのサブセットに関する類似インデックスの再構築を容易にする技術を提供することができる。
本発明の第1の実施の形態としての類似演算装置の構成を示すブロック図である。 本発明の第1の実施の形態としての類似演算装置のハードウェア構成の一例を示す図である。 本発明の第1の実施の形態としての類似演算装置がデータ記憶部に情報を記憶する動作を説明するフローチャートである。 本発明の第1の実施の形態としての類似演算装置が類似性に基づく演算を実行する動作を説明するフローチャートである。 本発明の第1の実施の形態の具体例における類似インデックスを模式的に説明する図である。 本発明の第2の実施の形態としての類似演算装置の構成を示すブロック図である。 本発明の第2の実施の形態としての類似演算装置が類似性に基づく演算を実行する動作を説明するフローチャートである。 本発明の第2の実施の形態の具体例における類似インデックスを模式的に説明する図である。 本発明の第3の実施の形態としての類似演算装置の構成を示すブロック図である。 本発明の第3の実施の形態としての類似演算装置がデータ記憶部に情報を記憶する動作を説明するフローチャートである。 本発明の第3の実施の形態としての類似演算装置が類似性に基づく演算を実行する動作を説明するフローチャートである。 本発明の第3の実施の形態における類似インデックスの具体例を模式的に説明する図である。 本発明の第3の実施の形態の具体例において付与されるラベルを模式的に説明する図である。 本発明の第3の実施の形態の具体例において共通のプリフィックスを有するデータを模式的に説明する図である。 本発明の第4の実施の形態としての類似演算装置の構成を示すブロック図である。 本発明の第4の実施の形態としての類似演算装置が類似性に基づく演算を実行する動作を説明するフローチャートである。 本発明の第4の実施の形態の具体例においてデータ記憶部に格納される情報を説明する図である。 本発明の第4の実施の形態の具体例においてデータ記憶部に格納される情報の他の例を説明する図である。
 以下、本発明の実施の形態について、図面を参照して詳細に説明する。
 (第1の実施の形態)
 本発明の第1の実施の形態としての類似演算装置1の機能ブロック構成を図1に示す。図1において、類似演算装置1は、類似インデックス記憶部11と、ラベル生成部12と、データ記憶部13と、類似演算部14とを備える。
 ここで、類似演算装置1は、図2に示すようなハードウェア要素によって構成可能である。図2において、類似演算装置1は、CPU(Central Processing Unit)1001、メモリ1002、出力装置1003、および、入力装置1004を含む。メモリ1002は、RAM(Random Access Memory)、ROM(Read Only Memory)、補助記憶装置(ハードディスク等)等によって構成される。出力装置1003は、ディスプレイ装置やプリンタ等のように、情報を出力する装置によって構成される。入力装置1004は、キーボードやマウス等のように、ユーザ操作の入力を受け付ける装置によって構成される。この場合、類似インデックス記憶部11およびデータ記憶部13は、メモリ1002によって構成される。また、ラベル生成部12および類似演算部14は、メモリ1002に格納されるコンピュータ・プログラムを読み込んで実行するとともに出力装置1003や入力装置1004等の各部を制御するCPU1001によって構成される。なお、類似演算装置1およびその各機能ブロックのハードウェア構成は、上述の構成に限定されない。
 類似インデックス記憶部11は、類似インデックスを記憶している。類似インデックスとは、データの類似性に関わる属性値を格納したノードが、データ間の類似関係を表すよう階層的に構成された情報である。なお、類似インデックスは、ノードに、データの類似性に関わる属性値自体を格納してもよいし、類似性に関わる属性値への参照情報を格納してもよい。
 例えば、類似インデックスは、あるノードに格納されたあるデータの類似性に関わる属性値に対して類似性を有すると判定される他のデータの類似性に関わる属性値が、そのノードにおけるそのデータの配下のノードに格納されるよう構成されていてもよい。また、この場合、各ノードには、1つまたは複数のデータについてその類似性に関わる属性値が格納される。また、このとき、類似性を有するか否かの判定条件として、下の階層になるほどより類似性が高いことを示す条件を適用することにより、各ノードは、下の階層になるほど、より類似する1つ以上のデータについてその類似性に関わる属性値を格納することになる。また、各ノードにおいて、格納される1つ以上のデータの類似性に関わる属性値は、親のノードにおけるデータとの類似性の順に配置されてもよい。
 ラベル生成部12は、データ毎に、類似インデックスにおいて類似性に関わる属性値が格納されたノードの位置を示すパスに基づくラベルを生成する。そして、ラベル生成部12は、データの類似性に関わる属性値と、生成したラベルとを関連付けた情報を、後述のデータ記憶部13に記憶させる。
 ここで、パスは、ルートノードから、該当するデータの類似性に関わる属性値が格納されるノードまでのノードの並びによって表される。例えば、ラベルは、パスに含まれるノードを識別する情報を、パスにおける並び順に文字列として連結したものであってもよい。また、前述のように、各ノードにおいて、格納される1つ以上のデータの類似性に関わる属性値が、親のノードにおけるデータとの類似性の順に配置されているとする。この場合、パスは、ルートノードから該当するノードまでの、ノードおよび該ノード内での配置順序を表す情報の並びによって表される。この場合、ラベルは、パスに含まれるノードおよびその配置順序を表す情報を、パスにおける並び順に文字列として連結したものであってもよい。
 例えば、ラベル生成部12は、対象となるデータの類似性に関わる属性値を入力として取得する。そして、ラベル生成部12は、取得した類似性に関わる属性値を類似インデックスのいずれのノードに格納するかを決定し、決定したノードに格納すればよい。このとき、ラベル生成部12は、取得した類似性に関わる属性値を格納可能なノードが既に類似インデックスに含まれていれば、そのノードにその類似性に関わる属性値を格納する。また、ラベル生成部12は、取得した類似性に関わる属性値を格納可能なノードが未だ類似インデックスに含まれていなければ、新たにノードを生成してそのノードに類似性に関わる属性値を格納する。以降、「類似インデックスにおいて既存または新規のノードに、データの類似性に関わる属性値を格納する」ことを、「類似インデックスのノードに、データの類似性に関わる属性値を挿入する」とも記載する。そして、ラベル生成部12は、類似インデックスにおいて、ルートノードから挿入したノードまでのパスを求め、求めたパスに基づいて、ラベルを生成すればよい。
 データ記憶部13は、データ毎に、類似性に関わる属性値およびラベルを関連付けて記憶する。例えば、データ記憶部13は、データ毎に、類似性に関わる属性値を格納するレコードに、ラベルを格納するカラムを設けてもよい。なお、データ記憶部13は、データの類似性に関わる属性値と、ラベルとの関連性が特定できる手法であれば、どのような形式でデータを格納してもよい。またデータ記憶部13は、各データの類似性に関わる属性値およびラベルを関連付けた情報を、複数のブロックに分散して記憶してもよい。また、その場合、各ブロックは、物理的に異なる複数の装置(例えば、複数のメモリ1002)に分散されていてもよい。
 類似演算部14は、データ記憶部13に記憶された全てまたは一部のデータについて、ラベルを用いて類似インデックスを再構成する。そして、類似演算部14は、再構成した類似インデックスを用いて、全てまたは一部のデータを対象として類似性に基づく演算を実行する。例えば、類似演算部14は、演算の条件を、入力として取得してもよい。そして、類似演算部14は、取得した演算の条件に基づいて、再構成した類似インデックスを用いて類似性に基づく演算を実行してもよい。
 具体的には、類似演算部14は、データ記憶部13に記憶された全てまたは一部のデータを対象として、ラベルに基づいてソートを行う。ラベルは、類似インデックスにおけるパスを表しているので、ソートにより、類似インデックスが再構成される。
 また、例えば、類似性に基づく演算とは、類似結合であってもよい。この場合、類似演算部14は、類似結合の条件を入力として取得し、再構成された類似インデックスにおいて、類似結合の条件を用いて類似結合の演算を実施してもよい。なお、類似結合には、類似インデックスを用いて類似結合を実現する公知の技術を適用可能である。
 以上のように構成された類似演算装置1の動作について、図面を参照して説明する。
 まず、類似演算装置1がデータ記憶部13に情報を記憶する動作を図3に示す。
 図3では、まず、ラベル生成部12は、対象となるデータの類似性に関わる属性値を取得する(ステップA1)。
 次に、ラベル生成部12は、取得した類似性に関わる属性値を、類似インデックス記憶部11に記憶された類似インデックスのノードに挿入する(ステップA2)。
 次に、ラベル生成部12は、類似性に関わる属性値を挿入したノードを示すパスに基づいて、ラベルを生成する(ステップA3)。
 次に、ラベル生成部12は、生成したラベルと、取得した類似性に関わる属性値とを関連付けた情報を、データ記憶部13に記憶させる(ステップA4)。
 以上で、類似演算装置1は、データ記憶部13に情報を記憶する動作を終了する。
 次に、類似演算装置1が類似性に基づく演算を行う動作を図4に示す。
 図4では、まず、類似演算部14は、データ記憶部13に記憶された情報が示すデータのうち演算の対象となるデータについて、ラベルを用いて類似インデックスを再構成する(ステップB1)。なお、対象となるデータは、データ記憶部13に記憶された全ての情報が示すデータであってもよいし、一部の情報が示すデータであってもよい。
 次に、類似演算部14は、再構成した類似インデックスを用いて、演算対象のデータのセットについて、類似性に基づく演算を実行する(ステップB2)。
 例えば、前述のように、類似演算部14は、入力として取得した演算の条件に基づいて、類似性に基づく演算を行ってもよい。また、前述のように、類似演算部14は、類似性に基づく演算として、類似結合を行ってもよい。
 以上で、類似演算装置1は、類似性に基づく演算を行う動作を終了する。
 次に、類似演算装置1による動作を具体例で示す。ここでは、類似性に関する演算として、類似結合が適用された例について説明する。
 また、この具体例では、類似インデックス記憶部11は、図5に示す類似インデックスを記憶しているものとする。図5において、矩形が連結された長方形は、ノードを表す。例えば、A1~Anの矩形が連結された長方形は、ノードAを表す。また、それぞれの矩形は、そのノードに格納された各データの類似性に関わる属性値を表す。また、矩形に囲まれたA1、B1等の文字列は、ノードおよびそのノード内での配置順序を表している。例えば、A1は、ノードAにおける配置順序が1番目であることを表している。以降、ノードAにおいて配置順序が1番目であることを、ノードA1とも記載する。なお、図5では、各ノードにn(nは1以上の整数)個ずつのデータが格納される例が示されているが、あるノードに格納されるデータの数は、他のノードに格納されるデータの数と必ずしも同一であるとは限らない。
 まず、この具体例において、データ記憶部13に情報が記憶される動作について説明する。
 ここでは、ラベル生成部12は、対象となるデータの類似性に関わる属性値を取得し(ステップA1)、類似インデックス記憶部11に記憶された類似インデックスのノードに挿入する(ステップA2)。ここでは、ノードC1に、取得した類似性に関わる属性値が挿入されたとする。
 次に、ラベル生成部12は、ルートノードから挿入したノードC1までのパスに基づいてラベルを生成する(ステップA3)。ここでは、ノードC1へのパスは、A1、B1、C1という、ノードおよび配置順序を表す情報の並びによって表される。そこで、ラベル生成部12は、これらのノードおよび配置順序を表す情報をその並びの順に文字列として連結することにより、「A1-B1-C1」というラベルを生成する。なお、ここでは、連結する文字列として、「-」(ハイフン)を用いている。
 次に、ラベル生成部12は、生成したラベル「A1-B1-C1」と、このデータの類似性に関わる属性値とを関連付けた情報を、データ記憶部13に記憶させる(ステップA4)。
 以上で、データ記憶部13に情報が記憶される動作の具体例の説明を終了する。
 次に、この具体例で類似結合を行う動作について説明する。この具体例では、データ記憶部13は、類似性に関わる属性値およびラベルを関連付けた情報を、複数のブロックに分散して記憶するものとする。また、ここでは、ブロック内で類似結合が行われる例について説明する。
 まず、類似演算部14は、データ記憶部13に記憶された情報を、ブロック毎にラベルを用いてソートすることにより、類似インデックスを再構成する(ステップB1)。
 具体的には、類似演算部14は、データ記憶部13に記憶された情報を、ラベルの文字列の昇順にソートする。このようにソートされた情報の並びでは、ラベルの長さが類似インデックスにおける階層の深さを表す。また、同じ長さのラベルで前後に続くデータは、同一の部分木において隣り合うノードを表す。したがって、類似演算部14は、データ記憶部13に記憶された情報をラベルでソートすることにより、類似インデックスを再構成できる。
 次に、類似演算部14は、再構成した類似インデックスを用いて、ブロック毎に類似結合を実行する(ステップB2)。例えば、類似演算部14は、再構成した類似インデックスにおいて、隣り合うノードを類似結合してもよい。
 このように、本実施の形態の具体例では、類似演算装置1は、データのサブセットであるブロック毎のデータについて、容易に類似インデックスを再構成することができる。
 以上で、具体例の説明を終了する。
 次に、本発明の第1の実施の形態の効果について述べる。
 本発明の第1の実施の形態としての類似演算装置は、データの類似性に基づく演算を行う際に用いられる類似インデックスにおいて、任意のデータのサブセットに関する類似インデックスの再構築を容易にすることができる。
 その理由について説明する。本実施の形態では、類似インデックス記憶部が、データの類似性に関わる属性値を格納したノードが、データ間の類似関係を表すよう階層的に構成された類似インデックスを記憶している。そして、ラベル生成部が、データ毎に、類似インデックスにおいてその類似性に関わる属性値が格納されたノードの位置を示すパスに基づくラベルを生成する。そして、ラベル生成部が、データ毎に、類似性に関わる属性値とラベルとを関連付けた情報を、データ記憶部に記憶させる。また、類似演算部が、データ記憶部に記憶された全てまたは一部の情報が示すデータについて、ラベルを用いて類似インデックスを再構成する。そして、類似演算部が、再構成した類似インデックスを用いて、全てまたは一部のデータを対象とする類似性に基づく演算を実行するからである。
 このように、本実施の形態は、データ記憶部に記憶されたラベルを参照することにより、類似インデックス記憶部の類似インデックスを参照することなく、類似インデックスを容易に再構成することができる。
 (第2の実施の形態)
 次に、本発明の第2の実施の形態について図面を参照して詳細に説明する。なお、本実施の形態の説明において参照する各図面において、本発明の第1の実施の形態と同一の構成および同様に動作するステップには同一の符号を付して本実施の形態における詳細な説明を省略する。
 まず、本発明の第2の実施の形態としての類似演算装置2の機能ブロック構成を、図6に示す。図6において、類似演算装置2は、本発明の第1の実施の形態としての類似演算装置1に対して、データ記憶部13に替えてデータ記憶部23と、類似演算部14に替えて類似演算部24とを含む点が異なる。なお、類似演算装置2およびその各機能ブロックは、図2を参照して説明した本発明の第1の実施の形態と同一のハードウェア要素によって構成可能である。ただし、類似演算装置2およびその各機能ブロックのハードウェア構成は、上述の構成に限定されない。
 データ記憶部23は、データの類似性に関わる属性値およびラベルを関連付けた情報を、複数のブロックに分散して記憶する。複数のブロックへの分散手法については、公知の技術を適用可能である。
 類似演算部24は、ラベルにおけるプリフィックスに基づいて、データの類似性に関わる属性値およびラベルを関連付けた情報を、複数のブロックに再分散する。つまり、類似演算部24は、同一のプリフィックスを有するラベルに関連付けられたデータを1つ以上のブロックから取得し、取得したデータを、同一のブロックに記憶させればよい。例えば、プリフィックスとしては、ラベルの文字列のうち類似インデックスにおいて所定の階層までのパスを表す文字列が適用されてもよい。
 そして、類似演算部24は、各ブロックに格納された情報が示すデータについて、ラベルに基づいて類似インデックスを再構成する。また、類似演算部24は、各ブロックに格納された情報が示すデータについて、それぞれの類似インデックスを用いて、類似性に基づく演算を実行する。なお、類似演算部24が、複数のCPU1001により構成される場合、各CPU1001が、対応するブロックについて類似インデックスを再構成し、再構成した類似インデックスを用いて類似性に基づく演算を行ってもよい。
 以上のように構成された類似演算装置2の動作について、図面を参照して説明する。なお、類似演算装置2がデータ記憶部23に情報を記憶する動作については、図3を参照して説明した本発明の第1の実施の形態の動作と同様であるため、本実施の形態における説明を省略する。
 ここでは、類似演算装置2が類似性に基づく演算を行う動作を図7に示す。
 図7では、まず、類似演算部24は、データ記憶部23に記憶された情報を、プリフィックスに基づき複数のブロックに再分散する(ステップB21)。
 次に、類似演算部24は、各ブロックに記憶された情報が示すデータについて、ラベルを用いて類似インデックスを再構成する(ステップB22)。
 次に、類似演算部24は、各ブロックに記憶された情報が示すデータについて、再構成した類似インデックスを用いて、類似性に基づく演算を実行する(ステップB23)。
 以上で、類似演算装置2は、類似性に基づく演算を行う動作を終了する。
 次に、類似演算装置2の動作を具体例で示す。ここでは、類似性に関する演算として、類似結合が適用された例について説明する。
 この具体例では、データ記憶部23は、任意の分割手法を用いて、データおよびラベルを関連付けた情報を、複数のブロックに分散して記憶しているものとする。このとき、分散配置されたブロックにまたがって、類似結合を行う場合について述べる。また、類似インデックス記憶部11には、図5を参照して説明した本発明の第1の実施の形態の具体例と同様の類似インデックスが記憶されているとする。
 この場合、類似演算部24は、データ記憶部23に記憶された情報に対して、ラベルのプリフィックスをキーにしたハッシュ結合を実施する(ステップB21)。
 例えば、図5の類似インデックスにおいて、ラベルのプリフィックスとして3階層目のノードまでのパスを適用した例を、図8に示す。図8において、ノードC1以下の部分木に格納されるデータの類似性に関わる属性値は、プリフィックス「A1-B1-C1」を持つラベルに関連付けられている。また、ノードJ1以下の部分木に格納されるデータの類似性に関わる属性値は、プリフィックス「An-I1-J1」を持つラベルに関連付けられている。そこで、類似演算部24は、プリフィックス「A1-B1-C1」や、プリフィックス「An-I1-J1」等を再分散キーとして、ハッシュ結合を実施する。したがって、ハッシュ結合により、同一のプリフィックスを持つラベルに関連付けられたデータの類似性に関わる属性値は、同じブロックに集められる。
 その後、類似演算部24は、各ブロックにおいて、ラベルを用いて類似インデックスを再構成し(ステップB22)、再構成した類似インデックスを用いてブロック内の類似結合を行えばよい(ステップB23)。
 以上で、具体例の説明を終了する。
 次に、本発明の第2の実施の形態の効果について述べる。
 本発明の第2の実施の形態としての類似演算装置は、複数のブロックに分散して記憶されたデータの類似性に関わる属性値を用いて、ブロックにまたがった類似性に基づく演算を、効率的に実行することができる。
 その理由について説明する。本実施の形態では、データ記憶部が、データの類似性に関わる属性値およびラベルを関連付けた情報を、複数のブロックに分散して記憶している。そして、類似演算部が、データの類似性に関わる属性値およびラベルを関連付けた情報を、プリフィックスに基づき複数のブロックに再分散し、各ブロックに記憶された情報が示すデータについて、ラベルを用いて類似インデックスを再構成する。そして、類似演算部が、各ブロックに記憶された情報が示すデータについて、再構成した類似インデックスを用いて、類似性に基づく演算を実行するからである。
 なお、本実施の形態において、データ記憶部は、複数のブロックを、物理的に異なる複数の記憶装置にそれぞれ記憶させてもよい。その場合、本実施の形態は、ラベルのプリフィックスを再分散のためのキーとして用いることにより、効率的なハッシュ結合アルゴリズムを適用して、再分散を行うことができる。その結果、本実施の形態は、効率的に、類似性に基づく演算の対象となるデータを同一の記憶装置に集めることができる。これにより、本実施の形態は、分散環境下での類似性に基づく演算を効率化することができる。
 (第3の実施の形態)
 次に、本発明の第3の実施の形態について図面を参照して詳細に説明する。なお、本実施の形態の説明において参照する各図面において、本発明の第1および第2の実施の形態と同一の構成および同様に動作するステップには同一の符号を付して本実施の形態における詳細な説明を省略する。
 まず、本発明の第3の実施の形態としての類似演算装置3の機能ブロック構成を図9に示す。類似演算装置3は、本発明の第2の実施の形態の類似演算装置2に対して、類似インデックス記憶部11に替えて類似インデックス記憶部31と、ラベル生成部12に替えてラベル生成部32と、類似演算部24に替えて類似演算部34とを備える点が異なる。
 なお、類似演算装置3およびその各機能ブロックは、図2を参照して説明した本発明の第1の実施の形態と同一のハードウェア要素によって構成可能である。ただし、類似演算装置3およびその各機能ブロックのハードウェア構成は、上述の構成に限定されない。
 類似インデックス記憶部31は、類似インデックスを格納する。類似インデックスは、任意のノード以下に、そのノードに格納されたデータの類似性に関わる属性値に対する類似性が類似閾値以上の他のデータの類似性に関わる属性値が格納されるよう構成される。つまり、このような類似インデックスでは、あるノードに格納されたデータの類似性に関わる属性値と、その子のノードとの関係性に、類似閾値が設定されている。類似閾値としては、例えば、下の階層になるほどより類似度が高いことを表す値が設定されていてもよい。
 ラベル生成部32は、ラベルに、データの類似性に関わる属性値が格納されたノードの位置を示すパスにおいて適用された類似閾値を表す情報をさらに含める。例えば、ラベルは、ルートノードから該当するノードまでのパスに含まれる各ノードについて、ノード、ノード内での配置順序、および、子のノードとの関係性に設定された類似閾値の組を表す情報を、パスにおける並び順に連結した文字列であってもよい。
 類似演算部34は、ラベルに含まれる類似閾値を表す情報に基づいて、再分散の際に用いるプリフィックスを決定する。例えば、前述のように、類似閾値として、下の階層になるほどより類似度が高いことを表す値が設定されているとする。また、類似閾値は、値が大きいほど類似度が高いものとする。この場合、類似演算部34は、ラベルの文字列において、所定の値以上の類似閾値が適用されたノードまでのパスを表す文字列をプリフィックスとして適用してもよい。そして、類似演算部34は、決定したプリフィックスを用いて、本発明の第2の実施の形態における類似演算部24と同様に、情報の再分散および類似性に基づく演算を実行する。
 以上のように構成された類似演算装置3の動作について、図面を参照して説明する。
 まず、類似演算装置3がデータ記憶部23に情報を記憶する動作を図10に示す。
 図10では、類似演算装置3は、ステップA1~A2まで、本発明の第1の実施の形態と同様に動作する。これにより、新たに取得されたデータの類似性に関わる属性値が、類似インデックス記憶部31に記憶された類似インデックスのノードに挿入される。
 次に、ラベル生成部32は、ルートノードから挿入したノードまでのパスと、そのパスにおいて適用された類似閾値とに基づいて、ラベルを生成する(ステップA33)。
 以降、類似演算装置3は、ステップA4を、本発明の第1の実施の形態と同様に実行する。これにより、生成された類似閾値を含むラベルと、対象となるデータの類似性に関わる属性値とが関連付けられて、データ記憶部23に記憶される。
 以上で、類似演算装置3は、データ記憶部23に情報を記憶する動作を終了する。
 次に、類似演算装置3が類似性に基づく演算を行う動作を図11に示す。
 図11では、まず、類似演算部34は、類似閾値に基づいて、再分散に用いるプリフィックスを決定する(ステップB31)。
 例えば、類似演算部34は、類似インデックスをルートからたどる各パスにおいて、類似閾値が所定の値を超えるまでのパスを表す文字列を、プリフィックスとして決定してもよい。
 以降、類似演算装置3は、ステップB21~B23まで、本発明の第2の実施の形態と同様に動作する。これにより、ステップB31で決定されたプリフィックスに基づき再分散されたブロック毎に、類似インデックスが再構成され、類似性に基づく演算が実行される。
 以上で、類似演算装置3は、類似性に基づく演算を行う動作を終了する。
 次に、類似演算装置3による類似性に基づく演算を具体例で示す。
 この具体例では、類似性に関する演算として、類似結合が適用された例について説明する。また、類似結合の条件として、「類似度がδq以上」という条件が指定されているものとする。また、データ記憶部23は、データの類似性に関わる属性値およびラベルを関連付けた情報を、複数のブロックに分散して記憶しているものとする。このとき、ブロック内で類似結合を行う場合について述べる。
 また、この具体例では、類似インデックス記憶部31は、図12に示した情報を記憶しているものとする。このような類似インデックスの一例を示す関連技術が、次の公知文献に記載されている。
 公知文献:「劉 健全、西村 祥治、荒木 拓也著“類似度の階層関係に基づく木構造索引を用いた効率的な類似検索”、第5回データ工学と情報マネジメントに関するフォーラム(第11回日本データベース学会年次大会) DEIM 2013、2013/3/3、セッションA9-1、インターネット<URL:http://db-event.jpn.org/deim2013/proceedings/index.html>」
 この公知文献に示された類似インデックスは、図12に示すように、あるノード以下に、当該ノードに記憶された各データの類似性に関わる属性値に対して類似閾値(δx)以上となるデータの類似性に関わる属性値を格納する。つまり、ノードA1に格納されたデータの類似性に関わる属性値の下にある部分木にある全てのノードに格納されたデータは、ノードA1に格納されたデータとの類似度がδ1よりも大きいことを表す。
 まず、この具体例でデータ記憶部23に情報が記憶される動作について説明する。
 ここでは、ラベル生成部32は、対象となるデータの類似性に関わる属性値を取得し(ステップA1)、類似インデックス記憶部31に記憶された類似インデックスのノードに挿入する(ステップA2)。ここでは、ノードC1にこの類似性に関わる属性値が挿入されたとする。
 次に、ラベル生成部32は、図13に示すように、ルートノードであるノードA1から、データを挿入したノードC1までのパスと、そのパスにおいて適用された類似閾値とを文字列として連結してラベルを生成する。生成されたラベルは、図13に示すように、「(A1,δ1)-(B1,δ2)-C1」となる。
 次に、類似演算部34は、類似インデックスのルートからの各パスにおいて、類似閾値がδqをはじめて超える要素までの文字列をプリフィックス(すなわち、再分散キー)として決定する(ステップB31)。例えば、図14に示すように、ルートノードからリーフノードにたどった各パスにおいて、類似閾値がδqを初めて超えるのが、δ3、δ10、δ11の3つであるとする。この場合、類似演算部34は、再分散キーとして、(A1,δ1)-(B1,δ2)-(C1,δ3)、(An,δ8)-(I1,δ9)-(J1,δ10)、(An,δ8)-(I1,δ9)-(Jn,δ11)を用いることを決定する。
 そして、類似演算部34は、これらのプリフィックスを再分散キーとして用いて、データを再分散する。これにより、図14において、破線で囲んだ部分木ごとにデータが再分散される(ステップB21)。
 そして、類似演算部34は、各ブロックにおいて、ラベルを用いて類似インデックスを再構成し(ステップB22)、再構成した類似インデックスを用いてブロック内の類似結合を行えばよい(ステップB23)。
 以上で、具体例の説明を終了する。
 次に、本発明の第3の実施の形態の効果について述べる。
 本発明の第3の実施の形態としての類似演算装置は、複数のブロックに分散して記憶されたデータに対して、ブロックにまたがった類似性に基づく演算を、さらに効率的に実行することができる。
 その理由について説明する。本実施の形態では、類似インデックス記憶部が、任意のノード以下に、そのノードに格納されたデータの類似性に関わる属性値に対する類似性が類似閾値以上のデータの類似性に関わる属性値が格納されるよう構成された類似インデックスを記憶している。そして、ラベル生成部は、データ毎に、類似インデックスにおいてそのデータが格納されたノードの位置を示すパスと、そのパスにおいて適用された類似閾値を表す情報とを含めたラベルを生成する。そして、類似演算部は、ラベルに含まれる類似閾値を表す情報に基づいて、再分散の際に用いるプリフィックスを決定するからである。
 つまり、本実施の形態は、ラベルに含まれる類似閾値を利用することにより、類似性に基づく演算のために行う再分散に、より適切なプリフィックスを決定することができる。
 (第4の実施の形態)
 次に、本発明の第4の実施の形態について図面を参照して詳細に説明する。本実施の形態では、データが、類似性に関わる属性以外にも他の属性を有する場合に、他の属性に関する条件を満たすデータを対象に類似性に基づく演算を行う例について説明する。
 まず、このような場合において、背景技術で述べた特許文献1に記載の関連技術が抱える問題について説明する。上述した関連技術は、類似性に基づく演算の実行効率を著しく低下させる。例えば、データが、顔画像を含む映像であるとする。この場合、顔画像は、それに映っている顔に関する特徴量(多次元値の類似性に関わる属性)だけでなく、それが撮られた場所や時間などの情報(類似性に関わる属性以外の属性)を有している。この時、顔に関する特徴量だけを条件とした類似結合は、場所や時間に関する属性を用いないため、特許文献1に記載された類似インデックスを適用するだけで十分である。
 一方、場所と時間を絞り込んだ上で、顔に関する特徴量を条件として類似結合する場合を考える。この時、顔に関する特徴量による類似結合は、特許文献1に記載された類似インデックスを用いる場合、各データの場所や時間に関する属性が条件を満たすかどうかを判別しながら演算する必要がある。なぜなら、特許文献1に記載された類似インデックスは、顔に関する特徴量に関する操作を効率化するが、それ以外の属性に対する操作の効率化には寄与しないからである。そのため、特許文献1に記載された類似インデックスでは、個々のデータに関して他の属性に関する条件が個別に判別される必要があるためである。
 そこで、場所や時間に関する属性による絞り込みを効率化するように、場所や時間の範囲ごとにデータをブロックに分割したとする。このとき、それぞれの場所や時間の範囲内において、特許文献1に記載された類似インデックスを適用すれば、場所や時間に関する条件がその範囲内にある場合は、上記の問い合わせを効率的に実行ができる。なぜなら、場所や時間の条件を満たすブロックを参照するだけで、他の属性により絞り込んだデータに対して類似結合を実行できるからである。しかしながら、場所や時間に関する属性に対する条件が、ブロックの範囲をまたぐ場合、特許文献1に記載された関連技術は、顔に関する特徴量による類似結合を非効率にする。なぜなら、場所や時間に関する属性に対する条件を満たしたそれぞれのブロックにある類似インデックスを1つに統合する必要があるからである。個々のブロックの類似インデックスによって作られた構造はそれらに挿入されたデータに大きく依存するため、この統合操作は、新規に類似インデックスと構築するのとほぼ等価になる。特に、分散環境を想定する場合、一か所に該当するデータを集約して、類似インデックスを再構築することになるため、著しく性能が低下する要因となる。
 以下、本実施の形態では、データが類似性に関わる属性以外にも他の属性を有する場合に、特許文献1に記載された関連技術における上述の問題を解決する例について述べる。
 なお、本実施の形態の説明において参照する各図面において、本発明の第1~第3の実施の形態と同一の構成および同様に動作するステップには同一の符号を付して本実施の形態における詳細な説明を省略する。
 まず、本発明の第4の実施の形態としての類似演算装置4の機能ブロック構成を図15に示す。類似演算装置4は、本発明の第2の実施の形態の類似演算装置2に対して、データ記憶部23に替えてデータ記憶部43と、類似演算部24に替えて類似演算部44とを備える点が異なる。
 なお、類似演算装置4およびその各機能ブロックは、図2を参照して説明した本発明の第1の実施の形態と同一のハードウェア要素によって構成可能である。ただし、類似演算装置4およびその各機能ブロックのハードウェア構成は、上述の構成に限定されない。
 データ記憶部43は、データの類似性に関わる属性値およびラベルを関連付けた情報に加えて、さらに、それらのデータについて、類似性に関わる属性値以外の他の属性値に基づく選択を可能にする情報を記憶する。例えば、データ記憶部43は、データ毎に、類似性に関わる属性値と、ラベルと、他の属性値とを関連付けた情報を記憶してもよい。
 類似演算部44は、データ記憶部43から、他の属性値に関する選択条件を満たす情報を抽出する。そして、類似演算部44は、抽出した情報を用いて、ラベルに基づき再構成した類似インデックスを用いて類似性に基づく演算を実行する。
 以上のように構成された類似演算装置4の動作について、図面を参照して説明する。なお、類似演算装置4がデータ記憶部43に情報を記憶する動作については、図3を参照して説明した本発明の第1の実施の形態の動作と同様であるため、本実施の形態における説明を省略する。ただし、データ記憶部43には、ラベル生成部12によって類似性に関わる属性値およびラベルを関連付けた情報が追加される際に、該データが有する他の属性値に関する情報も併せて関連付けて追加されるものとする。
 ここでは、類似演算装置4が類似性に基づく演算を行う動作を図16に示す。
 図16では、まず、類似演算部44は、データ記憶部43に記憶された情報のうち、選択条件を満たす情報を抽出する(ステップB41)。
 以降、類似演算装置4は、抽出された情報を用いて、本発明の第1の実施の形態と同様にステップB1~B2を実行する。これにより、ステップB41で抽出された情報が示すデータについて、類似インデックスが再構成され、類似性に基づく演算が実行される。
 以上で、類似演算装置4は、類似性に基づく演算を行う動作を終了する。
 次に、類似演算装置4の動作を具体例で示す。
 ここでは、類似性に関する演算として、類似結合が適用された例について説明する。また、データは、特徴量および時刻という2つの属性を有するものとする。特徴量は、類似性に関わる属性値である。時刻は、類似性に関わる属性値以外の他の属性値である。
 また、図3の動作が実行されることにより、データ記憶部43には、図17のように情報が記憶されているとする。図17において、各行は、各データについて、特徴量の類似インデックスに基づき生成されたラベルと、そのデータの時刻とを関連付けた情報を表している。なお、各行には、さらに特徴量を表す情報またはその参照情報が含まれるが、図示が省略されている。
 このとき、類似演算部44は、図17に示した情報のうち、時刻に基づく選択条件を満たすデータを抽出する。もし、選択条件が、「時刻が11:00~12:00の範囲」という条件であれば、類似演算部44は、5~8行目の情報を抽出する(ステップB41)。
 そして、類似演算部44は、5~8行目の情報について、ラベルを用いて類似インデックスを再構成する(ステップB1)。
 そして、類似演算部44は、再構成した類似インデックスを用いて、類似結合を実行する(ステップB2)。
 また、他の具体例について述べる。この例では、データ記憶部43は、図18に示すように、データを、時刻に関する属性の範囲でブロックに分割して記憶している。
 この場合、類似演算部44は、ステップB41において、時刻に関して与えられた選択条件を満たすブロックの情報を取得する。そして、類似演算部44は、取得したブロックのデータについて、ラベルに基づき類似インデックスを再構成し、類似結合を実行すればよい。このように、他の属性値に基づく選択条件があらかじめ想定される場合は、データ記憶部43は、他の属性値に基づき複数のブロックにデータを分散して記憶していてもよい。
 以上で、具体例の説明を終了する。
 次に、本発明の第4の実施の形態の効果について述べる。
 本発明の第4の実施の形態としての類似演算装置は、データの類似性に基づく演算を行う際に、類似インデックスと任意の他のインデックスとを容易に共存させることができる。
 その理由について説明する。本実施の形態では、本発明の第1の実施の形態と同様の構成に加えて、データ記憶部が、類似性に関わる属性値以外の他の属性値に基づいてデータの選択を可能にする情報をさらに記憶している。そして、類似演算部が、他の属性値に関する選択条件を満たすデータについて、ラベルに基づき再構成した類似インデックスを用いて、類似性に基づく演算を実行するからである。
 このように、本実施の形態は、本発明の第1の実施の形態と同様に生成したラベルにより、他の属性値に基づく選択条件を満たすようなデータのサブセットについて、類似インデックスの再構成を容易にする。つまり、本実施の形態は、類似性に関わる属性値による類似インデックスと、他の手法のインデックスとの組み合わせを可能にする。その結果、本実施の形態は、他の属性値に基づく選択条件を満たすデータのサブセットについて、再構成した類似インデックスにおける類似性を容易に判定でき、類似性に基づく演算を容易にする。
 これにより、本実施の形態は、データセットの規模が大きく、分散して配置される場合であって、類似性に関わる属性以外の他の属性に関する条件を含むような複雑な類似性に関わる演算が必要な場合に、類似性に関わる演算を効率化することができる。
 なお、上述した本発明の各実施の形態において、類似インデックス記憶部が、木構造の類似インデックスを記憶する例を中心に説明した。これに限らず、類似インデックス記憶部が記憶する類似インデックスは、木構造の集合であるフォレスト構造であってもよい。
 また、上述した本発明の各実施の形態において、ラベル生成部が、ラベルとして、ノードおよびそのノード内での配置順序を表す文字列を、パスに含まれる並びの順にハイフンで連結した文字列を生成する例を中心に説明した。これに限らず、ラベル生成部は、類似インデックスにおいて任意の部分木に挿入されたデータ同士が共通する接頭辞を持つようなラベルを生成すればよい。例えば、ラベルは、パスに含まれるノードにおける配置順序を連結したものであってもよい。例えば、ルートノード内で1番目に配置された属性値の子ノード内で3番目に配置された属性値の子ノード内で2番目に配置された属性値には、「1-3-2」というラベルが生成されてもよい。また、もし、類似インデックスがフォレスト構造である場合、ラベル生成部は、木に番号付けをし、その木の番号およびその木のルートノードからデータの挿入位置を示すパスに基づきラベルを生成すればよい。
 また、上述した本発明の各実施の形態において、類似演算部が、類似性に基づく演算として類似結合を実行する例を中心に説明した。ただし、類似性に基づく演算は、類似結合に限らず、類似インデックスを利用して行われる他の演算であってもよい。
 また、上述した本発明の各実施の形態において、類似演算装置の各機能ブロックが、メモリに記憶されたコンピュータ・プログラムを実行するCPUによって実現される例を中心に説明した。これに限らず、各機能ブロックの一部、全部、または、それらの組み合わせが専用のハードウェアにより実現されていてもよい。
 また、上述した本発明の各実施の形態において、類似演算装置の機能ブロックは、複数の装置に分散されて実現されてもよい。
 また、上述した本発明の各実施の形態において、各フローチャートを参照して説明した類似演算装置の動作を、本発明のコンピュータ・プログラムとしてコンピュータ装置の記憶装置(記憶媒体)に格納しておく。そして、係るコンピュータ・プログラムを当該CPUが読み出して実行するようにしてもよい。そして、このような場合において、本発明は、係るコンピュータ・プログラムのコードあるいは記憶媒体によって構成される。
 また、上述した各実施の形態は、適宜組み合わせて実施されることが可能である。
 また、本発明は、上述した各実施の形態に限定されず、様々な態様で実施されることが可能である。
 以上、上述した実施形態を模範的な例として本発明を説明した。しかしながら、本発明は、上述した実施形態には限定されない。即ち、本発明は、本発明のスコープ内において、当業者が理解し得る様々な態様を適用することができる。
 この出願は、2016年6月21日に出願された日本出願特願2016-122509を基礎とする優先権を主張し、その開示の全てをここに取り込む。
 1、2、3、4  類似演算装置
 11、31  類似インデックス記憶部
 12、32  ラベル生成部
 13、23、43  データ記憶部
 14、24、34、44 類似演算部
 1001 CPU
 1002 メモリ
 1003 出力装置
 1004 入力装置

Claims (6)

  1.  データの類似性に関わる属性値を格納したノードが、前記データ間の類似関係を表すよう階層的に構成された類似インデックスを記憶した類似インデックス記憶手段と、
     前記データ毎に、前記類似インデックスにおいて前記属性値が格納されたノードの位置を示すパスに基づくラベルを生成するラベル生成手段と、
     前記データ毎に、前記属性値および前記ラベルを関連付けた情報を記憶するデータ記憶手段と、
     前記データ記憶手段に記憶された全てまたは一部の情報が示すデータについて、前記ラベルに基づき前記類似インデックスを再構成し、再構成した前記類似インデックスを用いて前記全てまたは一部のデータを対象とする類似性に基づく演算を実行する類似演算手段と、
     を備えた類似演算装置。
  2.  前記データ記憶手段が、前記属性値および前記ラベルを関連付けた情報を、複数のブロックに分散して記憶するとき、
     前記類似演算手段は、前記ラベルのプリフィックスに基づいて、前記属性値および前記ラベルを関連付けた情報を複数のブロックに再分散して前記データ記憶手段に記憶させ、再分散された各ブロックに記憶された情報が示すデータについて、前記ラベルに基づき再構成した前記類似インデックスを用いて、前記類似性に基づく演算を実行することを特徴とする請求項1に記載の類似演算装置。
  3.  前記類似インデックス記憶手段は、前記類似インデックスにおいて任意のノード以下に、そのノードに格納された前記データの前記属性値に対する類似性が類似閾値以上の他の前記データの前記属性値を格納するよう構成された前記類似インデックスを記憶し、
     前記ラベル生成手段は、前記ラベルに、前記データの前記属性値が格納されたノードの位置を示すパスにおいて適用された前記類似閾値を表す情報をさらに含め、
     前記類似演算手段は、前記ラベルに含まれる前記類似閾値を表す情報に基づいて、前記再分散の際に用いるプリフィックスを決定することを特徴とする請求項2に記載の類似演算装置。
  4.  前記データ記憶手段は、前記データ毎に、前記類似性に関わる属性値以外の他の属性値に基づく選択を可能にするための情報をさらに記憶し、
     前記類似演算手段は、前記他の属性値に関する選択条件を満たすデータについて、前記ラベルに基づき再構成した前記類似インデックスを用いて前記類似性に基づく演算を実行することを特徴とする請求項1から請求項3のいずれか1項に記載の類似演算装置。
  5.  コンピュータ装置が、
     データの類似性に関わる属性値を格納したノードが、前記データ間の類似関係を表すよう階層的に構成された類似インデックスを用いて、
     前記データ毎に、前記類似インデックスにおいて前記属性値が格納されたノードの位置を示すパスに基づくラベルを生成し、
     前記データ毎に、前記属性値および前記ラベルを関連付けた情報をデータ記憶手段に記憶し、
     前記データ記憶手段に記憶された全てまたは一部の情報が示すデータについて、前記ラベルに基づき前記類似インデックスを再構成し、再構成した前記類似インデックスを用いて前記全てまたは一部のデータを対象とする類似性に基づく演算を実行する方法。
  6.  データの類似性に関わる属性値を格納したノードが、前記データ間の類似関係を表すよう階層的に構成された類似インデックスを用いて、
     前記データ毎に、前記類似インデックスにおいて前記属性値が格納されたノードの位置を示すパスに基づくラベルを生成するラベル生成ステップと、
     前記データ毎に、前記属性値および前記ラベルを関連付けた情報をデータ記憶手段に記憶するデータ記憶ステップと、
     前記データ記憶手段に記憶された全てまたは一部の情報が示すデータについて、前記ラベルに基づき前記類似インデックスを再構成し、再構成した前記類似インデックスを用いて前記全てまたは一部のデータを対象とする類似性に基づく演算を実行する類似演算ステップと、
     をコンピュータ装置に実行させるプログラムを記憶した記憶媒体。
PCT/JP2017/022440 2016-06-21 2017-06-19 類似演算装置、方法および記憶媒体 WO2017221857A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US16/310,845 US11113314B2 (en) 2016-06-21 2017-06-19 Similarity calculating device and method, and recording medium
JP2018524062A JP7099316B2 (ja) 2016-06-21 2017-06-19 類似度演算装置、方法、およびプログラム

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2016122509 2016-06-21
JP2016-122509 2016-06-21

Publications (1)

Publication Number Publication Date
WO2017221857A1 true WO2017221857A1 (ja) 2017-12-28

Family

ID=60784110

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2017/022440 WO2017221857A1 (ja) 2016-06-21 2017-06-19 類似演算装置、方法および記憶媒体

Country Status (3)

Country Link
US (1) US11113314B2 (ja)
JP (1) JP7099316B2 (ja)
WO (1) WO2017221857A1 (ja)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106527892B (zh) * 2016-11-04 2020-04-07 惠州Tcl移动通信有限公司 一种电子设备的截屏方法及系统
CN112052251B (zh) * 2020-09-14 2022-12-23 深圳市商汤科技有限公司 目标数据更新方法和相关装置、设备及存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005222329A (ja) * 2004-02-05 2005-08-18 Ntt Communications Kk メタデータ付与装置、メタデータ付与方法およびメタデータ付与プログラム
WO2012164735A1 (ja) * 2011-06-03 2012-12-06 富士通株式会社 情報処理装置、データ管理方法およびデータ管理プログラム
JP2013239050A (ja) * 2012-05-16 2013-11-28 Silex Technology Inc データベース操作プログラム

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5987468A (en) 1997-12-12 1999-11-16 Hitachi America Ltd. Structure and method for efficient parallel high-dimensional similarity join
US8131722B2 (en) * 2006-11-20 2012-03-06 Ebay Inc. Search clustering
JP2009211554A (ja) 2008-03-05 2009-09-17 Canon Inc 画像処理装置、画像処理方法、コンピュータプログラム、および記憶媒体
JP2014197412A (ja) 2014-06-12 2014-10-16 トムソン ライセンシングThomson Licensing 画像の類似検索システム及び方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005222329A (ja) * 2004-02-05 2005-08-18 Ntt Communications Kk メタデータ付与装置、メタデータ付与方法およびメタデータ付与プログラム
WO2012164735A1 (ja) * 2011-06-03 2012-12-06 富士通株式会社 情報処理装置、データ管理方法およびデータ管理プログラム
JP2013239050A (ja) * 2012-05-16 2013-11-28 Silex Technology Inc データベース操作プログラム

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JIANQUAN LIU: "Ruijido no Kaiso Kankei ni Motozuku Ki Kozo Sakuin o Mochiita Koritsuteki na Ruiji Kensaku", THE 5TH FORUM ON DATA ENGINEERING AND INFORMATION MANAGEMENT, 31 May 2013 (2013-05-31), pages 1 - 8 *

Also Published As

Publication number Publication date
US11113314B2 (en) 2021-09-07
US20190179836A1 (en) 2019-06-13
JP7099316B2 (ja) 2022-07-12
JPWO2017221857A1 (ja) 2019-04-11

Similar Documents

Publication Publication Date Title
WO2019238109A1 (zh) 一种故障根因分析的方法及装置
US7689630B1 (en) Two-level bitmap structure for bit compression and data management
JP6158623B2 (ja) データベース分析装置及び方法
JP6434162B2 (ja) データ管理システム、データ管理方法およびプログラム
WO2017221857A1 (ja) 類似演算装置、方法および記憶媒体
JP5844824B2 (ja) Sparqlクエリ最適化方法
De Luca et al. Multi-level tree based approach for interactive graph visualization with semantic zoom
Kriege et al. On maximum common subgraph problems in series–parallel graphs
Kokkala et al. Classification of Graeco‐Latin Cubes
JP6624062B2 (ja) 情報処理装置、情報処理方法、及び、プログラム
WO2011016281A2 (ja) ベイジアンネットワーク構造学習のための情報処理装置及びプログラム
WO2022224597A1 (ja) 設備id推論方法および設備id推論装置
CN115617978A (zh) 指标名称检索方法、装置、电子设备及存储介质
JP5447054B2 (ja) データ生成方法,データ生成装置,およびデータ生成プログラム
KR101771352B1 (ko) 동적 환경에서의 그래프 요약 방법 및 장치
JP6457290B2 (ja) グラフを剪定する方法、前記グラフを剪定する方法をコンピュータに行なわせる命令を記録している非一時的なコンピュータ可読記憶媒体、及びグラフの剪定を行うためのコンピュータシステム
JPWO2018012413A1 (ja) 類似データ検索装置、類似データ検索方法および記録媒体
Heule et al. Clausal Proof Compression.
JP6123372B2 (ja) 情報処理システム、名寄せ判定方法及びプログラム
US8566761B2 (en) Network flow based datapath bit slicing
JP6631139B2 (ja) 検索制御プログラム、検索制御方法および検索サーバ装置
WO2020017037A1 (ja) ログ分析装置、ログ分析方法、プログラム
KR20210023453A (ko) 리뷰 광고 매칭 장치 및 방법
JP5411954B2 (ja) ツリー抽出装置、ツリー抽出システム、ツリー抽出方法、及びツリー抽出プログラム
JP7196903B2 (ja) 推移閉包情報生成装置、推移閉包情報生成方法およびプログラム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17815325

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2018524062

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17815325

Country of ref document: EP

Kind code of ref document: A1