Audio track identification method, device and readable storage medium
By matching the audio and characteristic matching, combined with the ranking ranking and the number of hit films, calculate the hits the ranking ratio, screen out the audio composition track, solve the problem of difficulty recognition in audio, and achieve accurate recognition and accurate identification and audio -visual purpose. Genuine song purpose tendency.
Patent Information
- Application Number
- CN202110838560.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-23
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2041-07-23
AI Technical Summary
In audio, especially in the long audio field, the tracks corresponding to the audio cannot be effectively identified, making it difficult for users to obtain specific track information.
By obtaining the target audio to be recognized, and extraction of the audio fingerprint features, match these features to obtain the song ID and playback volume ranking, count the number of hits of the song ID, calculate the hit ranking ratio, so as to screen out the target audio of the target audio Establish a song.
The effective recognition of the audio track is achieved, which can combine the playback volume of the song and the hits of the song ID in the audio. It recognizes more accurate composition songs.
Smart Images

Figure CN113468369B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of audio technology, and in particular to an audio track identification method, device and readable storage medium. Background Art
[0002] In the music library, there are many types of songs, such as ordinary songs, medley songs, and even the same song has different versions. In the field of long audio, many long audio programs belonging to the music category will recommend multiple songs, or other types of long audio will also be interspersed with many songs. In other words, in some audio, it may correspond to a single song or multiple songs.
[0003] Usually, when a user is listening to an audio, he or she may find songs that he or she is interested in. However, if the audio does not have a corresponding track list, it is impossible to determine which tracks the audio includes, and it is difficult to display the tracks corresponding to the audio to the user.
[0004] In summary, how to effectively solve problems such as audio track recognition is a technical problem that technical personnel in this field urgently need to solve. Summary of the invention
[0005] The purpose of this application is to provide an audio track identification method, device and readable storage medium, which can combine the target audio itself and the playback volume ranking corresponding to the song ID involved in the target audio to effectively identify the track corresponding to the audio.
[0006] In order to solve the above technical problems, this application provides the following technical solutions:
[0007] In a first aspect, the present application provides an audio track identification method, comprising:
[0008] Acquire target audio to be identified, and after segmenting the target audio, extract audio fingerprint features of each segment;
[0009] Obtaining song IDs that are matched to each of the audio fingerprint features, and the play volume ranking of each of the song IDs;
[0010] Counting the song IDs to obtain the number of hits for each song ID;
[0011] Using the play ranking and the hit number, the hit ranking ratio of each song ID is obtained, and the hit ranking ratio is the ratio of the sum of the play ranking of the song ID to the hit number;
[0012] The hit ranking ratio is used to filter out the constituent tracks of the target audio from the tracks corresponding to the song IDs.
[0013] In a feasible implementation manner, obtaining the song IDs that are matched to the audio fingerprint features and the play volume ranking of the song IDs includes:
[0014] In the audio fingerprint library, searching for the song IDs that are matched with the audio fingerprint features respectively;
[0015] Obtaining the number of times each song ID is played on a playback terminal;
[0016] The playback volume corresponding to each segment is sorted respectively to obtain the playback volume ranking.
[0017] In a feasible implementation manner, the hit ranking ratio is used to filter out the component tracks of the target audio from the tracks corresponding to the song IDs, including:
[0018] After the same song statistics are performed on the song IDs, the tracks corresponding to the song IDs with the smallest hit ranking ratio for each song are determined as the component tracks.
[0019] In a feasible implementation manner, the step of respectively determining the tracks corresponding to the song IDs with the smallest hit ranking ratios for each song as the component tracks comprises:
[0020] Determine the total number of hits for the same song and the number of hits corresponding to each of the song IDs from the statistical results corresponding to the same song statistics;
[0021] Compare each of the hit counts with the total hit count for the same song to obtain the confidence level;
[0022] For the same song, if the hit ranking ratios are the same, the track corresponding to the song ID with the highest confidence is determined as the component track.
[0023] In a feasible implementation manner, after selecting the tracks that constitute the target audio from the tracks corresponding to the song IDs, the method further includes:
[0024] Perform same song statistics on each song ID to obtain the actual hit play time corresponding to each song and the same song hit play time after same song processing;
[0025] Compare the corresponding actual hit play time with the hit play time of the same song to obtain the play ratio of each song;
[0026] The tracks whose play ratio is less than the play ratio threshold are removed from the component tracks.
[0027] In a feasible implementation manner, the target audio segmentation includes:
[0028] The target audio is sliced according to a slice length and a slice interval; wherein the slice length is greater than or equal to the slice interval.
[0029] In a feasible implementation manner, the song IDs are counted to obtain the number of hits for each song ID, including:
[0030] Perform edge filtering on the fragments that hit the same song ID;
[0031] After completing the edge filtering, the song IDs are counted to obtain the number of hits for each song ID.
[0032] In a feasible implementation manner, after selecting the tracks that constitute the target audio from the tracks corresponding to the song IDs, the method further includes:
[0033] According to the correspondence between each segment of the target audio and the component tracks, the playing time of the component tracks is determined.
[0034] In a second aspect, the present application provides an electronic device, including:
[0035] Memory for storing computer programs;
[0036] A processor is used to implement the steps of the above-mentioned audio track identification method when executing the computer program.
[0037] In a fourth aspect, the present application provides a readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the above-mentioned audio track identification method are implemented.
[0038] By applying the method provided in the embodiment of the present application, the target audio to be identified is obtained, and after the target audio is segmented, the audio fingerprint features of each segment are extracted; the song IDs that match each audio fingerprint feature and the playback ranking of each song ID are obtained; the song IDs are counted to obtain the number of hit segments for each song ID; the hit ranking ratio of each song ID is obtained by using the playback ranking and the number of hit segments; and the hit ranking ratio is used to filter out the component tracks of the target audio from the tracks corresponding to each song ID.
[0039] After obtaining the target audio to be identified, the target audio can be segmented and the audio fingerprint features of each segment can be extracted. Then, the song IDs that match each audio fingerprint feature can be obtained, and at the same time, the play rankings corresponding to these song IDs involved can also be obtained. By counting the song IDs, the number of hits for each song ID can be obtained. In other words, the number of hits is the corresponding number of song IDs and segments, that is, the larger the number of hits, the higher the possibility that the target audio includes the track of the corresponding song ID; and the play ranking is obtained after the song ID is ranked according to the play volume. In other words, the higher the play volume of a certain song ID, the higher its play ranking, and the higher the play volume of generally genuine songs. And the songs in general audio will also tend to be genuine and have higher play volumes. In order to combine the play volume of the song and the hit situation of each song ID in the audio, it is proposed in this application to use the play ranking and the number of hits to determine the hit ranking ratio of each song ID involved. Finally, based on the hit ranking ratio, the constituent tracks of the target audio can be screened out from the tracks corresponding to each song ID involved in the target audio. It can be seen that in this application, not only can the hits of each song ID in the current target audio be referred to, but also the actual playback volume of the song ID can be combined to make the final identified component tracks more accurate and tend to be genuine tracks. That is, while effectively identifying the component tracks of the target audio, piracy can also be combated and genuine products can be promoted.
[0040] Correspondingly, the embodiments of the present application also provide an electronic device and a readable storage medium corresponding to the above-mentioned audio track identification method, which have the above-mentioned technical effects and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0042] Figure 1 This is a flowchart of an implementation method of an audio track identification method in an embodiment of the present application;
[0043] Figure 2 This is a specific slicing schematic diagram in an embodiment of the present application;
[0044] Figure 3 This is a schematic diagram of the structure of an audio track identification device in an embodiment of the present application;
[0045] Figure 4 This is a schematic diagram of the structure of an electronic device in an embodiment of the present application;
[0046] Figure 5 This is a schematic diagram of the specific structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0047] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0048] Please refer to Figure 1 , Figure 1 This is a flowchart of an audio track identification method in an embodiment of the present application, the method comprising the following steps:
[0049] S101, obtaining target audio to be identified, and after segmenting the target audio, extracting audio fingerprint features of each segment.
[0050] The target audio may be any audio in the long audio field, or a song whose tracks are unknown in a music library. In this embodiment, the number and type of tracks specifically corresponding to the target audio are not limited.
[0051] In this embodiment, the target audio can be determined by searching whether there is a track in the music library, and then the audio without a track is determined as the target audio; or the target audio can be obtained by receiving audio sent by an upper-layer application / external device. In this embodiment, the specific method of obtaining the target audio is not limited.
[0052] Preferably, obtaining the target audio to be recognized in step S101 may specifically include:
[0053] Step 1: Receive a track identification request sent by a long audio client;
[0054] Step 2: Determine the long audio corresponding to the track identification request as the target audio.
[0055] That is, after the long audio client sends a track identification request, the long audio corresponding to the track identification request can be determined as the target audio. In this way, in the long audio service, the track information in the long audio that the customer is interested in can be identified.
[0056] After obtaining the target audio, in order to effectively identify the track, the target audio needs to be segmented and the audio fingerprint features of each segment need to be extracted. Then, the track of the target audio can be determined based on these audio fingerprint features.
[0057] Specifically, when the target audio is segmented, the target audio can be segmented in sequence according to the fixed length. In this embodiment, the specific length of the fixed length can be set and adjusted according to actual needs, and can generally be set between 5 and 15 seconds, and can certainly be set to other values, such as 16 seconds.
[0058] The methods of slicing include but are not limited to the following:
[0059] Method 1: Evenly segment the target audio according to a fixed length. For example, if the target audio is 180 seconds long, you can divide the 180 seconds of target audio into 30 segments of a fixed length of 6 seconds according to the preset segment length of 6 seconds.
[0060] Method 2: In order to further improve the accuracy of song recognition, the slice density can also be improved. Specifically, the target audio is sliced according to the slice length and the slice interval distance; wherein the slice length is greater than or equal to the slice interval distance. The slice length refers to the duration of each slice after the slice, such as 8 seconds, and the slice interval distance refers to the interval distance between the starting ends of two slices.
[0061] For example, if the target audio is 18 seconds long, you can slice it into 7 segments of 1-6 seconds, 3-8 seconds, 4-10 seconds, 6-12 seconds, 8-14 seconds, 10-16 seconds, and 12-18 seconds according to the preset segment length of 6 seconds and the segment interval of 2 seconds. Figure 2 As shown, in Figure 2 In the figure, each fingerprint can be represented as fp1 (corresponding to Figures 1 to 6s), fp2 (corresponding to Figures 7-12s), ...
[0062] Method 3: In practical applications, if the target audio is long, in order to avoid wasting time and a large amount of computer resources, the target audio can also be sliced by uniform sampling, such as cutting out a 6-second slice every 30 seconds.
[0063] After the target audio is segmented into several segments, the operation of step S102 can be performed.
[0064] S102: Obtain song IDs that match each audio fingerprint feature, and the play volume ranking of each song ID.
[0065] The ranking of the number of plays of each song ID is the ranking of the number of plays of the song ID matched to each audio fingerprint (which can be specifically sorted in descending order).
[0066] In this embodiment, songs of known tracks can be segmented in advance, and then the audio fingerprint features of each segment can be extracted, and the corresponding song ID can be marked for each audio fingerprint feature. In this way, after the target audio is segmented and the audio fingerprint features corresponding to each segment are extracted, the song ID corresponding to these audio fingerprint features corresponding to the target audio can be determined by feature comparison.
[0067] It should be noted that in this embodiment, one shard corresponds to one audio fingerprint feature, but one audio fingerprint feature can correspond to 0, 1 or more song IDs. In other words, for the same shard, there may be no corresponding song ID, it may correspond to 1 song ID, or it may correspond to multiple song IDs. That is, the audio fingerprint feature of each shard may match N song IDs (N is indefinite, it may be 0, it may be 1, for ease of processing, it can be set that N cannot be greater than M, and the value of M can be determined according to actual application requirements, such as it can be set to the average number of versions of the same song, that is, at most M results can be returned). In this application, the song ID corresponds to the audio fingerprint feature, and the same song can have multiple different song IDs corresponding to different tracks due to its different versions, etc. (generally, the track can correspond to the song name plus a brief description of the version, such as the song name and singer name).
[0068] For example, for the target audio, an id of 000 is corresponding, and the corresponding song IDs of the first three fragments are as follows:
[0069] 1st film hits: 124,
[0070] The second piece hits: 123, 124,
[0071] The third piece hits: 123, 125;
[0072] Among them, 123, 124 and 125 refer to different song IDs respectively.
[0073] After obtaining the song ID corresponding to each shard, the play volume ranking of the song ID can be obtained. Specifically, in actual applications, the play volume corresponding to each song ID can be counted in advance, so that the play volume ranking can be quickly determined based on the counted play volume.
[0074] It should be noted that when determining the playback volume ranking, the playback volume corresponding to all song IDs can be ranked to obtain the playback volume ranking; of course, the song IDs can also be classified into the same song category, and then the playback volume corresponding to the song IDs of the same song group can be ranked to obtain the playback volume ranking.
[0075] S103, counting the song IDs to obtain the number of hits for each song ID.
[0076] After obtaining the song ID, the hits of each song ID can be counted to obtain the hit count of each song ID.
[0077] For example: Taking the target audio in the above text corresponding to an id of 000 and the corresponding song IDs of the first three fragments as an example, the song IDs are counted, and the number of hit fragments of the song IDs is as follows: the number of hit fragments of 123 is 2; the number of hit fragments of 124 is 2, and the number of hit fragments of 125 is 1.
[0078] S104. Obtain the hit ranking ratio of each song ID using the play volume ranking and the hit number.
[0079] Since the smaller the play ranking, the more likely the track corresponding to the song ID is to be an accurate result, and the larger the number of hits, the more likely the track corresponding to the song ID is to be an accurate result. Therefore, in practical applications, the play ranking can be directly compared with the number of hits, and the ratio can be used as the hit ranking ratio of the song ID.
[0080] Preferably, the hit ranking ratio of the song ID can also be obtained based on the sum of the ranking of the playback volume of different fragments corresponding to the same song ID and the number of hit fragments. Specifically, if rank is used to represent the hit ranking ratio, then rank = the sum of the return rankings of a song ID / the number of hit fragments of the song ID, that is, the smaller the rank value, the higher the ranking. For example, 123's two hits are ranked 1, so 123's rank = (1+1) / 2 = 1.0; 124 hits twice, once ranked 1, and once ranked 2, then 124's rank = (1+2) / 2 = 1.5; 125 hits once and ranks 2, then 125's rank = 2 / 1 = 2.0. It can be seen that after sorting by rank value order, it is found that 123 ranks higher.
[0081] S105. Filter out the tracks that constitute the target audio from the tracks corresponding to each song ID by using the hit ranking ratio.
[0082] The smaller the hit ranking ratio is, the more it indicates that the track of the corresponding song ID corresponds to the target audio. Therefore, in actual applications, after obtaining the hit ranking ratio, the specific value of the hit ranking ratio can be used to filter out the constituent tracks of the target audio from the tracks corresponding to each song ID. For example, a threshold can be set to determine the tracks corresponding to the song IDs with a hit ranking ratio less than the threshold as the constituent tracks of the target audio; or the hit ranking ratio can be sorted in order, and the top n (n can be set in advance, or it can be equal to the number of song groups corresponding to each song ID) song IDs are selected as the constituent tracks of the target audio; or the track corresponding to the song ID corresponding to the smallest hit ranking ratio can be directly determined as the constituent track of the target audio.
[0083] It should be noted that in this embodiment, the component tracks may correspond to only a single track, or may correspond to 2 or more tracks. That is to say, when the component tracks correspond to a single track, it indicates that the target audio includes only one song, and when the component tracks correspond to at least 2 tracks, it indicates that the target audio is a medley of at least 2 songs. That is, based on the number of tracks specifically corresponding to the component tracks, it can also be determined whether the target audio is a medley song, that is, the audio track identification method provided in this application can also realize medley song identification, and further can label the medley songs to provide identification information for more accurate song recommendation to users.
[0084] By applying the method provided in the embodiment of the present application, the target audio to be identified is obtained, and after the target audio is segmented, the audio fingerprint features of each segment are extracted; the song IDs that match each audio fingerprint feature and the playback ranking of each song ID are obtained; the song IDs are counted to obtain the number of hit segments for each song ID; the hit ranking ratio of each song ID is obtained by using the playback ranking and the number of hit segments; and the hit ranking ratio is used to filter out the component tracks of the target audio from the tracks corresponding to each song ID.
[0085] After obtaining the target audio to be identified, the target audio can be segmented and the audio fingerprint features of each segment can be extracted. Then, the song IDs that match each audio fingerprint feature can be obtained, and at the same time, the play rankings corresponding to these song IDs involved can also be obtained. By counting the song IDs, the number of hits for each song ID can be obtained. In other words, the number of hits is the corresponding number of song IDs and segments, that is, the larger the number of hits, the higher the possibility that the target audio includes the track of the corresponding song ID; and the play ranking is obtained after the song ID is ranked according to the play volume. In other words, the higher the play volume of a certain song ID, the higher its play ranking, and the higher the play volume of generally genuine songs. And the songs in general audio will also tend to be genuine and have higher play volumes. In order to combine the play volume of the song and the hit situation of each song ID in the audio, it is proposed in this application to use the play ranking and the number of hits to determine the hit ranking ratio of each song ID involved. Finally, based on the hit ranking ratio, the constituent tracks of the target audio can be screened out from the tracks corresponding to each song ID involved in the target audio. It can be seen that in this application, not only can the hits of each song ID in the current target audio be referred to, but also the actual playback volume of the song ID can be combined to make the final identified component tracks more accurate and tend to be genuine tracks. That is, while effectively identifying the component tracks of the target audio, piracy can also be combated and genuine products can be promoted.
[0086] It should be noted that, based on the above embodiments, the embodiments of the present application also provide corresponding improved solutions. In the preferred / improved embodiments, the same steps or corresponding steps as those in the above embodiments can be referenced to each other, and the corresponding beneficial effects can also be referenced to each other, which will not be described one by one in the preferred / improved embodiments of this article.
[0087] In a specific implementation of the present application, step S102, obtaining the song IDs that each audio fingerprint feature matches, and the play volume ranking of each song ID, may specifically include:
[0088] Step 1: In the audio fingerprint library, search for song IDs that match each audio fingerprint feature.
[0089] That is to say, in this embodiment, an audio fingerprint library can be pre-set. In this way, after extracting the audio fingerprint features of each segment, the song IDs that match each audio fingerprint feature can be retrieved from the audio fingerprint library.
[0090] Step 2: Get the number of times each song ID is played on the playback terminal.
[0091] The playback terminal may specifically be a terminal capable of playing audio and songs, such as a music playback client in a mobile phone / computer and other devices.
[0092] In this embodiment, the songs played by the playback terminal can be statistically monitored to obtain the playback volume corresponding to each song ID. Of course, the playback volume of each song ID in playback can also be obtained by direct reading or data request.
[0093] Step 3: Sort the playback volume corresponding to each segment to obtain the playback volume ranking.
[0094] After obtaining the playback volume corresponding to each song ID, in order to make the playback volume ranking more accurate, the playback volume corresponding to each fragment can be sorted respectively to obtain the playback volume ranking. In other words, the playback volume ranking is obtained by sorting the relevant playback volumes when the audio fingerprint features are the same.
[0095] In this way, each song ID corresponding to each shard has a play ranking, which can be used to effectively characterize the matching degree of the song IDs corresponding to the same shard, which is conducive to identifying the most accurate component tracks of the target audio. For example: For a certain shard, the corresponding matching song IDs include 128, 154, 175 and 176, and the play rankings of these song IDs are: 175, 128, 176 and 154, that is, 175 has a play ranking of 1, and the shard is most matched with 175.
[0096] In a specific implementation of the present application, step S105 uses the hit ranking ratio to filter out the component tracks of the target audio from the tracks corresponding to each song ID, which may specifically include: after performing same-song statistics on the song IDs, the tracks corresponding to the song IDs with the smallest hit ranking ratio for each song are determined as the component tracks.
[0097] That is to say, when determining the composition tracks, the song IDs can be counted first, and then the tracks corresponding to the song IDs with the minimum hit ranking ratios of each song can be directly determined as the composition tracks. In this way, when songs of different lengths are interspersed in the target audio, all tracks can be effectively identified. For example, when it is found that the song IDs involved belong to three songs respectively, a track is determined for each song, and finally the tracks of these three songs are obtained.
[0098] Preferably, considering that in actual applications, the hit ranking ratio may be the same, in order to avoid the final identification of the track being inaccurate due to the random determination mechanism, in this embodiment, the confidence level can also be used to assist in determining the component tracks. The specific implementation process includes:
[0099] Step 1: Determine the total number of hits for the same song and the number of hits for each song ID from the statistical results corresponding to the same song statistics.
[0100] Step 2: Compare each hit count with the total hit count of the same song to get the confidence level.
[0101] For ease of description, the above two steps are combined for explanation below.
[0102] Considering that there is usually only one version of a song in the same audio, after obtaining the song IDs corresponding to each fragment, these song IDs can be counted to determine the number of songs and other information, so as to subsequently determine which song ID corresponds to the track of the same song. Specifically, in actual applications, the correspondence between different song IDs and songs can be saved in advance. When counting the same songs for song IDs, they can be classified into one category based on the correspondence between the song ID and a certain song, and finally the statistical results can be obtained. Specifically, the statistical results indicate which song IDs are one song, which song IDs are discrete, and the number of song IDs specifically included in the same song.
[0103] Of course, in practical applications, clustering can also be used to cluster song IDs for the same song, so as to achieve the purpose of same song statistics. Preferably, each song ID can be used as a point; the corresponding points of the song ID of the same song are connected to obtain an undirected graph; each undirected graph is determined as a cluster of the same song to obtain a clustering result. Specifically, each song ID hit can be regarded as a point in the graph; the corresponding points of the song ID belonging to the same song are connected, and after all the lines between the song IDs corresponding to the same song are drawn, one or more independent undirected graphs can be obtained, that is, the points with direct or indirect connections are regarded as an independent undirected graph, and the points without direct and indirect connections belong to different undirected graphs. An undirected graph corresponds to the same song group. Since there is no need to calculate the similarity distance between each point in the undirected graph, the undirected graph method can be used to achieve rapid clustering of the same song.
[0104] After completing the statistics of the same song, the total number of hits for the same song and the number of hits corresponding to each song ID can be determined from the statistical results.
[0105] Specifically, the ratio of each hit number to the total number of hits of the same song name can be determined as the corresponding confidence. That is, if confidence is expressed as confidence, confidence = the number of hit time slices of a certain song ID / the total number of hits of the same song with the song ID. For example, the hit results of the first three slices 1, 2, and 3 of a certain target audio indicate that the same song (song ID: 123, 124, 125) hits a time period of 1 to 18s (each slice is 6s long), that is, it corresponds to hitting three slices, of which song ID = 123 hits two slices, then the confidence of song ID = 123 = 2*6 / 3*6 = 2 / 3, song ID = 124 hits 2 slices, corresponding to confidence = 2*6 / 3*6 = 2 / 3, song ID = 125 hits 1 slice, then confidence = 1*6 / 3*6 = 1 / 3.
[0106] Step 3: For the same song, if the hit ranking ratios are the same, the track corresponding to the song ID with the highest confidence is determined as the component track.
[0107] When determining the component tracks, if it is found that the hit ranking ratios are consistent for the same song, the track corresponding to the song ID with the highest confidence can be directly determined as the component track.
[0108] The higher the ratio of the number of hits of a song ID to the total number of hits of the same song, the higher the confidence. In this way, the confidence can represent the proportion of the hits of the song ID in the same song, and can effectively represent the possibility that the track corresponding to the song ID is the track corresponding to the target audio, which can make the selected component tracks more accurate.
[0109] Of course, in practical applications, you can first filter based on confidence. When the confidence levels are the same, you can further filter based on the hit ranking ratio, which can also make the final identified component tracks more accurate.
[0110] In a specific implementation of the present application, after executing step S105 to filter out the component tracks of the target audio from the tracks corresponding to each song ID, the component tracks can also be effectively filtered. Specific filtering implementation process:
[0111] Step 1: Perform same song statistics for each song ID to obtain the actual hit play time corresponding to each song and the same song hit play time after same song processing;
[0112] Step 2: Compare the corresponding actual hit play time with the hit play time of the same song to obtain the play ratio of each song;
[0113] Step 3: Remove tracks whose play ratio is less than the play ratio threshold from the component tracks.
[0114] Among them, the specific implementation process of same song statistics for song ID can be referred to the above description, which will not be repeated here.
[0115] In this embodiment, after the same song statistics are performed, the actual playback time corresponding to each song can be obtained. Same song processing is to merge the time period of the same song hit and the smaller interval segments, and regard the merged time period as the same song hit playback time. For example, the hit time period of group A songs (i.e. a certain song) is 1 to 20s and 30 to 40s, and there is no hit in 20 to 30s, but because the duration of the miss is short, when performing the same song processing, the hit time of group A songs can be adjusted to 1 to 40s, that is, the actual hit playback time is 30s, and the same song hit playback time is 40s.
[0116] After obtaining the actual hit play time and the same song hit play time, the play ratio of each song can be calculated. For example, if the actual hit play time of the songs in group A is 30s and the same song hit play time is 40s, the play ratio of the songs in group A is 30 / 40, or 75%.
[0117] It can be seen that if scale is used to represent the play ratio, then scale = the actual play time of a group of the same song / the play time of the group of the same song after processing. The larger the scale, the more time the song is played in this time period, which can be used to determine whether the song is inserted when the host is speaking or is a complete song. Specifically, the smaller the scale, the more likely the host's confession is interspersed in the middle of the song, and the larger the scale, the greater the probability of playing the complete song during this period.
[0118] In this way, the identified component tracks can be filtered based on the play ratio, and tracks with a play ratio less than the play ratio threshold can be eliminated. The play ratio threshold can be set according to actual application requirements, such as 80%.
[0119] Based on the playback ratio, the composition tracks can be effectively screened, making the final composition tracks more accurate.
[0120] In a specific embodiment of the present application, step S103 counts the song IDs to obtain the number of hits for each song ID, which may specifically include:
[0121] Step 1: Perform edge filtering on the fragments that hit the same song ID;
[0122] Step 2: After completing the edge filtering, the song IDs are counted to obtain the number of hits for each song ID.
[0123] For ease of description, the above two steps are combined for explanation below.
[0124] Since two or more songs in the same audio may be played continuously without stopping in between, when slicing the audio to obtain the hit song ID, there may be multiple songs that are hit by the same fingerprint. For example, suppose song A is played for 20 to 50 seconds, and song B is played for 50 to 80 seconds. When a certain audio is sliced and the audio fingerprint of 48 to 53 seconds is extracted, the fingerprint is likely to hit the song IDs of both A and B at the same time because both songs A and B exist. In this way, after clustering the same songs, songs A and B will be clustered as the same song, resulting in incomplete tracks of the identified target audio. Therefore, edge filtering is used to reduce the occurrence of this situation.
[0125] Among them, edge filtering is to remove the starting and ending fingerprint segments of each song ID hit, and then cluster the same songs. Taking the example of each fingerprint duration of 6s, assuming that the hit time slices of a song ID = A are: 6~12s, 12~18s, 18~24s, 24~30s, and the hit time slices of song ID = B are 24~30s, 30~36s, 36~42s. The edge filtering operation will first perform edge filtering on song ID = A, leaving 12~18s, 18~24s valid time periods, and song ID = B will be left with 30~36s after edge filtering. In this way, songs A and B will not have overlapping time periods, and the same song clustering operation can also effectively distinguish the two songs.
[0126] In a specific embodiment of the present application, after executing step S105 to filter out the component tracks of the target audio from the tracks corresponding to each song ID, the playing time of the component tracks can be determined according to the corresponding relationship between each slice of the target audio and the component tracks. That is, the playing time of the track can be finally determined through the corresponding relationship between the slices and these tracks.
[0127] For example: if there are 7 specific tracks in total, the target audio has 240 slices, and the duration of each slice is 10s, these 240 slices just constitute the completed target audio, among which slices 1-40 correspond to track 1, slices 41-50 correspond to track 2, slices 51-76 correspond to track 3, slices 77-100 correspond to track 4, slices 101-135 correspond to track 5, slices 136-200 correspond to track 6, and slices 201-240 correspond to track 7. Then the playback time of track 1 is 1-400s, the playback time of track 2 is 401-500s, the playback time of track 3 corresponds to 510-760s, the playback time of track 4 is 770-1000s, part of track 5 is 1010-1350s, part of track 6 is 1360-2000s corresponding to track 6, and the playback time of track 7 is 2010-2400s.
[0128] By obtaining the specific playing time of each component track, the user can be prompted to jump to the progress and directly play the track of interest. Of course, by obtaining the specific playing time of each component track, the specific playing time of each track can also be marked on the target audio, and the target audio can be further processed and optimized based on the playing time, such as accurately segmenting a certain audio segment.
[0129] Corresponding to the above method embodiment, the embodiment of the present application further provides an audio track identification device. The audio track identification device described below and the audio track identification method described above can refer to each other.
[0130] See also Figure 3 As shown, the device includes the following modules:
[0131] The fingerprint feature extraction module 101 is used to obtain the target audio to be identified, and after segmenting the target audio, extract the audio fingerprint features of each segment;
[0132] The song information acquisition module 102 is used to obtain the song IDs that match each audio fingerprint feature and the play volume ranking of each song ID;
[0133] The song statistics module 103 is used to count the song IDs and obtain the number of hits for each song ID;
[0134] The hit ranking ratio determination module 104 is used to obtain the hit ranking ratio of each song ID by using the play volume ranking and the hit number;
[0135] The component track determination module 105 is used to filter out the component tracks of the target audio from the tracks corresponding to each song ID by using the hit ranking ratio.
[0136] By using the device provided in the embodiment of the present application, the target audio to be identified is obtained, and after the target audio is segmented, the audio fingerprint features of each segment are extracted; the song IDs that match each audio fingerprint feature and the playback ranking of each song ID are obtained; the song IDs are counted to obtain the number of hit segments for each song ID; the hit ranking ratio of each song ID is obtained by using the playback ranking and the number of hit segments; and the hit ranking ratio is used to filter out the component tracks of the target audio from the tracks corresponding to each song ID.
[0137] After obtaining the target audio to be identified, the target audio can be segmented and the audio fingerprint features of each segment can be extracted. Then, the song IDs that match each audio fingerprint feature can be obtained, and at the same time, the play rankings corresponding to these song IDs involved can also be obtained. By counting the song IDs, the number of hits for each song ID can be obtained. In other words, the number of hits is the corresponding number of song IDs and segments, that is, the larger the number of hits, the higher the possibility that the target audio includes the track of the corresponding song ID; and the play ranking is obtained after the song ID is ranked according to the play volume. In other words, the higher the play volume of a certain song ID, the higher its play ranking, and the higher the play volume of generally genuine songs. And the songs in general audio will also tend to be genuine and have higher play volumes. In order to combine the play volume of the song and the hit situation of each song ID in the audio, it is proposed in this application to use the play ranking and the number of hits to determine the hit ranking ratio of each song ID involved. Finally, based on the hit ranking ratio, the constituent tracks of the target audio can be screened out from the tracks corresponding to each song ID involved in the target audio. It can be seen that in this application, not only can the hits of each song ID in the current target audio be referred to, but also the actual playback volume of the song ID can be combined to make the final identified component tracks more accurate and tend to be genuine tracks. That is, while effectively identifying the component tracks of the target audio, piracy can also be combated and genuine products can be promoted.
[0138] In a specific implementation of the present application, the song information acquisition module 102 is specifically used to retrieve the song IDs that match each audio fingerprint feature in the audio fingerprint library; obtain the playback volume of each song ID on the playback terminal; and sort the playback volume corresponding to each slice to obtain the playback volume ranking.
[0139] In a specific implementation of the present application, the component track determination module 105 is specifically used to determine the track corresponding to the song ID with the smallest hit ranking ratio for each song as the component track after performing same song statistics on the song IDs.
[0140] In a specific implementation of the present application, the component track determination module 105 is specifically used to determine the total number of hits of the same song and the number of hits corresponding to each song ID from the statistical results corresponding to the same song statistics; compare each hit number with the total number of hits corresponding to the same song to obtain the confidence level; for the same song, if the hit ranking ratios are the same, the track corresponding to the song ID with the highest confidence level is determined as the component track.
[0141] In a specific implementation of the present application, it also includes:
[0142] The track screening module is used to screen out the component tracks of the target audio from the tracks corresponding to each song ID, and then perform same-song statistics on each song ID to obtain the actual hit playback time corresponding to each song and the same-song hit playback time after same-song processing; compare the corresponding actual hit playback time with the same-song hit playback time to obtain the playback proportion of each song; and remove tracks whose playback proportion is less than the playback proportion threshold from the component tracks.
[0143] In a specific implementation of the present application, the fingerprint feature extraction module 101 is specifically used to slice the target audio according to the slice length and the slice interval distance; wherein the slice length is greater than or equal to the slice interval distance.
[0144] In a specific implementation of the present application, the song statistics module 103 is specifically used to perform edge filtering on the fragments that hit the same song ID; after completing the edge filtering, the song ID is counted to obtain the number of hit fragments of each song ID.
[0145] In a specific implementation of the present application, it also includes:
[0146] The playing time determination module is used to determine the playing time of the constituent tracks according to the correspondence between each fragment of the target audio and the constituent tracks after filtering out the constituent tracks of the target audio from the tracks corresponding to each song ID.
[0147] Corresponding to the above method embodiment, the embodiment of the present application further provides an electronic device. The electronic device described below and the audio track identification method described above can refer to each other.
[0148] See also Figure 4 As shown, the electronic device includes:
[0149] A memory 332, for storing computer programs;
[0150] The processor 322 is used to implement the steps of the audio track identification method of the above method embodiment when executing the computer program.
[0151] For details, please refer to Figure 5 , Figure 5A specific structural diagram of an electronic device provided for this embodiment, the electronic device may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 322 (for example, one or more processors) and a memory 332, and the memory 332 stores one or more computer applications 342 or data 344. Among them, the memory 332 can be a temporary storage or a permanent storage. The program stored in the memory 332 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the data processing device. Furthermore, the central processing unit 322 can be configured to communicate with the memory 332 to execute a series of instruction operations in the memory 332 on the electronic device 301.
[0152] The electronic device 301 may further include one or more power supplies 326 , one or more wired or wireless network interfaces 350 , one or more input and output interfaces 358 , and / or one or more operating systems 341 .
[0153] The steps in the audio track identification method described above can be implemented by the structure of an electronic device.
[0154] Corresponding to the above method embodiment, the embodiment of the present application also provides a readable storage medium. The readable storage medium described below and the audio track identification method described above can refer to each other.
[0155] A readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the audio track identification method of the above method embodiment.
[0156] The readable storage medium may specifically be a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or other readable storage medium that can store program codes.
[0157] Those skilled in the art may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
Claims
1. A method for identifying an audio track, characterized in that: include: Acquire target audio to be identified, and after segmenting the target audio, extract audio fingerprint features of each segment; Obtaining song IDs that are matched to each of the audio fingerprint features, and the play volume ranking of each of the song IDs; Counting the song IDs to obtain the number of hits for each song ID; Using the play ranking and the hit number, obtain the hit ranking ratio of each song ID; Using the hit ranking ratio, the constituent tracks of the target audio are screened out from the tracks corresponding to the song IDs; Among them, using the hit ranking ratio, filtering out the component tracks of the target audio from the tracks corresponding to each of the song IDs includes: After counting the same songs for the song IDs, the tracks corresponding to the song IDs with the smallest hit ranking ratio for each song are determined as the component tracks; The step of respectively determining the tracks corresponding to the song IDs with the smallest hit ranking ratios for each song as the component tracks comprises: Determine the total number of hits for the same song and the number of hits corresponding to each of the song IDs from the statistical results corresponding to the same song statistics; Compare each of the hit counts with the total hit count for the same song to obtain a confidence level; For the same song, if the hit ranking ratios are the same, the track corresponding to the song ID with the highest confidence is determined as the component track.
2. The audio track identification method according to claim 1, characterized in that: The obtaining of song IDs that are matched to the audio fingerprint features and the play volume ranking of the song IDs includes: In the audio fingerprint library, searching for the song IDs that are matched with the audio fingerprint features respectively; Obtain the playback volume of each song ID on the playback terminal; The playback volume corresponding to each segment is sorted respectively to obtain the playback volume ranking.
3. The audio track identification method according to claim 1, characterized in that: After selecting the target audio tracks from the tracks corresponding to the song IDs, the method further includes: Perform same song statistics on each song ID to obtain the actual hit play time corresponding to each song and the same song hit play time after same song processing; Compare the corresponding actual hit play time with the hit play time of the same song to obtain the play ratio of each song; The tracks whose play ratio is less than the play ratio threshold are removed from the component tracks.
4. The audio track identification method according to claim 1, characterized in that: The target audio segment includes: The target audio is segmented according to a segmentation length and a segmentation interval; wherein the segmentation length is greater than or equal to the segmentation interval.
5. The audio track identification method according to claim 1, characterized in that: The song IDs are counted to obtain the number of hits for each song ID, including: Perform edge filtering on the fragments that hit the same song ID; After completing the edge filtering, the song IDs are counted to obtain the number of hits for each song ID.
6. The audio track identification method according to any one of claims 1 to 5, characterized in that: After selecting the target audio tracks from the tracks corresponding to the song IDs, the method further includes: The playing time of the component tracks is determined according to the correspondence between each segment of the target audio and the component tracks.
7. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the audio track identification method as claimed in any one of claims 1 to 6 when executing the computer program.
8. A readable storage medium, characterized in that: The readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the audio track identification method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Music emotion credible classification method based on deep learning
CN111462774A
Audio identification method and apparatus, and computer storage medium
US20180276297A1
