Abstract:
Ranking search results, comprises receiving a query string; retrieving a plurality of search results that include a corresponding plurality of target strings that relate to the query string; segmenting the query string and each of the plurality of target strings; pairing segments in the query string with respective segments in the target strings to form a plurality of combinations; retrieving a plurality of weights that correspond to the plurality of combinations based on a mapping of word combinations and their respective weights, wherein a weight measures semantic correlation between words in a word combination; and determining a weighted word length based on the weights corresponding to each of the plurality of target strings; and ranking the plurality of target strings based on their respective weighted word lengths. Alternatively, ranking search results includes determining a minimum weight of each inserted word with respect to segmented words in the query string; determining a minimum weight of each deleted word with respect to segmented words in the target strings; determining a total edit distance based at least in part on the minimum weight of each inserted word and the minimum weight of each deleted word; and ranking the target strings based on the total edit distances.

Description:
CROSS REFERENCE TO OTHER APPLICATIONS 
       [0001]    This application claims priority to People&#39;s Republic of China Patent Application No. 200910151647.3 entitled METHOD AND DEVICE FOR RANKING SEARCH RESULTS filed Jul. 20, 2009 which is incorporated herein by reference for all purposes. 
       FIELD OF THE INVENTION 
       [0002]    The present application relates to the field of computer data processing and in particular to a method for ranking search results and a device thereof. 
       BACKGROUND OF THE INVENTION 
       [0003]    A search engine generally estimates the extent to which a search result (also referred to as a target string) matches a query string according to a distance of the position where several words in the query string occur among the search result and one with a shorter distance is typically matched to a higher extent and thus is higher ranked. For a query string “disinfection machine”, for example, a search result including “disinfection machine” tends to be closer to the intention of a user than “disinfection equipment”, which is closer still to the intention of the user than “industrial disinfection washing machine”, “dehydrator”, and “dryer”, all of which will have some influence on the ranking of the search results. 
         [0004]    Standard techniques for ranking search results are typically based on the distance of words in a query string within a target string using the shortest sliding window (i.e., the shortest interval located in the target string that includes the words in the query string), edit distance of query string and target string, word context as Part of Speech (POS), etc. 
         [0005]    These simple techniques tend not to address the issue of correlation between a query search of strings and a target string, and the results often do not accurately reflect the extent to which query search of strings matches the target string. Take a query string “Nokia battery” as an example, three search results A, B, and C include the strings “Nokia battery”, “Nokia cell phone, complimentary battery”, and “Nokia n73 cell phone with original battery”, respectively. The simple distance calculation shows that the distance between with “Nokia” and “battery” in string A is zero and thus A has the highest degree of match. The distances between “Nokia” and “battery” for strings B and C are three and five words, respectively, indicating that C is a poorer match than B. However, based on the user&#39;s intent to locate a Nokia battery, search result C in fact is a better match than B despite the greater word spacing. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0006]    Various embodiments of the invention are disclosed in the following detailed description and the accompanying drawings. 
           [0007]      FIG. 1  is a flowchart illustrating an embodiment of a process for generating a mapping of word weights. 
           [0008]      FIG. 2  is a flowchart of an embodiment of a process for ranking search results. 
           [0009]      FIG. 3  is a flowchart of another embodiment of a process for ranking search results. 
           [0010]      FIG. 4  is a block diagram illustrating an embodiment of a system for ranking search results. 
           [0011]      FIG. 5  is a block diagram illustrating another embodiment of a system for ranking search results. 
       
    
    
     DETAILED DESCRIPTION 
       [0012]    The invention can be implemented in numerous ways, including as a process; an apparatus; a system; a composition of matter; a computer program product embodied on a computer readable storage medium; and/or a processor, such as a processor configured to execute instructions stored on and/or provided by a memory coupled to the processor. In this specification, these implementations, or any other form that the invention may take, may be referred to as techniques. In general, the order of the steps of disclosed processes may be altered within the scope of the invention. Unless stated otherwise, a component such as a processor or a memory described as being configured to perform a task may be implemented as a general component that is temporarily configured to perform the task at a given time or a specific component that is manufactured to perform the task. As used herein, the term ‘processor’ refers to one or more devices, circuits, and/or processing cores configured to process data, such as computer program instructions. 
         [0013]    A detailed description of one or more embodiments of the invention is provided below along with accompanying figures that illustrate the principles of the invention. The invention is described in connection with such embodiments, but the invention is not limited to any embodiment. The scope of the invention is limited only by the claims and the invention encompasses numerous alternatives, modifications and equivalents. Numerous specific details are set forth in the following description in order to provide a thorough understanding of the invention. These details are provided for the purpose of example and the invention may be practiced according to the claims without some or all of these specific details. For the purpose of clarity, technical material that is known in the technical fields related to the invention has not been described in detail so that the invention is not unnecessarily obscured. 
         [0014]    Ranking of target strings while accounting for certain semantic factors is described. The ranking takes into consideration the semantic correlation between a query string and a target string to better evaluate the extent to which the query string matches the target string and generate a ranking of search results in a search engine for an ecommerce platform that more closely tracks the intent of typical users. Examples involving using the technique in search engines are discussed extensively for purposes of illustration. The technique is also applicable to many other applications. 
         [0015]    In some embodiments, to account for the semantic correlation between strings in a sample set, the semantic correlation between every two words in the sample set is weighted to generate a table of word weights.  FIG. 1  is a flowchart illustrating an embodiment of a process for generating a mapping of word weights. Process  100  may be performed on a server, a search engine, or any other appropriate device. The generated mapping of word weights are stored and used later. 
         [0016]    At  101 , statistical samples are obtained from texts or collections of symbols having a variety of formats, such as webpages, user search logs, user selection logs, etc. 
         [0017]    Generally, the greater the number of times that a first word and a second word both occur in the statistical samples, the more correlated they are. For example, if both “Nokia” and “cell phone” occur in the text or if users often search for “Nokia” and then select a result that includes the term “cell phone”, it indicates that “Nokia” and “cell phone” are highly correlated. 
         [0018]    At  102 , a first word and a second word are selected from the statistical samples, the number of times that the first and second words both occur in the statistical sample is counted, and denoted as C (the first word, the second word). For example, the number of times that both “cell phone” and “Nokia” occur in the samples is counted and recorded as C (cell phone, Nokia). Subsequently the weights for the respective words are computed to be used later for generating a ranking of the search results. 
         [0019]    At  103 , the number of times that the second word occurs in the statistical sample is counted and recorded as ΣC (Y i , the second word), where Y i  denotes the respective words occurring together with the second word. For example, the total number of times that “Nokia” occurs together with other words (such as “battery”, “original”, etc.), which is equivalent to the total number of times that “Nokia” occurs in the samples, is counted and recorded as ΣC (Y i , “Nokia”), where Y i  denotes the respective words occurring together with “Nokia”. 
         [0020]    At  104 , the probability P of occurrence of the first word given the condition that the second word also occurs is calculated as follows: 
         [0000]        P (the first word|the second word)= C (the first word,the second word)/Σ C ( Y   i ,the second word).
 
         [0021]    For example, a probability of occurrence of “cell phone” given that the condition that “Nokia” also occurs is calculated as: 
         [0000]        P (cell phone|Nokia)= C (cell phone)/Σ C ( Y   i ,Nokia).
 
         [0022]    At  105 , the weight measuring the semantic correlation between the first and second words is determined. In this example, the weight W is determined according to W=1−P for a given search for the second word, where W is the weight and P is the probability of the first word on the condition that the second word occurs. 
         [0023]    For example, the semantic correlation between “cell phone” and “Nokia” is weighted by W=1−P=1−P (cell phone|Nokia)=1−C (cell phone)/ΣC (Y i , Nokia) during a search for “Nokia”. 
         [0024]    Although a weight of W=1−P is used in this example for purposes of illustration, the weight can be calculated in other ways. For example, in some embodiments, the weight is set to P. Weights can also be transformed into different forms in some embodiments, such as in logarithmic form. 
         [0025]    At  106 , it is determined whether the above steps have been performed for all the words in the statistical samples and if so, then control goes to  107 ; otherwise,  102 - 106  are repeated to weight sequentially the semantic correlations between the respective words and the other respective words in the statistical samples. 
         [0026]    At  107 , the weights of the semantic correlations between the respective words and the other respective words in the statistical sample are stored as a mapping table of word weights and optionally output. Other appropriate formats such as lists, trees, etc. can also be used. 
         [0027]    An example of a table of word weights is depicted in Table 1: 
         [0000]    
       
         
               
               
               
             
           
               
                 Table 1 
               
               
                   
               
               
                 Word 1 
                 Word 2 
                 Weight 
               
               
                   
               
             
             
               
                 Cell Phone 
                 Nokia 
                 W12 
               
               
                 Cell Phone 
                 Battery 
                 W13 
               
               
                 Nokia 
                 Battery 
                 W23 
               
               
                 . . . 
                 . . . 
                   
               
               
                 The m th  word 
                 The n th  word 
                 Wmn 
               
               
                   
               
             
          
         
       
     
         [0028]    The example table of word weight depicted in Table 1 is merely illustrative, and the table of word weights can be embodied in other forms in other embodiments. Also, a word can be weighted in many different ways, and  FIG. 1  merely illustrates an embodiment of a statistic probability derived from a statistic language model. The weights can be derived using other appropriate techniques, such as calculated automatically or configured manually. 
         [0029]      FIG. 2  is a flowchart of an embodiment of a process for ranking search results. Process  200  may be performed on a server or any other appropriate device. The extent to which the target strings match the query string (also referred to as the matching extent) is determined. 
         [0030]    At  201 , a query string and corresponding target strings are obtained. In some embodiments, the query string includes keywords input by a user, which is used to identify the targets strings in a database of potential results. A variety of techniques such as keyword or index matching can be used to obtain the target strings. The target strings include characters that are correlated with the query string. For example, if the user inputs a query string of “Nokia Battery” and the target strings retrieved at the server are String A “Nokia Battery”, String B “Nokia Cell Phone With Free Battery”, and String C “Nokia n73 Cell Phone With Original Battery”, then all the retrieved strings A, B, and C are target strings. 
         [0031]    At  202 , the query string and the target strings are segmented. Here, Q denotes the query string, T denotes the target string, the query string is segmented into words Q 1 Q 2  . . . Q m , and the target string is segmented into words T 1 T 2  . . . T n . Other segmentation techniques are possible, such as segmentation of the strings into semantic words, characters, letters, symbols, etc. 
         [0032]    In this example, the query string is segmented into Q 1 Q 2 =Nokia|battery. Target string C is segmented into T 1 T 2 T 3 T 4 T 5 =Nokia|n73|cell phone|original|battery. Other target strings can be similarly segmented. 
         [0033]    At  203 , the respective segmented words in the query string are combined sequentially in pairs with the segmented words in the target strings into combinations of segmented words, where each combination includes a segmented word in the query string and a segmented word of the target query of characters. Specifically, (T i , Q 1 ), (T i , Q 2 ) . . . (T i , Q m ) are derived. 
         [0034]    Resulting combinations of segmented words from the query string and target string C are: (T 1 , Q 1 ), (T 1 , Q 2 ), (T 2 , Q 1 ), (T 2 , Q 2 ), (T 3 , Q 1 ), (T 3 , Q 2 ), (T 4 , Q 1 ), (T 4 , Q 2 ), (T 5 , Q 1 ), and (T 5 , Q 2 ). 
         [0035]    At  204 , the previously generated table of word weights is looked up and the weights of the respective combinations of segmented words are retrieved. 
         [0036]    Here, W denotes the weight and the weights of the respective combinations of segmented words retrieved from the table of word weights are: W (T 1 , Q 1 ), W (T 1 , Q 2 ), W (T 2 , Q 1 ), W (T 2 , Q 2 ), W (T 3 , Q 1 ), W (T 3 ′, Q 2 ), W (T 4 , Q 1 ), W (T 4 , Q 2 ), W (T 5 , Q 1 ), and W (T 5 , Q 2 ). 
         [0037]    Let W (T 1 , Q 1 )=W 1  W (T 1 , Q 2 )=
       W (T 2 , Q 1 )=W 2  W (T 2 , Q 2 )=W 2 ′   W (T 3 , Q 1 )=W 3  W (T 3 , Q 2 )=W 3 ′   W (T 4 , Q 1 )=W 4  W (T 4 , Q 2 )=W 4 ′   W (T 5 , Q 1 )=W 5  W (T 5 , Q 2 )=W 5 ′       
 
         [0042]    Particularly, if Ti is among Q, then Wi=0. For example, since both T 1  and Q 1  are “Nokia”, W (T 1 , Q 1 )=W 1 =0; similarly, since T 5  and Q 2  are both “Battery”, W (T 5 , Q 2 )=W 5 ′=0. 
         [0043]    At  205 , a weighted word length for each target string is calculated based on the weights of segmented words. In some embodiments, the weighted word length is the weighted length of the shortest sliding window. 
         [0044]    To determine the weighted word length, in some embodiments, the minimum weights of the segmented words in the target string with respect to the corresponding segmented words in the query string are calculated. In some embodiments, the minimum weights of the segmented words in the query string with respect to the respective segmented words in the target string are calculated. Since a process of calculating the minimum weights of the respective segmented words in the target string with respect to the respective segmented words in the query string is very similar to a process of calculating the minimum weights of the respective segmented words in the query string with respect to the respective segmented words in the target string, only the former will be described in detail below for purposes of illustration. 
         [0045]    Accordingly, the smaller of the two weights corresponding to (T 1 , Q 1 ) and (T 1 , Q 2 ), the smaller of the two weights corresponding to (T 2 , Q 1 ) and (T 2 , Q 2 ), etc. are determined. 
         [0046]    In this example, it is assumed that between W (T 1 , Q 1 ) and W (T 1 , Q 2 ), W (T 1 , Q 1 ) is smaller; between W (T 2 , Q 1 ) and W (T 2 , Q 2 ), W (T 2 , Q 1 ) is smaller; between W (T 3 , Q 1 ) and W (T 3 , Q 2 ), W (T 3 , Q 1 ) is smaller; between W (T 4 , Q 1 ) and W (T 4 , Q 2 ), W (T 4 , Q 1 ) is smaller; and between W (T 5 , Q 1 ) and W (T 5 , Q 2 ), W (T 5 , Q 2 ) is smaller. Thus, according to the notations above, the minimum weights are: W 1 , W 2 , W 3 , W 4 , and W 5 ′. 
         [0047]    Next, the weighted length of the shortest sliding window is calculated based on the minimum weights for the target string. In some embodiments, the weighted length of the shortest sliding window of the target string, W sw , is calculated as follows: 
         [0000]    
       
         
           
             
               W 
               sw 
             
             = 
             
               
                 
                   ∑ 
                   
                     i 
                     = 
                     k 
                   
                   h 
                 
                  
                 
                   W 
                   i 
                 
               
               = 
               
                 
                   ∑ 
                   
                     i 
                     = 
                     k 
                   
                   h 
                 
                  
                 
                   
                     min 
                     
                       j 
                       = 
                       1 
                     
                     m 
                   
                    
                   
                     
                       w 
                        
                       
                         ( 
                         
                           
                             T 
                             i 
                           
                           , 
                           
                             Q 
                             j 
                           
                         
                         ) 
                       
                     
                     . 
                   
                 
               
             
           
         
       
     
         [0048]    Where W denotes the weight, T i  denotes the i th  segmented word in the target string, k and h denote the starting and ending positions of the shortest sliding window of the target string, respectively, Q j  denotes the j th  segmented word in the query string, and m denotes the number of segmented words in the query string. 
         [0049]    In this example, the weighted length of the shortest sliding window is: 
         [0000]        W   sw   =ΣWi=W 1+ W 2+ W 3+ W 4+ W 5′.
 
         [0050]    Once the weighted lengths of the shortest sliding windows in the query string with respect to all the target strings are computed, at  206 , the extent to which the query string matches the target string is determined based on the weighted word length. The respective target strings of characters are ranked by the weighted word lengths, and a ranking result is optionally sent back to the user terminal. 
         [0051]    Ranking involves comparing the weighted lengths of the shortest sliding windows of the respective target strings. The smaller the length, the higher the extent of match and the higher the ranking of a target string; the greater the length, the lower the extent of match and the lower the ranking of the target string. 
         [0052]    The extent to which the query string matches the respective target strings of characters is more accurately determined by process  200  than by traditional calculation methods that do not account for semantic correlations between words in a target string and words in a query string. For example, although target strings “Nokia battery” and “Nokia n73 cell phone original battery” differ in length, they are both highly relevant for the query string of “Nokia battery” since their weighted word lengths are similar. The application can introduce a word weight indicating the semantic correlation between a query string and a target string to rank accurately respective target strings of characters by ranking highly those target strings of characters correlated with the query string to thereby reflect the extent to which the respective target strings match the query string and can be applied simply and effectively in practice. 
         [0053]      FIG. 3  is a flowchart of another embodiment of a process for ranking search results. Process  300  determines the extent to which the target strings match the query string based on their edit distance. As used herein, the edit distance refers to the number of elementary operations required to change one string of characters to another or the sum of the lengths of different parts of two strings of characters. Typical elementary operations include insertion, deletion, or substitution of a character/word or other designated operations. For example, “I love you” is changed to “I don&#39;t love her” with at least by two elementary operations, i.e., inserting “don&#39;t” and replacing “you” with “her”, so the edit distance between the two strings is two. 
         [0054]    At  301 , a query string and corresponding target strings are obtained by the server. This is similar to  201  of process  200 . For example, for the query string of “Nokia cell phone battery” and target strings are “original Nokia battery”, “Samsung cell phone battery”, etc. 
         [0055]    At  302 , the query string and the target string are segmented into segmented words constituting the query string and segmented words constituting the target string, respectively. Here, Q denotes the query string, T denotes the target string, the query string is segmented into words Q 1 Q 2  . . . Q m , and the target string is segmented into words T 1 T 2  . . . T n . Specifically, the query string “Nokia cell phone battery” is word-segmented into Q 1 Q 2 Q 3 =“Nokia|cell phone|battery”, and the target string is divided into T 1 T 2 T 3 =“original|Nokia|battery”. 
         [0056]    At  303 , based on the pre-computed mapping of word weights, the minimum weight of an inserted word with respect to the respective segmented words in the query string is determined. The weights of the inserted word with respect to the respective segmented words in the query string are retrieved from the table of word weights. In this example, the weights of the inserted word “original”, denoted as I 1 , with respect to the respective segmented words in the query string of character are: W (I 1 , Q 1 ), W (I 1 , Q 2 ), and W (I 1 , Q 3 ). 
         [0057]    The minimum weight of the inserted word with respect to the respective segmented words in the query string is calculated as: 
         [0000]    
       
         
           
             
               
                 
                   ∑ 
                   
                     t 
                     = 
                     1 
                   
                   n 
                 
                  
                 
                   w 
                   I 
                 
               
               = 
               
                 
                   ∑ 
                   
                     t 
                     = 
                     1 
                   
                   n 
                 
                  
                 
                   
                     min 
                     
                       j 
                       = 
                       1 
                     
                     m 
                   
                    
                   
                     w 
                      
                     
                       ( 
                       
                         
                           I 
                           t 
                         
                         , 
                         
                           Q 
                           j 
                         
                       
                       ) 
                     
                   
                 
               
             
             , 
           
         
       
     
         [0000]    where W denotes the weight, I t  denotes the t th  segmented word in the inserted string of character, n denotes the number of inserted segmented words, Q j  denotes the j th  segmented word in the query string, and m denotes the number of segmented words in the query string. 
         [0058]    At  304 , the minimum weight of a deleted word with respect to the segmented words in the target string is calculated based on the table of word weights. The weights of the deleted word with respect to the respective segmented words in the target string are retrieved the table of word weights. In this example, the weights of the deleted word “cell phone”, denoted as D 1 , with respect to the respective segmented words in the target string are: W (D 1 , T 1 ), W (D 1 , T 2 ), and W (D 1 , T 3 ). 
         [0059]    The minimum weight of the deleted word with respect to the segmented words in the target string are calculated as: 
         [0000]    
       
         
           
             
               
                 
                   ∑ 
                   
                     d 
                     = 
                     1 
                   
                   p 
                 
                  
                 
                   w 
                   D 
                 
               
               = 
               
                 
                   ∑ 
                   
                     d 
                     = 
                     1 
                   
                   p 
                 
                  
                 
                   
                     min 
                     
                       i 
                       = 
                       1 
                     
                     q 
                   
                    
                   
                     w 
                      
                     
                       ( 
                       
                         
                           T 
                           i 
                         
                         , 
                         
                           D 
                           d 
                         
                       
                       ) 
                     
                   
                 
               
             
             , 
           
         
       
     
         [0000]    where W denotes the weight, Ti denotes the t th  segmented word in the target string, q denotes the number of segmented words in the target string, D d  denotes the d th  segmented word in the deleted word, and p denotes the number of deleted segmented words. 
         [0060]    Sometimes the edit distance involves substitution of words. For example, one string is “Nokia Battery” and another is “Samsung Battery”, where “Samsung” substituted “Nokia”. In some embodiments, the substitution operation is regarded as a combination of addition and deletion operations instead of a separate operation. For example, it can be assumed that “Nokia” is deleted and “Samsung” is added to change “Nokia Battery” to “Samsung Battery”. Accordingly, the computation described above involving inserted or deleted word is used to determine the minimum weight of the edit distance. 
         [0061]    In some embodiments, the substitution operation is regarded as a third type of operation in addition to the insertion and deletion. One way to determine the minimum weight of the edit distance of the replacement word is setting it to a preset fixed value (e.g., 1). Other ways include setting the edit distance of the replacement word to the sum, the average, the maximum, or any other appropriate combination of the minimum weight of the inserted word with respect to the respective segmented words in the query string and the minimum weight of the deleted word with respect to the respective segmented word in the target string. 
         [0062]    For example, in some embodiments, the edit distance of the replacement word “Samsung” is the sum of the minimum weight of the inserted word “Samsung” with respect to the segmented words in the query string “Nokia Battery” and the minimum weight of the deleted word “Nokia” with respect to the segments word in the target string “Samsung Battery”. 
         [0063]    Alternatively, in some embodiments, the edit distance of the replacement word “Samsung” is the sum of the minimum weight of the inserted “Samsung” with respect to the segmented words in the query string “Nokia Battery” and the minimum weight of the deleted word “Nokia” with respect to the segments words in the target string “Samsung Battery” and divided by two. 
         [0064]    At  305 , the minimum weights of the total edit distances for the target strings are calculated based on the minimum weights of the words determined in the previous steps and the values used to determine the extent to which the query string matches the target strings. 
         [0065]    In embodiments where only the insert and delete operations are considered, the total edit distances are calculated for the respective target strings of characters, and the total edit distance in a target string of character is: 
         [0000]        W   Total   =W   I   +W   D , 
         [0000]    where W Total  denotes the minimum weight of the total edit distance, W I  denotes the minimum weight of the inserted word with respect to the respective segmented words in the query string, and W D  denotes the minimum weight of the deleted word with respect to the respective segmented words in the target string. 
         [0066]    In embodiments where insert, delete, and substitute operations are considered, the total distance edit distances are calculated for the respective target strings, and the total edit distance is: 
         [0000]    
       
      
       W 
       Total 
       =W 
       I 
       +W 
       D 
       +W 
       S  
      
     
         [0000]    where W Total  denotes the total edit distance, W I  denotes the minimum weight of the inserted word with respect to the respective segmented words in the query string, W D  denotes the minimum weight of the deleted word with respect to the respective segmented words in the target string, and W S  denotes the minimum weight of the substituted word with respect to the respective segmented words in the query string and/or the target string. 
         [0067]    At  306 , the minimum weights of the total edit distance of the target strings are compared to generate a ranking. The smaller the minimum weight of the total edit distance, the greater the extent of matching and the higher the target string is ranked. Conversely, the greater the minimum weight of the total edit distance, the smaller the extent of matching and the lower the target string is ranked. 
         [0068]    Processes  200  and  300  can be implemented in a variety of different ways. 
         [0069]    A weight can be calculated alternately with respect to the query string and the target string. The inserted string of characters can be weighted with respect to the query string and the deleted string of characters can be weighted with respect to the target string. 
         [0070]    A weight can be calculated or transformed in any form, for example, logarithmically, or a target word can be weighted by the maximum, the average or another form (“weighted length”) of the weights of the target word with respect to the respective query words. The order of the target strings and the query string can be reversed in some embodiments. 
         [0071]    A word distance or length can be calculated throughout a string of characters or in any algorithmically selected interval (“e.g., a different part of one string of characters from another string of characters”). 
         [0072]    Ranking may involve the calculation of any weighted word distance or length instead of the shortest sliding window or an edit distance. 
         [0073]      FIG. 4  is a block diagram illustrating an embodiment of a system for ranking search results. System  400  includes: a word weight generation module  401  adapted to weigh the semantic correlation between every two words in a set of statistical samples and to generate and store a table of word weights; a word retrieval module  402  adapted to receive a query string and to search for the query string and to retrieve target strings of characters; a word segmentation module  403  adapted to segment the query string and each of the target strings; a combination module  404  adapted to combine the respective segmented words in the query string sequentially in pairs with the respective segmented words in the target string; an inquiring module  405  adapted to inquire of the table of word weights to retrieve the weights of the respective combinations of segmented words; and a matching module  406  adapted to calculate a weighted word length from the weights, to rank the target strings based on the weighted word length, and to optionally feed back a ranking result to the user terminal. 
         [0074]    In some embodiments, word weight generation module  401  further includes: a sample acquisition module adapted to acquire the statistical samples; a first counting module adapted to select a first word and a second word from the statistical samples and to count the number of times that both the first and second words occur in the statistical sample as C (the first word, the second word); a second counting module adapted to count the number of times that the second word occurs in the statistical sample as ΣC (Y i , the second word), where Y i  denotes a word occurring together with the second word in the samples; a probability calculation module adapted to calculate the probability of the first word on the condition that the second word occurs as P (the first word|the second word)=C (the first word, the second word)/ΣC (Yi, the second word); a weighting module adapted to calculate the weight of the semantic correlation between the first and second words, for example, as W=1−P during a search for the second word, where W is the weight and P is the probability of the first word on the condition that the second word occurs; and a generation module adapted to generate the table of word weights from the weights of the semantic correlations between the respective words and the respective other words in the statistical sample. 
         [0075]    In some embodiments, the weighted word length is the weighted length of the shortest sliding window and matching module  406  further includes: a minimum weight calculation module adapted to calculate the minimum weights of the segmented words in the target string with respect to the segmented words in the query string or the minimum weights of the segmented words in the query string with respect to the segmented words in the target string; a first calculation module adapted to calculate the weighted lengths of the shortest sliding windows for the respective targets string of characters according to the minimum weights; and a ranking module adapted to compare the weighted lengths of the shortest sliding windows of the respective target strings and to rank the target strings based on the weighted lengths. 
         [0076]      FIG. 5  is a block diagram illustrating another embodiment of a system for ranking search results. System  500  includes: a word-weights generation module  501  adapted to weight the semantic correlation between every two words in a set of statistical samples and to generate and store a table of word weights; a word retrieval module  502  adapted to receive a query string and to search for the query string and to retrieve target strings of characters; a word segmentation module  503  adapted to segment the query string and each of the target strings of characters; a first minimum weight calculation module  504  adapted to calculate the minimum weight of an inserted word with respect to the segmented words in the query string; a second minimum weight calculation module  505  adapted to calculate the minimum weight of a deleted word with respect to the segmented words in the target string; and a matching module  506  adapted to calculate a total edit distance from the minimum weights, to rank the respective target strings of characters and to optionally feed back a ranking result to the user terminal. 
         [0077]    In some embodiments, the matching module  506  includes: a total edit distance calculation module adapted to calculate the total edit distances for the respective target strings of characters as W Total =W I +W D , where W Total  denotes the total edit distance, W 1  denotes the minimum weight of the inserted word with respect to the segmented words in the query string, and W D  denotes the minimum weight of the deleted word with respect to the segmented words in the target string; a ranking module adapted to compare the total edit distances of the respective target strings of characters and to rank target strings based on the total edit distance. 
         [0078]    In some embodiments, system  500  further includes a third minimum weight calculation module adapted to calculate the minimum weight of the edit distance of a replacement word prior to calculation of the total edit distance. Accordingly, the total edit distance calculation module is adapted to calculate the total edit distances for the respective target strings of characters as W Total =W I +W D +W C , where W Total  denotes the total edit distance, W I  denotes the minimum weight of the inserted word with respect to the respective segmented words in the query string, W D  denotes the minimum weight of the deleted word with respect to the respective segmented words in the target string, and W C  denotes the minimum weight of the replacement word with respect to the respective segmented words in the query string and/or the target string. 
         [0079]    Systems  400  and  500  use a word weight to indicate the semantic correlation between a query string and a target string to more accurately reflect the extent to which respective target strings of characters match the query string and can be applied simply and effectively in practice. Each system may be implemented using one or more computing devices such as a personal computer, a server computer, a handheld or portable device, a flat panel device, a multi-processor system, a microprocessor based system, a set-top box, a programmable consumer electronic device, a network PC, a minicomputer, a large-scale computer, a special purpose device, a distributed computing environment including any of the foregoing systems or devices, or other hardware/software/firmware combination that includes one or more processors and memory coupled to the processors and configured to provide the processors with instructions. 
         [0080]    The modules described above can be implemented as software components executing on one or more general purpose processors, as hardware such as programmable logic devices and/or Application Specific Integrated Circuits designed to perform certain functions or a combination thereof. In some embodiments, the modules can be embodied by a form of software products which can be stored in a nonvolatile storage medium (such as optical disk, flash storage device, mobile hard disk, etc.), including a number of instructions for making a computer device (such as personal computers, servers, network equipments, etc.) implement the methods described in the embodiments of the present invention. The modules may be implemented on a single device or distributed across multiple devices. The functions of the modules may be merged into one another or further split into multiple sub-modules. 
         [0081]    Although the foregoing embodiments have been described in some detail for purposes of clarity of understanding, the invention is not limited to the details provided. There are many alternative ways of implementing the invention. The disclosed embodiments are illustrative and not restrictive.