Personalized music recommendation method and system based on deep learning and brain wave signals

Through deep learning technology and spherical clustering algorithm, combined with deep Q network optimization recommendation strategy, the shortcomings of the existing brain wave music recommendation system in terms of dynamic adaptability and personalized recommendation are solved, and more efficient music recommendation and user physiological status matching is achieved.

CN119848288AActive Publication Date: 2025-04-18BEIJING FANXING & NI CULTURE TECHNOLOGY CO LTD

Patent Information

Application Number
CN202510028508.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-08
Publication Date
2025-04-18
Estimated Expiration
2045-01-08

AI Technical Summary

Technical Problem

The existing brain wave music recommendation system has shortcomings in dynamic adaptability and the implementation effect of personalized recommendation strategies, and it is difficult to monitor user status changes in real time and effectively capture the complex dynamic characteristics of multimodal physiological signals.

Method used

Using a personalized music recommendation method based on deep learning, the user's EEG and heart rate monitoring signals are collected, filter segmentation preprocessing and multi-scale convolution feature extraction are performed, and feature vectors are formed by combining the autoencoder dimensionality reduction. User grouping is used to use spherical clustering algorithm, and a state action value table is constructed, and recommendation strategies are optimized through deep Q networks to achieve dynamic adjustment and personalized recommendations.

Benefits of technology

It improves the matching degree between music recommendations and the user's current physiological status, enhances the personalization and effectiveness of recommendations, improves the stability and reliability of the system, and can better adapt to the dynamic changes of users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119848288A_ABST
    Figure CN119848288A_ABST
Patent Text Reader

Abstract

The invention discloses a personalized music recommendation method and system based on deep learning and brain wave signals, and belongs to the technical field of machine learning, and the method comprises the steps: collecting physiological signals when a user wears an electroencephalogram device and a heart rate monitoring device, and combining the time domain and frequency domain characteristics of heart rate variability data, a feature vector is formed through dimensionality reduction of an auto-encoder; a sample similarity matrix is calculated according to the feature vectors after dimension reduction, spherical clustering grouping is executed, and a state action value table of each category is constructed and initialized; inputting the feature vectors into the constructed deep network, playing back and storing interaction data by adopting priority experience, and executing parameter updating and gradient cutting; and acquiring scores of recommended music and physiological signal changes of a user, re-clustering based on newly added data, and dynamically adjusting a clustering structure. According to the scheme, the matching degree of music recommendation and the current physiological state of the user can be improved, and recommendation individuation and effectiveness are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of machine learning, and in particular to a personalized music recommendation method and system based on deep learning and brain wave signals. Background Art

[0002] As a new type of neuromodulation technology, brainwave music affects the activity state of the human central nervous system through auditory evoked potentials formed by sound wave stimulation of specific frequencies, and shows significant application value and development potential in multiple application scenarios such as clinical medicine, mental health, education and training, and personal health management. This technology is based on the principle of electroencephalogram (EEG) neural feedback, and uses the binaural beat effect (Binaural Beat) to generate brain electrical activity of specific frequencies, thereby achieving the purpose of regulating the functional state of the brain. The brainwave music recommendation system in the existing technical solution mainly adopts an analysis method based on user static characteristics, and recommends music content to users through a preset rule base or traditional machine learning algorithm. This type of system usually constructs user portraits based on static features such as user basic information, historical usage data, and subjective evaluation, and generates recommendation results based on classic recommendation algorithms such as collaborative filtering or content matching. However, in actual application, due to the dynamic changes in human physiological state and psychological needs, as well as the significant differences between individuals, the existing technical solutions show obvious technical limitations in both recommendation effect and user experience. In particular, in terms of real-time stress state monitoring and emotion change tracking, the existing system is unable to achieve real-time dynamic adaptation, resulting in a significant deviation between the recommended content and the user's current state and needs. In addition, in the feature extraction stage, the existing technology is insufficient in processing multimodal physiological signals such as electroencephalograms and heart rate variability, making it difficult to effectively capture and utilize the complex dynamic feature information contained in the signal, which directly limits the implementation effect of personalized recommendation strategies.

[0003] In response to the above technical problems, researchers in the industry have disclosed a variety of improvement plans. In terms of dynamic adaptability, some studies use real-time physiological signal acquisition and rapid response mechanisms to dynamically adjust recommendation strategies by continuously monitoring changes in user status. In terms of feature extraction, deep learning techniques such as convolutional neural networks (CNN) and recurrent neural networks (RNN) are introduced to improve the processing capabilities of multimodal physiological signals. At the same time, some studies have begun to try to apply reinforcement learning to the strategy optimization of recommendation systems, optimizing recommendation decisions through continuous interaction between intelligent agents and the environment. In terms of dealing with individual differences, a cold start optimization scheme based on transfer learning has been disclosed, attempting to accelerate model convergence through knowledge transfer. However, these improvement plans still have some technical bottlenecks and limitations. First, there are significant noise interference and data quality issues in the acquisition and processing of real-time physiological signals, which affects the stability and reliability of the system. Secondly, deep learning models face challenges such as high computational complexity and large training sample requirements when processing high-dimensional and nonlinear physiological signals. In addition, reinforcement learning algorithms have problems such as slow convergence and high exploration costs in practical applications. Especially when the user state space is large, it is difficult to find the optimal recommendation strategy within a limited time. Finally, when there is a large difference between the source domain and the target domain in the cold start optimization scheme based on transfer learning, the effect of knowledge transfer is often not ideal, resulting in limited improvement in model performance. The existence of these technical problems seriously restricts the actual application effect and promotion value of the brainwave music recommendation system.

[0004] Therefore, there is an urgent need for a technical solution that can improve the matching degree between music recommendations and the user's current physiological state and enhance the personalization and effectiveness of recommendations. Summary of the invention

[0005] In order to solve the deficiencies of the prior art, the embodiment of the present application discloses a personalized music recommendation method and system based on deep learning and brain wave signals. The present application solves the technical problems of the prior art such as poor dynamic adaptability and single recommendation strategy.

[0006] The embodiment of the present application discloses a personalized music recommendation method based on deep learning and brain wave signals, including: collecting physiological signals when a user wears an electroencephalogram device and a heart rate monitoring device, filtering and segmenting the collected signals for preprocessing, and generating a time-frequency matrix; performing multi-scale convolution feature extraction on the preprocessed matrix, combining the time domain and frequency domain features of the heart rate variability data, and reducing the dimension through an autoencoder to form a feature vector; calculating the sample similarity matrix based on the feature vector after dimensionality reduction, performing spherical clustering grouping, constructing and initializing a state-action value table for each category; inputting the feature vector into the constructed deep network, using priority experience playback to store interaction data, and performing parameter updates and gradient clipping; collecting users' ratings of the recommended music and changes in physiological signals, re-clustering based on the newly added data, and dynamically adjusting the clustering structure.

[0007] In a possible implementation, physiological signals of a user wearing an electroencephalogram (EEG) device and a heart rate monitoring device are collected, and the collected signals are filtered and segmented for preprocessing to generate a time-frequency matrix, including: fixing the EEG acquisition device on the user's forehead and wearing the heart rate monitoring device on the user's wrist; collecting the EEG signals and heart rate data of the user in a natural relaxation state, and continuously collecting for a preset time; performing wavelet transform denoising on the collected EEG signals, and using a bandpass filter to remove power frequency interference; segmenting the filtered EEG signals according to a preset length and setting an overlap rate; identifying the peak position of the heart rate variability data, calculating the continuous interval sequence, and eliminating outliers; and reconstructing the processed EEG signals into a time-frequency matrix form.

[0008] In a possible implementation, multi-scale convolution feature extraction is performed on the preprocessed matrix, and the time domain and frequency domain features of the heart rate variability data are combined to form a feature vector through dimensionality reduction by an autoencoder, including: using a multi-scale convolution kernel to extract local features of different frequency bands to generate a feature map; inputting the feature map into a long short-term memory network to capture the dynamic changes of the features over time; extracting time domain features and frequency domain features from the heart rate variability data; combining EEG features and heart rate variability features to form a mixed feature vector; and using a divergence-based autoencoder to reduce the dimensionality of the mixed feature vector.

[0009] In a possible implementation, a sample similarity matrix is ​​calculated based on the feature vector after dimensionality reduction, spherical clustering grouping is performed, and a state-action value table for each category is constructed and initialized, including: using an improved spherical clustering algorithm to group users based on the feature vector after dimensionality reduction; calculating the cosine similarity matrix between samples, and determining the number of clusters by maximizing the silhouette coefficient; randomly selecting the initial class center, calculating the similarity between the sample and the class center for allocation; constructing an independent state-action value table for each user category; setting the exploration rate using a cosine annealing strategy, and calculating the initial value based on the mean of the sample features within the class.

[0010] In one possible implementation, the feature vector is input into the constructed deep network, priority experience replay is used to store interaction data, and parameter update and gradient clipping are performed, including: inputting the real-time feature vector into the deep state action value network for policy optimization; constructing a main network and a target network with a multi-layer fully connected structure; using a priority experience replay mechanism to store interaction data; using a loss function to update parameters and perform norm clipping on gradient values; adding parameterized Gaussian noise to the network weights, and gradually reducing the noise standard deviation during training.

[0011] In one possible implementation, the user's ratings of recommended music and changes in physiological signals are collected, and the clustering is re-clustered based on the newly added data, and the clustering structure is dynamically adjusted, including: scoring the recommended music for satisfaction and recording the real-time changes in the user's physiological signals during music playback; re-clustering users based on feedback data and adjusting the groupings; using the nearest neighbor matching method for new users to select reference users; and performing a split or merge operation when the cluster group reaches a preset threshold.

[0012] In a possible implementation, a multi-scale convolution kernel is used to extract local features of different frequency bands to generate a feature map, including: setting the convolution kernels of a first branch and a second branch, the convolution kernel size of the first branch is a first preset value, and the convolution kernel size of the second branch is a second preset value; setting a preset number of convolution kernels for multiple frequency bands in the brain wave, respectively, the multiple frequency bands including a δ band, a θ band, an α band, a β band and a γ band; connecting a rectified linear unit activation function after each of the convolution layers, the activation function selects the maximum value output; cascading the feature maps extracted by the first branch and the second branch in the channel dimension to obtain a feature map sequence.

[0013] In a possible implementation, an improved spherical clustering algorithm is used to group users based on the feature vector after dimensionality reduction, including: calculating the cosine similarity between multiple groups of two target feature vectors to construct a cosine similarity matrix between samples; calculating the average distance between each sample and other samples in the same cluster and the average distance to the nearest other cluster to obtain a silhouette coefficient; traversing the cluster values ​​within a preset range, and selecting the cluster value corresponding to the largest silhouette coefficient.

[0014] An embodiment of the present application also discloses a system for applying the personalized music recommendation method as described in any of the above embodiments, including: a signal input and preprocessing module, a feature extraction module, a user clustering and grouping module, a recommendation strategy initialization module, a recommendation and reinforcement learning optimization module and a user feedback and system optimization module; wherein the signal input and preprocessing module is used to collect target signals for denoising, filtering and standardization processing; the feature extraction module is used to extract features of the processed signals through a deep neural network; the user clustering and grouping module is used to group users according to feature vectors using a clustering algorithm; the recommendation strategy initialization module is used to initialize the recommendation strategy based on user grouping information and historical playback records; the recommendation and reinforcement learning optimization module is used to combine the extracted features and user feedback to optimize the recommendation strategy using a deep Q network; the user feedback and system optimization module is used to collect feedback data to optimize system parameters.

[0015] An embodiment of the present application also discloses a personalized music recommendation device based on deep learning and brain wave signals, comprising: a processor, a memory, and a system bus; wherein the processor and the memory are connected via the system bus; the memory is used to store one or more programs, and the one or more programs include instructions, which, when executed by the processor, enable the processor to execute the method described in any one of the above embodiments.

[0016] In a personalized music recommendation method, system and device based on deep learning and brain wave signals disclosed above, the embodiment of the present application adopts a deep neural network model combining CNN and LSTM to efficiently extract the complex dynamic features of multimodal physiological signals (EEG, HRV), which can comprehensively characterize the user's real-time physiological state. Further, in some embodiments, users are grouped according to physiological signal characteristics and initial preferences through a clustering algorithm to reduce the impact of individual differences on model training, which can improve the effectiveness of the recommendation strategy and the convergence speed of the model. Further, in some embodiments, Q-learning is used to initialize the strategy in the cold start phase, and as the amount of data increases, it gradually transitions to a deep Q network (DQN) for strategy optimization. Through a hybrid reinforcement learning strategy, the accuracy and personalization level of the recommendation can be improved. Further, in some embodiments, by comprehensively considering the user's subjective satisfaction score and objective physiological signal changes, a multi-dimensional reward function is designed to ensure that the recommendation strategy meets the personalized needs of the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present application 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 some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0018] Figure 1 A flowchart of a personalized music recommendation method based on deep learning and brain wave signals disclosed in an embodiment of the present application;

[0019] Figure 2 A schematic block diagram of a personalized music recommendation system disclosed in an embodiment of the present application. DETAILED DESCRIPTION

[0020] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present disclosure unless otherwise specifically stated.

[0021] Those skilled in the art can understand that the terms "first", "second" and the like in the embodiments of the present disclosure are only used to distinguish different steps, devices or modules, etc., and neither represent any specific technical meaning nor represent the necessary logical order between them. It should also be understood that in the embodiments of the present disclosure, "multiple" can refer to two or more, and "at least one" can refer to one, two or more. It should also be understood that for any component, data or structure mentioned in the embodiments of the present disclosure, in the absence of explicit limitation or contrary revelation given in the context, it can generally be understood as one or more. In addition, the term "and / or" in the present disclosure is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in the present disclosure generally indicates that the associated objects before and after are an "or" relationship. It should also be understood that the description of each embodiment in the present disclosure emphasizes the differences between the embodiments, and the same or similar parts can refer to each other. For the sake of brevity, they will not be repeated one by one.

[0022] At the same time, it should be understood that, for ease of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship. The following description of at least one exemplary embodiment is actually only illustrative and is by no means intended to limit the present disclosure and its application or use. The techniques, methods and devices known to ordinary technicians in the relevant fields may not be discussed in detail, but where appropriate, the techniques, methods and devices should be considered part of the specification. It should be noted that similar numbers and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further discussed in subsequent drawings.

[0023] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0024] Figure 1 This is a flow chart of a personalized music recommendation method based on deep learning and brain wave signals disclosed in an embodiment of the present application.

[0025] like Figure 1 As shown, in step S101, the physiological signals of the user wearing the electroencephalogram device and the heart rate monitoring device are collected, and the collected signals are filtered and segmented to generate a time-frequency matrix. This includes: fixing the electroencephalogram acquisition device on the user's forehead and wearing the heart rate monitoring device on the user's wrist; collecting the EEG signal and heart rate data of the user in a natural and relaxed state, and continuously collecting for a preset time; performing wavelet transform denoising on the collected EEG signal, and using a bandpass filter to remove power frequency interference; segmenting the filtered EEG signal according to a preset length and setting the overlap rate; identifying the peak position of the heart rate variability data, calculating the continuous interval sequence, and eliminating abnormal values; reconstructing the processed EEG signal into a time-frequency matrix form.

[0026] In one embodiment, a portable EEG forehead patch device can be fixed on the user's forehead, and a portable heart rate monitoring bracelet or ring can be worn on the user's wrist or finger. The EEG signal acquisition device is designed to be light and easy to wear, with a sampling frequency set to 512Hz, and has high precision and low noise characteristics. The heart rate monitoring device has a high-precision heart rate monitoring function, a sampling frequency set to 250Hz, and real-time monitoring and recording of HRV data. When collecting data, the user maintains a natural and relaxed state, and each collection lasts for 180 seconds. The collected EEG signal is first denoised using a wavelet transform, and the bandpass filter frequency range is set to 0.5-45Hz to remove power frequency interference. The filtered signal is segmented, each segment is 2 seconds long, and the overlap rate is set to 50%. For the heart rate variability data, the R wave peak point position is accurately identified, the continuous RR interval sequence is calculated, and outliers beyond the mean ±3 standard deviations are eliminated. The processed EEG signal is reconstructed into a time-frequency matrix form, where n is the number of time periods and m is the number of frequency components.

[0027] In step S102, multi-scale convolution feature extraction is performed on the preprocessed matrix, and the time-domain and frequency-domain features of the heart rate variability data are combined to form a feature vector through dimensionality reduction by an autoencoder. This includes: using a multi-scale convolution kernel to extract local features of different frequency bands to generate a feature map; inputting the feature map into a long short-term memory network to capture the dynamic changes of features over time; extracting time-domain features and frequency-domain features from the heart rate variability data; combining EEG features and heart rate variability features to form a mixed feature vector; and using a divergence-based autoencoder to reduce the dimensionality of the mixed feature vector.

[0028] Specifically, for the preprocessed EEG matrix, a multi-scale convolution kernel is used to extract local features in different frequency bands. The convolution kernel size is set to 3×3, 5×5, the step size is 1, and the ReLU activation function is used to capture the change pattern in frequency and time. A feature map of shape (n, k) is generated, where k is the number of extracted features, representing the comprehensive information of different frequency bands. The feature map is input into the LSTM network to capture the dynamic changes of features over time and understand the temporal dependence of user physiological signals. The LSTM network generates a time series feature vector (1, k) for subsequent recommendation strategy decisions. For HRV data, time domain features such as SDNN, RMSSD, and pNN50, as well as frequency domain features such as LF, HF, and LF / HF ratio are extracted. EEG features and HRV features are combined to form a mixed feature vector, and the feature vector is reduced in dimension to remove redundant information and retain the most recognizable feature combination.

[0029] Among them, a multi-scale convolution kernel is used to extract local features of different frequency bands to generate a feature map, including: setting the convolution kernels of the first branch and the second branch, the convolution kernel size of the first branch is a first preset value, and the convolution kernel size of the second branch is a second preset value; setting a preset number of convolution kernels for multiple frequency bands in the brain wave respectively, and the multiple frequency bands include a δ band, a θ band, an α band, a β band and a γ band; connecting a rectified linear unit activation function after each of the convolution layers, and the activation function selects the maximum value output; cascading the feature maps extracted by the first branch and the second branch in the channel dimension to obtain a feature map sequence.

[0030] In one embodiment, a dual-branch multi-scale convolution structure is used to extract features from the EEG signal in the form of a preprocessed time-frequency matrix. The first branch uses a 3×3 convolution kernel, and the second branch uses a 5×5 convolution kernel. The step size of both branches is set to 1. 32 different convolution kernels are set for the δ band (0.5-4Hz), θ band (4-8Hz), α band (8-13Hz), β band (13-30Hz) and γ band (30-45Hz). After each convolution layer, a ReLU activation function f(x)=max(0,x) is connected. The feature maps extracted by the two branches are cascaded in the channel dimension to obtain a feature map with a shape of (n, 320), where n is the number of time periods and 320 is the total number of features extracted by the two branches.

[0031] A bidirectional LSTM network is used to process the feature map sequence. The network structure consists of two stacked LSTM layers, each containing 128 hidden units. At time t, the hidden state update of the forward LSTM layer is calculated as follows: . Where W is the weight matrix, b is the bias term, σ is the sigmoid activation function, and ⊙ represents element-wise multiplication. The backward LSTM layer uses the same calculation method, but processes the sequence in the opposite order. The last hidden states of the two directions are concatenated to obtain a 256-dimensional feature vector.

[0032] For HRV data, time domain features were first calculated: SDNN is the standard deviation of consecutive RR intervals; RMSSD is the root mean square of the difference between adjacent RR intervals; pNN50 is the percentage of adjacent RR intervals with a difference greater than 50ms. The power spectral density was calculated using the Welch method, and the energy in the 0.04-0.15Hz frequency band was defined as the low-frequency component LF, and the energy in the 0.15-0.4Hz frequency band was defined as the high-frequency component HF, and the LF / HF ratio was calculated. All HRV features were combined into a 64-dimensional vector. The 256-dimensional EEG feature vector output by the LSTM network was concatenated with the 64-dimensional HRV feature vector to obtain a 320-dimensional mixed feature vector. An autoencoder based on KL divergence was used for dimensionality reduction. Both the encoder and decoder were three-layer fully connected networks with 256, 128, and 64 hidden units, respectively. The LeakyReLU activation function α=0.2 was used to obtain the final 64-dimensional feature vector.

[0033] At step S103, the sample similarity matrix is ​​calculated based on the feature vector after dimension reduction, spherical clustering grouping is performed, and the state action value table of each category is constructed and initialized. This includes: using the improved spherical clustering algorithm to group users based on the feature vector after dimension reduction; calculating the cosine similarity matrix between samples, and determining the number of clusters by maximizing the silhouette coefficient; randomly selecting the initial class center, calculating the similarity between the sample and the class center for allocation; constructing an independent state action value table for each user category; setting the exploration rate to use the cosine annealing strategy, and calculating the initial value based on the mean value of the sample features within the class.

[0034] Specifically, based on the user physiological signals and historical preference data extracted by preliminary features, the K-means clustering algorithm is used to group users. First, the optimal K value is determined by indicators such as the silhouette coefficient, and different initial strategies are set for each group. In the early stage of system startup, due to the lack of sufficient user interaction data, the Q-learning algorithm is used to initialize the strategy. A higher exploration rate is set in the initial stage to promote diversified exploration of strategies. As user interaction data accumulates and the system gradually understands user preferences, the exploration rate is gradually reduced and the utilization rate of strategies is increased to improve the accuracy of recommendations and user satisfaction. Using user grouping information, different initial strategies are set according to the characteristics of different groups in the Q-learning initialization stage to ensure that the recommendation strategy is more targeted and avoid model convergence difficulties caused by excessive individual differences.

[0035] Furthermore, an improved spherical clustering algorithm is used to group users based on the feature vectors after dimensionality reduction, including: calculating the cosine similarity between multiple groups of two target feature vectors to construct a cosine similarity matrix between samples; calculating the average distance between each sample and other samples in the same cluster and the average distance to the nearest other cluster to obtain a silhouette coefficient; traversing the cluster values ​​within a preset range, and selecting the cluster value corresponding to the largest silhouette coefficient.

[0036] In one embodiment, the 64-dimensional reduced dimension feature vector is clustered using an improved spherical K-means clustering algorithm. First, the cosine similarity matrix S between samples is calculated. For any two feature vectors and ,calculate The number of clusters K is determined by maximizing the silhouette coefficient. The silhouette coefficient calculation formula is: ,in is the average distance between sample i and other samples in the same cluster, is the average distance between sample i and the nearest other clusters. According to the sample distribution characteristics, the K value is set in the range of 2-8 and the K value corresponding to the maximum silhouette coefficient is selected.

[0037] For the determined K clusters, spherical K-means clustering is performed. First, K samples are randomly selected as the initial class centers. For each sample x, its cosine similarity with each class center is calculated, and it is assigned to the class with the largest similarity. When updating the class center, all sample vectors in the kth class are summed and L2 normalized to obtain the new class center. The sample allocation and center update steps are repeated until the category division does not change or the maximum number of iterations is reached.

[0038] In the strategy initialization stage, the Q-learning algorithm with priority experience playback is used. An independent Q table is constructed for each user category k, and the action space A contains different music feature combinations. The Q value update formula is , where the learning rate α is set to 0.1, and the decay coefficient γ is set to 0.95. The exploration rate ε uses the cosine annealing strategy, and the initial value is set to 0.9. Decrease, where t is the current number of interactions and T is the preset annealing period. Set different initial values ​​for the Q table of each category. The initial Q value is calculated based on the feature mean of the samples within the category. ,in is the class-specific weight matrix.

[0039] At step S104, the feature vector is input into the constructed deep network, priority experience replay is used to store the interaction data, and parameter update and gradient clipping are performed. This includes: inputting the real-time feature vector into the deep state action value network for policy optimization; constructing a main network and a target network with a multi-layer fully connected structure; using a priority experience replay mechanism to store interaction data; using a loss function to update parameters and perform norm clipping on gradient values; adding parameterized Gaussian noise to the network weights, and gradually reducing the noise standard deviation with training.

[0040] In one embodiment, the extracted real-time EEG and HRV feature vectors are input into a deep Q network (DQN). As the system accumulates sufficient user interaction data and feedback, Q-learning is switched to DQN for policy optimization. The system dynamically decides whether to use Q-learning or DQN based on the real-time data volume and user feedback to ensure that the most suitable reinforcement learning algorithm is used for recommendation policy optimization at different data stages. In the cold start phase, the Q-learning algorithm is used for policy initialization, and user preference data is quickly accumulated by combining high exploration rate and user clustering information. As user interaction data increases, the exploration rate is gradually reduced to improve the utilization rate of the strategy. When the system detects that the data volume reaches a preset threshold, it automatically transitions from Q-learning to DQN, using the advantages of DQN in a large-scale data environment to improve the overall performance of the recommendation system. Whether using Q-learning or DQN, the system continuously collects user feedback, dynamically adjusts model parameters and reward functions, and ensures that the recommendation strategy always matches the user's needs and physiological state.

[0041] Furthermore, in another embodiment, a 64-dimensional feature vector can be used as a state input to construct a dual-stream deep Q network. The main network adopts a four-layer fully connected structure, and the number of neurons in each layer is 256, 128, 64 and |A|, where |A| is the size of the action space. A Dropout layer is inserted between the second and third layers, and the dropout rate is 0.3. The target network has the same structure and is used to calculate the target Q value. The target network parameters are updated every 1000 interactions. When the amount of user interaction data exceeds the preset threshold of 8192, the switch from Q-learning to DQN is triggered.

[0042] The priority experience replay mechanism is used to store interaction data. For each interaction sample (s, a, r, s'), its priority is calculated ,in is the TD error, and ε=0.01 is a small constant to prevent the priority from being zero. Sampling is performed, where α=0.6 controls the influence of priority. Each sampling consists of 512 samples to form a mini-batch.

[0043] The loss function adopts the form of double Q learning: ,in is the importance sampling weight, and β increases linearly from 0.4 to 1. The Adam optimizer is used for parameter update, and the initial learning rate is set to 0.001, and the learning rate is decayed to 0.8 times the original every 50,000 steps. To prevent gradient explosion, the gradient value is clipped, and the maximum norm is set to 10. During the training process, the Noisy Net mechanism is used to add parameterized Gaussian noise to each layer weight, and the initial value of the noise standard deviation is 0.5, which is gradually reduced to 0.1 during training.

[0044] In step S105, the user's ratings of the recommended music and changes in physiological signals are collected, and the clustering structure is dynamically adjusted based on the newly added data. This includes: scoring the recommended music for satisfaction and recording the real-time changes in the user's physiological signals during music playback; re-clustering the users based on the feedback data and adjusting the grouping; using the nearest neighbor matching method for new users to select reference users; and performing a split or merge operation when the cluster group reaches a preset threshold.

[0045] Preferably, the recommended music is scored with a satisfaction rating ranging from 1 to 5 points through a mobile device, and the real-time data changes of the user's EEG and HRV during music playback are recorded. Combine subjective feedback with objective physiological signal changes to evaluate the effectiveness of the current recommendation strategy. Based on the feedback data, re-cluster users to ensure the effectiveness of the grouping and the pertinence of the recommendation strategy. When three consecutive recommendations are detected to be ineffective, temporarily increase the exploration rate. When the success rate of a certain type of music recommendation is lower than the preset threshold, appropriately reduce its Q value. For new users, the nearest neighbor matching method is used to select reference users based on the similarity of physiological characteristics, and the weighted average of their Q tables is used as the initial value. Users are re-clustered every 100 times of new interaction data. When the number of cluster group samples or the distance between groups reaches the preset threshold, a split or merge operation is performed to dynamically adjust the cluster structure. The system optimizes the deep Q network through continuous reinforcement learning training to achieve adaptive optimization of the recommendation strategy.

[0046] Figure 2 A schematic block diagram of a personalized music recommendation system disclosed in an embodiment of the present application. It should be understood that the system shown in the figure is exemplary and not restrictive. This means that the system architecture involved is not limited to a specific form or design, but is presented as an example. In other words, the architecture shown in the figure can be regarded as a way of expression to clearly describe related concepts and relationships, and does not exclude other forms of architecture. Therefore, when interpreting the architecture in the picture, it should be understood that the model is flexible and diverse, and its purpose is to disclose an exemplary description rather than a restrictive provision on a specific form.

[0047] Specifically, the embodiment of the present application discloses a personalized brainwave music recommendation system, which is mainly composed of the following modules: signal input and preprocessing module 201, which is responsible for collecting the user's EEG and HRV signals, performing denoising, filtering and standardization processing, and generating signal data suitable for subsequent feature extraction. Feature extraction module 202, using CNN-LSTM deep neural network, extracts frequency domain and time domain features of preprocessed multimodal physiological signals to generate high-dimensional feature vectors. User clustering and grouping module 203, using clustering algorithms (such as K-means, hierarchical clustering) to group users according to physiological signal characteristics and initial preferences, reducing the impact of individual differences on model training. Recommendation strategy initialization module 204, based on user grouping information and historical playback records, uses Q-learning algorithm to initialize recommendation strategy, and discloses the initial music recommendation plan. Recommendation and reinforcement learning optimization module 205, combined with real-time extracted features and user feedback, uses deep Q network (DQN) to continuously optimize recommendation strategy to achieve dynamic and personalized music recommendation. The user feedback and system optimization module 206 collects users' subjective feedback (such as satisfaction scores) and objective feedback (such as changes in physiological signals), dynamically adjusts system parameters and reinforcement learning models to improve recommendation accuracy and user experience.

[0048] Furthermore, an embodiment of the present application also discloses a personalized brainwave music recommendation device, comprising: a processor, a memory, and a system bus; the processor and the memory are connected via the system bus; the memory is used to store one or more programs, and the one or more programs include instructions, which, when executed by the processor, enable the processor to execute any of the above methods.

[0049] Furthermore, an embodiment of the present application also discloses a computer program product, which, when executed on a terminal device, enables the terminal device to execute any one of the above-mentioned processing methods.

[0050] It can be known from the description of the above implementation mode that those skilled in the art can clearly understand that all or part of the steps in the above-mentioned embodiment method can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., including several instructions for enabling a computer device (which can be a personal computer, a server, or a network communication device such as a media gateway, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.

[0051] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0052] It should also be noted that, in the embodiments of the present application, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements includes not only those elements, but also includes other elements that are not clearly listed, or also includes elements inherent to such process, method, article or equipment. In the absence of more restrictions, the elements limited by the statement "comprise one..." do not exclude the presence of other identical elements in the process, method, article or equipment including the elements.

[0053] The above description of the disclosed embodiments enables professionals and technicians in the field to implement or use the present application. Various modifications to these embodiments will be apparent to professionals and technicians in the field, and the general principles defined in the embodiments of the present application can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments shown in the embodiments of the present application, but will conform to the widest range consistent with the principles and novel features disclosed in the embodiments of the present application.

Claims

1. A personalized music recommendation method based on deep learning and brain wave signals, characterized in that: include: Collect physiological signals when the user wears the electroencephalogram device and the heart rate monitoring device, perform filtering and segmentation preprocessing on the collected signals, and generate a time-frequency matrix; Perform multi-scale convolution feature extraction on the preprocessed matrix, combine the time domain and frequency domain features of the heart rate variability data, and reduce the dimension through the autoencoder to form a feature vector; Calculate the sample similarity matrix based on the eigenvector after dimensionality reduction, perform spherical clustering grouping, build and initialize the state-action value table for each category; The feature vector is input into the constructed deep network, priority experience replay is used to store interaction data, and parameter updates and gradient clipping are performed; Collect users' ratings of recommended music and changes in physiological signals, re-cluster based on new data, and dynamically adjust the clustering structure.

2. The personalized music recommendation method according to claim 1, characterized in that: in, Collect physiological signals when the user wears the EEG device and the heart rate monitoring device, perform filtering and segmentation preprocessing on the collected signals, and generate a time-frequency matrix, including: Fix the EEG acquisition device on the user's forehead and wear the heart rate monitoring device on the user's wrist; Collect the user's EEG signals and heart rate data when they are in a natural and relaxed state, and continue to collect data for a preset period of time; The collected EEG signals were denoised by wavelet transform, and the power frequency interference was removed by using a bandpass filter; The filtered EEG signal is segmented according to a preset length and the overlap rate is set; Identify the peak position of heart rate variability data, calculate the continuous interval sequence, and eliminate outliers; The processed EEG signal is reconstructed into a time-frequency matrix form.

3. The personalized music recommendation method according to claim 1, characterized in that: in, Perform multi-scale convolution feature extraction on the preprocessed matrix, combine the time domain and frequency domain features of the heart rate variability data, and reduce the dimension through the autoencoder to form a feature vector, including: Use multi-scale convolution kernels to extract local features of different frequency bands and generate feature maps; The feature map is fed into the long short-term memory network to capture the dynamic changes of features over time; Extract time domain features and frequency domain features from heart rate variability data; Combining EEG features and heart rate variability features to form a mixed feature vector; A divergence-based autoencoder is used to reduce the dimensionality of the mixed feature vector.

4. The personalized music recommendation method according to claim 1, characterized in that: in, Calculate the sample similarity matrix based on the reduced eigenvectors, perform spherical clustering, build and initialize the state-action value table for each category, including: Based on the feature vector after dimension reduction, an improved spherical clustering algorithm is used to group users; Calculate the cosine similarity matrix between samples and determine the number of clusters by maximizing the silhouette coefficient; Randomly select the initial class center, calculate the similarity between the sample and the class center for distribution; Construct an independent state-action value table for each user category; The exploration rate is set to adopt the cosine annealing strategy, and the initial value is calculated based on the mean of the sample features within the class.

5. The personalized music recommendation method according to claim 1, characterized in that: in, The feature vector is input into the constructed deep network, priority experience replay is used to store interaction data, and parameter updates and gradient clipping are performed, including: Input the real-time feature vector into the deep state-action-value network for policy optimization; Construct a main network and a target network with a multi-layer fully connected structure; Use priority experience replay mechanism to store interaction data; Use the loss function to update the parameters and perform norm clipping on the gradient values; Add parameterized Gaussian noise to the network weights and gradually reduce the noise standard deviation during training.

6. The personalized music recommendation method according to claim 1, characterized in that: in, Collect users' ratings of recommended music and changes in physiological signals, re-cluster based on the newly added data, and dynamically adjust the clustering structure, including: Score the satisfaction of recommended music and record the real-time changes of users' physiological signals during music playback; Re-cluster users based on feedback data and adjust grouping; For new users, the nearest neighbor matching method is used to select reference users; When the cluster group reaches the preset threshold, a split or merge operation is performed.

7. The personalized music recommendation method according to claim 3, characterized in that: in, Use multi-scale convolution kernels to extract local features of different frequency bands and generate feature maps, including: Setting convolution kernels of a first branch and a second branch, wherein the convolution kernel size of the first branch is a first preset value, and the convolution kernel size of the second branch is a second preset value; Setting a preset number of convolution kernels for multiple frequency bands in the brain wave respectively, wherein the multiple frequency bands include a delta band, a theta band, an alpha band, a beta band, and a gamma band; Connecting a rectified linear unit activation function after each of the convolutional layers, wherein the activation function selects the maximum value output; The feature maps extracted by the first branch and the second branch are cascaded in the channel dimension to obtain a feature map sequence.

8. The personalized music recommendation method according to claim 4, characterized in that: in, Based on the feature vector after dimension reduction, an improved spherical clustering algorithm is used to group users, including: Calculate the cosine similarity between multiple groups of two target feature vectors and construct the cosine similarity matrix between samples; Calculate the average distance between each sample and other samples in the same cluster and the average distance between each sample and the nearest cluster to obtain the silhouette coefficient. Traverse the cluster values ​​within the preset range and select the cluster value corresponding to the largest silhouette coefficient.

9. A system using the personalized music recommendation method according to any one of claims 1 to 8, characterized in that: include: Signal input and preprocessing module, feature extraction module, user clustering and grouping module, recommendation strategy initialization module, recommendation and reinforcement learning optimization module and user feedback and system optimization module; among them, The signal input and preprocessing module is used to collect target signals for denoising, filtering and standardization processing; The feature extraction module is used to extract features from the processed signal through a deep neural network; The user clustering and grouping module is used to group users using a clustering algorithm based on feature vectors; The recommendation strategy initialization module is used to initialize the recommendation strategy based on user group information and historical playback records; The recommendation and reinforcement learning optimization module is used to combine the extracted features and user feedback and use a deep Q network to optimize the recommendation strategy; The user feedback and system optimization module is used to collect feedback data to optimize system parameters.

10. A personalized music recommendation device based on deep learning and brain wave signals, characterized in that: include: A processor, a memory, and a system bus; wherein the processor and the memory are connected via the system bus; The memory is used to store one or more programs, wherein the one or more programs include instructions, and when the instructions are executed by the processor, the processor executes the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Music recommendation method and system

    CN107423352A

  • Electroencephalogram emotion classification method based on deep learning

    CN111368686A

  • Music recommendation method and system based on user state and storable medium

    CN114117105A

  • Music unlocking method based on biological characteristic interaction and electronic equipment

    CN114117116A

  • Automatic background music retrieval BCI system for distinguishing brain fatigue and emotion

    CN115227243A

Cited By

  • Information pushing method and system based on consumer mental atlas

    CN121685059A