Music recommendation method and device for education scene, equipment and medium

By generating and fusing a large amount of emotional labeled music data in the music generation model, the problem that existing emotional music recommendation models rely on scarce labeled data is solved, and the generalization ability of the model and the accuracy of music recommendation are improved.

CN119513353AInactive Publication Date: 2025-02-25NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411567076.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2025-02-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing emotional music recommendation models based on deep learning rely on large-scale annotated emotional data sets. However, in practical applications, music data with emotional labels are very scarce, which makes the model prone to overfitting or insufficient generalization ability during training, resulting in low accuracy of music recommendation in complex situations.

Method used

By obtaining emotional tags corresponding to multiple original music data required for the educational scene and inputting these tags into the music generation model of the generative adversarial network, multiple generated music data are generated. These generated music data are fused with the original music data to form a fusion database for training music recommendation models.

Benefits of technology

By adding music data with emotional labels, the generalization ability of the model is improved, and the accuracy of music recommendation in complex situations is significantly improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119513353A_ABST
    Figure CN119513353A_ABST
Patent Text Reader

Abstract

The invention discloses a music recommendation method and device for an education scene, equipment and a medium, and relates to the technical field of music recommendation, and the method comprises the following steps: obtaining emotion tags corresponding to a plurality of original music data required by the education scene; adding a convolution transpose layer behind a remodeling layer of a generator of the generative adversarial network, adding a decoding layer behind an output layer, and training the generative adversarial network to obtain a music generation model; inputting the emotion label into a music generation model to obtain corresponding generated music data; fusing the multiple pieces of generated music data with the multiple pieces of original music data to obtain a fused database; and training the music recommendation model through the fusion database, and recommending music to the user through the trained music recommendation model. According to the method, the music data with emotion labels are greatly increased, the music recommendation model is trained by fusing the database, and due to the increase of the input data, the music recommendation accuracy in a complex situation is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of music recommendation, and in particular to a music recommendation method, device, equipment and medium for educational scenarios. Background Art

[0002] Music plays a significant role in promoting cognitive ability and emotional expression. Therefore, in the education process, understanding and utilizing students' music preferences can effectively enhance the learning experience. For example, by analyzing students' learning status and emotions, the music recommendation system can select appropriate music to help them concentrate or relax, thereby improving learning efficiency. The application of music recommendation in education is not limited to the optimization of music selection, but also a deep understanding of cognition, emotion and behavior. This multidisciplinary integration can help the development of educational technology, provide students with more personalized and intelligent learning support, and show the broad application prospects of music recommendation in the field of education.

[0003] With the rapid development of artificial intelligence technology, personalized recommendation systems have been widely used in many fields such as music, film and television, and social networking. Among them, music recommendation, as an important part of the user's entertainment experience, has received a lot of research and practical attention. Traditional music recommendation methods usually make recommendations based on the user's historical behavior, music genres, and content characteristics. However, these methods are difficult to capture the emotional needs of users in different situations. Since music itself is a carrier of emotional expression, different users have different emotional preferences at different times and in different environments, making it difficult for traditional recommendation methods to accurately match the user's emotional state. In addition, with the continuous expansion of the scale of music libraries, how to quickly and accurately recommend music that matches the user's emotions from a large amount of music data has become an urgent problem to be solved.

[0004] In order to meet the challenges of personalized needs and emotional states of users, music emotion recommendation methods based on deep learning have gradually become a research hotspot in recent years. Such methods can better capture the emotional characteristics of music by deeply mining music features, especially using audio feature representations such as Mel-frequency cepstrum, combined with convolutional neural networks (CNN) for feature extraction. At the same time, the long short-term memory network (LSTM) is used to process the time series data of music, so that the model can extract emotional information from the dynamic changes of music and recommend music based on this emotional information. These technical solutions have effectively improved the accuracy of music recommendations, especially in processing users' real-time emotional states.

[0005] In summary, although the existing emotional music recommendation system has achieved certain results in emotion recognition and personalized recommendation, there are still some obvious shortcomings. Most emotional music recommendation models based on deep learning rely on large-scale labeled emotion datasets. However, in practical applications, music data with emotion labels is very scarce, which makes the model prone to overfitting or insufficient generalization during training, resulting in low accuracy of music recommendation in complex situations. Summary of the invention

[0006] The present invention provides a music recommendation method, device, equipment and medium for educational scenarios, which solves the problem that most existing deep learning-based emotional music recommendation models rely on large-scale labeled emotional data sets, but in practical applications, music data with emotional labels is very scarce, resulting in low accuracy of music recommendations in complex situations.

[0007] In a first aspect, the present invention provides a music recommendation method for an educational scenario, comprising the following steps:

[0008] Obtain emotional labels corresponding to multiple original music data required for educational scenarios;

[0009] A convolutional transposition layer is added after the reshaping layer of the generator of the generative adversarial network, a decoding layer is added after the output layer, and the generative adversarial network is trained to obtain a music generation model;

[0010] The emotion label is input into the music generation model, and the shape of the emotion label is reshaped through the reshaping layer; the reshaped emotion label is upsampled through the convolution transpose layer to obtain the corresponding generated Mel cepstrum; the generated Mel cepstrum is output through the output layer; the generated Mel cepstrum is decoded through the decoding layer to obtain the corresponding generated music data;

[0011] A plurality of generated music data are fused with a plurality of original music data to obtain a fused database; a music recommendation model is trained through the fused database, and music is recommended to users through the trained music recommendation model.

[0012] Preferably, the acquisition of emotion labels corresponding to a plurality of original music data required for the educational scenario includes:

[0013] Applying discrete Fourier transform to the original music data to obtain the Mel-cepstrum of the original music data;

[0014] Add LSTM layer and attention layer to CNN layer to get sentiment classification module;

[0015] The Mel-ceptorgram is input into the sentiment classification module, and the Mel-ceptorgram is subjected to feature extraction through the CNN layer to obtain audio features. The audio features are subjected to time series processing through the LSTM layer to obtain time series features. The time series features are weighted and mapped through the attention layer to obtain mapping results. The mapping results are classified into corresponding sentiment labels through the output layer.

[0016] Preferably, the generative adversarial network further includes a discriminator, the discriminator includes an input layer, a convolution layer and a fully connected layer, the input layer input generates a mel cepstrum or a real mel cepstrum; the convolution layer extracts the spatial features of the generated mel cepstrum or the real mel cepstrum; the fully connected layer generates a real value for the spatial features, the real value represents the probability of the real mel cepstrum or the generated mel cepstrum;

[0017] The generative adversarial network is trained by alternating between the generator and the discriminator, and optimizing with binary cross entropy loss.

[0018] Preferably, the music recommendation model includes an input layer, a hidden layer and an output layer, and the training of the music recommendation model by fusing the database includes:

[0019] Input the user's emotional state and multiple music data in the fusion database through the input layer;

[0020] Extracting the emotional labels and associated features of the emotional states corresponding to the multiple music data through the hidden layer;

[0021] The output layer predicts the user's preference for each music data based on the associated features.

[0022] Preferably, the performing of music recommendations to users through the trained music recommendation model includes:

[0023] Collecting multimodal physiological data of the user and performing feature extraction; the multimodal physiological data includes heart rate data, skin resistance data and facial expression;

[0024] Input the extracted multiple features into the sentiment classification model to obtain the user's sentiment state;

[0025] The trained music recommendation model is used to match the user's emotional state with multiple music data in the fusion database to recommend music to the user.

[0026] Preferably, the sentiment classification model includes a fusion layer, a fully connected layer and an output layer. The fusion layer is used to merge multiple features to obtain merged features; the fully connected layer is used to map the merged features to obtain the probabilities of different sentiment states; and the output layer is used to output the probabilities of different sentiment states.

[0027] In a second aspect, the present invention provides a music recommendation device, comprising:

[0028] An acquisition module, used to acquire emotion labels corresponding to a plurality of original music data required for an educational scenario;

[0029] A generation module is used to add a convolutional transposition layer after the reshaping layer of the generator of the generative adversarial network, add a decoding layer after the output layer, and train the generative adversarial network to obtain a music generation model;

[0030] The input module is used to input the emotion label into the music generation model, reshape the shape of the emotion label through the reshaping layer; upsample the reshaped emotion label through the convolution transpose layer to obtain the corresponding generated Mel cepstrum; output the generated Mel cepstrum through the output layer; decode the generated Mel cepstrum through the decoding layer to obtain the corresponding generated music data;

[0031] The recommendation module is used to fuse multiple generated music data with multiple original music data to obtain a fused database; train a music recommendation model through the fused database, and recommend music to users through the trained music recommendation model.

[0032] In a third aspect, the present invention provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned music recommendation method for educational scenarios when executing the program.

[0033] In a fourth aspect, the present invention provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned music recommendation method for educational scenarios is implemented.

[0034] Compared with the prior art, the present invention has the following beneficial effects:

[0035] In order to solve the problem that most deep learning-based emotional music recommendation models rely on large-scale labeled emotional data sets, the present invention proposes a music recommendation method for educational scenarios. First, the emotional labels corresponding to multiple original music data required for the educational scenario are obtained, and the emotional labels are input into the music generation model to generate multiple generated music data, which greatly increases the music data with emotional labels, and the multiple generated music data are fused with multiple original music data to obtain a fusion database. Finally, the music recommendation model is trained through the fusion database. Due to the increase in input data, the generalization ability of the model is improved, and the accuracy of music recommendation in complex situations is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0037] Figure 1 A flowchart of a music recommendation method for an educational scenario according to the present invention;

[0038] Figure 2 A diagram of the music emotion classification and music generation system of the present invention;

[0039] Figure 3 It is a structural schematic diagram of the music recommendation method of the present invention;

[0040] Figure 4 A flowchart of music emotion intervention and refreshing aesthetic education according to an embodiment of the present invention;

[0041] Figure 5 This is a flowchart of the artificial intelligence music recommendation and recommendation system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0042] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0043] A music recommendation method for educational scenarios, referring to Figure 1 , including the following steps:

[0044] Step 1: Obtain multiple original music data required for the educational scenario.

[0045] Mel-frequency cepstrum (MFCC) is used as feature input for the original music data to extract audio features related to music emotions. The size of each extracted feature map is 120*120. After applying the discrete Fourier transform (DFT) to the audio signal, the resulting Mel-frequency cepstrum represents the frequency on the horizontal axis and the amplitude on the vertical axis.

[0046] Mel cepstral coefficients are a type of spectral features that are more consistent with the characteristics of the human auditory system by simulating the human ear's perception of sound frequencies. This allows MFCC to better capture important information in audio in music emotion processing. MFCC achieves dimensionality reduction of audio information by mapping frequency domain data to a lower-dimensional coefficient representation. This helps reduce computational complexity and remove redundant information, improving processing efficiency. Mel cepstral graphs focus on the short-term features of audio, which makes it more sensitive to instantaneous changes in audio. In music emotion processing, short-term features are crucial to capturing emotional changes and expressions in music. The extraction process of Mel cepstral coefficients simulates the way the human ear perceives sound frequencies, so it is more consistent with the working principle of the human auditory system. Such characteristics help improve the interpretability and effectiveness of audio features.

[0047] Step 2: Input the Mel-frequency cepstrum data into the emotion classification module to obtain the emotion label corresponding to the original music data.

[0048] Reference Figure 2 ,This paper builds a music sentiment classification model that integrates CNN, LSTM and attention mechanism.

[0049] The sentiment classification module includes an input layer, a CNN layer, an LSTM layer, an attention layer, and an output layer. The input layer is used to input the Mel-cepstrogram of the music file. The CNN layer is used to extract features from the input Mel-cepstrogram to obtain audio features. It includes two 2D convolutional layers and a maximum pooling layer. The first 2D convolutional layer includes 32 filters, a kernel size of (3,3), a stride of (1,1), and an activation function using ReLU. The second 2D convolutional layer includes 64 filters, a kernel size of (3,3), a stride of (1,1), and an activation function using ReLU. The pooling window size of the maximum pooling layer is (2,2) and a stride of (2,2). The LSTM layer is used to perform temporal processing on the features extracted by the CNN layer from the Mel-cepstrogram, thereby capturing the change information of the music in the time dimension. It contains a single-layer LSTM with 128 units. The attention layer is a custom attention layer that calculates the attention weight according to each time step of the LSTM output and outputs a weighted context vector. The role of the attention layer in the system is to automatically focus on key features or time points, optimize the model's sentiment classification ability, and improve the accuracy of music recommendations. The output layer is a fully connected layer that uses the Softmax activation function to classify different sentiment labels.

[0050] Step 3: Input the emotion label corresponding to the original music data into the music generation model to obtain generated music data.

[0051] Refer again Figure 2The emotional music generation module of the present invention includes a generator and a discriminator. The generator includes an input layer, a reshaping layer, a convolution transpose layer, an output layer and a decoding layer. The input layer is used to input a 100-dimensional noise vector and an emotional label encoding. The first layer is a dense layer, including 1024 units, activated by ReLU. The reshaping layer reshapes the input into a dimension suitable for the convolution operation. The main function of the reshaping layer is to adjust the shape of the data so that it matches the input requirements of the subsequent layers in the model. This is a very common step in the structure of neural networks, especially in generative models, for mapping low-dimensional features to high-dimensional space, thereby generating complex output data (such as Mel-cephalograms of music).

[0052] The convolutional transpose layer consists of three layers, of which the first convolutional transpose layer includes 256 filters, a kernel size of (5,5), a stride of (2,2), and ReLU activation. The second convolutional transpose layer includes 128 filters, a kernel size of (5,5), a stride of (2,2), and ReLU activation. The third convolutional transpose layer includes 64 filters, a kernel size of (5,5), a stride of (2,2), and ReLU activation. The function of the convolutional transpose layer is to upsample and generate a high-dimensional music spectrogram. It converts low-dimensional emotional labels or feature information into spectrograms that conform to the audio structure, so that the decoding layer can generate corresponding music based on the emotional labels.

[0053] The output layer is a convolutional layer, which includes 1 filter, kernel size is (5,5), stride is (1,1), uses Tanh activation, and outputs the generated Mel cepstral map.

[0054] The discriminator includes an input layer, a convolutional layer, and a fully connected layer. The input layer is used to input the Mel cepstral map. The convolutional layer includes two 2D convolutional layers, where the first 2D convolutional layer includes 64 filters, a kernel size of (3,3), a stride of (2,2), and uses LeakyReLU activation (negative slope of 0.2). The second 2D convolutional layer includes 128 filters, a kernel size of (3,3), a stride of (2,2), and uses LeakyReLU activation (negative slope of 0.2). The role of the convolutional layer in this music recommendation method is to extract spatial features from audio data (Mel cepstral map), help the model identify patterns related to emotions, and ultimately provide important feature input for subsequent emotion classification or music generation. The fully connected layer is used to output a real value representing the probability of a real or generated spectrogram.

[0055] The generator and discriminator are trained alternately and optimized using the binary cross entropy loss to ensure that the generator can generate realistic music and the discriminator can effectively distinguish between real and generated music.

[0056] A plurality of generated music data of the music generation model is fused with a plurality of original music data to obtain a fused database.

[0057] Step 4: Train the music recommendation model by integrating the database.

[0058] The music recommendation model of the present invention includes an input layer, a hidden layer and an output layer. The input layer is used to input the user's emotional state and multiple music data. The hidden layer is a multi-layer perceptron (MLP) for processing complex nonlinear relationships and optimizing recommendation results. The role of the hidden layer in the music recommendation system is to gradually process and extract input features. Through multi-level nonlinear transformations, the model is helped to learn useful associated features from complex Mel-cepstrum data and user emotional state data, providing support for the final emotional classification and music recommendation. The output layer is used to predict the user's preference for each piece of music data.

[0059] Step 5: Collect the user's multimodal physiological data and perform feature extraction.

[0060] Multimodal emotion recognition is performed using portable wearable devices such as smart bracelets to detect modal features such as heart rate, skin resistivity, and facial expressions, to gain a more comprehensive understanding of an individual's emotional state.

[0061] Data collection includes heart rate monitoring, skin resistance monitoring, and facial expression recognition. A heart rate sensor is used to continuously monitor heart rate changes. The acceleration and deceleration of heart rate can reflect the individual's emotional excitement or relaxation. A GSR sensor is used to detect changes in skin resistance, which changes with increased sweat gland activity and is closely related to emotional excitement. A camera is used to capture facial expressions, and a facial expression recognition algorithm is used to analyze subtle changes in facial muscles, which are usually associated with specific emotional states.

[0062] The first extraction model is used to extract features from the heart rate and GSR signals, which specifically includes an input layer, a normalization layer, and a time series feature extraction layer. The input layer is used to receive the heart rate and GSR data collected from the sensor. Normalization layer: Normalize the heart rate and GSR data to standardize the input. The heart rate and GSR signals are filtered to remove noise and normalize the data for subsequent analysis. The time series feature extraction layer includes LSTM layer 1 and LSTM layer 2, where LSTM layer 1 includes 64 units for returning the entire sequence. LSTM layer 2 includes 64 units and returns the last output of the sequence. The time series feature extraction layer extracts features from the heart rate and GSR data in the time domain and frequency domain to obtain SDNN (standard deviation of NN intervals) and mean skin conductivity level (Mean SCL, Skin Conductance Level). Lower SDNN is usually associated with stress and anxiety. Higher SCL is usually associated with increased emotional arousal and increased stress. These features are used to capture physiological responses under emotional states and provide support for emotion recognition and personalized music recommendations.

[0063] The facial expression feature extraction is performed through the second extraction model, which specifically includes an input layer and a convolution layer. After preprocessing, the structured features or vector representations are extracted from the original facial image. The input layer is used to receive the preprocessed facial image data. The convolution layer includes convolution layer 1, pooling layer 1, convolution layer 2, pooling layer 2, convolution layer 3, pooling layer 3, flattening layer and fully connected layer. Convolution layer 1 includes 32 filters, the kernel size is (3x3), and the activation function uses ReLU. Pooling layer 1 is maximum pooling, and the pooling window is (2x2). Convolution layer 2 includes 64 filters, the kernel size is (3x3), and the activation function uses ReLU. Pooling layer 2 is maximum pooling, and the pooling window is (2x2). Convolution layer 3 includes 128 filters, the kernel size is (3x3), and the activation function uses ReLU. Pooling layer 3 is maximum pooling, and the pooling window is (2x2). The flattening layer is used to flatten the multi-dimensional output into one-dimensional data. The fully connected layer consists of 256 units, and the activation function uses ReLU.

[0064] Features extracted from facial images can include geometric features (facial key points, relative positions, angles, etc.), texture features (LBP, HOG, Gabor filtering, etc.), deep learning features (high-dimensional feature vectors extracted by CNN), action unit features (AU), and time series features. These features are used for emotion recognition and expression analysis to help the system better understand the emotional state corresponding to facial expressions.

[0065] Step 5: Input the extracted multiple features into the sentiment classification model to obtain the user's emotional state.

[0066] The features of heart rate, GSR and facial expression are fused through a fusion module. The present invention designs a multi-layer neural network, such as a long short-term memory network (LSTM) or a multi-layer perceptron (MLP), to process time series data and fuse features to classify the emotional state of an individual. Specifically, it includes a fusion layer, a fully connected layer and an output layer. The fusion layer is used to merge the feature vectors of heart rate, GSR and facial expression. The fully connected layer includes a fully connected layer 1 and a fully connected layer 2. Fully connected layer 1 includes 512 units, and the activation function uses ReLU. Fully connected layer 2 includes 256 units, and the activation function uses ReLU. The output layer uses the Softmax activation function to output the probabilities of different emotional states. The main function of the fully connected layer is to further integrate and transform the data that has been previously feature extracted and processed, and finally output a decision signal for sentiment classification or recommendation system. It is a key step in mapping complex multi-layer features into simple classification results.

[0067] The system will provide real-time emotional state output, such as happiness, sadness, anger, surprise, etc. At the same time, it will provide an API or user interface so that other systems or researchers can easily obtain the results of sentiment analysis.

[0068] Step 6: Use the music recommendation model to match the user's emotional state with multiple emotional tags, search for the corresponding music in the fusion music library based on the matching results, and recommend music to the user.

[0069] Given the user's current emotional state (derived from multimodal emotion recognition), the system searches the fused music library to find songs with matching emotional tags. If there are multiple matching options in the library, they can be further filtered using factors such as user historical preferences and popularity. If there are no perfectly matching songs in the existing music library, the GAN model mentioned earlier can be used to generate new music based on the user's emotional state. The system will recommend a series of songs to the user based on the emotional matching results.

[0070] The recommendation list can be optimized based on the user's past preferences and feedback. Users can provide feedback when playing recommended songs, such as like, dislike or ignore. This feedback will be used to adjust future recommendations, making the system more accurately match the user's emotional needs.

[0071] The data input layer is used to input user emotion tags, user history data, and music library metadata. The user emotion tags are the current user emotion state obtained from the multimodal emotion recognition system. User history data includes the user's previous music selections, ratings, and other forms of feedback. The music library metadata contains information such as emotion tags, genres, and artists for all songs in the existing music library. The feature extraction layer is used to process user history data and extract key features, such as frequently listened music types, emotional preferences, etc.

[0072] After each user feedback, the user portrait is dynamically updated to reflect their latest music preferences and emotional needs.

[0073] Example

[0074] Reference Figure 3 ,The system architecture fully complies with the design concept of non-invasive experience, and the wearable device transmits the measured ,signals to the smart device. The smart device integrates the physiological data ,signals, music elements and emotion classifiers into an algorithm to recommend / generate suitable ,music for individuals.

[0075] Reference Figure 4 In recent years, as the core area of ​​music education and evaluation: the provincial unified examination for art majors (taking Jiangsu Province as an example), its sight-singing, ear-training and vocal majors have been changed to a cappella to avoid unfair human scoring. However, the music evaluation system (music emotion retrieval framework) of artificial intelligence can assist expert teachers in evaluation. At this stage, the technology can accurately identify the spectrum features such as pitch, intensity and rhythm. As the most critical factor in the personalized expression of music, emotion recognition is currently the bottleneck of artificial intelligence-assisted evaluation and education. The present invention can use the emotion recognition framework of AI Harmony Edu Sens to assist in evaluation to avoid the unfairness of human scoring. As a result, candidates do not have to sing a cappella to express music to the maximum extent, and can also avoid unfair evaluation to the maximum extent during the evaluation process.

[0076] Reference Figure 5, emotion recognition technology plays multiple roles in the field of music education, providing a profound impact on learning and teaching. First, by analyzing students' emotional state when learning music, emotion recognition makes personalized learning experience possible. This means that music educators can adjust emotional intervention and aesthetic education content according to students' individual responses to different musical emotional elements, and provide a learning experience that is closer to students' interests and emotional experiences. Educators can guide students to learn how to express emotions through music in a more targeted manner, making the performance richer and more profound. In addition, real-time emotional feedback provides an effective tool for students to adjust their learning strategies and improve their learning effects. It also helps to pay attention to students' mental health, timely discover and respond to possible psychological pressures, and achieve immersive aesthetic education. Finally, the application of emotion recognition technology provides music educators with the opportunity to explore innovative teaching methods, design more interesting and emotional music learning activities, and promote music education to develop in a more interactive and personalized direction. This comprehensive use of emotion recognition technology not only enhances the depth and personalization of music learning, but also brings broader prospects for the future development of music education.

[0077] Based on the same concept, the present invention also provides a music recommendation device, including an acquisition module, a generation module, an input module and a recommendation module.

[0078] The acquisition module is used to obtain the emotion labels corresponding to multiple original music data required for the educational scenario.

[0079] The generation module is used to add a convolutional transpose layer after the reshaping layer of the generator of the generative adversarial network, add a decoding layer after the output layer and train the generative adversarial network to obtain a music generation model.

[0080] The input module is used to input the emotion label into the music generation model, reshape the emotion label through the reshaping layer; upsample the reshaped emotion label through the convolution transpose layer to obtain the corresponding generated Mel-ceptorgram; output the generated Mel-ceptorgram through the output layer; and decode the generated Mel-ceptorgram through the decoding layer to obtain the corresponding generated music data.

[0081] The recommendation module is used to fuse multiple generated music data with multiple original music data to obtain a fused database; train a music recommendation model through the fused database, and recommend music to users through the trained music recommendation model.

[0082] The present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned music recommendation method for educational scenarios when executing the program.

[0083] The present invention also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned music recommendation method for educational scenarios is implemented.

[0084] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0085] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A music recommendation method for educational scenarios, characterized in that: The following steps are involved: Obtain emotional labels corresponding to multiple original music data required for educational scenarios; A convolutional transposition layer is added after the reshaping layer of the generator of the generative adversarial network, a decoding layer is added after the output layer, and the generative adversarial network is trained to obtain a music generation model; The emotion label is input into the music generation model, and the shape of the emotion label is reshaped through the reshaping layer; the reshaped emotion label is upsampled through the convolution transpose layer to obtain the corresponding generated Mel cepstrum; the generated Mel cepstrum is output through the output layer; the generated Mel cepstrum is decoded through the decoding layer to obtain the corresponding generated music data; Merging the plurality of generated music data with the plurality of original music data to obtain a fused database; The music recommendation model is trained by integrating the database, and music is recommended to users through the trained music recommendation model.

2. A music recommendation method for educational scenarios as claimed in claim 1, characterized in that: The method of obtaining emotion labels corresponding to a plurality of original music data required for the educational scenario includes: Applying discrete Fourier transform to the original music data to obtain the Mel-cepstrum of the original music data; Add LSTM layer and attention layer to CNN layer to get sentiment classification module; The Mel-ceptorgram is input into the sentiment classification module, and the Mel-ceptorgram is subjected to feature extraction through the CNN layer to obtain audio features. The audio features are subjected to time series processing through the LSTM layer to obtain time series features. The time series features are weighted and mapped through the attention layer to obtain mapping results. The mapping results are classified into corresponding sentiment labels through the output layer.

3. A music recommendation method for educational scenarios as claimed in claim 1, characterized in that: The generative adversarial network also includes a discriminator, which includes an input layer, a convolution layer and a fully connected layer. The input layer generates a mel cepstrum or a real mel cepstrum; the convolution layer extracts the spatial features of the generated mel cepstrum or the real mel cepstrum; the fully connected layer generates a real value for the spatial features, and the real value represents the probability of the real mel cepstrum or the generated mel cepstrum; The generative adversarial network is trained by alternating between the generator and the discriminator, and optimizing with binary cross entropy loss.

4. A music recommendation method for educational scenarios as claimed in claim 1, characterized in that: The music recommendation model includes an input layer, a hidden layer and an output layer. The training of the music recommendation model by integrating the database includes: Input the user's emotional state and multiple music data in the fusion database through the input layer; Extracting the emotional labels and associated features of the emotional states corresponding to the multiple music data through the hidden layer; The output layer predicts the user's preference for each music data based on the associated features.

5. A music recommendation method for educational scenarios as claimed in claim 1, characterized in that: The step of recommending music to the user through the trained music recommendation model includes: Collecting multimodal physiological data of the user and performing feature extraction; the multimodal physiological data includes heart rate data, skin resistance data and facial expression; Input the extracted multiple features into the sentiment classification model to obtain the user's sentiment state; The trained music recommendation model is used to match the user's emotional state with multiple music data in the fusion database to recommend music to the user.

6. A music recommendation method for educational scenarios as claimed in claim 5, characterized in that: The sentiment classification model includes a fusion layer, a fully connected layer and an output layer, wherein the fusion layer is used to merge multiple features to obtain a merged feature; The fully connected layer is used to map the merged features to obtain the probabilities of different emotional states; the output layer is used to output the probabilities of different emotional states.

7. A music recommendation device, characterized in that: include: An acquisition module, used to acquire emotion labels corresponding to a plurality of original music data required for an educational scenario; A generation module is used to add a convolutional transposition layer after the reshaping layer of the generator of the generative adversarial network, add a decoding layer after the output layer, and train the generative adversarial network to obtain a music generation model; The input module is used to input the emotion label into the music generation model, reshape the shape of the emotion label through the reshaping layer; upsample the reshaped emotion label through the convolution transpose layer to obtain the corresponding generated Mel cepstrum; output the generated Mel cepstrum through the output layer; decode the generated Mel cepstrum through the decoding layer to obtain the corresponding generated music data; A recommendation module, used for fusing the plurality of generated music data with the plurality of original music data to obtain a fused database; The music recommendation model is trained by integrating the database, and music is recommended to users through the trained music recommendation model.

8. A computer device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the music recommendation method for educational scenarios described in any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the music recommendation method for educational scenarios described in any one of claims 1 to 6 is implemented.