Music generation method based on artificial intelligence and deep learning improved algorithm

By introducing a music generation method based on artificial intelligence and deep learning into the music recommendation system, it solves the problem that traditional music recommendation systems are difficult to face complex user interests and diverse music types, and realizes automatic and personalized recommendations for music creation, improving user experience.

CN119513354AInactive Publication Date: 2025-02-25胡静媛
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Traditional music recommendation systems are based on collaborative filtering and content filtering methods, making it difficult to effectively face complex user interests and diverse music types.

Method used

The music generation method based on artificial intelligence and deep learning improved algorithms is adopted to analyze and understand a large amount of music data through machine learning, generate new music works, and use deep learning algorithms to explore correlations from users' historical behaviors and the audio characteristics of music to improve the accuracy and personalization of music recommendations.

Benefits of technology

It realizes the automation of music creation, improves the accuracy and personalization of music recommendations, meets users' personalized needs, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119513354A_ABST
    Figure CN119513354A_ABST
Patent Text Reader

Abstract

The invention discloses a music generation method based on artificial intelligence and a deep learning improved algorithm, and the method comprises the following steps: 1, the first music generation, 2, the second music generation, and 3, the music determination. The artificial intelligence technology is combined with the music creation, the automation of the music creation is realized, and the music generation efficiency is improved. An efficient creation tool is provided for a music creator, and the development of music creation is promoted; a big data set is used for learning and generation, laws and modes of music are analyzed more accurately, and music works better meeting aesthetic needs of human beings are generated; the user demand is used as an important reference basis for creation, so that the user can customize music works meeting the user demand; research based on the deep mixed recommendation type music recommendation system aims to utilize a deep learning algorithm to mine deeper relevance from historical behaviors of a user and audio features of music, and has important theoretical and practical significance in improving user experience.
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 generation, and in particular to a music generation method based on artificial intelligence and an improved deep learning algorithm. Background Art

[0002] In this rapidly changing digital age, artificial intelligence is infiltrating into every aspect of our lives with an unstoppable momentum, leaving its profound mark from the forefront of science and technology to the halls of art. With the popularization of music streaming platforms and the explosive growth of music content, users are faced with more and more music choices, and personalized music recommendations for users have become an important issue.

[0003] With the continuous development and application of artificial intelligence technology, its application in various fields is becoming increasingly extensive. In the field of music, the introduction of artificial intelligence technology also has huge potential and advantages. Traditional music creation often requires human composers to go through a long period of learning and accumulation to reach a certain level of creation. The intelligent music creation and generation system based on artificial intelligence greatly improves the efficiency and quality of creation. The music melody generation algorithm gives the machine the ability to generate melodies. It is the application of artificial intelligence in the field of art. It can be used to assist musicians in their creation and provide them with new creative ideas.

[0004] However, traditional music recommendation has the following disadvantages:

[0005] Traditional music recommendation systems are based on collaborative filtering and content filtering methods, but they have certain limitations when faced with complex user interests and diverse music types. Summary of the invention

[0006] The purpose of the present invention is to provide a music generation method based on artificial intelligence and deep learning improved algorithm to solve the problem that the traditional music recommendation system proposed in the above background technology is mainly based on collaborative filtering and content filtering methods, but has certain limitations when facing complex user interests and diverse music types.

[0007] To achieve the above object, the present invention provides the following technical solution: a music generation method based on artificial intelligence and deep learning improved algorithm, comprising the following steps:

[0008] Step 1: First music generation: AI-based music generation technology uses machine learning to "simulate" the process of music creation, and sets up a music generation model to train computers to analyze and understand a large amount of music data, so as to determine the structure and form of music, thereby generating new music works and completing the first music generation;

[0009] Step 2: Second music generation: Use deep learning algorithms to dig deeper into the correlation between the user's historical behavior and the audio features of the music, improve the accuracy and personalization of music recommendations, and perform a second music generation;

[0010] Step 3: Music determination: Combine the first music generation content and the second music generation content to merge the same content and determine the final music.

[0011] As a preferred technical solution of the present invention, the machine learning in step one is specifically based on the analysis and induction of data. The data is that the implementation of music generation technology relies on a large amount of music data. These data come from music professionals or world-renowned musicians. Their creative achievements become training data for machine learning after digital processing.

[0012] As a preferred technical solution of the present invention, the specific steps of the first music generation in step one are: S1, data collection and processing: collect a large number of music works from the Internet and other relevant resources, including music of various styles and types. Subsequently, these data need to be processed and cleaned to ensure the quality and accuracy of the data; S2, feature extraction and analysis: after the data processing is completed, we will use machine learning algorithms to extract and analyze the features of the music data, and analyze the pitch, rhythm, and chord features of the music to reveal the laws and patterns in music creation; S3, model design and training: based on the extracted music features, an intelligent music generation model will be designed and trained. The model learns and understands the components of music, and generates new music works based on the learned knowledge; S4, generate system interface: in order to allow users to conveniently use the intelligent music creation and generation system, a friendly user interface is designed; S5, user experience: users select music types, styles and other creation parameters through the system interface to obtain music works that meet personal needs.

[0013] As a preferred technical solution of the present invention, the machine learning in step 1 includes a music genre classification algorithm and an audio analysis algorithm based on deep learning. The specific process of calculating the music genre classification algorithm is as follows: S1. Creating an audio data set: obtaining audio data from music playback software and short video platforms through a crawler method, and performing format conversion and wavelet threshold denoising operations; S2. Extracting feature information: designing a method to extract spectral features to maximize the fit to the human ear's auditory system; S3. Designing a classification algorithm: selecting a suitable network model structure for optimization, such as the Inception module in the GoogLeNet network model, and optimizing the network model in combination with the BN layer and the residual connection. The specific process of calculating the audio analysis algorithm is as follows: S1. Fourier transform: converting the time domain signal into the frequency domain signal and analyzing the frequency structure of the signal; S2. Signal sampling: converting the continuous time signal into a discrete time signal, and then performing amplitude quantization to convert it into a discrete digital signal; S3. Audio analysis method: understanding the performance and characteristics of the audio device by analyzing the input signal and the output signal. The specific chord quantization expression of the audio analysis algorithm is: Where: x represents the value of the chord, n represents the total number of interval groups paired in the current chord, and m represents the value of different intervals. Its value is based on the relevant composition knowledge and the difference in consonance. The higher the consonance, the lower the value; ω represents the weight of the relative position of the interval. When the relative positions of the two notes are closer to the bottom, the weight will be greater. It is worth noting that when the root note of the chord is the tonic, this chord is called the tonic chord. The tonic chord has the function of stabilizing the tonality in tonal music. Therefore, the value of the tonic chord in the formula is reduced by dividing it by a constant value ɑ, or the chord connection is quantified as follows: Where: μ represents the relative distance between two root notes on the fifth circle. For example, the μ value from root C to root G is 1, and the μ value from root C to root B is 5. The harmony in the harmony dataset is used as expert data, and the IRL pre-trained harmony generation model is used to optimize the strategy by constructing a reward function R. The specific calculation formula is: During the training process, the expected return is updated using the Q target network as the learning target, and the loss function is expressed as:

[0014]

[0015] As a preferred technical solution of the present invention, the music generation model in step one is based on a generation model of a neural network, specifically, the generator is responsible for generating new music works, and the discriminator is used to evaluate the quality of the generated music works. The generator and the discriminator compete and learn with each other through adversarial learning, and finally generate high-quality music works. Common neural network structures include recurrent neural networks and variational autoencoders, which are respectively used to capture the temporal dependencies in music sequences and learn the potential distribution of music data.

[0016] As a preferred technical solution of the present invention, the specific process of the second music generation in step 2 is: S1. Recommendation algorithm: the basic principle of the user-based collaborative filtering recommendation algorithm is to make recommendations by mining the association rules between users; S2. Deep learning: deep learning through convolutional neural networks; S3. Detection and correction: the music generation and recommendation results are detected and corrected through a large amount of data reciprocating experiments.

[0017] As a preferred technical solution of the present invention, the convolutional scaling network is mainly composed of an input layer, a convolutional layer, a pooling layer, a fully connected layer and an output layer, wherein the convolutional layer reduces the dimension of the data through a convolution operation, and the pooling layer further compresses the amount of data and parameters while retaining the main features. In image processing, the image is converted into one-dimensional data and input into the network, and after a series of convolution and pooling operations, it is finally output through a fully connected layer or a softmax classifier. The full convolutional network serves as a convolutional neural network block, and it inputs the input Mel spectrum map as a feature into the full convolutional network, continuously extracts relevant features through convolution and pooling operations, and finally uses the softmax classifier of the output layer to output the result, and optimizes the network parameters through iterative training, and saves the trained model locally to process the music frequency. When extracting music spectrum data, convolutional neural networks often ignore the time series correlation in the data. However, the music spectrum contains a lot of contextual content. In order to better capture these correlations, recurrent neural networks are used for processing. Recurrent neural networks have the characteristics of memory and parameter sharing. Memory means that it processes short-term memory, and parameter sharing means that at each time step, the corresponding parameters are shared. For the feature extraction of music spectrum, the context correlation cannot be ignored. Therefore, it is necessary to introduce recurrent neural networks into the feature extraction model. Through recurrent neural networks, the deep features of Mel spectrum are obtained to better capture the time series correlation in music data. Such a model effectively extracts the features of music and provides more accurate and meaningful input for subsequent tasks such as music classification and music generation.

[0018] As a preferred technical solution of the present invention, the specific process of the detection and correction is as follows: S1, data set: using the API interface of the music streaming platform to obtain the user's historical play records and preference tag information, collecting music audio files through the Internet, and using the audio processing library to extract audio features;

[0019] S2. Establishing the experimental environment: Using the hardware environment of Core i5 processor and NVIDIA GeForce GTX 3060, combined with the software environment of PyTorch and Python, we can efficiently conduct experiments on denoising autoencoders and improve the performance and accuracy of the recommendation system. Through the combination of this hardware environment and software environment, we can make full use of the computer's computing power and GPU acceleration to improve the efficiency and speed of the training process. As a powerful deep learning framework, PyTorch provides rich functions and easy-to-use APIs to easily build, train and optimize denoising autoencoder models. S3. Experiment and result analysis: Using root mean square error and recall rate as evaluation indicators, a comprehensive evaluation of hybrid recommendations was conducted. RMSE is used to measure the prediction accuracy of the recommendation model for user ratings, while the recall rate evaluates the model's ability to include items of real interest to users in the recommendation list. By comprehensively considering these two indicators, the performance of the hybrid recommendation model in terms of accuracy and coverage is comprehensively evaluated to help determine the pros and cons and applicability of the model.

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

[0021] Combine artificial intelligence technology with music creation to automate music creation, provide music creators with efficient creation tools, and promote the development of music creation; use large data sets for learning and generation to more accurately analyze the laws and patterns of music and generate music works that better meet human aesthetic needs; use user needs as an important reference for creation, allowing users to customize music works that meet their needs by setting creation parameters, selecting music types and styles;

[0022] The research on music recommendation system based on deep learning aims to use deep learning algorithms to explore deeper correlations from users' historical behaviors and the audio features of music, improve the accuracy and personalization of music recommendations, improve the effectiveness of music recommendation systems, and enhance user experience, which has important theoretical and practical significance. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 is a flow chart of the present invention;

[0024] Figure 2 A flowchart of the first music generation of the present invention;

[0025] Figure 3 is a calculation flow chart of the music genre classification algorithm of the present invention;

[0026] Figure 4 is a calculation flow chart of the audio analysis algorithm of the present invention;

[0027] Figure 5 A flowchart of the second music generation of the present invention;

[0028] Figure 6 This is a diagram showing the algorithm recommended by the present invention;

[0029] Figure 7 The schematic diagram of the denoising automatic encoder of the present invention;

[0030] Figure 8 This is a flow chart of detection and correction of the present invention. DETAILED DESCRIPTION

[0031] The following will be combined with 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.

[0032] See also Figure 1-8 The present invention provides a music generation method based on artificial intelligence and deep learning improved algorithm, comprising the following steps:

[0033] Step 1: First music generation: AI-based music generation technology uses machine learning to "simulate" the process of music creation, and sets up a music generation model to train computers to analyze and understand a large amount of music data, so as to determine the structure and form of music, thereby generating new music works and completing the first music generation;

[0034] Step 2: Second music generation: Use deep learning algorithms to dig deeper into the correlation between the user's historical behavior and the audio features of the music, improve the accuracy and personalization of music recommendations, and perform a second music generation;

[0035] Step 3: Music determination: Combine the first music generation content and the second music generation content to merge the same content and determine the final music.

[0036] In step one, the basis of machine learning lies in the analysis and induction of data. The realization of music generation technology relies on a large amount of music data. These data come from music professionals or world-renowned musicians. Their creative works become training data for machine learning after digital processing.

[0037] The specific steps of the first music generation in step one are: S1. Data collection and processing: Collect a large number of music works from the Internet and other relevant resources, including music of various styles and types. Subsequently, these data need to be processed and cleaned to ensure the quality and accuracy of the data; S2. Feature extraction and analysis: After the data processing is completed, we will use machine learning algorithms to extract and analyze the features of the music data, and analyze the pitch, rhythm, and chord characteristics of the music to reveal the laws and patterns in music creation; S3. Model design and training: Based on the extracted music features, an intelligent music generation model will be designed and trained. The model learns and understands the components of music, and generates new music works based on the learned knowledge; S4. Generate system interface: In order to make it convenient for users to use the intelligent music creation and generation system, a friendly user interface is designed; S5. User experience: Users select music types, styles, and other creation parameters through the system interface to obtain music works that meet their personal needs.

[0038] In step 1, machine learning includes a music genre classification algorithm and an audio analysis algorithm based on deep learning. The specific process of calculating the music genre classification algorithm is as follows: S1. Create an audio data set: obtain audio data from music playback software and short video platforms through crawler methods, and perform format conversion and wavelet threshold denoising operations; S2. Extract feature information: design methods to extract spectral features to maximize the fit with the human ear's auditory system; S3. Design a classification algorithm: select a suitable network model structure for optimization, such as the Inception module in the GoogLeNet network model, and optimize the network model in combination with the BN layer and residual connection. The specific process of calculating the audio analysis algorithm is as follows: S1. Fourier transform: convert the time domain signal into the frequency domain signal and analyze the frequency structure of the signal; S2. Signal sampling: convert the continuous time signal into a discrete time signal, and then quantize the amplitude into a discrete digital signal; S3. Audio analysis method: understand the performance and characteristics of the audio device by analyzing the input and output signals. The specific audio analysis algorithm is the chord quantization expression: where: x represents the value of the chord, n represents the total number of interval groups paired in the current chord, and m represents the value of different intervals. Its value is based on the relevant composition knowledge and the difference in consonance. The higher the consonance, the lower the value; ω represents the weight of the relative position of the interval. When the relative positions of the two notes are closer to the bottom, the weight will be greater. It is worth noting that when the root note of the chord is the tonic, this chord is called the tonic chord. The tonic chord has the function of stabilizing the tonality in tonal music. Therefore, the value of the tonic chord in the formula is reduced by dividing it by a constant value ɑ, or the chord connection is quantified as follows: Where: μ represents the relative distance between two root notes on the fifth circle. For example, the μ value from root C to root G is 1, and the μ value from root C to root B is 5. The harmony in the harmony dataset is used as expert data, and the IRL pre-trained harmony generation model is used to optimize the strategy by constructing a reward function R. The specific calculation formula is: During the training process, the expected return is updated using the Q target network as the learning target, and the loss function is expressed as:

[0039]

[0040] The music generation model in step 1 is based on the generative model of neural networks. Specifically, the generator is responsible for generating new music works, while the discriminator is used to evaluate the quality of the generated music works. The generator and the discriminator compete and learn with each other through adversarial learning, and finally generate high-quality music works. Common neural network structures include recurrent neural networks and variational autoencoders, which are used to capture the temporal dependencies in music sequences and learn the potential distribution of music data, respectively.

[0041] The specific process of the second music generation in step 2 is as follows: S1. Recommendation algorithm: The basic principle of the user-based collaborative filtering recommendation algorithm is to make recommendations by mining the association rules between users; S2. Deep learning: Deep learning through convolutional neural networks; S3. Detection and correction: Detect and correct the music generation and recommendation results through a large amount of data back-and-forth experiments.

[0042] The convolutional scaling network is mainly composed of input layer, convolution layer, pooling layer, fully connected layer and output layer. The convolution layer reduces the dimension of the data through convolution operation, and the pooling layer further compresses the amount of data and parameters while retaining the main features. In image processing, the image is converted into one-dimensional data and input into the network, and after a series of convolution and pooling operations, it is finally output through the fully connected layer or softmax classifier. The full convolution network is used as a convolutional neural network block. It inputs the input Mel spectrum map as a feature into the full convolution network, and continuously extracts relevant features through convolution and pooling operations. Finally, the softmax classifier of the output layer is used to output the result, and the network parameters are optimized through iterative training. The trained model is saved locally. When processing music spectrum data, the convolutional neural network The network tends to ignore the time series correlation in the data. However, the music spectrum contains a lot of contextual content. In order to better capture these correlations, a recurrent neural network is used for processing. The recurrent neural network has the characteristics of memory and parameter sharing. Memory means that it processes short-term memory, and parameter sharing means that at each time step, the corresponding parameters are shared. For the feature extraction of music spectra, the context correlation cannot be ignored. Therefore, it is necessary to introduce a recurrent neural network into the feature extraction model. Through the recurrent neural network, the deep features of the Mel spectrum are obtained to better capture the time series correlation in the music data. Such a model effectively extracts the features of music and provides more accurate and meaningful input for subsequent tasks such as music classification and music generation.

[0043] The specific process of detection and correction is as follows: S1. Dataset: Use the API interface of the music streaming platform to obtain the user's historical playback records and preference tag information, collect music audio files through the Internet, and use the audio processing library to extract audio features; S2. Experimental environment construction: Use the Core i5 processor and NVIDIA Park GeForce GTX 3060 hardware environment, combined with the PyTorch and Python software environment, to efficiently conduct denoising autoencoder experiments and improve the performance and accuracy of the recommendation system. Through this combination of hardware and software environments, the computer's computing power and GPU acceleration are fully utilized to improve the efficiency and speed of the training process. As a powerful deep learning framework, PyTorch provides rich functions and easy-to-use APIs to easily build, train and optimize denoising autoencoder models;

[0044] S3. Experiment and result analysis: Using root mean square error and recall rate as evaluation indicators, a comprehensive evaluation of hybrid recommendation was conducted. RMSE is used to measure the prediction accuracy of the recommendation model for user ratings, while recall rate evaluates the model's ability to include items that users are actually interested in in the recommendation list. By comprehensively considering these two indicators, the performance of the hybrid recommendation model in terms of accuracy and coverage is comprehensively evaluated, which helps to determine the pros and cons and applicability of the model.

[0045] In the present invention, the music generation technology based on artificial intelligence "simulates" the process of music creation through machine learning, and establishes a music generation model to analyze and understand a large amount of music data by training computers, so as to judge the structure and form of music, thereby generating new music works and completing the first music generation; using a deep learning algorithm, a deeper level of correlation is mined from the user's historical behavior and the audio characteristics of the music, so as to improve the accuracy and personalization of music recommendations, and perform a second music generation; combining the first music generation content and the second music generation content to merge the same content, determine the final music, and combine the attached instructions to generate a new music work. Figure 6 , when user A is interested in project a and project b, user B is interested in project c and project d, and user C is interested in project a, project b, and project c, it is concluded that user A and user C have similar interests and hobbies. Based on this conclusion, user C's interest in project c is recommended to user A, even though user A has never been exposed to the project. By establishing association rules between users, the collaborative filtering recommendation algorithm based on users provides users with personalized recommendations to enhance user experience. Combined with the attached manual Figure 7 ,Noise reduction autoencoder is a variant of the autoencoder that introduces noise. By adding a certain amount of noise to the input data, the denoising autoencoder improves the generalization and robustness of the network, and can still accurately recommend even in the presence of noise. The forward and back propagation processes of the algorithm are consistent with those of ordinary autoencoders. By randomly selecting a small number of samples and adding noise to their input values, the denoising autoencoder is used for training and optimizing the weight matrix parameters. This method combines the characteristics of the denoising autoencoder to improve the recommendation system's ability to handle noisy data, thereby improving the accuracy of recommendations. The denoising autoencoder is trained using PyTorch. The samples that have been randomly noised are trained and optimized through the iterative process of forward propagation, loss function calculation, and gradient descent. This method improves the generalization and robustness of the model and enhances the performance and accuracy of the recommendation system. By looping through the sample set for multiple trainings, the denoising autoencoder gradually learns the characteristics of the input data and improves the recommendation system's ability to handle noisy data. The entire process uses the power and flexibility of PyTorch to make the training process more efficient and scalable.

[0046] Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments, or to replace some of the technical features therein. Any modification, replacement, and improvement made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A music generation method based on artificial intelligence and deep learning improved algorithm, characterized in that: The following steps are involved: Step 1: First music generation: AI-based music generation technology uses machine learning to "simulate" the process of music creation, and sets up a music generation model to train computers to analyze and understand a large amount of music data, so as to determine the structure and form of music, thereby generating new music works and completing the first music generation; Step 2: Second music generation: Use deep learning algorithms to dig deeper into the correlation between the user's historical behavior and the audio features of the music, improve the accuracy and personalization of music recommendations, and perform a second music generation; Step 3: Music determination: Combine the first music generation content and the second music generation content to merge the same content and determine the final music.

2. The music generation method based on artificial intelligence and deep learning improved algorithm according to claim 1, characterized in that: The machine learning in step one is specifically based on the analysis and induction of data. The implementation of the music generation technology relies on a large amount of music data. These data come from music professionals or world-renowned musicians. Their creative works become training data for machine learning after digital processing.

3. The music generation method based on artificial intelligence and deep learning improved algorithm according to claim 1, characterized in that: The specific steps of the first music generation in step one are as follows: S1. Data collection and processing: A large number of music works, including music of various styles and types, are collected from the Internet and other relevant resources. Subsequently, these data need to be processed and cleaned to ensure the quality and accuracy of the data; S2. Feature extraction and analysis: After the data processing is completed, we will use machine learning algorithms to extract and analyze the features of the music data, and analyze the pitch, rhythm, and chord features of the music to reveal the laws and patterns in music creation; S3. Model design and training: Based on the extracted music features, an intelligent music generation model will be designed and trained. The model learns and understands the components of music, and generates new music works based on the learned knowledge; S4. Generate system interface: In order to allow users to easily use the intelligent music creation and generation system, a friendly user interface is designed; S5. User experience: Users select music types, styles, and other creation parameters through the system interface to obtain music works that meet personal needs.

4. The music generation method based on artificial intelligence and deep learning improved algorithm according to claim 1, characterized in that: In step 1, machine learning includes a music genre classification algorithm and an audio analysis algorithm based on deep learning. The specific process of calculating the music genre classification algorithm is as follows: S1. Create an audio data set: obtain audio data from music playback software and short video platforms through a crawler method, and perform format conversion and wavelet threshold denoising operations; S2. Extract feature information: design a method to extract spectral features to maximize the fit with the human ear's auditory system; S3. Design a classification algorithm: select a suitable network model structure for optimization, such as the Inception module in the GoogLeNet network model, and optimize the network model in combination with the BN layer and residual connection. The specific process of calculating the audio analysis algorithm is as follows: S1. Fourier transform: convert the time domain signal into a frequency domain signal and analyze the frequency structure of the signal; S2. Signal sampling: convert the continuous time signal into a discrete time signal, and then quantize the amplitude into a discrete digital signal; S3. Audio analysis method: understand the performance and characteristics of the audio device by analyzing the input and output signals. The audio analysis algorithm is specifically a chord quantization expression: where: x represents the value of the chord, n represents the total number of interval groups paired in the current chord, and m represents the value of different intervals. Its value is based on the relevant composition knowledge and the difference in consonance. The higher the consonance, the lower the value; ω represents the weight of the relative position of the interval. When the relative positions of the two notes are closer to the bottom, the weight will be greater. It is worth noting that when the root note of the chord is the tonic, this chord is called the main chord. The main chord has the function of stabilizing the tonality in tonal music. Therefore, the value of the main chord in the formula is reduced by dividing it by a constant value ɑ. Chord connection quantization is expressed as: Where: μ represents the relative distance between two root notes on the circle of fifths. For example, the μ value from root C to root G is 1, and the μ value from root C to root B is 5. The harmony in the harmony dataset is used as expert data, and the IRL pre-trained harmony generation model is used to optimize the strategy by constructing a reward function R. The specific calculation formula is: During the training process, the expectation of the reward obtained by updating the Q target network is used as the learning target; The loss function expression is:

5. The music generation method based on artificial intelligence and deep learning improved algorithm according to claim 1, characterized in that: The music generation model in step 1 is a generation model based on a neural network, specifically, the generator is responsible for generating new music works, and the discriminator is used to evaluate the quality of the generated music works. The generator and the discriminator compete and learn with each other through adversarial learning, and finally generate high-quality music works. Common neural network structures include recurrent neural networks and variational autoencoders, which are used to capture the temporal dependencies in music sequences and learn the potential distribution of music data, respectively.

6. The music generation method based on artificial intelligence and deep learning improved algorithm according to claim 1, characterized in that: The specific process of the second music generation in step 2 is as follows: S1. Recommendation algorithm: The basic principle of the user-based collaborative filtering recommendation algorithm is to make recommendations by mining the association rules between users; S2. Deep learning: Deep learning through convolutional neural networks; S3. Detection and correction: Detect and correct the music generation and recommendation results through a large amount of data reciprocating experiments.

7. The music generation method based on artificial intelligence and deep learning improved algorithm according to claim 6, characterized in that: The convolutional scaling network is mainly composed of an input layer, a convolutional layer, a pooling layer, a fully connected layer and an output layer. The convolutional layer reduces the dimension of the data through convolution operations, and the pooling layer further compresses the amount of data and parameters while retaining the main features. In image processing, the image is converted into one-dimensional data and input into the network, and after a series of convolution and pooling operations, it is finally output through a fully connected layer or a softmax classifier. The full convolutional network is used as a convolutional neural network block. It inputs the input Mel spectrum map as a feature into the full convolutional network, and continuously extracts relevant features through convolution and pooling operations. Finally, the softmax classifier of the output layer is used to output the result, and the network parameters are optimized through iterative training. The trained model is saved locally. When processing music spectrum data, the convolutional neural network The network often ignores the time series correlation in the data. However, the music spectrum contains a lot of contextual content. In order to better capture these correlations, a recurrent neural network is used for processing. The recurrent neural network has the characteristics of memory and parameter sharing. Memory means that it processes short-term memory, and parameter sharing means that at each time step, the corresponding parameters are shared. For the feature extraction of music spectrum, the context correlation cannot be ignored. Therefore, it is necessary to introduce a recurrent neural network into the feature extraction model. Through the recurrent neural network, the deep features of the Mel spectrum are obtained to better capture the time series correlation in the music data. Such a model effectively extracts the features of music and provides more accurate and meaningful input for subsequent tasks such as music classification and music generation.

8. The music generation method based on artificial intelligence and deep learning improved algorithm according to claim 6, characterized in that: The specific process of the detection and correction is as follows: S1. Dataset: Using the API interface of the music streaming platform, obtain the user's historical play records and preference tag information, collect music audio files through the Internet, and use the audio processing library to extract audio features; S2. Establishing the experimental environment: Using the hardware environment of Core i5 processor and NVIDIA GeForce GTX 3060, combined with the software environment of PyTorch and Python, we can efficiently conduct experiments on denoising autoencoders and improve the performance and accuracy of the recommendation system. Through the combination of this hardware environment and software environment, we can make full use of the computer's computing power and GPU acceleration to improve the efficiency and speed of the training process. As a powerful deep learning framework, PyTorch provides rich functions and easy-to-use APIs to easily build, train and optimize denoising autoencoder models. S3. Experiment and result analysis: Using root mean square error and recall rate as evaluation indicators, a comprehensive evaluation of hybrid recommendations was conducted. RMSE is used to measure the prediction accuracy of the recommendation model for user ratings, while the recall rate evaluates the model's ability to include items of real interest to users in the recommendation list. By comprehensively considering these two indicators, the performance of the hybrid recommendation model in terms of accuracy and coverage is comprehensively evaluated to help determine the pros and cons and applicability of the model.