Since 1999 we have developed three approaches to quantifying each amino acid in a protein as well as a protein in whole based on random mechanisms. With our approaches, we can reliably describe the evolution of a protein family, for example, the hemagglutinins from influenza A viruses along the time course in a 2-dimensional graph, and then we use the fast Fourier transform to find the mutation periodicity in order to time the mutation. In this study, we realize that the changes in quantified randomness in a hemagglutinin family over time is the difference between randomness associated with mutant amino acids and randomness associated with original amino acids. This is a standard mass-balance relationship, by which we can build a differential equation for a hemagglutinin family or a system of differential equations for all hemagglutinins in the family. In this context, the randomness defined by us actually is the entropy, thus we have a general model to describe the evolution, namely, the evolution is the exchange of entropy between protein family and environment through mutations quantified using our approaches.