Music feature processing method, apparatus, device, medium, and program product

CN116662781BActive Publication Date: 2026-08-28PING AN TECH (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310640606.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-31
Publication Date
2026-08-28
Estimated Expiration
2043-05-31

AI Technical Summary

Technical Problem

[0004]本发明实施例公开的一种音乐特征处理方法、装置、设备、介质及程序产品,以解决现有技术中音乐情感分类方式比较单一的问题

Benefits of technology

[0030]综上所述,本发明公开的一种音乐特征处理方法、装置、设备、介质及程序产品,通过将获取到的目标音乐的音频特征、歌词文本特征以及根据目标音乐的歌手名、歌曲名和专辑名得到的上下文特征进行特征融合,以得到模态融合特征,并根据模态融合特征来对目标音乐进行情感分类。可见,本发明中不仅以目标音乐的音频特征作为分类依据来对目标音乐进行情感分类,还参考了目标音乐的歌词文本特征和上下文特征,避免了音乐情感分类依据比较单一的问题,有利于提高对目标音乐进行情感分类的准确性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116662781B_ABST
    Figure CN116662781B_ABST
Patent Text Reader

Abstract

The application discloses a music feature processing method, device, equipment, medium and program product, and the method comprises the steps of obtaining the audio feature, lyric text feature and context feature of target music, wherein the context feature is obtained according to the singer name, song name and album name of the target music; performing feature fusion according to the audio feature, lyric text feature and context feature to obtain a modal fusion feature; and performing emotional classification processing on the target music according to the modal fusion feature. It can be seen that in the application, not only the audio feature of the target music is used as a classification basis to perform emotional classification on the target music, but also the lyric text feature and context feature of the target music are referred to, so that the problem of single music emotional classification basis is avoided, and the accuracy of emotional classification on the target music is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method, apparatus, device, medium, and program product for music feature processing. Background Technology

[0002] Classifying the emotions contained in music based on its musical characteristics is a common method.

[0003] Existing technologies typically classify the emotions in music based on its audio characteristics, such as Mel frequency (MFCC), zero-crossing rate, spectral centroid, or beats per minute (BPM). However, this method relies solely on the audio characteristics of the music to classify its emotions, resulting in a relatively singular basis for music emotion classification. Summary of the Invention

[0004] This invention discloses a music feature processing method, apparatus, device, medium, and program product to solve the problem that the existing music emotion classification methods are relatively simple.

[0005] This invention discloses a music feature processing method, the method comprising:

[0006] The audio features, lyrics text features, and context features of the target music are obtained, wherein the context features are obtained based on the artist name, song name, and album name of the target music.

[0007] Based on the audio features, the lyrics text features, and the context features, feature fusion is performed to obtain modality fusion features;

[0008] Based on the modality fusion features, the target music is subjected to emotion classification processing.

[0009] Optionally, in the above method, the feature fusion based on the audio features, the lyrics text features, and the context features to obtain modality fusion features includes:

[0010] The audio features and the lyrics text features are fused based on a cross-modal attention mechanism to obtain preliminary modal fusion features;

[0011] Based on the preliminary modality fusion features and the context features, modality features are fused using a cross-modality attention mechanism to obtain modality fusion features.

[0012] Optionally, in the above method, obtaining the audio features of the target music includes:

[0013] Based on the audio file of the target music, the corresponding short-time Fourier transform spectrum is obtained;

[0014] The short-time Fourier transform spectrum is input into the first feature extraction network to obtain the audio features.

[0015] Optionally, in the above method, obtaining the lyrics text features of the target music includes:

[0016] The lyrics text of the target music is tokenized to obtain the lyrics text tokens;

[0017] The lyrics text tags are input into a second feature extraction network to obtain the lyrics text features.

[0018] Optionally, in the above method, obtaining the contextual features of the target music includes:

[0019] The artist name, song name, and album name of the target music are tokenized to obtain contextual text tags;

[0020] The contextual text tags are input into a third feature extraction network to obtain the contextual features.

[0021] Optionally, the above method further includes performing emotion classification processing on the target music based on the modality fusion features, which further includes:

[0022] Based on the modal fusion features, the target music is classified into different genres.

[0023] The present invention also discloses a music feature processing device, comprising:

[0024] The feature extraction unit is used to obtain the audio features, lyrics text features, and context features of the target music; the context features are obtained based on the artist name, song name, and album name of the target music.

[0025] The feature fusion unit performs feature fusion based on the audio features, the lyrics text features, and the context features to obtain modality fusion features;

[0026] The feature processing unit is used to perform emotion classification processing on the target music based on the modality fusion features.

[0027] The present invention also discloses a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement various steps such as those in a music feature processing method.

[0028] The present invention also discloses a computer-readable storage medium storing a computer program that, when executed by a processor, implements various steps of a music feature processing method.

[0029] The present invention also discloses a computer program product, the computer program product comprising a computer program, characterized in that, when the computer program is executed by a processor, it implements various steps such as those in a music feature processing method.

[0030] In summary, the music feature processing method, apparatus, device, medium, and program product disclosed in this invention fuses the acquired audio features, lyric text features, and contextual features obtained based on the artist name, song name, and album name of the target music to obtain modal fusion features, and then classifies the target music for emotion based on these modal fusion features. It is evident that this invention not only uses the audio features of the target music as the classification basis for emotion classification but also references the lyric text features and contextual features, avoiding the problem of a relatively singular basis for music emotion classification and thus improving the accuracy of emotion classification of target music. Attached Figure Description

[0031] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0032] Figure 1 This is a flowchart illustrating the implementation of a music feature processing method disclosed in Embodiment 1 of the present invention;

[0033] Figure 2 This is a partial implementation flowchart of a music feature processing method disclosed in Embodiment 1 of the present invention;

[0034] Figure 3 This is a partial implementation flowchart of a music feature processing method disclosed in Embodiment 1 of the present invention;

[0035] Figure 4 This is a partial implementation flowchart of a music feature processing method disclosed in Embodiment 1 of the present invention;

[0036] Figure 5 This is a partial implementation flowchart of a music feature processing method disclosed in Embodiment 1 of the present invention;

[0037] Figure 6This is another implementation flowchart of a music feature processing method disclosed in Embodiment 1 of the present invention;

[0038] Figure 7 This is a schematic diagram of the structure of a music feature processing device disclosed in Embodiment 2 of the present invention;

[0039] Figure 8 This is a schematic diagram of the structure of a computer device disclosed in Embodiment 3 of the present invention. Detailed Implementation

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

[0041] This invention discloses a music feature processing method, apparatus, device, medium, and program product. It fuses the acquired audio features, lyrics text features, and contextual features obtained from the artist's name, song title, and album name of the target music to obtain modal fusion features. These modal fusion features are then used to classify the target music based on its emotional characteristics. It is understood that this invention requires extracting features from the audio file, lyrics text, and contextual text of the target music separately to obtain corresponding audio features, lyrics text features, and contextual features. Then, a modal feature fusion network is used to fuse these features, ultimately obtaining the modal fusion features, which are then used to classify the target music based on its emotional characteristics. Therefore, this invention not only uses the audio features of the target music as the classification basis for emotional classification but also references the lyrics text features and contextual features, thus enriching the criteria for music emotional classification and avoiding the problem of a single classification basis. This improves the accuracy of emotional classification of target music. Specific embodiments are described below.

[0042] Example 1

[0043] like Figure 1 The diagram shows a flowchart of a music feature processing method disclosed in Embodiment 1 of the present invention. This method acquires the audio features, lyrics text features, and context features of the target music, and performs modal feature fusion based on a modal feature fusion network to obtain modal fusion features. Then, it classifies the target music based on the modal fusion features, avoiding the problem of a single basis for music emotion classification in existing technologies. Embodiment 1 of the present invention specifically includes the following steps:

[0044] S101: Obtain the audio features, lyrics text features, and context features of the target music.

[0045] The contextual features are derived from the artist's name, song title, and album name of the target music.

[0046] In this embodiment, audio features can be extracted from the audio file of the target music, lyric text features can be extracted from the lyric file of the target music, and contextual features can be extracted from the artist name, song name, and album name of the target music.

[0047] In this specific implementation, this embodiment can extract audio features from the audio file of the target music using a convolutional neural network, extract lyric text features from the lyrics of the target music using a pre-trained Bidirectional Encoder Representation from Transformers (BERT), and extract contextual features from the artist name, song name, and album name of the target music. It can be understood that this embodiment can extract features from the audio file, lyrics, and context of the target music separately, thereby obtaining the corresponding audio features, lyrics features, and contextual features.

[0048] S102: Perform feature fusion based on audio features, lyrics text features, and context features to obtain modality fusion features.

[0049] By inputting audio features, lyrics text features, and context features into a multimodal feature fusion network, feature fusion of audio features, lyrics text features, and context features is achieved, ultimately yielding modal fusion features.

[0050] In its implementation, the multimodal feature fusion network in this embodiment can be based on a cross-modal attention mechanism. This mechanism involves calculating self-attention between two modalities, using information from one modality as the query and information from the other as the key and value, with the output being a fusion of the features from both modalities. This embodiment involves feature fusion across three modalities: audio features, lyrics text features, and context features. Therefore, in actual feature fusion, features from two modalities must first be fused, and then the fused features are fused with the features from the third modality to obtain the final modal fusion features. For example, audio features and lyrics text features are first fused, and then the fused features are fused with context features to obtain the modal fusion features.

[0051] S103: Based on modal fusion features, perform emotional classification processing on the target music.

[0052] This invention, based on Russell's ring model for emotion classification, divides musical emotion into two dimensions: pleasantness and intensity. Pleasure is further divided into pleasant and unpleasant, and intensity into moderate and high intensity. This results in four emotions: happiness (high intensity pleasant), ease (moderate intensity pleasant), boredom (moderate intensity unpleasant), and fear (high intensity unpleasant). Based on this, the obtained modal fusion features are input into a fully connected layer classifier for processing to determine the emotion of the target music. Thus, emotion classification of the target music is achieved based on its modal fusion features.

[0053] In summary, the music feature processing method disclosed in Embodiment 1 of this invention fuses the acquired audio features, lyrics text features, and contextual features obtained based on the artist name, song name, and album name of the target music to obtain modal fusion features, and then classifies the target music based on these modal fusion features. It is evident that this invention not only uses the audio features of the target music as the classification criterion for emotional classification but also references the lyrics text features and contextual features, avoiding the problem of a relatively singular basis for music emotional classification and thus improving the accuracy of emotional classification of target music.

[0054] Based on Figure 1 In its specific implementation, step S102 can be achieved through the following steps, such as... Figure 2 As shown:

[0055] This embodiment employs a hierarchical multimodal feature fusion method to achieve feature fusion of audio features, lyrics text features, and contextual features. Specifically, it selectively fuses two types of features, then fuses the fused features with a third type of feature to obtain the final modal fusion feature. In other words, the three features of the target music are fused at two levels to ultimately obtain the modal fusion feature.

[0056] S201: Based on the cross-modal attention mechanism, the audio features and lyrics text features are fused to obtain preliminary modal fusion features.

[0057] In this specific implementation, this embodiment can perform hierarchical feature fusion based on the semantic depth and signal-to-noise ratio (SNR) of audio features, the semantic depth and SNR of lyrics text features, and the semantic depth and SNR of context features. Audio information naturally has higher noise and useless information than lyrics text and context information; therefore, the SNR and semantic depth of audio features are the lowest among the three features. Context information, namely the song title, album title, and author name of the target music, is a summary and concise expression of the music, and its useless information and noise are the lowest; therefore, the semantic depth and SNR of context features are the highest. Accordingly, firstly, the audio features with the lowest semantic depth and lowest SNR of the target music, along with the lyrics text features with higher semantic depth and higher SNR, are input into a modal feature fusion network based on a cross-modal attention mechanism for feature fusion to obtain preliminary modal fusion features. Then, step S202 is executed, that is, modal feature fusion is performed based on the preliminary modal fusion features and context features using a cross-modal attention mechanism to obtain the modal fusion features. In other words, this embodiment first fuses audio features with lower semantic depth and lower signal-to-noise ratio (SNR) and lyrics text features, then fuses the resulting preliminary modality fusion features with context features with the highest semantic depth and highest SNR, ultimately obtaining the modality fusion features. This hierarchical fusion from low semantic depth and low SNR to high semantic depth and high SNR makes it easier for the modality feature fusion network to distinguish effective information from multiple features, improving the network's performance. Therefore, hierarchical modality feature fusion is achieved.

[0058] S202: Based on the preliminary modal fusion features and context features, modal feature fusion is performed using a cross-modal attention mechanism to obtain modal fusion features.

[0059] In this specific implementation, the obtained preliminary modal fusion features and the context features with the highest level semantic depth and the highest signal-to-noise ratio are input into the modal feature fusion network based on the cross-modal attention mechanism to perform feature fusion and obtain modal fusion features.

[0060] In one implementation, this embodiment obtains the audio features of the target music through the following steps, such as... Figure 3 As shown:

[0061] S301: Obtain the corresponding short-time Fourier transform spectrum based on the audio file of the target music;

[0062] The audio file of the target music is processed by a program with spectrum output function to obtain the Short-Time Fourier Transform (STFT) spectrum of the target music.

[0063] In this specific implementation, the target music can be processed using the librosa library to obtain the STFT spectrum corresponding to the target music. Then, music feature processing is performed based on the obtained STFT spectrum.

[0064] S302: Input the short-time Fourier transform spectrum into the first feature extraction network to obtain audio features.

[0065] The obtained STFT spectrum is input into a neural network with audio feature extraction capabilities, namely the first feature extraction network, and the audio features of the target music contained in the STFT spectrum are output through the first feature extraction model.

[0066] In this specific implementation, the first feature extraction network can be a five-layer two-dimensional convolutional neural network. The STFT spectrum is input into the convolutional neural network for feature extraction and downsampling, ultimately obtaining the audio features of the target music.

[0067] In one implementation, this embodiment can obtain the lyric text features of the target music through the following steps, such as... Figure 4 As shown:

[0068] S401: Perform tokenization on the lyrics text of the target music to obtain the lyrics text tokens.

[0069] In this specific implementation, a tokenization tool, such as the tokenizer in the Keras deep learning framework, can be used to tokenize the lyrics of the target music to obtain the corresponding lyrics text tokens. Then, subsequent steps of music feature processing are performed based on the obtained lyrics text tokens.

[0070] S402: Input the lyrics text tags into the second feature extraction network to obtain the lyrics text features.

[0071] The obtained lyric text tags are input into a neural network with lyric text feature extraction capabilities, namely the second feature extraction network. The second feature extraction model outputs the lyric text features of the target music contained in the lyric text.

[0072] In this implementation, a pre-trained BERT model can be used to extract features from the lyrics of the target music. The Tokenizer-processed lyrics are input into the pre-trained BERT model to obtain the final lyrics features of the target music.

[0073] It should be noted that the neural network used in this embodiment is not limited to the BERT model, but can also be other commonly used language models in NLP, such as the Transformer model or the Long Short-Term Memory (LSTM) network model.

[0074] In one implementation, this embodiment can obtain the contextual features of the target music through the following steps, such as... Figure 5 As shown:

[0075] S501: The artist name, song name, and album name of the target music are tokenized to obtain contextual text tokens.

[0076] In a specific implementation, this embodiment can use a tokenization tool, such as the tokenizer of the Keras deep learning framework, to tokenize the artist name, song name, and album name of the target music to obtain the corresponding context tokens, and then perform subsequent steps of music feature processing based on the obtained context tokens.

[0077] S502: Input the contextual text tags into the third feature extraction network to obtain contextual features.

[0078] The obtained context labels are input into a neural network with context feature extraction capabilities, namely the third feature extraction network. The third feature extraction model outputs the context features of the target music contained in the singer name, song name, and album name.

[0079] In this implementation, a pre-trained BERT model can be used to extract features from the artist name, song name, and album name of the target music. The contextual tags, after being tokenized by a tokenizer, are input into the pre-trained BERT model to obtain the contextual features of the target music.

[0080] It should be noted that the neural network used in this embodiment is not limited to the BERT model, but can also be other commonly used language models in NLP, such as the Transformer model or the Long Short-Term Memory (LSTM) network model.

[0081] Based on Figure 1 In its specific implementation, step S103 can also be achieved through the following steps, such as... Figure 6 As shown:

[0082] S104: Based on the modal fusion characteristics, classify the target music into different genres.

[0083] Common music genres include pop, blues, rock, hip-hop, jazz, electronic music, Latin music, country music, modern folk music, and light music, among others. The obtained modal synthesis features are input into a fully connected layer classifier for processing to determine the genre to which the target music belongs. Based on this, genre classification of the target music is achieved according to its characteristics.

[0084] Example 2

[0085] like Figure 7 The diagram shown is a schematic representation of a music feature processing device disclosed in Embodiment 2 of the present invention. This device acquires the audio features, lyrics text features, and contextual features of the target music, and performs modal feature fusion based on a modal feature fusion network to obtain modal fusion features. Then, it classifies the target music based on the modal fusion features, avoiding the problem of a relatively singular basis for music emotion classification in existing technologies.

[0086] Specifically, this device includes the following units:

[0087] The feature extraction unit 701 is used to obtain the audio features, lyrics text features and context features of the target music. The context features are obtained based on the singer name, song name and album name of the target music.

[0088] The feature fusion unit 702 performs feature fusion based on audio features, lyrics text features, and context features to obtain modality fusion features;

[0089] The emotion classification unit 703 is used to perform emotion classification processing on the target music based on modality fusion features.

[0090] In summary, the music feature processing device disclosed in Embodiment 2 of this invention fuses the acquired audio features, lyrics text features, and contextual features obtained based on the artist name, song name, and album name of the target music to obtain modal fusion features, and then classifies the target music based on these modal fusion features. It is evident that this invention not only uses the audio features of the target music as the classification criterion for emotional classification but also references the lyrics text features and contextual features, avoiding the problem of a relatively singular basis for music emotional classification and thus improving the accuracy of emotional classification of target music.

[0091] In one implementation, the feature fusion unit 702 is specifically used for:

[0092] Based on the cross-modal attention mechanism, audio features and lyrics text features are fused to obtain preliminary modal fusion features;

[0093] Based on the preliminary modality fusion features and contextual features, modality features are fused using a cross-modality attention mechanism to obtain modality fusion features.

[0094] In one implementation, the feature extraction unit 701 can specifically be used for:

[0095] Based on the audio file of the target music, obtain the corresponding short-time Fourier transform spectrum;

[0096] The short-time Fourier transform spectrum is input into the first feature extraction network to obtain audio features.

[0097] In one implementation, the feature extraction unit 701 can specifically be used for:

[0098] The lyrics text of the target music is tokenized to obtain the lyrics text tokens;

[0099] The lyrics text tags are input into the second feature extraction network to obtain the lyrics text features.

[0100] In one implementation, the feature extraction unit 701 can specifically be used for:

[0101] The artist name, song name, and album name of the target music are tokenized to obtain contextual text tags;

[0102] The contextual text tags are input into the third feature extraction network to obtain contextual features.

[0103] In one implementation, the device may further include a genre classification unit, specifically used for:

[0104] Based on modal fusion characteristics, the target music is classified into different genres.

[0105] Specific limitations regarding the music feature processing device can be found in the limitations of the music feature processing method described above, and will not be repeated here. Each module in the aforementioned music feature processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0106] Example 3

[0107] Embodiment 3 of this application discloses a computer device, which can be a server, and its internal structure diagram can be as follows: Figure 8As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a music feature processing method.

[0108] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:

[0109] The audio features, lyrics text features, and context features of the target music are obtained, where the context features are obtained based on the artist name, song name, and album name of the target music.

[0110] Modality fusion features are obtained by fusing features based on audio features, lyrics text features, and contextual features.

[0111] Based on modal fusion features, the target music is classified according to its emotional characteristics.

[0112] Example 4

[0113] Embodiment 4 of this application discloses a computer-readable storage medium that, when the instructions in the computer-readable storage medium are executed by a processor in an electronic device, enables the electronic device to perform the steps of any embodiment of a music feature processing method disclosed in this invention.

[0114] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0115] The audio features, lyrics text features, and context features of the target music are obtained, where the context features are obtained based on the artist name, song name, and album name of the target music.

[0116] Modality fusion features are obtained by fusing features based on audio features, lyrics text features, and contextual features.

[0117] Based on modal fusion features, the target music is classified according to its emotional characteristics.

[0118] Example 5

[0119] Embodiment 5 of this application discloses a computer program product, which includes a computer program that, when executed by a processor, implements the steps of any embodiment of the music feature processing method described above.

[0120] It should be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0121] It should also be understood that the term “and / or” as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0122] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [described condition or event] is detected" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once [described condition or event] is detected," or "in response to detection of [described condition or event]."

[0123] Furthermore, in the description of this invention and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0124] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of the invention include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0125] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.

[0126] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

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

Claims

1. A method for processing musical features, characterized in that, The method includes: The audio features, lyrics text features, and context features of the target music are obtained. The context features are obtained based on the artist name, song name, and album name of the target music. Specifically, the lyrics text features and the context features are extracted separately to obtain mutually independent lyrics text features and context features. The audio features, lyrics text features, and context features are then fused to obtain modality fusion features. Based on the modal fusion features, the target music is subjected to emotion classification processing; The step of fusing features based on the audio features, the lyrics text features, and the context features to obtain modal fusion features includes: fusing the audio features with the lowest semantic depth and lowest signal-to-noise ratio and the lyrics text features with higher semantic depth and higher signal-to-noise ratio based on a cross-modal attention mechanism to obtain preliminary modal fusion features; and fusing the preliminary modal fusion features and the context features with the highest semantic depth and highest signal-to-noise ratio based on a cross-modal attention mechanism to obtain modal fusion features. The process of obtaining the audio features of the target music includes: obtaining the corresponding short-time Fourier transform spectrum based on the audio file of the target music; and inputting the short-time Fourier transform spectrum into a first feature extraction network to obtain the audio features. The process of obtaining the lyrics text features of the target music includes: performing a tokenization process on the lyrics text of the target music to obtain lyrics text tokens; and inputting the lyrics text tokens into a second feature extraction network to obtain the lyrics text features. The process of obtaining the contextual features of the target music includes: tokenizing the artist name, song name, and album name of the target music to obtain contextual text tags; and inputting the contextual text tags into a third feature extraction network to obtain the contextual features.

2. The method as described in claim 1, characterized in that, The step of performing emotion classification processing on the target music based on the modality fusion features further includes: Based on the modal fusion features, the target music is classified into different genres.

3. A music feature processing device, characterized in that, include: The feature extraction unit is used to obtain the audio features, lyrics text features, and context features of the target music. The contextual features are obtained based on the artist name, song name, and album name of the target music; wherein, by extracting features from the lyrics text and contextual features of the target music respectively, the lyrics text features and the contextual features are obtained independently. The feature fusion unit performs feature fusion based on the audio features, the lyrics text features, and the context features to obtain modality fusion features; The feature processing unit is used to perform emotion classification processing on the target music based on the modality fusion features; The step of fusing features based on the audio features, the lyrics text features, and the context features to obtain modal fusion features includes: fusing the audio features with the lowest semantic depth and lowest signal-to-noise ratio and the lyrics text features with higher semantic depth and higher signal-to-noise ratio based on a cross-modal attention mechanism to obtain preliminary modal fusion features; and fusing the preliminary modal fusion features and the context features with the highest semantic depth and highest signal-to-noise ratio based on a cross-modal attention mechanism to obtain modal fusion features. The process of obtaining the audio features of the target music includes: obtaining the corresponding short-time Fourier transform spectrum based on the audio file of the target music; and inputting the short-time Fourier transform spectrum into a first feature extraction network to obtain the audio features. The process of obtaining the lyrics text features of the target music includes: performing a tokenization process on the lyrics text of the target music to obtain lyrics text tokens; and inputting the lyrics text tokens into a second feature extraction network to obtain the lyrics text features. The process of obtaining the contextual features of the target music includes: tokenizing the artist name, song name, and album name of the target music to obtain contextual text tags; and inputting the contextual text tags into a third feature extraction network to obtain the contextual features.

4. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements each step of the music feature processing method as described in any one of claims 1 to 2.

5. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the various steps of the music feature processing method as described in any one of claims 1 to 2.

6. A computer program product, said computer program product comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements each step of the music feature processing method as described in any one of claims 1 to 2.

Citation Information

Patent Citations

  • Music emotion recognition method and system based on cross-modal fusion

    CN116010902A