The application relates generally to databases. In particular, the application relates to an expansion of a database search query.
A search engine is a tool that identifies data items in a data source based on a data search query that may be entered by a user. The search engine uses different tokens in the search query (such as words or phrases) to identify data items that are of interest to the user. Sometimes a search engine returns search results that include too many or not enough data items because the data search query is too broad or narrow, respectively.
Embodiments of the invention may be best understood by referring to the following description and accompanying drawings which illustrate such embodiments. The numbering scheme for the Figures included herein are such that the leading number for a given reference number in a Figure is associated with the number of the Figure. For example, a system 100 can be located in
Methods, apparatus and systems for expansion of database search queries are described. In the following description, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In other instances, well-known circuits, structures and techniques have not been shown in detail in order not to obscure the understanding of this description.
This description of the embodiments is divided into four sections. The first section describes an example system environment. The second section describes operations for search query expansion. The third section describes an example computer apparatus. The fourth section provides some general comments.
Turning specifically to the information storage and retrieval platform 102, an application program interface (API) server 114 and a web server 116 are coupled to, and provide programmatic and web interfaces respectively to, one or more application servers 118. The application servers 118 may host a query controller module 124, and an expansion module 120. The application servers 118 are, in turn, shown to be coupled to one or more search back end servers 126. The search back end servers 126 host a search engine 128 and facilitates access to a data store 130 (which may store one of more databases).
The query controller module 124 acts a hub between the client machines 104 and 106 and the other search modules (e.g., the expansion module 120). To this end the query controller module 124 communicates via the API server 114 and the web server 116 with the client machines 104 and 106, respectively, and communicates directly with the other search modules.
While the system 100 shown in
The web client 112 accesses the various services and functions provided by search modules via the web server 116 supported by the web server 116. Similarly, the programmatic client 110 accesses the various services and functions provided by the search modules via the programmatic interface provided by the API server 114.
This section provides a description of operations for search query expansion, according to some embodiments of the invention. In certain embodiments, the operations are performed by instructions residing on machine-readable media (e.g., software), while in other embodiments, the methods are performed by hardware or other logic (e.g., digital logic).
In some embodiments, the search query expansion can be performed as part of or during the search query. For example, after a search query is received and prior to performing the search query in a database, an expansion of the query is performed.
At block 202, a search query, having a token, for data in a database is received. With reference to
A search query may include a sentence, phrase, single word, etc. In some embodiments, the search query is tokenized. Tokenization refers to the task of segmenting a string of text into semantically independent tokens. In some embodiments, a token is defined in terms of its semantic value and could be either a single-semantic-unit or a compound-semantic-unit. A single-semantic-unit, similar to the linguistic concept of word, is defined as a sequence of characters that symbolize and communicate a meaning without being divisible into smaller units capable of independent use. In addition, a compound-semantic-unit, similar to the linguistic concept of phrase, is defined as a sequence of single-semantic-units, such that, the final token carries an independent and different semantic value than the individual semantic-units.
In the case of Western European Languages, single-semantic-unit boundaries are usually marked by a blank space or punctuation marks. This is, however, not the case for Asian languages such as Chinese, Japanese and Thai, where there is no explicit semantic-unit delimiter such as space and punctuation marks are only seldom used.
In some embodiments, the query controller module 124 may generate the compound semantic units using a dictionary-based approach. The dictionary-based approach may be forward maximum matching that starts from left to right to match the longest possible string or backward maximum matching that match from right to left for the longest possible string. In some embodiments, dictionaries are generated that cover the large vocabulary of tokens used in a given database. In some embodiments, a compound-semantic-unit extraction operation is used that uses the stream of user queries to come up with a set of most likely compound-semantic-units.
In some embodiments, the query controller module 124 may generate the compound semantic units using a statistical approach. The statistical approach is based on a statistical model which is built based on the frequency of semantic units appearing next to another, commonly known as n-grams where n is 2 to N. The token segmentation may be determined at a point where there is a lower probability for two semantic units to be next to each other, thus creating a larger semantic unit. The accuracy and complexity of the model increase as the size of the string increases. In addition, maximum run length of a compound-semantic-unit may be defined on a language basis. This approach can be extended to deal with Asian languages. For example, compound-semantic-unit for modern Chinese usage generally consists of 2 to 3 Chinese characters. In some embodiments, different combinations of approaches may be used to generate the compound semantic units. Returning to the flow diagram 200, the flow continues at block 204.
At block 204, one or more synonym candidates for the token are determined. With reference to
In some embodiments, two tokens are synonyms based on syntactical rules. In some embodiments, the syntactical rules are in the form of regular expressions to determine if the two tokens are synonyms. The syntactical rules may be language specific. For example, for German, “ü” is replaced by “ue”. To illustrate, “für” is a synonym candidate for “fuer”. Other examples from the German language include having “β” replaced by “ss”, “ö” being replaced by “oe”, “ä” being replaced by “ae”, etc.
In some embodiments, synonym candidates include the plural forms of the token. For example, a seller may just list one item at a time in an online auction. To illustrate, the seller may use the token bike in the title. On the other hand, the buyer that is searching the database for the online auction may search for bikes instead. In some embodiments, synonym candidates include different tenses. For example, for the token, buy, the synonym candidates includes buying and bought. In some embodiments, synonym candidates include gender. For example, a synonym candidate for the token waiter could be waitress. In some embodiments, synonym candidates include different forms of a token that are dependent on its role in a sentence. For example, the nominative (subject) case of the token soldier in German is Soldat. The accusative (direct object) case is Soldaten.
In some embodiments, synonym candidates relate to de-compounding of a token. For example, in languages such as German, Dutch or Swedish, tokens can be joined together to form a compound token. To illustrate in German, Blue Wale is written as Blauwal. In order to yield Blauwal as part of the search results when searching for Wal, the token is de-compounded to Blau and Wal. To illustrate in English, spiderman may be de-compounded to spider man. In some embodiments, synonym candidates relate to character transformation. In European languages, accent marks and diacriticals are used to represent intonation or completely different characters. Examples of such tokens include cámara in Spanish and fiance'e in French. Some users may not use the accent marks and diacriticals because such marks require multiple keystrokes to input on a U.S. International English keyboard. Therefore, synonym candidates may include tokens having the accent marks when the token in the search query does not include the marks and vice versa. In some embodiments, contextual query expansion is used to determine synonym candidates. A more detailed description of contextual query expansion is set forth below in the description of
At block 206, a determination is made of whether there are unprocessed synonym candidates. With reference to
At block 208, a determination is made of whether the synonym candidate is above a threshold of minimum frequency in a number of data strings that represent data in the database and/or a number of search queries. With reference to
At block 210, a determination is made of whether the token and the synonym candidate are in a same category for a level of a tree hierarchy in the database. With reference to
In some embodiments, the expansion module 120 makes this determination based on level one. The expansion module 120 may determine the level one category with the largest item frequency for the token. The expansion module 120 may also determine the level one category with the largest item frequency for the synonym candidate. For example, if the token is “spiderman”, the expansion module 120 determines which of the level one categories have the most items stored below (in one of its leaf categories) with the token “spiderman.” Similarly, if the synonym candidate is “spider man”, the expansion module 120 determines which of the level one categories have the most items stored below (in one of the leaf categories) with the token “spider man.” The expansion module 120 then determines whether these level one categories for the token and the synonym candidate are the same. Therefore, if the token and the synonym candidate have the same level one category (as described), the synonym candidate may be considered a synonym of the token. If the token and the synonym candidate are part of a same category for a level in the tree hierarchy, the flow continues at block 218, which is described in more detail below. Otherwise, the flow continues at block 212.
At block 212, a probability distribution for the token across leaf categories in tree hierarchy is determined. With reference to
where ifw, li is the item frequency of the token, w, in category li, ifw is the frequency of token w in the database, P(w) is the global probability of token, w, and W is the complete vocabulary of words. Therefore, the probability distribution represents the set of senses for a particular token across the set of leaf categories. This estimation of probabilities also includes a smoothing component, which assigns non-zero probabilities to token-category combinations. In particular, μ is set to one for probability estimations. The flow continues at block 214.
At block 214, a probability distribution for the synonym candidate across leaf categories in tree hierarchy is determined. With reference to
At block 216, a determination is made of whether the cross entropy for the probability distributions for the token and the synonym candidate is below a threshold. With reference to
where i=1, 2, . . . , n. This cross entropy is a measure of similarity between the two tokens, and may, thus, be a measure of synonymity between the two tokens, w1 and w2. In some embodiments, the threshold is 1, 5, 10, 20, etc. Therefore, if the KL-divergence is below the threshold, the synonym candidate is considered a synonym of the token. If the cross entropy is not below a threshold, the flow continues at block 206. Otherwise, the flow continues at block 218.
At block 218, the synonym candidate is added to the search query. With reference to
At block 220 (if there are no more unprocessed synonym candidates), the search query is used to perform a search for data in the database. With reference to
In some embodiments, if the search query is expanded, the user that entered the search query is allowed to review the expanded search query prior to the search being executed. While described such that any one of the determinations at block 208, 210 or 216 may cause the synonym candidate to be added to the search query, in some embodiments, a “yes” result for all such determinations is required prior to the synonym candidate being added to the search query. Alternatively, a “yes” result for less than all of the determinations is required (such as 206 and 208, 206 and 210, etc.).
A more detailed description of operations that may be performed for determining synonym candidates is now described. With reference to
At block 502, a token that is part of the search query is received. With reference to
At block 504, a determination is made of whether there is a synonymity association between the token and one of the categories in the database. With reference to
As shown, there is a synonymity association between the token dvd and the category DVDs. There is a synonymity association between the token book and the category Books. There is a synonymity association between the token restaurant equipment and the category Food Service Retail. A more detailed description of the determination of whether there is a synonymity association between the token and one of the categories is described in more detail below in a flow diagram 600 of
At block 506, tokens in the item titles that are part of the category with the synonymity association with the token are added as synonym candidates. With reference to
A more detailed description of operations that may be performed for determining whether there is a synonymity association between the token and one of the categories in the database is now described. With reference to
At block 602, a distribution of the token in the search query across the categories in the database is determined. With reference to
The expansion module 120 may push these values up the tree hierarchy. For example, if the “bedtime” leaf category has a value of 50 and the “biography” leaf category has a value of 100, the “children” category has a value of 150. The expansion module 120 may push these values up to the first level of the tree hierarchy. Returning to the flow diagram 600, the flow continues at block 604.
At block 604, a determination is made of whether any category (not including the root) has greater than X % of the total distribution of the token across the tree hierarchy. With reference to
At block 606, a clarity score, a category coverage ratio and/or a benefit score (for the selected category from block 604) is determined. With reference to
At block 608, a determination is made of whether the clarity score, the category coverage ratio and/or the benefit score are above threshold levels. In some embodiments, the expansion module 120 may make this determination. The threshold levels for the clarity score, the category coverage ratio and the benefit score may vary based on a number of criteria (such as the type of data stored therein, the size of the database, etc.). The expansion module 120 may determine a threshold level for one, some or all of the clarity score, the category coverage ratio and the benefit score. Therefore, in some embodiments, the clarity score, the category coverage ratio and the benefit score need to exceed their associated threshold level. Alternatively, one or some of the scores/ratios need to exceed their associated threshold level. If the clarity score, the category coverage ratio and/or the benefit score are not above associated threshold levels, the operations of the flow diagram 600 are complete. Otherwise, the flow continues at block 610.
At block 610, the selected category is marked as having a synonymity association with the token. With reference to
Flow diagrams of operations wherein the search query expansion is separate from the search query, according to some embodiments of the invention, are now described. In particular,
At block 702, a token is received. With reference to
At block 704, one or more synonym candidates for the token are determined. With reference to
At block 706, a determination is made of whether there are unprocessed synonym candidates. With reference to
At block 708, a determination is made of whether the synonym candidate is above a threshold of minimum frequency in a number of data strings that represent data in the database and/or a number of search queries. With reference to
At block 710, a determination is made of whether the token and the synonym candidate are in a same category for a level of a tree hierarchy in the database. With reference to
At block 712, a probability distribution for the token across leaf categories in tree hierarchy is determined. With reference to
At block 714, a probability distribution for the synonym candidate across leaf categories in tree hierarchy is determined. With reference to
At block 716, a determination is made of whether the cross entropy for the probability distributions for the token and the synonym candidate is below a threshold. With reference to
At block 718, the synonym candidate is added to the expansion dictionary for the token. With reference to
At block 802, a search query, having a token, for data in a database is received. With reference to
At block 804, tokens in the search query are located. With reference to
At block 806, a determination is made of whether any of the tokens are expandable. With reference to
At block 808, the search query is updated based on the expanded tokens. With reference to
At block 810, a search query is performed for data in the database. With reference to
The computer apparatus 900 also includes a volatile memory 930, processor bus 922, and an Input/Output (I/O) controller hub (ICH) 924. The processor(s) 902, the volatile memory 930, and the ICH 924 are coupled to the processor bus 922. The processor(s) 902 may comprise any suitable processor architecture. The computer apparatus 900 may comprise one, two, three, or more processors, any of which may execute a set of instructions in accordance with embodiments of the invention. The processor(s) 902 may be different types of processors. For example, a first processor may be a general purpose processor, while a second processor may be a digital signal processor for decoding and encoding audio data, video data, etc.
The memory 930 may be representative of volatile and/or nonvolatile memory that stores data and/or instructions, and may comprise any suitable memory, such as a dynamic random access memory (DRAM), etc. The nonvolatile memory may be Static Random Access Memory (SRAM), flash memory, etc. The nonvolatile memory may also be Programmable ROM (PROM), Erasable PROM (EPROM), Electrically Erasable PROM (EEPROM), etc.
The computer apparatus 900 may include the modules shown in
A graphics controller 904 controls the display of information on a display device 906. The ICH 924 provides an interface to I/O devices or peripheral components for the computer apparatus 900. The ICH 924 may comprise any suitable interface controller to provide for any suitable communication link to the processor(s) 902, the volatile memory 930 and/or to any suitable device or component in communication with the ICH 924. In some embodiments, the ICH 924 provides suitable arbitration and buffering for each interface.
For some embodiments of the invention, the ICH 924 provides an interface to a secondary storage 908 (which may be any type of nonvolatile data storage), such as a hard disk drive (HDD) or compact disc read only memory (CD ROM) drive, or to suitable universal serial bus (USB) devices through one or more USB ports. The secondary storage 908 may be read only, read/write, etc.
For some embodiments, the ICH 924 also provides an interface different user input devices (a microphone 911, a keyboard 912, buttons 914, etc.). For some embodiments, the ICH 924 also provides a network interface 920 though which the computer apparatus 900 may communicate with other computers and/or devices. The ICH 924 may provide an interface to any number of ports 910. The ports 910 may be used to provide different input/output. For example, one or more ports 910 may be coupled to speakers for audio output.
In the description, numerous specific details such as logic implementations, opcodes, means to specify operands, resource partitioning/sharing/duplication implementations, types and interrelationships of system components, and logic partitioning/integration choices are set forth in order to provide a more thorough understanding of the present invention. It will be appreciated, however, by one skilled in the art that embodiments of the invention may be practiced without such specific details. In other instances, control structures, gate level circuits and full software instruction sequences have not been shown in detail in order not to obscure the embodiments of the invention. Those of ordinary skill in the art, with the included descriptions will be able to implement appropriate functionality without undue experimentation.
References in the specification to “one embodiment”, “an embodiment”, “an example embodiment”, etc., indicate that the embodiment described may include a particular feature, structure, or characteristic, but every embodiment may not necessarily include the particular feature, structure, or characteristic. Moreover, such phrases are not necessarily referring to the same embodiment. Further, when a particular feature, structure, or characteristic is described in connection with an embodiment, it is submitted that it is within the knowledge of one skilled in the art to affect such feature, structure, or characteristic in connection with other embodiments whether or not explicitly described.
A number of figures show block diagrams of systems and apparatus for expansion of database search queries, in accordance with some embodiments of the invention. A number of figures show flow diagrams illustrating operations for expansion of database search queries, in accordance with some embodiments of the invention. The operations of the flow diagrams are described with references to the systems/apparatus shown in the block diagrams. However, it should be understood that the operations of the flow diagram could be performed by embodiments of systems and apparatus other than those discussed with reference to the block diagrams, and embodiments discussed with reference to the systems/apparatus could perform operations different than those discussed with reference to the flow diagrams.
Some or all of the operations described herein may be performed by hardware, firmware, software or a combination thereof. For example, the operations of the different controllers as described herein may be performed by hardware, firmware, software or a combination thereof. Upon reading and comprehending the content of this disclosure, one of ordinary skill in the art will understand the manner in which a software program can be launched from a machine-readable medium in a computer-based system to execute the functions defined in the software program. One of ordinary skill in the art will further understand the various programming languages that may be employed to create one or more software programs designed to implement and perform the methods disclosed herein. The programs may be structured in an object-orientated format using an object-oriented language such as Java or C++. Alternatively, the programs can be structured in a procedure-orientated format using a procedural language, such as assembly or C. The software components may communicate using any of a number of mechanisms well-known to those skilled in the art, such as application program interfaces or inter-process communication techniques, including remote procedure calls. The teachings of various embodiments are not limited to any particular programming language or environment.
In view of the wide variety of permutations to the embodiments described herein, this detailed description is intended to be illustrative only, and should not be taken as limiting the scope of the invention. What is claimed as the invention, therefore, is all such modifications as may come within the scope and spirit of the following claims and equivalents thereto. Therefore, the specification and drawings are to be regarded in an illustrative rather than a restrictive sense.
This application is a continuation of U.S. patent application Ser. No. 13/438,632, filed Apr. 3, 2012, which is a continuation of U.S. patent application Ser. No. 11/363,679, filed Feb. 28, 2006, which issued as U.S. Pat. No. 8,195,683 on Jun. 5, 2012, all of which are incorporated herein by reference in their entirety.
Number | Date | Country | |
---|---|---|---|
Parent | 13438632 | Apr 2012 | US |
Child | 15045777 | US | |
Parent | 11363679 | Feb 2006 | US |
Child | 13438632 | US |