Song recognition model training method and device, storage medium and program product

By adapting the original song to generate a cover version and expanding the same song group, the problem of low recognition accuracy of original songs in traditional technology has been solved, and a higher recognition accuracy of cover songs has been achieved.

CN119207470APending Publication Date: 2024-12-27TENCENT MUSIC ENTERTAINMENT TECH (SHENZHEN) CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411340390.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

Traditional song recognition models have difficulty accurately identifying original songs in the absence of cover versions, resulting in low recognition accuracy.

Method used

By obtaining the original lyrics, accompaniment and vocals of the original song, adapting them, generating adapted songs, and expanding the same song group of the original songs, thereby training a more accurate song recognition model.

Benefits of technology

The recognition accuracy of cover songs is improved, especially when the same song group is incomplete, ensuring that each original song can be effectively added to the model training, significantly improving the recognition accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119207470A_ABST
    Figure CN119207470A_ABST
Patent Text Reader

Abstract

The invention relates to a training method of a song recognition model. The method comprises the following steps: acquiring original lyrics, original accompaniment and original human sound of a target original song to be recompiled; modifying the original lyrics, the original accompaniment and the original human voice to obtain at least one group of modified lyrics, modified accompaniment and modified human voice of the target original song; determining at least one modified song of the target original song based on the original lyrics, the modified lyrics, the original accompaniment, the modified accompaniment, the original human voice and the modified human voice; constructing a same song group of the target original song at least based on the target original song and the modified song, and training a to-be-trained song recognition model at least based on the same song group of the target original song; the trained song recognition model is used for extracting a first song feature of a to-be-recognized song object; the first song feature is used for determining a song name corresponding to the song object in combination with each second song feature in a feature library. By adopting the method, the song identification accuracy can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a training method, device, storage medium and program product for a song recognition model. Background Art

[0002] Song cover recognition refers to identifying the song name of the original song to which the cover song belongs. At present, song cover recognition is mainly achieved through a trained song recognition model. In traditional technology, the training data of the song recognition model is mainly the data of the same cover song group in the music library. The same cover song group contains an original song and other versions of the song. The other versions of the song include cover versions or live versions, etc. Then, song triplets are constructed based on the same cover song group to realize model training. However, the same song group data in the music library is usually incomplete, that is, many songs do not have so many cover versions, or many original songs do not have cover versions at all, only one independent original song, which makes these original songs unable to be added to the model for training. In actual application, if you encounter these cover versions of the original songs that have not been trained, it is difficult for the song recognition model to accurately identify them, resulting in a low recognition accuracy rate for cover songs. Summary of the invention

[0003] Based on this, it is necessary to provide a training method, device, storage medium and program product for a song recognition model that can improve the accuracy of song recognition in response to the above technical problems.

[0004] In a first aspect, the present application provides a method for training a song recognition model, the method comprising:

[0005] Obtaining the original lyrics, original accompaniment and original vocals of the target original song to be adapted;

[0006] Adapting the original lyrics, original accompaniment and original vocals respectively to obtain at least one set of adapted lyrics, at least one set of adapted accompaniment and at least one set of adapted vocals of the target original song;

[0007] Based on the original lyrics, the at least one group of adapted lyrics, the original accompaniment, the at least one group of adapted accompaniment, the original vocals, and the at least one group of adapted vocals, at least one adapted song of the target original song is determined; each of the adapted songs comprises target lyrics, target accompaniment, and target vocals; the target lyrics are the original lyrics or the adapted lyrics, the target accompaniment is the original accompaniment or the adapted accompaniment, and the target vocals are the original vocals or the adapted vocals; and each of the adapted songs comprises at least one of the adapted lyrics, the adapted accompaniment, and the adapted vocals;

[0008] A same song group of the target original song is constructed at least based on the target original song and at least one adapted song of the target original song; a song recognition model to be trained is trained at least based on the same song group of the target original song to obtain a trained song recognition model; the trained song recognition model is used to extract a first song feature of a song object to be recognized; the first song feature is used to determine a song name corresponding to the song object in combination with each second song feature in a pre-constructed feature library.

[0009] In a second aspect, the present application provides a training device for a song recognition model, the device comprising:

[0010] An acquisition module is used to acquire the original lyrics, original accompaniment and original vocals of the target original song to be adapted;

[0011] An adaptation module, used to adapt the original lyrics, original accompaniment and original vocals respectively, to obtain at least one set of adapted lyrics, at least one set of adapted accompaniment and at least one set of adapted vocals of the target original song;

[0012] A determination module, for determining at least one adapted song of the target original song based on the original lyrics, the at least one group of adapted lyrics, the original accompaniment, the at least one group of adapted accompaniment, the original vocals, and the at least one group of adapted vocals; each of the adapted songs comprises target lyrics, target accompaniment, and target vocals; the target lyrics are the original lyrics or the adapted lyrics, the target accompaniment is the original accompaniment or the adapted accompaniment, and the target vocals are the original vocals or the adapted vocals; and each of the adapted songs comprises at least one of the adapted lyrics, the adapted accompaniment, and the adapted vocals;

[0013] A training module is used to construct a same-song group of the target original song based on at least the target original song and at least one adapted song of the target original song, and to train a song recognition model to be trained based on at least the same-song group of the target original song to obtain a trained song recognition model; the trained song recognition model is used to extract a first song feature of a song object to be recognized; the first song feature is used to determine a song name corresponding to the song object in combination with each second song feature in a pre-constructed feature library.

[0014] In a third aspect, the present application provides a computer device including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps in the method embodiments of the present application are implemented.

[0015] In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the method embodiments of the present application.

[0016] In a fifth aspect, the present application provides a computer program product, including a computer program, which implements the steps in the method embodiments of the present application when the computer program is executed by a processor.

[0017] The training method, device, storage medium and program product of the song recognition model are as follows: the original lyrics, original accompaniment and original vocals of the target original song to be adapted are obtained; the original lyrics, original accompaniment and original vocals are adapted respectively to obtain at least one set of adapted lyrics, at least one set of adapted accompaniment and at least one set of adapted vocals of the target original song; at least one adapted song of the target original song is determined based on the original lyrics, at least one set of adapted lyrics, original accompaniment, at least one set of adapted accompaniment, original vocals and at least one set of adapted vocals; each adapted song contains target lyrics, target accompaniment and target vocals; the target lyrics are original lyrics or adapted lyrics , the target accompaniment is the original accompaniment or the adapted accompaniment, the target vocal is the original vocal or the adapted vocal; and each adapted song contains at least one of adapted lyrics, adapted accompaniment and adapted vocal; at least based on the target original song and at least one adapted song of the target original song, a same song group of the target original song is constructed, at least based on the same song group of the target original song, the song recognition model to be trained is trained to obtain a trained song recognition model; the trained song recognition model is used to extract the first song feature of the song object to be identified; the first song feature is used to determine the song name corresponding to the song object in combination with each second song feature in the pre-constructed feature library. Compared with the traditional song recognition method, the present application performs a random song adaptation of the original songs in the music library, and the adapted songs can be regarded as the cover version of the original songs to expand the same song group of the original songs, so that each original song in the music library can be effectively added to the training process of the model, which can improve the recognition accuracy of cover songs in actual application scenarios. Especially when there are many original songs with incomplete same song groups in the music library, this application can significantly improve the recognition accuracy of cover songs by expanding the same song groups of original songs. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 A diagram of an application environment of a song recognition method in one embodiment;

[0019] Figure 2 A schematic diagram of a flow chart of a song identification method in one embodiment;

[0020] Figure 3 is a schematic diagram of a process of data enhancement in one embodiment;

[0021] Figure 4 A schematic diagram of a song recognition model training process in one embodiment;

[0022] Figure 5 A schematic diagram of the principle of training a song recognition model based on a ternary loss value in one embodiment;

[0023] Figure 6 is a structural block diagram of a song recognition device in one embodiment;

[0024] Figure 7 is an internal structure diagram of a computer device in one embodiment;

[0025] FIG. 8 is a diagram showing the internal structure of a computer device in another embodiment. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0027] The song recognition method provided in this application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can be set up separately and can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other servers. Among them, the terminal 102 can be, but is not limited to, various desktop computers, laptops, smart phones, tablet computers, vehicle-mounted terminals, intelligent voice interaction devices, aircraft, smart home appliances and portable wearable devices. Smart home appliances can be smart speakers, smart TVs and smart air conditioners. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, cloud security, host security and other network security services, CDN, and basic cloud computing services such as big data and artificial intelligence platforms. The terminal 102 and the server 104 can be directly or indirectly connected by wired or wireless communication, and this application is not limited here.

[0028] The server 104 may obtain the original lyrics, original accompaniment and original vocals of the target original song to be adapted, and adapt the original lyrics, original accompaniment and original vocals respectively to obtain at least one set of adapted lyrics, at least one set of adapted accompaniment and at least one set of adapted vocals of the target original song. The server 104 may determine at least one adapted song of the target original song based on the original lyrics, at least one set of adapted lyrics, original accompaniment, at least one set of adapted accompaniment, original vocals and at least one set of adapted vocals; each adapted song includes target lyrics, target accompaniment and target vocals; the target lyrics are original lyrics or adapted lyrics, the target accompaniment is original accompaniment or adapted accompaniment, and the target vocals are original vocals or adapted vocals; and each adapted song includes at least one of adapted lyrics, adapted accompaniment and adapted vocals. The server 104 can construct a same-song group of the target original song based on at least the target original song and at least one adapted song of the target original song, and train the song recognition model to be trained based on at least the same-song group of the target original song to obtain a trained song recognition model; the trained song recognition model is used to extract the first song feature of the song object to be recognized; the first song feature is used to determine the song name corresponding to the song object in combination with each second song feature in a pre-constructed feature library.

[0029] It is understood that the server 104 can send the recognized song name to the user's terminal 102. This embodiment does not limit this. It is understood that Figure 1 The application scenarios are only for illustration and are not limited to this.

[0030] In one embodiment, Figure 2 As shown, a method for training a song recognition model is provided, which can be applied to a computer device, which can be a terminal or a server, that is, the method can be executed by the terminal or the server alone, or can be implemented through interaction between the terminal and the server. This embodiment takes the method applied to a computer device as an example for explanation, and includes the following steps:

[0031] Step 202, obtaining the original lyrics, original accompaniment and original vocals of the target original song to be adapted.

[0032] The original lyrics are the original, unadapted lyrics of the target original song. The original accompaniment is the original, unadapted accompaniment of the target original song. The original vocals are the original, unadapted vocals of the target original song.

[0033] In one embodiment, the computer device may obtain the target original song to be adapted from the music library, obtain the original lyrics of the target original song, and extract the original accompaniment and original vocals of the target original song.

[0034] In one embodiment, the computer device may obtain all the original songs stored in the music library, and determine all the obtained original songs as target original songs.

[0035] Step 204, respectively adapting the original lyrics, the original accompaniment and the original vocals to obtain at least one set of adapted lyrics, at least one set of adapted accompaniment and at least one set of adapted vocals of the target original song.

[0036] Among them, the adapted lyrics are new song lyrics obtained by adapting the original lyrics of the target original song. It can be understood that the adapted lyrics of the target original song are different from the original lyrics of the target original song. The adapted accompaniment is a new song accompaniment obtained by adapting the original accompaniment of the target original song. It can be understood that the adapted accompaniment of the target original song is different from the original accompaniment of the target original song. The adapted vocals are new song vocals obtained by adapting the original vocals of the target original song. It can be understood that the adapted vocals of the target original song are different from the original vocals of the target original song.

[0037] In one embodiment, the computer device may adapt the original lyrics of the target original song at least once to obtain at least one set of adapted lyrics of the target original song. The computer device may adapt the original accompaniment of the target original song at least once to obtain at least one set of adapted accompaniment of the target original song. The computer device may adapt the original vocals of the target original song at least once to obtain at least one set of adapted vocals of the target original song.

[0038] Step 206, based on the original lyrics, at least one group of adapted lyrics, the original accompaniment, at least one group of adapted accompaniment, the original vocals, and at least one group of adapted vocals, determine at least one adapted song of the target original song; each adapted song includes target lyrics, target accompaniment, and target vocals; the target lyrics are the original lyrics or the adapted lyrics, the target accompaniment is the original accompaniment or the adapted accompaniment, and the target vocals are the original vocals or the adapted vocals; and each adapted song includes at least one of the adapted lyrics, the adapted accompaniment, and the adapted vocals.

[0039] Among them, the adapted song of the target original song is a song obtained by adapting at least one of the original lyrics, original accompaniment and original vocals of the target original song. It can be understood that the same song group of the target original song includes a target original song and at least one cover song, wherein the cover song includes a cover song of the target original song by other singers other than the original singer, or a live version of the target original song by the original singer. The adapted song of the target original song can be regarded as a cover song of the target original song and expanded to the same song group of the target original song.

[0040] In one embodiment, the computer device may randomly mix the original lyrics, original accompaniment, original vocals, at least one set of adapted lyrics, at least one set of adapted accompaniment, and at least one set of adapted vocals of the target original song to obtain at least one adapted song of the target original song. Each adapted song includes target lyrics, target accompaniment, and target vocals, the target lyrics are original lyrics or adapted lyrics, the target accompaniment is original accompaniment or adapted accompaniment, the target vocals are original vocals or adapted vocals, and each adapted song includes at least one of adapted lyrics, adapted accompaniment, and adapted vocals.

[0041] In one embodiment, Figure 3 As shown, the computer device can extract the original lyrics of the target original song, and adapt the original lyrics of the target original song at least once, and obtain at least one group of adapted lyrics of the target original song (i.e., adapted lyrics 1, adapted lyrics 2, ..., adapted lyrics m). The computer device can extract the original accompaniment of the target original song, and adapt the original accompaniment of the target original song at least once, and obtain at least one group of adapted accompaniment of the target original song (i.e., adapted accompaniment 1, adapted accompaniment 2, ..., adapted accompaniment n). The computer device can extract the original vocals of the target original song, and adapt the original vocals of the target original song at least once, and obtain at least one group of adapted vocals of the target original song (i.e., adapted vocals 1, adapted vocals 2, ..., adapted vocals k). Furthermore, the computer device can randomly mix the original lyrics, original accompaniment, original vocals, at least one group of adapted lyrics, at least one group of adapted accompaniment, and at least one group of adapted vocals of the target original song, and obtain at least one adapted song of the target original song (i.e., adapted song 1, adapted song 2, ..., adapted song L). Among them, each adapted song includes target lyrics, target accompaniment and target vocals, the target lyrics are original lyrics or adapted lyrics, the target accompaniment is original accompaniment or adapted accompaniment, the target vocals are original vocals or adapted vocals, and each adapted song includes at least one of adapted lyrics, adapted accompaniment and adapted vocals.

[0042] Step 208, constructing a same song group of the target original song based on at least the target original song and at least one adapted song of the target original song, and training the song recognition model to be trained based on at least the same song group of the target original song to obtain a trained song recognition model; the trained song recognition model is used to extract the first song feature of the song object to be recognized; the first song feature is used to determine the song name corresponding to the song object in combination with each second song feature in a pre-constructed feature library.

[0043] In one embodiment, the same song group of the target original song includes a target original song and at least one adapted song of the target original song. When there are cover songs of the target original song in the music library, the same song group of the target original song may also include at least one cover song of the target original song obtained from the music library. The computer device may train the song recognition model to be trained based on the same song group of the target original song to obtain the trained song recognition model.

[0044] In one embodiment, the song object to be identified may be a song segment in a song. The computer device may obtain the song segment to be identified and input the song segment into a trained song recognition model to extract a first song feature of the song segment through the trained song recognition model, and the first song feature is used to determine the song name corresponding to the song segment in combination with each second song feature in a pre-built feature library.

[0045] In one embodiment, the song object to be identified may also be a complete song. The computer device may obtain the song to be identified and input the song into a trained song recognition model to extract a first song feature of the song through the trained song recognition model. The first song feature is used to determine the song name corresponding to the song in combination with each second song feature in a pre-built feature library.

[0046] In the song recognition method, the original lyrics, original accompaniment and original vocals of the target original song to be adapted are obtained; the original lyrics, original accompaniment and original vocals are adapted respectively to obtain at least one set of adapted lyrics, at least one set of adapted accompaniment and at least one set of adapted vocals of the target original song; at least one adapted song of the target original song is determined based on the original lyrics, at least one set of adapted lyrics, original accompaniment, at least one set of adapted accompaniment, original vocals and at least one set of adapted vocals; each adapted song contains target lyrics, target accompaniment and target vocals; the target lyrics are the original lyrics or the adapted lyrics, and the target accompaniment is the original accompaniment accompaniment or adapted accompaniment, the target vocal is the original vocal or adapted vocal; and each adapted song contains at least one of adapted lyrics, adapted accompaniment and adapted vocal; at least based on the target original song and at least one adapted song of the target original song, a same song group of the target original song is constructed, at least based on the same song group of the target original song, the song recognition model to be trained is trained to obtain a trained song recognition model; the trained song recognition model is used to extract the first song feature of the song object to be identified; the first song feature is used to determine the song name corresponding to the song object in combination with each second song feature in the pre-constructed feature library. Compared with the traditional song recognition method, the present application performs a song adaptation with a random style on the original songs in the music library, and the adapted songs can be regarded as the cover version of the original songs to expand the same song group of the original songs, so that each original song in the music library can be effectively added to the training process of the model, which can improve the recognition accuracy of cover songs in actual application scenarios. Especially when there are many original songs with incomplete same song groups in the music library, this application can significantly improve the recognition accuracy of cover songs by expanding the same song groups of original songs.

[0047] In one embodiment, the method also includes: obtaining multiple original songs stored in a music library, wherein the original songs correspond to at least one cover song or have no corresponding cover songs; and determining the original songs whose corresponding cover songs among the multiple original songs do not meet the preset quantity condition as target original songs to be adapted; training the song recognition model to be trained based on at least the same song group of the target original songs to obtain a trained song recognition model, including: for other original songs in the music library, constructing the same song group of other original songs based on at least other original songs and cover songs of other original songs; training the song recognition model to be trained based on the same song group of the target original songs and the same song group of other original songs to obtain a trained song recognition model; other original songs are original songs in the music library except the target original songs.

[0048] In one embodiment, the computer device can obtain multiple original songs stored in the music library, each of which may correspond to one cover song, may correspond to multiple cover songs, or may not have any cover songs. For each of the multiple original songs, when the number of cover songs for the original song does not meet the preset quantity condition, the computer device can determine the original song as the target original song to be adapted. The computer device can obtain the original lyrics, original accompaniment and original vocals of at least one target original song to be adapted, and adapt the original lyrics, original accompaniment and original vocals respectively to obtain at least one group of adapted lyrics, at least one group of adapted accompaniment and at least one group of adapted vocals of the target original song. The computer device can determine at least one adapted song of the target original song, wherein each adapted song includes target lyrics, target accompaniment and target vocals; the target lyrics are original lyrics or adapted lyrics, the target accompaniment is original accompaniment or adapted accompaniment, and the target vocals are original vocals or adapted vocals; and each adapted song includes at least one of adapted lyrics, adapted accompaniment and adapted vocals. The computer device can construct the same song groups of other original songs based on at least other original songs and cover songs of other original songs for other original songs in the music library. The computer device can train the song recognition model to be trained based on the same song groups of the target original songs and the same song groups of other original songs to obtain a trained song recognition model; other original songs are original songs in the music library other than the target original songs. The trained song recognition model is used to extract the first song feature of the song object to be recognized; the first song feature is used to determine the song name corresponding to the song object in combination with each second song feature in the pre-constructed feature library.

[0049] In one embodiment, the preset quantity condition may be that the number of cover songs corresponding to the original song is less than a preset number, or that the number of cover songs corresponding to the original song falls within a preset number range.

[0050] In one embodiment, the same song group of the target original song may include one target original song and at least one adapted song of the target original song. When there is a cover song of the target original song in the music library, the same song group of the target original song may also include at least one cover song of the target original song. The same song group of other original songs may include one other original song and at least one cover song of other original songs. The computer device may train the song recognition model to be trained based on the same song group of the target original song and the same song group of other original songs to obtain a trained song recognition model; other original songs are original songs in the music library except the target original song.

[0051] In the above embodiment, when the number of cover songs of the original song does not meet the preset number condition, it means that the number of cover songs of the original song is insufficient. At this time, the original song is determined as the target original song to be adapted, and at least one adapted song of the target original song is obtained to expand the same song group of the target original song, so that the original songs with insufficient number of cover songs in the music library can also be effectively added to the training process of the song recognition model, which can improve the recognition accuracy of cover songs in actual application scenarios.

[0052] In one embodiment, a song recognition model to be trained is trained based on a song group of a target original song and a song group of other original songs to obtain a trained song recognition model, including: constructing multiple song triplets based on the song group of the target original song and the song group of other original songs; wherein each song triplet includes an anchor sample, a positive sample of the anchor sample, and a negative sample of the anchor sample; the anchor sample is obtained based on the original songs in the song group of the target original song or the original songs in the song group of other original songs, the positive sample of the anchor sample is obtained based on the non-original songs in the same song group as the anchor sample, and the negative sample of the anchor sample is obtained based on the original songs or non-original songs in different song groups as the anchor sample; the non-original songs include adapted songs and cover songs; the song recognition model to be trained is trained based on multiple song triplets to obtain a trained song recognition model.

[0053] In one embodiment, the anchor samples, positive samples of the anchor samples, and negative samples of the anchor samples in the song triplet can be song fragments. Specifically, the anchor samples in the song triplet based on the original songs in the same song group of the target original song or the original songs in the same song group of other original songs are obtained by slicing one of the song fragments of the original songs in the same song group of the target original song or the original songs in the same song group of other original songs. The positive samples of the anchor samples in the song triplet based on the non-original songs in the same song group as the anchor sample are obtained by slicing one of the song fragments of the non-original songs in the same song group as the anchor sample. The negative samples of the anchor samples in the song triplet based on the original songs or non-original songs in different song groups as the anchor sample are obtained by slicing one of the song fragments of the original songs or non-original songs in different song groups as the anchor sample.

[0054] In one embodiment, the anchor samples, positive samples of the anchor samples, and negative samples of the anchor samples in the song triplet can also be complete songs. Specifically, the anchor samples obtained in the song triplet based on the original songs in the same song group of the target original song or the original songs in the same song group of other original songs are the original songs in the same song group of the target original song itself or the original songs in the same song group of other original songs itself. The positive samples of the anchor samples obtained in the song triplet based on the non-original songs in the same song group as the anchor sample are the non-original songs in the same song group as the anchor sample. The negative samples of the anchor samples obtained in the song triplet based on the original songs or non-original songs in different same song groups as the anchor sample are the original songs or non-original songs in different same song groups as the anchor sample.

[0055] In one embodiment, the computer device may train the song recognition model to be trained based on the ternary loss values ​​corresponding to each of the plurality of song triples to obtain a trained song recognition model. The ternary loss value L corresponding to each song triple may be calculated by the following formula:

[0056] L=max(d(a,p)-d(a,n)+margin,0).

[0057] Where a represents the song feature of the anchor point (i.e., anchor, also known as the anchor sample) in the song triplet. p represents the song feature of the positive sample (i.e., positive, also known as the positive sample of the anchor sample) in the song triplet. n represents the song feature of the negative sample (i.e., negative, also known as the negative sample of the anchor sample) in the song triplet. d(a,p) represents the cosine distance between the song feature of the anchor point and the song feature of the positive sample. d(a,n) represents the cosine distance between the song feature of the anchor point and the song feature of the negative sample. margin is a pre-set degree coefficient.

[0058] In one embodiment, Figure 4 As shown, the song triplet includes a song segment (anchor point) of an original song, a song segment (positive sample) of a cover song or an adapted song of the original song, and a song segment (negative sample) of another song. Among them, other songs are songs that do not belong to the same song group of the original song. The computer device can input the song segment (anchor point) of the original song, the song segment (positive sample) of the cover song or an adapted song of the original song, and the song segment (negative sample) of another song in the song triplet into the song recognition model to be trained, respectively, to obtain the segment features of each song segment, determine the ternary loss value based on the obtained segment features, and train the song recognition model to be trained based on the ternary loss value to obtain the trained song recognition model.

[0059] In one embodiment, Figure 5 As shown, the training goal of the song recognition model is to make the song features of the anchor point closer to the song features of the positive sample, and to make the song features of the anchor point and the song features of the negative sample farther apart.

[0060] In the above embodiment, the song recognition model to be trained is trained based on multiple song triplets, so as to further improve the song recognition accuracy of the trained song recognition model.

[0061] In one embodiment, the original lyrics, original accompaniment and original vocals of the target original song to be adapted are obtained, including: inputting the target original song to be adapted into a dry voice separation model to extract the original accompaniment and original vocals from the target original song through the dry voice separation model; if the original lyrics of the target original song are not stored in the music library, inputting the target original song into a lyrics recognition model to recognize the original lyrics of the target original song through the lyrics recognition model.

[0062] In one embodiment, the computer device may input the target original song to be adapted into the dry sound separation model to extract the original accompaniment and the original vocals from the target original song through the dry sound separation model. If the original lyrics of the target original song are not stored in the music library, the computer device may input the target original song into the lyrics recognition model to recognize the original lyrics of the target original song through the lyrics recognition model. When the original lyrics of the target original song are stored in the music library, the original lyrics of the target original song are directly obtained from the music library.

[0063] In the above embodiment, the original accompaniment and original vocals are extracted from the target original song by the dry sound separation model, which can improve the accuracy of the original accompaniment and the original vocals. If the original lyrics of the target original song are not stored in the music library, the original lyrics of the target original song are identified by the lyrics recognition model to improve the efficiency and accuracy of obtaining the original lyrics, thereby improving the training efficiency of the song recognition model and further improving the song recognition accuracy of the trained song recognition model.

[0064] In one embodiment, original lyrics, original accompaniment and original vocals are adapted respectively to obtain at least one set of adapted lyrics, at least one set of adapted accompaniment and at least one set of adapted vocals of a target original song, including: adapting the original lyrics according to a preset lyrics adaptation strategy to obtain at least one set of adapted lyrics of the target original song; separating each instrument track in the original accompaniment, adapting the separated instrument tracks to obtain at least one set of adapted accompaniment of the target original song; extracting the original timbre and original fundamental frequency of the original vocals, adapting at least one of the original timbre and the original fundamental frequency to obtain at least one set of adapted vocals of the target original song.

[0065] In one embodiment, the computer device can adapt the original lyrics according to a preset lyrics adaptation strategy, such as modifying or deleting certain specific words, words or sentences in the original lyrics, so as to obtain at least one group of adapted lyrics of the target original song. The computer device can separate each instrument track in the original accompaniment, and adapt the separated instrument track. Specifically, the separated instrument track can be added or deleted, such as the accompaniment of piano+drum+guitar, the piano and drum can be deleted, and it can be changed to guitar playing and singing, or other instruments can be added on the basis of these three instruments, so as to obtain at least one group of adapted accompaniment of the target original song. The computer device can extract the original timbre and original fundamental frequency of the original human voice, and adapt and synthesize at least one of the original timbre and the original fundamental frequency to obtain at least one group of adapted human voice of the target original song.

[0066] In one embodiment, the computer device may input the original lyrics into a large language model capable of adapting lyrics, so as to adapt the original lyrics according to a preset lyrics adaptation strategy through the large language model to obtain at least one set of adapted lyrics for the target original song.

[0067] In one embodiment, the computer device may input the original accompaniment into the accompaniment adaptation model to separate each instrument track in the original accompaniment through the accompaniment adaptation model, and adapt the separated instrument tracks to obtain at least one set of adapted accompaniments for the target original song.

[0068] In the above embodiment, the original lyrics are adapted by a preset lyrics adaptation strategy to obtain at least one group of adapted lyrics of the target original song, so that the adapted lyrics can be more closely matched to the original lyrics. Each instrument track in the original accompaniment is separated, and the separated instrument tracks are adapted to obtain at least one group of adapted accompaniments of the target original song, so that the adapted accompaniment can be more closely matched to the original accompaniment. The original timbre and original fundamental frequency of the original human voice are extracted, and at least one of the original timbre and the original fundamental frequency is adapted to obtain at least one group of adapted human voices of the target original song, so that the adapted human voice can be more closely matched to the original human voice. Thereby further improving the song recognition accuracy of the trained song recognition model.

[0069] In one embodiment, the song object includes a target song segment; the method further includes: segmenting a plurality of original songs and cover songs corresponding to the original songs stored in the music library to obtain a plurality of song segments; inputting the plurality of song segments into a trained song recognition model to extract the second song features of each of the plurality of song segments through the trained song recognition model; and constructing a feature library based on the second song features of each of the plurality of song segments.

[0070] In one embodiment, the present application also proposes a song recognition method, which also includes: obtaining a song object to be identified; inputting the song object into a trained song recognition model to extract features of the song object through the trained song recognition model to obtain a first song feature; selecting a target song feature that meets a preset feature similarity condition with the first song feature from each second song feature stored in a pre-constructed feature library; and determining the song name stored in the feature library corresponding to the target song feature as the song name corresponding to the song object.

[0071] The first song feature is a song feature of a song object to be identified, and the second song feature is a song feature stored in a feature library.

[0072] In one embodiment, the song object to be identified may be a song segment in a song. The computer device may obtain the song segment to be identified, and input the song segment into a trained song recognition model to extract features of the song segment through the trained song recognition model to obtain a first song feature. The computer device may select a target song feature that satisfies a preset feature similarity condition with the first song feature from each second song feature stored in a pre-built feature library, and determine the song name stored in the feature library corresponding to the target song feature as the song name corresponding to the song segment. Among them, each second song feature stored in the feature library is extracted by inputting the song segments corresponding to each song stored in the song library into the trained song recognition model.

[0073] In one embodiment, the song object to be identified can also be a complete song. The computer device can obtain the song to be identified and input the song into a trained song recognition model to extract the features of the song through the trained song recognition model to obtain the first song feature. The computer device can select a target song feature that meets a preset feature similarity condition with the first song feature from each second song feature stored in a pre-constructed feature library, and determine the song name stored in the feature library corresponding to the target song feature as the song name corresponding to the song. Among them, each second song feature stored in the feature library is extracted by inputting each song stored in the song library into the trained song recognition model.

[0074] In one embodiment, the preset feature similarity condition may be that the similarity between the first song feature and the second song feature is greater than a preset similarity, or that the similarity between the first song feature and the second song feature falls within a preset similarity range.

[0075] In the above embodiment, the features of the song object are extracted through the trained song recognition model to obtain the first song feature, and the song name corresponding to the song feature with a high similarity to the first song feature in the feature library is determined as the song name corresponding to the song object, which can improve the accuracy of song recognition.

[0076] It should be understood that, although each step in the flow chart of the above-mentioned embodiments is shown in order, these steps are not necessarily performed in order. Unless there is a clear explanation in this article, the execution of these steps does not have strict order restrictions, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the above-mentioned embodiments may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in order, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.

[0077] In one embodiment, Figure 6 As shown, a song identification device 600 is provided, and the device specifically includes:

[0078] An acquisition module 602 is used to acquire the original lyrics, original accompaniment and original vocals of the target original song to be adapted;

[0079] An adaptation module 604 is used to adapt the original lyrics, the original accompaniment and the original vocals respectively, to obtain at least one set of adapted lyrics, at least one set of adapted accompaniment and at least one set of adapted vocals of the target original song;

[0080] The determination module 606 is used to determine at least one adapted song of the target original song based on the original lyrics, at least one group of adapted lyrics, the original accompaniment, at least one group of adapted accompaniment, the original vocals, and at least one group of adapted vocals; each adapted song includes target lyrics, target accompaniment, and target vocals; the target lyrics are the original lyrics or the adapted lyrics, the target accompaniment is the original accompaniment or the adapted accompaniment, and the target vocals are the original vocals or the adapted vocals; and each adapted song includes at least one of the adapted lyrics, the adapted accompaniment, and the adapted vocals;

[0081] The training module 608 is used to construct a same-song group of the target original song based on at least the target original song and at least one adapted song of the target original song, and to train the song recognition model to be trained based on at least the same-song group of the target original song to obtain a trained song recognition model; the trained song recognition model is used to extract the first song feature of the song object to be recognized; the first song feature is used to determine the song name corresponding to the song object in combination with each second song feature in a pre-constructed feature library.

[0082] In one embodiment, the acquisition module 602 is further used to acquire multiple original songs stored in the music library, wherein the original songs correspond to at least one cover song or have no corresponding cover song; and determine the original songs whose number of corresponding cover songs among the multiple original songs does not meet the preset number condition as target original songs to be adapted;

[0083] The training module 608 is also used to construct the same song groups of other original songs in the music library at least based on other original songs and cover songs of other original songs; based on the same song group of the target original song and the same song group of other original songs, the song recognition model to be trained is trained to obtain a trained song recognition model; other original songs are the original songs in the music library except the target original song.

[0084] In one embodiment, the training module 608 is also used to construct multiple song triplets based on the same song group of the target original song and the same song group of other original songs; wherein each song triplet includes an anchor sample, a positive sample of the anchor sample, and a negative sample of the anchor sample; the anchor sample is obtained based on the original songs in the same song group of the target original song or the original songs in the same song group of other original songs, the positive sample of the anchor sample is obtained based on the non-original songs in the same song group as the anchor sample, and the negative sample of the anchor sample is obtained based on the original songs or non-original songs in different song groups as the anchor sample; non-original songs include adapted songs and cover songs; the song recognition model to be trained is trained based on multiple song triplets to obtain a trained song recognition model.

[0085] In one embodiment, the acquisition module 602 is also used to input the target original song to be adapted into the dry voice separation model, so as to extract the original accompaniment and original vocals from the target original song through the dry voice separation model; if the original lyrics of the target original song are not stored in the music library, the target original song is input into the lyrics recognition model, so as to recognize the original lyrics of the target original song through the lyrics recognition model.

[0086] In one embodiment, the adaptation module 604 is also used to adapt the original lyrics according to a preset lyrics adaptation strategy to obtain at least one set of adapted lyrics for the target original song; separate each instrument track in the original accompaniment, adapt the separated instrument tracks, and obtain at least one set of adapted accompaniments for the target original song; extract the original timbre and original fundamental frequency of the original human voice, adapt at least one of the original timbre and the original fundamental frequency, and obtain at least one set of adapted human voices for the target original song.

[0087] In one embodiment, the song object includes a target song segment; the song identification device 600 further includes:

[0088] A construction module is used to segment a plurality of original songs and the cover songs corresponding to the original songs stored in a music library to obtain a plurality of song segments; input the plurality of song segments into a trained song recognition model to extract the second song features of each of the plurality of song segments through the trained song recognition model; and construct a feature library based on the second song features of each of the plurality of song segments.

[0089] In one embodiment, the song identification device 600 further includes:

[0090] An identification module is used to obtain a song object to be identified; input the song object into a trained song identification model to extract features of the song object through the trained song identification model to obtain a first song feature; select a target song feature that meets a preset feature similarity condition with the first song feature from each second song feature stored in a pre-constructed feature library; and determine the song name stored in the feature library corresponding to the target song feature as the song name corresponding to the song object.

[0091] The song recognition device obtains original lyrics, original accompaniment and original vocals of a target original song to be adapted; respectively adapts the original lyrics, original accompaniment and original vocals to obtain at least one set of adapted lyrics, at least one set of adapted accompaniment and at least one set of adapted vocals of the target original song; based on the original lyrics, at least one set of adapted lyrics, original accompaniment, at least one set of adapted accompaniment, original vocals and at least one set of adapted vocals, at least one adapted song of the target original song is determined; each adapted song includes target lyrics, target accompaniment and target vocals; the target lyrics are the original lyrics or the adapted lyrics, and the target accompaniment is the original accompaniment accompaniment or adapted accompaniment, the target vocal is the original vocal or adapted vocal; and each adapted song contains at least one of adapted lyrics, adapted accompaniment and adapted vocal; at least based on the target original song and at least one adapted song of the target original song, a same song group of the target original song is constructed, at least based on the same song group of the target original song, the song recognition model to be trained is trained to obtain a trained song recognition model; the trained song recognition model is used to extract the first song feature of the song object to be identified; the first song feature is used to determine the song name corresponding to the song object in combination with each second song feature in the pre-constructed feature library. Compared with the traditional song recognition method, the present application performs a song adaptation with a random style on the original songs in the music library, and the adapted songs can be regarded as the cover version of the original songs to expand the same song group of the original songs, so that each original song in the music library can be effectively added to the training process of the model, which can improve the recognition accuracy of cover songs in actual application scenarios. Especially when there are many original songs with incomplete same song groups in the music library, this application can significantly improve the recognition accuracy of cover songs by expanding the same song groups of original songs.

[0092] Each module in the above song recognition device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.

[0093] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 7 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a song recognition method is implemented.

[0094] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be shown in FIG8. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, the memory, and the input / output interface are connected via a system bus, and the communication interface, the display unit, and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a song recognition method is implemented. The display unit of the computer device is used to form a visually visible image, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse, etc.

[0095] Those skilled in the art will understand that Figure 7 The structure shown in FIG. 8 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0096] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0097] In one embodiment, a computer-readable storage medium is provided, storing a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0098] In one embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0099] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0100] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0101] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0102] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A method for training a song recognition model, characterized in that: The method comprises: Obtaining the original lyrics, original accompaniment and original vocals of the target original song to be adapted; Adapting the original lyrics, original accompaniment and original vocals respectively to obtain at least one set of adapted lyrics, at least one set of adapted accompaniment and at least one set of adapted vocals of the target original song; Based on the original lyrics, the at least one group of adapted lyrics, the original accompaniment, the at least one group of adapted accompaniment, the original vocals, and the at least one group of adapted vocals, at least one adapted song of the target original song is determined; each of the adapted songs comprises target lyrics, target accompaniment, and target vocals; the target lyrics are the original lyrics or the adapted lyrics, the target accompaniment is the original accompaniment or the adapted accompaniment, and the target vocals are the original vocals or the adapted vocals; and each of the adapted songs comprises at least one of the adapted lyrics, the adapted accompaniment, and the adapted vocals; A same song group of the target original song is constructed at least based on the target original song and at least one adapted song of the target original song; a song recognition model to be trained is trained at least based on the same song group of the target original song to obtain a trained song recognition model; the trained song recognition model is used to extract a first song feature of a song object to be recognized; the first song feature is used to determine a song name corresponding to the song object in combination with each second song feature in a pre-constructed feature library.

2. The method according to claim 1, characterized in that The method further comprises: Acquire multiple original songs stored in a music library, wherein the original songs correspond to at least one cover song or have no corresponding cover song; and determine the original songs whose number of corresponding cover songs among the multiple original songs does not meet a preset number condition as target original songs to be adapted; The step of training the song recognition model to be trained based on the same song group of the target original song to obtain the trained song recognition model includes: For other original songs in the music library, constructing a same song group of the other original songs based at least on the other original songs and the cover songs of the other original songs; Based on the same song group of the target original songs and the same song group of the other original songs, the song recognition model to be trained is trained to obtain a trained song recognition model; the other original songs are the original songs in the music library except the target original songs.

3. The method according to claim 2, characterized in that The method of training the song recognition model to be trained based on the same song group of the target original song and the same song group of other original songs to obtain the trained song recognition model includes: A plurality of song triplets are constructed based on the same song group of the target original song and the same song groups of the other original songs; wherein each of the song triplets includes an anchor sample, a positive sample of the anchor sample, and a negative sample of the anchor sample; the anchor sample is obtained based on the original song in the same song group of the target original song or the original song in the same song group of the other original songs, the positive sample of the anchor sample is obtained based on the non-original song in the same song group as the anchor sample, and the negative sample of the anchor sample is obtained based on the original song or non-original song in a different song group as the anchor sample; the non-original song includes adapted songs and cover songs; The song recognition model to be trained is trained based on the multiple song triplets to obtain a trained song recognition model.

4. The method according to claim 1, characterized in that: The obtaining of the original lyrics, original accompaniment and original vocals of the target original song to be adapted comprises: Inputting the target original song to be adapted into a dry voice separation model, so as to extract the original accompaniment and the original vocals from the target original song through the dry voice separation model; If the original lyrics of the target original song are not stored in the music library, the target original song is input into the lyrics recognition model to recognize the original lyrics of the target original song through the lyrics recognition model.

5. The method according to claim 1, characterized in that The method of respectively adapting the original lyrics, the original accompaniment and the original vocals to obtain at least one set of adapted lyrics, at least one set of adapted accompaniment and at least one set of adapted vocals of the target original song comprises: Adapting the original lyrics according to a preset lyrics adaptation strategy to obtain at least one set of adapted lyrics for the target original song; Separating each instrument track in the original accompaniment, and adapting the separated instrument tracks to obtain at least one set of adapted accompaniments of the target original song; The original timbre and the original fundamental frequency of the original human voice are extracted, and at least one of the original timbre and the original fundamental frequency is adapted to obtain at least one group of adapted human voices of the target original song.

6. The method according to claim 1, characterized in that The song object includes a target song segment; the method further includes: Respectively fragment multiple original songs and cover songs corresponding to the original songs stored in the music library to obtain multiple song clips; Inputting the plurality of song clips into the trained song recognition model, so as to extract second song features of each of the plurality of song clips through the trained song recognition model; A feature library is constructed based on the second song features of each of the multiple song clips.

7. A song recognition method, characterized in that: The method comprises: Get the song object to be identified; Inputting the song object into the trained song recognition model to extract the features of the song object through the trained song recognition model to obtain a first song feature; Selecting a target song feature that satisfies a preset feature similarity condition with the first song feature from each second song feature stored in a pre-built feature library; The song title stored in the feature library corresponding to the target song feature is determined as the song title corresponding to the song object.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Song identification method and device, electronic equipment and storage medium

    CN111368136A

  • Audio recognition method and device, equipment and storage medium

    CN115116472A

  • Song identification method, computer equipment and storage medium

    CN116189707A

  • Audio feature extraction model training method and device, and storage medium

    CN117612517A

  • Audio feature extraction model training method and turning and singing audio recognition method

    CN117636898A