Music pushing method and device, terminal equipment and storage medium
By acquiring and analyzing the time-frequency and frequency characteristics of the EEG signal of the user, and pushing and adjusting the music, the problem that the music push method in the prior art cannot personalize the user's emotional state, significantly improving the accuracy of music push.
Patent Information
- Application Number
- CN202410767063.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-13
- Publication Date
- 2024-12-13
AI Technical Summary
In the prior art, the music push method cannot personalize push to the actual emotional state of the user, resulting in low accuracy.
By obtaining the time-frequency characteristics of the user's EEG signal, determining its energy distribution, and pushing the target music based on the preset mapping relationship, adjusting the music based on the user's EEG signal frequency characteristics during playback to improve the accuracy of music push.
Through the energy distribution and frequency characteristics of the EEG signal, the pushed music is more in line with the actual needs of users, improving the accuracy and pertinence of music push.
Smart Images

Figure CN119126969A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of bioelectronic technology, and in particular to a music push method, apparatus, terminal device and storage medium. Background Art
[0002] Today's society is developing at a fast pace, and people are under great pressure in work and life, which may lead to increased mental stress. Excessive mental stress and frequent mood swings will affect people's normal work and life. When mental stress or mood swings are large, music can usually be used to relieve them.
[0003] In the related art, music is generally pushed to users randomly, and personalized push cannot be performed according to the actual situation of the user, resulting in low accuracy of music push. Summary of the invention
[0004] The embodiments of the present application provide a music push method, apparatus, terminal device and storage medium, which can solve the problem of low music push accuracy in related technologies.
[0005] In a first aspect, an embodiment of the present application provides a music push method, comprising: Acquire a first EEG signal of the user; Determining energy distribution of the first EEG signal according to the time-frequency characteristics of the first EEG signal, where the energy distribution includes energy of the first EEG signal in each EEG frequency band; Determine a first target music piece according to the energy distribution and a preset mapping relationship, wherein the preset mapping relationship is used to describe a corresponding relationship between the energy distribution and the music piece; Push the first target music to the user.
[0006] In some embodiments, determining the energy distribution of the first EEG signal according to the time-frequency characteristics of the first EEG signal includes: Decomposing the first EEG signal into a plurality of signal components in different signal frequency bands according to the time-frequency characteristics of the first EEG signal; A first EEG frequency band to which a signal frequency band of a first signal component belongs is determined from a plurality of EEG frequency bands, and energy of the first signal component is determined as energy of the first EEG signal in the first EEG frequency band, wherein the first signal component is any signal component.
[0007] In some embodiments, the preset mapping relationship is obtained by: Determine a sample energy distribution corresponding to the sample EEG signal, where the sample energy distribution includes the energy of the sample EEG signal in each EEG frequency band; The EEG frequency band with the largest corresponding energy value in the sample energy distribution is determined as the sample EEG frequency band; The music of the music type corresponding to the sample EEG frequency band is determined as the music of the sample energy distribution, wherein each EEG frequency band corresponds to a music type, and the music types include gong tune, shang tune, jiao tune, zhi tune and yu tune.
[0008] In some embodiments, after pushing the first target music to the user, the method further includes: During the playing of the first target music, obtaining a second EEG signal of the user; The first target music is adjusted according to the frequency characteristics of the second EEG signal.
[0009] In some embodiments, adjusting the first target music according to the frequency characteristics of the second EEG signal includes: Determine, according to the frequency characteristics of the second EEG signal, change information of the user's EEG frequency, wherein the change information includes the frequency change amplitude of the second EEG signal at each moment; The first target music piece is adjusted according to the change information.
[0010] In some embodiments, adjusting the first target music piece according to the change information includes: Generate a scoring data group for the first target music piece according to the change information and the preset scoring standard, wherein each frequency change amplitude corresponds to a scoring data, and the preset scoring standard is used to describe the corresponding relationship between the frequency change amplitude and the score; Predicting the score of each piece of music in the first piece of music set according to the score data group to obtain the score corresponding to each piece of music in the first piece of music set, wherein the pieces of music in the first piece of music set and the first target piece of music belong to the same piece of music type; The first target music piece is adjusted to a second target music piece, where the second target music piece is the music piece with the highest score in the first music piece set.
[0011] In some embodiments, determining the energy distribution of the first EEG signal according to the time-frequency characteristics of the first EEG signal includes: Decomposing the first EEG signal according to a preset signal decomposition rule to obtain multiple wavelet components in the time-frequency domain; For each wavelet component, determining a filtering threshold of the corresponding wavelet component according to a decomposition parameter of the corresponding wavelet component and a data length of the first electroencephalogram signal; Selecting a first wavelet component from the plurality of wavelet components, wherein the energy of the first wavelet component is greater than a filtering threshold corresponding to the first wavelet component; Determine a signal reconstructed from at least one first wavelet component selected as a simulated electrooculogram signal; The energy distribution of the differential signal is determined as the energy distribution of the first electroencephalogram signal, wherein the differential signal is a signal difference between the first electroencephalogram signal and the simulated electrooculogram signal.
[0012] In a second aspect, an embodiment of the present application provides a music push device, including: An acquisition unit, used for acquiring a first EEG signal of a user; An energy determination unit, configured to determine energy distribution of the first EEG signal according to time-frequency characteristics of the first EEG signal, wherein the energy distribution includes energy of the first EEG signal in each EEG frequency band; A music determining unit, configured to determine a first target music according to the energy distribution and a preset mapping relationship, wherein the preset mapping relationship is used to describe a corresponding relationship between the energy distribution and the music; The push unit is used to push the first target music to the user.
[0013] In a third aspect, an embodiment of the present application provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method of the first aspect above when executing the computer program.
[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method of the first aspect above is implemented.
[0015] Among them, the beneficial effects of the second to fourth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.
[0016] Compared with the prior art, the embodiments of the present application have the following beneficial effects: the energy distribution of the first EEG signal is determined by the time-frequency characteristics of the first EEG signal, and the music pushed to the user is determined based on the energy distribution and the preset mapping relationship. Since the energy distribution of the EEG signal can objectively reflect the user's brain activity state, and the brain activity state can reflect the user's actual emotional state, therefore, the target music is determined based on the energy distribution of the user's EEG signal and pushed to the user, so that the pushed music can be more in line with the user's actual needs. Compared with the random music pushed to the user in the related art, the music pushed by the present application is more targeted, which helps to improve the accuracy of music push. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1This is a flowchart of a music push method provided in an embodiment of the present application; Figure 2 This is a schematic diagram of energy distribution of a music push method provided in an embodiment of the present application; Figure 3 This is a flowchart of a music push method provided in an embodiment of the present application; Figure 4 This is a flowchart of a music push method provided in an embodiment of the present application; Figure 5 is a comparative schematic diagram of a threshold function of a music push method provided in an embodiment of the present application; Figure 6 is a schematic diagram of a music push method provided in an embodiment of the present application; Figure 7 It is a structural block diagram of a music push device provided in an embodiment of the present application; Figure 8 This is a structural block diagram of a music push terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0019] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0020] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0021] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0022] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0023] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0024] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0025] See also Figure 1 , Figure 1 A flowchart of a music push method provided in an embodiment of the present application is shown, including: Step 101: Acquire a first EEG signal of a user.
[0026] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, or an electronic device, music push device, computer, tablet computer and audio output device that can realize the above functions. The following takes the audio output device as an example to illustrate this embodiment and the following embodiments.
[0027] The first EEG signal may be an EEG signal of the user collected by an EEG collection device.
[0028] In practice, the music push device can obtain the user's first EEG signal in a variety of ways.
[0029] In one example, the data of the first EEG signal collected by the EEG collection device is stored in the target storage device, and the music push device obtains the data of the first EEG signal from the target storage device when pushing music. The target storage device may be a device for storing EEG signal data.
[0030] In another example, an EEG acquisition device is connected to a music push device, and a first EEG signal of a user is acquired through the EEG acquisition device, and the music push device acquires the acquired first EEG signal in real time.
[0031] Step 102: determining the energy distribution of the first EEG signal according to the time-frequency characteristics of the first EEG signal.
[0032] The energy distribution includes the energy of the first EEG signal in each EEG frequency band.
[0033] Among them, time-frequency features are usually the characteristics of EEG signals in two dimensions: time and frequency. Time-frequency features combine time domain features and frequency domain features, and can simultaneously capture the changes in time and periodic information of the signal in frequency.
[0034] EEG frequency bands are usually divided into frequency ranges based on the different frequencies of electrophysiological activities generated by the human brain when it is working. These electrophysiological activities can be expressed in the form of brain waves through EEG recording equipment. EEG frequency bands mainly include: Frequency band, Frequency band, Frequency band, Frequency band and Frequency band.
[0035] In one example, the audio output device calculates the energy of the first EEG signal in multiple frequency ranges by integrating the square of the signal amplitude of the first EEG signal in the time domain. Each frequency range of the first EEG signal is matched with an EEG frequency band. If the frequency range belongs to a certain EEG frequency band, the energy of the frequency range is determined as the energy of the first EEG signal in the EEG frequency band.
[0036] In another example, the first EEG signal is decomposed into multiple signal components according to the time-frequency characteristics of the first EEG signal. The energy of each signal component is calculated by integrating the square of the signal amplitude of the first EEG signal in the frequency domain. The frequency range of each signal component is matched with the EEG frequency band. If the matching result is that the frequency range belongs to a certain EEG frequency band, the energy of the corresponding signal component is determined as the energy of the first EEG signal in the EEG frequency band.
[0037] Step 103: Determine a first target music piece according to the energy distribution and the preset mapping relationship.
[0038] The preset mapping relationship is used to describe the corresponding relationship between energy distribution and music.
[0039] Among them, the music can be music of the five musical instruments of traditional Chinese medicine, pure music, classical music, etc. The modes of the five musical instruments of traditional Chinese medicine include: Gong mode, Shang mode, Jiao mode, Zheng mode and Yu mode. The preset mapping relationship can be pre-set according to the correspondence between the energy distribution and the music. The first target music can be the music corresponding to the energy distribution found in the preset mapping relationship. The energy distribution in the preset mapping relationship corresponds to a music of a certain type of music, and the mode includes at least one music. In the preset mapping relationship, an energy distribution can correspond to a music, or an energy distribution can correspond to a type of music.
[0040] In one example, a corresponding piece of music is searched in a preset mapping relationship according to the energy distribution of the first electroencephalogram signal, and the searched piece of music is determined as the first target piece of music.
[0041] In another example, a corresponding music type is searched in a preset mapping relationship according to the energy distribution of the first EEG signal, and a music piece is randomly determined from the searched music type as the first target music piece.
[0042] Step 104: Push the first target music to the user.
[0043] In the embodiment of the present application, since the energy distribution of the EEG signal can objectively reflect the user's brain activity state, and the brain activity state can reflect the user's actual emotional state, therefore, determining the target music based on the energy distribution of the user's EEG signal and pushing the target music to the user can make the pushed music more in line with the user's actual needs. Compared with the related art of randomly pushing music to users, the music pushed by the present application is more targeted, which helps to improve the accuracy of music push.
[0044] Since the scenarios for obtaining the first EEG signal are different, music can be pushed to the user in a variety of ways.
[0045] Scenario 1, obtaining the first EEG signal from the storage device: When the music push device is pushing music, it obtains the data of the user's first EEG signal from the target storage device. According to the time-frequency characteristics of the first EEG signal, the energy of the first EEG signal in multiple frequency ranges is determined. The frequency range is matched with the EEG frequency band. If the frequency range belongs to the EEG frequency band, the energy of the frequency range is used as the energy of the first EEG signal in the EEG frequency band, and the energy distribution of the first EEG signal in each EEG frequency band is obtained. According to the energy distribution and the preset mapping relationship, the corresponding music is searched, and the found music is determined as the first target music. Then, the target music is pushed to the user.
[0046] Scenario 2, obtaining the first EEG signal through the EEG acquisition device worn by the user: After the user wears the EEG acquisition device, sit quietly for 5 minutes, and then turn on the switch of the EEG acquisition device to collect EEG of the user. The user's EEG waveform is displayed through the display device. The music push device implements the acquisition of the first EEG signal collected by the EEG acquisition device. According to the time-frequency characteristics of the first EEG signal, the energy distribution of the first EEG signal is determined to be A. Through A, the corresponding music type is found in the preset mapping relationship as Gongdiao. Among them, the music belonging to Gongdiao includes: Plum Blossom Three Variations, Pingsha Luoyan, Gusu Xing and Yueer Gao. If the music randomly selected from the Gongdiao is Pingsha Luoyan, Pingsha Luoyan is determined as the first target music and pushed to the user.
[0047] In some optional implementations, step 102 can be implemented as follows: decomposing the first EEG signal into multiple signal components in different signal frequency bands based on the time-frequency characteristics of the first EEG signal; determining the first EEG frequency band to which the signal frequency band of the first signal component belongs from the multiple EEG frequency bands, and determining the energy of the first signal component as the energy of the first EEG signal in the first EEG frequency band, wherein the first signal component is any signal component.
[0048] The signal components may be components obtained by decomposing the first EEG signal into a plurality of mutually independent components. Each signal component of the first EEG signal has a different frequency range.
[0049] In one example, a short-time Fourier transform is performed on the first EEG signal, thereby decomposing the first EEG signal into a time-frequency domain to obtain signal components in multiple different signal frequency bands.
[0050] In another example, discrete wavelet decomposition is performed on the first EEG signal, thereby decomposing the first EEG signal into time-frequency domains to obtain signal components in multiple different signal frequency bands.
[0051] The first EEG frequency band is any EEG frequency band among a plurality of EEG frequency bands, and the signal frequency band of the first signal component belongs to the EEG frequency band.
[0052] In practice, the music push device can determine whether the first signal component belongs to the first EEG frequency band in a variety of ways.
[0053] In one example, the music push device matches the signal frequency band of each signal component with the first EEG frequency band for the first EEG frequency band. If the overlap between the first EEG frequency band and the signal frequency band of the first signal component reaches a preset overlap, it is determined that the signal frequency band of the first signal component belongs to the first EEG frequency band. Among them, the preset overlap can be pre-set to a positive number less than or equal to 1 according to the frequency of the first EEG signal, such as setting the preset overlap to 0.95, 0.87 or other values, which is not limited in this embodiment.
[0054] In another example, the music push device compares the frequency range of the first EEG frequency band with the frequency range of the first signal component. If the starting frequency of the first signal component is greater than or equal to the starting frequency of the first EEG frequency band, and the ending frequency of the first signal component is less than or equal to the ending frequency of the first EEG frequency band, it is determined that the signal frequency band of the first signal component belongs to the first EEG frequency band.
[0055] In another example, for example, the Daubechies wavelet function is used to perform discrete wavelet decomposition on the first EEG signal. Specifically, the db4 wavelet function can be used to perform a 6-layer decomposition on the first EEG signal to obtain 6 signal components, each signal component corresponds to a decomposition coefficient, and the decomposition coefficient corresponding to the signal component represents the energy of the signal component, wherein the frequency ranges of the 5 signal components correspond to the 5 EEG frequency bands, respectively. Referring to Table 1, Table 1 shows the correspondence between the 5 decomposition coefficients and the EEG frequency bands. Formula 1 can be used to calculate the energy proportion of the first EEG signal in different EEG frequency bands, and the energy proportion can be used to represent the energy distribution of the first EEG signal in different EEG frequency bands.
[0056] (1) In formula (1), Indicates The energy proportion of each signal component; Indicates Layer decomposition coefficient; Indicates the degree of compression or stretching of the wavelet function.
[0057] Table 1
[0058] In this embodiment, the first EEG signal is decomposed into signal components of multiple different signal frequency bands, and the energy of the signal component is used as the energy value of the EEG frequency band. Based on the relationship between the frequency range of the signal component and the frequency range of the EEG frequency band, the energy of each EEG frequency band can be determined, thereby more accurately reflecting the user's emotional state and helping to improve the accuracy of music push.
[0059] In some optional implementations, the preset mapping relationship is obtained by: determining a sample energy distribution corresponding to the sample EEG signal, the sample energy distribution including the energy of the sample EEG signal in each EEG frequency band; determining the EEG frequency band with the largest corresponding energy value in the sample energy distribution as the sample EEG frequency band; The music of the music type corresponding to the sample EEG frequency band is determined as the music of the sample energy distribution.
[0060] The sample EEG signal may be an EEG signal collected by an EEG collection instrument. The process of determining the sample energy distribution of the sample EEG signal is similar to the process of determining the energy distribution of the first EEG signal.
[0061] Among them, each EEG frequency band corresponds to a type of music, including Gongdiao, Shangdiao, Jiaodiao, Zhengdiao and Yudiao.
[0062] In one example, the energy of the sample EEG signal in each EEG frequency band is determined to obtain the sample energy distribution. Assuming that the EEG frequency band with the largest energy value in the sample energy distribution is the θ frequency band, the θ frequency band is used as the sample EEG frequency band. The θ frequency band indicates that the user's emotion is "anger". According to the principle of "sadness overcomes anger", the type of music corresponding to the sample energy distribution is determined to be Shang tune. Shang tune includes the following music: Spring Breeze Deyi, Walking Street, Jiangnan Hao, Zhuang Zhou Mengdie, etc.
[0063] In another example, refer to Figure 2 , Figure 2 is a schematic diagram of energy distribution. Assume that there are five types of sample energy distributions, as follows: Figure 2 (a) to Figure 2 As shown in (e) in . Music push can be performed based on the traditional Chinese medicine five-tone theory: First, use music that is synchronized with the user's emotional state, such as music full of contradictory emotions such as depression, sadness, and pain, so that the user's emotions resonate with the music. Then, according to the theory of emotional dialectical selection in the Chinese medicine five-tone theory, select music that counteracts the user's emotions according to the dialectical results and the principle of emotion overcoming emotion, and gradually change the emotion of the music so that the pushed music can match the user's actual emotional state, which helps to improve the accuracy of music push. Traditional Chinese five-tone music includes Gongdiao, Shangdiao, Jiaodiao, Zhengdiao and Yudiao, each with different modes and styles. As shown in Table 2, Table 2 shows the correspondence between different emotional states and music. Five-tone music not only covers a wide range of styles, but is also based on traditional Chinese culture and is more likely to cause emotional resonance. At the same time, the use of five-tone music in the form of pure music can also avoid the influence of language and lyrics content, allowing the subjects to focus more on the melody and rhythm of the music. Figure 2 In (a), the EEG frequency band corresponding to the maximum energy value is Frequency band, The frequency band indicates that the user's emotional state is "fear". According to the dialectical push solution of emotions, thinking overcomes fear. At this time, the corresponding music type is determined to be Gongdiao. Gongdiao music specifically includes: Saishangqu, Partridge Flying, Boat Song and Crow Crying at Night. In the same way, if the EEG frequency band corresponding to the maximum energy value is the θ band, the corresponding music type is Shangdiao. If the EEG frequency band corresponding to the maximum energy value is the α band, the corresponding music type is Jiaodiao. If the EEG frequency band corresponding to the maximum energy value is the β band, the corresponding music type is Zhidiao. If the EEG frequency band corresponding to the maximum energy value is the γ band, the corresponding music type is Yudiao.
[0064] Table 2
[0065] The method provided in this embodiment determines the energy distribution of the first EEG signal through the time-frequency characteristics of the first EEG signal, and determines the music to be pushed to the user based on the energy distribution and the preset mapping relationship. The embodiment of the present application can determine the target music to be pushed to the user based on the energy distribution of the EEG signal and the preset mapping relationship. Since the energy distribution of the EEG signal can objectively reflect the user's brain activity state, and the brain activity state can reflect the user's actual emotional state, the pushed music is more in line with the user's actual needs, avoiding the problem of randomly pushed music not matching the user's actual emotional state, and helping to improve the accuracy of music push.
[0066] In the optional implementation of each embodiment of the present application, refer to Figure 3 After the above step 104, the following steps 105-106 are also included.
[0067] Step 105: Acquire a second EEG signal of the user during the process of playing the first target music.
[0068] The second EEG signal may be an EEG signal of the user collected during the playing of the first target music.
[0069] Step 106: adjusting the first target music according to the frequency characteristics of the second EEG signal.
[0070] The frequency feature may be the frequency value of the EEG signal at different times in each EEG frequency band.
[0071] In one example, the variation range of the second EEG signal in each EEG frequency band is determined based on the frequency characteristics of the second EEG signal. The target variation range of the target EEG frequency band is obtained, and whether the user is interested in the first target music is determined based on the target variation range. If so, the first target music continues to be played. If not, the corresponding adjustment music is determined based on the frequency characteristics of the second EEG signal and the mapping relationship, and the first target music is switched to the adjustment music. The mapping relationship is used to describe the correspondence between the frequency characteristics and the music.
[0072] In another example, the variation of the second EEG signal in each EEG frequency band is determined based on the frequency characteristics of the second EEG signal. It is determined whether the variation is positive. If the variation is positive, the first target music piece continues to be played. If the variation is negative, the adjustment music piece is searched in the mapping relationship table based on the absolute value of the variation, and the first target music piece is switched to the adjustment music piece.
[0073] In some optional implementations, the above step 106 can be implemented as follows: determine the change information of the user's EEG frequency based on the frequency characteristics of the second EEG signal, the change information including the frequency change amplitude of the second EEG signal at each moment; and adjust the first target music based on the change information.
[0074] The EEG frequency may be the frequency of the user's EEG signal, and the frequency variation amplitude may be the difference between the frequency values of the EEG signal at different times.
[0075] As an example, the difference between the frequency values of the user's EEG signal at a set time is determined based on the frequency value of the second EEG signal at each time, and the difference is determined as the frequency change amplitude at the corresponding time.
[0076] As another example, a preset sampling moment is obtained, a frequency value at each sampling moment is obtained, and a frequency variation amplitude of the second EEG signal at each sampling moment is determined according to the frequency value at each sampling moment.
[0077] In one example, during the process of playing the first target piece of music, the music push device acquires the user's second electroencephalogram (EEG) signal. Assume that the frequency values of the second EEG signal in the α frequency band at time t1 and time t2 are rum(t1) and rum(t2) respectively, where time t1 is before time t2. Since research has shown that when listening to pleasant music, the frequency value in the α frequency band will increase. If rum(t2) > rum(t1), it indicates that the first target piece of music is the music that the user is interested in, and at this time, continue to play the first target piece of music for the user. If rum(t2) < rum(t1), it indicates that the user is not interested in the first target piece of music, and at this time, determine the change information of the second EEG signal according to the frequency characteristics of the second EEG signal. Further determine the target adjusted piece of music according to the change information, and switch the first target piece of music to the target adjusted piece of music.
[0078] In another example, during the process of playing the first target piece of music, the music push device acquires the user's second EEG signal. Assume that at time t2, time t3, time t4, time t5, and time t6, the frequency values of the second EEG signal in the α frequency band are rum(t2), rum(t3), rum(t4), rum(t5), and rum(t6) respectively, where time t2 is before time t6. Since research has shown that when listening to pleasant music, the frequency value in the α frequency band will increase. Use "1" to represent that the user is interested in the first target music, and use "0" to represent that the user is not interested in the second target music. If rum(t2) > rum(t3), rum(t3) < rum(t4), rum(t4) < rum(t5), rum(t5) < rum(t6), the above relationship can be expressed as 0, 1, 1, 1. It is thus determined that the user is interested in the first target piece of music, and continue to play the first target piece of music for the user. If rum(t2) > rum(t3), rum(t3) > rum(t4), rum(t4) < rum(t5), rum(t5) > rum(t6), the above relationship can be expressed as 0, 0, 1, 0. It is thus determined that the user is not interested in the first target piece of music, and at this time, determine the corresponding target adjusted piece of music according to the change information, and switch the first target piece of music to the target adjusted piece of music.
[0079] In some optional implementations, the above-mentioned step 1062 can be implemented through the following steps: generating a scoring data group for the first target music based on the change information and the preset scoring standard, wherein each frequency change amplitude corresponds to a scoring data, and the preset scoring standard is used to describe the correspondence between the frequency change amplitude and the score; predicting the score of each music in the first music set based on the scoring data group to obtain the score corresponding to each music in the first music set, wherein the music in the first music set and the first target music belong to the same music type; adjusting the first target music to the second target music, and the second target music is the music with the highest score in the first music set.
[0080] The scoring data group is composed of a plurality of scoring data. The frequency variation amplitude may be the difference between the frequency values at corresponding moments. The first music set may be a set of music pieces of the same music type as the first target music piece.
[0081] As an example, a scoring matrix for the first target music piece is generated based on the scoring data set. The scoring matrix is decomposed by a matrix decomposition model to obtain a predicted user matrix and a music matrix. The user matrix and the music matrix are dot-multiplied to obtain a predicted score for each music piece. The first target music piece is adjusted to the music piece with the largest predicted score.
[0082] As another example, the score of a piece of music can be predicted by a matrix decomposition algorithm. The matrix decomposition algorithm can be expressed by formula 2: (2) In formula (2), the input of the matrix decomposition algorithm is the user's music rating matrix R, and the output is the user matrix U and the music matrix M. Each row of the user matrix U represents a user vector, and each column of the matrix M represents a music vector. The user's predicted score for the music is obtained by the vector inner product of the user matrix and the music matrix To represent, the user matrix U and the music matrix M are learned by minimizing the difference between the predicted score and the actual score R.
[0083] R represents the user's rating matrix for the first target music. In this embodiment, the user's rating for the first target music is represented by the frequency change amplitude of the EEG frequency. Studies have shown that when hearing pleasant music, people's brain activity may undergo a variety of changes, including an increase in the frequency of the α band and the θ band, and a decrease in the activity level of the β wave. Therefore, for the α band, assuming that rum represents the frequency change amplitude, if rum=rum(T2)-rum(T1)>0, it means that the first target song can increase the user's EEG frequency in the α band, indicating that the user is interested in the first target music. If rum=rum(T2)-rum(T1)<0, it means that the first target song can reduce the user's EEG frequency in the α band, indicating that the user is not interested in the first target music. A binary function can be defined, and the binary function can refer to Formula 3: (3) In formula 3, Used to indicate user preference. =1, indicating that the user is interested in the first target song. =0, it indicates that the user is not interested in the first target music. A scoring matrix is generated based on a binary function.
[0084] In order to characterize the degree of awakening of the music to the user, the concept of confidence is introduced, that is, hour, The larger the value, the higher the degree of awakening of the music to the user. The confidence level can be expressed as follows: (4) when >0, About Linearly increasing, it is used to indicate that the stronger the change in EEG frequency is, the more interested the user is in the music. =0, the confidence is always equal to 1, indicating that the user has the same confidence in the music that he is not interested in. Represents the vector of user u, and represents the vector of music m. Therefore, the objective function of matrix decomposition after introducing confidence can be expressed by formula 5: (5) In formula 5, and are all d-dimensional vectors, d is the number of latent variables, K is the number of users, L is the number of music, and λ is the regularization parameter. The inner product of the objective function is used to represent the user's predicted preference for music and fit the actual preference , the fitting strength is given by control. And for The second term in the objective function is the regularization term, which is used to ensure the stability of numerical calculations and prevent overfitting. Specifically, the least squares method can be used to solve the objective function: First, Y is fixed to the previous iteration value or initial value, and X is optimized. At this time, Y is regarded as a constant, and the objective function is decomposed into multiple independent sub-functions, each of which is about For user u, the objective function can be expressed by formula 6: (6) For user u, the objective function can be transformed into a matrix form as shown in Formula 7: (7) in , which represents the vector of user u’s preference for each piece of music. , represents the matrix composed of all music vectors, is a diagonal matrix consisting of user u’s confidence in all music pieces, It can be expressed by formula 8: (8) For the objective function J Find the gradient and set it equal to 0. The solution formula can be referred to Formula 9: (9) For the objective function J The solution obtained after calculating the gradient can refer to formula 10: (10) Secondly, X is fixed to the previous iteration value or initial value, and Y is optimized. At this time, X is regarded as a constant, and the objective function is decomposed into multiple independent sub-functions, each of which is a function of . Similar to the process of optimizing X, the solution can be referred to formula 11: (11) In formula 11, , which represents the vector of all users’ preferences for music m. , represents the matrix composed of vectors of all users. is a diagonal matrix consisting of the confidence scores of all users’ preferences for music m, It can be expressed by formula 12: (12) Then, in order to reduce the complexity of the operation when implementing the algorithm, the above expression is simplified. The diagonal matrix is split into the sum of two parts. The split diagonal matrix can be expressed by formula 13: (13) In formula 13, I is the unit matrix, is a diagonal matrix, and most of the elements on the diagonal matrix are 0, so the expression of formula 13 can be rewritten as formula 14: (14) After decomposing it into two items, the first item is the same for each user and only needs to be calculated once and stored. It is a matrix whose diagonal lines are mostly zero, and the computational complexity is low. Therefore, the computation speed is greatly accelerated, and it is more suitable for deployment in the system to meet online computing needs. Finally, after solving the user matrix U and the music feature matrix M, the two matrices are multiplied to obtain the predicted score of each music, and the first target music is adjusted to the music with the largest predicted score.
[0085] The method proposed in this embodiment adjusts the first target music according to the frequency characteristics of the user's second EEG signal during the process of playing the first target music. The music pushed to the user can be adjusted according to the frequency characteristics of the EEG signal of the user during the process of listening to the first target music, so that the pushed music matches the user's brain activity, which helps to improve the accuracy of music push.
[0086] In the optional implementation of each embodiment of the present application, refer to Figure 4 The above step 102 can be implemented through the following steps: step 1021-step 1025.
[0087] Step 1021 , decompose the first EEG signal according to a preset signal decomposition rule to obtain a plurality of wavelet components in the time-frequency domain.
[0088] The preset signal decomposition rule may be a pre-set rule for decomposing the first EEG signal into multiple signals in the time-frequency domain. For example, the preset signal decomposition rule includes: discrete wavelet decomposition, short-time Fourier transform, etc. The wavelet component may be a signal component obtained by decomposing the first EEG signal.
[0089] As an example, the first EEG signal is subjected to discrete wavelet decomposition according to a preset decomposition coefficient to obtain a plurality of wavelet components of the first EEG signal in the time-frequency domain.
[0090] As another example, the first EEG signal is decomposed into shorter time segments according to a preset window function. Fourier transform is applied to each time segment to calculate the frequency components of the signal within the event frequency band. The Fourier transform results of all time segments are combined to obtain multiple wavelet components in the time-frequency domain.
[0091] Step 1022: for each wavelet component, determine a filtering threshold of the corresponding wavelet component according to the decomposition parameter of the corresponding wavelet component and the data length of the first EEG signal.
[0092] The decomposition parameter may be a coefficient of each layer when the first EEG signal is decomposed into wavelet components, and the wavelet components may also be called original wavelet coefficients. Each wavelet component corresponds to a decomposition parameter. The filter threshold filters out the signal corresponding to the EEG signal to retain the threshold of the electrooculogram signal.
[0093] As an example, the filtering threshold is positively correlated with the decomposition parameter and the data length. After the logarithm of the data length is calculated, it is multiplied by the decomposition coefficient of the corresponding wavelet component to obtain the filtering threshold of the corresponding wavelet component.
[0094] Step 1023: Filter the first wavelet component from the multiple wavelet components.
[0095] The energy of the first wavelet component is greater than the filtering threshold corresponding to the first wavelet component.
[0096] Step 1024: determine the signal reconstructed from the at least one first wavelet component that has been screened out as a simulated electrooculogram signal.
[0097] The simulated electrooculogram signal may be a signal obtained by reconstructing the wavelet components selected by the corresponding filtering threshold. The selected wavelet components may also be called estimated wavelet coefficients.
[0098] Step 1025: determine the energy distribution of the differential signal as the energy distribution of the first EEG signal.
[0099] The differential signal is the signal difference between the first electroencephalogram signal and the simulated electrooculogram signal.
[0100] As an example, the first EEG signal and the simulated EOG signal are input into an adaptive canceller, and the parameters of the adaptive canceller are adjusted using the recursive least square method to obtain a differential signal output by the adaptive canceller, wherein the differential signal is the EEG signal after the EOG signal is filtered out.
[0101] As another example, the simulated electrooculogram signal is subtracted from the first electroencephalogram signal to obtain a differential signal.
[0102] In one example, the electrooculogram noise is usually considered as the additive noise of the EEG signal, so the first EEG signal can be expressed by formula 15: (15) In formula 15, The first EEG signal. It is a clean EEG signal. Indicates electrooculogram signal. In order to improve the accuracy of music push, it is necessary to Specifically, the denoising can be done by using the wavelet adaptive algorithm with improved threshold: First, the wavelet transform translates and scales the base wavelet, and then convolves it with the original signal to better reflect the time-frequency characteristics of the original signal. The definition of the continuous wavelet change of a one-dimensional signal can be expressed by formula 16: (16) In formula 16, is the basis wavelet. is the conjugate complex number of the base wavelet. a>0 is the scale factor. is the translation factor. If the scale factor and translation factor are discretized, the discrete wavelet transform expression of the one-dimensional signal can be obtained. For the discretization of the scale factor, the scale parameter can be discretized in power series, that is, a is taken as For the discretization of the translation factor, we can Make uniform discrete values: The first EEG signal containing electrooculogram is decomposed by discrete wavelet, and the original wavelet coefficients obtained can be expressed by formula 17: (17) In Formula 17, j represents the scale of the wavelet transform. K represents the degree of compression or stretching of the wavelet function. N represents a set of natural numbers. Z represents a set of integers. By discretizing the scale factor and the translation factor, a set of wavelets is obtained. Therefore, the discrete wavelet transform obtains the coefficients of the sub-wavelet. Each set of coefficients represents a different frequency band component, which is equivalent to the process of filtering the original EEG signal step by step. Since the wavelet transform has a strong data-free correlation, after the discrete wavelet transform, the energy of the signal is concentrated in the sub-wavelet with larger coefficients, while the wavelet coefficients of the noise are smaller and distributed over the entire wavelet domain. Then, the wavelet coefficients related to the noise are reduced to 0 through threshold selection, and the wavelet coefficients related to the signal are retained, and then wavelet reconstruction is performed to restore the denoised signal. The embodiment of the present application uses a threshold function for filtering, where the threshold function can be expressed by Formula 18: (18) In formula 18, the threshold is the decomposition coefficient of the jth layer. N is the data length of the first EEG signal. The threshold of each wavelet coefficient varies with the number of decomposition layers. is the estimated coefficient, is the original coefficient. α is the adjustment factor. Adjusting α can change the shape of the threshold function to make it between the hard threshold function and the soft threshold function. When α=1, the threshold function image is as follows: Figure 5 As shown, Figure 5This is a schematic diagram comparing the estimated coefficients obtained using the threshold function proposed in the embodiment of the present application with the estimated coefficients obtained using the soft threshold function and the hard threshold function. The threshold function proposed in the present application overcomes the disadvantage of the hard threshold function being discontinuous at the demarcation point, and avoids local oscillations in the reconstructed signal. At the same time, the estimated coefficients obtained using the threshold function proposed in the present application have good tracking characteristics with the original coefficients, making the reconstructed signal closer to the original signal. After threshold processing is performed on the original wavelet coefficients, the estimated coefficients corresponding to the electrooculogram signal are retained. Signal reconstruction is performed based on the retained estimated coefficients to extract the reference electrooculogram signal from the first electroencephalogram signal. , the reference electrooculogram signal is the simulated electrooculogram signal. and The signal is input into the adaptive canceller, and the filter parameters are adjusted continuously using the recursive least squares method, and finally a clean EEG signal without electrooculogram is output. , the clean EEG signal is the differential signal.
[0103] In some embodiments, in order to more intuitively illustrate the advantages of the embodiments of the present application over the prior art, the commonly used electrooculography removal algorithms are compared in terms of signal-to-noise ratio change (ΔSignal-to-Noise Ratio, ΔSNR), normalized mean square error (Normalized Mean Square Error, NMSE) and mean absolute error of power spectral density in the 𝛿 frequency band (𝛿Power Spectral Density Mean Absolute Error, ) The difference under three indicators. ΔSNR is used to indicate the change in signal-to-noise ratio before and after EOG removal. The larger the ΔSNR, the less noise is contained in the denoised signal and the better the denoising effect. NMSE is used to measure the waveform similarity of the signal in the time domain. The smaller the NMSE, the closer the EEG signal after EOG removal is to the pure EEG signal waveform. The smaller the value of is, the smaller the energy loss of the EEG signal 𝛿 frequency band is during the denoising process. The denoising effect under the three indicators can be referred to Table 3: Table 3
[0104] In another example, refer to Figure 6, collect the user's EEG signals. Preprocess the collected EEG signals to remove the eye contact signals in the EEG signals to obtain clean EEG signals. Extract features from the clean EEG signals to obtain the user's EEG features, which include but are not limited to: wavelet energy, wavelet entropy and spectral asymmetry index. Input the extracted EEG features into the pre-trained support vector machine classifier to obtain the user's emotion type. Determine the corresponding target music based on the user's emotion type and the mapping relationship. Recommend music based on the target music. After pushing the target music to the user, continue to collect the user's EEG signals. Adjust the music push plan based on the frequency characteristics of the EEG signals collected during the playback of the target music. Push the adjusted music corresponding to the frequency characteristics to the user, and play the adjusted music.
[0105] The method proposed in the embodiment of the present application decomposes the first EEG signal to obtain multiple wavelet components in the time-frequency domain. Determine the filtering threshold of each wavelet component, and retain the wavelet components whose energy is greater than the filtering threshold. Reconstruct the retained wavelet components to obtain a simulated electrooculogram signal. The energy distribution of the differential signal between the simulated electrooculogram signal and the first EEG signal is determined as the energy distribution of the first EEG signal. The electrooculogram signal can be first extracted from the first EEG signal, and then the differential signal between the extracted electrooculogram signal and the first EEG signal is determined, thereby filtering out the electrooculogram signal in the first EEG signal, reducing the interference of the electrooculogram signal, and helping to improve the accuracy of music push.
[0106] See also Figure 7 , Figure 7 400 is a structural block diagram of a music push device 400 provided in an embodiment of the present application. In this embodiment, the music push device includes various units for executing Figure 1-Figure 6 For details, please refer to the steps in the corresponding embodiment. Figure 1-Figure 6 as well as Figure 1-Figure 6 For the convenience of explanation, only the parts related to this embodiment are shown. Figure 7 , the music push device 400 includes: An acquisition unit 401 is used to acquire a first EEG signal of a user; An energy determination unit 402 is used to determine the energy distribution of the first EEG signal according to the time-frequency characteristics of the first EEG signal, where the energy distribution includes the energy of the first EEG signal in each EEG frequency band; A music determining unit 403 is used to determine a first target music according to the energy distribution and a preset mapping relationship, wherein the preset mapping relationship is used to describe the corresponding relationship between the energy distribution and the music; The push unit 404 is used to push the first target music to the user.
[0107] As an embodiment of the present application, in the energy determination unit 402, the energy distribution of the first EEG signal is determined according to the time-frequency characteristics of the first EEG signal, including: decomposing the first EEG signal into signal components in multiple signal frequency bands according to the time-frequency characteristics of the first EEG signal; determining, from multiple EEG frequency bands, a first EEG frequency band to which the signal frequency band of the first signal component belongs, and determining the energy of the first signal component as the energy of the first EEG signal in the first EEG frequency band, wherein the first signal component is any signal component.
[0108] As an embodiment of the present application, the music push device 400 also includes a mapping relationship determination unit (not shown in the figure). The mapping relationship determination unit is used to determine the sample energy distribution corresponding to the sample EEG signal, and the sample energy distribution includes the energy of the sample EEG signal in each EEG frequency band; determine the EEG frequency band with the largest corresponding energy value in the sample energy distribution as the sample EEG frequency band; determine the music of the music type corresponding to the sample EEG frequency band as the music of the sample energy distribution, wherein each EEG frequency band corresponds to a music type, and the music types include gong tune, shang tune, jiao tune, zhi tune and yu tune.
[0109] As an embodiment of the present application, the music push device 400 further includes an adjustment unit (not shown in the figure). The adjustment unit is used to obtain the user's second EEG signal during the process of playing the first target music, and adjust the first target music according to the frequency characteristics of the second EEG signal.
[0110] As an embodiment of the present application, in an adjustment unit, the first target music is adjusted according to the frequency characteristics of the second EEG signal, including: determining the change information of the user's EEG frequency according to the frequency characteristics of the second EEG signal, the change information including the frequency change amplitude of the second EEG signal at each moment; and adjusting the first target music according to the change information.
[0111] As an embodiment of the present application, in an adjustment unit, the first target music is adjusted according to the change information, including: generating a scoring data group for the first target music according to the change information and a preset scoring standard, wherein each frequency change amplitude corresponds to a scoring data, and the preset scoring standard is used to describe the correspondence between the frequency change amplitude and the score; predicting the score of each music in the first music set according to the scoring data group to obtain the score corresponding to each music in the first music set, wherein the music in the first music set and the first target music belong to the same music type; adjusting the first target music to a second target music, and the second target music is the music with the highest score in the first music set.
[0112] As an embodiment of the present application, in the energy determination unit 402, the energy distribution of the first EEG signal is determined according to the time-frequency characteristics of the first EEG signal, including: decomposing the first EEG signal according to a preset signal decomposition rule to obtain multiple wavelet components in the time-frequency domain; for each wavelet component, determining the filtering threshold of the corresponding wavelet component according to the decomposition parameters of the corresponding wavelet component and the data length of the first EEG signal; screening the first wavelet component from the multiple wavelet components, wherein the energy of the first wavelet component is greater than the filtering threshold corresponding to the first wavelet component; determining the signal reconstructed by at least one screened first wavelet component as a simulated electrooculogram signal; and determining the energy distribution of the differential signal as the energy distribution of the first EEG signal, wherein the differential signal is the signal difference between the first EEG signal and the simulated electrooculogram signal.
[0113] The device provided in this embodiment determines the energy distribution of the first EEG signal through the time-frequency characteristics of the first EEG signal, and determines the music to be pushed to the user based on the energy distribution and the preset mapping relationship. Since the energy distribution of the EEG signal can objectively reflect the user's brain activity state, and the brain activity state can reflect the user's actual emotional state, therefore, determining the target music based on the energy distribution of the user's EEG signal and pushing the target music to the user can make the pushed music more in line with the user's actual needs. Compared with the random music pushing to the user in the related art, the music pushed by this application is more targeted, which helps to improve the accuracy of music push.
[0114] It should be understood that Figure 7 In the structural block diagram of the music push device shown in FIG. Figure 1-Figure 6 The steps in the corresponding embodiments, and for Figure 1-Figure 6 Each step in the corresponding embodiment has been explained in detail in the above embodiment. Figure 1-Figure 6 as well as Figure 1-Figure 6 The relevant descriptions in the corresponding embodiments are not repeated here.
[0115] Figure 8 is a structural block diagram of a terminal device provided by another embodiment of the present application. Figure 8 As shown, the terminal device 500 of this embodiment includes: a processor 501, a memory 502, and a computer program 503 stored in the memory 502 and executable on the processor 501, such as a program of a music push method. When the processor 501 executes the computer program 503, the steps in each embodiment of the above-mentioned music push method are implemented, such as Figure 1 Alternatively, the processor 501 executes the computer program 503 to implement the above Figure 7 The functions of each unit in the corresponding embodiment are, for example, Figure 7For details on the functions of the units 401 to 404 shown, please refer to Figure 7 The relevant descriptions in the corresponding embodiments are not repeated here.
[0116] Exemplarily, the computer program 503 may be divided into one or more units, one or more units are stored in the memory 502, and are executed by the processor 501 to complete the present application. One or more units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program 503 in the terminal device 500. For example, the computer program 503 may be divided into an acquisition unit, an energy determination unit, a music determination unit, a push unit, a mapping relationship determination unit, and an adjustment unit, and the specific functions of each unit are as described above.
[0117] The terminal device may include, but is not limited to, a processor 501 and a memory 502. Those skilled in the art will appreciate that Figure 8 It is only an example of the terminal device 500 and does not constitute a limitation of the terminal device 500. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the turntable terminal device may also include an input and output terminal device, a network access terminal device, a bus, etc.
[0118] The processor 501 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, etc.
[0119] The memory 502 may be an internal storage unit of the terminal device 500, such as a hard disk or memory of the terminal device 500. The memory 502 may also be an external storage terminal device of the terminal device 500, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device 500. Further, the memory 502 may also include both an internal storage unit of the terminal device 500 and an external storage terminal device. The memory 502 is used to store computer programs and other programs and data required by the turntable terminal device. The memory 502 may also be used to temporarily store data that has been output or is to be output.
[0120] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0121] If the integrated module is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Among them, the computer-readable storage medium can be non-volatile or volatile. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in computer-readable storage media can be appropriately increased or decreased according to the requirements of legislation and patent practices in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practices, computer-readable storage media do not include electrical carrier signals and telecommunication signals.
[0122] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application 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. 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 embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A music push method, characterized in that: The method comprises: Acquire a first EEG signal of the user; Determining energy distribution of the first EEG signal according to the time-frequency characteristics of the first EEG signal, wherein the energy distribution includes energy of the first EEG signal in each EEG frequency band; Determine a first target music piece according to the energy distribution and a preset mapping relationship, wherein the preset mapping relationship is used to describe a corresponding relationship between the energy distribution and the music piece; Push the first target music to the user.
2. The method according to claim 1, characterized in that Determining the energy distribution of the first EEG signal according to the time-frequency characteristics of the first EEG signal includes: Decomposing the first EEG signal into a plurality of signal components in different signal frequency bands according to the time-frequency characteristics of the first EEG signal; From multiple EEG frequency bands, determine a first EEG frequency band to which a signal frequency band of a first signal component belongs, and determine the energy of the first signal component as the energy of the first EEG signal in the first EEG frequency band, wherein the first signal component is any signal component.
3. The method according to claim 1, characterized in that The preset mapping relationship is obtained in the following manner: Determine a sample energy distribution corresponding to the sample EEG signal, wherein the sample energy distribution includes the energy of the sample EEG signal in each EEG frequency band; Determine the EEG frequency band with the largest corresponding energy value in the sample energy distribution as the sample EEG frequency band; The music of the music type corresponding to the sample EEG frequency band is determined as the music of the sample energy distribution, wherein each EEG frequency band corresponds to a music type, and the music types include gong tune, shang tune, jiao tune, zhi tune and yu tune.
4. The method according to any one of claims 1 to 3, characterized in that: After pushing the first target music to the user, the method further includes: During the playing of the first target music, obtaining a second EEG signal of the user; The first target music is adjusted according to the frequency characteristics of the second EEG signal.
5. The method according to claim 4, characterized in that The adjusting the first target music according to the frequency characteristics of the second EEG signal includes: Determine, according to the frequency characteristics of the second EEG signal, change information of the user's EEG frequency, wherein the change information includes the frequency change amplitude of the second EEG signal at each moment; The first target music is adjusted according to the change information.
6. The method according to claim 5, characterized in that The adjusting the first target music piece according to the change information includes: Generate a scoring data group for the first target music piece according to the change information and a preset scoring standard, wherein each frequency change amplitude corresponds to a scoring data, and the preset scoring standard is used to describe the corresponding relationship between the frequency change amplitude and the score; Predicting the score of each piece of music in the first music set according to the score data group to obtain the score corresponding to each piece of music in the first music set, wherein the music in the first music set and the first target music belong to the same music type; The first target music is adjusted to a second target music, where the second target music is the music with the highest score in the first music set.
7. The method according to any one of claims 1 to 3, characterized in that: Determining the energy distribution of the first EEG signal according to the time-frequency characteristics of the first EEG signal includes: Decomposing the first EEG signal according to a preset signal decomposition rule to obtain multiple wavelet components in the time-frequency domain; For each wavelet component, determining a filtering threshold of the corresponding wavelet component according to a decomposition parameter of the corresponding wavelet component and a data length of the first EEG signal; Selecting a first wavelet component from the plurality of wavelet components, wherein the energy of the first wavelet component is greater than a filtering threshold corresponding to the first wavelet component; Determine a signal reconstructed from at least one first wavelet component selected as a simulated electrooculogram signal; The energy distribution of the differential signal is determined as the energy distribution of the first electroencephalogram signal, wherein the differential signal is a signal difference between the first electroencephalogram signal and the simulated electrooculogram signal.
8. A music push device, characterized in that: include: An acquisition unit, used for acquiring a first EEG signal of a user; an energy determination unit, configured to determine energy distribution of the first EEG signal according to time-frequency characteristics of the first EEG signal, wherein the energy distribution includes energy of the first EEG signal in each EEG frequency band; A music determining unit, configured to determine a first target music according to the energy distribution and a preset mapping relationship, wherein the preset mapping relationship is used to describe a corresponding relationship between the energy distribution and the music; A push unit is used to push the first target music to the user.
9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Electroencephalogram-based content recommendation method, system and equipment, medium and program product
CN120974013A
