Data sparsity is one of the most challenges for traditional collaborative filtering algorithms. Transfer learning methods used the potential relationship between the target domain and the auxiliary domain to transfer the auxiliary domain knowledge, so as to improve the recommendation accuracy of the target domain. The existing transfer model based on similarity generally used only the rating information, and ignores the difference of user rating. To solve these problems, a transfer model based on comprehensive similarity is proposed, used user rating information and user attribute information, taking account of the difference of user rating, used the consistency of ratings, distribution to measure user rating similarity, improved the accuracy of similarity computation, thus improved the quality of data migration. Experimental results showed that the proposed model can effectively alleviate the sparsity of data compared with other algorithms.