In college music teaching, the understanding and mastering of harmony and melody is an important part of the music teaching. From the point of the development of music, student can learn the relation between harmony and music, and necessary connection between melody and harmony that is a foundation of the development of college music teaching. As an essential part of musical creation, harmony can influence the overall creative inspiration. From the musical creation, we can find that harmony in the end of the music can determine the nature of the music. So the search and algorithm of harmony is significant. This thesis is based on the necessary connection between melody and harmony in college music teaching, and emphasizes on the collecting algorithm in harmony teaching and to reflect the application of harmony and melody in college music teaching.