Abstract:
A method for bank note distribution of financial self-service equipment is provided. The method includes: whether the distributed bank note amount is less than or equal to the residual bank note amount of a bank note box in the financial self-service equipment is judged, if yes, the lowest common multiple of bank note face value in the financial self-service equipment is obtained, otherwise, the bank note distribution fails; quotient and remainder obtained by dividing the distributed bank note amount by the lowest common multiple form the base number and the mantissa of the distributed bank note amount respectively; the base number part of the distributed bank note amount is distributed according to the bank note distribution principle; the remaining amount of the distributed bank note amount which carries out base number distribution and the mantissa of the distributed bank note amount form a residual error, and a secondary bank note distribution is performed on the residual error by an exhaustion method, where the bank note distribution succeeds when combination satisfying the residual error is present, otherwise, the bank note distribution fails.

Description:
[0001]    This application claims priority to Chinese Patent Application no. 200910214023.1, filed with the Chinese Patent Office on Dec. 22, 2009 and entitled “Method for Banknote Mix of Financial Self-Service Equipment”, which is hereby incorporated by reference in its entirety. 
       FIELD OF THE INVENTION 
       [0002]    The present invention relates to the field of finances and in particular to a method for banknote mix of a financial self-service device. 
       BACKGROUND OF THE INVENTION 
       [0003]    Banknote mix of a financial self-service device refers to overall management on the numbers of banknotes in respective banknote boxes of an Automatic Teller Machine (ATM). Typically, a financial self-service device, i.e., an Automatic Teller Machine (ATM), is equipped with N (N≧1) banknote boxes in each of which there are separately stored banknotes with a specific denomination, and the respective banknote boxes can store therein banknotes with the same sum or different sums of denominations. 
         [0004]    In view of both satisfying the demand of a user and facilitating maintenance of supplementing banknotes while dispensing banknotes, a banknote mix system of a financial self-service device manages banknote mix of the financial self-service device dependent upon an amount of banknotes entered by the user and a condition of banknotes stored in banknote boxes. 
         [0005]    Typically, four banknote mix principles exist with practical application demands: 
         [0006]    (1) Uniformly emptying principle: respective banknote boxes are emptied with substantially equal probabilities. 
         [0007]    (2) Averaging principle: the numbers of banknotes dispensed from respective banknote boxes in a specific combination are substantially equal. 
         [0008]    (3) Maximum denomination principle: banknotes are dispensed preferentially from the banknote box with larger denomination banknotes to minimize the total number of dispensed banknotes. 
         [0009]    (4) Minimum denomination principle: banknotes are dispensed preferentially from the banknote box with smaller denomination banknotes to maximize the total number of dispensed banknotes. 
         [0010]    During banknote mix on the foregoing principles, however, an amount of banknotes entered by a user is indeterminate, so a condition of banknotes stored in banknote boxes is also indeterminate. In an existing method for banknote mix of a financial self-service device, an exhaustive search has to be performed in view of the number of banknote boxes and the numbers of banknotes therein to determine respectively whether banknotes can be mixed successfully in respective combinations of the banknote boxes, and banknotes can be dispensed only upon determining successful banknote mix. The problem of time-consuming and inefficient banknote mix may arise when the existing method for banknote mix of a financial self-service device performs the banknote mix for a number of banknote boxes with various denominations. 
       SUMMARY OF THE INVENTION 
       [0011]    In view of this, the invention provides a method for banknote mix of a financial self-service device to perform rapid and efficient banknote mix. 
         [0012]    The method for banknote mix of a financial self-service device includes: 
         [0013]    determining whether an amount of banknotes to be mixed is not larger than amounts of banknotes remaining in banknote boxes of the financial self-service device, and if not, then calculating least common multiple of denominations of banknotes in the financial self-service device; otherwise, failing banknote mix; 
         [0014]    dividing the amount of banknotes to be mixed by the least common multiple, taking the quotient and the remainder respectively, forming a base and a mantissa; 
         [0015]    mixing banknotes for the base of the amount of banknotes to be mixed on a banknote mix principle; and 
         [0016]    taking the sum of the amount of remaining banknotes of the base after the banknote mix and the mantissa of the amount of banknotes to be mixed as a residual, and performing a second banknote mix for the residual on exhaustion method, and if there exists a solution in compliance with the residual, then succeeding in banknote mix; otherwise, failing banknote mix. 
         [0017]    Preferably, before the step of forming the base and the mantissa of the amount of banknotes to be mixed, the method further comprises: calculating the numbers of banknotes reserved in the banknote boxes with the respective denomination banknotes based on the denominations of the banknote in the respective banknote boxes of the financial self-service device and the least common multiple thereof. 
         [0018]    Preferably, the numbers of banknotes reserved in the banknote boxes with the respective denominations are equal to the value by subtracting 1 from the respective denominations of the banknote boxes divided by the least common multiple. 
         [0019]    Preferably, before the step of calculating the least common multiple of the denominations of banknotes in the financial self-service device, the method further comprises: calculating largest common divisor of the denominations of banknotes in the financial self-service device, determining whether the amount of banknotes to be mixed is dividable exactly by the largest common divisor, and if so, then going on the banknote mix process; otherwise, failing banknote mix. 
         [0020]    Preferably, the banknote mix principle is equal-emptying principle, averaging principle, maximum denomination principle or minimum denomination principle. 
         [0021]    Preferably, if the banknote mix principle is equal-emptying principle, the step of mixing banknotes for the base of the amount of banknotes to be mix on the banknote mix principle includes: 
         [0022]    counting the numbers of banknotes in the respective banknote boxes and determining one of the banknote boxes with the largest number of banknotes; and 
         [0023]    calculating the number of banknotes dispensed from the banknote box with the largest number of banknotes and dispensing the corresponding numbers of banknotes from the respective banknote boxes. 
         [0024]    Preferably, if the banknote mix principle is averaging principle, the step of mixing the base of the amount of banknotes to be mixed on the banknote mix principle includes: 
         [0025]    counting the numbers of banknotes in the respective banknote boxes; and 
         [0026]    calculating the numbers of banknotes dispensed from the respective banknote boxes in a mode of dispensing equal numbers of banknotes from the respective banknote boxes and dispensing the corresponding numbers of banknotes from the respective banknote boxes. 
         [0027]    Preferably, if the banknote mix principle is maximum denomination principle, the step of mixing banknotes for the base of the amount of banknotes to be mixed on the banknote mix principle includes: 
         [0028]    counting the numbers of banknotes in the respective banknote boxes; and 
         [0029]    calculating the numbers of banknotes dispensed from the respective banknote boxes in a mode of dispensing banknotes preferentially from one of the banknote boxes with the largest denomination of banknotes and dispensing the corresponding numbers of banknotes from the respective banknote boxes. 
         [0030]    Preferably, if the banknote mix principle is minimum denomination principle, the step of mixing banknotes for the base of the amount of banknotes to be mixed on the banknote mix principle includes: 
         [0031]    counting the numbers of banknotes in the respective banknote boxes; and 
         [0032]    calculating the numbers of banknotes dispensed from the respective banknote boxes in a mode of dispensing banknotes preferentially from one of the banknote boxes with the smallest denomination of banknotes and dispensing the corresponding numbers of banknotes from the respective banknote boxes. 
         [0033]    Preferably, the step of performing the second banknote mix for the residual on exhaustion method comprises: 
         [0034]    determining a conditional multivariate equation from the residual, the respective denominations of banknotes and the corresponding remaining amounts of banknotes of the respective denominations in the financial self-service device; and 
         [0035]    solving the constrained multivariate equation as combinations of the numbers of banknotes dispensed from the respective banknotes by exhaustion method and finishing banknote mix if any of the combinations is successful. 
         [0036]    As can be apparent from the foregoing solutions, in the method for banknote mix of a financial self-service device according to the invention, firstly it is determined prior to banknote mix whether the amounts of banknotes remaining in the financial self-service device is sufficient for banknote mix, and if not so, then banknote mix fails; otherwise, the base and the mantissa of the amount of banknotes to be mixed are calculated so that firstly the banknote mix is performed for the base of the amount of banknotes to be mixed on the banknote mix principle, and then the sum of the amount of remaining banknotes of the base after the banknote mix and the mantissa of the amount of banknotes to be mixed is took as a residual on exhaustion method, a second banknote mix is performed for the residual, and if there exists a combination in compliance with the residual, then banknote mix succeeds; otherwise, banknote mix fails. Since the base of the amount of banknotes to be mixed are mixed firstly and then the residual is mixed on exhaustion method, it is not necessary to determine respectively whether banknotes can be mixed successfully in each of combinations of the respective banknote boxes; and since the residual is a small magnitude relative to the amount of banknotes to be mixed, a just a short period of time will be spent even for performing banknote mix by exhaustion method, thereby achieving rapid and efficient banknote mix. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0037]    In order to make the solutions according to the embodiments of the invention or in the prior art more apparent, the drawings used to describe the embodiments or the prior art will be introduced briefly. Apparently, the drawings described below merely illustrate some of the embodiments of the invention, and those ordinarily skilled in the art can derive from these drawings other drawings without any inventive effort. In the drawings: 
           [0038]      FIG. 1  illustrates a flow chart of a method for banknote mix of a financial self-service device according to an embodiment of the invention; 
           [0039]      FIG. 2  illustrates a flow chart of banknote mix on the equal-emptying principle according to an embodiment of the invention; 
           [0040]      FIG. 3  illustrates a flow chart of banknote mix on the averaging principle according to an embodiment of the invention; 
           [0041]      FIG. 4  illustrates a flow chart of banknote mix on the maximum denomination principle according to an embodiment of the invention; 
           [0042]      FIG. 5  illustrates a flow chart of banknote mix on the minimum denomination principle according to an embodiment of the invention; 
           [0043]      FIG. 6(   a ) illustrates a schematic diagram of mixing and dispensing banknotes on the equal-emptying principle according to an embodiment of the invention; 
           [0044]      FIG. 6(   b ) illustrates a schematic diagram of mixing and dispensing banknotes on the equal-emptying principle according to an embodiment of the invention; 
           [0045]      FIG. 6(   c ) illustrates a schematic diagram of mixing and dispensing banknotes on the equal-emptying principle according to an embodiment of the invention; 
           [0046]      FIG. 6(   d ) illustrates a schematic diagram of mixing and dispensing banknotes on the equal-emptying principle according to an embodiment of the invention; 
           [0047]      FIG. 7(   a ) illustrates a schematic diagram of mixing and dispensing banknotes on the averaging principle according to an embodiment of the invention; 
           [0048]      FIG. 7(   b ) illustrates a schematic diagram of mixing and dispensing banknotes on the averaging principle according to an embodiment of the invention; 
           [0049]      FIG. 7(   c ) illustrates a schematic diagram of mixing and dispensing banknotes on the averaging principle according to an embodiment of the invention; and 
           [0050]      FIG. 7(   d ) illustrates a schematic diagram of mixing and dispensing banknotes on the averaging principle according to an embodiment of the invention. 
       
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
       [0051]    The solutions according to the embodiments of the invention will be clearly and fully described below with reference to the drawings in the embodiments of the invention. Apparently, the embodiments described below are merely some but not all of embodiments of the invention. Any other embodiments that will occur to those ordinarily skilled in the art in light of the embodiments of the invention here shall come into the scope of the invention. 
         [0052]    An embodiment of the invention discloses a method for banknote mix of a financial self-service device to perform rapid and efficient banknote mix. 
         [0053]    Particularly as illustrated in  FIG. 1 , the method for banknote mix of a financial self-service device includes: 
         [0054]    The step S 1  of determining whether an amount of banknotes to be mixed is not larger than an amount of banknotes remaining in banknote boxes of the financial self-service device, and if not, then going to the step S 2 ; otherwise, going to the step S 7 . 
         [0055]    The step S 2  of calculating the least common multiple of denominations of banknotes in the financial self-service device. 
         [0056]    The step S 3  of dividing the amount of banknotes to be mixed by the least common multiple and taking the quotient and the remainder respectively, forming a base and a mantissa. 
         [0057]    The step S 4  of mixing banknotes for the base of the amount of banknotes to be mixed on a banknote mix principle. 
         [0058]    Specifically, the banknote mix principle is any one of equal-emptying principle, averaging principle, maximum denomination principle and minimum denomination principle, and of course, banknotes can be mixed for the base of the amount of banknotes to be mixed alternatively on any other banknote mix principle. 
         [0059]    The step S 5  of taking the sum of the amount of remaining banknotes of the base after the banknote mix and the mantissa of the amount of banknotes to be mixed as a residual, and performing a second banknote mix for the residual on exhaustion method, and if there exists a combination in compliance with the residual, then going to the step S 6  indicating successful banknote mix; otherwise, going to the step S 7  indicating failing banknote mix. 
         [0060]    In the method for banknote mix according to the foregoing embodiment, two results of successful banknote mix and failing banknote mix can be displayed on an interface or indicated with different rings as in the prior art. 
         [0061]    Specifically, in order to improve a successful probability of the method for banknote mix of a financial self-service device, the method can further calculating the numbers of banknotes reserved in the respective banknote boxes of the financial self-service device corresponding to the least common multiple of the denominations of banknotes after the step S 2  is performed. 
         [0062]    The numbers of reserved banknotes are calculated by subtracting 1 from the denominations of the respective banknote boxes of the financial self-service device divided by the least common multiple of the denominations of banknotes. Thus, remaining banknotes can be ensured in the respective banknote boxes of the financial self-service device for subsequent calculation of the residual. 
         [0063]    Furthermore, before the step of calculating the least common multiple of the denominations of banknotes in the financial self-service device, the method for banknote mix of a financial self-service device can further include calculating the greatest common divisor of the denominations of banknotes in the financial self-service device, determining whether the amount of banknotes to be mixed is divisible exactly by the greatest common divisor, and if so, then going on the banknote mix process; otherwise, failing banknote mix. 
         [0064]    A banknote mix method based on four respective banknote mix principles will be detailed below in four embodiments. 
         [0065]    Assumed: 
         [0066]    (1) A financial self-service device is equipped with N (N≧1) banknote boxes; 
         [0067]    (2) Denominations of the banknotes in the respective banknote boxes are indicated by C, (i=1, 2, . . . , N), where the denominations of the banknotes in the respective banknote boxes may or may not be equal; 
         [0068]    (3) The number of banknotes in the respective banknote boxes are indicated by Q, (i=1, 2, . . . , N); and 
         [0069]    (4) An amount of banknotes to be mixed is X, where the amount of banknotes to be mixed is divided into two parts: X=W+E, wherein W denotes a base and E denotes a mantissa. 
         [0070]    The equal-emptying principle is adopted in a first embodiment. 
         [0071]    As illustrated in  FIG. 2 , the method includes: 
         [0072]    The step S 10  of calculating amounts of banknotes remaining in the respective banknote boxes of the financial self-service devices, comparing the amount of banknotes to be mixed with the amounts of banknotes remaining in the respective banknote boxes, and if the amount of banknotes to be mixed is not larger than the sum of the amounts of banknotes remaining in the respective banknote boxes, then going to the step S 11 ; otherwise, going to the step S 19 . 
         [0073]    Specifically, the sum of the amounts of banknotes remaining in the respective banknote boxes is calculated as 
         [0000]    
       
         
           
             S 
             = 
             
               
                 ∑ 
                 
                   i 
                   = 
                   0 
                 
                 N 
               
                
               
                 
                   Q 
                   i 
                 
                 × 
                 
                   
                     C 
                     i 
                   
                   . 
                 
               
             
           
         
       
     
         [0074]    The step S 11  of calculating the largest common divisor of the denominations of banknotes, determining whether the amount of banknotes to be mixed is an integer multiple of the largest common divisor of the denominations of the banknotes in the respective banknote boxes, and if so, then going to the step S 12 ; otherwise, going to the step S 19 . 
         [0075]    Specifically, it is assumed that the largest common divisor is P and it is determined whether X/P is an integer. 
         [0076]    The step S 12  of calculating the least common multiple of the denominations of banknotes in the financial self-service device as Z. 
         [0077]    The step S 13  of calculating the numbers of banknotes reserved in the respective banknote boxes of the financial self-service device corresponding to the least common multiple of the denominations of banknotes. 
         [0078]    Specifically, the numbers of banknotes reserved in the respective banknote boxes are calculated as: 
         [0000]    
       
         
           
             
               
                 Y 
                 i 
               
               = 
               
                 
                   Z 
                   
                     C 
                     i 
                   
                 
                 - 
                 1 
               
             
             , 
             
               
                 ( 
                 
                   
                     i 
                     = 
                     1 
                   
                   , 
                   2 
                   , 
                   ⋯ 
                    
                   
                       
                   
                   , 
                   N 
                 
                 ) 
               
               . 
             
           
         
       
     
         [0079]    The step S 14  of dividing the amount of banknotes to be mixed by the least common multiple and taking the quotient and the remainder respectively, wherein the quotient is the base of the amount of banknotes to be mixed and the remainder is the mantissa of the amount of banknotes to be mixed. 
         [0080]    Specifically, the base of the amount of banknotes to be mixed is calculated as 
         [0000]    
       
         
           
             
               W 
               = 
               
                 
                   ⌊ 
                   
                     X 
                     Z 
                   
                   ⌋ 
                 
                 × 
                 Z 
               
             
             , 
           
         
       
     
         [0000]    and the mantissa of the amount of banknotes to be mixed is calculated as E=X−W. 
         [0081]    The step S 15  of counting the numbers of banknotes in the respective banknote boxes and determining one of the banknote boxes with the largest number of banknotes. 
         [0082]    Specifically, the step S 15  includes: 
         [0083]    (1) Calculating the maximum and the minimum of Q i  (i=1, 2, . . . , N), generally Qj=max{Qi} and Qn=min{Qi}. 
         [0084]    (2) Calculating the difference between Q i  and Q N : V i =Q i −Q N , (i=1,2, . . . , N). 
         [0085]    (3) The following two scenarios exist: 
         [0086]    If 
         [0000]    
       
         
           
             
               Vi 
               &gt; 
               
                 ⌊ 
                 
                   Z 
                   Cn 
                 
                 ⌋ 
               
             
             , 
             
               i 
               = 
               1 
             
             , 
             
               2 
                
               
                   
               
                
               … 
                
               
                   
               
                
               n 
             
             , 
           
         
       
     
         [0000]    then going to the step (4); or 
         [0087]    If 
         [0000]    
       
         
           
             
               Vi 
               &lt; 
               
                 ⌊ 
                 
                   Z 
                   Cn 
                 
                 ⌋ 
               
             
             , 
             
               i 
               = 
               1 
             
             , 
             
               2 
                
               
                   
               
                
               … 
                
               
                   
               
                
               n 
             
             , 
           
         
       
     
         [0000]    then terminating the present step and going to the step S 16 ; 
         [0088]    (4) Calculating the number of dispensed banknotes with the denomination C j  corresponding to Q j  as 
         [0000]    
       
         
           
             
               mj 
               = 
               
                 ⌊ 
                 
                   Z 
                   Cj 
                 
                 ⌋ 
               
             
             ; 
           
         
       
     
         [0089]    (5) If V j ≧m j , then going to (6); otherwise, going to (7); 
         [0090]    (6) Recording the real number of dispensed banknotes with the denomination C j  as M j =M j +m j ; 
         [0091]    (7) Calculating W j =M j C j ,W=W−W j  and Q j =Q j −M j , and going back to (1) of the step S 15 . 
         [0092]    The step S 16  of calculating the number of banknotes dispensed from the banknote box with the largest number of banknotes and dispensing the corresponding numbers of banknotes from the respective banknote boxes. 
         [0093]    Specifically, the step S 16  includes: 
         [0094]    (1) Let k=1, i=1 and M i   k =0; 
         [0095]    (2) Calculating 
         [0000]    
       
         
           
             
               
                 C 
                 min 
               
               = 
               
                 
                   min 
                   C 
                 
                  
                 
                   { 
                   
                     C 
                     i 
                   
                   } 
                 
               
             
             , 
             
               i 
               = 
               1 
             
             , 
             2 
             , 
             ⋯ 
              
             
                 
             
             , 
             N 
             , 
           
         
       
     
         [0000]    so the ideal numbers of dispensed banknotes with the respective denominations are 
         [0000]    
       
         
           
             
               B 
               = 
               
                 ⌊ 
                 
                   Z 
                   
                     C 
                     min 
                   
                 
                 ⌋ 
               
             
             ; 
           
         
       
     
         [0096]    (3) If Q i −M i   k −Y i ≧B, then jumping to (4); otherwise, jumping to (5); 
         [0097]    (4) Recording the number of dispensed banknotes with the denomination C i  as M i   k =M i   k +B. 
         [0098]    (5) i=i+1, and if i&lt;N, then jumping to (3); otherwise, jumping to (6); 
         [0099]    (6) Calculating 
         [0000]    
       
         
           
             
               W 
               k 
             
             = 
             
               
                 ∑ 
                 
                   i 
                   = 
                   1 
                 
                 N 
               
                
               
                 
                   M 
                   i 
                 
                  
                 
                   
                     C 
                     i 
                   
                   . 
                 
               
             
           
         
       
     
         [0000]    Then the following scenarios exists:
       a) If W&gt;W k , then k=k+1 and jumping to (2);   b) If W&lt;W k  , then M i =M i   k−1 , E=E+W−W k−1  and jumping to the step S 18 ;   c) If W=W k , then M i =M i   k  and jumping to the step S 18 .       
 
         [0103]    The step S 17  of calculating the residual, performing a second banknote mix for the residual on exhaustion method, and if there exists a combination in compliance with the residual, then going to the step S 18  indicating successful banknote mix; otherwise, going to the step S 19  indicating failing banknote mix. 
         [0104]    Specifically, the second banknote mix for the residual is calculated by solving the constrained multivariate equation 
         [0000]    
       
         
           
             
               E 
               = 
               
                 
                   ∑ 
                   
                     i 
                     = 
                     1 
                   
                   n 
                 
                  
                 
                   
                     M 
                     i 
                     ′ 
                   
                    
                   
                     C 
                     i 
                   
                 
               
             
             , 
             
               ( 
               
                 
                   M 
                   i 
                   ′ 
                 
                 ≤ 
                 
                   Y 
                   i 
                 
               
               ) 
             
             , 
           
         
       
     
         [0000]    and if solutions exist with the equation, then a set of solutions M′ i , (i=1,2, . . . , N) is taken. At this time, the number of dispensed banknotes with the denomination C i  is M 1 =M′ i +M i , thereby succeeding in banknote mix. 
         [0105]    As illustrated in  FIG. 6(   a ) to  FIG. 6(   d ), each of rectangles represents one of the denominations, and the height of the rectangle represents the number of banknotes with that denomination. The flow of dispensing banknotes on the equal-emptying principle is performed sequentially as in  FIG. 6(   a ) to  FIG. 6(   d ) by shortening firstly the higher rectangles and then the shorter rectangles until the respective rectangles are equal in height where the number of banknotes in the respective banknotes is substantially equal. 
         [0106]    The averaging principle is adopted in a second embodiment, which includes: 
         [0107]    The step S 21  of calculating amounts of banknotes remaining in the respective banknote boxes of the financial self-service devices, comparing the amount of banknotes to be mixed with the amounts of banknotes remaining in the respective banknote boxes, and if the amount of banknotes to be mixed is not larger than the amounts of banknotes remaining in the respective banknote boxes, then going to the step S 22 ; otherwise, going to the step S 29 . 
         [0108]    Specifically, the sum of the amounts of banknotes remaining in the respective banknote boxes, are calculated as 
         [0000]    
       
         
           
             S 
             = 
             
               
                 ∑ 
                 
                   i 
                   = 
                   0 
                 
                 N 
               
                
               
                 
                   Q 
                   i 
                 
                 × 
                 
                   
                     C 
                     i 
                   
                   . 
                 
               
             
           
         
       
     
         [0109]    The step S 22  of calculating the largest common divisor of the denominations of banknotes, determining whether the amount of banknotes to be mixed is an integer multiple of the largest common divisor of the denominations of banknotes, and if so, then going to the step S 23 ; otherwise, going to the step S 29 . 
         [0110]    Specifically, it is assumed that the largest common divisor is P, it is determined whether X/P is an integer. 
         [0111]    The step S 23  of calculating the least common multiple of the denominations of banknotes in the financial self-service device as Z. 
         [0112]    The step S 24  of calculating the numbers of banknotes reserved in the respective banknote boxes of the financial self-service device corresponding to the least common multiple of the denominations of banknotes. 
         [0113]    Specifically, the numbers of banknotes reserved in the respective banknote boxes are calculated as: 
         [0000]    
       
         
           
             
               
                 Y 
                 i 
               
               = 
               
                 
                   Z 
                   
                     C 
                     i 
                   
                 
                 - 
                 1 
               
             
             , 
             
               
                 ( 
                 
                   
                     i 
                     = 
                     1 
                   
                   , 
                   2 
                   , 
                   ⋯ 
                    
                   
                       
                   
                   , 
                   N 
                 
                 ) 
               
               . 
             
           
         
       
     
         [0114]    The step S 25  of dividing the amount of banknotes to be mixed by the least common multiple and taking the quotient and the remainder respectively, wherein the value of multiplying the quotient by the least common multiple is the base of the amount of banknotes to be mixed and the remainder is the mantissa of the amount of banknotes to be mixed. 
         [0115]    Specifically, the base of the amount of banknotes to be mixed is calculated as 
         [0000]    
       
         
           
             
               W 
               = 
               
                 
                   ⌊ 
                   
                     X 
                     Z 
                   
                   ⌋ 
                 
                 × 
                 Z 
               
             
             , 
           
         
       
     
         [0000]    and the mantissa of the amount of banknotes to be mixed is calculated as E=X−W. 
         [0116]    The step S 26  of counting the numbers of banknotes in the respective banknote boxes and calculating the numbers of banknotes dispensed from the respective banknote boxes in a mode of equal numbers of banknotes dispensed from the respective banknote. 
         [0117]    Specifically, the step S 26  includes: 
         [0118]    (1) Let k=1, i=1 and M i   k =0; 
         [0119]    (2) Calculating 
         [0000]    
       
         
           
             
               
                 C 
                 min 
               
               = 
               
                 
                   min 
                   C 
                 
                  
                 
                   { 
                   
                     C 
                     i 
                   
                   } 
                 
               
             
             , 
             
               i 
               = 
               1 
             
             , 
             2 
             , 
             ⋯ 
              
             
                 
             
             , 
             N 
             , 
           
         
       
     
         [0000]    so the ideal numbers of dispensed banknotes with the respective denominations are 
         [0000]    
       
         
           
             
               B 
               = 
               
                 ⌊ 
                 
                   Z 
                   
                     C 
                     min 
                   
                 
                 ⌋ 
               
             
             ; 
           
         
       
     
         [0120]    (3) If Q i −M i   k −Y i ≧B, then jumping to (4); otherwise, jumping to (5); 
         [0121]    (4) Recording the number of dispensed banknotes with the denomination C i  as M i   k =M i   k +B. 
         [0122]    (5) i=i+1, and if i&lt;N, then jumping to (3); otherwise, jumping to (6); 
         [0123]    (6) Calculating 
         [0000]    
       
         
           
             
               W 
               k 
             
             = 
             
               
                 ∑ 
                 
                   i 
                   = 
                   1 
                 
                 N 
               
                
               
                 
                   M 
                   i 
                 
                  
                 
                   
                     C 
                     i 
                   
                   . 
                 
               
             
           
         
       
     
         [0000]    Then the following scenarios exists: 
         [0124]    a) If W&gt;W k , then k=k+1 and jumping to (2); 
         [0125]    b) If W&lt;W k , then M i =M i   k−1 , E=E+W−W k−1  and jumping to the step S 27 ; 
         [0126]    c) If W=W k , then M i =M i   k  and jumping to the step S 27 . 
         [0127]    The step S 27  of calculating the residual, performing a second banknote mix for the residual on exhaustion method, and if there exists a combination in compliance with the residual, then going to the step S 28  indicating successful banknote mix; otherwise, going to the step S 29  indicating failing banknote mix. 
         [0128]    Specifically, the second banknote mix for the residual is calculated by solving the constrained multivariate equation 
         [0000]    
       
         
           
             
               E 
               = 
               
                 
                   ∑ 
                   
                     i 
                     = 
                     1 
                   
                   n 
                 
                  
                 
                   
                     M 
                     i 
                     ′ 
                   
                    
                   
                     C 
                     i 
                   
                 
               
             
             , 
             
               ( 
               
                 
                   M 
                   i 
                   ′ 
                 
                 ≤ 
                 
                   Y 
                   i 
                 
               
               ) 
             
             , 
           
         
       
     
         [0000]    and if solutions exist with the equation, then a set of solutions M′ i , (i=1,2, . . . , N) is taken. At this time, the number of dispensed banknotes with the denomination C i  is M i =M′ i +M i , thereby succeeding in banknote mix. 
         [0129]    As illustrated in  FIG. 7(   a ) to  FIG. 7(   d ), also each of rectangles represents one of the denominations, and the height of the rectangle represents the number of banknotes with that denomination. The flow of dispensing banknotes on the averaging principle is performed sequentially as in  FIG. 7(   a ) to  FIG. 7(   d ) by excluding blocks with equal heights (i.e., equal numbers of bank notes) from the respective rectangles from top to bottom. 
         [0130]    The maximum denomination principle is adopted in a third embodiment, which includes: 
         [0131]    The step S 31  of calculating amounts of banknotes remaining in the respective banknote boxes of the financial self-service devices, comparing the amount of banknotes to be mixed with the amounts of banknotes remaining in the respective banknote boxes, and if the amount of banknotes to be mixed is not larger than the sum of the amounts of banknotes remaining in the respective banknote boxes, then going to the step S 32 ; otherwise, going to the step S 38 . 
         [0132]    Specifically, the sum of the amounts of banknotes remaining in the respective banknote boxes is calculated as 
         [0000]    
       
         
           
             S 
             = 
             
               
                 ∑ 
                 
                   i 
                   = 
                   0 
                 
                 N 
               
                
               
                 
                   Q 
                   i 
                 
                 × 
                 
                   
                     C 
                     i 
                   
                   . 
                 
               
             
           
         
       
     
         [0133]    The step S 32  of calculating the largest common divisor of the denominations of banknotes, determining whether the amount of banknotes to be mixed is an integer multiple of the largest common divisor of the denominations of banknotes, and if so, then going to the step S 33 ; otherwise, going to the step S 39 . 
         [0134]    Specifically, it is assumed that the largest common divisor is P and it is determined whether X/P is an integer. 
         [0135]    The step S 33  of calculating the least common multiple of the denominations of banknotes in the financial self-service device as Z. 
         [0136]    The step S 34  of calculating the numbers of banknotes reserved in the respective banknote boxes of the financial self-service device corresponding to the least common multiple of the denominations of banknotes. 
         [0137]    Specifically, the numbers of banknotes reserved in the respective banknote boxes are calculated as: 
         [0000]    
       
         
           
             
               
                 Y 
                 i 
               
               = 
               
                 
                   Z 
                   
                     C 
                     i 
                   
                 
                 - 
                 1 
               
             
             , 
             
               ( 
               
                 
                   i 
                   = 
                   1 
                 
                 , 
                 2 
                 , 
                 … 
                  
                 
                     
                 
                 , 
                 N 
               
               ) 
             
           
         
       
     
         [0138]    The step S 35  of dividing the amount of banknotes to be mixed by the least common multiple and taking the quotient and the remainder respectively, wherein the value of multiplying the quotient by the least common multiple is the base of the amount of banknotes to be mixed and the remainder is the mantissa of the amount of banknotes to be mixed. 
         [0139]    Specifically, the base of the amount of banknotes to be mixed is calculated as 
         [0000]    
       
         
           
             
               W 
               = 
               
                 
                   ⌊ 
                   
                     X 
                     Z 
                   
                   ⌋ 
                 
                 × 
                 Z 
               
             
             , 
           
         
       
     
         [0000]    and the mantissa of the amount of banknotes to be mixed is calculated as E=X−W. 
         [0140]    The step S 36  of counting the numbers of banknotes in the respective banknote boxes, calculating the number of banknotes dispensed from the banknote boxes with the largest denomination of banknotes and dispensing the corresponding numbers of banknotes from the respective banknote boxes. 
         [0141]    Specifically, the step S 36  includes: 
         [0142]    (1) k=0; 
         [0143]    (2) Calculating 
         [0000]    
       
         
           
             
               
                 C 
                 j 
               
               = 
               
                 
                   max 
                   C 
                 
                  
                 
                   { 
                   
                     
                       C 
                       i 
                     
                      
                     
                       
                         C 
                         i 
                       
                       ∈ 
                       C 
                     
                   
                   } 
                 
               
             
             , 
           
         
       
     
         [0000]    so the ideal number of dispensed banknotes with the denomination C j  is 
         [0000]    
       
         
           
             
               B 
               = 
               
                 ⌊ 
                 
                   W 
                   
                     C 
                     j 
                   
                 
                 ⌋ 
               
             
             ; 
           
         
       
     
         [0144]    (3) If Q j −Y j ≧B, then going to (4); otherwise, going to (5); 
         [0145]    (4) Calculating the number of dispensed banknotes with the denomination C j  as M j =B, and going to the step S 36 . 
         [0146]    (5) Calculating the number of dispensed banknotes with the denomination C j  as M j =Q j −Y j , and calculating W j =M j ×C j  and W=W−W j . 
         [0147]    (6) Excluding C j  from the queue C, i.e., C={C i |i≠j,i=1,2, . . . , N}. 
         [0148]    (7) k=k+1. If k&lt;N, then performing (2) again; otherwise, E=E+W and going to the step S 36 . 
         [0149]    The step S 37  of calculating the residual, performing a second banknote mix for the residual on the exhaustion method, and if there exists a combination in compliance with the residual, then going to the step S 38  indicating successful banknote mix; otherwise, going to the step S 39  indicating failing banknote mix. 
         [0150]    Specifically, the second banknote mix for the residual is calculated by solving the constrained multivariate equation 
         [0000]    
       
         
           
             
               E 
               = 
               
                 
                   ∑ 
                   
                     i 
                     = 
                     1 
                   
                   n 
                 
                  
                 
                   
                     M 
                     i 
                     ′ 
                   
                    
                   
                     C 
                     i 
                   
                 
               
             
             , 
             
               ( 
               
                 
                   M 
                   i 
                   ′ 
                 
                 ≤ 
                 
                   Y 
                   i 
                 
               
               ) 
             
             , 
           
         
       
     
         [0000]    and if solutions exist with the equation, then a set of solutions M′ i , (i=1,2, . . . , N) is taken. At this time, the number of dispensed banknotes with the denomination C i  is M i =M′ i +M i , thereby succeeding in banknote mix. 
         [0151]    The minimum-par-value principle is adopted in a fourth embodiment, which includes: 
         [0152]    The step S 41  of calculating amounts of banknotes remaining in the respective banknote boxes of the financial self-service devices, comparing the amount of banknotes to be mixed with the amounts of banknotes remaining in the respective banknote boxes, and if the amount of banknotes to be mixed is smaller than the amounts of banknotes remaining in the respective banknote boxes, then going to the step S 42 ; otherwise, going to the step S 48 . 
         [0153]    Specifically, the sum of the amounts of banknotes remaining in the respective banknote boxes, are calculated as 
         [0000]    
       
         
           
             S 
             = 
             
               
                 ∑ 
                 
                   i 
                   = 
                   0 
                 
                 N 
               
                
               
                 
                   Q 
                   i 
                 
                 × 
                 
                   
                     C 
                     i 
                   
                   . 
                 
               
             
           
         
       
     
         [0154]    The step S 42  of calculating the largest common divisor of the denominations of banknotes, determining whether the amount of banknotes to be mixed is an integer multiple of the largest common divisor of the denominations of banknotes, and if so, then going to the step S 43 ; otherwise, going to the step S 49 . 
         [0155]    Specifically, it is assumed that the largest common divisor is P, it is determined whether X/P is an integer. 
         [0156]    The step S 43  of calculating the least common multiple of the denominations of banknotes in the financial self-service device as Z. 
         [0157]    The step S 44  of calculating the numbers of banknotes reserved in the respective banknote boxes of the financial self-service device corresponding to the least common multiple of the denominations of banknotes. 
         [0158]    Specifically, the numbers of banknotes reserved in the respective banknote boxes are calculated as: 
         [0000]    
       
         
           
             
               
                 Y 
                 i 
               
               = 
               
                 
                   Z 
                   
                     C 
                     i 
                   
                 
                 - 
                 1 
               
             
             , 
             
               
                 ( 
                 
                   
                     i 
                     = 
                     1 
                   
                   , 
                   2 
                   , 
                   … 
                    
                   
                       
                   
                   , 
                   N 
                 
                 ) 
               
               . 
             
           
         
       
     
         [0159]    The step S 45  of dividing the amount of banknotes to be mixed by the least common multiple and taking the quotient and the remainder respectively, wherein the value of multiplying the quotient by the least common multiple is the base of the amount of banknotes to be mixed and the remainder is the mantissa of the amount of banknotes to be mixed. 
         [0160]    Specifically, the base of the amount of banknotes to be mixed is calculated as 
         [0000]    
       
         
           
             
               W 
               = 
               
                 
                   ⌊ 
                   
                     X 
                     Z 
                   
                   ⌋ 
                 
                 × 
                 Z 
               
             
             , 
           
         
       
     
         [0000]    and the mantissa of the amount of banknotes to be mixed is calculated as E=X−W. 
         [0161]    The step S 46  of counting the numbers of banknotes in the respective banknote boxes, calculating the number of banknotes dispensed from the banknote boxes with the smallest denomination of banknotes and dispensing the corresponding numbers of banknotes from the respective banknote boxes. 
         [0162]    Specifically, the step S 46  includes: 
         [0163]    (1) k=0; 
         [0164]    (2) Calculating 
         [0000]    
       
         
           
             
               
                 C 
                 j 
               
               = 
               
                 
                   min 
                   C 
                 
                  
                 
                   { 
                   
                     
                       C 
                       i 
                     
                      
                     
                       
                         C 
                         i 
                       
                       ∈ 
                       C 
                     
                   
                   } 
                 
               
             
             , 
           
         
       
     
         [0000]    so the ideal number of dispensed banknotes with the denomination C j  is 
         [0000]    
       
         
           
             
               B 
               = 
               
                 ⌊ 
                 
                   W 
                   
                     C 
                     j 
                   
                 
                 ⌋ 
               
             
             ; 
           
         
       
     
         [0165]    (3) If Q j −Y j ≧B, then going to (4); otherwise, going to (5); 
         [0166]    (4) Calculating the number of dispensed banknotes with the denomination C j  as M j =B, and going to the step S 46 . 
         [0167]    (5) Calculating the number of dispensed banknotes with the denomination C j  as M j =Q j −Y j , calculating W j =M j ×C j  and W=W−W j . 
         [0168]    (6) Excluding C j  from the queue C, i.e., C={C i  |i≠j,i=1,2, . . . , N}. 
         [0169]    (7) k=k+1. If k&lt;N, then performing (2) again; otherwise, E=E+W and going to the step S 46 . 
         [0170]    The step S 47  of calculating the residual, performing a second banknote mix for the residual on exhaustion method, and if there exists a combination in compliance with the residual, then going to the step S 48  indicating successful banknote mix; otherwise, going to the step S 49  indicating failing banknote mix. 
         [0171]    Specifically, the second banknote mix for the residual is calculated by solving the constrained multivariate equation 
         [0000]    
       
         
           
             
               E 
               = 
               
                 
                   ∑ 
                   
                     i 
                     = 
                     1 
                   
                   n 
                 
                  
                 
                   
                     M 
                     i 
                     ′ 
                   
                    
                   
                     C 
                     i 
                   
                 
               
             
             , 
             
               ( 
               
                 
                   M 
                   i 
                   ′ 
                 
                 ≤ 
                 
                   Y 
                   i 
                 
               
               ) 
             
             , 
           
         
       
     
         [0000]    and if solutions exist with the equation, then a set of solutions M′ i , (i=1,2, . . . , N) is taken. At this time, the number of dispensed banknotes with the denomination C i  is M i =M′ i +M i , thereby succeeding in banknote mix. 
         [0172]    The foregoing description of the disclosed embodiments enables those skilled in the art to practice or use the invention. Various modifications to these embodiments will become apparent to those skilled in the art, and the general principle defined in the invention can be practiced in other embodiments without departing from the spirit or scope of the invention. Accordingly, the invention will not be limited to these embodiments ad indicated here but shall be accorded with the broadest scope in consistency with the principle and novel features disclosed here.