Detection model training method, pirated song detection method, and related device
By training a detection model and utilizing pre-trained models such as BERT, combined with song information and retrieval result summaries, the song type is automatically labeled, solving the problem of low efficiency in pirated song detection and achieving efficient and accurate pirated song detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TENCENT MUSIC ENTERTAINMENT TECH (SHENZHEN) CO LTD
- Filing Date
- 2022-11-11
- Publication Date
- 2026-07-24
AI Technical Summary
Existing technologies are inefficient at detecting pirated songs and cannot meet the review requirements of a massive amount of existing songs and a large number of newly added songs.
By training a detection model and utilizing pre-trained models such as BERT, combined with song information and retrieval result summaries, the confidence scores for genuine and pirated songs are calculated, and song types are automatically labeled, reducing manual intervention.
It significantly improves the efficiency of detecting pirated songs, reduces the need for manual review, saves computing resources, and improves the accuracy and efficiency of detection.
Smart Images

Figure CN115757859B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of audio processing, and more particularly to detection model training methods, pirated song detection methods, and related equipment. Background Technology
[0002] In recent years, the continuous increase in pirated songs has polluted the music library and affected various aspects such as song recommendation and song retrieval.
[0003] Currently, manual review is the primary method used to distinguish between original and pirated songs.
[0004] In the process of developing this invention, the inventors discovered that existing technologies suffer from at least one problem: low review efficiency. Manual song review is insufficient to handle the massive amount of existing songs and the large number of new songs added daily. Summary of the Invention
[0005] This application provides a detection model training method, a method for detecting pirated songs, and related equipment to improve the efficiency of pirated song detection.
[0006] The first aspect of this application provides a detection model training method, including:
[0007] Obtain multiple pre-processed songs that are pre-tagged with song tags, the song tags being used to identify whether the pre-processed songs are pirated or legitimate;
[0008] Using the first song information of each preprocessed song as the search keyword, obtain the search results corresponding to each first song information;
[0009] Extract the corresponding search result summary from the search results corresponding to the training songs;
[0010] Each of the preprocessed songs is used as a training song in turn. The first song information of the training song and the retrieval result summary corresponding to the training song are input into the pre-trained model to output the authenticity confidence and piracy confidence of the training song.
[0011] The loss value is calculated based on the confidence level of genuine products, the confidence level of pirated products, the song tags of the training songs, and the preset loss function;
[0012] The model parameters of the pre-trained model are adjusted based on the loss value until the loss value meets the preset convergence condition to obtain the target detection model.
[0013] In one specific implementation, the method further includes:
[0014] Based on the audio fingerprint of each existing song, multiple existing songs in the music library are clustered to obtain at least one cluster group.
[0015] The singer information of the most popular song in each cluster group is determined as the target singer information corresponding to each cluster group, and the most popular song is the existing song with the highest popularity in the cluster group.
[0016] Determine whether the singer information of each existing song in each cluster group is the target singer information corresponding to each cluster group;
[0017] If yes, then mark the existing songs as genuine songs; otherwise, mark the existing songs as pirated songs.
[0018] Based on the second song information of each of the existing songs and the preset scoring formula, the song score of each of the existing songs is calculated. The second song information contains a different type of song information than the first song information.
[0019] The existing songs within each cluster whose song scores meet the preset retention conditions are identified as the preprocessed songs.
[0020] In one specific implementation, determining the existing songs whose song scores within each cluster meet preset retention conditions as the preprocessed songs includes:
[0021] The existing songs in each cluster group whose song scores are greater than a preset retention score are identified as the preprocessed songs.
[0022] or,
[0023] The song rating ranking within each cluster group is determined, and the number of existing songs not exceeding a preset retention number are the preprocessed songs. The song rating ranking within each cluster group includes: ranking of legitimate songs and ranking of pirated songs.
[0024] In one specific implementation, the clustering of multiple existing songs in the music library based on the audio fingerprint of each existing song to obtain at least one cluster group includes:
[0025] The audio fingerprint of each unclustered song in the music library is determined as the target audio fingerprint in turn;
[0026] Calculate the similarity between the audio fingerprint of each unclustered song in the music library and the target audio fingerprint;
[0027] The existing songs corresponding to each similar audio fingerprint are grouped together with the existing songs corresponding to the target audio fingerprint into a cluster group. The similarity between the similar audio fingerprint and the target audio fingerprint satisfies the preset clustering conditions.
[0028] In one specific implementation, the first song information includes at least two of the following: the singer's name, the song title, and the copyright company's name.
[0029] In one specific implementation, the second song information includes at least one of the following: artist rating, release date, and comment data.
[0030] A second aspect of this application provides a method for detecting pirated songs, including:
[0031] Obtain the first song information of the song to be detected;
[0032] Using the first song information of the song to be detected as the search keyword, obtain the search results corresponding to the first song information;
[0033] The first song information and the search results are input into the target detection model to output the confidence of the song to be detected as genuine and the confidence of the song as pirated. The target detection model is trained according to the training method described in the first aspect.
[0034] If the confidence level for piracy is greater than the confidence level for legitimate content, then the song to be detected is determined to be a pirated song.
[0035] In one specific implementation, inputting the first song information and the retrieval result into the target detection model includes:
[0036] Extract the corresponding search result summary from the search results to be detected;
[0037] The information of the first song and the summary of the search results are input into the target detection model.
[0038] A third aspect of this application provides a device for detecting pirated songs, comprising:
[0039] Central processing unit, memory, and input / output interfaces;
[0040] The memory is either a short-term storage memory or a persistent storage memory;
[0041] The central processing unit is configured to communicate with the memory and execute instructions in the memory to perform the method described in the first or second aspect.
[0042] A fourth aspect of this application provides a computer program product containing instructions that, when run on a computer, cause the computer to perform the method described in the first or second aspect.
[0043] A fifth aspect of this application provides a computer storage medium storing instructions that, when executed on a computer, cause the computer to perform the method described in the first or second aspect.
[0044] As can be seen from the above technical solutions, the embodiments of this application have the following advantages: By inputting the first song information of the song to be detected and the corresponding search result summary into the target detection model obtained according to the detection model training method of the embodiments of this application, the authenticity confidence and piracy confidence of the song to be detected can be obtained. If the authenticity confidence of the song to be detected is less than its piracy confidence, then the song to be detected is considered a pirated song. No manual processing of the song to be detected is required to determine whether it is a pirated song, greatly improving the efficiency of pirated song detection. Attached Figure Description
[0045] Figure 1 This is an example diagram of a pirated song detection system disclosed in an embodiment of this application;
[0046] Figure 2 This is a schematic flowchart of a detection model training method disclosed in an embodiment of this application.
[0047] Figure 3 This is another schematic diagram of the detection model training method disclosed in the embodiments of this application;
[0048] Figure 4 This is another schematic diagram of the detection model training method disclosed in the embodiments of this application;
[0049] Figure 5 This is a schematic flowchart of a method for detecting pirated songs disclosed in an embodiment of this application.
[0050] Figure 6 This is a schematic diagram of the structure of the pirated song detection device disclosed in the embodiments of this application. Detailed Implementation
[0051] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0052] This application provides a detection model training method, a method for detecting pirated songs, and related equipment to improve the efficiency of pirated song detection.
[0053] Please see Figure 1To better implement the piracy song detection method of this application, this application embodiment provides a piracy song detection system, which can be installed in software form on a piracy song detection device 101. To determine whether a song to be detected is a pirated song, the song to be detected can be input into the piracy song detection device 101 equipped with the piracy song detection system. The piracy song detection device 101 uses the first song information of the song to be detected as the search keyword to obtain the corresponding first search result. The target detection model in the piracy song detection system can determine the piracy confidence and the legitimate confidence of the song to be detected based on the first song information of the song to be detected and the corresponding first search result. If the piracy confidence of the song to be detected is greater than the legitimate confidence, then the song to be detected is considered a pirated song.
[0054] It is understood that the pirated song detection device 101 in this application embodiment can be any device among servers, computers, and tablet computers, and is not limited here.
[0055] Based on the description of the pirated song detection system provided in this application above, the training method of the detection model provided in this application will be described below.
[0056] Please see Figure 2 The detection model training method provided in this application embodiment can be executed by the aforementioned pirated song detection device 101, including the following steps:
[0057] 201. Obtain multiple pre-processed songs that are pre-tagged with song tags. The song tags are used to identify whether the pre-processed songs are pirated or legitimate.
[0058] A pre-trained model is trained using multiple pre-processed songs with pre-labeled song tags to obtain an object detection model. Each pre-processed song has a corresponding song tag to identify whether it is a pirated song.
[0059] In practical applications, song tags can include both a first tag and a second tag. If the song tag of the preprocessed song is the first tag, then the preprocessed song is a pirated song; if the song tag of the preprocessed song is the second tag, then the preprocessed song is a legitimate song.
[0060] 202. Using the first song information of each preprocessed song as the search keyword, obtain the search results corresponding to each first song information.
[0061] First, we need to obtain the first song information for each preprocessed song. Then, using the first song information of each preprocessed song as the search keyword, we can obtain the corresponding search results for each first song information.
[0062] In practical applications, search results can be based on search keywords and retrieve all data information from any database or search engine that can detect song information.
[0063] 203. Extract the corresponding search result summary from the search results corresponding to the training songs.
[0064] To further extract more concise information from the search results corresponding to the training songs in order to improve training speed and accuracy, webpage titles, document titles, and / or file titles in the search results can be extracted as search result summaries to streamline the search results and improve training speed.
[0065] In other words, based on computing resources or data requirements, the search results retrieved using the aforementioned search keywords are filtered, and only a portion of the search results (i.e., the search result summary) is retained as the corresponding search result summary for that search keyword. The search engines include, but are not limited to, Baidu or Sogou search engines. The search results include, but are not limited to, text information retrieved based on the search keywords or text information extracted from image information retrieved based on the search keywords; no specific limitations are imposed here.
[0066] 204. Using each preprocessed song as a training song in turn, input the first song information of the training song and the corresponding retrieval result summary into the pre-trained model to output the confidence of the training song as genuine and as pirated.
[0067] Each pre-processed song is used as a training song in turn. The first song information of the training song, the corresponding search result summary, and the song tags are used as training data to train the pre-trained model to obtain the object detection model. The pre-trained model can be any pre-trained text model. By training the model with a large amount of unlabeled text, a target pre-trained model that has learned some linguistic knowledge can be obtained.
[0068] It is known that the aforementioned pre-trained model can be any text prediction model. In practical applications, considering the linguistic diversity of the songs to be detected for piracy monitoring, a bidirectional encoder representations from transformers (BERT) model can be chosen as the pre-trained model. The goal of the BERT model is to pre-train using billions of unlabeled Wikipedia texts to obtain semantic representations of the text, then fine-tune these semantic representations in a specific natural language processing (NLP) task, and finally apply them to that NLP task. The training task of the BERT model mainly includes two parts: first, a mask language model (MLM), which randomly masks some characters in the corpus and then trains the model to predict the masked characters; second, sentence prediction, which understands the relationships between sentences and determines whether sentence B is the next sentence after sentence A. Pre-training refers to using a large amount of unlabeled text to enable the model to learn some linguistic knowledge.
[0069] Please see Figure 3 , Figure 3 The left-middle image shows the pre-training process of the BERT model. Figure 3 The middle right figure shows the process of fine-tuning the pre-trained BERT model on a classification task based on labeled text data.
[0070] In this embodiment, pre-processed songs with pre-labeled song tags are used as training data. The pre-trained BERT model is then fine-tuned (i.e., parameter adjustment) in the task of determining whether a song is pirated, ultimately resulting in a target detection model that can be used to determine whether a song to be detected is pirated. Specifically, the BERT model can be a multi_cased_L-12_H-768_A-12 model.
[0071] In addition, the pre-trained model can also be a generative pre-training (GPT) model, which is not limited here.
[0072] 205. Calculate the loss value based on the confidence scores for genuine and pirated versions, the song labels of the training songs, and the preset loss function.
[0073] The confidence scores for genuine and pirated training songs obtained in step 204, along with the song tags, are entered into a pre-defined loss function to calculate the loss value for this training iteration. Based on this loss value, the system determines whether to continue training with any untrained pre-processed song or terminate the training process. Specifically, the form of the loss function may differ depending on the pre-trained model used.
[0074] 206. Adjust the model parameters of the pre-trained model based on the loss value until the loss value meets the preset convergence condition to obtain the target detection model.
[0075] Before using pre-processed songs to train the target pre-trained model, preset convergence conditions are set in advance to ensure that the target pre-trained model is continuously trained using pre-processed songs that have not been used for training until the preset training requirements are reached (i.e. the loss function does not meet the preset convergence conditions).
[0076] If the loss value calculated in step 205 does not meet the preset convergence condition, the model parameters of the pre-trained model need to be adjusted based on the loss value calculated in step 205, and any pre-processed song not used for training should be selected as a training song to conduct a new round of training on the pre-trained model after adjusting the model parameters.
[0077] If the loss value meets the preset convergence condition, then the training ends and the current pre-trained model is determined to be the object detection model.
[0078] In this embodiment, the first song information of the training song and the corresponding retrieval results are input into a binary classification model (i.e., a pre-trained model). The pre-trained model outputs the confidence scores for both genuine and pirated versions of the training song. Then, the loss value for this round is calculated using the genuine and pirated confidence scores, song tags, and a preset loss function. Based on the loss value, a decision is made on whether to terminate training. The target detection model trained using this embodiment can be used to detect pirated songs. Compared to manual review, this significantly improves the efficiency of pirated song detection.
[0079] Furthermore, experiments show that when using the song title (i.e., a type of first song information) and artist name (i.e., a type of first song information) as search keywords in a search engine, the song title and artist name of the original song appear more frequently in the title of a webpage in the search results, while the song title and artist name of the pirated song appear less frequently. Therefore, the aforementioned and subsequent first song information can include the artist name and song title, because the artist name and song title of the original song show a strong correlation, while the artist name and song title of the pirated song show a weak correlation. The frequency of multiple first song information entries appearing in the same term in the first search results can be used to determine whether a song is pirated. It is understood that the first song information can also include the copyright company name. In this embodiment, the first song information includes at least two types of text information, but the specific types of text information included are not limited.
[0080] Please see Figure 4 In some specific implementations, the preprocessed song containing song tags obtained in step 201 above can be determined through the following steps:
[0081] 401. Based on the audio fingerprint of each existing song, cluster multiple existing songs in the music library to obtain at least one cluster group.
[0082] The audio fingerprint of each existing song in the music library is extracted, and the songs in the library are clustered and merged based on the audio fingerprint of each song. After clustering, the existing songs in each cluster have highly similar audio fingerprints. Specifically, the audio fingerprint similarity threshold can be preset, and only existing songs that meet the audio fingerprint similarity threshold will be placed in the same cluster group.
[0083] In some specific implementations, this step can be implemented in the following way: sequentially determine the audio fingerprint of each unclustered existing song in the music library as the target audio fingerprint; calculate the similarity between the audio fingerprint of each unclustered existing song in the music library and the target audio fingerprint; determine the existing songs corresponding to each similar audio fingerprint and the existing songs corresponding to the target audio fingerprint as a cluster group, and the similarity between the similar audio fingerprint and the target audio fingerprint satisfies the preset clustering conditions.
[0084] Specifically, the audio fingerprint of each un-clustered existing song in the music library is sequentially identified as the target audio fingerprint. Within existing clusters, it is searched to see if any song's audio fingerprint satisfies a preset clustering condition with the audio fingerprint of the currently processed existing song. If so, the currently processed existing song is placed into the corresponding cluster group. If no song is found that satisfies the preset clustering condition (which may be the audio fingerprint similarity threshold described in the previous embodiment), the currently processed song is placed into a new cluster group. After processing each un-clustered existing song, the clustering ends, resulting in multiple cluster groups. Alternatively, the similarity between the audio fingerprint of each un-clustered existing song in the music library and the target audio fingerprint is calculated. Existing songs with similar audio fingerprints and those with the target audio fingerprint are identified as a cluster group. This process continues until each un-clustered existing song is processed, at which point the clustering ends, resulting in multiple cluster groups.
[0085] 402. Determine the singer information of the most popular song in each cluster group as the target singer information for each cluster group. The most popular song is the existing song with the highest popularity in the cluster group.
[0086] Considering that original songs are generally better produced and have more diverse distribution channels than pirated songs within a cluster, resulting in higher popularity, the songs in each cluster are ranked based on their popularity. The song with the highest popularity within each cluster is considered the original, and the artist information of this most popular song is used as a reference (i.e., the artist information of the most popular song in each cluster is determined as the target artist information) to evaluate other songs within the cluster. Artist information includes, but is not limited to, artist names or artist identifiers.
[0087] 403. Determine whether the singer information of each existing song in each cluster group is the target singer information corresponding to each cluster group.
[0088] Based on the target singer information corresponding to each cluster group determined in step 402, the singer information of each existing song in each cluster group, excluding the most popular song, is judged. The existing songs in the cluster group are divided into: legitimate songs (the singer information corresponding to the song matches the target singer information corresponding to the cluster group) and pirated songs (the singer information corresponding to the song does not match the target singer information corresponding to the cluster group).
[0089] In this context, "singer information matching" means that all singer information points to the same singer, i.e., the singer information is identical (i.e., completely identical). Alternatively, if the singer information (the singer's name) and the target singer information (the singer's identifier) both point to the same singer (i.e., singer A), then the singer information is matched. Conversely, the same logic applies.
[0090] 404. If yes, mark the existing songs as genuine songs; otherwise, mark the existing songs as pirated songs.
[0091] If the singer information is the same as the target singer information (the target singer information corresponding to its cluster group, the same below), then the existing song is initially considered to be a legitimate song; if the singer information is not the same as the target singer information, then the existing song is initially considered to be a pirated song.
[0092] Specifically, existing songs whose singer information matches the corresponding target singer information can be marked as original songs, while existing songs in each cluster whose singer information does not match the corresponding target singer information can be marked as pirated songs.
[0093] 405. Based on the second song information of each existing song and the preset scoring formula, calculate the song score of each existing song. The second song information contains different types of song information than the first song information.
[0094] Before identifying the songs with song tags for preprocessing, it is necessary to calculate the song score for each existing song in the music library according to the preset scoring formula, and retain some songs (retaining legitimate songs and pirated songs with sufficient confidence) as preprocessing songs based on the calculation results.
[0095] Specifically, the song score for each existing song is calculated based on its secondary song information and a preset scoring formula. The secondary song information includes any information that can be used to determine whether an existing song is pirated, and differs from the information contained in the primary text information (e.g., song comments and artist information are different types of information for the same song). In some implementations, the secondary song information includes, but is not limited to, artist rating, release date, and / or comment data (i.e., the fewer comments mentioning the song is pirated, the higher the score). Then, the song score for each existing song is calculated based on the preset scoring formula. This preset scoring formula can be a formula that assigns weights to each type of secondary song information.
[0096] It is understood that the second song information is not limited to text information. The second song information can also be the song cover (if the song cover is consistent with the song cover of the most popular song in the corresponding cluster group, the score is high). This embodiment does not specifically limit the type of second song information.
[0097] 406. Select the existing songs in each cluster whose song scores meet the preset retention conditions as preprocessed songs.
[0098] Within each cluster, songs that meet the preset retention criteria, whether they are legitimate or pirated, are identified as pre-processed songs.
[0099] In some specific implementations, this step can be achieved in the following two ways: First, identify the existing songs within each cluster whose song scores are greater than a preset retention score as preprocessed songs; second, determine the song score ranking within each cluster, and identify the existing songs whose scores are not greater than a preset retention number as preprocessed songs. The song score ranking within each cluster includes ranking of legitimate songs and ranking of pirated songs. It should be noted that the preset retention conditions in this step are not limited to the specific forms described above.
[0100] Specifically, the preset retention criteria can be a preset retention score, which can be set according to needs. Existing songs that meet the preset retention score are identified as the corresponding pre-processed songs (i.e., pre-processed songs tagged as legitimate songs and pre-processed songs tagged as pirated songs). Alternatively, within each cluster, legitimate songs and pirated songs can be sorted, and then, based on the score from highest to lowest, legitimate songs and pirated songs not exceeding a preset retention number are identified as the corresponding pre-processed songs (i.e., pre-processed songs tagged as legitimate songs and pre-processed songs tagged as pirated songs).
[0101] It is understood that in practical applications, pre-labeled pre-processed songs can also be manually labeled, which is not limited here. Furthermore, the determination of pre-processed songs does not need to be based on all songs in the music library; to save computational resources, this application can be executed based only on a portion of the existing songs in the music library. Figure 4 The step described in this embodiment is to determine the pre-processed songs from the existing song library.
[0102] This embodiment provides a method for obtaining preprocessed songs labeled with song tags based on clustered existing songs. This eliminates the need for manual labeling of training data (manually labeling existing songs to obtain preprocessed songs), significantly improving the efficiency of obtaining preprocessed songs labeled with song tags.
[0103] Please see Figure 5 The target detection model obtained from the foregoing and subsequent related embodiments of this application can be applied to the detection of pirated songs, and can be implemented in the following ways:
[0104] 501. Obtain the first song information of the song to be detected.
[0105] When it is necessary to detect a song to determine whether it is the first song in the piracy detection system, the first song information of the song to be detected must first be obtained. Specifically, the first song information can contain various types of text information.
[0106] In practical applications, the timing for performing piracy detection on a song can be either when the song is first added to the music library, or when it is necessary to perform piracy detection on songs in the music library; there is no limitation here.
[0107] 502. Using the first song information of the song to be detected as the search keyword, obtain the search results corresponding to the first song information.
[0108] Similar to step 202 mentioned above, it will not be repeated here.
[0109] 503. Input the first song information and the search results into the target detection model to output the confidence scores of the original and pirated versions of the song to be detected.
[0110] The first song information of the song to be detected obtained in step 501 and the corresponding search results obtained based on the search keywords in step 502 are used as input to the pre-trained target detection model. The target detection model will output the authenticity confidence score and piracy confidence score of the song to be detected. Based on the authenticity confidence score and piracy confidence score of the song to be detected, it can be determined whether the corresponding song to be detected is a pirated song. The target detection model is trained according to the detection model training method provided in any of the foregoing and hereinafter related embodiments of this application.
[0111] In addition, to improve the accuracy of pirated song detection, a search result summary can be obtained from the search results obtained in step 502, and the search result summary can be used to replace the search results in this embodiment and input into the target detection model.
[0112] 504. If the confidence level for piracy is greater than that for legitimate content, then the song to be tested is determined to be a pirated song.
[0113] If the confidence score for piracy of the song to be detected, output by the object detection model in step 503, is greater than its confidence score for authenticity, then the song to be detected is considered a pirated song. In practical applications, if the confidence score for piracy of the song to be detected, output by the object detection model in step 503, is less than its confidence score for authenticity, then the song to be detected is considered an authentic song.
[0114] In this embodiment, the first song information of the song to be detected and the search results or search result summaries corresponding to the first song information are input into the target detection model trained according to the detection model training method in the relevant embodiments of this application. The target detection model outputs the authenticity confidence score and piracy confidence score of the song to be detected. If the authenticity confidence score of the song to be detected is less than its piracy confidence score, the song to be detected is considered a pirated song. Any song can be judged to determine whether it is a pirated song through a pre-trained target detection model, eliminating the need for manual detection and significantly improving the efficiency of piracy detection. Furthermore, compared to manual review, piracy detection through the target detection model requires less server resources, achieving piracy detection with lower service operation costs and improving user experience.
[0115] The preceding text described various embodiments and specific implementation methods of the model training method and the pirated song detection method of this application. The following describes the model training method and the pirated song detection method of this application in a practical application scenario.
[0116] First, pre-processed songs with pre-labeled song tags are obtained based on the song recognition service and preset scoring rules. Then, the BERT model (i.e., the pre-trained model) is fine-tuned based on the pre-processed songs with pre-labeled song tags as training data to obtain the object detection model. Finally, the first song information and the first retrieval information of the song to be detected are input into the object detection model, and the authenticity confidence and piracy confidence of the song to be detected output by the object detection model can be used to determine whether the song to be detected is a pirated song.
[0117] Specifically, firstly, the song recognition system clusters and merges the songs in the music library to obtain multiple cluster groups, with the audio fingerprints of the songs in each cluster group being highly similar. The basic principle is to extract the audio fingerprints of all songs in the music library to establish a fingerprint database, build a song recognition service, extract the audio fingerprint of the requested song (i.e., any unclustered song in the music library), match the song recognition service with the fingerprint database in the music library, and return songs with an audio fingerprint similarity greater than 90% (meeting the preset clustering conditions). Each returned song is then placed in the same cluster group as the aforementioned requested song, ultimately achieving the clustering of the songs in the music library.
[0118] Next, the artist name of the most popular song within each cluster (i.e., the target artist name, or target artist information) is determined. Songs with the target artist name in each cluster are marked as legitimate songs, while songs with the target artist name in a different cluster are marked as pirated songs. Further, the song's artist level, release date, and comment data are used as scoring rules (i.e., preset scoring rules). The weight of artist level is 0.2, release date is 0.2, and comment data is 0.6. Specifically, the higher the artist level, the further back in time the release date is from the current date, and the fewer comments containing piracy complaints, the higher the song's score, and vice versa.
[0119] Then, legitimate songs with a score of 90 or higher within each cluster and pirated songs with a score of 80 or higher within each cluster are used as preprocessed songs to train the BERT model. The specific training process can be found in this application. Figures 2 to 4 The embodiments described herein will not be repeated here.
[0120] Next, for each new song to be added to the music library, a piracy detection test is performed, using the new song as the subject of the test. The specific detection process can be found in this application. Figure 5 The embodiments described herein will not be repeated here.
[0121] Finally, newly added songs identified as pirated will be tagged as pirated songs, and songs tagged as pirated songs will not be offered in services such as song recommendations, song searches, and song recognition.
[0122] In this embodiment, a piracy detection process can be automatically performed on newly added songs in the music library and the songs can be tagged according to the detection results. Moreover, newly added songs tagged as pirated are not provided in services such as song recommendation, song search, and song recognition. This achieves continuous music library purification at a low cost and improves the user experience.
[0123] Figure 6 This is a schematic diagram of the structure of a piracy detection device 600 provided in an embodiment of this application. The piracy detection device 600 may include one or more central processing units (CPUs) 601 and a memory 605, in which one or more applications or data are stored.
[0124] The memory 605 can be volatile or persistent storage. The program stored in the memory 605 can include one or more modules, each module including a series of instruction operations on the piracy detection device. Furthermore, the central processing unit 601 can be configured to communicate with the memory 605 and execute the series of instruction operations in the memory 605 on the piracy detection device 600.
[0125] The piracy detection device 600 may also include one or more power supplies 602, one or more wired or wireless network interfaces 603, one or more input / output interfaces 604, and / or one or more operating systems, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0126] The central processing unit 601 can perform the aforementioned... Figures 1 to 5 The specific operations performed by the pirated song detection device 101 in the illustrated embodiment will not be described in detail here.
[0127] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0128] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.
[0129] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0130] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0131] 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 computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0132] This application also provides a computer program product containing instructions that, when run on a computer, cause the computer to execute the detection model training method and / or the pirated song detection method described above.
Claims
1. A method for training a detection model, characterized in that, Includes: Obtain multiple pre-processed songs that are pre-tagged with song tags, the song tags being used to identify whether the pre-processed songs are pirated or legitimate; The preprocessed songs are generated in the following way: multiple existing songs in the music library are clustered based on the audio fingerprint of each existing song to obtain at least one cluster group. The singer information of the most popular song in each cluster group is determined as the target singer information corresponding to each cluster group, where the most popular song is the existing song with the highest popularity in the cluster group; it is then determined whether the singer information of each existing song in each cluster group is the target singer information corresponding to each cluster group. If yes, then mark the existing songs as genuine songs; if no, then mark the existing songs as pirated songs; calculate the song score of each existing song based on the second song information of each existing song and the preset scoring formula; determine the existing songs whose song scores in each cluster meet the preset retention conditions as the preprocessed songs. The method of clustering multiple existing songs in the music library based on the audio fingerprint of each existing song to obtain at least one cluster group includes: sequentially determining the audio fingerprint of each un-clustered existing song in the music library as the target audio fingerprint; calculating the similarity between the audio fingerprint of each un-clustered existing song in the music library and the target audio fingerprint; determining the existing songs corresponding to each similar audio fingerprint and the existing songs corresponding to the target audio fingerprint as a cluster group, wherein the similarity between the similar audio fingerprint and the target audio fingerprint satisfies a preset clustering condition; Using the first song information of each preprocessed song as the search keyword, search results corresponding to the first song information of each preprocessed song are obtained, wherein the second song information contains a different type of song information than the first song information; Extract the retrieval result summary corresponding to each preprocessed song from the retrieval results corresponding to the first song information of each preprocessed song; Each of the preprocessed songs is used as a training song in turn. The first song information of the training song and the retrieval result summary corresponding to the training song are input into the pre-trained model to output the authenticity confidence and piracy confidence of the training song. The loss value is calculated based on the confidence level of genuine products, the confidence level of pirated products, the song tags of the training songs, and the preset loss function; The model parameters of the pre-trained model are adjusted based on the loss value until the loss value meets the preset convergence condition to obtain the target detection model.
2. The method according to claim 1, characterized in that, The step of determining the existing songs within each cluster whose song scores meet preset retention conditions as the preprocessed songs includes: The existing songs in each cluster group whose song scores are greater than a preset retention score are identified as the preprocessed songs. or, The song rating ranking within each cluster group is determined, and the number of existing songs not exceeding a preset retention number are the preprocessed songs. The song rating ranking within each cluster group includes: ranking of legitimate songs and ranking of pirated songs.
3. The method according to claim 1, characterized in that, The first song information includes at least two of the following: the artist's name, the song title, and the copyright company's name.
4. The method according to any one of claims 1 to 3, characterized in that, The second song information includes at least one of the following: artist rating, release date, and comment data.
5. A method for detecting pirated songs, characterized in that, include: Obtain the first song information of the song to be detected; Using the first song information of the song to be detected as the search keyword, obtain the search results corresponding to the first song information; The first song information and the retrieval results are input into the target detection model to output the confidence level of the original song and the confidence level of the pirated song to be detected. The target detection model is trained according to the training method of any one of claims 1-4. If the confidence level for piracy is greater than the confidence level for legitimate content, then the song to be detected is determined to be a pirated song.
6. The method according to claim 5, characterized in that, The step of inputting the first song information and the search results into the target detection model includes: Extract the corresponding search result summary from the search results corresponding to the first song information of the song to be detected; The information of the first song and the summary of the search results are input into the target detection model.
7. A device for detecting pirated songs, characterized in that, include: Central processing unit, memory, and input / output interfaces; The memory is either a short-term storage memory or a persistent storage memory; The central processing unit is configured to communicate with the memory and execute instructions in the memory to perform the method according to any one of claims 1 to 4 or the method according to any one of claims 5 to 6.
8. A computer storage medium, characterized in that, The computer storage medium stores instructions that, when executed on the computer, cause the computer to perform the method as described in any one of claims 1 to 4 or the method as described in any one of claims 5 to 6.