Based on such shortcomings in studies on query by humming , we did some work as followed : in the module of building a melody database , reduced the data that needed to be calculated by extracting the repeating patterns in the songs , and proposed an improved repeating - pattern - tree ( rp - tree ) algorithm , with much better performance ; in the melody extraction module , firstly extracted the sequence of the pitches , then removed some wrong points and reduced the number of dimensions in sequence of pitches in some way after which a time series of pitches was generated ; in the melody matching module , analyzed four familiar errors that occur to the humming and the requirement to the search algorithm , by which we designed a retrieval method of dynamic time warping ( dtw ) algorithm based on n - gram index ; implemented a prototype system , and after doing the experiments , we got a top ten hit of 94 % 本文针对以上哼唱音乐检索研究中的不足,进行了如下工作:在建立旋律库模块,通过提取乐曲的重复模式来减少旋律匹配的计算量,提出了重复模式树( repeating - pattern - tree , rp - tree )算法的改进算法,大幅度提高了重复模式提取算法的性能;在连续哼唱输入的旋律提取模块,采用了先提取基频轨迹,再对基频轨迹进行去除错误点以及降维操作的方法,生成了音高时间序列;在旋律匹配模块,分析了哼唱输入可能具有的四种常见错误以及对检索算法的要求,设计了基于n - gram索引的动态时间弯折( dynamictimewarping , dtw )检索算法;最终实现了一个哼唱检索的原型系统,通过实验,达到了94 %的前十名命中率。