Aiming to such the problems that sparse data and poor calculation of score similarity result in low quality of recommendation, a collaborative filtering recommendation algorithm based on distribution of user interest density is proposed in the paper. After calculating the similarity of items, classification and entropy are calculated to get finally similarity between two items. Parzen window estimation is applied to get user interest density distribution in total item space. Finally user's attribute similarity and relative entropy are used to determine nearest neighbour user set. Experimental result shows that the algorithm effectively raises recommendation quality of spare data while avoiding error of filling data.