Music recommendation method and device based on brain waves

By collecting and analyzing the user's brain wave signals, extracting emotional and attention characteristics, and recommending matching music in real time, the problem that existing music recommendation methods are difficult to meet personalized needs is solved, and high-precision music recommendation is achieved.

CN120011590APending Publication Date: 2025-05-16BEIJING HUAYIYUAN MEDICAL TECHNOLOGY CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510049709.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-13
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

The existing music recommendation methods are difficult to meet personalized needs and cannot accurately match the user's emotions and attention state.

Method used

By collecting the user's brain wave signals, extracting emotional characteristics and attention characteristics, and combining the music data in the music library, matched music to generate and recommend matching music in real time.

Benefits of technology

It achieves accurate matching of user emotions and attention states, reduces the difficulty of music screening, reduces computing resources, and improves the accuracy of music recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120011590A_ABST
    Figure CN120011590A_ABST
Patent Text Reader

Abstract

The invention discloses a music recommendation method and device based on brain waves, and belongs to the technical field of brain wave, and the method comprises the steps: collecting a brain wave signal of a user; extracting emotional features from the brain wave signals; extracting attention features from the brain wave signals; extracting initial music matched with the brain wave signal from a music library; and screening the initial music based on the emotion features and the attention features to obtain recommended music. According to the method, preliminary screening is carried out through the brain wave signals, then accurate screening is carried out through the emotional features and the attention features, the music screening difficulty can be reduced, operation resources are reduced, and the music recommendation accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of brain wave technology, and specifically relates to a brain wave-based music recommendation method and device. Background Art

[0002] In today's society, electroencephalogram (EEG) reading technology has been widely used in many fields such as medicine, entertainment, and education. With the diversified development of music, the existing music recommendation methods are difficult to meet people's needs. Therefore, the development of a smart headband technology based on EEG reading and real-time data processing to achieve accurate music recommendation has important research and application value. Summary of the invention

[0003] The purpose of this application is to provide a music recommendation method and device based on brain waves to solve the problem of the difficulty of music recommendation.

[0004] According to a first aspect of an embodiment of the present application, a method for recommending music based on brain waves is provided, comprising:

[0005] Collect the user's brain wave signals;

[0006] extracting emotional features from the brain wave signal;

[0007] extracting attention features from the brain wave signal;

[0008] Extracting initial music matching the brain wave signal from a music library;

[0009] The initial music is screened based on the emotion feature and the attention feature to obtain recommended music.

[0010] In some optional embodiments of the present application, collecting the user's brain wave signal includes:

[0011] Capturing the user's initial brain wave signals through multiple electrode sensors;

[0012] Converting the initial brain wave information into electrical signals;

[0013] The electrical signal is amplified by a signal amplifier to obtain the brain wave signal.

[0014] In some optional embodiments of the present application, extracting emotional features from the brain wave signal includes: extracting emotional features from the brain wave signal includes:

[0015] Processing the brain wave signal through a sliding window to obtain target brain wave data;

[0016] Extracting spatial features of the target brain wave data through a convolutional neural network;

[0017] Extracting the time series features of the target brain wave data through a recurrent neural network;

[0018] The spatial feature and the temporal feature are connected and then input into a classification model to obtain the emotion feature.

[0019] In some optional embodiments of the present application, the brain wave signal is processed through a sliding window to obtain target brain wave data, including:

[0020] Slicing the brain wave signal through a sliding window to obtain initial brain wave data;

[0021] The target brain wave data is obtained by normalizing the initial brain wave data through minimum-maximum normalization and Z-score normalization.

[0022] In some optional embodiments of the present application, extracting attention features from the brain wave signal includes:

[0023] Build an initial deep learning model;

[0024] The target deep learning model is obtained by training the initial deep learning model through a loss function, wherein the loss function includes an EEG data loss term, an eye movement data loss term, an ECG data loss term, and a skin galvanic response loss term;

[0025] The brain wave signal is input into the target deep learning model to obtain the attention feature.

[0026] In some optional embodiments of the present application, the weights of the EEG data loss item, the eye movement data loss item, the ECG data loss item and the galvanic skin response loss item decrease in sequence.

[0027] In some optional embodiments of the present application, extracting initial music matching the brain wave signal from a music library includes:

[0028] generating a target music rhythm based on the frequency of the brain wave signal;

[0029] generating a target music melody based on the complexity of the brain wave signal;

[0030] The initial music is extracted from a music library based on the target music tempo and the target music melody.

[0031] In some optional embodiments of the present application, after the initial music is screened based on the emotion feature and the attention feature to obtain the recommended music, the method further includes:

[0032] Playing the recommended music;

[0033] Collect the user's interactive brain wave signals;

[0034] extracting interactive attention features from the interactive brainwave signals;

[0035] Filtering the initial music based on the interactive attention feature to obtain interactive recommended music;

[0036] Play the interactively recommended music.

[0037] According to a second aspect of an embodiment of the present application, a brainwave-based music recommendation device is provided, comprising:

[0038] A collection module, used to collect the user's brain wave signals;

[0039] A first extraction module, used to extract emotional features from the brain wave signal;

[0040] A second extraction module, used to extract attention features from the brain wave signal;

[0041] A third extraction module is used to extract initial music matching the brain wave signal from a music library;

[0042] A screening module is used to screen the initial music based on the emotion feature and the attention feature to obtain recommended music.

[0043] According to a third aspect of an embodiment of the present application, an electronic device is provided, which may include:

[0044] processor;

[0045] a memory for storing processor-executable instructions;

[0046] The processor is configured to execute instructions to implement the brainwave-based music recommendation method as described in any one of the embodiments of the first aspect.

[0047] The above technical solution of the present application has the following beneficial technical effects:

[0048] The embodiment of the present application provides a music recommendation method based on brain waves. Preliminary screening through brain wave signals and then precise screening through emotional characteristics and attention characteristics can reduce the difficulty of music screening, reduce computing resources, and improve the accuracy of music recommendations. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 is a flowchart of a music recommendation method based on brain waves in an exemplary embodiment of the present application;

[0050] Figure 2is a flowchart of a music recommendation method based on brain waves in another exemplary embodiment of the present application;

[0051] Figure 3 is a schematic diagram of a brainwave-based music recommendation device in an exemplary embodiment of the present application;

[0052] Figure 4 is a schematic diagram of the structure of an electronic device in an exemplary embodiment of the present application;

[0053] Figure 5 It is a schematic diagram of the hardware structure of an electronic device in an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with specific implementations and with reference to the accompanying drawings. It should be understood that these descriptions are only exemplary and are not intended to limit the scope of the present application. In addition, in the following description, the description of known structures and technologies is omitted to avoid unnecessary confusion of the concepts of the present application.

[0055] The accompanying drawings show schematic diagrams of layer structures according to embodiments of the present application. These figures are not drawn to scale, and some details are magnified and some details may be omitted for the purpose of clarity. The shapes of various regions and layers shown in the figures and the relative sizes and positional relationships therebetween are only exemplary, and may deviate in practice due to manufacturing tolerances or technical limitations, and those skilled in the art may additionally design regions / layers with different shapes, sizes, and relative positions according to actual needs.

[0056] Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0057] In the description of the present application, it should be noted that the terms "first", "second" and "third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0058] In addition, the technical features involved in the different embodiments of the present application described below can be combined with each other as long as they do not conflict with each other.

[0059] The present application provides a music recommendation method based on brain waves, which is implemented through a smart headband device, a brain wave signal acquisition module, a data processing module and a data transmission module. The smart headband can read the user's brain wave signals in real time, and perform data processing and analysis, thereby realizing a variety of application functions, such as emotion monitoring, attention assessment, brain-computer interface, etc. At the same time, the present invention also introduces a music generation and recommendation algorithm, which generates and recommends music in real time according to the user's brain wave data to meet the user's personalized needs.

[0060] In the following, in conjunction with the accompanying drawings, a method and device for recommending music based on brain waves provided by an embodiment of the present application are described in detail through specific embodiments and their application scenarios.

[0061] like Figure 1 As shown, in the first embodiment of the present application, a music recommendation method based on brain waves is provided, comprising the following steps:

[0062] Step S101: collecting the user's brain wave signal;

[0063] Step S102: extracting emotion features from brain wave signals;

[0064] Step S103: extracting attention features from brain wave signals;

[0065] Step S104: extracting initial music matching the brain wave signal from the music library;

[0066] Step S105: Filter the initial music based on the emotion characteristics and attention characteristics to obtain recommended music.

[0067] This embodiment provides a music recommendation method based on brain waves. Preliminary screening through brain wave signals and then precise screening through emotional characteristics and attention characteristics can reduce the difficulty of music screening, reduce computing resources, and improve the accuracy of music recommendations.

[0068] In some embodiments, step S102 includes:

[0069] Emotional feature classification of brain wave signals through emotional feature extraction model:

[0070] Constructing an emotion feature extraction model, considering that different algorithms have their own advantages in EEG signal processing, the present invention proposes a method of merging two or more networks. The model combines convolutional neural networks, recurrent neural networks, fully connected layers and classifiers. In the task of capturing the time dependency in the sequence, the recurrent neural network algorithm is used to complete the calculation task and analyze the EEG activity state that changes over time; in the task of extracting local features and spatial relationships, the convolutional neural network is used again to analyze the spatial distribution and frequency characteristics of EEG to complete the calculation task and realize automatic feature extraction and classification of EEG signals. The model is trained so that it can automatically learn and extract complex features to achieve higher classification accuracy and generalization ability. The task of emotion feature classification is realized.

[0071] Specifically, the emotion feature extraction model includes:

[0072] Data preprocessing layer (Epoching): used to extract the initial EEG data of a specific time window from the continuous EEG signal. The initial EEG data is normalized, including minimum-maximum normalization and Z-score normalization to obtain the target EEG data to avoid data overfitting and make the features have standard normal distribution properties.

[0073] Feature extraction layer, i.e. convolutional layer: uses a multi-layer convolutional neural network to extract the spatial features of the EEG signal. For example, the first layer has 16 filters, the second layer has 8 filters, followed by a maximum pooling layer. Activation function: introduces nonlinear characteristics, usually using ReLU (Rectified Linear Unit) as the activation function.

[0074] Recurrent Layers Long Short-Term Memory Network (LSTM): used to process the time series characteristics of EEG signals and capture the timing characteristics of signals.

[0075] Autoencoders Encoder network: Converts input data into a high-dimensional representation and extracts key information by minimizing the reconstruction loss between input and output. Decoder network: Reconstructs the input data from the hidden layers to create a compressed representation.

[0076] Fully Connected Layers Dimensionality Reduction: Use a fully connected network to reduce feature dimensions, for example, a fully connected layer with 128 neurons.

[0077] Classifier SoftMax layer: The last layer uses the SoftMax function for emotion classification. Each neuron represents an emotion feature, which can include positive, neutral, and negative.

[0078] The emotion feature extraction model provided in this embodiment adopts a hybrid deep learning model: combining the advantages of CNN (convolutional neural network) and RNN (recurrent neural network), learning the time series features and spatial features of EEG signals at the same time. Parallel structure: In the integrated learning framework, the data is processed using a parallel structure, which improves the robustness and accuracy of the model. The features extracted by the autoencoder are flattened and connected to fuse the outputs of different sub-networks, enhancing the model's understanding of the complexity of EEG signals.

[0079] In some embodiments, step S103 includes:

[0080] Build an initial deep learning model;

[0081] The target deep learning model is obtained by training the initial deep learning model through the loss function, and the loss function includes EEG data loss term, eye movement data loss term, ECG data loss term and skin electrical response loss term;

[0082] The EEG signal is input into the target deep learning model to obtain the attention feature.

[0083] EEG signals combined with other physiological signals, such as eye movement data and ECG data, can reflect attention characteristics. Eye movement data can reflect the direction of visual attention, and ECG data can reflect the individual's emotional state and stress level to a certain extent. This information can be analyzed together with EEG signals to more comprehensively reflect attention characteristics. For example, when a person is highly focused, the eye movement trajectory is relatively stable, the brain waves show a specific pattern, and the ECG signal may also change accordingly.

[0084] Based on the correlation of physiological signals, EEG signals have the highest direct correlation with attention, so the EEG data loss item can be given the highest weight; based on the complementarity of signals, EOG (eye movement data) and ECG (electrocardiogram data) provide supplementary information that EEG (electrocardiogram signals) cannot directly provide, so the eye movement data loss item and the electrocardiogram data loss item can be given a higher weight; based on the stability and reliability of the signal, considering that the GSR (skin galvanic response) signal may be affected by various factors, its stability and reliability are relatively low, so the skin galvanic response loss item can be given a lower weight. The weight of the EEG data loss item can be greater than or equal to 0.3, the weight of the EEG data loss item can be 0.4, the weight of the eye movement data loss item can be greater than or equal to 0.1 and less than or equal to 0.4, the weight of the eye movement data loss item can be 0.3, the weight of the electrocardiogram data loss item can be greater than or equal to 0.1 and less than or equal to 0.4, the weight of the electrocardiogram data loss item can be 0.2, and the weight of the skin galvanic response loss item can be less than or equal to 0.2, and the weight of the skin galvanic response loss item can be 0.1.

[0085] The initial deep learning model can be a hybrid model of convolutional neural network (CNN) and recurrent neural network (RNN). CNN is good at processing the spatial characteristics of EEG signals (such as the signal relationship between different electrode positions), while RNN can process the time series characteristics of signals well. By combining the two, attention features can be mined more effectively from EEG signals.

[0086] Generative adversarial networks (GANs) are used for feature enhancement. GANs consist of a generator and a discriminator. The generator can generate data similar to the real brain wave attention features, and the discriminator is used to distinguish between real and generated data. Through continuous adversarial training, the ability to recognize attention features is improved, and the new data generated by the generator can be used to expand the training samples and improve the generalization ability of the model.

[0087] Specifically, the initial deep learning model includes:

[0088] Input layer: The input is the preprocessed EEG signal, usually a three-dimensional tensor with a shape of (batch_size, channels, time_steps)(batch_size, channels, time_steps).

[0089] Convolutional Layers: Use multiple convolutional layers to extract the spatial features of the EEG signal. Use 1D convolution, set multiple filters (for example, 64), and the convolution kernel size can be selected as 3 or 5.

[0090] Activation function: Use ReLU activation function.

[0091] Pooling Layers: Add a max pooling layer after the convolutional layer to reduce the feature dimension, using a 2x2 pooling window.

[0092] Attention Mechanism Layer: Introduce channel attention mechanism to calculate the weight of each channel to enhance the model's attention to important features. This can be achieved using the SE (Squeeze-and-Excitation) module.

[0093] Recurrent Layers: Use LSTM or GRU layers to capture time series features. Can be set to bidirectional LSTM to enhance the modeling ability of time dependencies.

[0094] Fully Connected Layers: One or more fully connected layers are connected after the LSTM layer, usually with 128 neurons and using the ReLU activation function.

[0095] Output Layer: The last layer is the Softmax layer, which outputs the classification results of the attention state. The number of categories depends on the specific task (for example, focused, distracted, etc.).

[0096] The loss function can be designed as a polynomial cross entropy loss as follows:

[0097]

[0098] Where: N is the number of samples. C is the number of categories. yij is the true label (one-hot encoding). y^ij is the probability predicted by the model. In the loss function, different weights can be introduced to balance the importance of each category, especially in the case of imbalanced categories. The weights can be set as follows:

[0099] For each category, set the weight wj, for example: w0 = 1.0w0 = 1.0 (category 0)w1 = 2.0w1 = 2.0 (category 1)w2 = 1.5w2 = 1.5 (category 2) The final loss function can be modified as follows:

[0100]

[0101] The choice of weights can be adjusted based on the number of samples in the category, for example, the inverse of the number of samples can be used as the basis for the weights.

[0102] In some embodiments, step S104 includes:

[0103] Build a music library, in which each piece of music contains multiple tags, such as melody, rhythm, harmony, timbre, etc.

[0104] The target music rhythm is matched by analyzing the frequency characteristics of brain waves. If the frequency of beta waves in brain waves is high and stable, it may match fast-paced music, such as fast-paced pop music or dance music, because this rhythm can echo the active state of the brain.

[0105] The target music melody is selected based on the complexity of the brainwaves. Complex brainwave patterns may match a melody with rich changes and large fluctuations, while simple brainwave patterns are suitable for simple, smooth melodies.

[0106] In some embodiments, step S105 includes:

[0107] Generate matching target music harmony and target music timbre based on attention features and emotion features, and obtain recommended music by screening initial music based on the target music harmony and target music timbre.

[0108] In terms of harmony, studies have found that different harmonies can cause different responses in the brain. Harmonious harmonies may be associated with a stable, relaxed brainwave state, while disharmony may trigger more complex, tense brainwave activity. For example, when brainwaves show a relaxed emotional signature, choose music that is dominated by harmonious chords, such as the main theme music in classical music; when brainwaves show a certain level of tension or attentional signature of a thinking state, choose music that contains some disharmony chords to increase the tension and thoughtfulness of the music, such as some works in modern music. Based on the comprehensive characteristics of brainwave signals, choose music that mixes different musical styles. For example, when brainwaves show a mixed state that includes both relaxed emotional signatures and tense attentional signatures, you can choose a work that combines classical music with electronic music elements from the music library. The soothing melody and structure of classical music can maintain a relaxed state, while the rhythm and modern sound effects of electronic music can attract attention. Or add some world music elements to meditation music, such as African drum beats or Indian music melodies, to create a musical experience that has both a meditative atmosphere and is culturally distinctive and fresh. This mixed style of music can better match the complex brain wave state.

[0109] like Figure 2 As shown, in the second embodiment of the present application, a method for music recommendation based on brain waves is provided, which is operated by a smart headband device, a brain wave signal acquisition module and a data processing module;

[0110] Among them, the smart headband device adopts an ergonomic design to ensure comfortable and stable wearing. Multiple electrode sensors are integrated inside the headband to capture the user's brain wave signals. These sensors are distributed in different positions of the headband to ensure the comprehensiveness and accuracy of signal acquisition. The brain wave signal acquisition module includes multiple high-sensitivity electrode sensors and signal amplifiers. The electrode sensor is responsible for capturing the user's brain wave signals and converting them into electrical signals. The signal amplifier amplifies the collected weak signals to improve the signal-to-noise ratio. The data processing module uses a high-performance embedded processor and AI algorithm, which can process and analyze brain wave signals in real time. The processing steps include signal filtering, feature extraction, and pattern recognition. Through these processes, the user's emotional state, attention level and other information can be identified.

[0111] The brainwave-based music recommendation method uses AI and machine learning technology to generate and recommend music in real time based on the user's brainwave data.

[0112] Specifically including: Data analysis: Analyze the user's current brain wave data and extract features such as emotions and attention.

[0113] Music matching: Generate music that matches the user's EEG data based on analysis and identification.

[0114] Music generation: Based on the analysis results, music clips that match the user's current mood and state are generated in real time.

[0115] Music recommendation: Select music that matches the user's current state from the pre-built and real-time generated music library and recommend it to the user.

[0116] The brainwave-based music recommendation method provided in this embodiment can read and process brainwave signals in real time, and provide instant feedback and response. The smart headband device is designed to be lightweight, easy to wear, and suitable for long-term use. Through different application software, the present invention can be used in various scenarios such as emotion monitoring, attention assessment, brain-computer interface, music generation and recommendation. High-sensitivity electrode sensors and advanced signal processing algorithms are used to ensure the accuracy of data collection and analysis. Music suitable for the wearer's brainwave state is matched through a model algorithm and can be generated dynamically. By recommending and generating music in real time, the user's personalized experience is enhanced and the use effect is enhanced.

[0117] In some embodiments, the smart headband device collects the user's brain wave signals, and analyzes the signal characteristics through the data processing module to identify the user's emotional state. The music generation and recommendation algorithm module generates music clips that match the user's current mood in real time based on the analysis results, or recommends matching music from the music library to enhance the user's emotional experience.

[0118] In some embodiments, the smart headband device monitors the user's brain wave signals in real time and evaluates the user's attention level. The music recommendation algorithm selects appropriate music from the music library based on the user's attention state to help the user concentrate or relax.

[0119] In some embodiments, the smart headband device reads the user's brain wave signals and identifies the user's intentions through the data processing module. The music generation algorithm generates interactive music in real time based on the user's brain wave data, and the user can achieve in-depth interaction with the rhythm and tone of the music through the dynamic transformation of brain waves.

[0120] like Figure 3 As shown, based on the same inventive concept, a third embodiment of the present application provides a music recommendation device based on brain waves, comprising:

[0121] The acquisition module 11 is used to acquire the user's brain wave signals;

[0122] A first extraction module 12, used to extract emotion features from brain wave signals;

[0123] A second extraction module 13, used to extract attention features from the brain wave signal;

[0124] The third extraction module 14 is used to extract the initial music matching the brain wave signal from the music library;

[0125] The screening module 15 is used to screen the initial music based on the emotion characteristics and the attention characteristics to obtain the recommended music.

[0126] Alternatively, if Figure 4 As shown, an embodiment of the present application also provides an electronic device 1100, including a processor 1101, a memory 1102, and a program or instruction stored in the memory 1102 and executable on the processor 1101. When the program or instruction is executed by the processor 1101, each process of the above-mentioned brain wave-based music recommendation method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0127] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0128] Figure 5 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.

[0129] The electronic device 1200 includes but is not limited to: a radio frequency unit 1201, a network module 1202, an audio output unit 1203, an input unit 1204, a sensor 1205, a display unit 1206, a user input unit 1207, an interface unit 1208, a memory 1209, and a processor 1210 and other components.

[0130] Those skilled in the art will appreciate that the electronic device 1200 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 1210 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 5 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0131] It should be understood that in the embodiment of the present application, the input unit 1204 may include a graphics processor (Graphics Processing Unit, GPU) 12041 and a microphone 12042, and the graphics processor 12041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 1206 may include a display panel 12061, and the display panel 12061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1207 includes a touch panel 12071 and other input devices 12072. The touch panel 12071 is also called a touch screen. The touch panel 12071 may include two parts: a touch detection device and a touch controller. Other input devices 12072 may include, but are not limited to, a physical keyboard, a function key (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here. The memory 1209 can be used to store software programs and various data, including but not limited to applications and operating systems. The processor 1210 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 1210.

[0132] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned brain wave-based music recommendation method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0133] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0134] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned brainwave-based music recommendation method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0135] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0136] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0137] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0138] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A music recommendation method based on brain waves, characterized in that: include: Collect the user's brain wave signals; extracting emotional features from the brain wave signal; extracting attention features from the brain wave signal; Extracting initial music matching the brain wave signal from a music library; The initial music is screened based on the emotion feature and the attention feature to obtain recommended music.

2. The method for music recommendation based on brain waves according to claim 1, characterized in that: Collect the user's brain wave signals, including: Capturing the user's initial brain wave signals through multiple electrode sensors; Converting the initial brain wave information into electrical signals; The electrical signal is amplified by a signal amplifier to obtain the brain wave signal.

3. The method for music recommendation based on brain waves according to claim 1, characterized in that: Extracting emotional features from the brain wave signal includes: Processing the brain wave signal through a sliding window to obtain target brain wave data; Extracting spatial features of the target brain wave data through a convolutional neural network; Extracting the time series features of the target brain wave data through a recurrent neural network; The spatial feature and the temporal feature are connected and then input into a classification model to obtain the emotion feature.

4. The method for music recommendation based on brain waves according to claim 3, characterized in that: Processing the brain wave signal through a sliding window to obtain target brain wave data includes: Slicing the brain wave signal through a sliding window to obtain initial brain wave data; The target brain wave data is obtained by normalizing the initial brain wave data through minimum-maximum normalization and Z-score normalization.

5. The method for music recommendation based on brain waves according to claim 3, characterized in that: Extracting attention features from the brain wave signal includes: Build an initial deep learning model; The target deep learning model is obtained by training the initial deep learning model through a loss function, wherein the loss function includes an EEG data loss term, an eye movement data loss term, an ECG data loss term, and a skin galvanic response loss term; The brain wave signal is input into the target deep learning model to obtain the attention feature.

6. The method for music recommendation based on brain waves according to claim 5, characterized in that: The weights of the EEG data loss item, the eye movement data loss item, the ECG data loss item and the skin electrical response loss item decrease in sequence.

7. The method for music recommendation based on brain waves according to claim 1, characterized in that: Extracting initial music matching the brain wave signal from the music library, including: generating a target music rhythm based on the frequency of the brain wave signal; generating a target music melody based on the complexity of the brain wave signal; The initial music is extracted from a music library based on the target music tempo and the target music melody.

8. The method for music recommendation based on brain waves according to claim 1, characterized in that: After the initial music is screened based on the emotion feature and the attention feature to obtain the recommended music, the method further includes: Playing the recommended music; Collect the user's interactive brain wave signals; extracting interactive attention features from the interactive brainwave signals; The initial music is screened based on the interactive attention feature to obtain interactive recommended music; Play the interactively recommended music.

9. A music recommendation device based on brain waves, characterized in that: include: A collection module, used to collect the user's brain wave signals; A first extraction module, used to extract emotional features from the brain wave signal; A second extraction module, used to extract attention features from the brain wave signal; A third extraction module is used to extract initial music matching the brain wave signal from the music library; A screening module is used to screen the initial music based on the emotion feature and the attention feature to obtain recommended music.

10. An electronic device, characterized in that: include: A processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements a brainwave-based music recommendation method as described in any one of claims 1 to 8.

Citation Information

Cited By

  • Electroencephalogram-based content recommendation method, system and equipment, medium and program product

    CN120974013A