Estimation of distribution algorithms (EDAs) are stochastic optimization methods that guide the search by building and sampling probabilistic models. Inspired by Bayesian inference, we proposed a two-level hierarchical model based on beta distribution. Beta distribution is the conjugate priori for binomial distribution. Besides, we introduced a learning rate function into the framework to control the model update. To demonstrate the effectiveness and applicability of our proposed algorithm, experiments are carried out on the 01-knapsack problems. Experimental results show that the proposed algorithm outperforms cGA, PBIL and QEA.