Abstract:
A method and apparatus of tracing product quality to improve product safety. The method and apparatus can rapidly locate sources of product raw materials causing product quality safety incidents, which prevent further development of incidents and additional losses. The method is based on using a product production plan, and creating product raw material combinations corresponding to product batches and decision rules for determining sources of unqualified product raw materials. In response to when a product quality issue arises using the decision rules when producing products according to the product raw material combinations helps to quickly determine the sources of unqualified product raw materials and improves product quality safety.

Description:
CROSS-REFERENCE TO RELATED APPLICATION 
       [0001]    This application claims priority under 35 U.S.C. §119 from Chinese Patent Application No. 201110390579.3 filed Nov. 30, 2011, the entire contents of which are incorporated herein by reference. 
       BACKGROUND OF THE INVENTION 
       [0002]    1. Field of the Invention 
         [0003]    The present invention relates to product quality safety, and more specifically, to a method and apparatus for tracing product quality. 
         [0004]    2. Description of the Related Art 
         [0005]    Product quality safety incidents frequently occurred recently, such as,  enterobacter sakazakii  in baby milk powder, melamine-tainted toxic milk powder, and global car recall events. Emergency response to product quality safety events needs to establish a rapid reaction mechanism of product quality safety for rapidly locating sources of raw materials that do not comply with product quality requirements, to prevent further development of those incidents and additional losses. 
         [0006]    Existing measures of emergency response to product quality safety events often realize location through defective product inspection after the occurrence of incidents, for example, 1) through directly inspecting raw materials, which might not be easily available due to raw material depletion or difficulty in storage; 2) through establishing a tracing network of product quality. Through recording product information in each stage of production, fabrication, storage, transportation, and distribution, tracing product quality establishes a tracing network of information flow from raw materials to finished products. With inference based on the product tracing network, it is possible to determine the probabilities of unqualified raw materials, other than directly determining what raw materials are unqualified. Taking toxic milk powder as an example, since raw milk materials from many milk stations are fixed in a dairy plant, it is difficult to trace to the sources of raw milk materials that incur quality safety incidents. 
         [0007]    A key point of establishing a product quality rapid reaction mechanism is to find out the source of product quality safety incidents. Therefore, there is a need for a method for rapidly and accurately locating the source of product raw materials causing product quality safety incidents. 
       SUMMARY OF THE INVENTION 
       [0008]    In view of the above issues, this invention provides a method and apparatus of tracing product quality. 
         [0009]    One aspect of this invention, a method of tracing product quality is provided, which includes: producing product raw material combinations corresponding to product batches and decision rules for determining sources of unqualified product raw materials by using a product production plan; producing products according to the product raw material combinations; and determining sources of unqualified product raw materials according to the decision rules in response to product quality issues that might occur. 
         [0010]    Another aspect of this invention, an apparatus of tracing product quality is provided, which includes: an optimization module configured to produce product raw material combinations corresponding to product batches and decision rules for determining sources of unqualified product raw materials based on a product production plan; a production module configured to produce products according to the product raw material combinations; and a decision module configured to determine sources of unqualified product raw materials in response to product quality issues which arise from the decision rules. 
         [0011]    The method and apparatus of tracing product quality according to the various aspects of this invention can rapidly locate sources of product raw materials causing product quality safety incidents, to prevent further development of incidents and additional losses. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0012]    Features, advantages, and other aspects of various embodiments of the present invention will become more apparent from the following detailed description, when taken in conjunction with the figures illustrate several embodiments of the present invention in an exemplary rather than limiting manner. 
           [0013]      FIG. 1  shows a method of tracing product quality according to an embodiment of the present invention. 
           [0014]      FIG. 2  shows a flowchart of a method of tracing product quality according to one embodiment of the present invention. 
           [0015]      FIG. 3  shows a flowchart of a method of tracing product quality according to one embodiment of the present invention. 
           [0016]      FIG. 4  shows an apparatus of tracing product quality according to embodiments of the present invention. 
           [0017]      FIG. 5  is a schematic diagram showing a structural block diagram of a computing device for implementing embodiments of this invention. 
       
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
       [0018]    Below, a method and apparatus of tracing product quality according to various embodiments of this invention will be described in conjunction with accompanying drawings for the further understanding of objects and advantages of this invention. 
         [0019]      FIG. 1  shows a method of tracing product quality according to an embodiment of this invention. At step S 101 , based on a product production plan, product raw material combinations corresponding to product batches and decision rules for determining sources of unqualified product raw materials are produced; at step S 102 , products are produced according to the product raw material combinations; at step S 103 , sources of unqualified product raw materials are determined in response to product quality issues according to the decision rules. 
         [0020]      FIG. 2  shows a flowchart of a method of tracing product quality according to one embodiment of the present invention, including step S 201  of obtaining raw material sources, product batches, and the number of sources of raw materials that can be unqualified, where the product production plan includes product raw material sources, product batches, product numbers, quality, and raw material component ratios, thereby the raw material sources and product batches can be retrieved from the product production plan, and the number of sources of raw materials that are unqualified can be obtained from historical feedback records of product quality. 
         [0021]    At step S 202 , based on the obtained raw material sources, product batches, and the number of sources of raw materials that can be unqualified, possible inspection results are encoded in the two-dimensional space and an encoded matrix is produced, where row vectors of the encoded matrix correspond to sources of unqualified product raw materials, and column vectors of the encoded matrix correspond to product batches. An encoding distance between any two row vectors of the encoded matrix can be determined based on the number of sources of raw materials that can be unqualified. 
         [0022]    Possible inspection results are encoded in the two-dimensional space to produce an encoded matrix A: 
         [0000]    
       
         
           
             A 
             = 
             
               
                 [ 
                 
                   
                     
                       
                         a 
                         11 
                       
                     
                     
                       … 
                     
                     
                       
                         a 
                         
                           1 
                            
                           M 
                         
                       
                     
                   
                   
                     
                       ⋮ 
                     
                     
                       ⋱ 
                     
                     
                       ⋮ 
                     
                   
                   
                     
                       
                         a 
                         
                           N 
                            
                           
                               
                           
                            
                           1 
                         
                       
                     
                     
                       … 
                     
                     
                       
                         a 
                         NM 
                       
                     
                   
                 
                 ] 
               
               
                 N 
                 × 
                 M 
               
             
           
         
       
     
         [0023]    A row vector is denoted as A i• =[a i1 , . . . , a iM ], which corresponds to a product raw material combination  n   i , 
         [0024]    A column vector is denoted as A •j =[a 1j , . . . , a Nj ] T , which corresponds to a product batch m i , 
         [0025]    Where row vectors satisfy |A i• −A •j |≧C, 
         [0026]    Where column vectors satisfy Σ i A ij •weight(n i )=weight(m 1 ), 1≦i≦N, weight( ) denotes the quality of raw materials or products. 
         [0027]    The two-dimensional codes need to satisfy the following two conditions: 
         [0028]    1) |s(ƒ −1 (n k ))−s(ƒ −1 (n i ))|≧C, C≧0, 1≦k, j≦N and k≠j, Nεpositive integers; 
         [0029]    2) q(m i )=q(ƒ(m i )), 1≦i≦M, Mεpositive integers; 
         [0030]    Here m i  denotes the i th  product batch; n j  and n k  respectively denote the j th  raw material source and the k th  raw material source; ƒ( ) denotes a component function of product batches; ƒ −1 ( ) denotes a reversed function of the component function of product batches; q( ) denotes a mass calculation function; s( ) denotes a binary encoding function; and C denotes the number of sources of potential unqualified product raw materials. 
         [0031]    At step S 203 , according to bits representing unqualified inspection results in column vectors corresponding to product batches, product raw material combinations are determined for the product batches; specifically, according to bits corresponding to individual unqualified raw material sources and representing unqualified inspection results in column vectors corresponding to product batches, product raw material combinations are determined for that product batches. At step  204 , decision rules for determining unqualified product sources are determined based on row vectors corresponding to sources of unqualified product raw materials. At step S 205 , products are produced according to the product raw material combinations corresponding to product batches. At step S 206 , in response to product quality issues, inspection results of product batches associated with the decision rules are obtained, and sources of unqualified product raw materials are uniquely determined according to the inspection results and the decision rules. 
         [0032]      FIG. 3  shows a flowchart of a method of tracing product quality for the present invention. At step S 301 , raw material sources, product batches, and the number of sources of raw materials that can be unqualified are obtained. At step S 302 , safety risk coefficients of raw material sources are obtained, the safety risk coefficients of raw material sources can be acquired from statistical historical feedback records of product quality. At step S 303 , possible inspection results can be encoded in the two-dimensional space to produce an encoded matrix, where row vectors of the encoded matrix correspond to sources of unqualified product raw materials, and column vectors of the encoded matrix correspond to produce batches. An encoding distance between any two row vectors of the encoded matrix can be determined based on the number of sources of potential unqualified product raw materials. At step S 304 , according to bits representing unqualified inspection results in column vectors corresponding to the product batches, product raw material combinations are determined for the product batches; specifically, according to bits corresponding to individual unqualified raw material sources and representing unqualified inspection results in column vectors corresponding to the product batches, product raw material combinations are determined for that product batches. At step S 305 , a safety risk is calculated for the product raw material combinations and select product raw material combinations that have a minimal safety risk. At step S 306 , decision rules for determining unqualified product sources are determined based on row vectors corresponding to sources of unqualified product raw materials. At step S 307 , products are produced according to the product raw material combinations corresponding to the product batches which have a minimal safety risk. At step S 308 , in response to product quality issues, inspection results of product batches associated with the decision rules are obtained, and sources of unqualified product raw materials are uniquely determined according to the inspection results and the decision rules. 
         [0033]    The present invention, where selecting raw food material combinations capable of locating sources of unqualified foods includes: acquiring safety risks of sources of raw food materials; calculating a safety risk for raw food material combinations complied with a food production plan; and selecting such raw food material combinations that have a minimal safety risk. 
         [0034]    Taking production of dairy products as an example, according to a production plan, dairy products are produced with milk coming from four milk stations A, B, C, and D as raw materials, in four batches M, N, P, and Q, where the products in each batch require 3 volumes of milk, and according to historical records, it is determined that only one milk station is prone to have quality problems; according to the present invention, possible inspection results are encoded in the two-dimensional space, an encoding distance between any two row vectors is determined according to the number of sources of potentially questionable raw materials, where row vectors of the two-dimensional matrix correspond to unqualified milk station combinations of A, B, C, and D, and column vectors of the two-dimensional matrix correspond to product batches M, N, P, and Q. In the case of only one food source that has questionable quality, “1” represents that a certain batch of products has quality problems, “0” represents that a certain batch of products is qualified, an encoded matrix A according to the present invention is shown as below: 
         [0000]    
       
         
           
               
             
               
                 
                   
                     A 
                     = 
                     
                       
                         [ 
                         
                           
                             
                               0 
                             
                             
                               0 
                             
                             
                               1 
                             
                             
                               0 
                             
                           
                           
                             
                               0 
                             
                             
                               0 
                             
                             
                               1 
                             
                             
                               1 
                             
                           
                           
                             
                               1 
                             
                             
                               0 
                             
                             
                               0 
                             
                             
                               0 
                             
                           
                           
                             
                               1 
                             
                             
                               1 
                             
                             
                               0 
                             
                             
                               0 
                             
                           
                         
                         ] 
                       
                       
                         
                           
                             M 
                           
                           
                             N 
                           
                           
                             P 
                           
                           
                             Q 
                           
                         
                       
                     
                   
                 
                 
                   
                     
                       
                         
                           
                             
                               
                                 
                                   
                                     
                                       milk 
                                        
                                       
                                           
                                       
                                        
                                       station 
                                        
                                       
                                           
                                       
                                        
                                       A 
                                     
                                   
                                 
                                 
                                   
                                     
                                       milk 
                                        
                                       
                                           
                                       
                                        
                                       station 
                                        
                                       
                                           
                                       
                                        
                                       B 
                                     
                                   
                                 
                               
                             
                           
                           
                             
                               
                                 milk 
                                  
                                 
                                     
                                 
                                  
                                 station 
                                  
                                 
                                     
                                 
                                  
                                 C 
                               
                             
                           
                         
                       
                     
                     
                       
                         
                           milk 
                            
                           
                               
                           
                            
                           station 
                            
                           
                               
                           
                            
                           D 
                         
                       
                     
                   
                 
               
             
           
         
       
     
         [0035]    According to bits corresponding to individual unqualified raw material sources and representing unqualified inspection results in column vectors corresponding to the product batches, product raw material combinations are determined for that product batches. The combination of batch M is milk stations C and D, the combination of batch N is milk station D, the combination of batch P is milk stations A and B, the combination of batch Q is milk station B. According to the principle of mass conservation of all batch masses and product sources, product raw material component ratios are calculated for respective batches. Table 1 shows the product raw material component ratios of those batches, where batch M has a component ratio of two volumes of milk coming from milk station C and one volume of milk coming from milk station D. Batch N has a component ratio of three volumes of milk coming from milk station D. Batch P has a component ratio of two volumes of milk coming from milk station A and one volume of milk coming from milk station B; and batch Q has a component ratio of three volumes of milk coming from milk station B. 
         [0000]    
       
         
               
               
             
           
               
                 TABLE 1 
               
               
                   
               
               
                   
                 Raw food martial 
               
               
                 Food batch 
                 component ratio 
               
               
                   
               
             
             
               
                 M 
                 C 2 D 1   
               
               
                 N 
                 D 3   
               
               
                 P 
                 A 2 B 1   
               
               
                 Q 
                 B 3   
               
               
                   
               
             
          
         
       
     
         [0036]    Decision rules for determining sources of unqualified products are determined based on row vectors corresponding to sources of unqualified product raw materials in the encoded matrix A. Table 2 shows decision rules for quality problems occurred, inspection results of product batches associated with that decision rules, and sources of unqualified product raw materials which can be uniquely determined according to the inspection results and the decision rules, where “1” represents that a certain batch of products has quality problems, “0” represents that a certain batch of products is qualified, for example: decision rules [0010] denotes if product batch P has problems, and other product batches are qualified, then milk station A is questionable; decision rules [0011] denotes if product batches P and Q have problems, and product batches M and N are qualified, then milk station B is questionable; decision rules [1000] denotes if product batch M has problems, and other product batches are qualified, then milk station C is questionable; and finally decision rules [1100] denotes if product batches M and N have problems, and other product batches are qualified, then milk station D is questionable; 
         [0000]    
       
         
               
               
               
               
               
               
             
           
               
                   
                 TABLE 2 
               
               
                   
                   
               
               
                   
                   
                   
                   
                   
                 Sources of 
               
               
                   
                 M 
                 N 
                 P 
                 Q 
                 unqualified food 
               
               
                   
                   
               
             
             
               
                   
                 0 
                 0 
                 1 
                 0 
                 Milk station A 
               
               
                   
                 0 
                 0 
                 1 
                 1 
                 Milk station B 
               
               
                   
                 1 
                 0 
                 0 
                 0 
                 Milk station C 
               
               
                   
                 1 
                 1 
                 0 
                 0 
                 Milk station D 
               
               
                   
                   
               
             
          
         
       
     
         [0037]    Therefore, if it is determined that there is only one source of a questionable raw material, the source of the unqualified raw material can be uniquely determined. 
         [0038]    Taking household detergent production as an example, a household detergent is produced with alkanolamide from four chemical plants A, B, C, and D as its chemical raw materials. According to a production plan, five batches of household detergent M, N, P, Q, and R are produced every day, where each batch of household detergent needs 2.4 volumes of alkanolamide. Alkanolamide is transported every day from four chemical plants A, B, C, and D in the following quantities 2, 2, 4, 4 volumes respectively, and it is determined according to historical records that the number of chemical plants that can have quality problems 2. Inspection results are encoded in the two-dimensional space, and it is determined based on the number of sources of raw materials that can have quality problems that the encoding distance between any two row vectors is 2, where the row vectors of the encoded matrix correspond to combinations of unqualified chemical plants A, B, C, and D, and the column vectors of the encoded matrix correspond to product batches M, N, P, Q, and R, “1” represents that a certain batch of products has quality problems, “0” represents that a certain batch of products is qualified, an encoded matrix B according to the embodiment of this invention is shown as below: 
         [0000]    
       
         
           
               
             
               
                 
                   
                       
                     
                       B 
                       = 
                       
                         
                           
                             
                               [ 
                               
                                 
                                   
                                     0 
                                   
                                   
                                     1 
                                   
                                   
                                     1 
                                   
                                   
                                     0 
                                   
                                   
                                     0 
                                   
                                 
                                 
                                   
                                     0 
                                   
                                   
                                     0 
                                   
                                   
                                     1 
                                   
                                   
                                     1 
                                   
                                   
                                     0 
                                   
                                 
                                 
                                   
                                     1 
                                   
                                   
                                     0 
                                   
                                   
                                     0 
                                   
                                   
                                     1 
                                   
                                   
                                     0 
                                   
                                 
                                 
                                   
                                     1 
                                   
                                   
                                     1 
                                   
                                   
                                     0 
                                   
                                   
                                     0 
                                   
                                   
                                     0 
                                   
                                 
                                 
                                   
                                     0 
                                   
                                   
                                     1 
                                   
                                   
                                     1 
                                   
                                   
                                     1 
                                   
                                   
                                     0 
                                   
                                 
                                 
                                   
                                     1 
                                   
                                   
                                     1 
                                   
                                   
                                     1 
                                   
                                   
                                     1 
                                   
                                   
                                     1 
                                   
                                 
                                 
                                   
                                     1 
                                   
                                   
                                     1 
                                   
                                   
                                     1 
                                   
                                   
                                     0 
                                   
                                   
                                     0 
                                   
                                 
                                 
                                   
                                     1 
                                   
                                   
                                     0 
                                   
                                   
                                     1 
                                   
                                   
                                     1 
                                   
                                   
                                     1 
                                   
                                 
                                 
                                   
                                     1 
                                   
                                   
                                     1 
                                   
                                   
                                     1 
                                   
                                   
                                     1 
                                   
                                   
                                     0 
                                   
                                 
                                 
                                   
                                     1 
                                   
                                   
                                     1 
                                   
                                   
                                     0 
                                   
                                   
                                     1 
                                   
                                   
                                     1 
                                   
                                 
                               
                               ] 
                             
                             
                               10 
                               × 
                               5 
                             
                           
                             
                         
                         
                           
                             
                               M 
                             
                             
                               N 
                             
                             
                               P 
                             
                             
                               Q 
                             
                             
                               
                                 R 
                                  
                                 
                                     
                                 
                               
                             
                           
                         
                       
                     
                   
                 
                 
                   
                     
                       
                         
                           
                             
                               
                                 
                                   
                                     
                                       chemical 
                                        
                                       
                                           
                                       
                                        
                                       plant 
                                        
                                       
                                           
                                       
                                        
                                       A 
                                     
                                   
                                 
                                 
                                   
                                     
                                       chemical 
                                        
                                       
                                           
                                       
                                        
                                       plant 
                                        
                                       
                                           
                                       
                                        
                                       B 
                                     
                                   
                                 
                                 
                                   
                                     
                                       chemical 
                                        
                                       
                                           
                                       
                                        
                                       plant 
                                        
                                       
                                           
                                       
                                        
                                       C 
                                     
                                   
                                 
                                 
                                   
                                     
                                       chemical 
                                        
                                       
                                           
                                       
                                        
                                       plant 
                                        
                                       
                                           
                                       
                                        
                                       D 
                                     
                                   
                                 
                                 
                                   
                                     
                                       chemical 
                                        
                                       
                                           
                                       
                                        
                                       plants 
                                        
                                       
                                           
                                       
                                        
                                       A 
                                        
                                       
                                           
                                       
                                        
                                       and 
                                        
                                       
                                           
                                       
                                        
                                       B 
                                     
                                   
                                 
                                 
                                   
                                     
                                       chemical 
                                        
                                       
                                           
                                       
                                        
                                       plants 
                                        
                                       
                                           
                                       
                                        
                                       A 
                                        
                                       
                                           
                                       
                                        
                                       and 
                                        
                                       
                                           
                                       
                                        
                                       C 
                                     
                                   
                                 
                                 
                                   
                                     
                                       chemical 
                                        
                                       
                                           
                                       
                                        
                                       plants 
                                        
                                       
                                           
                                       
                                        
                                       A 
                                        
                                       
                                           
                                       
                                        
                                       and 
                                        
                                       
                                           
                                       
                                        
                                       D 
                                     
                                   
                                 
                                 
                                   
                                     
                                       chemical 
                                        
                                       
                                           
                                       
                                        
                                       plants 
                                        
                                       
                                           
                                       
                                        
                                       B 
                                        
                                       
                                           
                                       
                                        
                                       and 
                                        
                                       
                                           
                                       
                                        
                                       C 
                                     
                                   
                                 
                               
                             
                           
                           
                             
                               
                                 chemical 
                                  
                                 
                                     
                                 
                                  
                                 plants 
                                  
                                 
                                     
                                 
                                  
                                 B 
                                  
                                 
                                     
                                 
                                  
                                 and 
                                  
                                 
                                     
                                 
                                  
                                 D 
                               
                             
                           
                         
                       
                     
                     
                       
                         
                           chemical 
                            
                           
                               
                           
                            
                           plants 
                            
                           
                               
                           
                            
                           C 
                            
                           
                               
                           
                            
                           and 
                            
                           
                               
                           
                            
                           D 
                         
                       
                     
                   
                 
               
             
           
         
       
     
         [0039]    According to bits corresponding to individual unqualified raw material sources and representing unqualified inspection results in column vectors corresponding to the product batches, product raw material combinations are determined for that product batches. The combination of batch M is the alkanolamide coming from chemical plants C and D, the combination of batch N is the alkanolamide coming from chemical plants A and D, the combination of batch P is the alkanolamide coming from chemical plants A and B, the combination of batch Q is the alkanolamide coming from chemical plants B and C, the combination of batch R is the alkanolamide coming from chemical plant C. According to the principle of mass conservation of all batch masses and product sources, product raw material component ratios are calculated for respective batches. Table 2 shows the product raw material component ratios of those batches, where the household detergent of batch M has a component ratio of 0.4 volume of alkanolamide coming from chemical plant C and 2 volumes of alkanolamide coming from chemical plant D; the household detergent of batch N has a component ratio of 0.4 volume of alkanolamide coming from chemical plant A and 2 volumes of alkanolamide coming from chemical plant D; the household detergent of batch P has a component ratio of 1.6 volume of alkanolamide coming from chemical plant A and 0.8 volume of alkanolamide coming from chemical plant B; the household detergent of batch Q has a component ratio of 1.2 volumes of alkanolamide coming from chemical plant B and 1.2 volumes of alkanolamide coming from chemical plant C; the household detergent of batch R has a component ratio of 2.4 volumes of alkanolamide coming from chemical plant C. 
         [0000]    
       
         
               
               
             
           
               
                 TABLE 3 
               
               
                   
               
               
                   
                 component ratio of 
               
               
                 Product batch 
                 raw materials 
               
               
                   
               
             
             
               
                 M 
                 C 0.4 D 2   
               
               
                 N 
                 A 0.4 D 2   
               
               
                 P 
                 A 1.6 B 0.8   
               
               
                 Q 
                 B 1.2 C 1.2   
               
               
                 R 
                 C 2.4   
               
               
                   
               
             
          
         
       
     
         [0040]    In the case of the number of sources of unqualified raw materials  2 , decision rules for determining sources of unqualified products are determined based on row vectors corresponding to sources of unqualified product raw materials in the encoded matrix B. Table 4 shows decision rules for quality problems occurred, inspection results of product batches associated with that decision rules, and sources of unqualified product raw materials which can be uniquely determined according to the inspection results and the decision rules, where “1” represents that a certain batch of products has quality problems, “0” represents that a certain batch of products is qualified, for example: decision rules [01100] denotes if product batches N and P have problems, and other product batches are qualified, then chemical plant A is questionable; decision rules [00110] denotes if product batches P and Q have problems, and product batches M, Q, and R are qualified, then chemical plant B is questionable; decision rules [10011] denotes if product batches M, Q, and R have problems, and product batches N and P are qualified, then chemical plant C is questionable; decision rules [11000] denotes if product batches M and N have problems, and other product batches are qualified, then chemical plant D is questionable; decision rules [01110] denotes if product batches N, P, and Q have problems, and product batches M and R are qualified, then chemical plants A and B are questionable; decision rules [11111] denotes if all of product batches M, N, P, Q, and R have problems, then chemical plants A and C are questionable; decision rules [11100] denotes if product batches M, N, and P have problems, and product batches Q and R are qualified, then chemical plants A and D are questionable; decision rules [10111] denotes if product batches M, P, Q, and R have problems, and product batch N is qualified, then chemical plants B and C are questionable; decision rules [11110] denotes if product batches M, N, P, and Q have problems, and product batch R is qualified, then chemical plants B and D are questionable; decision rules [11011] denotes if product batches M, N, Q, and R have problems, and product batch P is qualified, then chemical plants C and D are questionable. 
         [0000]    
       
         
               
               
               
               
               
               
             
           
               
                 TABLE 4 
               
               
                   
               
               
                   
                   
                   
                   
                   
                 Sources of 
               
               
                 M 
                 N 
                 P 
                 Q 
                 R 
                 unqualified products 
               
               
                   
               
             
             
               
                 0 
                 1 
                 1 
                 0 
                 0 
                 Chemical 
               
               
                   
                   
                   
                   
                   
                 plant A 
               
               
                 0 
                 0 
                 1 
                 1 
                 0 
                 Chemical 
               
               
                   
                   
                   
                   
                   
                 plant B 
               
               
                 1 
                 0 
                 0 
                 1 
                 1 
                 Chemical 
               
               
                   
                   
                   
                   
                   
                 plant C 
               
               
                 1 
                 1 
                 0 
                 0 
                 0 
                 Chemical 
               
               
                   
                   
                   
                   
                   
                 plant D 
               
               
                 0 
                 1 
                 1 
                 1 
                 0 
                 Chemical 
               
               
                   
                   
                   
                   
                   
                 plants A and B 
               
               
                 1 
                 1 
                 1 
                 1 
                 1 
                 Chemical 
               
               
                   
                   
                   
                   
                   
                 plants A and C 
               
               
                 1 
                 1 
                 1 
                 0 
                 0 
                 Chemical 
               
               
                   
                   
                   
                   
                   
                 plants A and D 
               
               
                 1 
                 0 
                 1 
                 1 
                 1 
                 Chemical 
               
               
                   
                   
                   
                   
                   
                 plants B and C 
               
               
                 1 
                 1 
                 1 
                 1 
                 0 
                 Chemical 
               
               
                   
                   
                   
                   
                   
                 plants B and D 
               
               
                 1 
                 1 
                 0 
                 1 
                 1 
                 Chemical 
               
               
                   
                   
                   
                   
                   
                 plants C and D 
               
               
                   
               
             
          
         
       
     
         [0041]    Specific decision steps according to the decision rules of table 4 are listed in detail below: 
         [0042]    1) if batches N and P have problems, since batches M, Q, and R are qualified, it can be determined that raw materials of chemical plants B, C, and D are qualified, and thereby raw material of chemical plant A is unqualified; 
         [0043]    2) if batches P and Q have problems, since batches M, N, and R are qualified, it can be determined that raw materials of chemical plants A, C, and D are qualified, and thereby raw material of chemical plant B is unqualified; 
         [0044]    3) if batches M, Q, and R have problems, since batches N and P are qualified, it can be determined that raw materials of chemical plants A, B, and D are qualified, and thereby raw material of chemical plant C is unqualified; 
         [0045]    4) if batches M and N have problems, since batches P, Q, and R are qualified, it can be determined that raw materials of chemical plants A, B, and C are qualified, and thereby raw material of chemical plant D is unqualified; 
         [0046]    5) if batches N, P, and Q have problems, since batches M and R are qualified, it can be determined that raw materials of chemical plants C and D are qualified, and thereby raw materials of chemical plant A and B are unqualified; 
         [0047]    6) if batches M, N, P, Q, and R have problems, it can be determined that raw materials of chemical plants B and D are qualified, and thereby raw materials of chemical plants A and C are unqualified; 
         [0048]    7) if batches M, P, and N have problems, since batches Q and R are qualified, it can be determined that raw materials of chemical plants B and C are qualified, and thereby raw materials of chemical plants A and D are unqualified; 
         [0049]    8) if batches M, P, Q, and R have problems, since batch N is qualified, it can be determined that raw materials of chemical plants A and D are qualified, and thereby raw materials of chemical plants B and C are unqualified; 
         [0050]    9) if batches M, N, P, and Q have problems, since batch R is qualified, it can be determined that raw materials of chemical plants A and C are qualified, and thereby raw materials of chemical plants B and D are unqualified; 
         [0051]    10) if batches M, N, Q, and R have problems, since batch P is qualified, it can be determined that raw materials of chemical plants A and B are qualified, and thereby raw materials of chemical plants C and D are unqualified. 
         [0052]    Still taking household detergent production as an example, average safety risk probabilities of alkanolamide productions of chemical plants A, B, C, and D as raw material sources are acquired from historical data, as shown in table 5. 
         [0000]    
       
         
               
               
               
               
               
             
           
               
                 TABLE 5 
               
               
                   
               
               
                 Raw material 
                 Chemical 
                 Chemical 
                 Chemical 
                 Chemical 
               
               
                 source 
                 plant A 
                 plant B 
                 plant C 
                 plant D 
               
               
                   
               
             
             
               
                 Average safety 
                 5% 
                 5% 
                 30% 
                 20% 
               
               
                 risk 
               
               
                   
               
             
          
         
       
     
         [0053]    A method of calculating product risk probability is as follow: 
         [0054]    The product risk probability of a certain product batch is equal to the risk of corresponding raw materials: 4 
         [0055]    Taking table 3 as an example, the risk probability of product batch M is: 
         [0000]        r ( M )= r ( C∪D )= r ( C )+ r ( D )− r ( C ) r ( D )
 
         [0056]    as a result r(M)=0.44. 
         [0057]    Similarly, the risk probability of product batch N is: 
         [0000]        r ( N )= r ( A∪D )= r ( A )+ r ( D )− r ( A ) r ( D )
 
         [0058]    as a result r(N)=0.24. 
         [0059]    The risk probability of product batch P is: 
         [0000]        r ( P )= r ( A∪B )= r ( A )+ r ( B )− r ( A ) r ( B )
 
         [0060]    as a result r(P)=0.075. 
         [0000]        r ( Q )= r ( B∪C )= r ( B )+ r ( C )− r ( B ) r ( C )
 
         [0061]    as a result r(Q)=0.335 
         [0000]        r ( R )= r ( C )=0.3. 
         [0062]    Table 6 shows product risk probabilities corresponding to respective batches of above discussed household detergent production example. 
         [0000]    
       
         
               
               
               
             
               
               
               
             
           
               
                 TABLE 6 
               
               
                   
               
               
                   
                 Product raw material 
                   
               
               
                 Product batch 
                 component ratio 
                 Product risk 
               
               
                   
               
             
             
               
                   
               
             
          
           
               
                 M 
                 C 0.4 D 2   
                 0.44 
               
               
                 N 
                 A 0.4 D 2   
                 0.24 
               
               
                 P 
                 A 1.6 B 0.8   
                 0.075 
               
               
                 Q 
                 B 1.2 C 1.2   
                 0.335 
               
               
                 R 
                 C 2.4   
                 0.30 
               
               
                   
               
             
          
         
       
     
         [0063]    The total product risk=(r(M)+r(N)+r(P)+r(Q)+r(R))/5=0.278. 
         [0064]    According to the present invention, an eligible encoded matrix C is calculated, according to bits corresponding to individual unqualified raw material sources and representing unqualified inspection results in column vectors corresponding to product batches, product raw material combinations are determined for that product batches. The combination of batch M is the alkanolamide coming from chemical plants B and C, the combination of batch N is the alkanolamide coming from chemical plant C, the combination of batch P is the alkanolamide coming from chemical plant D, the combination of batch Q is the alkanolamide coming from chemical plants A and B, the combination of batch R is the alkanolamide coming from chemical plants A and D. According to the principle of mass conservation of all batch masses and product sources, product raw material component ratios are calculated for respective batches. Table 5 shows product raw material component ratios of those batches, where household detergent of batch M has a component ratio of 0.8 volume of alkanolamide coming from chemical plant B and 1.6 volumes of alkanolamide coming from chemical plant C; household detergent of batch N has a component ratio of 2.4 volumes of alkanolamide coming from chemical plant C; household detergent of batch P has a component ratio of 2.4 volumes of alkanolamide coming from chemical plant D; household detergent of batch Q has a component ratio of 1.2 volumes of alkanolamide coming from chemical plant B and 1.2 volumes of alkanolamide coming from chemical plant C; household detergent of batch R has a component ratio of 0.8 volume of alkanolamide coming from chemical plant A and 1.6 volumes of alkanolamide coming from chemical plant D. 
         [0000]    
       
         
           
               
             
                 
               
                 
                   
                     
                       C 
                       = 
                       
                         
                           
                             [ 
                             
                               
                                 
                                   0 
                                 
                                 
                                   0 
                                 
                                 
                                   0 
                                 
                                 
                                   1 
                                 
                                 
                                   1 
                                 
                               
                               
                                 
                                   1 
                                 
                                 
                                   0 
                                 
                                 
                                   0 
                                 
                                 
                                   1 
                                 
                                 
                                   0 
                                 
                               
                               
                                 
                                   1 
                                 
                                 
                                   1 
                                 
                                 
                                   0 
                                 
                                 
                                   0 
                                 
                                 
                                   0 
                                 
                               
                               
                                 
                                   0 
                                 
                                 
                                   0 
                                 
                                 
                                   1 
                                 
                                 
                                   0 
                                 
                                 
                                   1 
                                 
                               
                               
                                 
                                   1 
                                 
                                 
                                   0 
                                 
                                 
                                   0 
                                 
                                 
                                   1 
                                 
                                 
                                   1 
                                 
                               
                               
                                 
                                   1 
                                 
                                 
                                   1 
                                 
                                 
                                   0 
                                 
                                 
                                   1 
                                 
                                 
                                   1 
                                 
                               
                               
                                 
                                   0 
                                 
                                 
                                   0 
                                 
                                 
                                   1 
                                 
                                 
                                   1 
                                 
                                 
                                   0 
                                 
                               
                               
                                 
                                   1 
                                 
                                 
                                   1 
                                 
                                 
                                   0 
                                 
                                 
                                   1 
                                 
                                 
                                   0 
                                 
                               
                               
                                 
                                   1 
                                 
                                 
                                   0 
                                 
                                 
                                   1 
                                 
                                 
                                   1 
                                 
                                 
                                   1 
                                 
                               
                               
                                 
                                   1 
                                 
                                 
                                   1 
                                 
                                 
                                   1 
                                 
                                 
                                   0 
                                 
                                 
                                   1 
                                 
                               
                             
                             ] 
                           
                           
                             10 
                             × 
                             5 
                           
                         
                         
                           
                             
                               M 
                             
                             
                               N 
                             
                             
                               P 
                             
                             
                               Q 
                             
                             
                               
                                 R 
                                  
                                 
                                     
                                 
                               
                             
                           
                         
                       
                     
                   
                   
                     
                       
                         
                           
                             
                               
                                 
                                   
                                     
                                       
                                         chemical 
                                          
                                         
                                             
                                         
                                          
                                         plant 
                                          
                                         
                                             
                                         
                                          
                                         A 
                                       
                                     
                                   
                                   
                                     
                                       
                                         chemical 
                                          
                                         
                                             
                                         
                                          
                                         plant 
                                          
                                         
                                             
                                         
                                          
                                         B 
                                       
                                     
                                   
                                   
                                     
                                       
                                         chemical 
                                          
                                         
                                             
                                         
                                          
                                         plant 
                                          
                                         
                                             
                                         
                                          
                                         C 
                                       
                                     
                                   
                                   
                                     
                                       
                                         chemical 
                                          
                                         
                                             
                                         
                                          
                                         plant 
                                          
                                         
                                             
                                         
                                          
                                         D 
                                       
                                     
                                   
                                   
                                     
                                       
                                         chemical 
                                          
                                         
                                             
                                         
                                          
                                         plants 
                                          
                                         
                                             
                                         
                                          
                                         A 
                                          
                                         
                                             
                                         
                                          
                                         and 
                                          
                                         
                                             
                                         
                                          
                                         B 
                                       
                                     
                                   
                                   
                                     
                                       
                                         chemical 
                                          
                                         
                                             
                                         
                                          
                                         plants 
                                          
                                         
                                             
                                         
                                          
                                         A 
                                          
                                         
                                             
                                         
                                          
                                         and 
                                          
                                         
                                             
                                         
                                          
                                         C 
                                       
                                     
                                   
                                   
                                     
                                       
                                         chemical 
                                          
                                         
                                             
                                         
                                          
                                         plants 
                                          
                                         
                                             
                                         
                                          
                                         A 
                                          
                                         
                                             
                                         
                                          
                                         and 
                                          
                                         
                                             
                                         
                                          
                                         D 
                                       
                                     
                                   
                                   
                                     
                                       
                                         chemical 
                                          
                                         
                                             
                                         
                                          
                                         plants 
                                          
                                         
                                             
                                         
                                          
                                         B 
                                          
                                         
                                             
                                         
                                          
                                         and 
                                          
                                         
                                             
                                         
                                          
                                         C 
                                       
                                     
                                   
                                 
                               
                             
                             
                               
                                 
                                   chemical 
                                    
                                   
                                       
                                   
                                    
                                   plants 
                                    
                                   
                                       
                                   
                                    
                                   B 
                                    
                                   
                                       
                                   
                                    
                                   and 
                                    
                                   
                                       
                                   
                                    
                                   D 
                                 
                               
                             
                           
                         
                       
                       
                         
                           
                             chemical 
                              
                             
                                 
                             
                              
                             plants 
                              
                             
                                 
                             
                              
                             C 
                              
                             
                                 
                             
                              
                             and 
                              
                             
                                 
                             
                              
                             D 
                           
                         
                       
                     
                   
                 
               
             
           
         
       
     
         [0000]    
       
         
               
               
               
             
               
               
               
             
           
               
                 TABLE 7 
               
               
                   
               
               
                   
                 component ratio of 
                   
               
               
                 Product batch 
                 raw materials 
                 Product risk 
               
               
                   
               
             
             
               
                   
               
             
          
           
               
                 M 
                 B 0.8 C 1.6   
                 0.335 
               
               
                 N 
                 C 2.4   
                 0.30 
               
               
                 P 
                 D 2.4   
                 0.20 
               
               
                 Q 
                 A 1.2 B 1.2   
                 0.075 
               
               
                 R 
                 A 0.8 D 1.6   
                 0.24 
               
               
                   
               
             
          
         
       
     
         [0065]    The risk probability of product batch M is: 
         [0000]        r ( M )= r ( B∪C )= r ( B )+ r ( C )− r ( B ) r ( C )
 
         [0066]    as a result r(M)=0.335. 
         [0067]    Similarly, the risk probability of product batch N is: 
         [0000]        r ( N )= r ( C )=0.3 
         [0068]    The risk probability of product batch P is: 
         [0000]        r ( P )= r ( D )=0.2 
         [0000]        r ( Q )= r ( A∪B )= r ( A )+ r ( B )− r ( A ) r ( B )
 
         [0069]    as a result r(Q)=0.075. 
         [0000]        r ( Q )= r ( A∪D )= r ( A )+ r ( D )− r ( A ) r ( D )
 
         [0070]    as a result r(Q)=0.24. 
         [0071]    The total product risk=(r(M)+r(N)+r(P)+r(Q)+r(R))/5=0.23. 
         [0072]    Because the total product risk of table 7 is less than that of household detergent production example, the combinations of table 7 are selected for product production. 
         [0073]    In the case of the number of sources of unqualified raw materials decision rules for determining sources of unqualified products are determined based on row vectors corresponding to sources of unqualified product raw materials in encoded matrix C. Table 8 shows decision rules for quality problems occurred, inspection results of product batches associated with that decision rules, and sources of unqualified product raw materials which can be uniquely determined according to the inspection results and the decision rules, where “1” represents that a certain batch of products has quality problems, “0” represents that a certain batch of products is qualified, for example: decision rules [00011] denotes if product batches Q and R have problems, and product batches M, N, and P are qualified, then chemical plant A is questionable; decision rules [10010] denotes if product batches M and Q have problems, and product batches N, P, and R are qualified, then chemical plant B is questionable; decision rules [11000] denotes if product batches M and N have problems, and product batches P, Q, and R are qualified, then chemical plant C is questionable; decision rules [00101] denotes if product batches P and R have problems, and product batches M, N, and Q are qualified, then chemical plant D is questionable; decision rules [10011] denotes if product batches M, Q, and R have problems, and product batches N and P are qualified, then chemical plants A and B are questionable; decision rules [11011] denotes if product batches M, N, Q, and R have problems, and product batch P is qualified, then chemical plants A and C are questionable; decision rules [00110] denotes if product batches P and Q have problems, and product batches M, N, and R are qualified, then chemical plants A and D are questionable; decision rules [11010] denotes if product batches M, N, and Q have problems, and product batches P and R are qualified, then chemical plants B and C are questionable; decision rules [10111] denotes if product batches M, P, Q, and R have problems, and product batch N is qualified, then chemical plants B and D are questionable; and decision rules [11101] denotes if product batches M, N, P, and R have problems, and product batch Q is qualified, then chemical plants C and D are questionable. 
         [0000]    
       
         
               
               
               
               
               
               
             
           
               
                 TABLE 8 
               
               
                   
               
               
                   
                   
                   
                   
                   
                 Sources of 
               
               
                 M 
                 N 
                 P 
                 Q 
                 R 
                 unqualified products 
               
               
                   
               
             
             
               
                 0 
                 0 
                 0 
                 1 
                 1 
                 Chemical 
               
               
                   
                   
                   
                   
                   
                 plant A 
               
               
                 1 
                 0 
                 0 
                 1 
                 0 
                 Chemical 
               
               
                   
                   
                   
                   
                   
                 plant B 
               
               
                 1 
                 1 
                 0 
                 0 
                 0 
                 Chemical 
               
               
                   
                   
                   
                   
                   
                 plant C 
               
               
                 0 
                 0 
                 1 
                 0 
                 1 
                 Chemical 
               
               
                   
                   
                   
                   
                   
                 plant D 
               
               
                 1 
                 0 
                 0 
                 1 
                 0 
                 Chemical 
               
               
                   
                   
                   
                   
                   
                 plants A and B 
               
               
                 1 
                 1 
                 0 
                 1 
                 1 
                 Chemical 
               
               
                   
                   
                   
                   
                   
                 plants A and C 
               
               
                 0 
                 0 
                 1 
                 1 
                 0 
                 Chemical 
               
               
                   
                   
                   
                   
                   
                 plants A and D 
               
               
                 1 
                 1 
                 0 
                 1 
                 0 
                 Chemical 
               
               
                   
                   
                   
                   
                   
                 plants B and C 
               
               
                 1 
                 0 
                 1 
                 1 
                 1 
                 Chemical 
               
               
                   
                   
                   
                   
                   
                 plants B and D 
               
               
                 1 
                 1 
                 1 
                 0 
                 1 
                 Chemical 
               
               
                   
                   
                   
                   
                   
                 plants C and D 
               
               
                   
               
             
          
         
       
     
         [0074]    The specific decision steps according to the decision rules of table 8 are listed in detail below: 
         [0000]    1) if batch M is unqualified, then the quality of batch N is inspected, 
         [0075]    1.1 if batch N is qualified, then the quality of batch P is inspected, 
         [0076]    1.1.1 if batch P is qualified, then the quality of batch R is inspected, 
         [0077]    1.1.1.1 if batch R is qualified, then chemical plant B is determined as questionable; 
         [0078]    1.1.1.2 if batch R is unqualified, then chemical plants A and B are determined as questionable; 
         [0079]    1.1.2 if batch P is unqualified, then chemical plants B and D are determined as questionable; 
         [0080]    1.2 if batch N is unqualified, then the quality of batch P is inspected, 
         [0081]    1.2.1 if batch P is qualified, then the quality of batch Q is inspected, 
         [0082]    1.2.1.1 if batch Q is qualified, then chemical plant C is determined as questionable; 
         [0083]    1.2.1.2 if batch Q is unqualified, then the quality of batch R is inspected, 
         [0084]    1.2.1.2.1 if batch R is qualified, then chemical plants B and C are determined as questionable; 
         [0085]    1.2.1.2.2 if batch R is unqualified, then chemical plants A and C are determined as questionable; 
         [0086]    1.2.2 if batch P is unqualified, then chemical plants C and D are determined as questionable; 
         [0000]    2) if batch N is unqualified, then the quality of batch P is inspected, 
         [0087]    2.1 if batch P is qualified, then the quality of batch Q is inspected, 
         [0088]    2.1.1 if batch Q is qualified, then chemical plant C is determined as questionable; 
         [0089]    2.1.2 if batch Q is unqualified, then quality of batch R is inspected; 
         [0090]    2.1.2.1 if batch R is qualified, then chemical plants B and C are determined as questionable; 
         [0091]    2.1.2.2 if batch R is unqualified, then chemical plants A and C are determined as questionable 
         [0092]    2.2 if batch P is unqualified, then the quality of batch P is inspected, 
         [0093]    2.2.1 if batch P is qualified, then chemical plants C and D are determined as questionable; 
         [0000]    3) if batch P is unqualified, then the quality of batch N is inspected, 
         [0094]    3.1 if batch N is qualified, then the quality of batch M is inspected, 
         [0095]    3.1.1 if batch P is qualified, then the quality of batch Q is inspected, 
         [0096]    3.1.1.1 if batch Q is qualified, then chemical plant D is determined as questionable; 
         [0097]    3.1.1.2 if batch Q is unqualified, then chemical plants A and D are determined as questionable; 
         [0098]    3.1.2 if batch P is unqualified, then chemical plants B and D are determined as questionable; 
         [0099]    3.2 if batch N is unqualified, then chemical plants C and D are determined as questionable; 
         [0000]    4) if batch Q is unqualified, then the quality of batch M is inspected, 
         [0100]    4.1 if batch M is qualified, then the quality of batch P is inspected, 
         [0101]    4.1.1 if batch P is qualified, then the quality of batch N is inspected, 
         [0102]    4.1.1.1 if batch N is qualified, then the quality of batch R is inspected, 
         [0103]    4.1.1.1.1 if batch R is qualified, then chemical plant B is determined as questionable; 
         [0104]    4.1.1.1.2 if batch R is unqualified, then chemical plants A and B are determined as questionable; 
         [0105]    4.1.1.2 if batch N is unqualified, then the quality of batch R is inspected, 
         [0106]    4.1.1.2.1 if batch R is qualified, then chemical plants B and C are determined as questionable; 
         [0107]    4.1.1.2.2 if batch R is unqualified, then chemical plants A and C are determined as questionable; 
         [0108]    4.1.2 if batch P is unqualified, then chemical plants B and D are determined as questionable, 
         [0109]    4.2 if batch M is unqualified, then the quality of batch P is inspected, 
         [0110]    4.2.1 if batch P is qualified, then chemical plant A is determined as questionable, 
         [0111]    4.2.2 if batch P is unqualified, then chemical plants A and D are determined as questionable, 
         [0000]    5) if batch R is unqualified, then the quality of batch M is inspected, 
         [0112]    5.1 if batch M is qualified, then the quality of batch Q is inspected, 
         [0113]    5.1.1 if batch Q is qualified, then chemical plant D is determined as questionable, 
         [0114]    5.1.2 if batch Q is unqualified, then the quality of batch P is inspected, 
         [0115]    5.1.2.1 if batch P is qualified, then chemical plant A is determined as questionable, 
         [0116]    5.1.2.2 if batch P is unqualified, then chemical plants A and D are determined as questionable, 
         [0117]    5.2 if batch M is unqualified, then the quality of batch Q is inspected, 
         [0118]    5.2.1 if batch Q is qualified, then chemical plants C and D are determined as questionable, 
         [0119]    5.2.2 if batch Q is unqualified, then the quality of batch N is inspected, 
         [0120]    5.2.2.1 if batch N is qualified, then the quality of batch P is inspected, 
         [0121]    5.2.2.1.1 if batch P is qualified, then chemical plants A and B are determined as questionable, 
         [0122]    5.2.2.1.2 if batch P is unqualified, then chemical plants B and D are determined as questionable, 
         [0123]    5.2.2.2 if batch N is unqualified, then chemical plants A and C are determined as questionable. 
         [0124]    Based on the same inventive concept, an apparatus of tracing product quality is provided.  FIG. 4  shows an apparatus of tracing product quality of the present invention, which includes: an optimization module  401  configured to produce product raw material combinations corresponding to product batches and decision rules for determining sources of unqualified product raw materials based on a product production plan; a production module  402  configured to produce products according to product raw material combinations; a decision module  403  configured to determine sources of unqualified product raw materials in response to product quality issues occurred according to the decision rules. 
         [0125]    Where optimization module  401  further includes: an acquiring module configured to acquire raw material sources, product batches, and the number of sources of raw materials that can be unqualified; and an encoding module configured based on the acquired raw material sources, product batches, and the number of sources of raw materials that can be unqualified, encode possible inspection results in the two-dimensional space and produce an encoded matrix, where an encoding distance between any two row vectors of the encoded matrix can be determined based on the number of sources of raw materials that can be unqualified, row vectors of the encoded matrix correspond to the sources of unqualified product raw materials, column vectors of the encoded matrix correspond to the product batches, where the encoding satisfy the following two conditions: 
         [0126]    1) |s(ƒ −1 (n k ))−s(ƒ −1 (n j ))|≧C, C≧0, 1≦k, j≦N and k≠j, Nεpositive integers; 
         [0127]    2) q(m i )=q(f (m i )), 1≦i≦M, Mεpositive integers; 
         [0128]    where m i  denotes i th  product batch; n j  and n k  denote j th  raw material source and k th  raw material source; ƒ( ) denotes a component function of product batches; ƒ −1 ( ) denotes a reversed function of the component function of product batches; q( ) denotes a mass calculation function; s( ) denotes a binary encoding function; and C denotes number of sources of potential unqualified product raw materials. 
         [0129]    The present invention, the optimization module is further configured to: according to bits correspond to individual unqualified raw material sources and represent unqualified inspection results in column vectors corresponding to product batches, and to determine product raw material combinations for that product batches. 
         [0130]    In the present invention, the optimization module is further configured to determine decision rules for determining unqualified product sources based on row vectors corresponding to sources of the unqualified product raw materials. 
         [0131]    In the present invention, the acquiring module is further configured to obtain safety risk coefficients of raw material sources. Where the optimization module is further configured to calculate a safety risk for product raw material combinations; and select such product raw material combinations that have a minimal safety risk. 
         [0132]    In the present invention, the decision module is further configured to acquire inspection results of product batches associated with that decision rules, and uniquely determine sources of unqualified product raw materials according to the inspection results and the decision rules. 
         [0133]      FIG. 5  schematically shows a structural block diagram of a computing device which is applicable to implement the present invention. As shown in  FIG. 5 , the computing device includes: CPU (Central Process Unit)  501 , RAM (Random Access Memory)  502 , ROM (Read Only Memory)  503 , System Bus  504 , Hard Drive Controller  505 , Keyboard Controller  506 , Serial Interface Controller  507 , Parallel Interface Controller  508 , Display Controller  509 , Hard Drive  510 , Keyboard  511 , Serial Peripheral Equipment  512 , Parallel Peripheral Equipment  513 , and Display  514 . The above components, CPU  501 , RAM  502 , ROM  503 , Hard Drive Controller  505 , Keyboard Controller  506 , Serial Interface Controller  507 , Parallel Interface Controller  508 , and Display Controller  509  are coupled to the System Bus  504 . Hard Drive  510  is coupled to Hard Drive Controller  505 . Keyboard  511  is coupled to Keyboard Controller  506 . Serial Peripheral Equipment  512  is coupled to Serial Interface Controller  507 . Parallel Peripheral Equipment  513  is coupled to Parallel Interface Controller  508 , and display  514  is coupled to Display Controller  509 . 
         [0134]    The function of each component in  FIG. 5  is known in the field, and the structure illustrated in  FIG. 5  is also conventional. This structure is not only applied in a personal computer, but also in a portable device, like Palm PC, PDA (Personal Digital Assistant) and mobile phone, etc. In various applications, for example a user terminal containing the client module of the present invention or a server host computer containing the network application server of the present invention, some components can be added in the structure illustrated in  FIG. 5 , or some components in  FIG. 5  can be omitted. The whole system shown in  FIG. 5  is controlled by computer readable instructions generally stored in hard disk  510  or stored in EPROM or in other non-volatile memory as software. The software can also be downloaded from network (not shown in the figure). It can also be stored in hard disk  510 , or the software downloaded from network can also be loaded to RAM  502  and executed by CPU  501  to perform the function defined by the software. 
         [0135]    Though the computer system described in  FIG. 5  can support the technical scheme provided by the invention, a computer system is only exemplary of a computer system. Those skilled in the art can understand that many other computer system designs can also realize the present invention. 
         [0136]    This invention have been described with reference to drawings, however, it is to be understood that the invention is not limited to the disclosure above. Those skilled in the art can make any variant modifications without departing the scope of this invention. The invention is intended to cover all modifications and equivalent arrangements included within the scope of the appended claims. 
         [0137]    It should be understood that at least some aspects of the present invention can alternatively be implemented as a computer program product. Programs defining functions of the present invention can be delivered to a data storage system or computer system via a variety of signal-bearing media, which include, without limitation, non-writable storage media (e.g. CD-ROM), writable storage media (e.g. floppy disk, hard disk drive, read/write CD-ROM, optical media), and communication media, such as computer and telephone networks including Ethernet. It should be understood, that such signal-bearing media, when carrying or encoding computer readable instructions that direct method functions of the present invention, represent alternatives of the present invention. This invention can be realized in the form of hardware, software, firmware, or any combination thereof. This invention can be realized in one computer system in a centralized manner, or in a distributed manner, in which various components are distributed among several computer systems connected with each other. Any computer system or other apparatus suitable for carrying out the method described here is applicable. Preferably, the present invention is implemented in a manner of a combination of computer software and general-purpose computer hardware, in this manner of implementation, when the computer program being loaded and executed, the computer system is controlled to carry out the method of the invention, and constitute the apparatus of the invention. 
         [0138]    Preferred aspects of this invention have been described above for the purpose of illustration, which is not exhaustive, and it is not intended to limit this invention to the exactly disclosed forms. In view of the above teachings, many modifications and changes are possible. It is obvious for those skilled in the art that such modifications and changes are all covered in the scope of this invention which is defined by the appended claims.