Music recommendation device, method and system based on electroencephalogram emotion, terminal and medium
By collecting EEG signals through the headphone structure, identifying the user's emotional state and generating personalized music, the problem of insufficient emotion perception in existing technologies is solved, and real-time emotion regulation and personalized music recommendations are achieved.
Patent Information
- Application Number
- CN202511205735.2
- 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 have difficulty in perceiving users' emotional states in real time in music recommendation systems, resulting in insufficient personalized recommendations, low emotion recognition accuracy, and difficulty in coping with complex emotional changes.
A music recommendation device and method based on EEG emotions are designed. The device adopts a headphone structure, including a headband, earmuffs, forehead components and an EEG signal acquisition module. The device identifies emotional states by analyzing EEG signals and generates personalized music content.
It realizes closed-loop interactive regulation between the user's emotional state and music stimulation, provides a personalized and real-time emotion regulation mechanism, and enhances the adaptability and accuracy of music recommendations.
Smart Images

Figure CN120723934A_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 device, 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 using algorithms to analyze their neurophysiological characteristics and 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 still face significant technical bottlenecks in practical applications, primarily due to low emotion recognition accuracy and limited music generation methods. Most recommendations rely on label matching based on predefined music libraries, which is difficult to handle complex emotional fluctuations.
[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 device, method, system, terminal and medium for music recommendation 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 device based on EEG emotions, wherein the music recommendation device is configured as a headphone structure, and the music recommendation device includes: Headband structure; An earmuff structure, the earmuff structure being arranged on both sides of the headband structure through a telescopic kit; a forehead component, one end of which is connected to the earmuff structure, and the other end of which extends toward and contacts the forehead of the user; An EEG signal acquisition module, wherein the EEG signal acquisition module is embedded inside the forehead component; A processing module is arranged inside the earmuff structure and connected to the EEG signal acquisition module. The processing module is used to analyze and process the EEG signals collected by the EEG signal acquisition module, identify emotional state information, and generate and recommend music content based on the identified emotional state information.
[0005] In one implementation, the inner side of the forehead component is a flexible pad, and the EEG signal acquisition module is embedded in the flexible pad via a spring mechanism.
[0006] In one implementation, the EEG signal acquisition module includes at least three dry contact electrodes distributed in an array, and the three dry contact electrodes correspond to the FP1 brain area, the FP2 brain area, and the Fz brain area of the user's brain, respectively.
[0007] In one implementation, the earmuff structure includes an inner lining structure, and a reference electrode is provided on an edge of the inner lining structure.
[0008] In one implementation, the reference electrode includes eight dry contact electrodes, four of which are arranged on the left earcup structure, and the other four are arranged on the right earcup structure.
[0009] In one implementation, the acquisition frequency of the reference electrode is 500 Hz.
[0010] In one implementation, a miniature preamplifier is further provided in the forehead component, and the miniature preamplifier is connected to both the EEG signal acquisition module and the processing module, and is used to amplify the EEG signal acquired by the EEG signal acquisition module.
[0011] In one implementation, the processing module includes: an EEG signal digitization submodule, a noise suppression submodule, an audio submodule, and a power management submodule.
[0012] In a second aspect, an embodiment of the present invention further provides a method for recommending music based on EEG emotions based on the above-mentioned EEG emotion-based music recommendation device, 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; Music content is synthesized based on the music generation control parameters.
[0013] 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.
[0014] 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.
[0015] 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.
[0016] In one implementation, determining the note duration, note rhythm, and volume loudness based on the arousal level in the emotional state information includes: If the arousal level is greater, the note duration is determined to be shorter, the note rhythm is determined to be faster, and the volume is determined to be louder; If the arousal level is smaller, it is determined that the note duration is longer, the note rhythm is slower, and the volume loudness is smaller.
[0017] In one implementation, determining a pitch range and a harmonic mode based on the pleasantness in the emotional state information includes: If the pleasure level is greater, the pitch range is determined to be the high pitch area and the harmonic mode is determined to be the major key; If the pleasure level is smaller, the pitch range is determined to be the bass area and the harmonic mode is determined to be the minor key.
[0018] 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.
[0019] In a third aspect, an embodiment of the present invention further provides a music recommendation system based on EEG emotions, wherein the system is used to implement the steps of the music recommendation method based on EEG emotions described in the above solution, and the system includes: An emotional state analysis module, configured to collect EEG signals, pre-process the EEG signals, and determine emotional state information based on the pre-processed EEG signals; a control parameter determination module, configured to determine music generation control parameters based on the emotional state information; The music content synthesis module is used to synthesize music content based on the music generation control parameters.
[0020] In a fourth aspect, an embodiment of the present invention further provides a terminal, wherein the terminal includes a memory, a processor, and a music recommendation program based on EEG emotions stored in the memory and runnable on the processor. When the processor executes the music recommendation program based on EEG emotions, the steps of the music recommendation method based on EEG emotions of any one of the above-mentioned schemes are implemented.
[0021] In a fifth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein a music recommendation program based on EEG emotions is stored on the computer-readable storage medium, and the music recommendation program based on EEG emotions implements the steps of the music recommendation method based on EEG emotions described in any one of the above-mentioned schemes on the computer-readable storage medium.
[0022] Beneficial Effects: Compared to the prior art, the present invention provides a device and method for recommending music based on EEG emotions. The device comprises a headband structure, an earmuff structure, a forehead component, an EEG signal acquisition module, and a processing module. The earmuff structure is arranged on both sides of the headband structure via a telescopic assembly. One end of the forehead component is connected to the earmuff structure, and the other end extends toward and contacts the forehead of the user's brain. The EEG signal acquisition module is embedded in the inner side of the forehead component. The processing module is arranged within the earmuff structure and connected to the EEG signal acquisition module. The processing module is configured to analyze and process the EEG signals collected by the EEG signal acquisition module, identify emotional state information, and generate and recommend music content based on the identified emotional state information. The present invention's method for recommending music based on EEG emotions includes: first, acquiring EEG signals, preprocessing the EEG signals, and determining emotional state information based on the preprocessed EEG signals. Then, based on the emotional state information, music generation control parameters are determined. Finally, music content is synthesized based on the music generation control parameters. It can be seen that the present invention recognizes emotional states through EEG signals and combines emotional states with music synthesis, 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
[0023] Figure 1 This is a structural diagram of a music recommendation device based on EEG emotions provided by an embodiment of the present invention.
[0024] Figure 2This is a flowchart of a preferred embodiment of the EEG emotion-based music recommendation method provided in an embodiment of the present invention.
[0025] Figure 3 A schematic diagram of the technical architecture of the EEG emotion-based music recommendation method provided in an embodiment of the present invention.
[0026] Figure 4 This is a logical diagram of synthesizing music content based on emotional state information in the EEG emotion-based music recommendation method provided by an embodiment of the present invention.
[0027] Figure 5 This is a functional block diagram of the EEG emotion-based music recommendation system provided by an embodiment of the present invention.
[0028] Figure 6 This is a functional block diagram of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0029] 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.
[0030] 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.
[0031] 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.
[0032] 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 the ability to generalize across different 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.
[0033] In order to solve the problems of the prior art, the present invention provides a music recommendation device based on EEG emotions. 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.
[0034] 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.
[0035] 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.
[0036] 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.
[0037] 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.
[0038] 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.
[0039] 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.
[0040] Based on the above embodiment, the present invention provides a music recommendation method based on EEG emotions. The music recommendation 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 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.
[0041] 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.
[0042] 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.
[0043] 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.
[0044] Step S200: Determine music generation control parameters based on the emotional state information.
[0045] 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 3As 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 m, n, and l are preset parameters. The uniform function is used to generate a random floating-point number within a specified range, m∈[30,80], n∈[40,60], l∈[30,50]. The greater the arousal level, the louder the volume; 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.
[0046] 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.
[0047] 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.
[0048] Step S300: synthesize music content based on the music generation control parameters.
[0049] 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.
[0050] 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.
[0051] 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.
[0052] 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 of discrete music tag matching, that is, matching pre-stored tracks according to discrete classification labels corresponding to pleasure and arousal and playing them. In addition, this embodiment can also perform exception processing when the emotion recognition model cannot recognize the user's emotional state information. For example, the emotional state information cannot be recognized because the collected signal quality is lower than the threshold. At this time, audio output can be directly performed through the backup music library. In addition, this embodiment can also set up a user feedback system, through which users evaluate and feedback the output music content, and adjust the parameter mapping rules based on the feedback results or update the parameters of the emotion recognition model based on the feedback results to achieve parameter optimization, so as to improve the recognition accuracy of the emotion recognition model and facilitate subsequent recycling. When the parameter optimization is completed, the entire process ends.
[0053] Furthermore, the EEG emotion-based music recommendation method of the present invention can be embedded in wearable devices such as headphones or glasses to build a lightweight, invisible emotion regulation system. This 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.
[0054] Based on the above embodiments, the present invention also provides a music recommendation system based on EEG emotions, such as Figure 5 As shown in , the EEG emotion-based music recommendation system of this embodiment is used to implement the steps in the above method embodiment. The system includes: an emotional state analysis module 10, a control parameter determination module 20, and a music content synthesis module 30. Specifically, the emotional state analysis module 10 is used to collect EEG signals, preprocess the EEG signals, and determine emotional state information based on the preprocessed EEG signals. The control parameter determination module 20 is used to determine music generation control parameters based on the emotional state information. The music content synthesis module 30 is used to synthesize music content based on the music generation control parameters.
[0055] The working principles of each module in the EEG emotion-based music recommendation system of this embodiment are the same as the principles of each step in the above method embodiment, and will not be repeated here.
[0056] Each module in the EEG emotion-based music recommendation 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.
[0057] Based on the above embodiment, the present invention further provides a terminal, the principle block diagram of the terminal can be as follows: Figure 6 The terminal may include one or more processors 100 ( Figure 6 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 program based on EEG emotions. When one or more processors 100 execute computer program 102, each step of the embodiment of the method for recommending music 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 system based on EEG emotions can be implemented, without limitation herein.
[0058] 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.
[0059] 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.
[0060] Those skilled in the art will understand that Figure 6 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.
[0061] 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.
[0062] 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 device based on EEG emotions, characterized in that: The music recommendation device is configured as a headphone structure, and includes: Headband structure; An earmuff structure, the earmuff structure being arranged on both sides of the headband structure through a telescopic kit; a forehead component, one end of which is connected to the earmuff structure, and the other end of which extends toward and contacts the forehead of the user; An EEG signal acquisition module, wherein the EEG signal acquisition module is embedded inside the forehead component; A processing module is arranged inside the earmuff structure and connected to the EEG signal acquisition module. The processing module is used to analyze and process the EEG signals collected by the EEG signal acquisition module, identify emotional state information, and generate and recommend music content based on the identified emotional state information.
2. The music recommendation device based on EEG emotions according to claim 1, characterized in that: The inner side of the forehead component is a flexible pad, and the EEG signal acquisition module is embedded in the flexible pad via a spring mechanism.
3. The music recommendation device based on EEG emotions according to claim 1, characterized in that: The EEG signal acquisition module includes at least three dry contact electrodes distributed in an array form, and the three dry contact electrodes correspond to the FP1 brain area, FP2 brain area and Fz brain area of the user's brain respectively.
4. The EEG emotion-based music recommendation device according to claim 1, characterized in that: The earmuff structure includes an inner lining structure, and a reference electrode is provided on an edge of the inner lining structure.
5. The music recommendation device based on EEG emotions according to claim 4, characterized in that: The reference electrode includes 8 dry contact electrodes, four of which are arranged on the left earmuff structure, and the other four are arranged on the right earmuff structure.
6. The music recommendation device based on EEG emotions according to claim 5, characterized in that: The acquisition frequency of the reference electrode is 500 Hz.
7. The music recommendation device based on EEG emotions according to claim 1, characterized in that: A miniature preamplifier is also provided in the forehead component. The miniature preamplifier is connected to both the EEG signal acquisition module and the processing module and is used to amplify the EEG signal acquired by the EEG signal acquisition module.
8. The EEG emotion-based music recommendation device according to claim 1, characterized in that: The processing module includes: an EEG signal digitization submodule, a noise suppression submodule, an audio submodule and a power management submodule.
9. A method for recommending music based on EEG emotions based on the EEG emotion based music recommendation device according to any one of claims 1 to 8, 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; Music content is synthesized based on the music generation control parameters.
10. The music recommendation method based on EEG emotions according to claim 9, 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.
11. The music recommendation method based on EEG emotions according to claim 9, 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.
12. The music recommendation method based on EEG emotions according to claim 11, 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.
13. The music recommendation method based on EEG emotion according to claim 12, characterized in that: Determine note duration, note rhythm, and volume based on the arousal level in the emotional state information, including: If the arousal level is greater, the note duration is determined to be shorter, the note rhythm is determined to be faster, and the volume is determined to be louder; If the arousal level is smaller, it is determined that the note duration is longer, the note rhythm is slower, and the volume loudness is smaller.
14. The music recommendation method based on EEG emotions according to claim 12, characterized in that: Determine the pitch range and harmonic mode based on the pleasantness of the emotional state information, including: If the pleasure level is greater, the pitch range is determined to be the high pitch area and the harmonic mode is determined to be the major key; If the pleasure level is smaller, the pitch range is determined to be the bass area and the harmonic mode is determined to be the minor key.
15. The music recommendation method based on EEG emotions according to claim 9, 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.
16. A music recommendation system based on EEG emotions, characterized by: The system is used to implement the steps of the EEG emotion-based music recommendation method according to any one of claims 9 to 15, and the system includes: An emotional state analysis module, configured to collect EEG signals, pre-process the EEG signals, and determine emotional state information based on the pre-processed EEG signals; a control parameter determination module, configured to determine music generation control parameters based on the emotional state information; The music content synthesis module is used to synthesize music content based on the music generation control parameters.
17. A terminal, characterized in that: The terminal includes a memory, a processor, and a music recommendation program based on EEG emotions stored in the memory and executable on the processor. When the processor executes the music recommendation program based on EEG emotions, the steps of the music recommendation method based on EEG emotions as described in any one of claims 9 to 15 are implemented.
18. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a music recommendation program based on EEG emotions, and the music recommendation program based on EEG emotions implements the steps of the music recommendation method based on EEG emotions as described in any one of claims 9 to 15 on the computer-readable storage medium.
Citation Information
Patent Citations
Emotional music recommendation method based on brain-computer interaction
CN103412646A
Device for controlling music player by using brainwaves
CN107527634A
Attention adjustment method and system based on binaural wave difference brain wave audio
CN112870522A
Earphone type electroencephalogram acquisition equipment
CN116807482A
Headset capable of being used for monitoring and adjusting emotional state
CN117714935A