Abstract:
A system for searching through documents maintained in electronic form is described. The system is capable of searching through individual documents, or groups of documents. In the case of a group of documents, the system operates by locating one or more hit entries in a group hits table associated with a keyword in a search request. Each of the located hit entries corresponds to a different document in which the keyword appears. The system extracts from the located hit entries hit information indicating the number of times the keyword appears in documents respectively associated with the located hit entries. This hit information is presented to a user, and a command identifying one of the documents respectively associated with the located hit entries is received from the user. The system then locates one or more location entries in a document index table associated with the identified document. These located location entries are associated with the keyword, and each of the located location entries corresponds to a different occurrence of the keyword in the identified document. The system then presents to the user portions of the identified document containing occurrences of the keyword as identified by the located location entries.

Description:
This application is a continuation of U.S. patent application Ser. No. 08/422,528, filed Apr. 14, 1995, now U.S. Pat. No. 5,696,963, issued Dec. 9, 1997, which is a continuation-in-part of application Ser. No. 08/341,129, filed Nov. 18, 1994, which is a continuation-in-part of Ser. No. 08/155,752, filed Nov. 19, 1993, now U.S. Pat. No. 5,623,681, issued Apr. 22, 1997. 
    
    
     BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates generally to electronic document processing, and more particularly to electronically searching through documents. 
     2. Related Art 
     Modern information services and systems provide users with a wealth of information all contained in electronic repositories. These services/systems have little value, however, unless they provide users with search mechanisms for locating information of interest. These search mechanisms must be easily updateable and extendable, since information is constantly being generated. 
     Accordingly, the present invention is directed to a system and method for performing electronic keyword searches through an individual document, and/or through a group of documents (the documents being maintained electronically). 
     SUMMARY OF THE INVENTION 
     The present invention is directed to a system and method for searching through documents maintained in electronic form. The present invention is capable of searching through individual documents, or groups of documents. In the case of a group of documents, the invention operates by locating one or more hit entries in a group hits table associated with a keyword in a search request. Each of the located hit entries corresponds to a different document in which the keyword appears. The invention extracts from the located hit entries hit information indicating the number of times the keyword appears in documents respectively associated with the located hit entries. This hit information is presented to a user, and a command identifying one of the documents respectively associated with the located hit entries is received from the user. The invention then locates one or more location entries in a document index table associated with the identified document. These located location entries are associated with the keyword, and each of the located location entries corresponds to a different occurrence of the keyword in the identified document. The invention then presents to the user portions of the identified document containing occurrences of the keyword as identified by the located location entries. 
     Further features and advantages of the present invention, as well as the structure and operation of various embodiments of the present invention, are described in detail below with reference to the accompanying drawings. In the drawings, like reference numbers indicate identical or functionally similar elements. 
    
    
     BRIEF DESCRIPTION OF THE FIGURES 
     The present invention will be described with reference to the accompanying drawings, wherein: 
     FIG. 1 depicts an example grouping of documents; 
     FIGS. 2 and 3 depict tables and search trees used by a first embodiment of the present invention; 
     FIG. 4 is a flowchart depicting the operation of the first embodiment of the present invention; 
     FIGS. 5 depicts a table and search tree used by a second embodiment of the present invention; 
     FIG. 6 is a flowchart depicting the operation of the second embodiment of the present invention; and 
     FIG. 7 is a block diagram of a preferred computer system used to implement the present invention. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     The present invention is directed to a system and method for performing electronic keyword searches through an individual document, and/or through a group of documents. Consider an example scenario presented in FIG. 1. Group A includes documents D1, D2, D3, and D4 (in electronic form), and Group B includes documents D5, D6, D7, D8, and D9 (in electronic form). Generally, a group can include any number of documents. 
     According to the present invention, electronic keyword searches can be performed in each document D1-D9 individually. Also, electronic keyword searches can be performed through all of the documents in Group A, or all of the documents in Group B. 
     Documents D1-D9 can represent any type of documents, such as books, magazines, articles, journals, etc. According to a preferred embodiment of the present invention, documents D1-D9 represent U.S. and/or non-U.S. patents. 
     According to a first embodiment of the invention, a group tree and a group index table is maintained for each group (such as Group A). Also, a document tree and a document index table is maintained for each document (such as Document D1). An example group tree 202 and group index table 204 for Group A are shown in FIG. 2. An example document tree 302 and document index table 304 for Document D1 are shown in FIG. 3. 
     The group index table 204 includes an entry 205 for each occurrence of each searchable term in the documents D1-D4 of Group A. For example, the word &#34;glass&#34; appears in document D1 at locations L1 and L2 (locations L1 and L2 refer to positions in document D1), and also appears in document D2 at location L3 (location L3 refers to a position in document D2). Thus, there are three entries in the group index table 204 for the word &#34;glass.&#34; 
     Each entry 205 includes a term field 206, a document field 208, and a location in document field 210. The term field 206 identifies the searchable word (or phrase), the document field 208 identifies the document where the word appears, and the location in document field 210 identifies the location in the document where the word appears. 
     The group tree 202 is a tree data structure that is used to locate entries in the group index table 204 associated with particular search keys. The example group tree 202 is a binary tree, but any other well known tree data structure (such as a B-tree) could alternatively be used. 
     The group binary tree 202 includes a node for each searchable term in the documents D1-D4 of Group A. Each node has a value and two branches, where the left branch is less than the value, and the right branch is greater than the value. Each node also stores one or more pointers to the group index table 204. Consider the node having the value &#34;maybe.&#34; The word &#34;glass&#34;is less than &#34;maybe.&#34; Thus, the word &#34;glass&#34; is contained in a node connected to the left branch of the &#34;maybe&#34; node. Similarly, the word &#34;star&#34; is greater than &#34;maybe.&#34; Thus, the word &#34;star&#34; is contained in a node connected to the right branch of the &#34;maybe&#34; node. 
     The manner in which the group tree 202 is used to locate entries in the group index table 204 associated with particular search keys shall now be described. Suppose that the search keyword is &#34;glass&#34; (i.e., the user wants to find occurrences of the word &#34;glass&#34; in the documents D1-D4 of Group A). The search begins at the root node of the group tree 202, which is the &#34;maybe&#34; node. If the value of this node is equal to the keyword, then the search is complete. If the value of this node is greater than the keyword, then the left branch is taken. If the value of this node is less than the keyword, then the right branch is taken. 
     In this case, the value of this node (&#34;maybe&#34;) is greater than the keyword (&#34;glass&#34;), so the left branch is taken. The node at the end of this left branch (the &#34;glass&#34; node) is equal to the keyword, so the search is complete. The &#34;glass&#34; node stores three pointers 250 to the group index table 204. These pointers 250 identify the entries in the group index table 204 that are associated with the keyword &#34;glass.&#34; 
     The document index table 304 includes an entry 305 for each occurrence of each searchable term in document D1. Each entry 305 includes a term field 306, and a location in document field 308. The term field 306 identifies the searchable word (or phrase), and the location in document field 210 identifies the location in document D1 where the word appears. 
     The structure and use of the document tree 302 is the same as the group tree 202, but it includes a node for each searchable term in the document D1. 
     The manner in which the present invention performs electronic keyword searches through an individual document (in electronic form), and/or through a group of documents (in electronic form), shall now be described with reference to a flowchart 402 shown in FIG. 4. Flowchart 402 begins with step 406, where control immediately passes to step 408. 
     In step 408, the invention receives a user search request containing a keyword and determines whether the search request is directed to searching an individual document or a group of documents. If the search request is directed to searching an individual document, then step 414 is performed. 
     In step 414, the invention locates occurrences (hits) of the keyword in the document by traversing through the document&#39;s document tree to find pertinent entries in the document&#39;s document index table. These entries identify the locations in the document where the keyword appears. 
     In step 412, the invention displays these hits to the user. For example, the invention may display a portion of text in the document containing the first occurrence of the keyword. Upon appropriate user command (such as pressing the &#34;Page Down&#34; button on the keyboard), the invention may display a portion of text in the document containing the next occurrence of the keyword. Other schemes for displaying the hits to the user will be apparent to persons skilled in the relevant art(s). 
     If, in step 408, it is determined that the search request is directed to searching a group of documents, then step 410 is performed. 
     In step 410, the invention locates occurrences (hits) of the keyword in the documents of the group by traversing through the group&#39;s group tree to find pertinent entries in the group&#39;s group index table. These entries identify the locations in the documents of the group where the keyword appears. These hits are then displayed to the user in step 412, described above. (Although in this case, in step 412 the hits from multiple documents are displayed. The invention may allow the user to select which document he wishes to display. Then, in step 412, the invention displays the hits associated with that document.) 
     The above description of the invention has focused on a search containing a single keyword, but it is easily extendable to searches containing multiple keywords related to each other by boolean operators. For example, if the search is &#34;glass and cat,&#34; the invention finds occurrences of glass and occurrences of cat. Hits for the search would be the intersection of these two hit sets. 
     Note that, with the first embodiment, it is possible to perform a keyword search over a document or over a group of documents by accessing either the document index table for the document of interest or the group index table for the group of interest. Thus, the first embodiment represents a one-level search mechanism. 
     The first embodiment, while workable, is not ideal because it is not very extendable. For example, suppose a user wishes to add documents to Group A. To do this, it would be necessary to modify the group tree 202 and the group index table 204 to reflect these new documents. This is a relatively difficult task. This difficulty results from the fact that the group index table 204 has an entry for each occurrence of each searchable word or phrase. Thus, the group index table 204 is potentially very large and, thus, difficult to modify. 
     The present invention includes a second embodiment which overcomes this difficulty. According to this second embodiment, a group hits table is maintained, instead of a group index table. An example group hits table 504 for Group A and a corresponding group tree 502 are shown in FIG. 5. 
     The group hits table 504 includes, for each document D1-D4 in Group A, an entry 521 for each searchable term appearing in the document. For example, the word &#34;glass&#34; appears in document D1 and in document D2. Thus, there are two entries 521 in the group hits table 504 for the word &#34;glass,&#34; one corresponding to document D1 and another corresponding to document D2. 
     Each entry 521 includes a term field 506, a document field 508, and a hits field 510. The term field 506 identifies the searchable word (or phrase), the document field 508 identifies the document where the word appears, and the hits field 510 identifies the number of times that the word appears in the document. 
     The group tree 502 has the same structure and function, and is used in the same way, as the group tree 202 shown in FIG. 2. The second embodiment also includes a document tree and a document index table for each document in each group. The document tree and document index table were described above. 
     The manner in which the present invention performs electronic keyword searches through an individual document (in electronic form), and/or through a group of documents (in electronic form), according to the second embodiment shall now be described with reference to a flowchart 602 shown in FIG. 6. Flowchart 602 begins with step 604, where control immediately passes to step 606. 
     In step 606, the invention receives a user search request containing a keyword and determines whether the search request is directed to searching an individual document or a group of documents. If the search request is directed to searching a group of documents, then step 608 is performed. 
     In step 608, the invention determines the number of occurrences (hits) of the keyword in each of the documents in the group by traversing through the group&#39;s group tree to find pertinent entries in the group&#39;s group hits table. These entries identify the number of times that the keyword appears in each document of the group. 
     In step 610, the invention presents this hits information to the user. For example, if Group A is the group being searched and the keyword is &#34;glass,&#34; then the invention displays the following hit information to the user: 
     Document D1 2 hits 
     Document D2 1 hit 
     In step 612, the invention receives a command from the user indicating which document the user wishes to view (in the above example, the command indicates whether the user wants to view Document D1 or Document D2). 
     In step 614, the invention locates occurrences (hits) of the keyword in the user-selected document by traversing through the document&#39;s document tree to find pertinent entries in the document&#39;s document index table. These entries identify the locations in the document where the keyword appears. 
     In step 616, the invention displays these hits to the user. For example, the invention may display a portion of text in the document containing the first occurrence of the keyword. Upon appropriate user command (such as pressing the &#34;Page Down&#34; button on the keyboard), the invention may display a portion of text in the document containing the next occurrence of the keyword. Other schemes for displaying the hits to the user will be apparent to persons skilled in the relevant art(s). 
     If, in step 606, it is determined that the search request is directed to searching a single document, then steps 614 and 616 are performed (described above). 
     The above description of the invention has focused on a search containing a single keyword, but it is easily extendable to searches containing multiple keywords related to each other by boolean operators. 
     The second embodiment is much more extendable than the first embodiment. This is because the group hits table 504 has only one entry (instead of potentially multiple entries) for each searchable word in each document of the group. Thus, the group hits table 504 is much smaller than the group index table 204. Accordingly, it is much easier to modify to accommodate document additions to the group. 
     Note that, with the second embodiment, it is possible to perform a keyword search over a document by accessing the document&#39;s document index table. This is a one level search. However, in order to perform a keyword search over a group of documents, it is necessary to first search the group hits table, and then search the document index table of each document of interest (i.e., each document selected by the user). This is a two level search, since it involves two table accesses. 
     However, the second embodiment is no less efficient from a user&#39;s point of view than the first embodiment, even though the second embodiment sometimes requires two table accesses, whereas the first embodiment always requires just a single table access. This is because there is user interaction (steps 610 and 612) between the first search (step 608) and the second search (step 614). Thus, the performance of the second search typically has no impact on the user&#39;s perception of the system. 
     Preferably, the present invention is a computer program executing in a computer system 702 such as that shown in FIG. 7. This computer system 702 includes a central processing unit (CPU) 706 connected to a bus 704, and a random access memory (RAM) 708 and secondary storage devices 710 also connected to the bus 704. The computer program of the present invention resides in RAM 708 while executing. The tables and trees discussed herein are also preferably stored in RAM 708 during execution. The computer program includes instructions that, when executed, cause the CPU 706 to perform the functions described herein. In one embodiment, the logic of the computer program is stored in a computer readable medium of a removable computer disk, such as a floppy disk or compact disk. In another embodiment, the invention represents an on-line service (such as a computer bulletin board), and the search mechanisms discussed herein allow subscribers to efficiently search through the information stored in such on-line services. In this regard, the computer system 702 also includes an interface 707 (such as a network interface or a modem) for allowing remote interaction with users. 
     The tables and search trees discussed herein may be generated in any well known manner using manual, automated, and/or semi-automated procedures. A preferred procedure for generating such tables and trees is described in parent applications Ser. No. 08/341,129 filed Nov. 18, 1994, and Ser. No. 08/155,752 filed Nov. 19, 1993, both entitled &#34;Method and Apparatus for Synchronizing, Displaying and Manipulating Text and Image Documents,&#34; both incorporated herein by reference in their entireties. Preferred user interfaces for enabling the user to select search options and to enter search terms, and for displaying search results to users, are also described in these applications. 
     While various embodiments of the present invention have been described above, it should be understood that they have been presented by way of example only, and not limitation. Thus, the breadth and scope of the present invention should not be limited by any of the above-described exemplary embodiments, but should be defined only in accordance with the following claims and their equivalents.