Music recommendation feedback method and system based on electroencephalogram emotion, terminal and medium
By collecting and processing EEG signals, determining emotional states and generating personalized music content, the problem of the existing technology being unable to dynamically detect changes in user emotions is solved, and instant matching and personalized adjustment of emotional states and music content are achieved.
Patent Information
- Application Number
- CN202511205736.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-27
- Publication Date
- 2025-09-30
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing technologies are unable to dynamically detect changes in user emotions, lack effective emotion feedback paths and interactive closed-loop adjustment capabilities, and are unable to provide personalized, context-aware music recommendations.
By collecting EEG signals, determining emotional state information after preprocessing, generating music content based on the emotional state information, and optimizing emotional state recognition and music generation control parameters through feedback information, a closed-loop interactive adjustment of emotional state and music content is achieved.
It achieves instant matching between the user's emotional state and music content, enhances the effect and interactivity of personalized emotion regulation, can adjust the music content in real time according to mood changes, and provide personalized music recommendations and feedback.
Smart Images

Figure CN120723935A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electroencephalogram (EEG) analysis technology, and in particular to an EEG emotion-based music recommendation feedback method, system, terminal, and medium. Background Art
[0002] Emotions are an integral part of human behavior and cognition, and music plays a unique role in regulating emotions. Traditional music recommendation systems typically base their recommendations on users' historical behavior, tags, or preference data. These systems lack the ability to perceive users' real-time emotional states, making it difficult to provide personalized, context-aware music recommendations. In recent years, with the advancement of BCI (brain-computer interface) technology and the deepening of affective computing research, integrating EEG (electroencephalogram) signals with music emotion regulation has become a key area of research for active emotion regulation. Using BCI systems to collect users' EEG signals in real time and analyze their neurophysiological characteristics through algorithms to identify their emotional state has broad application prospects, including in areas such as mental health, education, entertainment, meditation, and neurorehabilitation. Currently, some research has attempted to build music recommendation or automatic generation systems based on EEG emotion recognition. However, existing technologies cannot dynamically detect changes in users' emotions after music recommendations are made, lacking effective emotional feedback pathways and interactive closed-loop regulation capabilities.
[0003] Therefore, the prior art still has defects. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a method, system, terminal and medium for music recommendation feedback based on EEG emotions in order to address the above-mentioned defects of the prior art. The technical solution adopted by the present invention is as follows: In a first aspect, the present invention provides a music recommendation feedback method based on EEG emotions, wherein the method comprises: Collecting EEG signals, preprocessing the EEG signals, and determining emotional state information based on the preprocessed EEG signals; determining music generation control parameters based on the emotional state information, synthesizing music content based on the music generation control parameters, and recommending the music content; Obtain feedback information of the music content, determine the regulatory effect of the music content on the emotional state information, and based on the regulatory effect, optimize the step of determining the emotional state information based on the preprocessed EEG signal and / or the step of determining the music generation control parameters based on the emotional state information.
[0005] In one implementation, preprocessing the EEG signal includes: performing band-pass filtering and physiological artifact removal processing on the EEG signal; The EEG signal is segmented and normalized.
[0006] In one implementation, determining emotional state information based on the preprocessed EEG signal includes: Extract multi-band features from the preprocessed EEG signals; The multi-band features are analyzed and processed using a pre-trained emotion recognition model to output emotional state information, which includes pleasure and arousal.
[0007] In one implementation, determining music generation control parameters based on the emotional state information includes: Determine the note duration, note rhythm, and volume based on the arousal level in the emotional state information; Determine the pitch range and harmonic mode based on the pleasantness of the emotional state information; The music generation control parameter is obtained based on the note duration, the note rhythm, the pitch range, the volume loudness and the harmonic mode.
[0008] In one implementation, synthesizing music content based on the music generation control parameter includes: The MIDI generation engine is called, combined with a preset virtual instrument sound source library, based on the music generation control parameters, the note sequence is converted into an audio signal to obtain music content.
[0009] In one implementation, obtaining feedback information of the music content and determining the regulating effect of the music content on the emotional state information includes: Obtaining explicit feedback information of the music content based on a user's self-evaluation result of the music content; Obtaining implicit feedback information of the music content based on any one or more of a playback duration, whether the music content is skipped, and a frequency of repeated playback; Based on the explicit feedback information and the implicit feedback information, the regulating effect of the music content on the emotional state information is determined.
[0010] In one implementation, determining the regulating effect of the music content on the emotional state information based on the explicit feedback information and the implicit feedback information includes: Respectively obtaining first weight information corresponding to the explicit feedback information and second weight information corresponding to the implicit feedback information; Determining a degree of matching between music content and emotional state information based on the explicit feedback information, the implicit feedback information, the first weight information, and the second weight information; Based on the matching degree, the regulating effect of the music content on the emotional state information is obtained.
[0011] In one implementation, based on the regulation effect, the step of determining the emotional state information based on the preprocessed EEG signal and / or the step of determining the music generation control parameter based on the emotional state information are optimized, including: Based on the adjustment effect, updating the parameters of the emotion recognition model to obtain an optimized emotion recognition model; and / or, Based on the adjustment effect, the mapping relationship between the emotional state information and the music generation control parameters is optimized to improve the sensitivity of the mapping relationship.
[0012] In one implementation, the method further includes: During the playing of the music content, new EEG signals are collected in real time, and new emotional state information is determined based on the new EEG signals; According to the new emotional state information, new music generation control parameters are re-determined and new music content is determined.
[0013] In one implementation, the method further includes: determining music preference information based on the feedback information; Based on the music preference information, a synthesis strategy or a music style of the music content is adjusted.
[0014] In a second aspect, an embodiment of the present invention further provides a music recommendation and feedback system based on EEG emotions, wherein the system is used to implement the steps of the music recommendation and feedback method based on EEG emotions in any one of the above solutions, and the system includes: an emotional state information determination module, configured to collect EEG signals, preprocess the EEG signals, and determine emotional state information based on the preprocessed EEG signals; a music content synthesis module, configured to determine music generation control parameters based on the emotional state information, synthesize music content based on the music generation control parameters, and recommend the music content; A feedback information determination module is used to obtain feedback information of the music content, determine the regulatory effect of the music content on the emotional state information, and based on the regulatory effect, optimize the step of determining the emotional state information based on the preprocessed EEG signal and / or the step of determining the music generation control parameters based on the emotional state information.
[0015] In a third aspect, an embodiment of the present invention further provides a terminal, wherein the terminal includes a memory, a processor, and a music recommendation feedback program based on EEG emotions stored in the memory and runnable on the processor. When the processor executes the music recommendation feedback program based on EEG emotions, the steps of the music recommendation feedback method based on EEG emotions of any one of the above-mentioned schemes are implemented.
[0016] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein a music recommendation feedback program based on EEG emotions is stored on the computer-readable storage medium, and the music recommendation feedback program based on EEG emotions implements the steps of the music recommendation feedback method based on EEG emotions described in any one of the above-mentioned schemes on the computer-readable storage medium.
[0017] Beneficial effects: Compared with the prior art, the present invention provides a music recommendation feedback method based on EEG emotions. First, the present invention collects EEG signals, pre-processes the EEG signals, and determines the emotional state information based on the pre-processed EEG signals. Then, the music generation control parameters are determined based on the emotional state information, the music content is synthesized based on the music generation control parameters, and the music content is recommended. Finally, the feedback information of the music content is obtained, the regulating effect of the music content on the emotional state information is determined, and based on the regulating effect, the step of determining the emotional state information based on the pre-processed EEG signals and / or the step of determining the music generation control parameters based on the emotional state information are optimized. The present invention identifies the emotional state through EEG signals, combines the emotional state with music synthesis, generates music content that matches the emotional state information, and optimizes the emotional state analysis step and the music content synthesis step in combination with the feedback information on the music content, which is conducive to realizing a closed-loop interactive regulation mechanism between the user's brain emotional state and music stimulation. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A schematic diagram of the structure of a music recommendation device provided by an embodiment of the present invention.
[0019] Figure 2 This is a flowchart of a preferred embodiment of the EEG emotion-based music recommendation feedback method provided in an embodiment of the present invention.
[0020] Figure 3 A schematic diagram of the technical architecture of the EEG emotion-based music recommendation feedback method provided in an embodiment of the present invention.
[0021] Figure 4 This is a logical diagram of synthesizing music content based on emotional state information in the EEG emotion-based music recommendation feedback method provided by an embodiment of the present invention.
[0022] Figure 5 This is a diagram of the emotional EEG closed-loop architecture of the EEG emotion-based music recommendation feedback method provided in an embodiment of the present invention.
[0023] Figure 6 This is a functional block diagram of the EEG emotion-based music recommendation feedback system provided by an embodiment of the present invention.
[0024] Figure 7 This is a functional block diagram of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0026] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents, operations, or steps, nor must they be executed in the order described. For example, some operations or steps may be decomposed, combined, or partially merged, so the actual execution order may vary depending on the actual situation.
[0027] It should be understood that the terms used in this specification are for the purpose of describing particular embodiments only and are not intended to limit the present invention. As used in the specification and appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise. It should be understood that, to facilitate a clear description of the technical solutions of the embodiments of the present invention, in the embodiments of the present invention, terms such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. For example, the first control information and the second control information are merely used to distinguish different control information and do not limit their order. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different. It will also be understood that the term "and / or" used in the present description and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0028] Some research has attempted to build music recommendation or automatic music generation systems based on EEG emotion recognition. These systems typically use portable EEG devices to collect data, then classify the EEG signals using machine learning or deep learning models to classify emotions, recommending tracks with similar emotional labels. However, this technology relies on static emotion induction (such as images or videos) for label training, making it difficult to cope with the complex and dynamic changes in user emotions in real-world scenarios. Furthermore, emotion recognition algorithms lack generalizability across individuals, making it difficult to consistently output accurate key emotion indicators. Furthermore, most existing technologies rely on label-matching recommendations based on predefined music libraries, making them difficult to handle complex emotional fluctuations. Furthermore, existing technologies cannot dynamically detect changes in user emotions after music recommendations are made, lacking effective emotional feedback pathways and interactive closed-loop regulation capabilities.
[0029] In order to solve the problems of the prior art, the present invention first provides a music recommendation device. The music recommendation device according to this embodiment can not only collect EEG signals, but also analyze the user's emotional state information, and then generate or recommend corresponding music content based on the emotional state information. Specifically, Figure 1 As shown in , the music recommendation device of this embodiment is configured as a headphone structure, including: a headband structure, an earmuff structure, and a forehead component. Figure 1 It can be seen that the earmuff structures correspond to the left and right ears of the user respectively, and are respectively arranged on the left and right sides of the headband structure. The headband structure and the earmuff structure are connected by a telescopic kit. The function of the telescopic kit is to adjust the upper and lower positions of the earmuff structure so as to adapt to users with different head circumferences. In actual applications, the telescopic kit of this embodiment can be a slide rail structure. The telescopic kit can be fixedly set on the earmuff structure. The headband structure is movably connected to the slide rail on the telescopic kit, and a plurality of slots are provided on the slide rail. The headband structure is provided with protrusions that cooperate with the slots. When the protrusions on the headband structure cooperate with different slots, the distance between the earmuff structure and the headband structure will be different. In this way, the upper and lower positions of the earmuff structure can be adjusted by moving the protrusions on the headband structure into different slots.
[0030] Furthermore, the music recommendation device of this embodiment also includes a forehead component, such as Figure 1As shown in , one end of the forehead member is connected to the earmuff structure, while the other end extends toward and contacts the forehead of the user. In actual use, when the forehead member of this embodiment is not subject to external forces, its initial shape is a shape with a certain degree of curvature to adapt to the user's head. When the music recommendation device is worn on the user's head, the forehead member conforms to the shape of the user's head and contacts the skin of the forehead. Because head circumferences vary between users, the forehead member of this embodiment is designed to be flexible and elastic, allowing the user to manually adjust the curvature of the forehead member to facilitate close contact with the skin of the forehead. In this embodiment, the EEG signal acquisition module is embedded within the forehead member. In actual use, a spring member is provided on the inner side of the forehead member, and the EEG signal acquisition module can be mounted on the spring member. This allows the EEG signal acquisition module to closely adhere to the skin when the forehead member is in close contact with the forehead, facilitating EEG signal acquisition.
[0031] In one implementation, the EEG signal acquisition module of this embodiment includes at least three dry contact electrodes arranged in an array. These electrodes correspond to the user's brain regions FP1, FP2, and Fz, respectively, for collecting EEG signals from different brain regions. FP1, FP2, and Fz all belong to the international 10-20 system electrode locations commonly used in EEG research. They are primarily located in the frontal lobe of the brain and are closely related to higher-order functions such as cognition, emotion, and decision-making. "F" stands for Frontal, and "P" stands for Polar, specifically referring to the frontmost region of the frontal lobe. The numbers represent the left and right hemispheres, with "1" and "2" corresponding to the left and right hemispheres, respectively. "Z" stands for zero, representing the midline. FP1 is the left polar region of the frontal lobe, located at the frontmost part of the left forehead (near the medial hairline), and is part of the prefrontal cortex. The FP1 region is the right frontal lobe, symmetrical to the FP1 region, and is located at the front end of the right forehead. The Fz region is the midline frontal lobe, located in the center of the forehead (above the center of the eyebrows) and belongs to the midline prefrontal cortex. In this embodiment, the front component also includes a miniature preamplifier, which is connected to both the EEG signal acquisition module and the processing module to amplify the EEG signals collected by the EEG signal acquisition module.
[0032] Furthermore, the earmuff structure includes an inner lining structure, with a reference electrode positioned at the edge of the lining structure. The reference electrodes in this embodiment include eight dry contact electrodes, four of which are positioned on the left earmuff structure, and the remaining four on the right earmuff structure. The reference electrodes in this embodiment are designed to provide a relatively stable reference potential. The area behind the ear is less affected by electrical activity in the cerebral cortex and less susceptible to interference from facial muscle movements, making it suitable as a reference baseline. The configuration of eight dry contact electrodes enhances the stability and reliability of the reference potential, reducing contact issues that may arise with a single electrode. Furthermore, the reference electrodes in this embodiment have a sampling frequency of 500Hz, which covers the primary frequency range of EEG signals (typically 0.5-100Hz) while also capturing potential high-frequency noise (such as ambient electromagnetic interference). By performing differential calculations with the EEG signals collected by the EEG acquisition module at the forehead, they effectively offset common-mode interference (such as power frequency interference and body static), improving the signal-to-noise ratio of the EEG signals.
[0033] This embodiment focuses on collecting emotion-related EEG signals through the EEG signal acquisition module set on the forehead component, and combines with the reference electrode to provide a stable baseline reference. The two complement each other through a distributed layout, and combined with the micro preamplifier and subsequent processing modules, they jointly achieve high-quality acquisition of EEG signals, providing a reliable data foundation for the system's edge computing and emotion recognition algorithms, and ultimately supporting the realization of music content generation and recommendation.
[0034] Furthermore, the processing module of this embodiment includes: an EEG signal digitization submodule, a noise suppression submodule, an audio submodule, and a power management submodule. The EEG signal digitization submodule of this embodiment is used to analyze and process EEG signals to identify the user's emotional state information, and the noise suppression submodule is used to perform pre-processing such as filtering on EEG signals to eliminate interference. The noise suppression submodule can also determine which components in the EEG signal are artifacts caused by head movement, and cooperate with the adaptive filtering algorithm to further eliminate interference and improve signal purity. The audio submodule is used to output the synthesized music content, and the power management submodule is used to provide power to the entire music recommendation device.
[0035] In some implementations, to improve the spatial resolution and accuracy of signal acquisition, the music recommendation device of this embodiment may also be compatible with the following high-performance EEG platforms, including: the g.tec system (a portable EEG acquisition system) that supports high-density electrode arrays (e.g., 64 channels or more) and real-time data streams; the NeuroScan system (a brain-computer interface system) that provides clinical-grade signal quality and is suitable for accurate detection of emotion-induced disturbances; and open source platforms such as OpenBCI (a high-performance, scalable, and easy-to-use brain-computer interface system) that supports customized acquisition and local data processing units.
[0036] Based on the above embodiment, the present invention provides a music recommendation feedback method based on EEG emotions. The music recommendation feedback method based on EEG emotions of this embodiment can be applied to the above music recommendation device, and can also be applied to a terminal, which can be a computer, smart TV, mobile phone and other intelligent product terminals. Specifically, Figure 2 As shown in , the music recommendation feedback method based on EEG emotions of this embodiment includes the following steps: Step S100: collecting EEG signals, preprocessing the EEG signals, and determining emotional state information based on the preprocessed EEG signals.
[0037] Combine Figure 3 As shown, the user wears the above-mentioned music recommendation device, and the EEG signal is collected based on the EEG signal acquisition module on the music recommendation device as the basic data source for emotion recognition. The original EEG signal collected in this embodiment usually contains a lot of noise and artifacts, so the EEG signal needs to be preprocessed. The preprocessing of this embodiment includes band-pass filtering and physiological artifact removal of the EEG signal to eliminate DC drift and power frequency interference and remove physiological artifacts such as electrooculogram and electromyography. In addition, the EEG signal is segmented and normalized to improve the stability and versatility of subsequent feature analysis.
[0038] Next, this embodiment extracts multi-band features from the preprocessed EEG signals. These include features from key frequency bands, such as the delta wave band (0–4 Hz), theta wave band (4–7 Hz), alpha wave band (8–13 Hz), beta wave band (14–29 Hz), and gamma wave band (30–47 Hz). Each frequency band corresponds to a different cognitive and emotional state. Theta waves reflect emotional regulation and meditation; alpha waves reflect relaxation and calmness; and beta and gamma waves reflect anxiety, attention, and arousal. This embodiment can optionally use methods such as wavelet decomposition to extract these multi-band features. A pretrained emotion recognition model is then used to analyze and process these multi-band features, outputting emotional state information, including pleasure and arousal. Pleasure measures the degree of positivity and negativity of an emotion; arousal measures the level of activation and calmness. The emotion recognition model of this embodiment utilizes the LDA (Linear Discriminant Analysis) algorithm to perform emotion recognition on EEG sample data, determining the corresponding pleasure and arousal levels, and then trains the model based on these recognition results. In practical applications, the emotion recognition model of this embodiment can analyze and identify multi-band input features and output values corresponding to pleasure and arousal, which can be used to reflect the degree of pleasure and arousal. Recognition based on these two dimensions makes emotion recognition more robust and stable, and can serve as a decision-making basis for subsequent music content generation or recommendation strategies.
[0039] In other implementations, the emotion recognition model of this embodiment can also be replaced by other neural network models based on the data volume and target accuracy, such as convolutional neural networks, recurrent neural networks, and graph neural networks. Convolutional neural networks are suitable for automatically extracting time-frequency graph features and can be embedded in the original EEG signal for direct modeling; recurrent neural networks are suitable for processing time-dependent EEG emotion dynamic trajectories; and graph neural networks can model the spatial relationship between multi-channel EEG signals, improving the generalization ability of emotion recognition.
[0040] Step S200: Determine music generation control parameters based on the emotional state information, synthesize music content based on the music generation control parameters, and recommend the music content.
[0041] This embodiment can perform parameter mapping on the identified emotional state information (i.e., arousal and pleasure) to determine the music generation control parameters of the basic attributes of the music. Specifically, the music generation control parameters of this embodiment include: note duration, note rhythm, pitch range, volume loudness, and harmony mode. Among them, the note duration is negatively correlated with the arousal level, that is, the more active the user's emotions are, the higher the arousal level is, and the shorter the note duration is, reflecting the emotional rhythm of tension or excitement. Figure 3 As shown in , the mapping function relationship between arousal and note duration in this embodiment is: note duration = (p-arousal × q), where p and q are preset parameters, p∈[0, 0.5], q∈[0, 0.3]. The higher the arousal, the shorter the note duration; the lower the arousal, the longer the note duration. The note rhythm of this embodiment is positively correlated with arousal. The higher the arousal, the greater the probability of a note appearing, the faster the note rhythm, and the shorter the note duration, thus forming fast-paced, high-energy music. On the other hand, the lower the arousal, the smaller the probability of a note appearing, the slower the note rhythm, and the longer the note duration, thus forming slow-paced, more soothing music suitable for calm or meditative emotions. In this embodiment, the volume loudness and arousal level have a linear functional relationship, specifically: uniform{m,l×arousal level+n}, where the uniform function is used to generate a random floating-point number within a specified range. m, n, and l are preset parameters, m∈[30,80], n∈[40,60], and l∈[30,50]. The greater the arousal level, the louder the volume; and the smaller the arousal level, the smaller the volume. Based on the above linear functional relationship, this embodiment can control the volume loudness to fluctuate within a certain range and correspond to the degree of emotional activity.
[0042] Furthermore, the pitch range of this embodiment is related to the pleasantness (such as Figure 4 If the pleasure is greater, the melody tends to be high-pitched, producing a bright and light feeling. In this case, the pitch range can be determined to be in the high-pitched area. If the pleasure is smaller, the melody tends to be low-pitched, conveying a calm or melancholic emotional color. In this case, the pitch range can be determined to be in the low-pitched area. This embodiment can pre-set a threshold for measuring high or low pleasure, such as Figure 4As shown in , the functional relationship between pleasantness and pitch range can be expressed as follows: if the pleasantness val is less than a threshold value, such as 0.5, the pitch range can be determined to be in the bass range, and the specific value of the bass range can be determined based on the relationship of 2×pleasure; if the pleasantness val is greater than or equal to 0.5, the pitch range can be determined to be in the treble range, and the specific value of the treble range can be determined based on the relationship of 2×(pleasure-0.5). If the pleasantness is otherwise, the pitch range is in the middle range. Furthermore, to increase the diversity of musical styles, this embodiment determines the harmonic mode based on pleasantness. This embodiment can introduce a mode control function, specifically: Harmonic Mode = a-(b×pleasure), where a and b are preset parameters, a∈[5, 10], b∈[4, 8]. The mode control function can control the complexity of the harmonic mode or the style tendency according to the pleasantness value. In this embodiment, if the pleasure is greater, the harmonic mode is determined to be a major key, which is conducive to forming a jumping rhythm; if the pleasure is smaller, the harmonic mode is determined to be a minor key, which is conducive to forming a soothing rhythm.
[0043] The mapping relationship between the above-mentioned emotional state information and the music generation control parameters in this embodiment is the research result of music psychology, which is conducive to ensuring that the music stimulation is accurately connected with the user's current emotional state information at the structural level, and is conducive to realizing a highly personalized emotion regulation path.
[0044] After obtaining the aforementioned music generation control parameters, this embodiment can synthesize music content based on these music generation control parameters. Specifically, this embodiment first integrates the aforementioned music generation control parameters into a rule-based function, which serves as guidance and constraint information for the subsequent generation of music content. Next, it invokes a MIDI (Musical Instrument Digital Interface) generation engine, combined with a preset library of virtual instrument sound sources, such as piano, cello, double bass, and synthesizer. The piano has a wide dynamic range, suitable for neutral to high-pleasure emotions; the cello has a warm timbre that adapts to the mid-to-low frequency range, suitable for deeply immersive mood adjustment; the double bass and synthesizer can be used to render low-arousal states or background emotional atmospheres. Finally, based on the music generation control parameters, the note sequence is converted into an audio signal to obtain the music content. Because the music generation control parameters of this embodiment are determined based on emotional state information, the generated music content is aligned with the user's current emotional state information, achieving personalized and automated output of the music content. The synthesized music content can be played in real time based on the audio sub-module, allowing users to instantly receive music stimulation that matches their own emotional state information, promoting the immersion and effectiveness of the emotion regulation experience.
[0045] Furthermore, to ensure that the music content output is instantly responsive to emotional changes, this embodiment can refresh the EEG signal every 0.5 seconds. This is updated via a sliding window, allowing the music generation control parameters to adjust in real time as emotional state information changes. The overall system response latency is controlled within 200ms, ensuring that the user's perceived musical changes are nearly synchronized with their internal emotional state, thereby enhancing the naturalness of the interaction and the immediacy of the adjustment effect.
[0046] In summary, in this embodiment, the collected EEG signals are pre-processed by filtering, artifact removal, etc., and then feature extraction is performed, and the extracted multi-band features are input into the emotion recognition model. The emotion recognition model is a two-dimensional model based on pleasure-arousal, combined with a machine learning algorithm to identify the user's immediate emotional state information. Then, according to the numerical range of pleasure and arousal, the music generation control parameters are automatically mapped, and finally music synthesis is performed based on the MIDI generation engine and the virtual instrument sound source library to achieve the output of customized music content driven by emotions. This process forms a direct path from "brain emotion → music synthesis", ensuring that the music content is synchronized with the user's current emotional state information.
[0047] Of course, in other implementations, such as Figure 3 As shown in , this embodiment can also fall back to the traditional music library recommendation method, bypassing the step of mapping music generation control parameters based on emotional state information, and adopting a static recommendation system based on discrete music tag matching. That is, pre-stored songs are matched and played according to discrete classification labels corresponding to pleasure and arousal. In addition, this embodiment can also perform exception processing when the emotion recognition model cannot identify the user's emotional state information. For example, if the emotional state information cannot be recognized because the collected signal quality is below the threshold, the audio output can be directly used from the backup music library.
[0048] Step S300: Obtain feedback information of the music content, determine the regulating effect of the music content on the emotional state information, and based on the regulating effect, optimize the step of determining the emotional state information based on the preprocessed EEG signal and / or the step of determining the music generation control parameters based on the emotional state information.
[0049] like Figure 4 As shown in , this embodiment can also include a user feedback system, where users provide feedback on the output music content. Based on this feedback, the mapping rules between the music generation control parameters determined based on the emotional state information are adjusted, thereby adjusting the mapping relationship between the two. Alternatively, the parameters of the emotion recognition model can be updated based on this feedback to achieve parameter optimization, thereby improving the recognition accuracy of the emotion recognition model and facilitating subsequent reuse. Once the parameter optimization is complete, the entire process ends.
[0050] Specifically, combined Figure 5 As shown in , this embodiment generates music after identifying an emotional state based on an emotion recognition model and outputs the generated music content. Next, user feedback on the music content is obtained. In this embodiment, the feedback information includes explicit feedback information and implicit feedback information. In this embodiment, explicit feedback information on the music content can be obtained based on the user's self-evaluation of the music content. This self-evaluation result can be a subjective rating of the music content by the user, or a comprehensive evaluation result obtained by completing a self-evaluation form for the music content. This self-evaluation result can reflect the user's subjective perception of the music content. Furthermore, this embodiment can obtain implicit feedback information on the music content based on any one or more of the following: playback duration, skipping, and repeat playback frequency. Similarly, playback duration, skipping, and repeat playback frequency can all reflect whether the user enjoys the output music content. Therefore, this embodiment combines the explicit and implicit feedback information to obtain user feedback on the output music content from different dimensions, helping to determine the effect of the music content on regulating the emotional state information.
[0051] Specifically, this embodiment can pre-set a first weighting for the explicit feedback information and a second weighting for the implicit feedback information. The first and second weightings, respectively, reflect the degree of influence of the explicit and implicit feedback information on the adjustment effect. For example, if the first weighting is greater than the second weighting, the explicit feedback has a greater influence on the adjustment effect. In practical applications, since the explicit feedback information is the user's self-evaluation of the music content, which can be a score, the explicit feedback information can ultimately be presented as a specific numerical value, such as 85. The implicit feedback information can be any one or more of the following: the playback duration, skipping, and repeat frequency of the music content. This embodiment can pre-set a numerical mapping table that specifies the numerical values corresponding to the playback duration, skipping, and repeat frequency. When the implicit feedback information is any one of the following: the playback duration, skipping, and repeat frequency of the music content, the numerical value corresponding to the playback duration, skipping, or repeat frequency can be directly determined based on the numerical mapping table, thereby obtaining the numerical value of the implicit feedback information. When the implicit feedback information is multiple items such as the duration of the music content played, whether it is skipped, and the frequency of repeated playback, the average value can be calculated after determining the corresponding value of each item based on the value mapping table, and then the average value can be used as the value of the implicit feedback information. After obtaining the values of the explicit feedback information and the implicit feedback information, combined with the first weight information and the second weight information mentioned above, this embodiment can perform a weighted summation to obtain a final evaluation value. Based on this evaluation value, the degree of match between the music content and the emotional state information can be determined. Then, based on the matching degree, the regulating effect of the music content on the emotional state information can be obtained. In one implementation, after determining the final evaluation value, the higher the evaluation value, the higher the degree of match between the music content and the emotional state information, which means that the music content output at this time is adapted to the emotional state information, and the music content can also have a good regulating effect on the emotional state information, and therefore the regulating effect is better. The lower the evaluation value, the lower the match between the music content and the emotional state information. This indicates that the music content being output is incompatible with the emotional state information, and the music content is unable to effectively regulate the emotional state information, resulting in a poorer regulation effect. In practical applications, this embodiment may set an evaluation threshold. If the determined evaluation value is greater than or equal to the evaluation threshold, it can be determined that the regulation effect meets the expected requirements; if the determined evaluation value is less than the evaluation threshold, it can be determined that the regulation effect does not meet the expected requirements.
[0052] Furthermore, after obtaining the above-mentioned feedback information, this embodiment can also optimize the step of determining the emotional state information based on the preprocessed EEG signal and / or the step of determining the music generation control parameters based on the emotional state information based on the emotional state information based on the adjustment effect, thereby realizing a closed-loop adjustment. Specifically, since the above-mentioned feedback information can reflect the degree of matching between the music content and the emotional state information, it also reflects the adjustment effect of the music content on the emotional state information. Therefore, this embodiment can update the parameters of the emotion recognition model based on the adjustment effect to obtain an optimized emotion recognition model. For example, the recognition thresholds for pleasure and arousal in the emotion recognition model can be adjusted so that the optimized emotion recognition model can more accurately analyze the user's emotional state information. In addition, this embodiment can also optimize the mapping relationship between the emotional state information and the music generation control parameters based on the adjustment effect, improve the sensitivity of the mapping relationship, and make it possible to more accurately and quickly determine the music generation control parameters based on the emotional state information. After updating the parameters of the emotion recognition model based on the adjustment effect and optimizing the mapping relationship between the emotion state information and the music generation control parameters, this embodiment can enter a loop to re-perform stages such as emotion monitoring, collecting EEG signals and performing emotion recognition, thereby achieving continuous EEG emotion analysis and continuous output and recommendation of music content.
[0053] In other implementations, this embodiment can also determine music preference information based on the aforementioned feedback information. Then, based on this music preference information, the synthesis strategy or musical style of the music content can be adjusted, facilitating the generation of music content that is both compatible with the user's emotional state information and preferred by the user in subsequent loops. Furthermore, this embodiment collects new EEG signals in real time during the playback of the music content and determines new emotional state information based on these signals. Based on this new emotional state information, new music generation control parameters are then re-determined, and new music content is determined. Because the music content changes, and these changes are synchronized with the changes in the emotional state information, this allows the generation of a music track with a gradual emotional transition based on the user's emotional trends. For example, when a user's emotional state is detected to gradually transition from a joyful to a calm or sad state, the music content is then gradually adjusted in terms of harmony, note rhythm, and pitch range, presenting an emotional transition from joyful to calm to sad, enhancing the coherence of emotional regulation and the immersiveness of the musical experience. It can be seen that this embodiment not only identifies the user's emotional state information, but also intervenes and guides the user's emotions by synthesizing music content. That is, the music content is not only the output result of the system, but also an emotional intervention tool to guide the user to achieve emotional self-regulation, thereby enhancing the system's behavioral regulation and psychological intervention capabilities.
[0054] This embodiment can also simulate the feedback process by performing timed sampling and manual scoring on the output music content, thereby increasing the richness of the feedback information and being more conducive to determining the regulatory effect of the music content on the emotional state information. In addition, the EEG emotion-based music recommendation feedback method of the present invention can be embedded in wearable devices such as headphones or glasses to build a lightweight, invisible emotion regulation system. The present invention is not only applicable to medical or psychological clinical scenarios, but can also be extended to a wider range of daily life and interactive entertainment occasions, including: Adaptive game music scene: Dynamically adjust the in-game background music and sound effects according to the player's mood changes in real time to enhance immersion; Meditation assistance and relaxation training scenarios: Provides personalized emotion-synchronized audio for meditation practitioners to improve concentration and emotional stability; Mental health monitoring and intervention scenarios: It can serve as a channel for expressing emotional states in situations such as psychological counseling and depression screening, and assist in the implementation of assessment and intervention strategies.
[0055] Based on the above embodiments, the present invention also provides a music recommendation feedback system based on EEG emotions, such as Figure 6 As shown in , the music recommendation feedback system based on EEG emotions of this embodiment is used to implement the steps in the above-mentioned method embodiment, and the system includes: an emotional state information determination module 10, a music content synthesis module 20, and a feedback information determination module 30. Specifically, the emotional state information determination module 10 is used to collect EEG signals, preprocess the EEG signals, and determine the emotional state information based on the preprocessed EEG signals. The music content synthesis module 20 is used to determine music generation control parameters based on the emotional state information, synthesize music content based on the music generation control parameters, and recommend the music content. The feedback information determination module 30 is used to obtain feedback information of the music content, determine the regulating effect of the music content on the emotional state information, and based on the regulating effect, optimize the step of determining the emotional state information based on the preprocessed EEG signals and / or the step of determining the music generation control parameters based on the emotional state information.
[0056] The working principles of each module in the EEG emotion-based music recommendation feedback system of this embodiment are the same as the principles of each step in the above method embodiment, and will not be repeated here.
[0057] Each module in the EEG emotion-based music recommendation and feedback system can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of the processor in the terminal in hardware form, or stored in the terminal's memory in software form, so that the processor can call and execute the corresponding operations of each module.
[0058] Based on the above embodiment, the present invention further provides a terminal, the principle block diagram of the terminal can be as follows: Figure 7 The terminal may include one or more processors 100 ( Figure 7 Only one is shown in the figure), memory 101 and computer program 102 stored in memory 101 and executable on one or more processors 100. For example, a music recommendation and feedback program based on EEG emotions. When one or more processors 100 execute computer program 102, each step in the embodiment of the music recommendation and feedback method based on EEG emotions can be implemented. Alternatively, when one or more processors 100 execute computer program 102, the functions of each module / unit in the embodiment of the music recommendation and feedback system based on EEG emotions can be implemented, which is not limited here.
[0059] In one embodiment, the processor 100 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0060] In one embodiment, memory 101 may be an internal storage unit of an electronic device, such as a hard drive or memory. Memory 101 may also be an external storage device of the electronic device, such as a plug-in hard drive, smart media card (SMC), secure digital (SD) card, flash memory card, etc. Furthermore, memory 101 may include both an internal storage unit of the electronic device and an external storage device. Memory 101 is used to store computer programs and other programs and data required by the terminal. Memory 101 may also be used to temporarily store data that has been output or is about to be output.
[0061] Those skilled in the art will understand that Figure 7 The principle block diagram shown in the figure is only a block diagram of a partial structure related to the solution of the present invention, and does not constitute a limitation on the terminal to which the solution of the present invention is applied. The specific terminal may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0062] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, operation database or other media used in the embodiments provided by the present invention may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct RAM bus dynamic RAM (DRDRAM), and RAM bus dynamic RAM (RDRAM), etc.
[0063] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A music recommendation feedback method based on EEG emotions, characterized in that: The method comprises: Collecting EEG signals, preprocessing the EEG signals, and determining emotional state information based on the preprocessed EEG signals; determining music generation control parameters based on the emotional state information, synthesizing music content based on the music generation control parameters, and recommending the music content; Obtain feedback information of the music content, determine the regulatory effect of the music content on the emotional state information, and based on the regulatory effect, optimize the step of determining the emotional state information based on the preprocessed EEG signal and / or the step of determining the music generation control parameters based on the emotional state information.
2. The music recommendation feedback method based on EEG emotions according to claim 1, characterized in that: Preprocessing the EEG signal includes: performing band-pass filtering and physiological artifact removal processing on the EEG signal; The EEG signal is segmented and normalized.
3. The music recommendation feedback method based on EEG emotions according to claim 1, characterized in that: Determine emotional state information based on preprocessed EEG signals, including: Extract multi-band features from the preprocessed EEG signals; The multi-band features are analyzed and processed using a pre-trained emotion recognition model to output emotional state information, which includes pleasure and arousal.
4. The music recommendation feedback method based on EEG emotions according to claim 3, characterized in that: Determining music generation control parameters based on the emotional state information includes: Determine the note duration, note rhythm, and volume based on the arousal level in the emotional state information; Determine the pitch range and harmonic mode based on the pleasantness of the emotional state information; The music generation control parameter is obtained based on the note duration, the note rhythm, the pitch range, the volume loudness and the harmonic mode.
5. The music recommendation feedback method based on EEG emotions according to claim 1, characterized in that: Synthesizing music content based on the music generation control parameter, including: The MIDI generation engine is called, combined with a preset virtual instrument sound source library, based on the music generation control parameters, the note sequence is converted into an audio signal to obtain music content.
6. The music recommendation feedback method based on EEG emotions according to claim 1, characterized in that: Acquiring feedback information of the music content and determining the regulating effect of the music content on the emotional state information includes: Obtaining explicit feedback information of the music content based on a user's self-evaluation result of the music content; Obtaining implicit feedback information of the music content based on any one or more of a playback duration, whether the music content is skipped, and a frequency of repeated playback; Based on the explicit feedback information and the implicit feedback information, the regulating effect of the music content on the emotional state information is determined.
7. The music recommendation feedback method based on EEG emotions according to claim 6, characterized in that: Determining, based on the explicit feedback information and the implicit feedback information, an adjustment effect of the music content on the emotional state information, including: Respectively obtaining first weight information corresponding to the explicit feedback information and second weight information corresponding to the implicit feedback information; Determining a degree of matching between music content and emotional state information based on the explicit feedback information, the implicit feedback information, the first weight information, and the second weight information; Based on the matching degree, the regulating effect of the music content on the emotional state information is obtained.
8. The music recommendation feedback method based on EEG emotions according to claim 4, characterized in that: Based on the regulation effect, the step of determining the emotional state information based on the preprocessed EEG signal and / or the step of determining the music generation control parameter based on the emotional state information are optimized, including: Based on the adjustment effect, updating the parameters of the emotion recognition model to obtain an optimized emotion recognition model; and / or, Based on the adjustment effect, the mapping relationship between the emotional state information and the music generation control parameters is optimized to improve the sensitivity of the mapping relationship.
9. The music recommendation feedback method based on EEG emotions according to claim 1, characterized in that: The method further comprises: During the playing of the music content, new EEG signals are collected in real time, and new emotional state information is determined based on the new EEG signals; According to the new emotional state information, new music generation control parameters are re-determined and new music content is determined.
10. The music recommendation feedback method based on EEG emotions according to claim 5, characterized in that: The method further comprises: determining music preference information based on the feedback information; Based on the music preference information, a synthesis strategy or a music style of the music content is adjusted.
11. A music recommendation feedback system based on EEG emotions, characterized by: The system is used to implement the steps of the EEG emotion-based music recommendation feedback method according to any one of claims 1 to 10, and the system includes: an emotional state information determination module, configured to collect EEG signals, preprocess the EEG signals, and determine emotional state information based on the preprocessed EEG signals; a music content synthesis module, configured to determine music generation control parameters based on the emotional state information, synthesize music content based on the music generation control parameters, and recommend the music content; A feedback information determination module is used to obtain feedback information of the music content, determine the regulatory effect of the music content on the emotional state information, and based on the regulatory effect, optimize the step of determining the emotional state information based on the preprocessed EEG signal and / or the step of determining the music generation control parameters based on the emotional state information.
12. A terminal, characterized in that: The terminal includes a memory, a processor, and a music recommendation feedback program based on EEG emotions stored in the memory and runnable on the processor. When the processor executes the music recommendation feedback program based on EEG emotions, the steps of the music recommendation feedback method based on EEG emotions as described in any one of claims 1 to 10 are implemented.
13. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a music recommendation feedback program based on EEG emotions, and the music recommendation feedback program based on EEG emotions implements the steps of the music recommendation feedback method based on EEG emotions as described in any one of claims 1 to 10 on the computer-readable storage medium.
Citation Information
Patent Citations
Music recommendation method and device based on context sensing
CN105975496A
An intelligent music recommendation system based on brain wave recognition
CN109815361A
Emotional chord music generation method and system based on EEG signal
CN119896484A
Music feedback training interface interaction method and system based on electroencephalogram data
CN119916938A
Cited By
Vehicle-mounted music recommendation method, device and equipment and readable storage medium
CN121542459A