Abstract:
A system and method for merging product information from a first hierarchy into a second hierarchy. A Naive Bayes classification model is generated using both text data and attribute (numerical) data pertaining to products in the second hierarchy. Then, products in the first hierarchy are placed into the second hierarchy in accordance with the model. Preferably, the placement of the products in the second hierarchy depends in part on their grouping in the first hierarchy, on the intuition that if two products were grouped together in the first hierarchy they have a higher likelihood of being grouped together in the second hierarchy as well.

Description:
BACKGROUND OF THE INVENTION  
         [0001]    1. Field of the Invention  
           [0002]    The present invention relates to merging hierarchies of products.  
           [0003]    2. Description of the Related Art  
           [0004]    The explosive progress in computer networking, data storage, and processor speed has enabled large amounts of transactions, including Web-based transactions. To support transactional applications, hierarchies are used to arrange product information in a way that promotes fast and efficient processing of transactions. As but one non-limiting example, a Web merchant might maintain a hierarchy of electronics products, with camera information being stored in a “camera” node, printer information being stored at a “printer” node, and so on. Each node can have sub-nodes, e.g., the “camera” node can have a “digital camera” sub-node and a “non-digital camera” subnode. When a person indicates a desire to purchase a digital camera, the Web server accesses the camera node to present the data therein to the user.  
           [0005]    It is conventionally the case that the hierarchy of a Web site is manually constructed, with a person placing the appropriate information in the appropriate place in the hierarchy. When a  15  new manufacturer joins the marketplace that is defined by the Web site, the products of the new manufacturer must be placed in the appropriate nodes of the main hierarchy. If the new manufacturer happens to use exactly the same hierarchical scheme as the main hierarchy, this is trivial, since the new products map exactly from their node to a corresponding node in the main hierarchy. However, if the two hierarchical schemes are not the same, which is typically the case, merging the hierarchies becomes non-trivial.  
           [0006]    Heretofore, although non-trivial, merging two hierarchies has not been a programming problem since the new hierarchy simply is manually merged with the main (market) hierarchy by a person adding the products from the new hierarchy into the appropriate nodes in the main hierarchy. Nonetheless, as can be recognized as a consequence of the above discussion, it is unfortunately the case that constructing the main hierarchy and merging products from new hierarchies into the main hierarchy is slow and labor intensive. The present invention accordingly has recognized a critical need to automatically merge products from one hierarchy into another, differently-constructed hierarchy.  
         SUMMARY OF THE INVENTION  
         [0007]    The invention is a general purpose computer programmed according to the inventive steps herein to merge products from two or more hierarchies into a single hierarchy. The invention can also be embodied as an article of manufacture—a machine component—that is used by a digital processing apparatus and which tangibly embodies a program of instructions that are executable by the digital processing apparatus to undertake the present invention. This invention is realized in a critical machine component that causes a digital processing apparatus to perform the inventive method steps herein. The invention is also a computer-implemented method for undertaking the acts disclosed below.  
           [0008]    Accordingly, a computer-implemented method is disclosed for merging product information in a first hierarchy having a first structure into a second hierarchy having a second structure different than the first structure. The method includes generating a classifier, preferably a Naive-Bayes classifier, using text and attributes associated with product information in the second hierarchy. The method also includes using the classifier to associate product information in the first hierarchy with nodes in the second hierarchy. More specifically, product information on a product in the first hierarchy is associated with at least one node in the second hierarchy corresponding to a highest classification probability for that product.  
           [0009]    In a preferred embodiment, the generating act includes multiplying a probability based on product information text by a probability based on product information attributes. If desired, a product in the first hierarchy can be associated with at least two high score nodes in the second hierarchy when each high score node corresponds to a classification probability exceeding a threshold. Conversely, product information on a low score product in the first hierarchy is not associated with a node in the second hierarchy when no node in the second hierarchy is associated with a classification probability exceeding a threshold. A low score node in the first hierarchy is designated as a node in the second hierarchy when the low score node contains at least a threshold number of low score products.  
           [0010]    As set forth in greater detail below, the present invention recognizes the intuition that if two products were grouped together in the first hierarchy they have a higher likelihood of being grouped together in the second hierarchy as well. Accordingly, product information on a product from a first node in the first hierarchy can be associated with a second node in the second hierarchy based on how many products in the first node have been associated with the second node.  
           [0011]    In another aspect, a computer system includes a program of instructions that in turn includes structure to undertake system acts. These system acts include receiving a main hierarchy having nodes representing product classes, and receiving a new hierarchy having nodes representing product classes. A Naive-Bayes classifier is generated using the main hierarchy, and then products in the new hierarchy are associated with nodes in the main hierarchy using the classifier.  
           [0012]    In yet another aspect, a system storage device includes system readable code that can be read by a computer for associating products in a new hierarchy with product classification nodes in a main hierarchy. The storage device includes computer readable code means for generating a Naive Bayes classifier based on hierarchy training data containing both text and numerical attributes. Also, computer readable code means are provided for using the classifier and a determination of how many products in at least a first node in the new hierarchy are associated with at least a second node in the main hierarchy to associate products in the new hierarchy with product classification nodes in the main hierarchy.  
           [0013]    The details of the present invention, both as to its structure and operation, can best be understood in reference to the accompanying drawings, in which like reference numerals refer to like parts, and in which:  
       
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0014]    [0014]FIG. 1 is a block diagram of the present system architecture;  
         [0015]    [0015]FIG. 2 is a flow chart of the overall logic;  
         [0016]    [0016]FIG. 3 is a flow chart of a preferred logic; and  
         [0017]    [0017]FIG. 4 is a flow chart of the logic for optimizing the present invention. 
     
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS  
       [0018]    Referring initially to FIG. 1, a system is shown, generally designated  10 , for merging data from plural hierarchies, at least two of which are shown in FIG. 1 and designated “main” and “new”. While two product hierarchies are discussed herein, it is to be understood that more than two hierarchies can be merged using present principles, and that the present invention applies to “product” hierarchies in the broadest sense, e.g., a “product” could be almost any data record that might be stored in a hierarchy.  
         [0019]    A computer  12  includes an input device  14 , such as a keyboard or mouse, for inputting data to the computer  12 , as well as an output device  16 , such as a monitor. The computer  12  can be a Web server or other computer that communicates with the hierarchies as shown in FIG. 1.  
         [0020]    The computer  12  can be a personal computer made by International Business Machines Corporation (IBM) of Armonk, N.Y. Other digital processors, however, may be used, such as a laptop computer, mainframe computer, palmtop computer, personal assistant, or any other suitable processing apparatus. Likewise, other input devices, including keypads, trackballs, and voice recognition devices can be used, as can other output devices, such as printers, other computers or data storage devices, and computer networks.  
         [0021]    In any case, the processor of the user computer  12  accesses a classification module  18  to undertake certain of the logic of the present invention. The module  18  may be executed by a processor as a series of computer-executable instructions. The instructions may be contained on a data storage device with a computer readable medium, such as a computer diskette having a computer usable medium with code elements stored thereon. Or, the instructions may be stored on random access memory (RAM)  12 A of the computer  12 , on a DASD array, or on magnetic tape, conventional hard disk drive, electronic read-only memory, optical storage device, or other appropriate data storage device. In an illustrative embodiment of the invention, the computer-executable instructions may be lines of C++ code.  
         [0022]    Indeed, the flow charts herein illustrate the structure of the logic of the present invention as embodied in computer program software. Those skilled in the art will appreciate that the flow charts illustrate the structures of computer program code elements including logic circuits on an integrated circuit, that function according to this invention. Manifestly, the invention is practiced in its essential embodiment by a machine component that renders the program code elements in a form that instructs a digital processing apparatus (that is, a computer) to perform a sequence of function steps corresponding to those shown.  
         [0023]    Now referring to FIG. 2, the overall logic of the present invention can be seen. Product information pertaining to products in the main hierarchy is split into textual information and attributes, either categorical or numerical. For example, suppose a product is a camera having, as an attribute, a resolution having a value, and having a name. The name is textual and the attribute, resolution, is numerical, and it has a value.  
         [0024]    Moving to block  22 , a classifier is generated using the product information obtained at block  20 . The classification preferably is generated using a Naive-Bayes rule as detailed further below, although other classifiers, such as decision tree classifiers, can also be used. As indicated at block  22 , the classifier is generated using probabilities related to product information text occurrences and product information attribute occurrences, and it is trained using the product information in the main hierarchy. If no products initially exist in the main hierarchy, a training set of data can be provided.  
         [0025]    Proceeding to block  24  in the overall logic, the invention next uses the classifier generated at block  22  to associate products in the new hierarchy with nodes in the main hierarchy. A preferred implementation of this is discussed further below. In this way, the hierarchies are merged.  
         [0026]    [0026]FIG. 3 shows the details of one preferred implementation, which uses Naive-Bayes principles as modified herein to merge two hierarchies. Commencing at block  26 , the classes C i  of data are determined by the nodes in the main hierarchy, and then the relative posterior probability Pr(C i |p) of class C i  given a product p is determined using Bayes&#39; rule modified as follows: Pr(C i |p)=Pr(C i )Pr(p|C i ), where Pr(C i ) equals the number of products in the i th  class C i  divided by the total number of products in the main hierarchy, and wherein the probability Pr(p|C i ) is obtained using probabilities based on numerical attributes combined with probabilities based on text attributes. Specifically, Pr(p|C i )=Pr(p text |C i )×Pr(p text |C i ), where p text  is a textual portion of a product and Pat is a numerical attribute portion of a product. The right side of the above equation can be rewritten as            wεptext  Pr(w|C i ) multiplied by            Ajεpattr  Pr(A j =v k |C i ), where “w” is a word in the text portion p text  and v k  is the k th  value interval of the j th  attribute A j  of the attribute portion p attr .  
         [0027]    With more specificity, in obtaining Pr(w|C), the frequency of occurrence of every word appearing in any of the textual descriptions of the set of products in the i th  node C i  is computed. If n(C i ,w) is the number of occurrences of word “w” in class C i , and n(C i ) is the total number of words in the class C i , the maximum likelihood estimate for Pr(w|C i ) is n(C i ,w)/n(C i ). However, the present invention understands that using this estimate would give a probability of zero for any word that does not occur in the class, and thus result in Pr(p|C i ) being zero for any product p that contains a word not present in the class C i . Accordingly, it is preferably to “smooth” the maximum likelihood estimate with Laplace&#39;s law of succession, or more preferably with Lidstone&#39;s law of succession for heterogenous datasets. For an optimal value of λ selected by randomly selecting a subset of the main hierarchy and computing the accuracy of the model for various values of λ, Pr(w|C i )={n(C i ,w)+λ}/{n(C i )+λ|V|}, where V is the number of words in the entire dataset.  
         [0028]    On the other hand, for the numeric attribute portion, the possible values of each attribute are discretized into intervals, such that v k  for an attribute represents the k th  value interval for the attribute. If n(C i , A j =v k ) is the number of products in class C i  for which attribute A j  has a value in the interval v k , |C i | is the number of products in class C i , and |A j | is the number of possible values for attribute A j , using the Lidstone correction:  
           Pr ( A   j   =v   k   |C   i )={ n ( C   i   , A   j   =v   k )+λ}/{| C   i   |+λ|A   j }, λ≧0.  
         [0029]    The above equation is used for categorical attributes, except that v k  represents the k th  value in the set of possible values for the categorical attribute.  
         [0030]    The equations above are used to generate the preferred Naive-Bayes classifier using the products in the main hierarchy as the training set. Specifically, at block  26 , Pr(C i ), Pr(w|C i ), and Pr(A j =v k |C i ) are determined. Moving to block  28 , a DO loop is entered for each node M in the new hierarchy. At decision diamond  30  it is determined whether all nodes have been tested and if so the process ends at state  32 . Otherwise, for each product in the node M under test, at block  38  the probabilities Pr(C i |p) of the product in the new hierarchy belonging to each of the classes C i  in the main hierarchy is determined using the equations above as appropriate. At block  40 , for each product, the product is assigned to the class with the highest value for Pr(C i |p), unless, in some implementations as set forth further below in reference to FIG. 4, no class has a very high probability for that product.  
         [0031]    In accordance with the present invention, the classification at block  40  is tentative. As recognized by the present invention, if two products are in the same node in the new hierarchy, they are more likely to belong to the same node in the main hierarchy. Accordingly, the process moves from block  40  to block  42  to determine the probability of each class given the node M of the product under test in the new hierarchy. In other words, the product classification can be based at least in part on how many products in a new hierarchy node are associated with the same node in the main hierarchy.  
         [0032]    To do this, the products are first classified using Pr(C i ) as disclosed above, and then the relative posterior probability Pr(C i |p,M) of class C i  in the main hierarchy given a product “p” belonging to node M in the new hierarchy is determined at block  42  to be Pr(C i |M)×Pr(p|C i ,M). Pr(p|C i ,M) is approximated as Pr(p|C i ), assuming that Pr(p|C i ) is independent of M. Pr(C i |M) is estimated by the ratio of the number of products in class C i  in the main hierarchy that were stored in node M in the new hierarchy, to the total number of products in the node M, raised to the power of “delta”, typically a value of between one and one hundred. Intuitively, delta takes into account that some hierarchies may be close to the main hierarchy, and delta should be high for those, while others may be orthogonal in their organization, and delta should be small in those cases. The value of delta can be determined by presenting a small validation set to the user for manual classification: the examples in this set are chosen such that their classification would be different based on the value of delta.  
         [0033]    The ratio discussed in the preceding paragraph can be further smoothed using a Laplace or Lidstone correction. At block  44 , for each product in the node M under test, the product is reclassified using Pr(C i |M) instead of Pr(C i ) in the classification model disclosed above.  
         [0034]    [0034]FIG. 4 shows that if desired, at decision diamond  46  it can be determined whether more than two classes (nodes) have high probabilities for a product, e.g., probabilities that exceed a threshold. If so, the product can be classified into both nodes at block  48 . In contrast, at decision diamond  50  it is determined whether no class has a high probability, e.g., whether no class has a probability equal to a threshold. If this is the case, the product need not be classified at all at block  54 , but rather flagged for manual classification. Otherwise, the logic ends at state  52 .  
         [0035]    The logic can flow from block  54  to decision diamond  56  wherein it is determined whether a node M in the new hierarchy has more than a threshold number of products that have not been classified. If so, the node M can be designated as a candidate node for the main hierarchy at block  58 .  
         [0036]    While the particular METHOD AND SYSTEM FOR MERGING HIERARCHIES as herein shown and described in detail is fully capable of attaining the above-described objects of the invention, it is to be understood that it is the presently preferred embodiment of the present invention and is thus representative of the subject matter which is broadly contemplated by the present invention, that the scope of the present invention fully encompasses other embodiments which may become obvious to those skilled in the art, and that the scope of the present invention is accordingly to be limited by nothing other than the appended claims, in which reference to an element in the singular is not intended to mean “one and only one” unless explicitly so stated, but rather “one or more”. All structural and functional equivalents to the elements of the above-described preferred embodiment that are known or later come to be known to those of ordinary skill in the art are expressly incorporated herein by reference and are intended to be encompassed by the present claims. Moreover, it is not necessary for a device or method to address each and every problem sought to be solved by the present invention, for it to be encompassed by the present claims. Furthermore, no element, component, or method step in the present disclosure is intended to be dedicated to the public regardless of whether the element, component, or method step is explicitly recited in the claims. No claim element herein is to be construed under the provisions of 35 U.S.C. §112, sixth paragraph, unless the element is expressly recited using the phrase “means for” or, in the case of a method claim, the element is recited as a “step” instead of an “act”.