Song recognition method, electronic device, and computer-readable storage medium
By adjusting the scores of songs in the same song group in the humming audio recognition method, the accuracy of humming song recognition is improved, solving the problem of low accuracy in existing technologies.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-28
- Publication Date
- 2026-03-17
AI Technical Summary
The accuracy of humming song recognition in existing technologies is low, and it is affected by factors related to the hummer and the environment.
By acquiring the target humming audio, candidate songs and their original scores are determined, and the scores of multiple target candidate songs belonging to the same song group are improved. The same song group includes songs with the same performer, different audio tracks, different recordings, or the same lyrics and music, different audio tracks, and different recordings. The recognition result is determined based on the updated scores.
The accuracy of humming song recognition has been improved by analyzing whether candidate songs belong to the same song group and adjusting the score to increase the likelihood of the recognition result.
Smart Images

Figure CN113946709B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of audio processing technology, and more specifically, to song recognition methods, electronic devices, and computer-readable storage media. Background Technology
[0002] In the era of rapid development of digital music, music appears on the Internet in various forms, resulting in an explosive growth in the number of music on the Internet. Sometimes people want to hear some music, but only remember part of the melody or part of the lyrics. Humming recognition is a very good solution.
[0003] In related technologies, the accuracy of song recognition is low due to factors such as the singer's own singing (inaccurate pronunciation), inaccurate lyrics, or environmental factors. Therefore, improving the accuracy of song recognition is a technical problem that needs to be solved by those skilled in the art. Summary of the Invention
[0004] The purpose of this application is to provide a song recognition method, an electronic device, and a computer-readable storage medium, which improves the accuracy of humming song recognition.
[0005] To achieve the above objectives, the first aspect of this application provides a song recognition method, comprising:
[0006] Obtain the target humming audio and determine the candidate songs corresponding to the target humming audio and the original score of each candidate song;
[0007] If there are multiple target candidate songs belonging to the same song group, the score of the target candidate songs will be increased; among them, songs with the same performer, different audio tracks, and different recordings belong to the same song group; songs with the same lyrics and music, different audio tracks, and different recordings belong to the same song group; and songs with the same composer, different audio tracks, and different recordings belong to the same song group.
[0008] The recognition result of the target humming audio is determined based on the updated score of the candidate songs, and the recognition result is output.
[0009] To achieve the above objectives, a second aspect of this application provides an electronic device, comprising:
[0010] Memory, used to store computer programs;
[0011] A processor is used to implement the steps of the song recognition method described above when executing the computer program.
[0012] To achieve the above objectives, a third aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the song recognition method described above.
[0013] As can be seen from the above scheme, the song recognition method provided in this application includes: acquiring a target humming audio, and determining the candidate songs corresponding to the target humming audio and the original score of each candidate song; if there are multiple target candidate songs belonging to the same song group, then increasing the score of the target candidate songs; wherein, songs with the same performer, different audio tracks, and different recordings belong to the same song group, songs with the same lyrics and music, different audio tracks, and different recordings belong to the same song group, and songs with the same composer, different audio tracks, and different recordings belong to the same song group; determining the recognition result of the target humming audio based on the updated score of the candidate songs, and outputting the recognition result.
[0014] The song recognition method provided in this application analyzes whether candidate songs belong to the same song group and adjusts the scores of the candidate songs accordingly. Since songs belonging to the same song group have some or more correlations, if multiple target candidate songs belong to the same song group, these target candidate songs are more likely to be the correct recognition results for the target humming audio. Appropriately increasing the scores of these target candidate songs helps improve the accuracy of humming song recognition. This application also discloses an electronic device and a computer-readable storage medium that can achieve the same technical effects.
[0015] It should be understood that the above general description and the following detailed description are merely exemplary and do not limit this application. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. The drawings are used to provide a further understanding of this disclosure and constitute a part of the specification. They are used together with the following detailed description to explain this disclosure, but do not constitute a limitation of this disclosure. In the drawings:
[0017] Figure 1 An architecture diagram of a song recognition system provided in this application embodiment;
[0018] Figure 2 A flowchart of a song recognition method provided in an embodiment of this application;
[0019] Figure 3 This is a structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0020] 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 of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0021] To facilitate understanding of the song recognition method provided in this application, the system used is described below. See [link to relevant documentation]. Figure 1 It shows an architecture diagram of a song recognition system provided in an embodiment of this application, such as Figure 1 As shown, it includes a server 10 and a number of clients 20 that establish communication connections with the server 10.
[0022] In this application, server 10 is used to perform the steps of song recognition, including: acquiring target humming audio, and determining candidate songs corresponding to the target humming audio and the original score of each candidate song; if there are multiple target candidate songs belonging to the same song group, increasing the score of the target candidate songs; wherein, songs with the same performer, different audio tracks, and different recordings belong to the same song group, songs with the same lyrics and music, different audio tracks, and different recordings belong to the same song group, and songs with the same composer, different audio tracks, and different recordings belong to the same song group; determining the recognition result of the target humming audio based on the updated scores of the candidate songs, and outputting the recognition result. Furthermore, server 10 also has a song database, and candidate songs corresponding to the target humming audio are determined in the song database through similarity calculation.
[0023] Client 20 may include fixed terminals such as PCs (Personal Computers) and mobile terminals such as mobile phones. Client 20 is equipped with an audio acquisition device for acquiring the target humming audio and an output device for outputting the recognition result of the target humming audio.
[0024] This application discloses a song recognition method that improves the accuracy of recognizing hummed songs.
[0025] See Figure 2 The flowchart of a song recognition method provided in this application embodiment is as follows: Figure 2 As shown, it includes:
[0026] S101: The client collects the target humming audio;
[0027] S102: The client sends the target humming audio to the server;
[0028] The purpose of this embodiment is to perform song recognition on target humming audio. In specific implementation, the client collects the target humming audio and sends it to the server so that the server can perform song recognition.
[0029] S103: The server determines the candidate songs corresponding to the target humming audio and the original score of each candidate song;
[0030] In this step, the server performs humming recognition on the target humming audio to determine multiple candidate songs corresponding to the target humming audio and the original score of each candidate song. As a possible implementation, this step includes: calculating the similarity between the target humming audio and all songs; identifying songs with a similarity greater than a preset value, or the N songs with the highest similarity, as candidate songs corresponding to the target humming audio; and determining the similarity between the target humming audio and the candidate songs as the original score of the candidate songs. In a specific implementation, candidate songs can be determined by calculating similarity, that is, songs with a similarity greater than a preset value to the target humming audio are identified as candidate songs corresponding to the target humming audio, and this similarity is used as the original score of the candidate songs. The specific method of calculating similarity is not limited here and can be flexibly set according to the actual situation.
[0031] Furthermore, the candidate songs can be sorted from high to low based on their original scores, resulting in song1, song2, song3, ..., songN, with corresponding original scores of score1, score2, score3, ..., scoreN. Here, {scoreX} represents the original score of the Xth song in the sorted results, where X = 1, 2, 3, ..., N, and scoreX is a monotonically non-increasing sequence of real numbers in the range [0,1].
[0032] S104: If there are multiple target candidate songs belonging to the same song group, the server increases the score of the target candidate songs; wherein, songs with the same performer, different audio tracks, and different recordings belong to the same song group, songs with the same lyrics and music, different audio tracks, and different recordings belong to the same song group, and songs with the same composer, different audio tracks, and different recordings belong to the same song group.
[0033] It is understandable that songs belonging to the same song group have some or several related aspects, such as the same performer, the same lyrics and music, the same composer, etc. Therefore, if there are multiple target candidate songs belonging to the same song group, these target candidate songs are more likely to be the correct recognition results of the target humming audio. In this embodiment, appropriately increasing the score of these target candidate songs is beneficial to improving the accuracy of humming song recognition.
[0034] It should be noted that, theoretically, the original scores of different songs with the same audio track or the same recording should be the same or very similar. Therefore, different songs with the same audio track or the same recording will not be grouped into the same song group, otherwise it would affect the improvement of the song score and have a negative impact on subsequent humming recognition. Therefore, in this embodiment, the song group includes songs with the same performer but different audio tracks and different recordings, or songs with the same lyrics and music but different audio tracks and different recordings, or songs with the same composition but different audio tracks and different recordings.
[0035] As a feasible implementation method, the improvement in the score of the target candidate song is positively correlated with the original score of the target candidate song. In specific implementation, the higher the original score of the target candidate song, the more likely it is to be the correct recognition result of the target humming audio, and therefore the higher the improvement in the score of the target candidate song.
[0036] As another feasible implementation, the score improvement of the target candidate song is positively correlated with the number of target songs, where the number of target songs is the number of other target candidate songs belonging to the same song group as the target candidate song. It is understood that the more other target candidate songs belonging to the same song group as the target candidate song, the more related the target candidate song is to other target candidate songs, and the more likely the target candidate song is to be the correct recognition result of the target humming audio; therefore, the higher the score improvement of the target candidate song. In a specific implementation, the candidate songs are marked with the number of target songs, and the marking results are num1, num2, num3, ..., numN, where numX is the number of other candidate songs belonging to the same song group as the Xth candidate song. For example, among the candidate songs, song2 and song5 belong to the same song group, while other candidate songs do not belong to the same song group; then the value of num2 and num5 is 1, and the value of num for other candidate songs is 0.
[0037] In the above implementation, the step of increasing the score of the target candidate song if there are multiple target candidate songs belonging to the same song group includes: determining the target number of other candidate songs belonging to the same song group as the candidate song; constructing a target concave function based on the target number; substituting the original score of the candidate song into the target concave function to obtain the updated score of the candidate song.
[0038] It is understandable that if a real-valued function f is concave on a certain interval (or a convex set in a vector space), and if for any unequal x and y within that interval and any t in [0,1], f(tx+(1-t)y)≥tf(x)=(1-t)f(y), then the function f is concave. In specific implementations, different concave functions are designed for different target quantities. Depending on the target quantity of each candidate song, the corresponding original score is substituted into different concave functions. Since scoreX is a real number in [0,1], this ensures that the updated score is greater than or equal to the original score. Preferably, the target concave function is specifically:
[0039]
[0040] Wherein, newscoreX is the updated score of the Xth candidate song, scoreX is the original score of the Xth candidate song, numX is the target number of other candidate songs belonging to the same song group as the Xth candidate song, and N is the total number of all the candidate songs.
[0041] S105: The server determines the recognition result of the target humming audio based on the updated scores of the candidate songs;
[0042] S106: The server sends the recognition result to the client;
[0043] S107: The client outputs the recognition result.
[0044] In practice, the server determines the recognition result of the target humming audio based on the updated scores of the candidate songs and sends it to the client for display.
[0045] As a possible implementation, determining the recognition result of the target humming audio based on the updated scores of the candidate songs includes: determining the candidate song corresponding to the updated maximum score as the target song corresponding to the target humming audio. In a specific implementation, only the candidate song corresponding to the updated maximum score can be used as the recognition result, that is, only the target song corresponding to the updated maximum score is displayed on the client.
[0046] As another feasible implementation, determining the recognition result of the target humming audio by updating the scores of the candidate songs includes: sorting all the candidate songs in descending order of their updated scores, and determining the sorting result as the recognition result of the target humming audio. In a specific implementation, all candidate songs can be used as the recognition result, that is, all candidate songs and their corresponding updated scores can be displayed on the client in descending order of their updated scores, making it convenient for users to select the target song they need. Preferably, target candidate songs belonging to the same song group can also be displayed in a column, with users swiping up and down to switch between candidate songs within the same song group, and swiping left and right to switch between candidate songs outside the same song group.
[0047] The song recognition method provided in this application analyzes whether candidate songs belong to the same song group and adjusts the scores of the candidate songs accordingly. Since songs belonging to the same song group have certain or several aspects of correlation, if there are multiple target candidate songs belonging to the same song group, these target candidate songs are more likely to be the correct recognition results of the target humming audio. Appropriately increasing the scores of these target candidate songs is beneficial to improving the accuracy of humming song recognition.
[0048] The following describes a song recognition device provided in an embodiment of this application. The song recognition device described below can be referred to in conjunction with the song recognition method described above, and may specifically include:
[0049] The acquisition module is used to acquire the target humming audio and determine the candidate songs corresponding to the target humming audio and the original score of each candidate song;
[0050] The enhancement module is used to increase the score of the target candidate songs if there are multiple target candidate songs belonging to the same song group; wherein, songs with the same performer, different audio tracks, and different recordings belong to the same song group; songs with the same lyrics and music, different audio tracks, and different recordings belong to the same song group; and songs with the same composer, different audio tracks, and different recordings belong to the same song group.
[0051] The determination module is used to determine the recognition result of the target humming audio based on the updated score of the candidate song, and output the recognition result.
[0052] The song recognition device provided in this application analyzes whether candidate songs belong to the same song group and adjusts the scores of the candidate songs accordingly. Since songs belonging to the same song group have certain or several aspects of correlation, if there are multiple target candidate songs belonging to the same song group, these target candidate songs are more likely to be the correct recognition results of the target humming audio. Appropriately increasing the scores of these target candidate songs is beneficial to improving the accuracy of humming song recognition.
[0053] Based on the above embodiments, as a preferred implementation, the improvement in the score of the target candidate song is positively correlated with the original score of the target candidate song.
[0054] Based on the above embodiments, as a preferred implementation, the increase in the score of the target candidate song is positively correlated with the number of target songs, where the number of target songs is the number of other target candidate songs belonging to the same song group as the target candidate song.
[0055] Based on the above embodiments, as a preferred embodiment, the improving module includes:
[0056] A determining unit is used to determine the target number of other candidate songs that belong to the same song group as the candidate song;
[0057] The substitution unit is used to construct a target concave function based on the target number, and substitute the original scores of the candidate songs into the target concave function to obtain the updated scores of the candidate songs.
[0058] Based on the above embodiments, as a preferred implementation, the target concave function is specifically:
[0059]
[0060] Wherein, newscoreX is the updated score of the Xth candidate song, scoreX is the original score of the Xth candidate song, numX is the target number of other candidate songs belonging to the same song group as the Xth candidate song, and N is the total number of all the candidate songs.
[0061] Based on the above embodiments, as a preferred embodiment, the acquisition module includes:
[0062] The acquisition unit is used to acquire the target humming audio;
[0063] The calculation unit is used to calculate the similarity between the target humming audio and all songs, determine the songs with a similarity greater than a preset value or the N songs with the highest similarity as candidate songs corresponding to the target humming audio, and determine the similarity between the target humming audio and the candidate songs as the original score of the candidate songs.
[0064] Based on the above embodiments, as a preferred implementation, the determining module is specifically a module that determines the candidate song corresponding to the updated maximum score as the target song corresponding to the target humming audio.
[0065] Based on the above embodiments, as a preferred implementation, the determining module is specifically a module that sorts all the candidate songs from largest to smallest according to the updated scores, and determines the sorting result as the recognition result of the target humming audio.
[0066] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0067] This application also provides an electronic device, see [link to document]. Figure 3 The present application provides a structural diagram of an electronic device 30, as shown in the embodiment. Figure 3 As shown, it may include a processor 31 and a memory 32.
[0068] The processor 31 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 31 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 31 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 31 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 31 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0069] The memory 32 may include one or more computer-readable storage media, which may be non-transitory. The memory 32 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In this embodiment, the memory 32 is used to store at least the following computer program 321, which, after being loaded and executed by the processor 31, is capable of implementing the relevant steps in the song recognition method executed by the electronic device side as disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 32 may also include an operating system 322 and data 323, etc., and the storage method may be temporary storage or permanent storage. The operating system 322 may include Windows, Unix, Linux, etc.
[0070] In some embodiments, the electronic device 30 may further include an input / output interface 33, a communication interface 34, a power supply 35, and a communication bus 36.
[0071] certainly, Figure 3 The structure of the electronic device shown does not constitute a limitation on the electronic device in the embodiments of this application. In practical applications, the electronic device may include more than [other components]. Figure 3 More or fewer components as shown, or combinations of certain components.
[0072] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, which, when executed by a processor, implement the steps of the song recognition method performed by the electronic device of any of the above embodiments.
[0073] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of the claims of this application.
[0074] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
Claims
1. A song recognition method characterized by comprising: The method comprises: acquiring target humming audio and determining candidate songs corresponding to the target humming audio and original scores of each of the candidate songs; if there are multiple target candidate songs belonging to the same song group, increasing the scores of the target candidate songs; wherein songs with the same performer, different audio tracks, and different recordings belong to the same song group, songs with the same lyrics and music, different audio tracks, and different recordings belong to the same song group, songs with the same composition, different audio tracks, and different recordings belong to the same song group, the score increase of the target candidate songs is positively correlated with the number of target songs, and the number of target songs is the number of other target candidate songs belonging to the same song group as the target candidate song; determining the recognition result of the target humming audio based on the updated scores of the candidate songs and outputting the recognition result; wherein if there are multiple target candidate songs belonging to the same song group, the scores of the target candidate songs are increased, comprising: determining the target number of other candidate songs belonging to the same song group as the candidate song; constructing a target concave function based on the target number, substituting the original score of the candidate song into the target concave function to obtain the updated score of the candidate song; wherein different target numbers correspond to different concave functions, and the original score is a real number in [0, 1] so that the updated score is greater than or equal to the original score.
2. The song recognition method of claim 1, wherein, The score increase of the target candidate song is positively correlated with the original score of the target candidate song.
3. The song recognition method of claim 1, wherein, The target concave function is specifically: ; wherein, is the updated score for the Xth candidate song, is the original score for the Xth candidate song, is the target number of other candidate songs belonging to the same song group as the Xth candidate song, and N is the total number of all the candidate songs.
4. The song recognition method of claim 1, wherein, The determination of the candidate songs corresponding to the target humming audio and the original scores of each of the candidate songs comprises: calculating the similarity between the target humming audio and all songs, determining songs with a similarity greater than a preset value or the N songs with the greatest similarity as the candidate songs corresponding to the target humming audio, and determining the similarity between the target humming audio and the candidate songs as the original score of the candidate song.
5. The song recognition method of claim 1, wherein, The determination of the recognition result of the target humming audio based on the updated scores of the candidate songs comprises: determining the candidate song corresponding to the maximum updated score as the target song corresponding to the target humming audio.
6. The song recognition method of claim 1, wherein, The determination of the recognition result of the target humming audio based on the updated scores of the candidate songs comprises: sorting all the candidate songs in descending order of the updated scores, and determining the sorting result as the recognition result of the target humming audio.
7. An electronic device, comprising: The method comprises: a memory for storing a computer program; a processor for executing the computer program to implement the steps of the song recognition method according to any one of claims 1 to 6.
8. A computer-readable storage medium, characterized in that, The computer program is stored on the computer readable storage medium and is executed by the processor to implement the steps of the song recognition method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Three-dimensional model retrieval method based on preferable views and deep convolutional neural network
CN108009222A
Audio track identification method and device and readable storage medium
CN113486209A