Patent Publication Number: US-6338062-B1

Title: Retrieval system, retrieval method and computer readable recording medium that records retrieval program

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to a retrieval system, a retrieval method and a computer readable recording medium that records a retrieval program, particularly relates to a retrieval system that executes pattern retrieval, a retrieval method of executing pattern retrieval and a computer readable recording medium that records a retrieval program that instructs a computer to execute pattern retrieval. 
     2. Description of the Related Art 
     Technology for pattern retrieval and structure retrieval means technology for retrieving the pattern of a character, voice and an image, compound molecular structure, RNA secondary structure and others using a computer, and a demand for higher-speed and higher-precision retrieval is arising as diversified and complicated computerized society has developed in recent years. 
     The retrieval of the most similar pattern or structure may be demanded in addition to the retrieval of a pattern or structure completely coincident. 
     For example, in the field of information chemistry, the issue of structure and activity that the property may be similar if the structure of compounds is similar has been researched from long ago and in such a case, there is a strong demand for efficiently classifying millions of compound molecular structures and efficiently retrieving similar structure. 
     In the field of pattern retrieval, a round robin retrieval method is known that distance or similarity between patterns is defined using their features, and a retrieval pattern is estimated by comparing an input unknown pattern (hereinafter called a retrieval pattern) with all retrieved patterns (hereinafter called a learned pattern) using the above distance or similarity. 
     However, in the above round robin retrieval method, as it requires much labor to calculate distance or similarity between patterns, there is a serious defect that it requires considerable time to compare with a large number of learned patterns. 
     Therefore, heretofore, a rough classification retrieval method that distance between learned patterns is calculated beforehand, learned patterns are classified into some clusters and retrieval is made has been widely used. 
     For example, in Japanese Published Unexamined Patent Application No. Hei 6-251156, the nearest cluster is acquired by classifying learned patterns into some clusters using distance between the patterns and comparing a retrieval pattern with the representative of each cluster, while converting the feature of the retrieval pattern. 
     A retrieval pattern is estimated by comparing all the learned patterns that belong to the acquired cluster with the retrieval pattern. 
     In the meantime, in the field of information chemistry, if the similar molecular structure or the partially similar molecular structure to designed molecular structure is retrieved when a new compound is synthesized, it comes into question how distance or similarity between compound molecular structures should be defined, how compound molecular structure should be represented, how a compound should be classified and how similar structure should be retrieved. 
     In Japanese Published Unexamined Patent Application No. Hei 7-28844, distance between structures is calculated by representing the solid structure of a substance by a point set and overlapping two solid structures. A similar structure is retrieved by narrowing down proposed structures depending upon geometric relationship and reducing a retrieved range. 
     However, in the above conventional type rough classification retrieval method, there is a problem that retrieval precision is bad though retrieval speed is fast. 
     FIGS. 18A and 18B show the problem of the rough classification retrieval method in relation to precision. FIG. 18A shows a case that clusters are overlapped and FIG. 18B shows a case that clusters are not overlapped. 
     Suppose that in retrieval shown in FIG. 18A, a cluster A is first acquired as a cluster distance between an input pattern q and the representative of which is the minimum (that is, D 1 &lt;D 2  as shown in FIG.  18 A). 
     Distance between each of plural learned patterns in the cluster A and the input pattern q is compared. Then, a learned pattern a located at the minimum distance d 1  is acquired as a similar pattern. 
     However, while distance between the input pattern q and the cluster representative is larger in a cluster B than in a cluster A, distance d 2 , which is the distance from a learned pattern b, is smaller than distance d 1 . That is, the learned pattern b is actually a pattern the most similar to the input pattern q. 
     Also similarly in the case of FIG. 18B, distance D 1  between a retrieval pattern q and the representative of the cluster A is smaller than distance D 2  between the retrieval pattern q and the representative of the cluster B, however, a pattern most similar to the retrieval pattern q is not the learned pattern a but is actually the learned pattern b in the cluster B (d 2 &lt;d 1 ). 
     Therefore, there is a problem that retrieval precision in the rough classification retrieval method strongly depends upon the definition and a calculation method of distance between learned patterns, a method of representing a learned pattern itself and a method of classifying learned patterns into any cluster, and the secure retrieval of the most similar pattern is not guaranteed. 
     Also, in the above related art, the enhancement of precision is tried by converting the feature of an input pattern and utilizing the characteristics of the solid structure of a substance, however, in any case, as retrieval precision depends upon the distance, a representation method and a classification method of a pattern, it cannot be said that the reliability of retrieval precision is sufficiently high. 
     SUMMARY OF THE INVENTION 
     The present invention is made in view of these points and the object is to provide a retrieval system that executes high-speed and high-precision retrieval without depending upon the distance, a representation method and a classification method of a pattern. 
     Another object of the present invention is to provide a retrieval method for enabling high-speed and high-precision retrieval without depending upon the distance, a representation method and a classification method of a pattern. 
     Further, another object of the present invention is to provide a computer readable recording medium that records a retrieval program for executing high-speed and high-precision retrieval without depending upon the distance, a representation method and a classification method of a pattern. 
     According to the present invention, in order to solve the above problems, a retrieval system is provided that executes pattern retrieval and is characterized by comprising a retrieval dictionary generation unit that classifies learned patterns into plural clusters, and generates a retrieval dictionary using the clusters, a nearest cluster detector that detects the nearest cluster to an input retrieval pattern among the above clusters stored in the above retrieval dictionary, a learned pattern detector that detects a learned pattern located at a predetermined distance from the above retrieval pattern by comparing all the learned patterns that belong to the nearest cluster with the above retrieval pattern, a retrieval range decision unit that decides a retrieval range using the above learned pattern detected by the learned pattern detector and the retrieval dictionary and a retrieval unit that retrieves the above retrieval pattern from among all the learned patterns that belong to the above retrieval range. 
     The above retrieval dictionary generation unit classifies learned patterns into plural clusters, and generates a retrieval dictionary using the clusters. The above nearest cluster detector detects the nearest cluster to an input retrieval pattern among the clusters stored in the retrieval dictionary. The learned pattern detector detects a learned pattern located at predetermined distance from the retrieval pattern by comparing all the learned patterns that belong to the nearest cluster with the retrieval pattern. The above retrieval range decision unit decides a retrieval range using the learned pattern detected by the learned pattern detector and retrieval information. The retrieval unit retrieves the retrieval pattern from among all the learned patterns in the retrieval range. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 shows the principle of a retrieval system according to the present invention; 
     FIG. 2 explains the operation of a nearest cluster detector; 
     FIG. 3 explains the operation of the nearest cluster detector; 
     FIG. 4 explains the operation of the nearest cluster detector; 
     FIG. 5 explains the operation of a learned pattern detector and a retrieval range decision unit; 
     FIG. 6 shows the configuration of the retrieval system; 
     FIG. 7 shows the data structure in a retrieval dictionary; 
     FIG. 8 shows the configuration of the system in case the retrieval system is applied to information terminal equipment; 
     FIG. 9 explains the operation of the nearest cluster detector; 
     FIG. 10 explains the operation of the nearest cluster detector; 
     FIG. 11 explains the operation of the learned pattern detector and the retrieval range decision unit; 
     FIG. 12 is a flowchart showing a procedure for operating the nearest cluster detector; 
     FIG. 13 is a flowchart showing a procedure for operating the learned pattern detector; 
     FIG. 14 is a flowchart showing a procedure for operating the retrieval range decision unit and a retrieval unit; 
     FIG. 15 is a flowchart showing a procedure for operating the retrieval range decision unit and the retrieval unit; 
     FIG. 16 shows a part of character pattern clusters; 
     FIG. 17 is a flowchart showing a procedure for processing a detection method according to the present invention; and 
     FIGS. 18A and 18B show a problem of precision in a rough classification retrieval method, FIG. 18A shows a case that clusters are overlapped and FIG. 18B shows a case that clusters are not overlapped. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     Referring to the drawings, an embodiment of the present invention will be described below. FIG. 1 shows the principle of a retrieval system according to the present invention. The retrieval system  1  executes pattern (including structure) retrieval and similar pattern retrieval. 
     The retrieval dictionary generation unit  11  classifies learned patterns into plural clusters based upon information such as distance as a scale for showing difference in structure or a property between patterns or similarity as a scale showing how patterns are similar and others, and generates a retrieval dictionary using the above clusters. The details of the retrieval dictionary will be described later. 
     The nearest cluster detector  12  detects the nearest cluster C that is nearest to an input retrieval pattern q from among the clusters stored in the retrieval dictionary. 
     The learned pattern detector  13  detects a learned pattern p located at predetermined distance (hereinafter called the minimum distance) from the retrieval pattern q by comparing all the learned patterns that belong to the nearest cluster C with the retrieval pattern q. 
     The retrieval range decision unit  14  decides a retrieval range using the learned pattern p detected by the learned pattern detector  13  and the retrieval dictionary. 
     That is, the retrieval range decision unit decides a retrieval range (a part having oblique lines in FIG. 1) using the distance between the learned pattern p and the retrieval pattern q, the distances between clusters and the radiuses of clusters stored in the retrieval dictionary. The details will be described later. 
     The retrieval unit  15  executes the pattern retrieval and the similar pattern retrieval of the retrieval pattern q from among all the learned patterns that belong to the retrieval range. 
     Next, the outline of the operation of the retrieval system  1  will be described. FIGS. 2 to  4  explain the operation of the nearest cluster detector  12 . 
     Plural clusters and the retrieval pattern q are shown in multidimensional space in FIG.  2 . First, the distance da between a cluster C 1  located in the center of the multidimensional space and the retrieval pattern q is obtained. A circle Ea having distance  2   da  equivalent to the double of the distance da as a radius is obtained as a first cluster comparison range and the nearest cluster is searched out of plural clusters in the circle Ea. 
     After the circle Ea is obtained, distance between the retrieval pattern q and each cluster in the circle Ea is obtained based upon cluster comparison order stored in the retrieval dictionary (cluster comparison order in comparing with the retrieval pattern q is that each cluster is compared in order in which distance from the cluster C 1  is smaller. C 2  to C 6  are allocated in order in which distance from the cluster C 1  is smaller in FIG. 2) and if the above distance is smaller than distance obtained last time, the cluster comparison range is reduced. 
     For example, if distance between the cluster C 2  and the retrieval pattern q is obtained and the distance is smaller than the distance between the cluster C 1  and the retrieval pattern q, the circle which is a cluster comparison range is reduced, distance between the retrieval pattern and each cluster in the range based upon comparison order is further obtained and the cluster comparison range is sequentially reduced. 
     FIG. 3 shows a halfway step in which the cluster comparison range is reduced. Distance db between a cluster C 6  and the retrieval pattern q is obtained. A circle Eb having distance  2   db  as a radius functions as a cluster comparison range and the nearest cluster is searched from among the clusters in the circle Eb. 
     FIG. 4 shows that the nearest cluster is obtained. As shown in FIG. 4, the cluster comparison range is reduced and the cluster C 6  in a circle Ec is finally detected as the nearest cluster. 
     The nearest cluster to the retrieval pattern q can be efficiently detected at high speed by gradually reducing the cluster comparison range as described above. 
     Next, the operation of the learned pattern detector  13  and the retrieval range decision unit  14  will be described. FIG. 5 explains the operation of the learned pattern detector  13  and the retrieval range decision unit  14 . 
     After the nearest cluster C MinClass  is obtained, the learned pattern detector  13  compares the retrieval pattern q with all the learned patterns that belong to the nearest cluster C MinClass  and obtains a learned pattern P MinClass  distance between which and the retrieval pattern is the minimum. 
     An circle Ed having a radius R composed of the distance between the cluster C MinClass  and the retrieval pattern q and the distance between the learned pattern P MinClass  and the retrieval pattern q obtained by the learned pattern detector  13  is also obtained. 
     Next, the retrieval range decision unit  14  checks to see whether a cluster overlapped with the circle Ed exists or not. As information required for retrieval such as distance between clusters is stored in the retrieval dictionary, it is already-known. 
     Therefore, the retrieval range decision unit can determine that a cluster C k  is not overlapped with the circle Ed as shown in FIG.  5  and is outside the retrieval range. The retrieval range decision unit also recognizes that a cluster C h  is overlapped with the circle Ed. 
     The retrieval range decision unit  14  next checks to see whether or not a cluster overlapped with a circle Ee (having a radius equivalent to distance between the retrieval pattern q and the learned pattern P MinClass ) exists. As the cluster C h  is not overlapped with the circle Ee though the cluster is overlapped with the circle Ed, the retrieval range decision unit determines that the cluster C h  exists outside a retrieval range and selects a cluster C i  overlapped with the circles Ed and Ee. 
     The area of the cluster C i  overlapped with the circle Ee is only an area Sa, however, as a pattern arranged in multidimensional space is considered, a part Sb having oblique lines including the area Sa and shown in FIG. 5 is obtained as a final retrieval range. 
     Afterward, the retrieval unit  15  retrieves the retrieval pattern q from among all the learned patterns that belong to the retrieval range Sb. The algorithm of operation such as the detection of the nearest cluster and the decision of a retrieval range will be described in detail later using mathematical formulae. 
     As described above, in the retrieval system  1  according to the present invention, the retrieval dictionary is generated beforehand, the nearest cluster to an input retrieval pattern is detected based upon the retrieval dictionary, and a learned pattern which belongs to the nearest cluster and is the closest to the retrieval pattern is detected. 
     A retrieval range is gradually decided using the detected learned pattern and the retrieval dictionary and retrieval is executed in a finally obtained retrieval range. 
     Therefore, as retrieval is not executed depending upon the definition of distance between patterns, a method of calculating it, a method of representing a pattern and a method of classifying patterns into clusters respectively set as heretofore, retrieval speed and retrieval precision are enhanced and reliable retrieval is enabled. 
     Next, referring to FIGS. 6 and 7, the detailed configuration of the retrieval system  1  according to the present invention will be described. FIG. 6 shows the configuration of the retrieval system  1 . 
     A retrieval pattern information storage  17  stores the information of retrieval patterns. The information of retrieval patterns is composed of the name and the data structure of the retrieval pattern. 
     The data structure of a pattern is different depending upon a method of representing a pattern. For example, if a pattern is represented based upon its feature, the feature is stored as the data structure of the pattern. 
     If a pattern is represented by a graph in graph theory, a weighted graph corresponding to the pattern is stored as the data structure of the pattern. A pattern itself may be also stored as the data structure of the pattern. 
     The retrieval dictionary storage  11   a  stores a retrieval dictionary generated by the retrieval dictionary generation unit  11 . FIG. 7 shows retrieval dictionary data in the retrieval dictionary. As shown in FIG. 7, the retrieval dictionary data  100  has hierarchical structure. 
     The retrieval dictionary data  100  is composed of distance  101  between each cluster, order  102  in comparing clusters when the nearest cluster to a retrieval pattern is obtained, and the information of each cluster. 
     The information of each cluster  103  is composed of the data of clusters  1  to n. Each data is composed of the data structure  104  of a cluster representative, the radius  105  of the cluster, the number  106  of learned patterns which belong to the cluster and the information  107 - 1  to  107 -m of plural learned patterns which belong to the cluster. 
     For example, learned pattern information  107 - 1  is composed of the name  107   a  of a learned pattern  1 , the data structure  107   b  of the learned pattern  1 , and the distance  107   c  between the learned pattern  1  and its cluster representative. Learned pattern information  107 - 2  to  107 -m is also similarly composed. 
     Memory M 1  stores the name and the data structure of one retrieval pattern read from the retrieval pattern information storage  17 . 
     Memories M 2  to M 4  respectively store the data structure  104  of a cluster representative, the radius  105  of the cluster and the number  106  of learned patterns which belong to the cluster. Memory M 5  stores learned pattern information  107 - 1  to  107 -m. 
     Memories M 6  and M 7  respectively store the information of the nearest cluster to the retrieval pattern (the distance and the number of the cluster) and the information of the most similar learned pattern to the retrieval pattern (the name of the learned pattern and the distance). 
     The nearest cluster detector  12  obtains the nearest cluster to the retrieval pattern stored in the memory M 1  using the retrieval dictionary stored in the retrieval dictionary storage  11   a  and instructs the memory M 6  to store the result. 
     The learned pattern detector  13  compares all the learned patterns that belong to the nearest cluster stored in the memory M 6  with the retrieval pattern stored in the memory M 1 , obtains a learned pattern for which the distance from the retrieval pattern is the minimum and instructs the memory M 7  to store the name of the obtained learned pattern and the minimum distance. 
     The retrieval range decision unit  14  decides a retrieval range using the distances between clusters stored in the retrieval dictionary, the radius of each cluster and the minimum distance stored in the memory M 7 . 
     The retrieval unit  15  retrieves the most similar pattern by comparing all the learned patterns that belong to the retrieval range obtained by the retrieval range decision unit  14  with the retrieval pattern stored in the memory M 1 . 
     The storage  16  stores the name and the data structure of the similar pattern retrieved by the retrieval unit  15 . 
     Next, the configuration of the retrieval system  1  in case it is applied to information terminal equipment will be described. FIG. 8 shows the configuration of the retrieval system  1  in case it is applied to information terminal equipment. 
     Information terminal equipment  2  is composed of a keyboard  21 , an external storage  22 , a display  23  and a processor  24 . 
     The keyboard  21  is an input device for a user to instruct operation and another input device may be also added. 
     The external storage  22  stores the data structure of a retrieval pattern, the retrieval dictionary, the result of retrieval and software. 
     Also, the retrieval pattern information storage  17  and the retrieval dictionary storage  11   a  can be composed as a part of the external storage  22 . Furthermore, the storage  16  may also store the name and the data structure of the retrieved similar pattern. 
     Concretely, the external storage  22  can be composed of a hard disk for example. The display  23  is an output device for displaying a message to a user, the data of a retrieval pattern, the result of retrieval and others. 
     The processor  24  executes actual processing according to software stored in the external storage  22  and others. The processor  24  can be concretely composed of a computer system such as a microprocessor and a personal computer. 
     The nearest cluster detector  12 , the learned pattern detector  13 , the retrieval range decision unit  14  and the retrieval unit  15  can be composed of software which is run in the processor  24 . 
     Next, the operation of the retrieval system  1  according to the present invention will be described further in detail. First, a retrieval pattern stored in the retrieval pattern information storage  17  will be described. 
     The data structure of retrieval patterns stored in the retrieval pattern information storage  17  is different depending upon a method of representing a pattern, the definition of distance and its calculation method. 
     For example, in the case of a character pattern, a voice pattern, a fingerprint pattern and a face pattern, the features of each pattern are stored as the data structure of a retrieval pattern. 
     The molecular structure of a compound and the secondary structure of RNA can be represented in a weighted graph and the respective weighted graphs are stored as the data structure of a retrieval pattern. 
     In the case of a coordinate graphic pattern, the contour data of coordinate graphics, the data of coordinate graphics itself and others are stored as the data structure of a retrieval pattern. 
     The data structure of a pattern relates to a method of representing the pattern, the definition of distance and its calculation method. Concretely, as for Euclidean distance for a character pattern for example, Euclidean distance between patterns p i  and p j  is calculated according to the following formula (1) in case the feature of the pattern p i  is represented by (p i1 , p i2 , - - - p im ) 
     [Formula 1]               d        (       p   i     ,     p   j       )       =         ∑     k   =   1     m            (       p   ik     -     p   jk       )     2                 (   1   )                         
     Next, a method of classifying learned patterns when a learned pattern is stored in the retrieval dictionary storage  11   a  will be described. The retrieval dictionary storage  11   a  stores the retrieval dictionary described in relation to FIG.  7 . 
     As for a method of classifying learned patterns, an arbitrary classification method corresponding to a pattern to be processed can be selected from among methods of classifying patterns generally announced. 
     As for a character pattern for example, there is a longest distance clustering method. In the farthest neighbor method, the farthest distance among the distances between arbitrary two patterns in each cluster is defined as distance between clusters and two clusters for which the above distance is the minimum are integrated. Distance between two clusters C i  and C j  is defined according to the following formula (2). 
     [Formula 2] 
     
       
           d ( C   i   , C   j )={max  d ( p   i   , p   j )| p   i   εC   i   , p   j   εC   j }  (2) 
       
     
     Next, a method of obtaining the representative of cluster stored in the retrieval dictionary storage  11   a  will be described. As for a method of obtaining the representative of a cluster, in case a pattern is represented by its features, the mean value of features in each dimension of all the learned patterns that belong to the cluster is obtained and the obtained mean value of the features is defined as the representative of the cluster. 
     Also, in case a pattern is represented by a method except features, distance between each learned pattern which belongs to a cluster is calculated and a learned pattern which is the smallest in the sum of distance between each learned pattern in the corresponding cluster is defined as the representative of the cluster. 
     Next, a method of obtaining the radius of a cluster stored in the retrieval dictionary storage  11   a  will be described. As for the method of obtaining the radius of a cluster, distance between each learned pattern which belongs to the cluster and the representative of the corresponding cluster is calculated and the maximum distance is defined as the radius of the cluster. Distance between the representatives of clusters is defined as distance between the clusters, and distance between a pattern and the representative of a cluster is defined as distance between the pattern and the cluster. 
     Next, order in comparing clusters when the nearest cluster to a retrieval pattern stored in the retrieval dictionary storage  11   a  is obtained will be described. 
     As for order in comparing clusters when the nearest cluster to a retrieval pattern is obtained, in case a pattern is represented by its features, the mean value of features in each dimension of the representative of all clusters is obtained and a cluster the closest to the obtained mean value of the features is first compared. 
     If a pattern is represented by a method except its features, a cluster which is the smallest in the sum of distances between that and all clusters is first compared. Distance between the first compared cluster and another cluster is sorted in ascending order and the sorted order is defined as subsequent order in comparing clusters. 
     Next, the nearest cluster detector  12  will be described. The nearest cluster detector  12  obtains the nearest cluster to a retrieval pattern stored in the memory M 1  using the retrieval dictionary. 
     When the nearest cluster to a retrieval pattern is obtained, the retrieval pattern is not compared with all clusters but the nearest cluster is obtained, checking to see whether a cluster is included in a comparison range or not. 
     Order in determining clusters is equivalent to order in comparing clusters stored in the retrieval dictionary. That is, clusters are compared in order (for example, the order of the clusters C 2  to C 6  described in relation to FIG. 2) in which they are nearer to the center (for example, the cluster C 1  described in relation to FIG. 2) of multidimensional space composed of samples of learned patterns. Hereby, a frequency in which clusters are compared is reduced and the nearest cluster can be obtained at high speed. 
     Concretely, an initial value of a range in which clusters are compared is all clusters stored in the retrieval dictionary. One cluster is selected in order in comparing clusters stored in the retrieval dictionary and it is checked whether the selected cluster is included in the range for comparing clusters or not. 
     If the selected cluster is included, distance between the representative of the cluster and a retrieval pattern is calculated and a cluster near to the retrieval pattern is obtained. 
     Afterward, a range in which clusters are to be compared next is decided using the minimum distance currently obtained between the retrieval pattern and a cluster and distance between each cluster stored in the retrieval dictionary. Formula (3) shows a condition for checking whether a cluster is included in a comparison range or not. 
     [Formula 3] 
     
       
           D ( C   MinClass   , C   S(i) )&lt;2 *D   MinC   (3) 
       
     
     C MinClass  shows the nearest cluster currently obtained. D MinC  shows the distance between a retrieval pattern and the cluster C MinClass , and the maximum value is set as an initial value. The above maximum value means the upper limit of a range of values which the type of D MinC  variables can represent in a computer. S(i) shows the number of an ‘i’th cluster in order in comparing clusters stored in the retrieval dictionary. 
     A cluster which does not satisfy the formula (3) is not required to be compared because distance between the cluster and a retrieval pattern is larger than D MinC . 
     D MinC  becomes smaller by repeating comparison between a retrieval pattern and a cluster as described above and therefore, a set of clusters which satisfy the formula (3) becomes smaller. 
     Therefore, the nearest cluster to a retrieval pattern can be obtained at high speed. The number of the obtained nearest cluster and the minimum distance are stored in the memory M 6 . FIGS. 9 and 10 explain the operation of the nearest cluster detector  12 . First, as shown in FIG. 9, distance between the retrieval pattern q and cluster C S(1)  is calculated and the distance is stored as D MinC  so that MinClass is S( 1 ). 
     At this time, a set of clusters which satisfy the formula (3) means the clusters included in a dotted circle E 1 . That is, the next comparison range is equal to the dotted circle E 1 . 
     FIG. 10 shows a set of clusters (clusters included in a dotted circle E 2 ) which satisfy the formula (3) after the retrieval pattern q and a cluster C S(k)  are compared. 
     Next, the operation of the learned pattern detector  13  and the retrieval range decision unit  14  will be described. FIG. 11 explains the operation of the learned pattern detector  13  and the retrieval range decision unit  14 . 
     The learned pattern detector  13  compares all the learned patterns that belong to the nearest cluster C MinClass  obtained by the nearest cluster detector  12  and a retrieval pattern and obtains a learned pattern P minClass  which is the nearest. The obtained minimum distance is stored as D MinP  in the memory M 7 . 
     As shown in FIG. 11, it is considered based upon the result of detection by the nearest cluster detector  12 , that of detection by the learned pattern detector  13 , D MinC , and D MinP  that the retrieval range is the learned patterns included in a dotted circle E 3 . 
     Therefore, the retrieval range decision unit  14  first obtains a range in which clusters are retrieved and next, checks whether learned patterns which belong to a cluster in the retrieval range are required to be retrieved or not. 
     Next, the final learned pattern retrieval range in which learned patterns which belong to a cluster required to be retrieved is decided. Afterward, the retrieval unit  15  retrieves the most similar learned pattern to the retrieval pattern in the range in which the learned patterns are retrieved. The retrieval range of clusters is equivalent to a set of clusters which satisfy the following formula (4). 
     [Formula 4] 
     
       
           D ( C   MinClass   , C   i )&lt; D ( q, C   MinClass )+ D   MinP   +R   i   (4) 
       
     
     R i  shows the radius of cluster C i . It means being outside the dotted circle E 3  shown in FIG. 11 that the formula (4) is not satisfied. 
     A cluster (C k ) located outside the dotted circle E 3  is not required to be retrieved because it is clear that distance between a learned pattern which belongs to the cluster and the retrieval pattern q is lager than D MinP . 
     Clusters C i  and C h  shown in FIG. 11 satisfy the formula (4). To check how a cluster which satisfies the formula (4) is apart from the retrieval pattern q and whether a learned pattern which belongs to the cluster is required to be retrieved or not, that is, whether the cluster is overlapped with a dotted circle E 4  or not, distance D (q, C i ) between the retrieval pattern q and the cluster C i  which satisfies the formula (4) is calculated. 
     As the cluster is overlapped with the dotted circle E 4  if the distance satisfies the following formula (5), the learned pattern which belongs to the cluster is required to be retrieved. 
     [Formula 5] 
     
       
           D ( q, C   i )&lt; D   MinP   +R   i   (5) 
       
     
     It means being not overlapped with the dotted circle E 4  though the above cluster is overlapped with the dotted circle E 3  shown in FIG. 11 that the formula (4) is satisfied and the formula (5) is not satisfied. 
     As distance between a learned pattern which belongs to such a cluster (C h ) and the retrieval pattern q is larger than D MinP , the cluster is not required to be retrieved. 
     Therefore, the cluster C i  shown in FIG. 11 satisfies the formulae (4) and (5). 
     All the learned patterns that belong to the obtained cluster that satisfies the formulae (4) and (5) are not required to be retrieved. That is, only learned patterns which may be included in the dotted circle E 4  have only to be retrieved. 
     The learned pattern p which satisfies the following formula (6) is required to be retrieved because it may be included in the dotted circle E 4 . 
     [Formula 6] 
     
       
           D ( p, C   i )&gt; D ( q, C   i )− D   MinP   (6) 
       
     
     The cluster C i  shown in FIG. 11 satisfies the formulae (4) and (5) and a part having oblique lines of the cluster C i  includes learned patterns which satisfy the formula (6). 
     As described above, a retrieval range is finally obtained and the retrieval unit  15  executes retrieval in the retrieval range. 
     Next, the operation of the nearest cluster detector  12  will be described using a flowchart. FIG. 12 is a flowchart showing a procedure for the operation of the nearest cluster detector  12 . 
     The nearest cluster detector  12  obtains the nearest cluster to the retrieval pattern q stored in the memory M 1  using the retrieval dictionary. 
     [S 1 ] Order i in comparing clusters is set to 1, the number MinClass of the nearest cluster to the retrieval pattern is set to S(i), distance D MinC  between the retrieval pattern and the nearest cluster is set to the maximum value and the number of clusters is set to n. S(i) described above shows the number of a cluster to which order i in comparing clusters stored in the retrieval dictionary is allocated. The maximum value is equivalent to the upper limit of a range of values which the type of D MinC  variables can represent in a computer. 
     [S 2 ] It is checked whether the cluster C S(i)  satisfies the formula (3) or not. That is, it is checked whether the retrieval pattern is required to be compared with C S(i)  or not. If C S(i)  satisfies the formula (3), processing proceeds to step S 3  and if C S(i)  does not satisfy the formula (3), processing proceeds to step S 6 . 
     [S 3 ] Distance between the retrieval pattern q and the cluster C S(i)  is calculated. 
     [S 4 ] Compare the distance obtained in step S 3  with the minimum distance currently obtained, if the distance is smaller, processing proceeds to step S 5  and if not, processing proceeds to step S 6 . 
     [S 5 ] The name of the nearest cluster to the retrieval pattern and the distance between the retrieval pattern and the nearest cluster are rewritten. 
     [S 6 ] A cluster to be compared next is set. 
     [S 7 ] It is checked whether all clusters are processed or not. If all clusters are not processed, processing is returned to step S 2  and if all clusters are processed, processing is terminated. 
     Next, the operation of the learned pattern detector  13  will be described using a flowchart. FIG. 13 is a flowchart showing a procedure for the operation of the learned pattern detector  13 . 
     The learned pattern detector  13  obtains a learned pattern distance from the retrieval pattern q which is the minimum among learned patterns which belong to the nearest cluster C MinClass  to the retrieval pattern. 
     [S 11 ] The number i of a learned pattern is set to 1 and distance D MinP  between the learned pattern and the retrieval pattern is set to the maximum value. 
     [S 12 ] Distance D(q, p i ) between the retrieval pattern q and the learned pattern p i  which belongs to the cluster C MinClass  is calculated. 
     [S 13 ] The distance obtained in step S 12  and D MinP  are compared, if the distance is smaller than D MinP , processing proceeds to step S 14  and if not, processing proceeds to step S 15 . 
     [S 14 ] D MinP  and the name of the learned pattern are rewritten. 
     [S 15 ] The number of a learned pattern is incremented by 1. 
     [S 16 ] It is checked whether all the learned patterns are processed or not. If all the learned patterns are not processed, processing is returned to step S 12 . If all the learned patterns are processed, processing is terminated. 
     Next, the operation of the retrieval range decision unit  14  and the retrieval unit  15  will be described using a flowchart. FIGS. 14 and 15 are flowcharts showing a procedure for the operation of the retrieval range decision unit  14  and the retrieval unit  15 . 
     The retrieval range decision unit  14  decides a retrieval range and the retrieval unit  15  retrieves the most similar learned pattern by comparing each learned pattern in the range and the retrieval pattern. 
     [S 21 ] The number i of a cluster is set to 1 and the number of clusters is set to n. 
     [S 22 ] It is checked whether the cluster C i  is C MinClass  or not. If C i  is C MinClass , processing proceeds to step S 33  and if not, processing proceeds to step S 23 . 
     [S 23 ] It is checked whether the cluster satisfies the formula (4) or not. If the cluster satisfies the formula (4), processing proceeds to step S 24  and if not, processing proceeds to step S 33 . 
     [S 24 ] Distance D(q, C i ) between the retrieval pattern q and the cluster C i  is calculated. 
     [S 25 ] It is checked whether the distance obtained in step S 24  satisfies the formula (5) or not. If the distance satisfies the formula (5), processing proceeds to step S 26  and if not, processing proceeds to step S 33 . 
     [S 26 ] The number j of a learned pattern is set to 1 and the number of learned patterns which belong to the cluster C i  is set to m. 
     [S 27 ] It is checked whether a learned pattern p j  satisfies the formula (6) or not. That is, it is checked whether p j  is required to be retrieved or not. If the learned pattern satisfies the formula (6), processing proceeds to step S 28  and if not, processing proceeds to step S 31 . 
     [S 28 ] Distance between the retrieval pattern q and p j  is calculated. 
     [S 29 ] It is checked whether the distance obtained in step S 28  is the minimum or not. If the distance is the minimum, processing proceeds to step S 30  and if not, processing proceeds to step S 31 . 
     [S 30 ] D MinP  and the name of the similar pattern are rewritten. 
     [S 31 ] The number of a learned pattern is incremented by 1. 
     [S 32 ] If all the learned patterns that belong to C i  are not processed, processing is returned to step S 27 . If all the learned patterns are processed, processing proceeds to step S 33 . 
     [S 33 ] The number of a cluster is incremented. 
     [S 34 ] If all clusters are processed, processing is terminated and if not, processing is returned to step S 22 . 
     Next, retrieval speed and retrieval precision when a character pattern is concretely retrieved using the retrieval system  1  according to the present invention will be described. 
     As for a character pattern, a character image printed on paper is input to a computer via a scanner. 
     Also, a character pattern is represented by a peripheral feature and difference between character patterns is represented by Euclidean distance between the character patterns. FIG. 16 shows a part of a cluster in case 3355 pieces of character patterns are grouped up to 500 clusters by the farthest neighbor method. FIG. 16 shows a part of the cluster including, character patterns. 
     The representative and the radius of each cluster and the distances between clusters are obtained and the retrieval dictionary is generated. 10065 unlearned patterns (retrieval patterns) are retrieved using the retrieval dictionary by a round robin retrieval method and by the retrieval system  1  according to the present invention. 
     As a result, in the case of the round robin retrieval method, retrieval precision is 100% and a retrieval speed is 3355 times, while in case the retrieval system  1  according to the present invention is used, retrieval precision is 100% and a retrieval speed is 815.90 times. 
     As described above, the retrieval precision is 100% in both cases, however, retrieval speed in the present invention is speed up by 4.11 times of the round robin retrieval method. Retrieval precision and retrieval speed are respectively defined in the following formulae (7) and (8). 
     [Formula 7] 
     
       
         Retrieval precision={number of (retrieval result=retrieval result in round robin retrieval method)/(total number of retrieved character patterns)}×100%  (7) 
       
     
     [Formula 8] 
     
       
         Retrieval speed=(sum of frequencies of calculating distance when patterns are retrieved)/(total number of retrieved character patterns)  (8) 
       
     
     As described above, according to the present invention, the most similar pattern to a retrieval pattern can be precisely retrieved at high speed. Particularly, the retrieval precision of the retrieval system  1  according to the present invention does not depend upon a method of representing a pattern, the definition of distance between patterns, its calculation method and a method of classifying patterns. 
     Therefore, a problem that an unknown pattern in a pattern recognition field cannot be completely recognized can be partially solved, and a problem when a data which has structure is retrieved at high speed among a large quantity of data having structure or a problem when data having similar structure is retrieved at high speed and others can be solved. 
     Next, a retrieval method according to the present invention will be described. FIG. 17 is a flowchart showing a procedure for processing by a retrieval method according to the present invention. 
     [S 41 ] Classifying learned patterns into plural clusters, using the clusters to generate a retrieval dictionary. 
     [S 42 ] The nearest cluster to an input retrieval pattern is detected among the clusters stored in the retrieval dictionary. 
     [S 43 ] A learned pattern at the minimum distance from the retrieval pattern is detected by comparing all the learned patterns that belong to the nearest cluster with the retrieval pattern. 
     [S 44 ] A retrieval range is decided using the learned pattern and the retrieval dictionary. 
     [S 45 ] The retrieval pattern is retrieved among all the learned patterns that belong to the retrieval range. 
     As described above, the retrieval method according to the present invention is a method of classifying learned patterns into plural clusters, generating the retrieval dictionary using the clusters, detecting the nearest cluster to the input retrieval pattern based upon the retrieval dictionary, detecting a learned pattern at the minimum distance from the retrieval pattern in the nearest cluster, deciding the pattern retrieval range using the detected learned pattern and the retrieval dictionary and executing retrieval. 
     Hereby, high-speed and high-precision retrieval is enabled without depending upon distance between patterns, a representation method and a classification method. 
     A computer program for realizing the function of the above retrieval system  1  and retrieval method can be stored on a recording medium such as a semiconductor memory and a magnetic recording medium. 
     Hereby, the program can be also circulated on the market with the program stored on a portable recording medium such as CD-ROM and a floppy disk, can be also stored in a storage of a computer connected via a network and transferred to another computer via the network. 
     When the program is run on a computer, it is stored in a hard disk and others in the computer, is loaded into a main memory and is executed. 
     As described above, the retrieval system according to the present invention is composed so that it classifies learned patterns into plural clusters, generates a retrieval dictionary by the clusters, detects the nearest cluster to an input retrieval pattern based upon the retrieval dictionary, detects a learned pattern at predetermined distance from the retrieval pattern in the nearest cluster, decides a retrieval range using the detected learned pattern and the retrieval dictionary and executes retrieval. Hereby, high-speed and high-precision retrieval is enabled without depending upon distance between patterns, a representation method and a classification method.