KR20090083972A - Method for building music database for music search, method and apparatus for searching music based on humming query - Google Patents

Method for building music database for music search, method and apparatus for searching music based on humming query Download PDF

Info

Publication number
KR20090083972A
KR20090083972A KR1020080009865A KR20080009865A KR20090083972A KR 20090083972 A KR20090083972 A KR 20090083972A KR 1020080009865 A KR1020080009865 A KR 1020080009865A KR 20080009865 A KR20080009865 A KR 20080009865A KR 20090083972 A KR20090083972 A KR 20090083972A
Authority
KR
South Korea
Prior art keywords
music
melody
character string
index
feature data
Prior art date
Application number
KR1020080009865A
Other languages
Korean (ko)
Inventor
박상현
유진희
박치현
노홍찬
Original Assignee
연세대학교 산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 연세대학교 산학협력단 filed Critical 연세대학교 산학협력단
Priority to KR1020080009865A priority Critical patent/KR20090083972A/en
Publication of KR20090083972A publication Critical patent/KR20090083972A/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/60Information retrieval; Database structures therefor; File system structures therefor of audio data
    • G06F16/61Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/60Information retrieval; Database structures therefor; File system structures therefor of audio data
    • G06F16/63Querying
    • G06F16/632Query formulation
    • G06F16/634Query by example, e.g. query by humming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/60Information retrieval; Database structures therefor; File system structures therefor of audio data
    • G06F16/68Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/683Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content

Abstract

A method and an apparatus for improving searching speed of searching music by minimizing an access of database are provided to guarantee the accuracy of search when uncertain query such as humming is inputted. A music file is inputted(110). A feature data showing a melody is extracted(120). The extracted feature data as described above is transformed to the character string(130). The transformed character string as described above is stored as a first index in which it becomes the basis of the search(140). The character string showing the meaningful melody from the transformed character string as described above is extracted. The extracted character string as described above is stored as the based second index of search(150).

Description

음악 검색을 위한 음악 데이터이스 구축 방법, 허밍 질의를 입력으로 하여 음악을 검색하는 방법 및 장치{Method for building music database for music search, method and apparatus for searching music based on humming query}Method for building music database for music search, method and apparatus for searching music based on humming query}

본 발명은 음악 검색에 관한 것으로, 보다 상세하게는 음악 검색을 위한 음악 데이터이스 구축 방법, 허밍 질의를 입력으로 하여 음악을 검색하는 방법 및 장치에 관한 것이다. The present invention relates to a music search, and more particularly, to a music database construction method for music search, and a method and apparatus for searching music by inputting a humming query.

현재 내용 기반 음악 정보 검색 시스템에서 질의 특성에 따라 효과적인 특징 데이터를 찾는 연구가 활발히 진행되고 있다. 이는 음표의 정확한 높이와 길이를 가진 원 음악과 같은 정확한 질의를 처리하기 위한 것과 허밍과 같은 부정확한 질의를 처리하기 위한 것으로 나뉘어진다. Currently, researches to find effective feature data according to query characteristics in content-based music information retrieval system are actively conducted. It is divided into those for processing exact queries such as original music with the exact height and length of notes and those for processing incorrect queries such as hum.

[1]에서 제안한 시스템에서 멜로디를 표현하기 위해 일반적으로 사용되는 특징 데이터로 'UDS' 문자열이 있는데 이는 인접한 두 음표의 높이를 사용하여 뒤의 음표가 앞의 음표보다 높으면 'U(Up)', 낮으면 'D(Down)', 같으면 'S(Same)' 로 표현한다. 그러나 이와 같은 데이터는 단지 음 높이의 곡선을 이용할 뿐 음의 길이는 무시한 정보이므로 정확도 측면에서 효율적이지 않다. 또 다른 허밍 질의 처리 시 스템으로는 음악의 템포 (Tempo)를 사용하여 검색하는 방법이 있다[2]. 그러나 템포 데이터도 많은 특징 정보를 가지고 있지 않기 때문에 부정확한 허밍을 처리할 경우 정확도가 떨어지게 된다. In the system proposed in [1], feature data commonly used to express melodies is the string 'UDS', which uses the heights of two adjacent notes, so that when the next note is higher than the previous note, the 'U (Up)', If it is low, it is expressed as 'D (Down)' and if it is equal to 'S (Same)'. However, this data is not efficient in terms of accuracy because it only uses a curve of pitch and ignores the length of pitch. Another humming query processing system is the search using the tempo of music [2]. However, since the tempo data does not have much feature information, the accuracy is inferior when the incorrect humming is processed.

음악 정보 검색과 관련된 또 다른 연구 활동으로는 효율적인 인덱스 구조에 관한 것이 있다. 이러한 연구가 활발한 이유는 방대한 음악 데이터베이스를 순차적으로 검색함으로써 발생하는 오랜 검색 시간과 방대한 비교 계산 량을 줄이기 위해서이다. 이를 보완하기 위한 기존의 대표적인 인덱스 방법으로 N-gram이 있다[3]. 이 방법은 N개의 음표들을 하나의 단위로 취급하여 한 음표씩 오른쪽으로 이동시키며 인덱싱하는 방법으로 이는 크기가 N인 슬라이딩 윈도우 (Sliding Window)와 같은 개념이다. 이러한 인덱스 설계 방식으로 인하여 N-gram은 인덱스 크기가 크고 검색 비용 면에서 좋지 않은 성능을 보인다. 또한 검색 속도를 향상시키기 위해 숫자 형태의 특징 데이터를 문자열로 변환하지만 이는 부정확한 멜로디인 허밍의 특징을 고려하지 않은 문자열로서 질의가 부정확할수록 정확도가 급격히 떨어지게 된다. 또 다른 인덱스 방법으로는 공간 접근 방식 (Spatial Access Method)을 사용하는 경우가 있다[4]. 이 방법은 한 음표의 높이와 길이 정보를 이용하여 이를 2차원 공간상의 하나의 점으로 표현한 후 연속된 점들의 위치 정보를 인덱싱하는 방법이다. 대표적으로 R-Tree를 사용하는 방법이 있는데, 이는 검색 속도가 빠르지만 질의를 포함한 최소 영역 사각형 (Minimum Bounding Rectangle)안에 질의와 거리가 가까운 음악들이 많이 나타나기 때문에 정선도(Selectivity)가 좋지 않다는 단점을 가지고 있다. Another research activity related to music information retrieval involves efficient index structures. This research is active in order to reduce the long search time and the large amount of comparative calculations caused by the sequential search of large music databases. To solve this problem, there is N-gram as a typical index method [3]. This method treats N notes as a unit and indexes them by moving them to the right one by one. This is similar to the sliding window of size N. Due to this index design method, N-gram has a large index size and poor performance in terms of search cost. Also, to improve the search speed, the feature data in numeric form is converted into a string, but this is a character string that does not take into account the characteristics of the incorrect melody Humming. As the query is incorrect, the accuracy drops sharply. Another indexing method is the use of a spatial access method [4]. This method uses height and length information of a note to express it as a point in two-dimensional space, and then index the location information of consecutive points. Representative method is to use R-Tree, which means that the search speed is fast but the selectivity is not good because many musics appear near the query in the minimum bounding rectangle including the query. Have.

음악 정보 검색에서 사용되는 내용 기반 인덱싱 기법은 음악의 특정 멜로디를 인덱싱하여 검색 속도를 줄이는 방법이 대부분이다. 이는 한 음악에서 어떤 부분의 멜로디를 인덱싱하느냐에 따라 음악 검색 시스템의 성능이 달라지기 때문에 성능을 향상시킬 수 있는 의미 있는 멜로디를 선택하는 것이 중요하다. 대표적으로 음악의 시작 부분을 인덱싱 함으로써 검색 속도를 향상시킨 방법이 있다[5]. 이는 사용자가 음악의 시작 부분을 자주 질의할 가능성이 높다는 것을 이용하였다. 그러나 이 방법은 사용자가 음악의 시작 부분을 질의하지 않을 경우 빠른 검색 속도를 보장하지 못한다. 또한 사용자가 음악의 시작 부분을 자주 질의한다는 것에 대한 충분한 근거를 제시하지 못하였다. 또 다른 내용 기반 인덱싱 방법으로는 일정하게 반복된 멜로디를 인덱싱한 연구가 있다[6]. 그러나 이 방법은 일정한 단위 없이 반복 멜로디를 찾기 때문에 반복 멜로디 추출 과정이 너무 복잡하고 후보 빈번 멜로디가 많이 발생하여 인덱스 크기가 커지는 단점을 가지고 있다. 앞의 두 방법과는 반대로 데이터베이스에 저장된 음악을 인덱싱하지 않고 사용자의 질의를 인덱싱하는 방법이 있다[7]. 이 방법은 사용자 질의 멜로디가 입력되면 이를 'UDS' 문자열로 변환한 후 질의들을 서로 비교하여 자주 질의되는 멜로디를 인덱싱하는 방법이다. 이는 사용자가 자주 질의한 음악은 빠르게 검색해 주는 장점을 가지고 있지만 만약 자주 질의하지 않는 멜로디가 입력이 되면 데이터베이스에 직접 접근해야 하는 단점이 있다. 또한 음의 박자를 고려하지 않고 음 높이의 곡선만을 이용한 'UDS' 문자열 방법을 사용하였기 때문에 정확도 측면에서 낮은 성능을 나타낸다.The content-based indexing technique used in music information retrieval is a method of indexing a specific melody of music to reduce the search speed. Since the performance of the music search system depends on which part of the melody is indexed in a piece of music, it is important to select a meaningful melody that can improve performance. Typically, there is a method of improving the search speed by indexing the beginning of music [5]. This exploited the possibility that the user would frequently query the beginning of the music. However, this method does not guarantee fast search speed unless the user queries the beginning of the music. It also failed to provide sufficient evidence that the user frequently asked the beginning of the music. Another content-based indexing method is the study of indexing cyclically repeated melodies [6]. However, this method has the disadvantage that the repetitive melody extraction process is too complicated and many candidate frequent melodies are generated because the melody is searched without a certain unit, and the index size becomes large. In contrast to the previous two methods, there is a method of indexing a user's query without indexing music stored in a database [7]. In this method, when a user's query melody is input, it is converted into a 'UDS' string and the queries are compared with each other to index the frequently asked melody. This has the advantage of quickly searching for music that is frequently queried by the user. However, if a melody that is not frequently queried is input, the database has to be accessed directly. In addition, it shows low performance in terms of accuracy because the 'UDS' string method using only the curve of the pitch is not considered.

<참고 문헌><References>

[1] N. Kosugi, Y. Nishihara, T. Sakata, M. Yamamuro and K. Kushima, "A Practical Query-By-Humming System for a Large Music Database", In Proc. ACM Multimedia, pp. 333-342, 2000.[1] N. Kosugi, Y. Nishihara, T. Sakata, M. Yamamuro and K. Kushima, "A Practical Query-By-Humming System for a Large Music Database", In Proc. ACM Multimedia, pp. 333-342, 2000.

[2] E. Scheirer, "Tempo and Beat Analysis of Acoustic Musical Signals", Acoustic Society of America, 103:1 January, pp. 588-601, 1998. [2] E. Scheirer, "Tempo and Beat Analysis of Acoustic Musical Signals", Acoustic Society of America, 103: 1 January, pp. 588-601, 1998.

[3] A. Pienimaki, "Indexing Music Databases Using Automatic Extraction of Frequent Phrases", In Proc. 3rd International Symposium on Music Information Retrieval (ISMIR), pp. 25-30, 2002. [3] A. Pienimaki, "Indexing Music Databases Using Automatic Extraction of Frequent Phrases", In Proc. 3rd International Symposium on Music Information Retrieval (ISMIR), pp. 25-30, 2002.

[4] J. Reiss, J. Aucouturier and M. Sandler, "Efficient multidimensional searching routines for music information retrieval", In Proc. 2nd International Symposium on Music Information Retrieval (ISMIR),, pp. 163-171, 2001.[4] J. Reiss, J. Aucouturier and M. Sandler, "Efficient multidimensional searching routines for music information retrieval", In Proc. 2nd International Symposium on Music Information Retrieval (ISMIR) ,, pp. 163-171, 2001.

[5] S. Doraisamy, S. Ruger, "Robust polyphonic music retrieval with n-grams", Journal of Intelligent Information Systems, 21:1, pp. 53-70, 2002.[5] S. Doraisamy, S. Ruger, "Robust polyphonic music retrieval with n-grams", Journal of Intelligent Information Systems, 21: 1, pp. 53-70, 2002.

[6] C. Liu, J. Hsu and A. L. P. Chen, "Efficient Theme and Non-trivial Repeating Pattern Discovering in Music Databases". In Proc. 15th International Conference on Data Engineering (ICDE '99), pp. 14-21, 1999.[6] C. Liu, J. Hsu and A. L. P. Chen, "Efficient Theme and Non-trivial Repeating Pattern Discovering in Music Databases". In Proc. 15th International Conference on Data Engineering (ICDE '99), pp. 14-21, 1999.

[7] 노승민, 박동문, 황인준, "사용자 질의 패턴을 이용한 효율적인 오디오 색인 기법", 한국 정보과학회 논문지, 제31권, 제1호, pp.143-153, 2004.[7] Seung-Min Roh, Dong-Moon Park, In-Jun Hwang, "Efficient Audio Indexing Technique Using User Query Pattern", Journal of Korean Information Science Society, Vol. 31, No. 1, pp.143-153, 2004.

본 발명이 이루고자 하는 기술적 과제는 허밍과 같은 부정확한 질의가 입력되더라도 검색의 정확도를 보장할 수 있고, 데이터베이스의 접근을 최소화함으로써 사용자가 찾고자 하는 음악을 검색하는 검색 속도를 향상시킬 수 있는, 음악 검색을 위한 음악 데이터이스 구축 방법을 제공하는 데 있다.The technical problem to be achieved by the present invention is to guarantee the accuracy of the search even if an incorrect query, such as humming, and to minimize the access to the database, music search, which can improve the speed of searching for music to find the user The present invention provides a method for building a music database.

본 발명이 이루고자 하는 다른 기술적 과제는, 허밍과 같은 부정확한 질의가 입력되더라도 검색의 정확도를 보장할 수 있고, 데이터베이스의 접근을 최소화함으로써 검색 속도를 향상시킬 수 있는, 허밍 질의를 입력으로 하여 음악을 검색하는 방법 및 장치를 제공하는 데 있다.Another technical problem to be solved by the present invention is to secure music by inputting a humming query, which can guarantee the accuracy of a search even when an incorrect query such as a humming is input, and improve the speed of the search by minimizing access to a database. To provide a method and apparatus for searching.

상기 기술적 과제를 해결하기 위하여 본 발명에 따른, 음악 검색을 위한 음악 데이터베이스 구축 방법은, (a) 음악 파일을 입력받아 멜로디를 나타내는 특징 데이터를 추출하는 단계; (b) 상기 추출된 특징 데이터를 문자열로 변환하는 단계; (c) 상기 변환된 문자열을 검색의 기초가 되는 제1 인덱스로 저장하는 단계; 및 (d) 상기 변환된 문자열로부터 의미 있는 멜로디를 나타내는 문자열을 추출하여 검색의 기초가 되는 제2 인덱스로 저장하는 단계를 포함하는 것을 특징으로 한다.According to an aspect of the present invention, there is provided a music database construction method for music search, comprising: (a) receiving a music file and extracting feature data representing a melody; (b) converting the extracted feature data into a character string; (c) storing the converted string as a first index on which a search is based; And (d) extracting a character string representing a meaningful melody from the converted character string and storing the character string representing a meaningful melody as a second index which is a basis of a search.

여기서, 상기 특징 데이터는 연속된 음표 간의 높이의 변화량과 길이의 변화율을 포함하는 것이 바람직하다. 이때, 상기 (b) 단계는, 상기 높이의 변화량과 상기 길이의 변화율의 조합을 소정 규칙에 따라 문자에 대응시킴으로써 상기 특징 데이터를 문자열로 변환하는 것이 바람직하다. 또한, 상기 (b) 단계는, 상기 높이의 변화량과 상기 길이의 변화율을 각 축으로 하는 2차원 공간을 복수 개의 구역으로 나누어, 동일한 구역에 속하는 상기 높이의 변화량과 상기 길이의 변화율의 조합을 동일한 문자에 대응시키는 것이 바람직하다.Here, the feature data preferably includes an amount of change in height and a rate of change in length between consecutive notes. At this time, in the step (b), it is preferable to convert the feature data into a character string by matching the combination of the change amount of the height and the change rate of the length to a character according to a predetermined rule. In the step (b), the two-dimensional space having the change amount of the height and the change rate of the length as each axis is divided into a plurality of zones, and the combination of the change amount of the height and the change rate of the length belonging to the same zone is the same. It is preferable to correspond to letters.

그리고, 상기 (c) 단계 및 상기 (d) 단계에서, 상기 문자열의 저장은 서픽스 트리(suffix tree) 형태로 저장하는 것이 바람직하다.In the step (c) and the step (d), the storage of the character string is preferably stored in the form of a suffix tree.

또한, 상기 (d) 단계는, (d1) 상기 의미 있는 멜로디를 나타내는 문자열로서, 하나의 음악에서 빈번하게 발생되는 멜로디인 빈번 멜로디를 나타내는 문자열을 추출하여 검색의 기초가 되는 제2-1 인덱스로 저장하는 단계; 또는 (d2) 상기 의미 있는 멜로디를 나타내는 문자열로서, 소정 길이 이상의 쉼표를 경계로 나누어지는 멜로디를 나타내는 문자열을 추출하여 검색의 기초가 되는 제2-2 인덱스로 저장하는 단계를 포함하는 것이 바람직하다.In addition, the step (d), (d1) is a character string representing the meaningful melody, and extracts a character string representing a frequent melody that is a melody frequently generated in one music to the 2-1 index that is the basis of the search Storing; Or (d2) extracting a string representing a melody divided by a comma of a predetermined length or more as a string representing the meaningful melody and storing the extracted string as a 2-2 index on which the search is based.

이때, 상기 (d1) 단계는, (d11) 음악의 마디 단위로 문자열 패턴을 분석하여, 마디 단위의 문자열, 마디 위치, 발생 회수, 및 상기 발생 회수의 순위를 나타내는 리스트를 얻는 단계; (d12) 상기 반복 회수의 순위가 가장 높은 마디들 각각을 대표 마디로 포함하는 그룹들을 생성하는 단계; 상기 생성된 각 그룹에 대하여, (d13) 상기 대표 마디와 인접하는 마디의 발생 회수를 소정 제1 임계값과 비교하고, 그 결과에 따라 상기 인접하는 마디를 그룹에 합치는 단계; 및 (d14) 상기 대표 마디의 발생 회수의 순위와 합쳐진 마디의 발생 회수의 순위의 차가 누적된 값을 소정 제2 임계값과 비교하고, 그 결과에 따라 상기 (d13) 단계를 반복하거나 종료하는 단계; 및 (d15) 상기 (d13) 단계 및 상기 (d14) 단계가 수행된 결과 얻어진 각 그룹에 포함되는 문자열을 상기 빈번 멜로디를 나타내는 문자열로서 추출하는 단계를 포함할 수 있다.In this case, the step (d1) may include: (d11) analyzing a string pattern in units of measure of music, and obtaining a list indicative of the sequence of strings, measure positions, the number of occurrences, and the number of occurrences of the units of measure; (d12) generating groups including each node having the highest rank of the number of repetitions as a representative node; For each of the created groups, (d13) comparing the number of occurrences of nodes adjacent to the representative node with a predetermined first threshold value and joining the adjacent nodes to the group according to the result; And (d14) comparing the accumulated value of the rank of the occurrence number of nodes combined with the rank of the number of occurrences of the representative node with a predetermined second threshold value, and repeating or terminating the step (d13) according to the result. ; And (d15) extracting a character string included in each group obtained as a result of performing step (d13) and step (d14) as a character string representing the frequent melody.

나아가, 상기 얻어진 각 그룹 간에 오버랩되는 문자열이 존재하는 경우, 해당하는 그룹들이 합쳐진 그룹에 포함되는 문자열을 상기 빈번 멜로디를 나타내는 문자열로서 추출하는 단계를 더 포함할 수 있다.In addition, when there is a string overlapping each of the obtained groups, the method may further include extracting a string included in the group in which the corresponding groups are combined as a string representing the frequent melody.

상기 다른 기술적 과제를 해결하기 위하여, 본 발명에 따른 허밍 질의를 입력으로 하여 음악을 검색하는 방법은, (a) 허밍을 질의로서 입력받는 단계; (b) 상기 입력받은 허밍으로부터 멜로디를 나타내는 특징 데이터를 추출하고, 상기 추출된 특징 데이터를 문자열로 변환하는 단계; (c) 상기 변환된 문자열에 따라, 각종 음악의 멜로디를 나타내는 특징 데이터가 문자열로 변환되어 저장된 제1 인덱스 및 상기 변환된 문자열로부터 의미 있는 멜로디를 나타내는 문자열이 추출되어 저장된 제2 인덱스를 저장하고 있는 음악 데이터베이스를 이용하여 음악을 검색하는 단계를 포함하는 것을 특징으로 한다.In order to solve the other technical problem, a method for searching for music by inputting a humming query according to the present invention includes: (a) receiving a humming input as a query; (b) extracting feature data representing a melody from the received humming and converting the extracted feature data into a character string; (c) storing, according to the converted character string, feature data representing melodies of various kinds of music, converted into a character string, and storing a first index stored in the character string and a second index extracted and stored from the converted character string. And searching for music using the music database.

여기서, 상기 (b) 단계는, 상기 입력받은 허밍을 구성하는 음표의 높이와 길이를 추출하는 단계; 및 상기 추출된 음표의 높이와 길이로부터 연속된 음표 간의 높이의 변화량과 길이의 변화율을 포함하는 데이터를 상기 특징 데이터로서 추출하는 단계; 및 상기 추출된 특징 데이터를 문자열로 변환하는 단계를 포함하는 것이 바람직하다.Here, the step (b), the step of extracting the height and length of the notes constituting the received humming; And extracting, as the feature data, data including an amount of change in height and a rate of change in length from the height and the length of the extracted note. And converting the extracted feature data into a character string.

또한, 상기 제2 인덱스는, 상기 의미 있는 멜로디를 나타내는 문자열로서, 빈번하게 발생되는 멜로디인 빈번 멜로디를 나타내는 문자열을 추출하여 저장된 제 2-1 인덱스 또는 소정 길이 이상의 쉼표를 경계로 나누어지는 멜로디를 나타내는 문자열을 추출하여 저장된 제2-2 인덱스를 포함하는 것이 바람직하다.In addition, the second index is a character string representing the meaningful melody, and represents a melody divided by a boundary of a 2-1 index or a comma of a predetermined length or more, which is stored by extracting a character string indicating a frequent melody that is a frequently generated melody. It is preferable to include the 2-2 index stored by extracting the character string.

또한, 상기 (d) 단계는, 상기 변환된 문자열에 따라, 상기 제2-1 인덱스 및 상기 제2-2 인덱스로부터 음악을 검색하는 단계; 및 상기 변환된 문자열에 따라 상기 제1 인덱스로부터 음악을 검색하는 단계를 포함하는 것이 바람직하다.In addition, the step (d) may include searching for music from the 2-1 index and the 2-2 index according to the converted character string; And retrieving music from the first index according to the converted character string.

또한, 상기 음악 데이터베이스는 상기 각종 음악의 멜로디를 나타내는 특징 데이터를 더 저장하고 있고, 상기 (d) 단계는, 상기 (a) 단계에서 추출된 특징 데이터에 따라 상기 음악 데이터베이스에 저장된 특징 데이터로부터 음악을 검색하는 단계를 더 포함할 수 있다.In addition, the music database further stores feature data representing melodies of the various pieces of music, and in step (d), music is stored from the feature data stored in the music database according to the feature data extracted in step (a). The method may further include searching.

상기 또 다른 기술적 과제를 해결하기 위하여 본 발명에 따른 허밍 질의를 입력으로 하여 음악을 검색하는 장치는, 허밍을 입력받아, 멜로디를 나타내는 특징 데이터를 추출하고, 상기 추출된 특징 데이터를 문자열로 변환하는 질의 전처리부; 상기 검색을 위한 인덱스로서, 각종 음악의 멜로디를 나타내는 특징 데이터가 문자열로 변환되어 저장된 제1 인덱스 및 상기 변환된 문자열로부터 의미 있는 멜로디를 나타내는 문자열이 추출되어 저장된 제2 인덱스를 저장하고 있는 음악 데이터베이스; 및 상기 허밍으로부터 변환된 문자열에 따라, 상기 음악 데이터베이스로부터 음악을 검색하는 음악 검색부를 포함하는 것을 특징으로 한다.In order to solve the another technical problem, an apparatus for searching for music by inputting a humming query according to the present invention includes receiving a humming input, extracting feature data representing a melody, and converting the extracted feature data into a character string. A query preprocessor; A music database storing, as an index for the search, a first index in which feature data representing melodies of various music is converted into a character string, and a second index in which a character string representing a meaningful melody is extracted from the converted character string; And a music searching unit searching for music from the music database according to the character string converted from the humming.

여기서, 상기 질의 전처리부는 상기 입력받은 허밍을 구성하는 음표의 높이와 길이를 추출하고, 상기 추출된 음표의 높이와 길이로부터 연속된 음표 간의 높이의 변화량과 길이의 변화율을 포함하는 데이터를 상기 특징 데이터로서 추출하는 것이 바람직하다.Here, the query preprocessor extracts the height and length of the notes constituting the received humming, and includes data including a change rate of the height and a change rate of the length between consecutive notes from the height and length of the extracted note. It is preferable to extract as.

또한, 상기 제2 인덱스는, 상기 의미 있는 멜로디를 나타내는 문자열로서, 빈번하게 발생되는 멜로디인 빈번 멜로디를 나타내는 문자열을 추출하여 저장된 제2-1 인덱스 또는 소정 길이 이상의 쉼표를 경계로 나누어지는 멜로디를 나타내는 문자열을 추출하여 저장된 제2-2 인덱스를 포함하는 것이 바람직하다. In addition, the second index is a character string representing the meaningful melody, and represents a melody divided by a boundary of a 2-1 index or a comma of a predetermined length or more, which is stored by extracting a character string representing a frequent melody that is a frequently generated melody. It is preferable to include the 2-2 index stored by extracting the character string.

또한, 상기 음악 검색부는, 우선 상기 제2-1 인덱스 및 상기 제2-2 인덱스로부터 음악을 검색하고, 다음으로 상기 제1 인덱스로부터 음악을 검색하는 것이 바람직하다.Further, it is preferable that the music searching unit first searches music from the 2-1 index and the 2-2 index, and then searches music from the first index.

또한, 상기 음악 데이터베이스는 상기 각종 음악의 멜로디를 나타내는 특징 데이터를 더 저장하고 있고, 상기 음악 검색부는, 상기 제1 인덱스로부터 음악을 검색한 이후에 상기 질의 전처리부에서 추출된 특징 데이터에 따라 상기 음악 데이터베이스에 저장된 특징 데이터로부터 음악을 검색할 수 있다.The music database may further store feature data representing melodies of the various music pieces, and the music search unit may search for music from the first index, and then search for music from the first index according to the feature data extracted from the query preprocessor. Music can be retrieved from feature data stored in a database.

상술한 본 발명에 의하면, 허밍과 같은 부정확한 질의가 입력되더라도 검색의 정확도를 보장할 수 있고, 데이터베이스의 접근을 최소화함으로써 사용자가 찾고자 하는 음악을 검색하는 검색 속도를 향상시킬 수 있다.According to the present invention described above, even if an incorrect query such as a humming is input, the accuracy of the search can be guaranteed, and the search speed for searching for music to be searched by the user can be improved by minimizing the access of the database.

이하에서는 도면을 참조하여 본 발명의 바람직한 실시예들을 상세히 설명한다. 이하 설명 및 첨부된 도면들에서 실질적으로 동일한 구성요소들은 각각 동일한 부호들로 나타냄으로써 중복 설명을 생략하기로 한다. 또한 본 발명을 설명함에 있어 관련된 공지기능 혹은 구성에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우 그에 대한 상세한 설명은 생략하기로 한다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the following description and the accompanying drawings, the substantially identical components are represented by the same reference numerals, and thus redundant description will be omitted. In addition, in the following description of the present invention, if it is determined that a detailed description of a related known function or configuration may unnecessarily obscure the subject matter of the present invention, the detailed description thereof will be omitted.

도 1은 본 발명의 일 실시예에 따른 음악 검색을 위한 음악 데이터베이스 구축 방법의 흐름도이고, 도 2는 본 발명의 일 실시예에 따른 음악 데이터베이스의 구조도이다.1 is a flowchart of a music database construction method for music search according to an embodiment of the present invention, and FIG. 2 is a structural diagram of a music database according to an embodiment of the present invention.

우선, 110단계에서 음악 파일을 입력받는다. 이때 음악 파일로는 미디(MIDI) 형태의 음악 파일을 입력받는 것이 바람직하다.First, in step 110 a music file is input. In this case, it is preferable to receive a music file in the form of MIDI as a music file.

다음으로, 120단계에서, 입력받은 음악 파일로부터 멜로디를 나타내는 특징 데이터를 추출한다. 사용자의 질의를 입력으로 음악 검색을 하기 위해서는 음악 데이터베이스에 저장된 멜로디와 사용자의 질의 멜로디를 서로 비교하여 사용자가 원하는 음악을 검색하여야 하기 때문에, 음악 파일로부터 멜로디를 나타내는 특징 데이터를 추출하는 과정이 필요하다. 본 실시예에서, 멜로디를 나타내는 특징 데이터로서, 연속된 음표 또는 쉼표 간의 높이의 변화량과 길이의 변화율을 사용한다. 사용자가 입력한 허밍은 음표의 정확한 높이와 길이가 아닌 부정확한 멜로디이다. 다시 말해 사용자는 원 음악과 다르게 전체 음조를 높게 부르거나 낮게 부를 수 있고 원 음악보다 빠르게 부르거나 느리게 부를 수도 있다. 이러한 특징을 고려하여, 음 악 검색의 정확도를 높이기 위하여 연속된 음표 간의 높이의 변화량과 길이의 변화율을 특징 데이터로 사용한다. Next, in step 120, feature data representing a melody is extracted from the input music file. In order to search for music using the user's query, it is necessary to compare the melody stored in the music database and the user's query melody to search for the desired music. Therefore, it is necessary to extract feature data representing the melody from the music file. . In the present embodiment, as the characteristic data representing the melody, the amount of change in height and the rate of change in length between successive notes or rests are used. The humming entered by the user is an incorrect melody, not the exact height and length of the note. In other words, unlike the original music, the user may sing the entire pitch higher or lower, and may sing faster or slower than the original music. In consideration of these features, in order to increase the accuracy of music retrieval, the change rate of the height and the change rate of the length between consecutive notes are used as feature data.

연속된 음표 또는 쉼표 간의 높이의 변화량과 길이의 변화량을 추출하기 위해서, 우선 음표의 높이와 길이, 쉼표의 길이, 마디 경계를 추출한다. 음표의 높이 정보를 위하여 미디 음악에서는 음의 높이를 미리 정의해 놓은 값으로서 옥타브 (Octave)를 사용한다. 옥타브의 표기는 알파벳 형태의 음계와 숫자로 이루어져 있고 값의 범위는 0부터 127까지 이다. 예를 들어 옥타브가 'F5'인 음표는 그 높이 값이 '65'이다. 본 실시예에서는 이러한 숫자 값을 사용하여 음표의 높이를 표현한다. 다음으로 음표와 쉼표의 길이를 추출한다. 미디 음악에서 음표의 길이는 4분 음표 즉, 한 박자의 길이(Time Base)를 기준으로 계산된다. 그러나 미디 음악마다 한 박자의 길이가 다를 수 있기 때문에 같은 음표라도 그 음의 길이는 음악마다 다른 값이 될 수 있다. 그러므로 모든 음악의 한 박자 길이를 동일한 값으로 변환해 주는 작업이 필요하다. 이와 같은 방법을 통해 모든 음표의 높이와 길이를 추출한다. 또한 이 단계에서 마디의 경계를 추출하는데 이를 추출하는 이유는 한 음악에서 빈번하게 발생하는 빈번 멜로디를 발견하고자 할때, 일정한 길이를 가진 단위로서 마디를 사용하기 위해서이다. 마디의 경계는 입력된 미디 음악의 전체 박자 즉, 몇 분의 몇 박자 정보(Time Signature)와 한 박자의 길이, 그리고 음표와 쉼표의 길이를 통해 계산이 가능하다. In order to extract the amount of change in height and length between successive notes or rests, first the height and length of the note, the length of the rest and the node boundary are extracted. For note height information, MIDI music uses Octave as a predefined value. Octave notation consists of alphabetic scales and numbers, with values ranging from 0 to 127. For example, a note with an octave 'F5' has a height value of '65'. In this embodiment, the numerical value is used to express the height of the note. Next, we extract the length of the note and the comma. In MIDI music, the length of a note is calculated based on the quarter note, or time base. However, because the length of one beat may vary between MIDI songs, the same note may have a different length for each song. Therefore, it is necessary to convert one beat length of all music to the same value. In this way, we extract the height and length of every note. Also, at this stage, the boundaries of nodes are extracted, and the reason for extracting them is to use nodes as units having a certain length when trying to find frequent melodies that occur frequently in a music. The boundary of a node can be calculated from the total time of the input MIDI music, that is, the time signature of several minutes, the length of one beat, and the length of notes and rests.

음표 간의 높이 변화량이란 인접한 두 음표 사이에서 뒤의 음표의 높이와 앞의 음표의 높이의 차를 의미한다. 즉, 음표의 높이가 얼마만큼 증가, 감소했는지 또는 동일한지를 정확한 수치로 표현하는 것이다. 길이의 변화율은 인접한 두 음표 사이에서 뒤 음표의 길이를 앞 음표의 길이로 나누어 계산한다. The change in height between notes means the difference between the height of the next note and the height of the previous note between two adjacent notes. In other words, it is an accurate numerical representation of how much the height of the note is increased, decreased or the same. The rate of change of length is calculated by dividing the length of the next note by the length of the previous note between two adjacent notes.

도 3은 본 발명의 일 실시예에 따라 연속된 음표 간의 높이의 변화량과 길이의 변화율을 추출하는 방법을 나타낸 개념도이다. 도 3을 참조하면, 두 개의 인접한 음표 사이에 높이의 변화량과 길이의 변화율을 성분으로 하는 2차원 벡터 형태의 특징 데이터를 추출하고 이 값을 앞 음표에 대한 정보로서 추출한다. 가령 인접한 두 음표를 Ni와 Ni+1이라고 하고, 각 음표의 높이를 Pi, Pi+1, 각 음표의 길이를 Di, Di+1이라 하면, Ni의 특징 데이터인 높이의 변화량(Pitch Interval)과 길이의 변화율(Duration Ratio)를 추출하기 위한 수식은 아래와 같다. 3 is a conceptual diagram illustrating a method for extracting a change rate of a height and a change rate of a length between consecutive notes according to an embodiment of the present invention. Referring to FIG. 3, feature data in the form of a two-dimensional vector having a change amount of height and a change rate of length between two adjacent notes is extracted, and this value is extracted as information on the preceding note. For example, if two adjacent notes are called N i and N i + 1 , the height of each note is P i , P i + 1 , and the length of each note is D i , D i + 1 , the height of the characteristic data of N i . Equation for extracting Pitch Interval and Duration Ratio of is as follows.

Figure 112008008023601-PAT00001
Figure 112008008023601-PAT00001

도 4는 연속된 음표 사이에 쉼표가 존재하는 경우에 높이의 변화량과 길이의 변화율을 추출하는 방법을 나타낸 개념도이다. 종래의 연구에서는 쉼표를 무시한 경우가 대부분이지만 본 실시예에서는 사용자가 쉼표를 포함하여 불렀을 경우를 고려하여 쉼표 정보를 특징 데이터에 포함시킨다. 일반적으로 사용자는 일정한 길이 이상의 쉼표 후에 시작되는 멜로디를 질의할 가능성이 높기 때문에 쉼표의 위치가 중요하게 취급되어야 한다. 쉼표는 음표와는 달리 길이 정보만 가지고 있다. 따라 서 도 4에 도시된 바와 같이 쉼표의 높이를 널 값 (Null)으로 저장하고 '#'으로 표현한다. 다음으로 쉼표의 특징 데이터를 추출하기 위해 높이의 변화량과 길이의 변화율을 계산한다. 이때 쉼표의 위치에 따라 두 가지의 경우로 나누어 처리할 수 있다. 첫 번째 경우는 음표 뒤에 쉼표가 나오는 경우이다. 이 때 계산되어야 할 특징 데이터는 앞 음표의 데이터가 되며 그 값은 도 4에 도시된 바와 같이 높이의 변화량은 변화가 없음을 의미하는 '0.00'으로 저장하고 길이의 변화율을 음표의 길이와 쉼표의 길이를 사용하여 '0.5'의 변화율로 계산함으로써 쉼표의 정보를 앞 음표의 정보에 포함시킨다. 이때 만일 쉼표 대신에 길이와 박자가 각각 67과 30인 음표가 이어진다면 위의 경우와 마찬가지로 (0.00, 0.5)라는 특징 데이터 값이 계산될 것이다. 이는 쉼표의 정보가 신뢰성이 없다는 문제점이 될 수 있지만 사용자가 허밍을 부를 경우 쉼표를 정확히 지키지 못하고 음표로 인식하여 음을 계속 이어서 부를 경우가 발생할 수 있기 때문에 위와 같은 두 가지 경우를 분리하지 않고 생각한다. 다음으로 도 4에 도시된 바와 같이 쉼표 뒤에 음표가 나온다면 이 때 계산되어야 할 특징 데이터는 쉼표의 데이터가 되는데 이는 무시한다. 그 이유는 무시된 길이 변화율은 멜로디를 표현하지 못하는 무음의 멜로디이기 때문이다. 이러한 방법을 통해 하나의 미디 음악에서 연속된 2차원 벡터 형태의 특징 데이터들을 모두 생성한 후 이들을 도 2에 도시된 특징 데이터 저장부(210)에 저장한다. 4 is a conceptual diagram illustrating a method of extracting a change rate of a height and a change rate of a length when a comma exists between consecutive notes. In the conventional research, the comma is mostly ignored, but in the present embodiment, the comma information is included in the feature data in consideration of the case where the user includes the comma. In general, the position of the comma should be treated as important because the user is more likely to query a melody that starts after a comma longer than a certain length. Commas, unlike notes, contain only length information. Therefore, as shown in FIG. 4, the height of the comma is stored as a null value and expressed as '#'. Next, the amount of change in height and the rate of change in length are calculated to extract the comma's characteristic data. At this time, depending on the position of the comma can be divided into two cases. The first case is a comma followed by a note. At this time, the feature data to be calculated is the data of the previous note, and the value is stored as '0.00', which means that the change in height is unchanged as shown in FIG. The information of the comma is included in the information of the preceding note by calculating the change rate of '0.5' using the length. If instead of a comma followed by notes with length and time signatures of 67 and 30, respectively, the characteristic data value of (0.00, 0.5) will be calculated as in the above case. This may be a problem that the information of the comma is unreliable, but if the user hums, the user may not keep the comma correctly and may recognize it as a note and continue to play the note. . Next, as shown in FIG. 4, if a note appears after the comma, the feature data to be calculated at this time becomes the data of the comma, which is ignored. The reason is that the neglected rate of change of length is a silent melody that does not express the melody. Through this method, all the feature data in the form of a continuous two-dimensional vector in one MIDI music are generated and stored in the feature data storage 210 shown in FIG. 2.

다음으로, 130단계에서, 상기 120단계에서 추출된 특징 데이터를 문자열로 변환한다. 이미 설명한 바와 같이, 상기 120단계에서 추출된 특징 데이터는 연속된 음표 간의 높이의 변화량과 길이의 변화율을 성분으로 하는 2차원 벡터, 즉 높이의 변화량과 길이의 변화율의 조합이다. 본 실시예에서는 높이의 변화량과 길이의 변화율의 각 조합을 일정 규칙에 따라서 알파벳 문자에 대응시킴으써 특징 데이터를 문자열로 변환한다.Next, in step 130, the feature data extracted in step 120 is converted into a character string. As described above, the feature data extracted in step 120 is a two-dimensional vector having a change rate of height and a change rate of length between consecutive notes, that is, a combination of a change rate of height and a change rate of length. In this embodiment, the feature data is converted into a character string by associating each combination of the change amount of height and the change rate of length with alphabet characters according to a predetermined rule.

사용자의 질의를 입력으로 음악 검색을 하는 경우, 2차원 벡터 형태로 특징 데이터가 저장된 데이터베이스를 검색한다면, 저장된 모든 음악을 순차적으로 비교하여 검색해야 한다. 이 때 데이터베이스에 저장된 2차원 벡터는 숫자 값으로 되어있고 검색을 위한 질의와의 비교 방법은 일반적으로 유클리디안 거리 (Euclidean Distance) 계산 방법을 사용한다. 그러므로 이러한 검색 방법을 사용하게 되면 데이터베이스의 크기가 증가될수록 검색 속도가 느려지게 된다. 이를 보완하기 위해 본 실시예에서는 특징 데이터를 문자열 형태로 변환하여 저장해 놓은 인덱스를 사용한다. 특징 데이터를 문자열로 변환하게 되면, 문자열 매칭 (String Matching) 알고리즘을 사용하여 음악 검색을 수행할 수 있고, 이 경우 숫자 형태로 이루어진 2차원 벡터를 비교하는 것보다 계산 복잡도가 훨씬 줄어들게 된다.In case of searching music by input of user's query, if searching the database storing feature data in the form of 2D vector, all the stored music should be compared and searched sequentially. At this time, the 2D vector stored in the database is a numeric value, and the comparison method with the query for retrieval generally uses the Euclidean distance calculation method. Therefore, using this search method, the search speed becomes slower as the size of the database increases. To compensate for this, the present embodiment uses an index stored by converting feature data into a string form. When the feature data is converted to a string, a music search can be performed using a string matching algorithm, and the computational complexity is much smaller than comparing two-dimensional vectors in the form of numbers.

도 5는 본 발명의 일 실시예에 따라 높이의 변화량과 길이의 변화율을 성분으로 하는 2차원 벡터 값을 문자 값으로 변환하는 규칙을 나타낸 개념도이다. 도시된 바와 같이, 높이의 변화량과 길이의 변화율을 각 축으로 하는 2차원의 공간을 복수 개의 구간, 예를 들어 35개의 구간으로 나누고 각 구간을 하나의 문자에 할당하는 문자 변환 기준을 적용한다. 따라서 비슷한 2차원 벡터 값은 같은 문자로 치환되게 된다. 이는 허밍이 부정확하다는 특징을 반영한 것으로서 변환된 문자는 부정확한 허밍이 가지고 있는 에러를 허용한 값이 된다. 따라서 이러한 문자 변환 규 칙을 적용함으로써 노래 실력이 없는 사람들이나 언어 장애를 가진 사람들도 효과적으로 음악을 검색할 수 있게 된다.FIG. 5 is a conceptual diagram illustrating a rule for converting a two-dimensional vector value having a change amount of height and a change rate of a length into character values according to an embodiment of the present invention. As shown, a character conversion criterion is applied by dividing a two-dimensional space having a change amount of height and a change rate of length into a plurality of sections, for example, 35 sections, and assigning each section to one character. Thus, similar two-dimensional vector values are replaced by the same letter. This reflects the characteristic that the humming is inaccurate, and the converted character is a value that allows the error of the incorrect humming. Therefore, by applying these character conversion rules, people without singing ability or people with language disabilities can effectively search for music.

도 5를 참조하면, 가로축은 높이의 변화량을 의미하고 세로축은 길이의 변화율을 의미한다. 가로축에서 0값을 기준으로 오른쪽은 높이의 변화량이 양수 값을 보인다. 이는 인접한 두 음표 사이에서 뒤 음표의 높이가 앞 음표의 높이보다 높은 경우를 의미하고 오른 쪽으로 갈수록 그 차이는 점점 더 커짐을 의미한다. 반대로 가로축의 0값을 기준으로 왼쪽은 높이의 변화량이 음수 값을 보인다. 이는 뒤 음표의 높이가 앞 음표의 높이보다 낮음을 의미하고 왼쪽으로 갈수록 그 차이는 점점 커짐을 의미한다. 마찬가지로 세로축에서 1값을 기준으로 위쪽은 뒤 음표의 길이가 앞 음표의 길이보다 긴 경우이고 그 길이의 비율 차이는 위쪽으로 갈수록 점점 더 커짐을 의미한다. 반면 세로축의 1값을 기준으로 아래쪽은 뒤 음표의 길이가 앞 음표의 길이보다 짧은 경우이고 그 길이의 차이는 아래로 갈수록 점점 더 커짐을 의미한다. 도 5를 참조하면, -4와 +4 사이의 높이 변화량은 같은 문자로 변환되는데 이는 사용자가 실제 음악의 한 음을 부를 때 실제 음의 높이보다 4만큼 높게 부르거나 낮게 불러도 그만큼의 오차는 허용됨을 뜻한다. 마찬가지로 박자의 변화율에서 0.5와 2사이는 같은 문자로 변환된다. 이는 사용자가 실제 음악의 한 음을 부를 때 실제 길이보다 2배의 길이로 부르거나 0.5배의 길이로 불러도 그만큼의 오차를 허용된다는 의미이다. Referring to FIG. 5, the horizontal axis represents the amount of change in height and the vertical axis represents the rate of change in length. On the right side of the horizontal axis, the amount of change in height is positive. This means that the height of the back note is higher than the height of the front note between two adjacent notes, and the difference becomes larger as it goes to the right. On the contrary, the change in height on the left side shows a negative value based on the zero value of the horizontal axis. This means that the height of the back note is lower than the height of the front note, and the difference increases gradually toward the left. Similarly, on the vertical axis, the upper part means that the length of the last note is longer than the length of the previous note, and the ratio difference of the length becomes larger as the upward direction increases. On the other hand, the lower part of the vertical axis means that the length of the last note is shorter than the length of the previous note, and the difference in length becomes larger as it goes down. Referring to FIG. 5, the amount of change in height between -4 and +4 is converted to the same character, which means that the error is allowed even if the user sings 4 or higher than the height of the actual sound when the user sings one note of the actual music. It means. Likewise, between 0.5 and 2 in the rate of change of the beat is converted to the same character. This means that when a user sings a note of the actual music, the error is called twice as long or as 0.5 times as long as the actual length.

도 6은 도 5에 도시된 바에 따른 변환 기준을 사용하여, 연속된 2차원 벡터 값의 연속을 문자열로 변환한 결과를 나타낸다.FIG. 6 illustrates a result of converting a sequence of successive two-dimensional vector values into a string using the conversion criteria shown in FIG. 5.

다시 도 1을 참조하면, 140단계에서 상기 130단계에서 변환된 문자열을 제1 인덱스(220)로 저장한다. 이때 저장하는 형태는 서픽스 트리 (suffix tree) 형태로 저장하는 것이 바람직하다. 서픽스 트리란, 문자열의 내부 구조를 잘 드러내줄 수 있는 자료구조의 하나로서, 정확 매칭 알고리즘(exact matching algorithm)에 주로 응용된다.Referring back to FIG. 1, in operation 140, the string converted in operation 130 is stored as the first index 220. In this case, it is preferable to store the data in the form of a suffix tree. The suffix tree is a data structure that can reveal the internal structure of a string and is mainly applied to an exact matching algorithm.

다음으로, 150단계에서 상기 130단계에서 변환된 문자열로부터 의미 있는 멜로디를 나타내는 문자열을 추출하여 제2 인덱스로 저장한다. 한 음악은 여러 개의 멜로디로 이루어져 있는데, 멜로디란 음악적인 표현과 인간의 감정을 가장 잘 나타내는 요소로서 다양한 음높이와 길이 정보를 담고 있는 음표와 쉼표의 결합을 의미한다. 의미 있는 멜로디란, 이와 같이 한 음악을 이루는 여러 멜로디 중 그 음악을 대표할 수 있는 멜로디, 즉 사용자가 질의할 가능성이 높은 멜로디를 말한다. Next, in step 150, a string representing a meaningful melody is extracted from the string converted in step 130 and stored as a second index. A music consists of several melodies, which are the best expressions of musical expressions and human emotions, meaning a combination of notes and rests containing various pitch and length information. A meaningful melody refers to a melody that can represent the music among the melodies that make up a music, that is, a melody that a user is likely to inquire.

본 실시예에서 첫 번째 의미 있는 멜로디로서 한 음악에서 여러 번 반복되어 나타나는 임의의 길이를 가진 멜로디를 사용한다. 왜냐하면, 사용자가 음악을 들었을 경우 자주 반복하여 나타나는 멜로디를 기억하기 쉽기 때문이다. 즉, 사용자가 원하는 음악을 검색하기 위해서 그 음악의 멜로디들 중에 쉽게 기억할 수 있는 멜로디를 흥얼거릴 경우가 많기 마련이므로 본 실시예에서는 빈번하게 발생한 멜로디를 의미 있는 멜로디로 지정한다.As the first meaningful melody in this embodiment, a melody with an arbitrary length that appears several times in a music is used. This is because it is easy to remember melody that appears frequently when the user listens to music. That is, in order to search for the music desired by the user, many melodies that can be easily memorized are often humming in the melodies of the music. In this embodiment, melody frequently generated is designated as a meaningful melody.

본 실시예에서 두 번째 의미 있는 멜로디로서 소정 길이 이상의 쉼표 사이에 있는 멜로디를 사용한다. 일정 길이 이상의 긴 쉼표는 멜로디를 나누는 경계로 볼 수 있다. 실제 음악 데이터를 분석하여 보면 멜로디의 흐름이 긴 쉼표를 경계로 나 누어짐을 알 수 있다. 대부분의 음악에서 긴 쉼표는 시작 부분 전, 후렴 부분 전, 2절이 시작되기 전 등에 많이 나타난다. 즉, 음악의 후렴 부분과 처음 부분을 사용자가 기억하기 쉬울 것이라는 가정 하에 쉼표의 의미를 적용함으로써 소정 길이 이상의 쉼표로 나누어지는 멜로디를 의미 있는 멜로디로 지정한다. As the second meaningful melody in this embodiment, the melody between the commas of a predetermined length or more is used. Long commas longer than a certain length can be seen as boundaries that divide the melody. Analyzing the actual music data shows that the flow of melody is divided by long commas. In most music, long rests appear before the beginning, before the chorus, and before the beginning of verse 2. That is, the melody divided by a comma of a predetermined length or more is designated as a meaningful melody by applying a meaning of a comma on the assumption that the chorus part and the first part of the music will be easy for the user to remember.

먼저, 첫 번째 의미 있는 멜로디인 빈번 멜로디를 나타내는 문자열을 추출하는 과정을 설명한다. 도 7은 본 발명의 일 실시예에 따라 빈번 멜로디를 추출하는 방법을 나타낸 흐름도이다.First, a process of extracting a string representing frequent melody, which is the first meaningful melody, will be described. 7 is a flowchart illustrating a method of extracting frequent melodies according to an embodiment of the present invention.

710단계에서 마디 단위로 문자열 패턴을 분석한다. 본 실시예에서, 한 음악에서 여러 번 반복되는 멜로디인 빈번 멜로디를 찾기 위해 우선 마디 단위로 문자열 패턴을 분석한다. 마디를 사용하여 빈번 멜로디를 추출하는 이유는, 마디란 동일한 박자를 가지고 있는 물리적이고 객관적인 단위이므로, 이를 기준으로 빈번 멜로디를 추출하며 정확하고 간결하게 빈번 멜로디를 얻을 수 있기 때문이다. In step 710, the string pattern is analyzed in units of nodes. In this embodiment, first, a string pattern is analyzed in units of nodes in order to find frequent melodies that are melodies repeated several times in a music. The reason for extracting frequent melodies using a node is that the node is a physical and objective unit having the same time signature, and thus it is possible to extract the frequent melody based on this and obtain a frequent melody accurately and concisely.

도 8은 마디 단위로 문자열 패턴을 분석하여 정보를 얻는 과정을 나타낸 개념도이다. 도 8에 도시된 바와 같이, 문자열 패턴 분석을 수행하기 위해 문자열 형태 나타내어진 하나의 음악을 마디 경계인 '/ ' 로 나눈다. 마디 단위로 나눈 문자열들을 문자열 패턴 매칭 알고리즘을 통해, 일치되는 문자열들을 분석하여 마디 단위의 문자열(Sequence in Bar), 마디의 위치 정보(이하, BarID), 각 문자열의 발생 회수, 즉 일치되는 마디들의 개수(이하, C), 그리고 C를 내림차순으로 정렬한 순위(이하, R)를 얻는다. 예를 들어 '그 후로 오랫동안'이란 제목을 가진 음악을 입력받아 문자열을 마디 단위로 나눈 후 마디 단위 문자열 패턴 분석을 수행하면 아 래 표 1과 같은 리스트를 얻을 수 있다. 표 1을 참조하면, 문자열 <j, x, k, j, i, x>는 18, 22, 35, 39번째 마디에서 나타났고 발생 회수 C는 4임을 확인할 수 있다. 또한 이 문자열은 위의 음악에서 가장 많이 발생한 것이므로 순위 R은 1이 된다. 8 is a conceptual diagram illustrating a process of obtaining information by analyzing a string pattern in units of nodes. As shown in FIG. 8, in order to perform string pattern analysis, one piece of music represented by a string form is divided by a node boundary '/'. Through string pattern matching algorithm, strings divided by measure are analyzed by matching strings. Sequence in bar, node location information (hereafter, BarID), number of occurrences of each string, that is, The number (hereafter C) and the rank (hereafter R) sorting C in descending order are obtained. For example, if you receive music with the title 'Long time since', divide the string into units of measure and analyze the string pattern of units of measure, you can get the list as shown in Table 1 below. Referring to Table 1, it can be seen that the strings <j, x, k, j, i, x> appear at the 18th, 22, 35, and 39th nodes, and the number of occurrences C is 4. Also, this string is the most frequent occurrence in the above music, so the rank R is 1.

Sequence in BarSequence in Bar Bar Position (BarId)Bar Position (BarId) Count (C)Count (C) Rank (R)Rank (R) <j, x, k, j, i, x><j, x, k, j, i, x> 18, 22, 35, 3918, 22, 35, 39 44 1One <k, k, j, x, g><k, k, j, x, g> 19, 3619, 36 22 22 <j, x, j, k, k, k><j, x, j, k, k, k> 20, 3720, 37 22 22 <k, j, j, w, g><k, j, j, w, g> 21, 3821, 38 22 22 <j, x, g, k, E, x, i, x> <j, x, g, k, E, x, i, x> 17, 4917, 49 1One 33

다시 도 7을 참조하면, 720단계에서 발생 회수의 순위가 가장 높은 마디, 즉 R=1인 마디들 각각을 대표 마디(Key Bar, 이하 KB)로 포함하는 그룹을 생성한다. 여기서, 그룹의 개수는 C개가 된다. 도 10은 표 1에 나타난 리스트를 기초로 그룹을 생성한 결과를 나타내는 도면이다. 도 10을 참조하면, C 값이 4이므로 4개의 그룹이 생성되었음을 알 수 있다. 도 10에서 수직선은 하나의 음악을 의미하고, 각 눈금은 하나의 마디를 의미한다. 또한 검은색이 칠해져 있는 눈금은 빈번 멜로디 생성을 위한 시작 마디인 각 그룹의 대표 마디를 의미한다. 도면 7과 같이 첫 번째 그룹의 대표 마디는 18번째 마디인 Bar18, 두 번째 그룹의 대표 마디는 Bar22, 세 번째 그룹의 대표 마디는 Bar35, 마지막으로 네 번째 그룹의 대표 마디는 Bar39이다. Referring to FIG. 7 again, in step 720, a group including a node having the highest number of occurrences, that is, nodes having R = 1 as a representative bar (KB) is created. Here, the number of groups is C. FIG. 10 is a diagram illustrating a result of generating a group based on a list shown in Table 1. FIG. Referring to FIG. 10, since the C value is 4, it can be seen that four groups are generated. In FIG. 10, a vertical line means one piece of music, and each scale means one piece. In addition, the black scale indicates the representative node of each group, which is the starting node for frequent melody generation. As shown in FIG. 7, the 18th bar is the 18th bar, the second bar is the bar 22, the third bar is Bar35, and the fourth bar is Bar39.

본 실시예에서 빈번 멜로디를 추출하기 위해 두 가지 인자를 정의한다. 첫 번째 인자는 어떤 마디를 빈번 멜로디에 포함시킬지 결정하기 위한 선택 임계값으로서, BST(Bar Selection Threshold)라 부르기로 한다. 만일 BST 값이 2라면 발생 회수 C 값이 2 이상인 마디들만 사용하여 빈번 멜로디를 생성한다는 것을 의미한다. BST 값이 작을수록 빈번 멜로디의 길이가 길어질 수 있다. 따라서 두 번째 인자는 빈번 멜로디의 길이를 제한하기 위한 임계값으로서, 빈번 멜로디 길이 임계값(Frequent Melody Length Threshold, 이하 FMLT)이라 부르기로 한다. FMLT는 빈번 멜로디를 생성하면서 마디가 추가될 때마다 계산되는 변수(BSum)의 크기를 제한한다. 후술하겠지만, BSum은 대표 마디의 R 값과 합쳐진 마디의 R 값의 차를 계산하여 이전까지 계산된 BSum에 더하는 방식으로 계산한다. FMLT는 이러한 BSum의 상한을 결저하기 위한 값으로서, 본 실시예에서는 BSum이 FMLT 이하일 때까지 반복하여 빈번 멜로디를 생성해 나간다.In this embodiment, two factors are defined to extract frequent melodies. The first factor is a selection threshold for determining which nodes are frequently included in the melody. This is called a bar selection threshold (BST). If the BST value is 2, it means that frequent melodies are generated using only nodes having an occurrence count C value of 2 or more. The smaller the BST value, the longer the length of the frequent melody. Therefore, the second factor is a threshold for limiting the length of the frequent melody, which will be referred to as a frequent melody length threshold (hereinafter referred to as FMLT). FMLT creates frequent melodies, limiting the size of the variable (BSum) that is calculated each time a node is added. As will be described later, the BSum is calculated by calculating the difference between the R value of the node combined with the R value of the representative node and adding it to the previously calculated BSum. FMLT is a value for eliminating the upper limit of the BSum. In this embodiment, the melody is repeatedly generated until the BSum is less than or equal to the FMLT.

730단계에서는, 상기 720단계에서 문자열 패턴을 분석한 결과 얻어진 리스트, 상기 730단계에서 생성된 그룹 정보, BST 값, 그리고 FMLT 값 등을 이용하여, 각 그룹에 대해 대표 마디를 기준으로 인접한 마디를 합쳐 나가면서 빈번 멜로디를 생성한다. In step 730, by using the list obtained as a result of analyzing the string pattern in step 720, the group information generated in step 730, the BST value, and the FMLT value, the adjacent nodes are combined for each group based on the representative node. As you go out, you will often create melodies.

도 9는 도 7에 도시된 730단계를 보다 구체적으로 나타낸 흐름도이다. FIG. 9 is a flowchart illustrating step 730 of FIG. 7 in more detail.

우선, 910단계에서 각 그룹을 나타내는 기호 c(1≤c≤C)를 c=1로 설정한다. 이는, 생성된 그룹들 중 첫 번째 그룹에서 후술하는 단계들이 시작됨을 의미한다.First, in step 910, the symbol c representing each group (1 ≦ c ≦ C) is set to c = 1. This means that the steps described below are started in the first group of the generated groups.

이하 설명에서 대표 마디와 인접하는 양쪽 마디를 각각 KBright, KBleft라 하기로 하고, 현재 마디라 부르기로 한다. In the following description, both nodes adjacent to the representative node will be referred to as KB right and KB left , respectively.

915단계에서 BSum의 초기값으로 BSum=0으로 설정하고, 920단계에서, BSum이 FMLT보다 크면 950단계로 진행하고, 그렇지 않으면 925단계로 진행한다. In step 915, BSum = 0 is set as an initial value of BSum. In step 920, if BSum is greater than FMLT, the process proceeds to step 950, otherwise, the process proceeds to step 925.

925단계에서 현재 마디인 KBright, KBleft의 C 값과 BST 값을 비교하여 C 값이 BST 값 이상인 마디가 있는 경우 후술하는 930단계 내지 940단계 중 어느 하나를 수행하고, 그렇지 않은 경우, 950단계로 진행한다.In step 925, if there is a node whose C value is greater than or equal to the BST value by comparing the C value of the current node KB right and KB left , and performing any one of steps 930 to 940 described later, otherwise, step 950 Proceed to

C 값이 BST 값 이상인 마디가 하나이면, 즉 KBright과 KBleft 중 하나이면, 930단계에서, 해당하는 마디를 그룹에 합친다. If there is one node whose C value is greater than or equal to the BST value, that is, one of KB right and KB left , in step 930, the corresponding node is added to the group.

C 값이 BST 값 이상인 마디가 두 개이고 각 C 값이 다르면, 935단계에서, C 값이 큰 마디를 그룹에 합친다.If there are two nodes whose C values are greater than or equal to the BST value and each C value is different, in step 935, the nodes having the large C values are added to the group.

C 값이 BST 값 이상인 마디가 두 개이고 각 C 값이 동일하면, 940단계에서 두 마디를 모두 그룹에 합친다.If there are two nodes whose C value is greater than or equal to the BST value and each C value is the same, both nodes are added to the group in step 940.

945단계에서, 상기 930단계, 935단계, 및 940단계 중 어느 한 단계에서 합쳐진 현재 마디의 R 값과 KB 마디의 R 값의 차를 BSum에 더한다. 그리고, 다시 상기 920 단계로 돌아가서, BSum 값과 FMLT 값의 비교 결과에 따라 상기 925단계 내지 945단계를 반복한다. 반복되는 경우에는, 현재 마디 중 오른쪽 마디가 합쳐졌다면 그 오른쪽 다음 마디인 KBright+1을 현재 마디로 하여 상기 단계들을 수행하고, 현재 마디 중 왼쪽 마디가 합쳐졌다면 그 왼쪽의 다음 마디인 KBleft-1을 현재 마디로 보고 상기 단계들을 수행한다.In step 945, the difference between the R value of the current node and the R value of the KB node added in any one of steps 930, 935, and 940 is added to BSum. In step 920, the process repeats steps 925 to 945 according to the comparison result of the BSum value and the FMLT value. If repeated, perform the steps above with the right node, KB right + 1 , if the right node of the current node merged, or KB left- , the next node to the left of the current node, if the left node of the current node is merged. View 1 as the current node and perform the above steps.

도 11은 BST 값과 FMLT 값이 각각 2와 6으로 주어진 상황에서 표 1에 나타난 리스트를 기초로, 도 10의 첫 번째 그룹에 대하여 빈번 멜로디를 생성하는 과정을 표현한 도면이다. 우선 첫 번째 그룹을 보면 대표 마디인 KB가 Bar18로 지정되어있다. 대표 마디의 양쪽 마디인 Bar17과 Bar19는 각각 KBleft 와 KBright으로 할당되어진다. Bar17의 C값은 1로서 BST값보다 작기 때문에 조건을 만족시키지 못하므로 무시한다. 다시 말해 Bar17은 충분히 여러 번 반복되어 나타난 마디가 아니기 때문에 대표 마디인 Bar18과 합쳐질 수 없다. 반면 Bar19의 C값은 2로서 BST 값 이상이므로 Bar18과 합쳐진다. 마디를 합쳤다면 그 다음으로 그 그룹의 BSum을 계산한다. 합쳐진 Bar19의 R값은 2로서 대표 마디인 Bar18의 R값과의 차를 구하면 1이 된다. 이 값을 기존의 BSum값에 더하여 다시 BSum에 저장한다. 다음으로 Bar20의 C값을 BST값과 비교함으로써 위의 과정을 반복한다. 이때 대표 마디를 기준으로 왼쪽 방향은 Bar17의 C 값이 BST 값 이상이 되지 못하였으므로 빈번 멜로디를 생성하는데 무시된다. 오른쪽 방향으로 마디를 증가시켜가며 BSum이 FMLT를 넘지 않을 때까지 또는 C값이 BST값 보다 작은 마디가 나타날 때까지 빈번 멜로디를 생성하게 된다. FIG. 11 is a diagram illustrating a process of generating frequent melodies for the first group of FIG. 10 based on a list shown in Table 1 in a situation where BST values and FMLT values are given as 2 and 6, respectively. First of all, the first group, KB, is designated as Bar18. Both nodes of the representative node, Bar17 and Bar19, are assigned KB left and KB right , respectively. Since the C value of Bar17 is 1, which is smaller than the BST value, the condition is not satisfied and is ignored. In other words, Bar17 cannot be combined with Bar18, which is representative because it is not a node that appears many times. On the other hand, the C value of Bar19 is 2, which is more than the BST value, so it is combined with Bar18. If the nodes are combined then the BSum of the group is calculated. The combined R value of Bar19 is 2, which is 1 when the difference from the R value of the representative bar Bar18 is obtained. This value is added to the existing BSum value and stored in the BSum again. Next, the above process is repeated by comparing the C value of Bar20 with the BST value. At this time, the left direction is neglected to generate melody frequently because the C value of Bar17 is not more than BST value. Increasing the number of nodes in the right direction will generate frequent melodies until BSum does not exceed FMLT, or until a value of C less than BST appears.

BSum을 계산하기 위해 마디 개수인 C값을 사용할 수도 있지만 본 실시예에서는 C 값이 아닌 순위 R 값을 사용한다. 그 이유는 다음과 같다. 예를 들어 아래 표 2와 같은 정렬 순서를 가지는 두 음악을 고려하여 보자.In order to calculate the BSum, the value of C, which is the number of nodes, may be used, but in the present embodiment, the rank R value is used instead of the C value. The reason for this is as follows. For example, consider two pieces of music with the sort order shown in Table 2 below.

Music 1Music 1 Music 2Music 2 Sequence in BarSequence in Bar BarIdBarId CC RR Sequence in BarSequence in Bar BarIdBarId CC RR c, c, a, d, dc, c, a, d, d 6, 9, 206, 9, 20 33 1One a, e, e, s, da, e, e, s, d 4, 9, 15, 27, 30, 34 4, 9, 15, 27, 30, 34 66 1One c, d, a, a, dc, d, a, a, d 7, 217, 21 22 22 c, e, s, ac, e, s, a 5, 16, 285, 16, 28 33 22 a, da, d 8, 22 8, 22 22 22 a, g, c, da, g, c, d 6, 10, 316, 10, 31 3 3 22 a, a, c, sa, a, c, s 10, 2310, 23 22 22 e, s, c, c, d, se, s, c, c, d, s 3, 7, 113, 7, 11 33 22 b, e, h, zb, e, h, z 11, 3011, 30 22 22 c, e, ac, e, a 8, 128, 12 33 22 b, b, k, ub, b, k, u 12, 3112, 31 22 22 c, c, dc, c, d 13, 1413, 14 33 22 c, c, ac, c, a 13, 3213, 32 22 22 a, d, b, ba, d, b, b 29, 3129, 31 33 22 ...... ...... ...... ...... ...... ...... ...... ......

BSum을 계산하기 위해 R값 대신 C값을 사용한다고 가정한 후 각각 빈번 멜로디 생성 알고리즘을 적용해 보자. 만약 BST값은 2 그리고 FMLT값은 6으로 지정해 놓는다면 음악 1의 첫 번째 그룹은 6번째 마디부터 13번째 마디까지 8개의 마디로 이루어진 빈번 멜로디를 생성하게 된다. 이는 음악 1에서 빈번하게 발생한 마디들을 최대한 고려하여 BSum이 FMLT를 초과하지 않을 때까지 빈번 마디를 합쳐나감으로써 빈번 멜로디를 생성한 것이다. 또한 이는 순위 R값을 사용하여 BSum을 계산하여도 같은 빈번 멜로디가 생성됨을 알 수 있다. 반면, BSum을 계산하기 위해 C값을 사용하여 음악 2에서 첫 번째 그룹의 빈번 멜로디를 생성해보면 4번째 마디부터 6번째 마디까지 3개의 마디로 이루어진 빈번 멜로디를 얻을 수 있다. 그러나 7번째 마디 또한 음악 2에서는 빈번하게 나타난 마디임에도 불구하고 빈번 멜로디로 취급되지 않았다. 즉, 빈번하게 발생한 마디를 최대한 고려하지 못하기 때문에 부정확한 빈번 멜로디를 생성하게 된다. 반면 R값을 사용하여 빈번 멜로디를 생성하면 3번째 마디부터 10번째 마디까지 8개의 마디로 이루어진 빈번 멜로디를 생성할 수 있다. 이는 음악 2에서 빈번하게 발생한 마디들을 최대한 고려하여 빈번 멜로디를 생성한 결과라 할 수 있다. 이들 두 음악은 각각 다른 특성을 갖는 음악이므로 각 음악에 나타난 빈번 마디의 횟수가 다를 수 있다. 음악 1에서 가장 빈번한 마디 개수가 3인 반면 음악 2에서는 6이다. 그러나 이들 마디 개수의 순위 R은 1로 동일하다. 즉, 각각 다른 마디 개수를 가진 음악들의 빈번 멜로디를 생성하기 위해서는 그들의 마디 개수를 객관적인 수치로 표현하기 위해 순위를 적용하고, 이 값을 사용하여 BSum을 계산함으로써 빈번 멜로디를 생성해 나가는 것이다. Let's assume that we use C instead of R to compute the BSum, and then apply frequent melody generation algorithms. If the BST value is set to 2 and the FMLT value is set to 6, the first group of music 1 will generate a frequent melody consisting of 8 bars from the 6th bar to the 13th bar. This is to create a frequent melody by combining the frequent nodes until BSum does not exceed FMLT, taking into consideration the most frequently occurring nodes in music 1. In addition, it can be seen that the same frequent melody is generated by calculating the BSum using the rank R value. On the other hand, if you generate the first group of frequent melodies in Music 2 using the C value to calculate BSum, you can get a frequent melody consisting of three nodes from the fourth to the sixth node. However, the seventh node was not treated as a frequent melody, although it was a frequent one in music 2. In other words, because it does not take into account the frequently occurring nodes as possible, inaccurate frequent melody is generated. On the other hand, if a frequent melody is generated using the R value, a frequent melody consisting of eight nodes from the third node to the tenth node can be generated. This may be referred to as a result of generating frequent melody in consideration of the most frequently occurring nodes in music 2. Since these two pieces of music have different characteristics, the number of frequent nodes appearing in each piece of music may be different. The most frequent number of nodes in music 1 is 3, while in music 2 it is 6. However, the rank R of these number of nodes is equal to one. In other words, in order to generate frequent melodies of music having different number of measures, the rank is applied to express their number of numbers as an objective number, and the melody is generated by calculating BSum using this value.

다시, 도 9를 참조하면, BSum이 FMLT 값보다 크게 되거나, 대표 마디의 양쪽 인접 마디 또는 합쳐진 마디의 인접 마디 중 C 값이 BST 값 이상인 마디가 없는 경우 그 그룹에 대하여는 빈번 멜로디의 생성이 종료되어야 한다. 따라서 이러한 경우, 이미 설명한 바와 같이 950단계로 진행하여 c를 1 증가시키고, 955단계에서 c와 그룹의 개수 C 값을 비교하여, c 가 그룹의 개수 C보다 크지 않으면, 상기 915단계로 진행하여 다른 그룹에 대하여 상기 915단계 내지 상기 945단계를 수행한다. 955단계에서 c가 그룹의 개수 C보다 크다면, 모든 그룹에 대하여 상기 915단계 내지 상기 945단계가 수행되었다는 의미가 된다. 그러면 960단계에서 C개의 그룹들 각각에 포함된 문자열들을 빈번 멜로디를 나타내는 문자열들로서 추출한다. Referring again to FIG. 9, if the BSum becomes larger than the FMLT value, or there is no node whose C value is greater than or equal to the BST value in both adjacent nodes of the representative node or in the adjacent node of the combined node, frequent melody generation should be terminated for the group. do. In this case, as described above, the process proceeds to step 950 and c is increased by 1, and in step 955, the value of c and the number of groups C is compared. Steps 915 to 945 are performed on the group. If c is greater than the number of groups C in step 955, this means that steps 915 to 945 are performed for all groups. Then, in step 960, the strings included in each of the C groups are extracted as strings representing frequent melodies.

상술한 바와 같이, 모든 그룹에서 빈번 멜로디 생성이 완료되면 각 그룹 안에는 빈번하게 발생한 마디들로 이루어진 빈번 멜로디가 생성되어 있을 것이다. 그러나 도 12에 도시된 바와 같이 두 개의 그룹에 속한 빈번 멜로디가 오버랩되는 상황이 발생할 수 있다. 이때 각 그룹 안에 있는 빈번 멜로디를 각각 따로 저장한다면 중복된 데이터가 많이 발생할 것이다. 그러므로 이를 막기 위해 오버랩되는 그룹들을 하나의 그룹으로 합침으로써 중복된 멜로디를 하나의 멜로디로 취급할 수 있다. 따라서 도 9에는 각 그룹 간에 오버랩되는 문자열이 존재하는 경우, 해당하는 그룹들이 하나로 합쳐진 그룹에 포함되는 문자열을 빈번 멜로디를 나타내는 문자열로 추출하는 단계를 더 포함시킬 수 있다. 도 13은 이러한 실시예에 따라 표 1에 나타난 리스트를 기초로 최종적으로 빈번 멜로디를 나타내는 문자열이 추출된 결과를 나타낸다. 첫 번째 그룹과 두 번째 그룹은 상당한 부분이 오버랩되므로 하나의 그룹으로 합쳐졌으며, 세 번째 그룹과 네 번째 그룹 역시 마찬가지로 하나의 그룹으로 합쳐졌다. 따라서 최종적으로 2개의 그룹이 생성되고, 이들 그룹에 포함된 문자열을 빈번 멜로디를 나타내는 문자열로 취급한다.As described above, when the frequent melody generation is completed in all groups, a frequent melody consisting of nodes frequently generated in each group may be generated. However, as shown in FIG. 12, a situation in which frequent melodies belonging to two groups may overlap. At this time, if you store the frequent melody in each group separately, a lot of duplicate data will occur. Therefore, to prevent this, overlapping melodies can be treated as one melody by combining overlapping groups into one group. Therefore, if there is an overlapping string between each group, FIG. 9 may further include extracting a string included in a group in which the corresponding groups are combined into a string representing frequent melody. FIG. 13 illustrates a result of extracting a string representing frequent melodies finally based on the list shown in Table 1 according to this embodiment. The first and second groups were merged into one group because of the significant overlap, and the third and fourth groups were likewise merged into one group. Therefore, two groups are finally created, and the strings included in these groups are treated as strings representing frequent melodies.

상술한 과정을 통하여 생성된 빈번 멜로디를 나타내는 문자열은 도 2에 도시된 제2-1 인덱스(230)에 저장한다. 여기서 문자열을 저장하는 형태는 제1 인덱스(220)와 마찬가지로, 서픽스 트리 형태로 저장하는 것이 바람직하다.The string representing the frequent melody generated through the above process is stored in the 2-1 index 230 shown in FIG. Here, the form of storing the character string is preferably stored in the form of a suffix tree, similarly to the first index 220.

이제, 두 번째 의미 있는 멜로디인 소정 길이 이상의 쉼표를 경계로 나누어지는 멜로디를 나타내는 문자열을 추출하는 과정을 설명한다. 이를 위하여 상술한 도 1의 120단계, 즉 멜로디를 나타내는 특징 데이터를 추출하는 과정에서 소정 길이 이상의 쉼표의 위치 정보를 따로 저장해 놓는다. 그리고 그 위치를 경계로 하여 음악을 나눔으로써 여러 개의 쉼표로 나누어진 멜로디를 생성한다. 소정 길이 이상의 쉼표란 멜로디의 연속된 흐름이 끊어지는 부분으로서, 소정 길이를 어떤 값으로 정의하느냐에 따라 쉼표를 경계로 나누어지는 멜로디의 길이가 달라질 수 있다. 예를 들어 한 박자, 즉 4분 쉼표를 기준으로 멜로디를 나눈다면, 한 박자 이상의 길이를 갖는 쉼표가 나타난 곳을 경계로 멜로디를 나눈다. Now, a process of extracting a string representing a melody divided by a boundary of a comma of a predetermined length or more, which is a second meaningful melody, will be described. To this end, in step 120 of FIG. 1, that is, in the process of extracting the feature data representing the melody, comma position information of a predetermined length or more is separately stored. And the music is divided by the position to create a melody divided into multiple commas. The comma of the predetermined length or more is a portion in which the continuous flow of the melody is broken, and the length of the melody divided by the comma as a boundary may vary depending on the value defined as the predetermined length. For example, if you divide a melody based on one beat, that is, a four-minute comma, divide the melody around where the comma that is longer than one beat appears.

도 14는 짧은 멜로디를 한 박자 이상의 쉼표로 나눈 결과를 나타내는 도면이다. 특징 데이터를 추출하는 과정에서, 한 박자의 쉼표는 앞 음표의 특징 데이터를 생성하는데 사용되고, 쉼표의 특징 데이터는 무시되면서 단지 그 위치 정보만 저장된다. 그리고 문자 형태로 변환한 후 저장해 놓은 쉼표 위치를 경계로 멜로디를 나눈다. 도시된 바와 같이 4분 쉼표를 경계로 문자열 [x,w,x]와 [x]가 각각 생성되었엄을 알 수 있다.14 shows the result of dividing a short melody by one or more beats. In the process of extracting feature data, a beat of a comma is used to generate feature data of the preceding note, and only the positional information is stored while the feature data of the comma is ignored. After converting it to character form, the melody is divided by the saved comma position. As shown in the figure, it can be seen that the strings [x, w, x] and [x] have been generated on the basis of the quarter comma.

상술한 과정을 통하여 생성된 빈번 멜로디를 나타내는 문자열은 도 2에 도시된 제2-2 인덱스(240)에 저장한다. 여기서 문자열을 저장하는 형태는 제1 인덱스(220) 및 제2-1 인덱스(230)와 마찬가지로, 서픽스 트리 형태로 저장하는 것이 바람직하다.The string representing the frequent melody generated through the above-described process is stored in the 2-2 index 240 shown in FIG. Here, the form of storing the character string is preferably stored in the form of a suffix tree, similarly to the first index 220 and the second-first index 230.

도 15는 상술한 본 발명의 실시예에 따라서 모든 멜로디를 나타내는 문자열, 빈번 멜로디를 나타내는 문자열, 쉼표를 기준으로 나누어진 멜로디를 나타내는 문자열을 추출하여 저장하는 과정을 나타낸 개념도이다. 도시된 바와 같이, 먼저, 음악 전체를 나타내는 문자열을 서픽스 트리 형태로 제1 인덱스로 저장하고, 음악 전체를 나타내는 문자열로부터 빈번 멜로디를 나타내는 문자열을 추출하고, 제2-1 인덱스로 저장하며, 음악 전체를 나타내는 문자열로부터 쉼표를 기준으로 나누어진 멜로디를 추출하여 제2-2 인덱스로 저장한다. 서픽스 트리를 사용하게 되면 사용자가 서픽스 트리에 저장된 멜로디 안의 임의의 부분부터 질의하여도 검색이 가능하게 된다. 허밍 질의를 입력으로 도 15에 도시된 바에 따라 구축된 음악 데이터베이스를 통하여 음악 검색을 하는 경우, 우선 제2-1 인덱스 및 제2-2 인덱스를 먼저 검색하고, 그 다음에 제1 인덱스를 검색하면 사용자가 원하는 음악을 검색하는 데 걸리는 시간을 줄일 수 있게 된다. FIG. 15 is a conceptual diagram illustrating a process of extracting and storing a string representing all melodies, a string representing frequent melodies, and a string representing melodies divided based on a comma according to an embodiment of the present invention. As shown, first, a string representing the entire music is stored as a first index in the form of a suffix tree, and a string representing a frequent melody is extracted from the string representing the entire music, and stored as a 2-1 index. The melody divided based on the comma is extracted from the string representing the whole and stored as the 2-2 index. Using a suffix tree enables users to search from any part of the melody stored in the suffix tree. When music is searched through a music database constructed as shown in FIG. 15 with a humming query as an input, first, the 2-1 index and the 2-2 index are first searched, and then the first index is searched. This can reduce the time it takes for the user to search for the desired music.

도 16은 본 발명의 일 실시예에 따른 허밍 질의를 입력으로 하여 음악을 검색하는 장치의 블록도이다. 도 16을 참조하면, 본 실시예에 따른 음악 검색 장치는 질의 전처리부(1610), 검색부(1620), 디스플레이(1630)부, 음악 데이터베이스(1640)를 포함하여 이루어진다. 16 is a block diagram of an apparatus for searching for music by inputting a humming query according to an embodiment of the present invention. Referring to FIG. 16, the music search apparatus according to the present embodiment includes a query preprocessor 1610, a searcher 1620, a display 1630, and a music database 1640.

음악 데이터베이스(1640)에는 상술한 음악 데이터베이스 구축 방법에 따라 도 2에 도시된 바와 마찬가지로 데이터가 저장되어 있다. 즉, 음악 데이터베이스(1640)는 각종 음악의 멜로디를 나타내는 특징 데이터를 저장하는 특징 데이터 저장부(210), 특징 데이터가 문자열로 변환되어 저장된 제1 인덱스(220), 의미 있는 멜로디로서 빈번 멜로디 및 소정 길이 이상의 쉼표를 경계로 나누어지는 멜로디를 각각 저장하는 제2-1 인덱스(230) 및 제2-2 인덱스(240)를 포함한다.The music database 1640 stores data as shown in FIG. 2 according to the above-described music database construction method. That is, the music database 1640 may include a feature data storage 210 that stores feature data representing melodies of various types of music, a first index 220 in which feature data is converted into a character string, and a frequent melody and a predetermined melody as a meaningful melody. It includes a 2-1 index 230 and a 2-2 index 240 for storing the melody divided by the comma or more boundaries than the length, respectively.

질의 전처리부(1610)는 사용자로부터 허밍을 질의로서 입력받아, 멜로디를 나타내는 특징 데이터를 추출하고, 추출된 특징 데이터를 문자열로 변환하는 질의 전처리 과정을 수행한다. 입력받은 질의는 사용자가 마이크를 통해 흥얼거린 허밍이다. 허밍 데이터는 상술한 음악 데이터베이스(1640) 구축을 위해 입력되는 형태인 미디와 달리 웨이브(wave) 형태를 지니고 있다. 따라서, 질의 전처리부(1610)는 우선 웨이브 형태의 허밍 데이터에서 미디 형태에 들어 있는 정보와 같이 음의 높이와 길이, 그리고 쉼표의 높이를 추출한다. 그리고, 이렇게 추출된 정보로부터 특징 데이터 저장부(210)에 저장된 각종 음악의 특징 데이터와 같은 형태로 특징 데이터를 추출한다. 즉, 음표 또는 쉼표의 높이의 변화량과 길이의 변화율을 계산한다. 다음으로, 질의 전처리부(1610)는 허밍의 특징 데이터를 문자열 형태로 변환한다. 이때 물론, 특징 데이터베이스의 구축 과정에서 각종 음악의 특징 데이터가 문자열로 변환되는 기준과 동일한 기준을 사용한다. The query preprocessor 1610 receives a humming from the user as a query, extracts feature data representing a melody, and performs a query preprocessing process of converting the extracted feature data into a string. The query received is a humming humming through the microphone. The humming data has a wave form, unlike MIDI, which is a form input for the above-described music database 1640. Therefore, the query preprocessor 1610 first extracts the height and length of the sound and the height of the comma from the wave-shaped humming data like the information contained in the MIDI form. Then, the feature data is extracted from the extracted information in the same form as feature data of various music stored in the feature data storage 210. That is, the amount of change in the height of the note or the rest and the rate of change in the length are calculated. Next, the query preprocessor 1610 converts the feature data of the humming into a string form. At this time, of course, in the construction of the feature database, the same criteria as that of the feature data of various musics are converted into character strings are used.

검색부(1620)는 질의 전처리부(1610)에서 허밍으로부터 추출된 문자열을 가지고 음악 데이터베이스(1640)에 저장된 각종 음악의 제1 인덱스(220), 제2-1 인덱스(220), 제2-2 인덱스(240) 또는 특징 데이터로부터 음악을 검색한다. 이때 검색부(1620)는 문자열이 서픽스 트리 형태로 저장된 각 인덱스로부터 음악을 검색하는 경우 문자열의 비교 방법으로 정확 매칭 알고리즘(Exact Matching Algorithm)을 사용할 수 있다.The search unit 1620 may include the first index 220, the second-first index 220, and the second-second index of various kinds of music stored in the music database 1640 with the string extracted from the humming in the query preprocessor 1610. The music is retrieved from the index 240 or the feature data. In this case, the search unit 1620 may use an Exact Matching Algorithm as a method of comparing strings when searching for music from each index stored in a suffix tree form.

그리고, 디스플레이(1630)는 검색부(1620)에서 검색된 결과를 사용자가 알 수 있도록 표시한다. 이때 예를 들어 검색된 음악의 곡명, 가수 등을 검색 결과로서 표시할 수 있다. In addition, the display 1630 displays the search result of the searcher 1620 so that the user can know. At this time, for example, the song name, singer, and the like of the found music can be displayed as a search result.

도 17은 본 발명의 일 실시예에 따른 허밍 질의를 입력으로 하여 음악을 검색하는 방법의 흐름도이다. 본 실시예에 따른 음악 검색 방법은 도 16에 도시된 음악 검색 장치에서 수행된다. 17 is a flowchart illustrating a method for searching for music by inputting a humming query according to an embodiment of the present invention. The music searching method according to the present embodiment is performed in the music searching apparatus shown in FIG.

음악 검색 장치는 사용자로부터 허밍을 질의로서 입력받는다(1710단계).The music retrieval apparatus receives a humming as a query from the user (step 1710).

질의 전처리부(1610)는 입력받은 허밍에 대하여 상술한 바와 같은 질의 전처리 과정을 수행한다(1715단계).The query preprocessor 1610 performs the query preprocessing process as described above with respect to the received humming (step 1715).

검색부(1620)는 질의 전처리 과정을 통해 변환된 허밍 데이터에 따라 제2-1 인덱스로부터 음악을 검색하고(1720단계), 이와 병렬적으로 제2-2 인덱스로부터 음악을 검색한다(1725단계) .The search unit 1620 searches for music from the 2-1 index according to the humming data converted through the query preprocessing process (step 1720), and searches music from the 2-2 index in parallel (step 1725). .

검색이 성공하면(1730단계), 검색 결과를 디스플레이(1630)를 통하여 출력한다(1735단계). 사용자는 출력되는 검색 결과를 보고 자신이 원하는 음악이 검색되었으면 음악 검색 장치에 마련된 사용자 인터페이스(미도시)를 통하여 검색을 중지시킬 수 있다. 따라서 사용자로부터 검색 중지 명령이 입력되면(1780단계), 검색을 종료한다.If the search is successful (step 1730), the search result is output via the display 1630 (step 1735). The user may stop the search through a user interface (not shown) provided in the music search apparatus when the desired music is searched based on the search result output. Therefore, when a search stop command is input from the user (step 1780), the search ends.

1730단계에서 검색이 실패하면, 혹은 검색 결과가 나오더라도 사용자로부터 검색 중지가 요청되지 않으면 검색부(1620)는 질의 전처리 과정을 통해 변환된 허밍 데이터에 따라 제1 인덱스로부터 음악을 검색한다(1740단계). If the search fails in step 1730 or if the search stop is not requested from the user even though the search result is displayed, the search unit 1620 searches for music from the first index according to the converted humming data through the query preprocessing step (step 1740). ).

검색이 성공하면(1745단계에서), 검색 결과를 디스플레이(1630)를 통하여 출력한다(1750단계). 상술한 제2-1 및 2-2 인덱스로부터의 검색과 마찬가지로, 사용자는 출력되는 검색 결과를 보고 자신이 원하는 음악이 검색되었으면 검색을 중지시킬 수 있다. 따라서, 제1 인덱스로부터의 검색 중에도 사용자로부터 검색 중지 명령이 입력되면(1780단계) 검색을 종료한다.If the search succeeds (at step 1745), the search result is output via the display 1630 (step 1750). Similar to the above-described search from the 2-1 and 2-2 indexes, the user may look at the output search result and stop the search if the desired music is searched. Accordingly, if the search stop command is input from the user even during the search from the first index (step 1780), the search ends.

제1 인덱스로부터도 검색 결과가 나오지 않거나, 사용자로부터 검색 중지가 요청되지 않으면, 검색부(1620)는 질의 전처리부(1610)에서 허밍 데이터가 변화된 숫자 형태의 특징 데이터를 가지고, 음악 데이터베이스(1640)에 저장된 특징 데이터로부터 음악을 검색한다(1755단계). 여기서, 허밍의 특징 데이터와 음악 데이터베이스(1640)에 저장된 특징 데이터와의 비교 방법으로는, 유클리디안 거리 함수를 사용하여 가까운 거리의 음악을 얻어내는 방법을 사용할 수 있다. 검색이 성공하면(1760단계), 검색 결과를 디스플레이(1630)를 통하여 출력하고(1770단계), 검색이 실패하면 디스플레이(1630)를 통하여 검색 실패를 알리는 메시지를 출력한다(1765단계). 특징 데이터로부터의 검색 중에도 사용자로부터 검색 중지 명령이 입력되면(1780단계), 검색을 종료한다. If the search result does not come out even from the first index or the search stop is not requested from the user, the search unit 1620 has the feature data in the form of numbers in which the humming data is changed in the query preprocessor 1610, and the music database 1640. The music is retrieved from the feature data stored in step 1755. Here, as a method of comparing the feature data of the humming and the feature data stored in the music database 1640, a method of obtaining music of a close distance by using the Euclidean distance function may be used. If the search is successful (step 1760), the search result is output through the display 1630 (step 1770). If the search fails, a message indicating the search failure is output through the display 1630 (step 1765). If a search stop command is input from the user even during the search from the feature data (step 1780), the search is terminated.

상술한 바와 같이, 본 실시예에 의하면, 우선 빈번 멜로디 및 쉼표 단위의 멜로디를 나타내는 문자열이 저장된 제2-1 인덱스 및 제2-2 인덱스로부터 검색을 수행한다(제1단계 검색). 따라서 사용자가 빈번 멜로디를 흥얼거렸거나, 일정 길이 이상의 쉼표 다음에 시작하는 멜로디를 흥얼거렸다면 제1단계 검색에서 검색이 완료되어 사용자에게 가장 빠른 시간 내에 검색 결과를 전달할 수 있다. 제1단계 검색에서 사용자가 원하는 검색 결과를 얻지 못했다면 음악 전체를 나타내는 문자열이 저장된 제1 인덱스로부터 검색을 수행한다(제2단계 검색). 제2단계 검색에 의해, 사용자가 빈번 멜로디 또는 쉼표 다음에 시작하는 멜로디를 질의하지 않더라도 검색이 완료될 수 있다. 물론, 제2단계 검색에서도 사용자가 원하는 검색 결과가 나오지 않을 수 있으므로, 마지막으로 숫자 형태로 저장된 특징 데이터로부터 음악을 검색한다(제3단계 검색). 숫자 형태의 특징 데이터는 음악을 가장 정확하게 표현하는 데이터이므로, 제3단계 검색에서 가장 정확한 검색이 이루어진다. 이처럼 본 실시예에 의하면, 사용자가 입력할 가능성이 가장 높은 질의를 바탕으로 검색하는 제1단계 검색을 먼저 수행한다. 또한, 상대적으로 검색 속도가 빠른 제1단계 검색 및 제2단계 검색을 먼저 수행하고, 나중에 제3단계 검색을 수행한다. 따라서 사용자가 원하는 음악을 검색하는 데 걸리는 시간을 최소화할 수 있으며, 검색 시간이 오래 걸리는 특징 데이터에의 접근을 최소화할 수 있다.As described above, according to the present embodiment, first, a search is performed from a 2-1 index and a 2-2 index in which a character string representing frequent melody and a melody in a comma unit is stored (first step search). Therefore, if the user hums a melody frequently, or hums a melody starting after a predetermined length or more, the search is completed in the first stage search, and the search result can be delivered to the user in the shortest time. If the user does not obtain the desired search result in the first step search, the search is performed from the first index in which the character string representing the entire music is stored (second step search). By the second stage search, the search can be completed even if the user does not query the melody starting frequently or after the comma. Of course, the search result desired by the user may not come out even in the second step search, and finally, music is searched from the feature data stored in the form of numbers (third step search). Since the feature data in the form of numbers is the data that most accurately represents music, the most accurate search is performed in the third stage search. As described above, according to the present exemplary embodiment, a first stage search is first performed based on a query most likely to be input by the user. In addition, the first stage search and the second stage search which are relatively fast in search are performed first, and the third stage search is performed later. Therefore, it is possible to minimize the time required to search for music desired by the user, and to minimize access to feature data that takes a long time.

한편, 상술한 본 발명의 실시예들은 컴퓨터에서 실행될 수 있는 프로그램으로 작성가능하고, 컴퓨터로 읽을 수 있는 기록매체를 이용하여 상기 프로그램을 동작시키는 범용 디지털 컴퓨터에서 구현될 수 있다. 상기 컴퓨터로 읽을 수 있는 기록매체는 마그네틱 저장매체(예를 들면, 롬, 플로피 디스크, 하드 디스크 등), 광학적 판독 매체(예를 들면, 시디롬, 디브이디 등) 및 캐리어 웨이브(예를 들면, 인터넷을 통한 전송)와 같은 저장매체를 포함한다.Meanwhile, the above-described embodiments of the present invention can be written as a program that can be executed in a computer, and can be implemented in a general-purpose digital computer that operates the program using a computer-readable recording medium. The computer-readable recording medium may be a magnetic storage medium (for example, a ROM, a floppy disk, a hard disk, etc.), an optical reading medium (for example, a CD-ROM, DVD, etc.) and a carrier wave (for example, the Internet). Storage medium).

이제까지 본 발명에 대하여 그 바람직한 실시예들을 중심으로 살펴보았다. 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자는 본 발명이 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 변형된 형태로 구현될 수 있음을 이해할 수 있을 것이다. 그러므로 개시된 실시예들은 한정적인 관점이 아니라 설명적인 관점에서 고려되어야 한다. 본 발명의 범위는 전술한 설명이 아니라 특허청구범위에 나타나 있으며, 그와 동등한 범위 내에 있는 모든 차이점은 본 발명에 포함된 것으로 해석되어야 할 것이다.So far I looked at the center of the preferred embodiment for the present invention. Those skilled in the art will appreciate that the present invention can be implemented in a modified form without departing from the essential features of the present invention. Therefore, the disclosed embodiments should be considered in descriptive sense only and not for purposes of limitation. The scope of the present invention is shown in the claims rather than the foregoing description, and all differences within the scope will be construed as being included in the present invention.

도 1은 본 발명의 일 실시예에 따른 음악 검색을 위한 음악 데이터베이스 구축 방법의 흐름도이다.1 is a flowchart illustrating a music database construction method for music search according to an embodiment of the present invention.

도 2는 본 발명의 일 실시예에 따른 음악 데이터베이스의 구조도이다.2 is a structural diagram of a music database according to an embodiment of the present invention.

도 3은 본 발명의 일 실시예에 따라 연속된 음표 간의 높이의 변화량과 길이의 변화율을 추출하는 방법을 나타낸 개념도이다.3 is a conceptual diagram illustrating a method for extracting a change rate of a height and a change rate of a length between consecutive notes according to an embodiment of the present invention.

도 4는 연속된 음표 사이에 쉼표가 존재하는 경우에 높이의 변화량과 길이의 변화율을 추출하는 방법을 나타낸 개념도이다.4 is a conceptual diagram illustrating a method of extracting a change rate of a height and a change rate of a length when a comma exists between consecutive notes.

도 5는 본 발명의 일 실시예에 따라 높이의 변화량과 길이의 변화율을 성분으로 하는 2차원 벡터 값을 문자 값으로 변환하는 규칙을 나타낸 개념도이다.FIG. 5 is a conceptual diagram illustrating a rule for converting a two-dimensional vector value having a change amount of height and a change rate of a length into character values according to an embodiment of the present invention.

도 6은 도 5에 도시된 바에 따른 변환 기준을 사용하여, 연속된 2차원 벡터 값의 연속을 문자열로 변환한 결과를 나타낸다.FIG. 6 illustrates a result of converting a sequence of successive two-dimensional vector values into a string using the conversion criteria shown in FIG. 5.

도 7은 본 발명의 일 실시예에 따라 빈번 멜로디를 추출하는 방법을 나타낸 흐름도이다.7 is a flowchart illustrating a method of extracting frequent melodies according to an embodiment of the present invention.

도 8은 마디 단위로 문자열 패턴을 분석하여 정보를 얻는 과정을 나타낸 개념도이다.8 is a conceptual diagram illustrating a process of obtaining information by analyzing a string pattern in units of nodes.

도 9는 도 7에 도시된 730단계를 보다 구체적으로 나타낸 흐름도이다. FIG. 9 is a flowchart illustrating step 730 of FIG. 7 in more detail.

도 10은 표 1에 나타난 리스트를 기초로 그룹을 생성한 결과를 나타내는 도면이다.FIG. 10 is a diagram illustrating a result of generating a group based on a list shown in Table 1. FIG.

도 11은 표 1에 나타난 리스트를 기초로, 도 10의 첫 번째 그룹에 대하여 빈 번 멜로디를 생성하는 과정을 표현한 도면이다. FIG. 11 is a diagram illustrating a process of generating an empty melody for the first group of FIG. 10 based on the list shown in Table 1. FIG.

도 12는 두 개의 그룹에 속한 빈번 멜로디가 오버랩되는 상황을 설명하기 위한 개념도이다. 12 is a conceptual diagram illustrating a situation in which frequent melodies belonging to two groups overlap.

도 13은 표 1에 나타난 리스트를 기초로 최종적으로 빈번 멜로디를 나타내는 문자열이 추출된 결과를 나타낸다. FIG. 13 illustrates a result of extracting a string representing frequent melodies finally based on the list shown in Table 1. FIG.

도 14는 짧은 멜로디를 한 박자 이상의 쉼표로 나눈 결과를 나타내는 도면이다.14 shows the result of dividing a short melody by one or more beats.

도 15는 모든 멜로디를 나타내는 문자열, 빈번 멜로디를 나타내는 문자열, 쉼표를 기준으로 나누어진 멜로디를 나타내는 문자열을 추출하여 저장하는 과정을 나타낸 개념도이다.15 is a conceptual diagram illustrating a process of extracting and storing a string representing all melodies, a string representing frequent melodies, and a string representing melodies divided based on commas.

도 16은 본 발명의 일 실시예에 따른 허밍 질의를 입력으로 하여 음악을 검색하는 장치의 블록도이다. 16 is a block diagram of an apparatus for searching for music by inputting a humming query according to an embodiment of the present invention.

도 17은 본 발명의 일 실시예에 따른 허밍 질의를 입력으로 하여 음악을 검색하는 방법의 흐름도이다.17 is a flowchart illustrating a method for searching for music by inputting a humming query according to an embodiment of the present invention.

Claims (18)

음악 검색을 위한 음악 데이터베이스 구축 방법에 있어서,In the music database construction method for music search, (a) 음악 파일을 입력받아 멜로디를 나타내는 특징 데이터를 추출하는 단계;(a) receiving a music file and extracting feature data representing a melody; (b) 상기 추출된 특징 데이터를 문자열로 변환하는 단계;(b) converting the extracted feature data into a character string; (c) 상기 변환된 문자열을 검색의 기초가 되는 제1 인덱스로 저장하는 단계; 및(c) storing the converted string as a first index on which a search is based; And (d) 상기 변환된 문자열로부터 의미 있는 멜로디를 나타내는 문자열을 추출하여 검색의 기초가 되는 제2 인덱스로 저장하는 단계를 포함하는 것을 특징으로 하는 음악 데이터베이스 구축 방법.and (d) extracting a character string representing a meaningful melody from the converted character string and storing the character string representing a meaningful melody as a second index as a basis of a search. 제1항에 있어서,The method of claim 1, 상기 특징 데이터는 연속된 음표 간의 높이의 변화량과 길이의 변화율을 포함하는 것을 특징으로 하는 음악 데이터베이스 구축 방법.And the feature data includes a change rate of a height and a change rate of a length between consecutive notes. 제2항에 있어서,The method of claim 2, 상기 (b) 단계는, 상기 높이의 변화량과 상기 길이의 변화율의 조합을 소정 규칙에 따라 문자에 대응시킴으로써 상기 특징 데이터를 문자열로 변환하는 것을 특징으로 하는 음악 데이터베이스 구축 방법.In the step (b), converting the feature data into a character string by associating a combination of the change amount of the height and the change rate of the length with a character according to a predetermined rule. 제3항에 있어서,The method of claim 3, 상기 (b) 단계는, 상기 높이의 변화량과 상기 길이의 변화율을 각 축으로 하는 2차원 공간을 복수 개의 구역으로 나누어, 동일한 구역에 속하는 상기 높이의 변화량과 상기 길이의 변화율의 조합을 동일한 문자에 대응시키는 것을 특징으로 하는 음악 데이터베이스 구축 방법.In the step (b), the two-dimensional space having the change amount of the height and the change rate of the length as each axis is divided into a plurality of zones, and the combination of the change amount of the height and the change rate of the length belonging to the same zone is assigned to the same letter. And a music database construction method for matching. 제1항에 있어서, The method of claim 1, 상기 (c) 단계 및 상기 (d) 단계에서, 상기 문자열의 저장은 서픽스 트리(suffix tree) 형태로 저장하는 것을 특징으로 하는 음악 데이터베이스 구축 방법.In the steps (c) and (d), the storage of the character string is stored in the form of a suffix tree. 제1항에 있어서, 상기 (d) 단계는, The method of claim 1, wherein step (d) (d1) 상기 의미 있는 멜로디를 나타내는 문자열로서, 하나의 음악에서 빈번하게 발생되는 멜로디인 빈번 멜로디를 나타내는 문자열을 추출하여 검색의 기초가 되는 제2-1 인덱스로 저장하는 단계; 또는 (d1) extracting a string representing a frequent melody, which is a melody frequently generated in one piece of music, as a string representing the meaningful melody, and storing the string as a 2-1 index which is a search base; or (d2) 상기 의미 있는 멜로디를 나타내는 문자열로서, 소정 길이 이상의 쉼표를 경계로 나누어지는 멜로디를 나타내는 문자열을 추출하여 검색의 기초가 되는 제2-2 인덱스로 저장하는 단계를 포함하는 것을 특징으로 하는 음악 데이터베이스 구축 방법.(d2) a character string representing the meaningful melody, and extracting a character string representing a melody divided by a comma of a predetermined length or more into a boundary and storing the string as a 2-2 index which is the basis of the search. How to build a database. 제6항에 있어서,The method of claim 6, 상기 (d1) 단계는, Step (d1), (d11) 음악의 마디 단위로 문자열 패턴을 분석하여, 마디 단위의 문자열, 마디 위치, 발생 회수, 및 상기 발생 회수의 순위를 나타내는 리스트를 얻는 단계;(d11) analyzing the character string pattern in units of measure of music, and obtaining a list indicative of the character string in units of units, the position of nodes, the number of occurrences, and the rank of the number of occurrences; (d12) 상기 반복 회수의 순위가 가장 높은 마디들 각각을 대표 마디로 포함하는 그룹들을 생성하는 단계;(d12) generating groups including each node having the highest rank of the number of repetitions as a representative node; 상기 생성된 각 그룹에 대하여, (d13) 상기 대표 마디와 인접하는 마디의 발생 회수를 소정 제1 임계값과 비교하고, 그 결과에 따라 상기 인접하는 마디를 그룹에 합치는 단계; 및 (d14) 상기 대표 마디의 발생 회수의 순위와 합쳐진 마디의 발생 회수의 순위의 차가 누적된 값을 소정 제2 임계값과 비교하고, 그 결과에 따라 상기 (d13) 단계를 반복하거나 종료하는 단계; 및For each of the created groups, (d13) comparing the number of occurrences of nodes adjacent to the representative node with a predetermined first threshold value and joining the adjacent nodes to the group according to the result; And (d14) comparing the accumulated value of the rank of the occurrence number of nodes combined with the rank of the number of occurrences of the representative node with a predetermined second threshold value, and repeating or terminating the step (d13) according to the result. ; And (d15) 상기 (d13) 단계 및 상기 (d14) 단계가 수행된 결과 얻어진 각 그룹에 포함되는 문자열을 상기 빈번 멜로디를 나타내는 문자열로서 추출하는 단계를 포함하는 것을 특징으로 하는 음악 데이터베이스 구축 방법.(d15) extracting a character string included in each group obtained as a result of performing steps (d13) and (d14) as a character string representing the frequent melody. 제7항에 있어서, 상기 얻어진 각 그룹 간에 오버랩되는 문자열이 존재하는 경우, 해당하는 그룹들이 합쳐진 그룹에 포함되는 문자열을 상기 빈번 멜로디를 나타내는 문자열로서 추출하는 단계를 더 포함하는 것을 특징으로 하는 음악 데이터베이스 구축 방법.The music database of claim 7, further comprising extracting a character string included in the group in which the corresponding groups are combined as a character string representing the frequent melody when there is an overlapping character string between the obtained groups. How to build. 허밍 질의를 입력으로 하여 음악을 검색하는 방법에 있어서,In a method for searching music by inputting a humming query, (a) 허밍을 질의로서 입력받는 단계;(a) receiving a humming as a query; (b) 상기 입력받은 허밍으로부터 멜로디를 나타내는 특징 데이터를 추출하고, 상기 추출된 특징 데이터를 문자열로 변환하는 단계;(b) extracting feature data representing a melody from the received humming and converting the extracted feature data into a character string; (c) 상기 변환된 문자열에 따라, 각종 음악의 멜로디를 나타내는 특징 데이터가 문자열로 변환되어 저장된 제1 인덱스 및 상기 변환된 문자열로부터 의미 있는 멜로디를 나타내는 문자열이 추출되어 저장된 제2 인덱스를 저장하고 있는 음악 데이터베이스를 이용하여 음악을 검색하는 단계를 포함하는 것을 특징으로 하는 음악 검색 방법.(c) storing, according to the converted character string, feature data representing melodies of various kinds of music, converted into a character string, and storing a first index stored in the character string and a second index extracted and stored from the converted character string. Searching for music using a music database. 제10항에 있어서, 상기 (b) 단계는,The method of claim 10, wherein step (b) comprises: 상기 입력받은 허밍을 구성하는 음표의 높이와 길이를 추출하는 단계; 및Extracting a height and a length of a musical note constituting the received humming; And 상기 추출된 음표의 높이와 길이로부터 연속된 음표 간의 높이의 변화량과 길이의 변화율을 포함하는 데이터를 상기 특징 데이터로서 추출하는 단계; 및Extracting, as the feature data, data including an amount of change in height and a rate of change in length from the height and the length of the extracted note; And 상기 추출된 특징 데이터를 문자열로 변환하는 단계를 포함하는 것을 특징으로 하는 음악 검색 방법.And converting the extracted feature data into a character string. 제10항에 있어서,The method of claim 10, 상기 제2 인덱스는, 상기 의미 있는 멜로디를 나타내는 문자열로서, 빈번하게 발생되는 멜로디인 빈번 멜로디를 나타내는 문자열을 추출하여 저장된 제2-1 인 덱스 또는 소정 길이 이상의 쉼표를 경계로 나누어지는 멜로디를 나타내는 문자열을 추출하여 저장된 제2-2 인덱스를 포함하는 것을 특징으로 하는 음악 검색 방법.The second index is a string representing the meaningful melody, and a string representing a melody divided by a boundary of a 2-1 index or a comma of a predetermined length or more, which is stored by extracting a string representing a frequent melody that is a frequently generated melody. And extracting the stored 2-2 index. 제11항에 있어서,The method of claim 11, 상기 (d) 단계는,In step (d), 상기 변환된 문자열에 따라, 상기 제2-1 인덱스 및 상기 제2-2 인덱스로부터 음악을 검색하는 단계; 및 Searching for music from the 2-1 index and the 2-2 index according to the converted character string; And 상기 변환된 문자열에 따라 상기 제1 인덱스로부터 음악을 검색하는 단계를 포함하는 것을 특징으로 하는 음악 검색 방법.Retrieving music from the first index according to the converted character string. 제12항에 있어서,The method of claim 12, 상기 음악 데이터베이스는 상기 각종 음악의 멜로디를 나타내는 특징 데이터를 더 저장하고 있고, The music database further stores characteristic data representing melodies of the various music, 상기 (d) 단계는, 상기 (a) 단계에서 추출된 특징 데이터에 따라 상기 음악 데이터베이스에 저장된 특징 데이터로부터 음악을 검색하는 단계를 더 포함하는 것을 특징으로 하는 음악 검색 방법.The step (d) further comprises the step of searching for music from the feature data stored in the music database according to the feature data extracted in the step (a). 허밍 질의를 입력으로 하여 음악을 검색하는 장치에 있어서,In the device for searching music by inputting a humming query, 허밍을 입력받아, 멜로디를 나타내는 특징 데이터를 추출하고, 상기 추출된 특징 데이터를 문자열로 변환하는 질의 전처리부;A query preprocessor configured to receive a humming input, extract feature data representing a melody, and convert the extracted feature data into a character string; 상기 검색을 위한 인덱스로서, 각종 음악의 멜로디를 나타내는 특징 데이터가 문자열로 변환되어 저장된 제1 인덱스 및 상기 변환된 문자열로부터 의미 있는 멜로디를 나타내는 문자열이 추출되어 저장된 제2 인덱스를 저장하고 있는 음악 데이터베이스; 및A music database storing, as an index for the search, a first index in which feature data representing melodies of various music is converted into a character string, and a second index in which a character string representing a meaningful melody is extracted from the converted character string; And 상기 허밍으로부터 변환된 문자열에 따라, 상기 음악 데이터베이스로부터 음악을 검색하는 음악 검색부를 포함하는 것을 특징으로 하는 음악 검색 장치.And a music search unit for searching for music from the music database according to the string converted from the humming. 제14항에 있어서, 상기 질의 전처리부는 상기 입력받은 허밍을 구성하는 음표의 높이와 길이를 추출하고, 상기 추출된 음표의 높이와 길이로부터 연속된 음표 간의 높이의 변화량과 길이의 변화율을 포함하는 데이터를 상기 특징 데이터로서 추출하는 것을 특징으로 하는 음악 검색 장치.15. The method of claim 14, wherein the query preprocessor extracts a height and a length of a note constituting the received humming, and includes data including a rate of change of a height and a change rate of a length between consecutive notes from the height and length of the extracted note. Extracting the data as the feature data. 제14항에 있어서,The method of claim 14, 상기 제2 인덱스는, 상기 의미 있는 멜로디를 나타내는 문자열로서, 빈번하게 발생되는 멜로디인 빈번 멜로디를 나타내는 문자열을 추출하여 저장된 제2-1 인덱스 또는 소정 길이 이상의 쉼표를 경계로 나누어지는 멜로디를 나타내는 문자열을 추출하여 저장된 제2-2 인덱스를 포함하는 것을 특징으로 하는 음악 검색 장치.The second index is a character string representing a meaningful melody, and is a string representing a melody divided by a boundary of a 2-1 index or a comma of a predetermined length or more, which is extracted by extracting a character string indicating a frequent melody that is a frequently generated melody. And a second-2 index extracted and stored. 제16항에 있어서,The method of claim 16, 상기 음악 검색부는, 우선 상기 제2-1 인덱스 및 상기 제2-2 인덱스로부터 음악을 검색하고, 다음으로 상기 제1 인덱스로부터 음악을 검색하는 것을 특징으로 하는 음악 검색 장치.And the music searching unit first searches music from the 2-1 index and the 2-2 index, and then searches music from the first index. 제17항에 있어서,The method of claim 17, 상기 음악 데이터베이스는 상기 각종 음악의 멜로디를 나타내는 특징 데이터를 더 저장하고 있고,The music database further stores characteristic data representing melodies of the various music, 상기 음악 검색부는, 상기 제1 인덱스로부터 음악을 검색한 이후에 상기 질의 전처리부에서 추출된 특징 데이터에 따라 상기 음악 데이터베이스에 저장된 특징 데이터로부터 음악을 검색하는 것을 특징으로 하는 음악 검색 장치.And the music retrieval unit retrieves music from the feature data stored in the music database according to the feature data extracted by the query preprocessor after retrieving music from the first index.
KR1020080009865A 2008-01-31 2008-01-31 Method for building music database for music search, method and apparatus for searching music based on humming query KR20090083972A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020080009865A KR20090083972A (en) 2008-01-31 2008-01-31 Method for building music database for music search, method and apparatus for searching music based on humming query

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020080009865A KR20090083972A (en) 2008-01-31 2008-01-31 Method for building music database for music search, method and apparatus for searching music based on humming query

Publications (1)

Publication Number Publication Date
KR20090083972A true KR20090083972A (en) 2009-08-05

Family

ID=41204596

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020080009865A KR20090083972A (en) 2008-01-31 2008-01-31 Method for building music database for music search, method and apparatus for searching music based on humming query

Country Status (1)

Country Link
KR (1) KR20090083972A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100969870B1 (en) * 2010-02-01 2010-07-13 전자부품연구원 An audio searching system based on variable weighys and audio input characteristics
KR101376478B1 (en) * 2012-05-09 2014-03-19 (주)마이오디 Configuration Method for Finding Source Environment, Source search device and Source search system
KR101395135B1 (en) * 2013-04-29 2014-05-15 주식회사 뮤즈넷 Music retrieval method
WO2016085042A1 (en) * 2014-11-28 2016-06-02 비씨카드(주) Card use pattern analysis method for predicting type of business used, and server for performing same
US9465912B2 (en) 2013-05-03 2016-10-11 Samsung Electronics Co., Ltd. Method and apparatus for mining temporal pattern

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100969870B1 (en) * 2010-02-01 2010-07-13 전자부품연구원 An audio searching system based on variable weighys and audio input characteristics
KR101376478B1 (en) * 2012-05-09 2014-03-19 (주)마이오디 Configuration Method for Finding Source Environment, Source search device and Source search system
KR101395135B1 (en) * 2013-04-29 2014-05-15 주식회사 뮤즈넷 Music retrieval method
US9465912B2 (en) 2013-05-03 2016-10-11 Samsung Electronics Co., Ltd. Method and apparatus for mining temporal pattern
WO2016085042A1 (en) * 2014-11-28 2016-06-02 비씨카드(주) Card use pattern analysis method for predicting type of business used, and server for performing same
CN107004221A (en) * 2014-11-28 2017-08-01 Bc卡有限公司 For predict using industry card use pattern analysis method and perform its server

Similar Documents

Publication Publication Date Title
US7788279B2 (en) System and method for storing and retrieving non-text-based information
Meredith et al. Algorithms for discovering repeated patterns in multidimensional representations of polyphonic music
JP3467415B2 (en) Music search device, music search method, and recording medium recording music search program
JP2004534274A (en) Method and system for displaying music information on a digital display for use in content-based multimedia information retrieval
WO2001020609A2 (en) Music searching methods based on human perception
KR20090083972A (en) Method for building music database for music search, method and apparatus for searching music based on humming query
Wang et al. An effective and efficient method for query by humming system based on multi-similarity measurement fusion
JP3631650B2 (en) Music search device, music search method, and computer-readable recording medium recording a music search program
JP2000155759A (en) Retrieval device and storage device, and retrieving method and storing method for music information, and storage medium where programs thereof are recorded
JP3597735B2 (en) Music search device, music search method, and recording medium recording music search program
JP2004219804A (en) System, processing method, and program for similar voice music search, recording medium of program
Doraisamy et al. A Comparative and Fault-tolerance Study of the Use of N-grams with Polyphonic Music.
JP3612272B2 (en) Music information search device, music information search method, and computer-readable recording medium storing music information search program
US20080017017A1 (en) Method and Apparatus for Melody Representation and Matching for Music Retrieval
Rho et al. FMF (fast melody finder): A web-based music retrieval system
You et al. An efficient frequent melody indexing method to improve the performance of query-by-humming systems
Huang et al. A repeating pattern based Query-by-Humming fuzzy system for polyphonic melody retrieval
JP4241445B2 (en) Music content search device, program, and computer-readable recording medium
Wongsaroj et al. A music similarity measure based on chord progression and song segmentation analysis
JP2004333605A (en) Device, method, and program for successive retrieval result use type similar music retrieval, and recording medium for the same program
JP2008257020A (en) Method and device for calculating degree of similarity of melody
Shen et al. Whistle for music: using melody transcription and approximate string matching for content-based query over a MIDI database
Martin et al. Indexing musical pieces using their major repetition
KR101302568B1 (en) Fast music information retrieval system based on query by humming and method thereof
Zhu et al. Melody Curve Processing For Music Retrieval.

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E601 Decision to refuse application