Training method of song recognition network, cover song recognition method and related device

CN116913318BActive Publication Date: 2026-10-30TENCENT MUSIC ENTERTAINMENT TECH (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310866244.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-14
Publication Date
2026-10-30
Estimated Expiration
2043-07-14

AI Technical Summary

Benefits of technology

[0064]获取多个训练组的频谱特征,其中,每个训练组包括目标歌曲的原唱版本的频谱特征和目标歌曲对应的多个翻唱版本的频谱特征;将每个训练组中歌曲的频谱特征输入至所述歌曲识别网络模型,以得到所述歌曲识别网络模型输出的每个训练组中目标歌曲原唱版本的特征向量和多个翻唱版本的特征向量;根据所述每个训练组中目标歌曲原唱版本的特征向量、多个翻唱版本的特征向量和预设的第一阈值和第二阈值,确定所述每个训练组中目标歌曲翻唱版本的野点和离群点,其中,所述野点用于表征所述翻唱版本的特征向量与中心点之间的距离大于所述第二阈值的翻唱版本,所述离群点用于表征所述翻唱版本的特征向量与所述中心点之间的距离大于所述第一阈值且小于所述第二阈值的翻唱版本,其中,所述第二阈值大于所述第一阈值,所述中心点表示所述每个训练组中目标歌曲原唱版本的特征向量和多个翻唱版本的特征向量的均值;基于多个训练组中的野点和离群点,对所述歌曲识别网络模型的参数进行修正。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116913318B_ABST
    Figure CN116913318B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a song recognition network training method, a cover song recognition method and related devices, which are used to improve the accuracy of cover song recognition. The method of the embodiments of the present application comprises: obtaining spectral features of multiple training groups, wherein each training group comprises spectral features of an original version of a target song and spectral features of multiple cover versions corresponding to the target song; inputting the spectral features of the song in each training group into a song recognition network model to obtain a feature vector of the original version of the target song and feature vectors of the multiple cover versions output by the song recognition network model; determining outliers and outliers of the cover versions of the target song in each training group according to the feature vector of the original version of the target song, the feature vectors of the multiple cover versions and preset first and second thresholds; and correcting parameters of the song recognition network model based on the outliers and outliers in the multiple training groups.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of song data processing technology, and in particular to a training method for a song recognition network, a method for recognizing cover songs, and related devices. Background Technology

[0002] Cover song recognition technology refers to the process of extracting melody information from song audio using feature extraction methods, and identifying different cover versions of the same song based on melody similarity. Cover song recognition technology has wide applications in copyright detection, song grouping, and song theft detection.

[0003] With the development of deep learning technology, extracting melody features through deep neural network models has become mainstream. Current mainstream approaches typically involve optimizing the network model architecture to suit the characteristics of the cover song recognition task, or combining the goal of extracting melody features with a multivariate loss function. Therefore, existing solutions have already done extensive work on the architecture and loss function design of song recognition network models; how to further optimize the neural network model is now a pressing issue. Summary of the Invention

[0004] This invention provides a training method for a song recognition network, a method for recognizing cover songs, and related devices, used to identify outliers and idiosyncrasies in cover versions of target songs, and to train the song recognition network based on the outliers and idiosyncrasies, thereby improving the accuracy of the song recognition network in recognizing cover songs.

[0005] The first aspect of this application provides a method for training a song recognition network model, including:

[0006] Obtain the spectral features of multiple training groups, where each training group includes the spectral features of the original version of the target song and the spectral features of multiple cover versions of the target song;

[0007] The spectral features of the songs in each training group are input into the song recognition network model to obtain the feature vector of the original version of the target song and the feature vectors of multiple cover versions in each training group output by the song recognition network model.

[0008] Based on the feature vectors of the original version of the target song, the feature vectors of multiple cover versions, and preset first and second thresholds in each training group, outliers and isolated points of the cover versions of the target song in each training group are determined. The outliers are used to characterize cover versions where the distance between the feature vector of the cover version and the center point is greater than the second threshold. The isolated points are used to characterize cover versions where the distance between the feature vector of the cover version and the center point is greater than the first threshold and less than the second threshold. The second threshold is greater than the first threshold. The center point represents the mean of the feature vectors of the original version of the target song and the feature vectors of multiple cover versions in each training group.

[0009] The parameters of the song recognition network model are corrected based on outliers and isolated points from multiple training groups.

[0010] As an optional embodiment, the step of correcting the parameters of the song recognition network model based on outliers and isolated points in multiple training groups includes:

[0011] Remove the outliers from each training group;

[0012] Calculate the outlier loss based on the outliers in each of the multiple training groups;

[0013] Based on the outlier loss, the parameters of the song recognition network model are corrected using the backpropagation algorithm.

[0014] As an optional embodiment, calculating the outlier loss based on the outliers in each of the plurality of training groups includes:

[0015] Identify outliers and in-group points in each training group, wherein the in-group points represent cover versions whose feature vectors are less than the first threshold distance from the center point;

[0016] Calculate the deviation of all outliers in each training group, where the deviation of each outlier represents the ratio of the distance of each outlier to the center point of the training group to the mean distance of all points within the training group to the center point.

[0017] The outlier loss is obtained by summing the deviations of all outliers in multiple training groups.

[0018] As an optional implementation, each training group also includes at least one other song that is distinct from the target song, wherein both the target song and the other songs come with their own sample labels;

[0019] The spectral features of the songs in each training group are input into the song recognition network model to obtain the feature vector of the original version of the target song and the feature vectors of multiple cover versions in each training group, as output by the song recognition network model, including:

[0020] The spectral features of the songs in each training group are input into the song recognition network model to obtain the feature vector of the original version of the target song and the feature vectors of multiple cover versions of the target song in each training group, as well as the feature vectors of the other songs.

[0021] After determining the outliers and isolated points of the cover versions in each training group based on the feature vectors of the original version of the target song, the feature vectors of multiple cover versions, and preset first and second thresholds, the method further includes:

[0022] Based on the feature vectors of the original version of the target song, the feature vectors of multiple cover versions, and the feature vectors of other songs in each training group, a ternary loss is determined.

[0023] The parameters of the song recognition network model are corrected based on the outliers, outliers, and the ternary loss in each training group.

[0024] As an optional embodiment, a ternary loss is determined based on the feature vectors of the original version of the target song, the feature vectors of multiple cover versions, and the feature vectors of the other songs in each training group, including:

[0025] Calculate the average of the first distances d1 between the feature vectors of the original version of the target song and the feature vectors of multiple cover versions in each training group;

[0026] Calculate the second distance d2 between the feature vector of the original version of the target song and the feature vectors of other songs in each training group;

[0027] The ternary loss for each training group is calculated based on the average value d1 of the first distance, the second distance d2, and the first formula.

[0028] The first formula includes:

[0029] L = max(d1-d2+margin,0), where margin represents the adjustable degree coefficient and L represents the ternary loss.

[0030] As an optional embodiment, the step of correcting the parameters of the song recognition network model based on outliers, isolated points, and the ternary loss in each training group includes:

[0031] Remove outliers and wildcards from each training group;

[0032] Based on the ternary loss, the parameters of the song recognition network model are corrected using the backpropagation algorithm.

[0033] As an optional embodiment, the step of correcting the parameters of the song recognition network model based on outliers, isolated points, and the ternary loss in each training group includes:

[0034] Remove outliers from each training group;

[0035] Two outliers in the same training group are selected as the original version and the cover version of the target song for the next round of training in the training group.

[0036] Calculate the outlier loss based on the outliers in each of the multiple training groups;

[0037] Based on the ternary loss and the outlier loss, the parameters of the song recognition network model are corrected using the backpropagation algorithm.

[0038] As an optional embodiment, after determining the ternary loss based on the feature vectors of the original version of the target song, the feature vectors of multiple cover versions, and the feature vectors of the other songs in each training group, the method further includes:

[0039] Obtain the real sample labels of the target song and other songs output by the song recognition network model in each training group, and the probability value of the real sample labels;

[0040] The classification loss for multiple training groups is calculated based on the second formula;

[0041] The second formula includes: ,in, Indicates the labels of real samples. This represents the probability value of the true sample label. This represents the number of sample labels, where C represents the maximum number of sample labels. This represents the raw score of the target song and other songs' real sample labels output by the song recognition network model in each training group;

[0042] The parameters of the song recognition network model are adjusted based on the outliers, the ternary loss, and the classification loss in each training group.

[0043] As an optional embodiment, the parameters of the song recognition network model are modified based on outliers, the ternary loss, and the classification loss in each training group, including:

[0044] Remove the outliers from each training group;

[0045] Calculate the outlier loss based on the outliers in each of the multiple training groups;

[0046] Based on the outlier loss, the ternary loss, and the classification loss, the parameters of the song recognition network model are corrected using the backpropagation algorithm.

[0047] As an optional embodiment, the parameters of the song recognition network model are modified based on outliers, the ternary loss, and the classification loss in each training group, including:

[0048] Remove outliers and wildcards from each training group;

[0049] Based on the ternary loss and the classification loss, the parameters of the song recognition network model are corrected using the backpropagation algorithm.

[0050] As an optional embodiment, the parameters of the song recognition network model are modified based on outliers, the ternary loss, and the classification loss in each training group, including:

[0051] Remove outliers from each training group;

[0052] Two outliers in the same training group are selected as the original version and the cover version of the target song for the next round of training in the training group.

[0053] Calculate the outlier loss based on the outliers in each of the multiple training groups;

[0054] Based on the ternary loss, the outlier loss, and the classification loss, the parameters of the song recognition network model are corrected using the backpropagation algorithm.

[0055] As an optional embodiment, the spectral characteristics include either constant Q variation characteristics or Mel frequency cepstral coefficients.

[0056] As an optional embodiment, after inputting the spectral features of the songs in each training group into the song recognition network model, the method further includes:

[0057] The parameters of the song recognition network model are optimized using an IBN normalization layer. The BN layer is used to normalize the parameters of the song recognition network model across multiple training groups, while the IBN layer is used to normalize the parameters of the song recognition network model across a single sample.

[0058] A second aspect of this application provides a method for identifying cover songs, the method comprising:

[0059] The song to be identified is input into the song recognition network model provided in the first aspect of the embodiments of this application;

[0060] Obtain the song name and category of the song to be identified, as output by the song recognition network model, wherein the category of the song to be identified includes the original version and the cover version.

[0061] A third aspect of this application provides a computer device including a processor. When the processor executes a computer program stored in a memory, it is used to implement the training method of the song recognition network provided in the first aspect of this application, or the recognition method of cover songs provided in the second aspect of this application.

[0062] The fourth aspect of this application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is used to implement the training method of the song recognition network provided in the first aspect of this application, or the recognition method of cover songs provided in the second aspect of this application.

[0063] As can be seen from the above technical solutions, the embodiments of the present invention have the following advantages:

[0064] Spectral features of multiple training groups are acquired, wherein each training group includes spectral features of the original version of the target song and spectral features of multiple cover versions of the target song; the spectral features of the songs in each training group are input into the song recognition network model to obtain the feature vectors of the original version of the target song and the feature vectors of the multiple cover versions in each training group output by the song recognition network model; based on the feature vectors of the original version of the target song, the feature vectors of the multiple cover versions, and preset first and second thresholds in each training group, outliers and outliers of the cover versions of the target song in each training group are determined, wherein outliers are used to characterize cover versions whose distance between the feature vector of the cover version and the center point is greater than the second threshold, and outliers are used to characterize cover versions whose distance between the feature vector of the cover version and the center point is greater than the first threshold and less than the second threshold, wherein the second threshold is greater than the first threshold, and the center point represents the mean of the feature vectors of the original version of the target song and the feature vectors of the multiple cover versions in each training group; based on the outliers and outliers in the multiple training groups, the parameters of the song recognition network model are corrected.

[0065] Because in this embodiment of the application, when training the song recognition network using a cover version of the target song, outliers and idiosyncrasies in the cover version of the target song can be identified, and the song recognition network can be trained based on the outliers and idiosyncrasies, thereby improving the accuracy of the song recognition network in recognizing cover songs. Attached Figure Description

[0066] Figure 1 This is a schematic diagram of an embodiment of the training method for the song recognition network in this application.

[0067] Figure 2 This is a schematic diagram of the in-group points, outliers, and wild points in two training groups in an embodiment of this application.

[0068] Figure 3 This is a schematic diagram of another embodiment of the training method for the song recognition network in this application.

[0069] Figure 4 This is a schematic diagram of another embodiment of the training method for the song recognition network in this application. Detailed Implementation

[0070] This invention provides a training method for a song recognition network, a method for recognizing cover songs, and related devices, used to identify outliers and idiosyncrasies in cover versions of target songs, and to train the song recognition network based on the outliers and idiosyncrasies, thereby improving the accuracy of the song recognition network in recognizing cover songs.

[0071] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0072] The terms "first," "second," "third," "fourth," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0073] Cover song recognition technology refers to the process of extracting melody information from song audio using feature extraction methods, and identifying different cover versions of the same song based on melody similarity. Cover song recognition technology has wide applications in copyright detection, song grouping, and song theft detection.

[0074] Existing technologies for training song recognition network models typically involve improving and training the model based on its architecture or loss function to enhance its recognition rate for cover songs. However, the applicant discovered that with improvements to the model architecture and loss function, the model's song recognition rate has reached a bottleneck and cannot be further improved.

[0075] Based on this, this application proposes a training method for a song recognition network model, which improves the song recognition network model from the perspective of outliers and wild points, thereby increasing the song recognition rate of the song recognition network model. For ease of understanding, the training method of the song recognition network model in this application embodiment is described below. Please refer to... Figure 1 One embodiment of the training method for the song recognition network model in this application includes:

[0076] 101. Obtain the spectral features of multiple training groups, wherein each training group includes the spectral features of the original version of the target song and the spectral features of multiple cover versions of the target song;

[0077] When recognizing cover songs, song recognition network models typically rely on the song's spectral characteristics for identification. Therefore, when training the song recognition network model, the spectral characteristics of the song are also used for training.

[0078] Therefore, in this embodiment, the spectral features of multiple training groups are first obtained. Each training group includes the spectral features of the original version of the target song and the spectral features of multiple cover versions of the target song.

[0079] In this embodiment, the spectral features can be either constant Q variation features or Mel frequency cepstral coefficients, without any specific limitations.

[0080] Specifically, in music, all notes are composed of a series of octaves of equal temperament, which corresponds to the twelve semitones in an octave on a piano. The frequency ratio between each semitone and the preceding semitone is 2 1 / 12. Obviously, for two octaves of the same pitch, the higher octave has twice the frequency of the lower octave.

[0081] Therefore, in music, sounds are distributed exponentially, but the audio spectra obtained by Fourier transform are linearly distributed. The frequency points of the two cannot be matched one-to-one, which will cause errors in the estimation of certain pitch frequencies. Therefore, in this embodiment, a time-frequency transformation algorithm with the same exponential distribution law, the CQT (Constant Q Transform) algorithm, is preferred to extract the spectral features of the song and obtain the CQT spectral features.

[0082] 102. Input the spectral features of the songs in each training group into the song recognition network model to obtain the feature vector of the original version of the target song and the feature vectors of multiple cover versions in each training group output by the song recognition network model.

[0083] The spectral features of the original version of the target song and the spectral features of the multiple cover versions of the target song in each training group are obtained and input into the song recognition network model. This results in the feature vectors of the original version of the target song and the feature vectors of the multiple cover versions of the target song in each training group output by the song recognition network model.

[0084] 103. Based on the feature vectors of the original version of the target song, the feature vectors of multiple cover versions, and a preset first threshold and second threshold in each training group, determine the outliers and outliers of the cover versions of the target song in each training group. The outliers are used to characterize cover versions where the distance between the feature vector of the cover version and the center point is greater than the second threshold. The outliers are used to characterize cover versions where the distance between the feature vector of the cover version and the center point is greater than the first threshold and less than the second threshold. The second threshold is greater than the first threshold. The center point represents the mean of the feature vectors of the original version of the target song and the feature vectors of multiple cover versions in each training group.

[0085] After obtaining the feature vectors of the original version of the target song and the feature vectors of multiple cover versions in each training group, the outliers and isolated points of the cover versions of the target song in each training group can be determined based on the feature vectors of the original version of the target song and the feature vectors of multiple cover versions in each training group, as well as the preset first threshold and second threshold.

[0086] Specifically, when determining outliers and outliers in the cover versions of a target song, the center point of each training group is first calculated. The center point represents the mean of the feature vectors of the original version of the target song and the feature vectors of multiple cover versions in each training group. If the distance between the feature vector of cover version A and the center point is greater than the second threshold, then cover version A is an outlier. If the distance between the feature vector of cover version B and the center point is greater than the first threshold but less than the second threshold, then cover version B is an outlier. The second threshold is greater than the first threshold.

[0087] Using this method, outliers and wildcards in each training group can be identified.

[0088] 104. Based on outliers and isolated points in multiple training groups, the parameters of the song recognition network model are corrected.

[0089] After obtaining the outliers and outliers in each training group, the parameters of the song recognition network model are modified based on these outliers and outliers. Modifying the model parameters for outliers makes the samples within the group more clustered. Otherwise, outliers would cause a large shift in the center point, affecting the song recognition network model's recognition of cover versions. Modifying the model parameters for outliers can avoid the influence of poor-quality cover versions on the center point, and correspondingly avoid the deviation of the song recognition network model in recognizing cover versions. Therefore, the embodiments of this application modify the parameters of the song recognition network model based on outliers and outliers in multiple training groups, which can improve the accuracy of the song recognition network model in recognizing poor-quality cover versions, that is, improve the accuracy of recognizing cover versions of the target song.

[0090] In this embodiment, spectral features of multiple training groups are obtained. Each training group includes the spectral features of the original version of the target song and the spectral features of multiple cover versions of the target song. The spectral features of the songs in each training group are input into a song recognition network model to obtain the feature vectors of the original version of the target song and the feature vectors of the multiple cover versions in each training group output by the song recognition network model. Based on the feature vectors of the original version of the target song, the feature vectors of the multiple cover versions, and a preset first threshold and a second threshold, outliers and isolated points of the cover versions of the target song in each training group are determined. Outliers are used to characterize cover versions where the distance between the feature vector of the cover version and the center point is greater than the second threshold. Isolated points are used to characterize cover versions where the distance between the feature vector of the cover version and the center point is greater than the first threshold and less than the second threshold. The second threshold is greater than the first threshold. The center point represents the mean of the feature vectors of the original version of the target song and the feature vectors of the multiple cover versions in each training group. Based on the outliers and isolated points in the multiple training groups, the parameters of the song recognition network model are corrected.

[0091] Because this application embodiment can train the song recognition network model based on outliers and isolated points in the cover versions of the target song, and when the model parameters are corrected for outliers, the samples within the group can be more clustered. Otherwise, outliers will cause a large shift in the center point, affecting the recognition rate of the song recognition network model for cover versions. When the model parameters are corrected for outliers, the influence of poor-quality cover versions on the center point can be avoided, and the deviation of the song recognition network model in recognizing cover versions can be avoided accordingly. Therefore, this application embodiment can improve the accuracy of the song recognition network model in recognizing poor-quality cover versions by correcting the parameters of the song recognition network model based on outliers and isolated points in multiple training groups, which can improve the recognition accuracy of the song recognition network model for poor-quality cover versions, that is, improve the recognition accuracy of the cover versions of the target song.

[0092] based on Figure 1 In the described embodiment, after inputting the spectral features of the songs in each training group into the song recognition network model, the following steps can also be performed:

[0093] The parameters of the song recognition network model are optimized using an IBN normalization layer. The BN layer is used to normalize the parameters of the song recognition network model across multiple training groups, while the IBN layer is used to normalize the parameters of the song recognition network model across a single sample.

[0094] After inputting the spectral features of the songs in each training group into the song recognition network model, the parameters of the song recognition network model can be optimized using the IBN normalization layer. This is because the BN layer can normalize the parameters of the song recognition network model across multiple training groups, while the IBN layer can normalize the parameters of the song recognition network model across a single sample. These two normalization methods are beneficial for the song recognition network model to learn the overall similarity of songs with the same melody and the differences between songs with different melody.

[0095] The descriptions of the BN and IBN layers are similar to those in existing technologies, and will not be repeated here.

[0096] based on Figure 1 The embodiments described above will be further described below. Figure 1 Step 104 in the embodiment is described in detail:

[0097] Specifically, when using outliers and isolated points from the target song cover version to correct the song recognition network model, outliers in each training group can be deleted. This is because outliers represent cover versions with very poor singing quality. To avoid the influence of outliers on the parameters of the song recognition network model, this embodiment deletes outliers from the target song cover version and uses the isolated points from the target song cover version in each training group to correct the parameters of the song recognition network model.

[0098] Furthermore, when adjusting the parameters of the song recognition network model using outliers from cover versions of the target song:

[0099] 1. Identify outliers and in-groups in each training group. In-groups refer to cover versions of the target song whose feature vectors are less than the distance between the feature vector and the center point. After obtaining the outliers and in-groups in each training group;

[0100] Specifically, when determining the in-group point, it is only necessary to calculate the cosine distance between the feature vector of the target song cover version and the feature vector of the center point. If the cosine distance is less than the first threshold, then the cover version is the in-group point.

[0101] 2. Calculate the deviation of all outliers in each training group, where the deviation of each outlier represents the ratio of the distance of each outlier to the center point of the training group to the mean distance of all points within the training group to the center point.

[0102] After obtaining the within-group points and outliers in each training set, the deviation of all outliers in each training set is further calculated. For ease of understanding, let's assume the deviation of the first outlier (any outlier in the training set) is... Let s1 be the distance from the first outlier to the center of the training group, and D be the distance from all points within the training group to the center. Then:

[0103] ,

[0104] The deviation of all outliers in this training set is... , where n represents the number of outliers within the same training group.

[0105] 3. The deviations of all outliers in multiple training groups are summed to obtain the outlier loss.

[0106] After obtaining the outlier bias for each training group, the outlier biases of all training groups are summed to obtain the outlier loss for all training groups.

[0107] For ease of understanding, Figure 2 A schematic diagram of in-group points, outliers, and wild points in two training groups is provided.

[0108] After obtaining the outlier bias in each training session, the biases of all outliers in all training groups are summed to obtain the outlier loss for all training groups.

[0109] After obtaining the deviation of outliers in all training groups, the outlier loss of all training groups can be obtained. Then, the parameters of the song recognition network model can be corrected by using the outlier loss and the backpropagation algorithm. The process of the backpropagation algorithm is consistent with that described in the existing technology, and will not be repeated here.

[0110] This application provides a detailed description of the process of correcting model parameters using outliers and remote points in the training set, thereby improving the convenience of the model parameter correction process in this application.

[0111] Furthermore, based on Figure 1 In the aforementioned embodiments, when training the song recognition network model, it is necessary to train not only the model's ability to recognize cover versions of the target song, but also its ability to recognize non-target songs. Therefore, this embodiment adds at least one other song, distinct from the target song, to the training set. Both the target song and other songs have their own sample labels. The training process of the song recognition network model after adding other songs to the training set is described below. Please refer to [link to relevant documentation]. Figure 3 Another embodiment of the training method for the song recognition network model in this application includes:

[0112] 301. Obtain the spectral features of multiple training groups, wherein each training group includes the spectral features of the original version of the target song, the spectral features of multiple cover versions of the target song, and at least one other song that is different from the target song, wherein the target song and other songs are accompanied by sample labels.

[0113] Different from Figure 1 In this embodiment, the training group includes not only the original and cover versions of the target song, but also at least one other song that is different from the target song, and both the target song and the other songs have their own sample labels.

[0114] In this way, after training the song recognition network model using the training group, the song recognition network model can not only identify the original version and cover version of the target song, but also identify the target song and non-target songs, thereby improving the song recognition ability of the song recognition network model.

[0115] 302. Input the spectral features of the songs in each training group into the song recognition network model to obtain the feature vectors of the original version of the target song, the feature vectors of multiple cover versions, and the feature vectors of other songs in each training group output by the song recognition network model.

[0116] Convolutional layers in a song recognition network model can typically identify feature vectors of spectral features. Therefore, by inputting the spectral features of each training group into the song recognition network model, we can obtain the feature vectors of the original version of the target song, the feature vectors of multiple cover versions, and the feature vectors of other songs in each training group.

[0117] 303. The parameters of the song recognition network model are optimized using the IBN normalization layer, wherein the BN layer is used to normalize the parameters of the song recognition network model in the dimensions of multiple training groups, and the IBN layer is used to normalize the parameters of the song recognition network model in the dimension of a single sample.

[0118] Because the BN layer can normalize the parameters of the song recognition network model across multiple training groups, while the IBN layer can normalize the parameters of the song recognition network model across a single sample, these two normalization methods are beneficial for the song recognition network model to learn the overall similarity of songs with the same melody and the differences between songs with different melody.

[0119] 304. Based on the feature vectors of the original version of the target song, the feature vectors of multiple cover versions, and a preset first threshold and second threshold in each training group, determine the outliers and outliers of the cover versions of the target song in each training group. The outliers are used to characterize cover versions where the distance between the feature vector of the cover version and the center point is greater than the second threshold. The outliers are used to characterize cover versions where the distance between the feature vector of the cover version and the center point is greater than the first threshold and less than the second threshold. The second threshold is greater than the first threshold. The center point represents the mean of the feature vectors of the original version of the target song and the feature vectors of multiple cover versions in each training group.

[0120] It should be noted that step 304 in the embodiments of this application is different from... Figure 1 The description of step 103 in the embodiments is similar and will not be repeated here.

[0121] 305. Determine the ternary loss based on the feature vectors of the original version of the target song, the feature vectors of multiple cover versions, and the feature vectors of the other songs in each training group;

[0122] Different from Figure 1In the embodiments described above, after identifying outliers and isolated points in each training group, this application further designs a ternary loss. The purpose of designing the ternary loss is to make the features of the original version and the cover version of the target song closer together, while making the features of the original version of the target song more distant from those of other songs, thereby improving the song recognition network model's ability to recognize other songs.

[0123] Specifically, when determining ternary loss:

[0124] 1. Calculate the average value d1 of the first distance between the feature vector of the original version of the target song and the feature vectors of multiple cover versions in each training group;

[0125] Suppose that the first distance between the feature vector of the original version of the target song and the feature vector of the first cover version in the training group is... The first distance between the feature vector of the second cover version and the feature vector of the second cover version is The first distance between the feature vector of the nth cover version and the feature vector of the nth cover version is ,but .

[0126] 2. Calculate the second distance d2 between the feature vector of the original version of the target song and the feature vector of other songs in each training group;

[0127] If there is another song, the distance between the feature vector of the original version of the target song and the feature vector of the other song is d2.

[0128] 3. Calculate the ternary loss for each training group based on the average value d1 of the first distance, the second distance d2, and the first formula;

[0129] The first formula includes:

[0130] L = max(d1-d2+margin,0), where margin represents the adjustable degree coefficient and L represents the ternary loss.

[0131] After obtaining d1 and d2, the ternary loss can be further calculated according to the first formula, where margin represents an adjustable program coefficient. In order to make the feature vectors of the original version and the cover version of the target song closer together, while the feature vectors of the target song and other songs are more distant, d1 is made to be less than d2. In this embodiment, when d1 is greater than d2, the value of d1-d2 can be adjusted by adjusting the margin to make the margin negative.

[0132] 306. Based on the outliers, outliers, and ternary loss in each training group, the parameters of the song recognition network model are corrected.

[0133] After obtaining the outliers, outliers, and ternary loss for each training group, the parameters of the song recognition network model can be corrected using these outliers, outliers, and ternary loss.

[0134] In this embodiment of the application, in addition to introducing outliers and isolated points, a ternary loss function is also introduced when training the parameters of the song recognition network model. This allows the ability of the song recognition network model to recognize other songs to be trained through the ternary loss function, thereby improving the recognition ability of the song recognition network model for other songs.

[0135] based on Figure 3 The embodiment described below will describe step 306 in detail, which will be described from two aspects:

[0136] I. Correcting the parameters of the song recognition network model using only ternary loss.

[0137] 1. Remove outliers and wildcards from each training group;

[0138] When modifying the parameters of a song recognition network model, in addition to utilizing outliers, outliers can be removed, and only the ternary loss can be used to modify the parameters of the song recognition network model.

[0139] 2. Based on the ternary loss, the backpropagation algorithm is used to correct the parameters of the song recognition network model.

[0140] After obtaining the ternary loss, the parameters of the song recognition network model are further modified using the backpropagation algorithm. The process of the backpropagation algorithm is similar to that described in the existing technology, and will not be repeated here.

[0141] The process of calculating the ternary loss is similar to that described in step 304, and will not be repeated here.

[0142] This application embodiment uses only ternary loss to correct the parameters of the song recognition network model, which improves the convenience of the model parameter correction process.

[0143] II. Correcting the parameters of the song recognition network model using outlier points and ternary loss.

[0144] 1. Remove outliers from each training group;

[0145] Since outliers in each training group represent cover versions of target songs with very poor singing quality, in order to eliminate the influence of outliers on the training process of the song recognition network model, outliers in each training group are deleted in this embodiment of the application.

[0146] 2. Select two outliers in the same training group as the original version and the cover version of the target song for the next round of training for that training group.

[0147] In order to obtain a larger optimization space for outliers than for in-group points, in this embodiment of the application, two outliers in the same training are selected as the original version and cover version of the target song for the next round of training of the training group. The two outliers mentioned above are any two outliers in the same training group.

[0148] 3. Calculate the outlier loss based on the outliers in each training group across multiple training groups;

[0149] In this embodiment of the application, when correcting the parameters of the song recognition network model, the outlier loss is also calculated based on the outliers in each of the multiple training groups. The calculation process of the outlier loss is similar to that described in the above embodiments, and will not be repeated here.

[0150] 4. Based on the ternary loss and outlier loss, the backpropagation algorithm is used to correct the parameters of the song recognition network model.

[0151] After obtaining the ternary loss and outlier loss, this embodiment of the application simultaneously employs the ternary loss, outlier loss, and backpropagation algorithm to correct the parameters of the song recognition network model.

[0152] Because ternary loss can improve the ability of a song recognition network model to recognize target songs and other songs, while outlier loss can improve the ability of a song recognition network model to recognize cover versions of target songs, training a song recognition network model using ternary loss and outlier loss can not only improve the ability of the song recognition network model to recognize cover versions of target songs, but also improve the ability of the song recognition network model to recognize non-target songs.

[0153] Furthermore, based on Figure 3 In the described embodiment, in designing the loss function, in addition to using the ternary loss, a classification loss can also be calculated. The song recognition network model is then trained based on outliers, ternary loss, and classification loss. Details are described below; please refer to [link to relevant documentation]. Figure 4 Another embodiment of the training method for the song recognition network model in this application includes:

[0154] 401. Obtain the spectral features of multiple training groups, wherein each training group includes the spectral features of the original version of the target song, the spectral features of multiple cover versions of the target song, and at least one other song that is different from the target song, wherein the target song and other songs are accompanied by sample labels.

[0155] 402. Input the spectral features of the songs in each training group into the song recognition network model to obtain the feature vectors of the original version of the target song, the feature vectors of multiple cover versions, and the feature vectors of other songs in each training group output by the song recognition network model.

[0156] 403. The parameters of the song recognition network model are optimized using the IBN normalization layer, wherein the BN layer is used to normalize the parameters of the song recognition network model in the dimensions of multiple training groups, and the IBN layer is used to normalize the parameters of the song recognition network model in the dimension of a single sample.

[0157] 404. Based on the feature vectors of the original version of the target song, the feature vectors of multiple cover versions, and a preset first threshold and second threshold in each training group, determine the outliers and outliers of the cover versions of the target song in each training group. The outliers are used to characterize cover versions where the distance between the feature vector of the cover version and the center point is greater than the second threshold. The outliers are used to characterize cover versions where the distance between the feature vector of the cover version and the center point is greater than the first threshold and less than the second threshold. The second threshold is greater than the first threshold. The center point represents the mean of the feature vectors of the original version of the target song and the feature vectors of multiple cover versions in each training group.

[0158] 405. Determine the ternary loss based on the feature vectors of the original version of the target song, the feature vectors of multiple cover versions, and the feature vectors of the other songs in each training group;

[0159] It should be noted that steps 401 to 405 in the embodiments of this application are different from those in the present application. Figure 3 The descriptions of steps 301 to 305 in the embodiments are similar and will not be repeated here.

[0160] 406. Obtain the true sample labels of the target song and other songs output by the song recognition network model in each training group, as well as the probability values ​​of the true sample labels;

[0161] Specifically, when classifying a target song, the song recognition network model can also output sample labels for the identified object. In order to calculate the classification loss, this application embodiment obtains the real sample labels of the target song and other songs output by the song recognition network model in each training group, as well as the probability value of the real sample labels. For example, when the input is the original version of the target song, the real sample label of the identified object output by the song recognition network model is the target song, and the probability value of the real sample label is output. Similarly, when the input is other songs, the real sample label of the identified object output by the song recognition network model is other songs, and the probability value of the real sample label is output.

[0162] 407. Calculate the classification loss for multiple training groups based on the second formula, wherein the second formula includes:

[0163] ,

[0164] in, Indicates the labels of real samples. This represents the probability value of the true sample label. This represents the number of sample labels, where C represents the maximum number of sample labels. This represents the raw score of the target song and other songs' real sample labels output by the song recognition network model in each training group;

[0165] After obtaining the true sample labels of the target songs in each training group output by the song recognition network model, as well as the probability values ​​of the true sample labels, and the true sample labels of other songs in each training group output by the song recognition network model, the classification loss of the song recognition network model for each training group can be calculated according to the second formula.

[0166] 408. Based on the outliers, ternary loss, and classification loss in each training group, the parameters of the song recognition network model are corrected.

[0167] Specifically, the process of adjusting the parameters of the song recognition network model based on outliers, ternary loss, and classification loss in each training group will be described in the following examples, and will not be repeated here.

[0168] In designing the loss function, this application's embodiments include a classification loss in addition to the ternary loss. Based on outliers, the ternary loss, and the classification loss, the parameters of the song recognition network model are adjusted, thereby improving its performance relative to... Figure 3 In this embodiment, the accuracy of the song recognition network model in identifying target songs is further improved.

[0169] based on Figure 4 The embodiment described below will describe step 408 in detail from three aspects:

[0170] I. Correcting the parameters of the song recognition network model using ternary loss and classification loss.

[0171] 1. Remove outliers and wildcards from each training group;

[0172] In this embodiment of the application, when modifying the parameters of the song recognition network model, in addition to utilizing outliers, outliers and wild points in each training group can be deleted, and only ternary loss and classification loss are used to modify the parameters of the song recognition network model.

[0173] 2. Based on the ternary loss and the classification loss, the parameters of the song recognition network model are corrected using the backpropagation algorithm.

[0174] After obtaining the ternary loss and classification loss, the parameters of the song recognition network model are corrected using the ternary loss, classification loss, and backpropagation algorithm, respectively.

[0175] The calculation process for ternary loss and classification loss is similar to that described in the above embodiments, and will not be repeated here.

[0176] The embodiments of this application only use ternary loss and classification loss to modify the parameters of the song recognition network model, thereby improving the efficiency of training the song recognition network model.

[0177] II. Parameters of the song recognition network model are corrected using outlier loss, ternary loss, and classification loss.

[0178] 1. Delete the outliers in each training group;

[0179] Specifically, in order to avoid the impact of poor-quality cover versions on the parameters of the song recognition network model, this embodiment of the application removes outliers in each training group.

[0180] 2. Calculate the outlier loss based on the outliers in each of the multiple training groups;

[0181] The calculation process for outlier loss is similar to that described in the above embodiments, and will not be repeated here.

[0182] 3. Based on the outlier loss, the ternary loss, and the classification loss, the parameters of the song recognition network model are corrected using the backpropagation algorithm.

[0183] Unlike the above embodiments, this application's embodiments use outlier loss, triplet loss, and classification loss, as well as backpropagation algorithm, to correct the parameters of the song recognition network model. Therefore, compared with the above embodiments that use triplet loss and classification loss to correct the song recognition network model, outlier loss is added. Using outlier loss to correct the song recognition network model can make outliers in the training group closer to the center point of the group, that is, improve the recognition rate of the song recognition network model for the cover version of the target song.

[0184] III. The parameters of the song recognition network model are corrected using outlier analysis, outlier loss, triplet loss, and classification loss.

[0185] 1. Remove outliers from each training group;

[0186] 2. Select two outliers in the same training group as the original version and cover version of the target song for the next round of training in the training group;

[0187] In order to obtain a larger optimization space for outliers than for in-group points, this application embodiment also selects any two outliers in the same group as the original version and cover version of the target song for the next round of training of the training group, so as to better optimize the outliers in the same training group.

[0188] 3. Calculate the outlier loss based on the outliers in each of the multiple training groups;

[0189] 4. Based on the ternary loss, the outlier loss, and the classification loss, the parameters of the song recognition network model are corrected using the backpropagation algorithm.

[0190] In this embodiment of the application, when correcting the song recognition network model, compared to the above-mentioned correction process using outlier loss, triplet loss, and classification loss, outlier points are added. By selecting two outliers in the same training group as the original version and cover version of the target song for the next round of training, outliers in the same training group can be better optimized. Therefore, compared to the above-mentioned training process using outlier loss, triplet loss, and classification loss, this embodiment of the application improves the recognition rate of the song recognition network model for outliers within the group.

[0191] based on Figures 1 to 4 After training the song recognition network model, this application embodiment also provides a method for recognizing cover songs, the method comprising:

[0192] Input the song to be identified into Figures 1 to 4 The song recognition network model described in the embodiment can obtain the song name (i.e., sample label) of the song to be recognized and the type of the song to be recognized, which includes the original version and the cover version.

[0193] because Figures 1 to 4 The song recognition network model in the embodiment improves the recognition rate of outliers in cover versions. Therefore, the embodiment of this application can improve the accuracy of identifying whether a song is a cover version.

[0194] The training method of the song recognition network model and the recognition method of cover songs in the embodiments of this application have been described above. The computer device in the embodiments of this invention is described below from the perspective of hardware processing:

[0195] One embodiment of the computer device in this invention includes:

[0196] Processor and memory;

[0197] When a memory is used to store computer programs, and a processor executes the computer programs stored in the memory, the following steps can be achieved:

[0198] Obtain the spectral features of multiple training groups, where each training group includes the spectral features of the original version of the target song and the spectral features of multiple cover versions of the target song;

[0199] The spectral features of the songs in each training group are input into the song recognition network model to obtain the feature vector of the original version of the target song and the feature vectors of multiple cover versions in each training group output by the song recognition network model.

[0200] Based on the feature vectors of the original version of the target song, the feature vectors of multiple cover versions, and preset first and second thresholds in each training group, outliers and isolated points of the cover versions of the target song in each training group are determined. The outliers are used to characterize cover versions where the distance between the feature vector of the cover version and the center point is greater than the second threshold. The isolated points are used to characterize cover versions where the distance between the feature vector of the cover version and the center point is greater than the first threshold and less than the second threshold. The second threshold is greater than the first threshold. The center point represents the mean of the feature vectors of the original version of the target song and the feature vectors of multiple cover versions in each training group.

[0201] The parameters of the song recognition network model are corrected based on outliers and isolated points from multiple training groups.

[0202] In some embodiments of the present invention, the processor may also be used to implement the following steps:

[0203] Remove the outliers from each training group;

[0204] Calculate the outlier loss based on the outliers in each of the multiple training groups;

[0205] Based on the outlier loss, the parameters of the song recognition network model are corrected using the backpropagation algorithm.

[0206] In some embodiments of the present invention, the processor may also be used to implement the following steps:

[0207] Identify outliers and in-group points in each training group, wherein the in-group points represent cover versions whose feature vectors are less than the first threshold distance from the center point;

[0208] Calculate the deviation of all outliers in each training group, where the deviation of each outlier represents the ratio of the distance of each outlier to the center point of the training group to the mean distance of all points within the training group to the center point.

[0209] The outlier loss is obtained by summing the deviations of all outliers in multiple training groups.

[0210] In some embodiments of the present invention, each training group also includes at least one other song that is distinct from the target song, wherein the target song and other songs each have their own sample labels. The processor can also be used to implement the following steps:

[0211] The spectral features of the songs in each training group are input into the song recognition network model to obtain the feature vector of the original version of the target song and the feature vectors of multiple cover versions of the target song in each training group, as well as the feature vectors of the other songs.

[0212] Based on the feature vectors of the original version of the target song, the feature vectors of multiple cover versions, and the feature vectors of other songs in each training group, a ternary loss is determined.

[0213] The parameters of the song recognition network model are corrected based on the outliers, outliers, and the ternary loss in each training group.

[0214] In some embodiments of the present invention, the processor may also be used to implement the following steps:

[0215] Calculate the average of the first distances d1 between the feature vectors of the original version of the target song and the feature vectors of multiple cover versions in each training group;

[0216] Calculate the second distance d2 between the feature vector of the original version of the target song and the feature vectors of other songs in each training group;

[0217] The ternary loss for each training group is calculated based on the average value d1 of the first distance, the second distance d2, and the first formula.

[0218] The first formula includes:

[0219] L = max(d1-d2+margin,0), where margin represents the adjustable degree coefficient and L represents the ternary loss.

[0220] In some embodiments of the present invention, the processor may also be used to implement the following steps:

[0221] Remove outliers and wildcards from each training group;

[0222] Based on the ternary loss, the parameters of the song recognition network model are corrected using the backpropagation algorithm.

[0223] In some embodiments of the present invention, the processor may also be used to implement the following steps:

[0224] Remove outliers from each training group;

[0225] Two outliers in the same training group are selected as the original version and the cover version of the target song for the next round of training in the training group.

[0226] Calculate the outlier loss based on the outliers in each of the multiple training groups;

[0227] Based on the ternary loss and the outlier loss, the parameters of the song recognition network model are corrected using the backpropagation algorithm.

[0228] In some embodiments of the present invention, after determining the ternary loss based on the feature vectors of the original version of the target song, the feature vectors of multiple cover versions, and the feature vectors of the other songs in each training group, the processor can further be used to implement the following steps:

[0229] Obtain the real sample labels of the target song and other songs output by the song recognition network model in each training group, and the probability value of the real sample labels;

[0230] The classification loss for multiple training groups is calculated based on the second formula;

[0231] The second formula includes: ,in, Indicates the labels of real samples. This represents the probability value of the true sample label. This represents the number of sample labels, where C represents the maximum number of sample labels. This represents the raw score of the target song and other songs' real sample labels output by the song recognition network model in each training group;

[0232] The parameters of the song recognition network model are adjusted based on the outliers, the ternary loss, and the classification loss in each training group.

[0233] In some embodiments of the present invention, the processor may also be used to implement the following steps:

[0234] Remove the outliers from each training group;

[0235] Calculate the outlier loss based on the outliers in each of the multiple training groups;

[0236] Based on the outlier loss, the ternary loss, and the classification loss, the parameters of the song recognition network model are corrected using the backpropagation algorithm.

[0237] In some embodiments of the present invention, the processor may also be used to implement the following steps:

[0238] Remove outliers and wildcards from each training group;

[0239] Based on the ternary loss and the classification loss, the parameters of the song recognition network model are corrected using the backpropagation algorithm.

[0240] In some embodiments of the present invention, the processor may also be used to implement the following steps:

[0241] Remove outliers from each training group;

[0242] Two outliers in the same training group are selected as the original version and the cover version of the target song for the next round of training in the training group.

[0243] Calculate the outlier loss based on the outliers in each of the multiple training groups;

[0244] Based on the ternary loss, the outlier loss, and the classification loss, the parameters of the song recognition network model are corrected using the backpropagation algorithm.

[0245] In some embodiments of the present invention, the spectral features include either constant Q variation features or Mel frequency cepstral coefficients.

[0246] In some embodiments of the present invention, after inputting the spectral features of the songs in each training group into the song recognition network model, the processor can also be used to implement the following steps:

[0247] The parameters of the song recognition network model are optimized using an IBN normalization layer. The BN layer is used to normalize the parameters of the song recognition network model across multiple training groups, while the IBN layer is used to normalize the parameters of the song recognition network model across a single sample.

[0248] Another embodiment of the computer device in this invention includes:

[0249] Input the song to be identified into the song recognition network model;

[0250] Obtain the song name and category of the song to be identified, as output by the song recognition network model, wherein the category of the song to be identified includes the original version and the cover version.

[0251] It is understood that when the processor in the computer device described above executes the computer program, it can also realize the functions of each unit in the corresponding device embodiments described above, which will not be repeated here. For example, the computer program can be divided into one or more modules / units, and the one or more modules / units are stored in the memory and executed by the processor to complete the present invention.

[0252] The computer device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the processor and memory are merely examples of a computer device and do not constitute a limitation on the computer device. It may include more or fewer components, or a combination of certain components, or different components. For example, the computer device may also include input / output devices, network access devices, buses, etc.

[0253] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the computer device, connecting various parts of the computer device via various interfaces and lines.

[0254] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the computer device by running or executing the computer programs and / or modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function, etc.; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, RAM, plug-in hard disk, smart media card (SMC), secure digital card (SD card), flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0255] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the processor can perform the following steps:

[0256] Obtain the spectral features of multiple training groups, where each training group includes the spectral features of the original version of the target song and the spectral features of multiple cover versions of the target song;

[0257] The spectral features of the songs in each training group are input into the song recognition network model to obtain the feature vector of the original version of the target song and the feature vectors of multiple cover versions in each training group output by the song recognition network model.

[0258] Based on the feature vectors of the original version of the target song, the feature vectors of multiple cover versions, and preset first and second thresholds in each training group, outliers and isolated points of the cover versions of the target song in each training group are determined. The outliers are used to characterize cover versions where the distance between the feature vector of the cover version and the center point is greater than the second threshold. The isolated points are used to characterize cover versions where the distance between the feature vector of the cover version and the center point is greater than the first threshold and less than the second threshold. The second threshold is greater than the first threshold. The center point represents the mean of the feature vectors of the original version of the target song and the feature vectors of multiple cover versions in each training group.

[0259] The parameters of the song recognition network model are corrected based on outliers and isolated points from multiple training groups.

[0260] In some embodiments of the present invention, when a computer program stored on a computer-readable storage medium is executed by a processor, the processor may also be used to perform the following steps:

[0261] Remove the outliers from each training group;

[0262] Calculate the outlier loss based on the outliers in each of the multiple training groups;

[0263] Based on the outlier loss, the parameters of the song recognition network model are corrected using the backpropagation algorithm.

[0264] In some embodiments of the present invention, when a computer program stored on a computer-readable storage medium is executed by a processor, the processor may also be used to perform the following steps:

[0265] Identify outliers and in-group points in each training group, wherein the in-group points represent cover versions whose feature vectors are less than the first threshold distance from the center point;

[0266] Calculate the deviation of all outliers in each training group, where the deviation of each outlier represents the ratio of the distance of each outlier to the center point of the training group to the mean distance of all points within the training group to the center point.

[0267] The outlier loss is obtained by summing the deviations of all outliers in multiple training groups.

[0268] In some embodiments of the present invention, each training group further includes at least one other song that is distinct from the target song, wherein the target song and other songs are equipped with sample labels. When the computer program stored in the computer-readable storage medium is executed by the processor, the processor can also be used to implement the following steps:

[0269] The spectral features of the songs in each training group are input into the song recognition network model to obtain the feature vector of the original version of the target song and the feature vectors of multiple cover versions of the target song in each training group, as well as the feature vectors of the other songs.

[0270] Based on the feature vectors of the original version of the target song, the feature vectors of multiple cover versions, and the feature vectors of other songs in each training group, a ternary loss is determined.

[0271] The parameters of the song recognition network model are corrected based on the outliers, outliers, and the ternary loss in each training group.

[0272] In some embodiments of the present invention, when a computer program stored on a computer-readable storage medium is executed by a processor, the processor may also be used to perform the following steps:

[0273] Calculate the average of the first distances d1 between the feature vectors of the original version of the target song and the feature vectors of multiple cover versions in each training group;

[0274] Calculate the second distance d2 between the feature vector of the original version of the target song and the feature vectors of other songs in each training group;

[0275] The ternary loss for each training group is calculated based on the average value d1 of the first distance, the second distance d2, and the first formula.

[0276] The first formula includes:

[0277] L = max(d1-d2+margin,0), where margin represents the adjustable degree coefficient and L represents the ternary loss.

[0278] In some embodiments of the present invention, when a computer program stored on a computer-readable storage medium is executed by a processor, the processor may also be used to perform the following steps:

[0279] Remove outliers and wildcards from each training group;

[0280] Based on the ternary loss, the parameters of the song recognition network model are corrected using the backpropagation algorithm.

[0281] In some embodiments of the present invention, when a computer program stored on a computer-readable storage medium is executed by a processor, the processor may also be used to perform the following steps:

[0282] Remove outliers from each training group;

[0283] Two outliers in the same training group are selected as the original version and the cover version of the target song for the next round of training in the training group.

[0284] Calculate the outlier loss based on the outliers in each of the multiple training groups;

[0285] Based on the ternary loss and the outlier loss, the parameters of the song recognition network model are corrected using the backpropagation algorithm.

[0286] In some embodiments of the present invention, after determining the ternary loss based on the feature vectors of the original version of the target song, the feature vectors of multiple cover versions, and the feature vectors of the other songs in each training group, when the computer program stored in the computer-readable storage medium is executed by the processor, the processor may further be used to implement the following steps:

[0287] Obtain the real sample labels of the target song and other songs output by the song recognition network model in each training group, and the probability value of the real sample labels;

[0288] The classification loss for multiple training groups is calculated based on the second formula;

[0289] The second formula includes: ,in, Indicates the labels of real samples. This represents the probability value of the true sample label. This represents the number of sample labels, where C represents the maximum number of sample labels. This represents the raw score of the target song and other songs' real sample labels output by the song recognition network model in each training group;

[0290] The parameters of the song recognition network model are adjusted based on the outliers, the ternary loss, and the classification loss in each training group.

[0291] In some embodiments of the present invention, when a computer program stored on a computer-readable storage medium is executed by a processor, the processor may also be used to perform the following steps:

[0292] Remove the outliers from each training group;

[0293] Calculate the outlier loss based on the outliers in each of the multiple training groups;

[0294] Based on the outlier loss, the ternary loss, and the classification loss, the parameters of the song recognition network model are corrected using the backpropagation algorithm.

[0295] In some embodiments of the present invention, when a computer program stored on a computer-readable storage medium is executed by a processor, the processor may also be used to perform the following steps:

[0296] Remove outliers and wildcards from each training group;

[0297] Based on the ternary loss and the classification loss, the parameters of the song recognition network model are corrected using the backpropagation algorithm.

[0298] In some embodiments of the present invention, when a computer program stored on a computer-readable storage medium is executed by a processor, the processor may also be used to perform the following steps:

[0299] Remove outliers from each training group;

[0300] Two outliers in the same training group are selected as the original version and the cover version of the target song for the next round of training in the training group.

[0301] Calculate the outlier loss based on the outliers in each of the multiple training groups;

[0302] Based on the ternary loss, the outlier loss, and the classification loss, the parameters of the song recognition network model are corrected using the backpropagation algorithm.

[0303] In some embodiments of the present invention, the spectral features include either constant Q variation features or Mel frequency cepstral coefficients.

[0304] In some embodiments of the present invention, after the spectral features of the songs in each training group are input into the song recognition network model, when the computer program stored in the computer-readable storage medium is executed by the processor, the processor may also be used to implement the following steps:

[0305] The parameters of the song recognition network model are optimized using an IBN normalization layer. The BN layer is used to normalize the parameters of the song recognition network model across multiple training groups, while the IBN layer is used to normalize the parameters of the song recognition network model across a single sample.

[0306] The present invention also provides another computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the processor can perform the following steps:

[0307] Input the song to be identified into the song recognition network model;

[0308] Obtain the song name and category of the song to be identified, as output by the song recognition network model, wherein the category of the song to be identified includes the original version and the cover version.

[0309] It is understood that if the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a corresponding computer-readable storage medium. Based on this understanding, all or part of the processes in the above-described embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the above-described method embodiments. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.

[0310] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for training a song recognition network model, characterized in that, include: Obtain the spectral features of multiple training groups, where each training group includes the spectral features of the original version of the target song and the spectral features of multiple cover versions of the target song; The spectral features of the songs in each training group are input into the song recognition network model to obtain the feature vector of the original version of the target song and the feature vectors of multiple cover versions in each training group output by the song recognition network model. Based on the feature vectors of the original version of the target song, the feature vectors of multiple cover versions, and preset first and second thresholds in each training group, outliers and isolated points of the cover versions of the target song in each training group are determined. The outliers are used to characterize cover versions where the distance between the feature vector of the cover version and the center point is greater than the second threshold. The isolated points are used to characterize cover versions where the distance between the feature vector of the cover version and the center point is greater than the first threshold and less than the second threshold. The second threshold is greater than the first threshold. The center point represents the mean of the feature vectors of the original version of the target song and the feature vectors of multiple cover versions in each training group. The parameters of the song recognition network model are corrected based on outliers and isolated points from multiple training groups.

2. The training method according to claim 1, characterized in that, The parameter correction of the song recognition network model based on outliers and isolated points in multiple training groups includes: Remove the outliers from each training group; Calculate the outlier loss based on the outliers in each of the multiple training groups; Based on the outlier loss, the parameters of the song recognition network model are corrected using the backpropagation algorithm.

3. The training method according to claim 2, characterized in that, The step of calculating the outlier loss based on the outliers in each of the multiple training groups includes: Identify outliers and in-group points in each training group, wherein the in-group points represent cover versions whose feature vectors are less than the first threshold distance from the center point; Calculate the deviation of all outliers in each training group, where the deviation of each outlier represents the ratio of the distance of each outlier to the center point of the training group to the mean distance of all points within the training group to the center point. The outlier loss is obtained by summing the deviations of all outliers in multiple training groups.

4. The training method according to claim 1, characterized in that, Each training group also includes at least one other song that is different from the target song, where both the target song and the other songs come with their own sample labels; The spectral features of the songs in each training group are input into the song recognition network model to obtain the feature vector of the original version of the target song and the feature vectors of multiple cover versions in each training group, as output by the song recognition network model, including: The spectral features of the songs in each training group are input into the song recognition network model to obtain the feature vector of the original version of the target song and the feature vectors of multiple cover versions of the target song in each training group, as well as the feature vectors of the other songs. After determining the outliers and isolated points of the cover versions in each training group based on the feature vectors of the original version of the target song, the feature vectors of multiple cover versions, and preset first and second thresholds, the method further includes: Based on the feature vectors of the original version of the target song, the feature vectors of multiple cover versions, and the feature vectors of other songs in each training group, a ternary loss is determined. The parameters of the song recognition network model are corrected based on the outliers, outliers, and the ternary loss in each training group.

5. The training method according to claim 4, characterized in that, Based on the feature vectors of the original version of the target song, the feature vectors of multiple cover versions, and the feature vectors of other songs in each training group, a ternary loss is determined, including: Calculate the average of the first distances d1 between the feature vectors of the original version of the target song and the feature vectors of multiple cover versions in each training group; Calculate the second distance d2 between the feature vector of the original version of the target song and the feature vectors of other songs in each training group; The ternary loss for each training group is calculated based on the average value d1 of the first distance, the second distance d2, and the first formula. The first formula includes: L = max(d1-d2+margin,0), where margin represents the adjustable degree coefficient and L represents the ternary loss.

6. The training method according to claim 4, characterized in that, The parameters of the song recognition network model are corrected based on outliers, isolated points, and the ternary loss in each training group, including: Remove outliers and wildcards from each training group; Based on the ternary loss, the parameters of the song recognition network model are corrected using the backpropagation algorithm.

7. The training method according to claim 4, characterized in that, The parameters of the song recognition network model are corrected based on outliers, isolated points, and the ternary loss in each training group, including: Remove outliers from each training group; Two outliers in the same training group are selected as the original version and the cover version of the target song for the next round of training in the training group. Calculate the outlier loss based on the outliers in each of the multiple training groups; Based on the ternary loss and the outlier loss, the parameters of the song recognition network model are corrected using the backpropagation algorithm.

8. The training method according to claim 4, characterized in that, After determining the ternary loss based on the feature vectors of the original version of the target song, the feature vectors of multiple cover versions, and the feature vectors of other songs in each training group, the method further includes: Obtain the real sample labels of the target song and other songs output by the song recognition network model in each training group, and the probability value of the real sample labels; The classification loss for multiple training groups is calculated based on the second formula; The second formula includes: ,in, Indicates the labels of real samples. This represents the probability value of the true sample label. This represents the number of sample labels, where C represents the maximum number of sample labels. This represents the raw score of the target song and other songs' real sample labels output by the song recognition network model in each training group; The parameters of the song recognition network model are adjusted based on the outliers, the ternary loss, and the classification loss in each training group.

9. The training method according to claim 8, characterized in that, Based on the outliers, the triplet loss, and the classification loss in each training group, the parameters of the song recognition network model are corrected, including: Remove the outliers from each training group; Calculate the outlier loss based on the outliers in each of the multiple training groups; Based on the outlier loss, the ternary loss, and the classification loss, the parameters of the song recognition network model are corrected using the backpropagation algorithm.

10. The training method according to claim 8, characterized in that, Based on the outliers, the triplet loss, and the classification loss in each training group, the parameters of the song recognition network model are corrected, including: Remove outliers and wildcards from each training group; Based on the ternary loss and the classification loss, the parameters of the song recognition network model are corrected using the backpropagation algorithm.

11. The training method according to claim 8, characterized in that, Based on the outliers, the triplet loss, and the classification loss in each training group, the parameters of the song recognition network model are corrected, including: Remove outliers from each training group; Two outliers in the same training group are selected as the original version and the cover version of the target song for the next round of training in the training group. Calculate the outlier loss based on the outliers in each of the multiple training groups; Based on the ternary loss, the outlier loss, and the classification loss, the parameters of the song recognition network model are corrected using the backpropagation algorithm.

12. The method according to claim 1, characterized in that, The spectral characteristics include either the constant Q variation characteristics or the Mel frequency cepstral coefficients.

13. The method according to any one of claims 1 to 12, characterized in that, After inputting the spectral features of the songs in each training group into the song recognition network model, the method further includes: The parameters of the song recognition network model are optimized using an IBN normalization layer. The BN layer is used to normalize the parameters of the song recognition network model across multiple training groups, while the IBN layer is used to normalize the parameters of the song recognition network model across a single sample.

14. A method for identifying cover songs, characterized in that, The method includes: The song to be identified is input into the song recognition network model trained using the training method of the song recognition network model according to any one of claims 1 to 13; Obtain the song name and category of the song to be identified, as output by the song recognition network model, wherein the category of the song to be identified includes the original version and the cover version.

15. A computer device comprising a processor, wherein the processor, when executing a computer program stored in a memory, is configured to implement a training method for a song recognition network as claimed in any one of claims 1 to 13, or a cover song recognition method as claimed in claim 14.

16. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it is used to implement a training method for a song recognition network as described in any one of claims 1 to 13, or a cover song recognition method as described in claim 14.

Citation Information

Patent Citations

  • Voice separation method and device, computer equipment and storage medium

    CN112435684A

  • Song feature extraction model training method, song recognition method and related equipment

    CN113643720A