Method and apparatus for knowledgebase searching6178416Abstract A library of query templates and a dictionary that relates keywords to more abstract concepts are first prepared on a computer system. Each template contains one or more typed variables. A query is then generated by entering into the system one or more keywords. Each keyword is abstracted to a concept. Advantageously, each concept may be further refined, for example, by additional abstraction, or by picking one concept from several candidates, or by successive abstraction and rejection of different keywords until an acceptable concept is found. Next, for the concepts that are obtained, the system finds all query templates are then instantiated with those concepts or with the keywords used to form the concepts. The user then selects the most appropriate query from among the instantiated query templates. The invention may be practiced in formulating queries to access any set of information sources. It is particularly useful to use the invention to access distributed, heterogeneous databases which do not have a single standardized vocabulary or structure. Claims What is claimed is: Description FIELD OF THE INVENTION
CREATE VIEW Totals AS
SELECT employee-id, SUM(sales-amount) AS total-sales
FROM Transactions
GROUP BY employee-id
SELECT employee-name
FROM Employees, Totals
WHERE Employees.employee-id = Totals.employee-id
AND total-sales
>= ALL (SELECT totals-sales FROM Totals)
This query accesses just a single database. Data in this database is stored in a single common format. Clearly, query languages that allow formulating queries across multiple databases or across multiple formats, or that allow combining information from structured databases, electronic libraries, and the World Wide Web, are even more complex. Non-technical users, like managers in a department store chain, obviously cannot be expected to formulate their information requests in these complex query languages. SUMMARY OF THE INVENTION The present invention describes an approach that allows the formulation of complex queries using a simple keyword-based user interface. In accordance with the invention, a library of query templates and a dictionary that relates keywords to more abstract concepts are first prepared on a computer system. Each template contains one or more typed variables. A query is then generated by entering into the system one or more keywords. Each keyword is abstracted to a concept. Advantageously, each concept may be further refined, for example, by additional abstraction, or by picking one concept from several candidates, or by successive abstraction and rejection of different keywords until an acceptable concept is found. Next, for the concepts that are obtained, the system finds all query templates that can use those concepts. The variables in the query templates are then instantiated with those concepts or with the keywords used to form the concepts. The user then selects the most appropriate query from among the instantiated query templates. The invention may be practiced in formulating queries to access any set of information sources. It is particularly useful to use the invention to access distributed, heterogeneous databases which do not have a single standardized vocabulary or structure. BRIEF DESCRIPTION OF THE DRAWINGS These and other features and advantages of the present invention will become more readily apparent from the following detailed description, which should be read in conjunction with the accompanying drawings, in which: FIG. 1 is a block diagram of a representative computer system on which the present invention may be practiced; and FIG. 2 is a flowchart demonstrating one method of implementing the invention on the computer system depicted in FIG. 1. DETAILED DESCRIPTION OF THE INVENTION Referring to FIG. 1, there is shown a representative computer system 10 on which the present invention may be implemented. Computer system 10 includes central processing unit ("CPU") 12, memory unit 14, one or more storage devices 16, one or more input devices 18, display device 20, communication interface 22, and printer 24. A system bus 26 is provided for communicating between the above elements. Computer system 10 illustratively incorporates an IBM-compatible or Apple-compatible personal computer, but one skilled in the art will understand that computer system 10 is not limited to a particular size, class or model of computer. CPU 12 illustratively is one or more microprocessors such as a Pentium.TM. or Pentium II.TM. microprocessor available from Intel or a 68000 microprocessor available from Motorola. Memory unit 14 typically includes both some random access memory (RAM) and some read only memory (ROM). Storage devices 16 illustratively include one or more removable or fixed disk drives, compact discs, DVDs, or tapes. Input devices 18 illustratively include a keyboard, a mouse, and/or other similar device. Display device 20 illustratively is a computer display, such as a CRT monitor, LED display or LCD display. Communication interface 22 may be a modem, a network interface, or other connection to external electronic devices, such as a serial or parallel port. For many applications of the invention, it is anticipated that this interface will include a connection to a local area network and the Internet. Printer 24 is a hard copy output device such as a laser printer, dot matrix printer, or plotter. The computer system of FIG. 1 is used in accordance with the invention to formulate queries to one or more informational databases stored on storage devices 16 or accessible via communication interface 22 on other storage devices not shown. Software and data used in formulating these queries are preferably stored in one or more storage devices 16. The software is a program which abstracts keywords supplied by a system user and converts them to instantiated query templates from which the user may select one or more queries for use in accessing the information database(s). The data that is stored includes a library of query templates and a database dictionary that relates keywords to concepts. A keyword is a sequence of characters. For example, the keyword "Ibuprofen" is a sequence of the characters "I", "b", "u", "p", "r", "o", "f", "e", and "n". A concept, on the other hand, is a conceptual or real-life entity. For example, the concept Ibuprofen is a nonsteroidal anti-inflammatory agent with analgesic properties used in the therapy of rheumatism and arthritis. In order to represent concepts in a computer system, a unique identifier or name is assigned to every concept of interest. For example, the concept Ibuprofen might have the unique identifier C020740. For ease of presentation, we will use the word `concept` in this application to also mean the computer representation of a concept. Several keywords might refer to a single concept. For example, both the keyword "allergy" and the keyword "hypersensitivity" refer to the same concept. Also, a single keyword might refer to several concepts. The abstraction from keywords to concepts is ambiguous in these cases. For example, the keyword "cold" might refer to the concepts Obstructive Lung Disease, Common Cold, or Cold Temperature. Concepts can be organized in an "is a"-hierarchy, also called ontology. More specific concepts are related by an "is a" relationship to more general concepts. For example, the concept Asthma has an "is a" relationship with the concept Allergy, and the concept Allergy has an "is a" relationship with the concept Disease. Moving from a more general concept to a more specific concept is called `refinement`. Moving from a more specific concept to a more general concept is called `generalization`. In the example, concept Asthma is a refinement of concept Allergy, and concept Disease is a generalization of concept Allergy. A flowchart illustrating the invention is shown in FIG. 2. Step 110 represents the preliminary process of creating a library of query templates and a database dictionary which associates keywords with more general concepts. The library and database dictionary are stored in one or more storage devices 16 of the computer system. Each of the query templates in the library comprises three entries: (i) A textual presentation of the query template with variables. This textual presentation, with variables being instantiated, is shown to the user. The variables in the textual presentation are typed, meaning that only certain instantiations of the variables are allowed. As an example, consider the following textual presentation with typed variables X and Y: Can X be used to treat Y? X: Pharmacologic Substance Y: Symptom Ibuprofen and Lower Back Pain are possible instantiations of X and Y, respectively, because Ibuprofen is a Pharmacologic Substance and Lower Back Pain is a Symptom. The instantiated textual presentation in this example is: Can Ibuprofen be used to treat Lower Back Pain? On the other hand, Lower Back Pain and Ibuprofen is not a possible instantiation of X and Y respectively, because Lower Back Pain is not a Pharmacologic Substance, and Ibuprofen is not a Symptom. As can be seen, the typing of the variables makes it possible to distinguish between useful queries like "Can Ibuprofen be used to treat Lower Back Pain" and nonsense queries like "Can Lower Back Pain be used to treat Ibuprofen?" (ii) A mapping from the instantiations of the variables in (i) to queries. The queries might be formulated in a database query language like SQL or OQL. More generally, queries are any kind of executable computer code, like PERL scripts or C++ programs that gather information from databases or other information sources. The execution of the generated query is supposed to gather and process all the information in the same way a human expert would do in order to answer the question asked in (i). The simplest form of a mapping from instantiations to query plans is a textual replacement in a predefined database query. Continuing with the previous example, the following might be a predefined SQL query: SELECT effectiveness FROM DrugInformation WHERE drug=`X` AND symptom=`Y` A textual replacement of X by Ibuprofen and Y by Lower Back Pain yields the following SQL query: SELECT effectiveness FROM DrugInformation WHERE drug=`Ibuprofen` AND symptom=`Lower Back Pain` This query could be sent to a database with a relation named "DrugInformation" that has at least the three attributes "drug", "symptom", and "effectiveness". The query would gather all information known on the effectiveness of Ibuprofen to treat Lower Back Pain. (iii) Statistical information for ranking different matching query templates. This information might include the computational cost of executing the query plan, the cost of accessing the information sources required for executing the query plan, usage patterns, user preferences or user privileges. A typical keyword dictionary is a thesaurus which relates specific words to more general concepts. This dictionary advantageously is hierarchical with several levels of increasing abstraction. An illustrative such dictionary is the Metathesaurus and Semantic Network described below. To formulate a query, a user enters one or more keywords at step 120. Illustratively, the queries are entered into the computer system using a keyboard and correct entry is confirmed via display device 20. Advantageously, a graphic user interface is used to facilitate the entry of the keywords. The system then proceeds at step 130 to abstract the keywords(s) into one or more concepts. Where the keyword is associated with multiple concepts, the system advantageously presents the user with a listing of at least the most likely concepts and the user has the opportunity at step 140 to further refine his entry by selecting the most appropriate concept. Preferably, the presentation of alternative concepts is in ranked order where the ranking is determined by pre-specified criteria. One such criterion is frequency of selection during previous uses of the database dictionary. As suggested in FIG. 2, the abstraction process may involve multiple steps. For example, as indicated by the loop around step 130, a keyword may be abstracted into a concept and the concept may be further abstracted into a higher level concept. As indicated by the loop around steps 120 and 130, the process may involve the successive entry of different keywords, the abstraction of each keyword in turn, and a selection from the resulting concepts of the one concept that is deemed most appropriate. Following selection of the concepts, the concepts are then matched at step 150 with the templates to identify those templates that can accept the selected keywords and concepts. Matching is performed by checking the library of query templates to determine if any templates have variables that will accept the concepts that have been abstracted from the keywords. The templates that are identified are then instantiated with the keywords and/or concepts at step 160 and the instantiated templates are presented to the user. Advantageously, the presentation is made via a display and a graphical user interface; and the instantiated templates are presented in a ranked order determined by pre-specified criteria. Several possible criteria have been described above. Finally, at step 170, the user selects one or more of the instantiated query templates for further use as a query to the information sources that are stored in storage devices 16 or that are accessible through communication interface 22. The invention may be practiced with all manner of dictionaries and ontologies. A particularly useful context in which the invention may be practiced is in formulating queries using the Unified Medical Language System (UMLS). This system includes a Metathesaurus, a Semantic Network, an Information Sources Map and a SPECIALIST lexicon. The Metathesaurus integrates more than thirty biomedical thesauri and its most recent release contains over 330,000 concepts that are named by more than 739,000 terms. The Semantic Network contains 135 semantic types and 51 relationships. The Metathesaurus contains information for abstracting keywords to concepts, and for refining and generalizing concepts. The Semantic Network is useful for providing the types and supertypes used in the query templates. UMLS was developed between 1986 and 1994 under the sponsorship of the National Library of Medicine. Considerable information about UMLS is available at the National Library of Medicine's web site: www.nlm.nih.gov. UMLS is also featured in a recent issue of the Journal of the American Medical Informatics Association, Vol. 5, No. 1, (January/February 1998). See, especially, B. L. Humphreys et al., "The Unified Medical Language System: An Informatics Research Collaboration," pp. 1-11; M. Joubert et al., "UMLS-based Conceptual Queries to Biomedical Information Databases: An Overview of Project ARIANE," pp. 52-61, both of which are incorporated herein by reference. An illustrative example of how the present invention might use UMLS to formulate queries is as follows. An illustrative graphical user interface for use in this application is set forth in Table I.
TABLE I
ADD SELECT GENERALIZE REFINE DELETE RESET
The interface includes at least a display area and a row of user selectable "keys." The display area is a workplace which displays information that the user is working with including an entry from the keyboard. The user selected keys typically are used by a mouse-controlled cursor and permit the user to manipulate the contents of the display. Illustratively, the keys include an ADD key which adds an additional concept to the query, a SELECT key which enables the user to select one or more alternatives presented on the screen, a GENERALIZE key which enables the user to instruct the system to generalize a concept displayed on the screen, a REFINE key which enables the user to refine a concept, a DELETE key which enables the user to delete a concept, and a RESET key which returns the user to the starting point for new keyboard entry. In the case of UMLS, the Metathesaurus provides the keyword dictionary that relates keywords to concepts. This is available from the National Library of Medicine and preferably is stored in a storage device in the user's computer system, or on a server accessible through a local area network or the Internet. The library of query templates advantageously is prepared by a system administrator to accommodate the particular needs of a company or it is obtained from commercial sources. We will consider by way of example the formulation of a query about respiratory disorders. The use starts by typing in "cold." This is displayed on the graphical user interface as shown in Table II.
TABLE II
COLD
ADD SELECT GENERALIZE REFINE DELETE RESET
To enter this keyword, the user selects the ADD key. In response, the system abstracts the keyword "cold" and presents the abstraction to the user for his consideration. Since "cold" is a very general term, there are several possibly relevant concepts and all of these are presented to the user as illustrated in Table III.
TABLE III
.quadrature. CO 24117 (Lung Diseases, Obstructive)
.quadrature. CO 09443 (common cold)
.quadrature. CO 09264 (cold temperature)
ADD SELECT GENERALIZE REFINE DELETE RESET
The numbers that are prefixed to each concept are concept numbers used in the Metathesaurus. To select one of these concepts, the user uses the cursor to mark "Common Cold" and then selects the SELECT key. The system returns a screen which includes a detailed description of the common cold. This description is the contents of the Metathesaurus entry on the common cold. To further develop the query, the user then selects the GENERALIZE key. The system returns the screen shown in Table IV.
TABLE IV
.quadrature. CO 42769 (virus disease)
.quadrature. CO 35204 (respiration disorder)
ADD SELECT GENERALIZE DEFINE NEXT DELETE
To select one of these concepts, the user uses the cursor to mark "respiration disorders" and then selects the SELECT key. The system returns a screen with a detailed description of respiration disorders obtained from the Metathesaurus. To further develop the query, the user decides to make an additional entry. He types in "melatonin" and then selects the ADD key. This gives the system enough information to make a match with an available query template. Accordingly, the system returns the screen set forth in Table V.
TABLE V
.quadrature. Respiration Disorder
.quadrature. Melatonin
.quadrature. Is respiration disorder affected by melatonin?
ADD SELECT GENERALIZE DEFINE NEXT DELETE
This, however, is not what the user has in mind, so he uses the cursor to mark "melatonin" for further development and selects the REFINE key. The system proceeds to display more detail about melatonin by returning on the screen of Table VI a list of Different types of melatonin.
TABLE VI
.quadrature. Respiration disorder
.quadrature. Melatonin
.quadrature. 2 - phenylmelatonin
.
.
.
.quadrature. 2 - iodomelatonin
.quadrature. 2 - chloromelatonin
.quadrature. Is respiration disorder affected by melatonin
ADD SELECT GENERALIZE REFINE DELETE RESET
One of these is of interest to the user and so he uses the cursor to mark both "respiration disorder" and "2 phenylmelatonin" and selects the SELECT key. Again, this gives the system enough information to attempt to make a match with a query template. Accordingly, the system searches the query templates for a possible match. Upon making the search, the system finds a match and proceeds to instantiate the query template with the terms "respiration disorder" and "2-phenylmelatonin." It then returns the screen of Table VII.
TABLE VII
.quadrature. Respiration disorder
.quadrature. 2 - phenylmetonin
.quadrature. Is respiration disorder affected by 2-phenylmelatonin?
ADD SELECT GENERALIZE DEFINE NEXT DELETE
This completes the formulation of the query and the user may then use the query to access information stored in the databases of interest to him. To formulate a new query, the user selects the RESET key. As will be apparent to those skilled in the art, numerous variations of the invention may be practiced within he scope of the invention.
|
Same subclass Same class Consider this |
||||||||||
