CN113995939A - Sleep music playing method and device based on electroencephalogram signals and terminal - Google Patents

Sleep music playing method and device based on electroencephalogram signals and terminal Download PDF

Info

Publication number
CN113995939A
CN113995939A CN202111652412.XA CN202111652412A CN113995939A CN 113995939 A CN113995939 A CN 113995939A CN 202111652412 A CN202111652412 A CN 202111652412A CN 113995939 A CN113995939 A CN 113995939A
Authority
CN
China
Prior art keywords
target
volume
music
brain activity
sleep
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111652412.XA
Other languages
Chinese (zh)
Other versions
CN113995939B (en
Inventor
韩璧丞
单思聪
阿迪斯
刘浩然
杨钊祎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Mental Flow Technology Co Ltd
Original Assignee
Shenzhen Mental Flow Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Mental Flow Technology Co Ltd filed Critical Shenzhen Mental Flow Technology Co Ltd
Priority to CN202111652412.XA priority Critical patent/CN113995939B/en
Publication of CN113995939A publication Critical patent/CN113995939A/en
Application granted granted Critical
Publication of CN113995939B publication Critical patent/CN113995939B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61MDEVICES FOR INTRODUCING MEDIA INTO, OR ONTO, THE BODY; DEVICES FOR TRANSDUCING BODY MEDIA OR FOR TAKING MEDIA FROM THE BODY; DEVICES FOR PRODUCING OR ENDING SLEEP OR STUPOR
    • A61M21/00Other devices or methods to cause a change in the state of consciousness; Devices for producing or ending sleep by mechanical, optical, or acoustical means, e.g. for hypnosis
    • A61M21/02Other devices or methods to cause a change in the state of consciousness; Devices for producing or ending sleep by mechanical, optical, or acoustical means, e.g. for hypnosis for inducing sleep or relaxation, e.g. by direct nerve stimulation, hypnosis, analgesia
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/369Electroencephalography [EEG]
    • A61B5/372Analysis of electroencephalograms
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61MDEVICES FOR INTRODUCING MEDIA INTO, OR ONTO, THE BODY; DEVICES FOR TRANSDUCING BODY MEDIA OR FOR TAKING MEDIA FROM THE BODY; DEVICES FOR PRODUCING OR ENDING SLEEP OR STUPOR
    • A61M21/00Other devices or methods to cause a change in the state of consciousness; Devices for producing or ending sleep by mechanical, optical, or acoustical means, e.g. for hypnosis
    • A61M2021/0005Other devices or methods to cause a change in the state of consciousness; Devices for producing or ending sleep by mechanical, optical, or acoustical means, e.g. for hypnosis by the use of a particular sense, or stimulus
    • A61M2021/0027Other devices or methods to cause a change in the state of consciousness; Devices for producing or ending sleep by mechanical, optical, or acoustical means, e.g. for hypnosis by the use of a particular sense, or stimulus by the hearing sense

Landscapes

  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Psychology (AREA)
  • Public Health (AREA)
  • Veterinary Medicine (AREA)
  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Biomedical Technology (AREA)
  • Heart & Thoracic Surgery (AREA)
  • General Health & Medical Sciences (AREA)
  • Anesthesiology (AREA)
  • Animal Behavior & Ethology (AREA)
  • Hematology (AREA)
  • Pain & Pain Management (AREA)
  • Acoustics & Sound (AREA)
  • Psychiatry (AREA)
  • Biophysics (AREA)
  • Pathology (AREA)
  • Medical Informatics (AREA)
  • Molecular Biology (AREA)
  • Surgery (AREA)
  • Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)
  • Measurement Of The Respiration, Hearing Ability, Form, And Blood Characteristics Of Living Organisms (AREA)

Abstract

The invention discloses a sleep music playing method, a device and a terminal based on electroencephalogram signals, wherein the method comprises the following steps: acquiring a sleep electroencephalogram signal of a target user; determining a target brain activity level corresponding to the sleep electroencephalogram signal; and determining target music and target volume according to the target brain activity level, and playing the target music according to the target volume. The music and the volume for assisting sleep are adjusted by monitoring the brain activity degree of the user in the sleep stage, so that the problem of poor hypnosis effect caused by the fact that a music sleep-assisting instrument in the prior art can only perform single-song circulation or list circulation with fixed volume and neglects the state change of the user in the sleep process is solved.

Description

Sleep music playing method and device based on electroencephalogram signals and terminal
Technical Field
The invention relates to the field of signal processing, in particular to a sleep music playing method, a device and a terminal based on electroencephalogram signals.
Background
The sleep is closely related to the recovery of the physiological function of the human body and the metabolism, and the high-quality sleep can ensure that the work and study efficiency of people is high, otherwise, the physical and psychological health is harmed. However, with the continuous development of society, the rhythm of life is accelerated, and more people are stressed in learning and sleep quality because of life, work and low sleep quality. The reasons for the poor sleep quality include mental, disease, environment, physical constitution, medicine and other factors. The low sleep quality seriously affects the health of human body and can cause forgetfulness and insipidity in spirit. Therefore, the sleep is inseparable from the physical and psychological functions of the human body, and has great influence on the health, normal life and normal work of the human body. After sleeping, the fatigue nerve cells can recover normal physiological functions, and the spirit and physical strength of people can be recovered. High-quality sleep is an important basis for healthy life, and studies show that sleep quality is more important than sleep time, and most insomnia is preventable and improvable. For many people, listening to music is a sleep trigger mechanism, and in recent studies on sleep, researchers found that of 1339 studied insomnia patients, 95% of them indicated that listening to music was the best intervention to aid sleep. However, the existing music sleep-aiding instrument can only perform single music circulation or list circulation with fixed volume, neglecting the state change of a user in the sleeping process and causing the problem of poor hypnosis effect.
Thus, there is still a need for improvement and development of the prior art.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a sleep music playing method, device and terminal based on electroencephalogram signals, aiming at solving the problem that the music sleep-assisting apparatus can only perform single song circulation or list circulation with fixed volume, neglects the state change of the user during the sleep process, and thus has poor hypnotic effect.
The technical scheme adopted by the invention for solving the problems is as follows:
in a first aspect, an embodiment of the present invention provides a sleep music playing method based on electroencephalogram signals, where the method includes:
acquiring a sleep electroencephalogram signal of a target user;
determining a target brain activity level corresponding to the sleep electroencephalogram signal;
and determining target music and target volume according to the target brain activity level, and playing the target music according to the target volume.
In one embodiment, the acquiring sleep electroencephalogram signals of a target user includes:
acquiring position data and time data corresponding to the target user;
and when the position data is located in a preset position range and the time data is located in a preset time period, acquiring the electroencephalogram signal of the target user to obtain the sleep electroencephalogram signal.
In one embodiment, the determining the target brain activity level corresponding to the sleep electroencephalogram signal includes:
determining signal frequency data corresponding to the sleep electroencephalogram signals;
acquiring a plurality of preset frequency ranges, wherein the frequency ranges respectively correspond to different brain activity levels;
determining a target frequency range corresponding to the signal frequency data from a plurality of frequency ranges;
taking the brain activity level corresponding to the target frequency range as the target brain activity level.
In one embodiment, the determining a target music and a target volume based on the target brain activity level comprises:
acquiring a preset music database, wherein the music database comprises a plurality of pieces of music, and each piece of music comprises a brain activity level label;
comparing the target brain activity level with the brain activity level label of each music in the music database to obtain a plurality of candidate music;
obtaining historical playing times corresponding to a plurality of candidate music respectively, and taking the candidate music with the highest historical playing time as the target music;
and acquiring the environmental volume of the environment where the target user is located, and determining the target volume according to the target brain activity level and the environmental volume.
In one embodiment, said determining said target volume based on said target brain activity level and said ambient volume comprises:
when the target brain activity level is higher than a preset level and the environmental volume is higher than a preset volume, taking a first volume as the target volume;
when the target brain activity level is higher than the preset level and the environmental volume is lower than or equal to the preset volume, taking a second volume as the target volume;
when the target brain activity level is lower than the preset level and the environmental volume is greater than the preset volume, taking a third volume as the target volume;
and when the target brain activity level is lower than the preset level and the environment volume is lower than or equal to the preset volume, taking a fourth volume as the target volume, wherein the first volume, the second volume, the third volume and the fourth volume are sequentially decreased.
In one embodiment, the method further comprises:
stopping playing the target music when the target brain activity level is a lowest level.
In a second aspect, an embodiment of the present invention further provides a sleep music playing device based on electroencephalogram signals, where the device includes:
the signal acquisition module is used for acquiring sleep electroencephalogram signals of a target user;
the level determination module is used for determining a target brain activity level corresponding to the sleep electroencephalogram signal;
and the music playing module is used for determining target music and target volume according to the target brain activity level and playing the target music according to the target volume.
In one embodiment, the signal acquisition module includes:
the data acquisition unit is used for acquiring position data and time data corresponding to the target user;
and the signal acquisition unit is used for acquiring the electroencephalogram signal of the target user to obtain the sleep electroencephalogram signal when the position data is located in a preset position range and the time data is located in a preset time period.
In one embodiment, the level determination module includes:
the frequency determining unit is used for determining signal frequency data corresponding to the sleep electroencephalogram signals;
the range acquisition unit is used for acquiring a plurality of preset frequency ranges, wherein the frequency ranges respectively correspond to different brain activity levels;
the range screening unit is used for determining a target frequency range corresponding to the signal frequency data from a plurality of frequency ranges;
a level determination unit, configured to use the brain activity level corresponding to the target frequency range as the target brain activity level.
In one embodiment, the music playing module includes:
the system comprises a database acquisition unit, a data processing unit and a data processing unit, wherein the database acquisition unit is used for acquiring a preset music database, the music database comprises a plurality of pieces of music, and each piece of music comprises a brain activity level label;
a tag comparison unit, configured to compare the target brain activity level with the brain activity level tag of each piece of music in the music database, so as to obtain a plurality of candidate music;
the music determining unit is used for acquiring historical playing times corresponding to a plurality of candidate music respectively and taking the candidate music with the highest historical playing time as the target music;
and the volume determining unit is used for acquiring the environmental volume of the environment where the target user is located and determining the target volume according to the target brain activity level and the environmental volume.
In one embodiment, the volume determination unit includes:
a first logic processing subunit, configured to use a first volume as the target volume when the target brain activity level is higher than a preset level and the environmental volume is higher than a preset volume;
a second logic processing subunit, configured to use a second volume as the target volume when the target brain activity level is higher than the preset level and the ambient volume is lower than or equal to a preset volume;
a third logic processing subunit, configured to use a third volume as the target volume when the target brain activity level is lower than the preset level and the environmental volume is greater than a preset volume;
a fourth logic processing subunit, configured to, when the target brain activity level is lower than the preset level and the environmental volume is lower than or equal to a preset volume, take a fourth volume as the target volume, where the first volume, the second volume, the third volume, and the fourth volume decrease in sequence.
In one embodiment, the apparatus further comprises:
and the music stopping module is used for stopping playing the target music when the target brain activity level is the lowest level.
In a third aspect, an embodiment of the present invention further provides a terminal, where the terminal includes a memory and one or more processors; the memory stores one or more programs; the program comprises instructions for executing the electroencephalogram signal-based sleep music playing method; the processor is configured to execute the program.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a plurality of instructions are stored, where the instructions are adapted to be loaded and executed by a processor to implement any of the above steps of the method for playing sleep music based on electroencephalogram signals.
The invention has the beneficial effects that: according to the embodiment of the invention, the sleep electroencephalogram signal of the target user is obtained; determining a target brain activity level corresponding to the sleep electroencephalogram signal; and determining target music and target volume according to the target brain activity level, and playing the target music according to the target volume. The music and the volume for assisting sleep are adjusted by monitoring the brain activity degree of the user in the sleep stage, so that the problem of poor hypnosis effect caused by the fact that a music sleep-assisting instrument in the prior art can only perform single-song circulation or list circulation with fixed volume and neglects the state change of the user in the sleep process is solved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a sleep music playing method based on electroencephalogram signals according to an embodiment of the present invention.
Fig. 2 is an internal block diagram of a sleep music playing device based on electroencephalogram signals according to an embodiment of the present invention.
Fig. 3 is a schematic block diagram of a terminal according to an embodiment of the present invention.
Detailed Description
The invention discloses a sleep music playing method, a device and a terminal based on electroencephalogram signals, and in order to make the purpose, technical scheme and effect of the invention clearer and clearer, the invention is further described in detail below by referring to the attached drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
The sleep is closely related to the recovery of the physiological function of the human body and the metabolism, and the high-quality sleep can ensure that the work and study efficiency of people is high, otherwise, the physical and psychological health is harmed. However, with the continuous development of society, the rhythm of life is accelerated, and more people are stressed in learning and sleep quality because of life, work and low sleep quality. The reasons for the poor sleep quality include mental, disease, environment, physical constitution, medicine and other factors. The low sleep quality seriously affects the health of human body and can cause forgetfulness and insipidity in spirit. Therefore, the sleep is inseparable from the physical and psychological functions of the human body, and has great influence on the health, normal life and normal work of the human body. After sleeping, the fatigue nerve cells can recover normal physiological functions, and the spirit and physical strength of people can be recovered. High-quality sleep is an important basis for healthy life, and studies show that sleep quality is more important than sleep time, and most insomnia is preventable and improvable. For many people, listening to music is a sleep trigger mechanism, and in recent studies on sleep, researchers found that of 1339 studied insomnia patients, 95% of them indicated that listening to music was the best intervention to aid sleep. However, the existing music sleep-aiding instrument can only perform single music circulation or list circulation with fixed volume, neglecting the state change of a user in the sleeping process and causing the problem of poor hypnosis effect.
Aiming at the defects in the prior art, the invention provides a sleep music playing method based on electroencephalogram signals, which comprises the following steps: acquiring a sleep electroencephalogram signal of a target user; determining a target brain activity level corresponding to the sleep electroencephalogram signal; and determining target music and target volume according to the target brain activity level, and playing the target music according to the target volume. The music and the volume for assisting sleep are adjusted by monitoring the brain activity degree of the user in the sleep stage, so that the problem of poor hypnosis effect caused by the fact that a music sleep-assisting instrument in the prior art can only perform single-song circulation or list circulation with fixed volume and neglects the state change of the user in the sleep process is solved.
As shown in fig. 1, the method comprises the steps of:
and S100, acquiring a sleep electroencephalogram signal of a target user.
Specifically, the target user in this embodiment may be any one implementation object of the method of the present invention. The brain electrical signal is the reflection of the physiological activity of the brain of a human body and can be recorded at any part of the head of the human body generally. When a human body is in different sleep states, the electroencephalogram signals of the human body have different signal characteristics. Therefore, the current brain activity degree of the target user can be determined by acquiring the electroencephalogram signals of the target user in the sleep stage, and further, the target user can be promoted to enter deep sleep by selecting appropriate music in a targeted manner.
In one implementation, the step S100 specifically includes the following steps:
s101, acquiring position data and time data corresponding to the target user;
and S102, when the position data is located in a preset position range and the time data is located in a preset time period, acquiring the electroencephalogram signal of the target user to obtain the sleep electroencephalogram signal.
Specifically, in order to obtain the sleep electroencephalogram of the target user, it is first necessary to determine that the users are currently in sleep stages. Because the sleeping time and the sleeping place of the target user are relatively fixed, whether the current position of the target user is in the common sleeping position and whether the current time is in the common falling asleep time can be judged by acquiring the position data and the time data of the target user. When the position of the target user is within the preset position range and the current time is within the preset time period, which indicates that the target user is possibly in a bedroom and the time for falling asleep is reached, the electroencephalogram signal of the target user starts to be collected, and the collected electroencephalogram signal is used as the sleep electroencephalogram signal.
As shown in fig. 1, the method comprises the steps of:
and S200, determining the target brain activity level corresponding to the sleep electroencephalogram signal.
Specifically, because the electroencephalograms acquired when the brain of the human body is in different activity degrees have different signal characteristics, the current brain activity degree of the target user can be determined by the acquired sleep electroencephalograms, in order to quantify the data, a plurality of brain activity levels are preset in the embodiment, and the brain activity level corresponding to the acquired sleep electroencephalograms is used as the target brain activity level.
In one implementation, the step S200 specifically includes the following steps:
step S201, determining signal frequency data corresponding to the sleep electroencephalogram signals;
step S202, acquiring a plurality of preset frequency ranges, wherein the frequency ranges respectively correspond to different brain activity levels;
step S203, determining a target frequency range corresponding to the signal frequency data from a plurality of frequency ranges;
step S204, the brain activity level corresponding to the target frequency range is used as the target brain activity level.
In brief, the present embodiment determines the corresponding brain tonic activity level based on the signal frequency of the currently acquired sleep electroencephalogram signal. Specifically, the sleep electroencephalogram signals are subjected to frequency domain analysis, and signal frequency data corresponding to the sleep electroencephalogram signals are obtained. In order to determine the correspondence between different frequencies and brain activity levels, the present embodiment presets a plurality of frequency ranges, each frequency range corresponding to one brain activity level. Determining the frequency range in which the currently acquired sleep electroencephalogram signal falls, namely obtaining a target frequency range, and then taking the brain activity level corresponding to the target frequency range as a target brain activity level.
As shown in fig. 1, the method further comprises the steps of:
step S300, determining target music and target volume according to the target brain activity level, and playing the target music according to the target volume.
Specifically, because the target user has different requirements for assisting sleep when the target user is in different brain activity levels, in order to meet the sleep-assisting requirements of the target user in different brain activity states, the present embodiment provides different music and playing volume for different brain activity levels. For example, a lower brain activity level indicates that the user is currently closer to deep sleep, and thus is more suitable for low-frequency and low-volume music; the higher the brain activity level is, the closer the user is to the waking state, so that music with medium frequency and slightly larger volume can be played.
In one implementation, the step S300 specifically includes the following steps:
step S301, acquiring a preset music database, wherein the music database comprises a plurality of pieces of music, and each piece of music comprises a brain activity level label;
step S302, comparing the target brain activity level with the brain activity level label of each music in the music database to obtain a plurality of candidate music;
step S303, obtaining historical playing times corresponding to a plurality of candidate music respectively, and taking the candidate music with the highest historical playing times as the target music;
step S304, obtaining the environmental volume of the environment where the target user is located, and determining the target volume according to the target brain activity level and the environmental volume.
Specifically, in this embodiment, a music database is preset, where the music database includes a plurality of pieces of music, and a brain activity level label is allocated to each piece of music in advance, where the label is used to indicate that the piece of music should be played when the target user is in what brain activity level. Since the same brain tonic activity level may correspond to a plurality of pieces of music, a plurality of pieces of candidate music may be matched from the music database based on the target brain tonic activity level in the present embodiment. Since familiar sounds are more likely to fall asleep, when a plurality of candidate music is matched, one of the music having the largest number of times of history play is selected as the target music. In addition, because the sensitivity of the human body to sound is different at different brain activity levels and the noise in the environment also interferes with the playing volume, the target volume adopted when the target music is played needs to be comprehensively determined according to the target brain activity level and the environment volume.
In an implementation manner, the step S304 specifically includes the following steps:
step S3041, when the target brain activity level is higher than a preset level and the environmental volume is higher than a preset volume, taking a first volume as the target volume;
step S3042, when the target brain activity level is higher than the preset level and the environmental volume is lower than or equal to a preset volume, taking a second volume as the target volume;
step S3043, when the target brain activity level is lower than the preset level and the environmental volume is greater than a preset volume, taking a third volume as the target volume;
step S3044, when the target brain activity level is lower than a preset level and the environmental volume is lower than or equal to a preset volume, taking a fourth volume as the target volume, where the first volume, the second volume, the third volume, and the fourth volume decrease sequentially.
Specifically, the present embodiment sets four playback volumes in advance. When the target brain active level is higher than the preset level and the environmental volume is higher than the preset volume, the target user is in a waking state at present, the environment where the target user is located is noisy, and in order to ensure that the target user can clearly hear the target music, a first higher volume is required to be adopted as the target volume; when the target brain active level is higher than the preset level and the environmental volume is lower than or equal to the preset volume, the target user is in a waking state at present and the environment where the target user is located is quite, so that a second volume lower than the first volume can be adopted as the target volume; when the active level of the target brain is lower than or at a preset level and the environmental volume is larger than the preset volume, the target user is in a sleeping or light sleeping state currently, the environment where the target user is located is noisy, and in order to avoid waking up the target user with too large volume, a third volume lower than the second volume is adopted as the target volume; when the target brain activity level is lower than or at a preset level and the environmental volume is larger than the preset volume, the target user is in a sleep or light sleep state at present, and the environment where the target user is located is quite quiet, so that a fourth volume lower than the third volume is adopted as the target volume.
In one implementation, the method further comprises:
step S3045, when the target brain activity level is the lowest level, stopping playing the target music.
Specifically, when the target brain activity level is the lowest level, it indicates that the target user is currently in a deep sleep state, and there is no need for sleep assistance, and in order to avoid interfering with the deep sleep of the target user, the target music is stopped playing, and a relatively quiet sleep environment is created for the target user.
Based on the above embodiment, the present invention further provides a sleep music playing device based on electroencephalogram signals, as shown in fig. 2, the device includes:
the signal acquisition module 01 is used for acquiring a sleep electroencephalogram signal of a target user;
the level determining module 02 is used for determining a target brain activity level corresponding to the sleep electroencephalogram signal;
and the music playing module 03 is configured to determine target music and target volume according to the target brain activity level, and play the target music according to the target volume.
In one implementation, the signal obtaining module 01 includes:
the data acquisition unit is used for acquiring position data and time data corresponding to the target user;
and the signal acquisition unit is used for acquiring the electroencephalogram signal of the target user to obtain the sleep electroencephalogram signal when the position data is located in a preset position range and the time data is located in a preset time period.
In one implementation, the level determining module 02 includes:
the frequency determining unit is used for determining signal frequency data corresponding to the sleep electroencephalogram signals;
the range acquisition unit is used for acquiring a plurality of preset frequency ranges, wherein the frequency ranges respectively correspond to different brain activity levels;
the range screening unit is used for determining a target frequency range corresponding to the signal frequency data from a plurality of frequency ranges;
a level determination unit, configured to use the brain activity level corresponding to the target frequency range as the target brain activity level.
In one implementation manner, the music playing module 03 includes:
the system comprises a database acquisition unit, a data processing unit and a data processing unit, wherein the database acquisition unit is used for acquiring a preset music database, the music database comprises a plurality of pieces of music, and each piece of music comprises a brain activity level label;
a tag comparison unit, configured to compare the target brain activity level with the brain activity level tag of each piece of music in the music database, so as to obtain a plurality of candidate music;
the music determining unit is used for acquiring historical playing times corresponding to a plurality of candidate music respectively and taking the candidate music with the highest historical playing time as the target music;
and the volume determining unit is used for acquiring the environmental volume of the environment where the target user is located and determining the target volume according to the target brain activity level and the environmental volume.
In one implementation, the volume determining unit includes:
a first logic processing subunit, configured to use a first volume as the target volume when the target brain activity level is higher than a preset level and the environmental volume is higher than a preset volume;
a second logic processing subunit, configured to use a second volume as the target volume when the target brain activity level is higher than the preset level and the ambient volume is lower than or equal to a preset volume;
a third logic processing subunit, configured to use a third volume as the target volume when the target brain activity level is lower than the preset level and the environmental volume is greater than a preset volume;
a fourth logic processing subunit, configured to, when the target brain activity level is lower than the preset level and the environmental volume is lower than or equal to a preset volume, take a fourth volume as the target volume, where the first volume, the second volume, the third volume, and the fourth volume decrease in sequence.
In one implementation, the apparatus further comprises:
and the music stopping module is used for stopping playing the target music when the target brain activity level is the lowest level.
Based on the above embodiments, the present invention further provides a terminal, and a schematic block diagram thereof may be as shown in fig. 3. The terminal comprises a processor, a memory, a network interface and a display screen which are connected through a system bus. Wherein the processor of the terminal is configured to provide computing and control capabilities. The memory of the terminal comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the terminal is used for connecting and communicating with an external terminal through a network. The computer program is executed by a processor to realize the sleep music playing method based on the electroencephalogram signal. The display screen of the terminal can be a liquid crystal display screen or an electronic ink display screen.
It will be understood by those skilled in the art that the block diagram shown in fig. 3 is a block diagram of only a portion of the structure associated with the inventive arrangements and is not intended to limit the terminals to which the inventive arrangements may be applied, and that a particular terminal may include more or less components than those shown, or may have some components combined, or may have a different arrangement of components.
In one implementation, one or more programs are stored in a memory of the terminal and configured to be executed by one or more processors include instructions for performing a brain electrical signal-based sleep music playback method.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, databases, or other media used in embodiments provided herein may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
In summary, the present invention discloses a sleep music playing method, device and terminal based on electroencephalogram signals, wherein the method includes: acquiring a sleep electroencephalogram signal of a target user; determining a target brain activity level corresponding to the sleep electroencephalogram signal; and determining target music and target volume according to the target brain activity level, and playing the target music according to the target volume. The music and the volume for assisting sleep are adjusted by monitoring the brain activity degree of the user in the sleep stage, so that the problem of poor hypnosis effect caused by the fact that a music sleep-assisting instrument in the prior art can only perform single-song circulation or list circulation with fixed volume and neglects the state change of the user in the sleep process is solved.
It is to be understood that the invention is not limited to the examples described above, but that modifications and variations may be effected thereto by those of ordinary skill in the art in light of the foregoing description, and that all such modifications and variations are intended to be within the scope of the invention as defined by the appended claims.

Claims (14)

1. A sleep music playing method based on electroencephalogram signals is characterized by comprising the following steps:
acquiring a sleep electroencephalogram signal of a target user;
determining a target brain activity level corresponding to the sleep electroencephalogram signal;
and determining target music and target volume according to the target brain activity level, and playing the target music according to the target volume.
2. The electroencephalogram signal-based sleep music playing method according to claim 1, wherein the acquiring of the sleep electroencephalogram signal of the target user comprises:
acquiring position data and time data corresponding to the target user;
and when the position data is located in a preset position range and the time data is located in a preset time period, acquiring the electroencephalogram signal of the target user to obtain the sleep electroencephalogram signal.
3. The method for playing sleep music based on electroencephalogram signals according to claim 1, wherein the determining the target brain activity level corresponding to the sleep electroencephalogram signals comprises:
determining signal frequency data corresponding to the sleep electroencephalogram signals;
acquiring a plurality of preset frequency ranges, wherein the frequency ranges respectively correspond to different brain activity levels;
determining a target frequency range corresponding to the signal frequency data from a plurality of frequency ranges;
taking the brain activity level corresponding to the target frequency range as the target brain activity level.
4. The method for playing sleep music based on electroencephalogram signals according to claim 1, wherein the determining target music and target volume according to the target brain activity level comprises:
acquiring a preset music database, wherein the music database comprises a plurality of pieces of music, and each piece of music comprises a brain activity level label;
comparing the target brain activity level with the brain activity level label of each music in the music database to obtain a plurality of candidate music;
obtaining historical playing times corresponding to a plurality of candidate music respectively, and taking the candidate music with the highest historical playing time as the target music;
and acquiring the environmental volume of the environment where the target user is located, and determining the target volume according to the target brain activity level and the environmental volume.
5. The EEG signal-based sleep music playback method of claim 4, wherein said determining said target volume from said target brain activity level and said ambient volume comprises:
when the target brain activity level is higher than a preset level and the environmental volume is higher than a preset volume, taking a first volume as the target volume;
when the target brain activity level is higher than the preset level and the environmental volume is lower than or equal to the preset volume, taking a second volume as the target volume;
when the target brain activity level is lower than the preset level and the environmental volume is greater than the preset volume, taking a third volume as the target volume;
and when the target brain activity level is lower than the preset level and the environment volume is lower than or equal to the preset volume, taking a fourth volume as the target volume, wherein the first volume, the second volume, the third volume and the fourth volume are sequentially decreased.
6. The EEG signal-based sleep music playing method according to claim 1, further comprising:
stopping playing the target music when the target brain activity level is a lowest level.
7. A sleep music playing device based on electroencephalogram signals is characterized by comprising:
the signal acquisition module is used for acquiring sleep electroencephalogram signals of a target user;
the level determination module is used for determining a target brain activity level corresponding to the sleep electroencephalogram signal;
and the music playing module is used for determining target music and target volume according to the target brain activity level and playing the target music according to the target volume.
8. The EEG signal-based sleep music playing device according to claim 7, wherein said signal acquisition module comprises:
the data acquisition unit is used for acquiring position data and time data corresponding to the target user;
and the signal acquisition unit is used for acquiring the electroencephalogram signal of the target user to obtain the sleep electroencephalogram signal when the position data is located in a preset position range and the time data is located in a preset time period.
9. The EEG-based sleep music playback device of claim 7, wherein said level determination module comprises:
the frequency determining unit is used for determining signal frequency data corresponding to the sleep electroencephalogram signals;
the range acquisition unit is used for acquiring a plurality of preset frequency ranges, wherein the frequency ranges respectively correspond to different brain activity levels;
the range screening unit is used for determining a target frequency range corresponding to the signal frequency data from a plurality of frequency ranges;
a level determination unit, configured to use the brain activity level corresponding to the target frequency range as the target brain activity level.
10. The EEG-based sleep music playing device according to claim 7, wherein said music playing module comprises:
the system comprises a database acquisition unit, a data processing unit and a data processing unit, wherein the database acquisition unit is used for acquiring a preset music database, the music database comprises a plurality of pieces of music, and each piece of music comprises a brain activity level label;
a tag comparison unit, configured to compare the target brain activity level with the brain activity level tag of each piece of music in the music database, so as to obtain a plurality of candidate music;
the music determining unit is used for acquiring historical playing times corresponding to a plurality of candidate music respectively and taking the candidate music with the highest historical playing time as the target music;
and the volume determining unit is used for acquiring the environmental volume of the environment where the target user is located and determining the target volume according to the target brain activity level and the environmental volume.
11. The electroencephalogram signal-based sleep music playback apparatus according to claim 10, wherein the volume determination unit includes:
a first logic processing subunit, configured to use a first volume as the target volume when the target brain activity level is higher than a preset level and the environmental volume is higher than a preset volume;
a second logic processing subunit, configured to use a second volume as the target volume when the target brain activity level is higher than the preset level and the ambient volume is lower than or equal to a preset volume;
a third logic processing subunit, configured to use a third volume as the target volume when the target brain activity level is lower than the preset level and the environmental volume is greater than a preset volume;
a fourth logic processing subunit, configured to, when the target brain activity level is lower than the preset level and the environmental volume is lower than or equal to a preset volume, take a fourth volume as the target volume, where the first volume, the second volume, the third volume, and the fourth volume decrease in sequence.
12. The EEG signal-based sleep music playback device of claim 7, further comprising:
and the music stopping module is used for stopping playing the target music when the target brain activity level is the lowest level.
13. A terminal, comprising a memory and one or more processors; the memory stores one or more programs; the program comprises instructions for executing the electroencephalogram signal-based sleep music playback method of any one of claims 1 to 6; the processor is configured to execute the program.
14. A computer-readable storage medium having stored thereon a plurality of instructions, wherein the instructions are adapted to be loaded and executed by a processor to implement the steps of the method for playing sleep music based on electroencephalogram signals according to any one of the above claims 1 to 6.
CN202111652412.XA 2021-12-31 2021-12-31 Sleep music playing method and device based on electroencephalogram signals and terminal Active CN113995939B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111652412.XA CN113995939B (en) 2021-12-31 2021-12-31 Sleep music playing method and device based on electroencephalogram signals and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111652412.XA CN113995939B (en) 2021-12-31 2021-12-31 Sleep music playing method and device based on electroencephalogram signals and terminal

Publications (2)

Publication Number Publication Date
CN113995939A true CN113995939A (en) 2022-02-01
CN113995939B CN113995939B (en) 2022-08-16

Family

ID=79932332

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111652412.XA Active CN113995939B (en) 2021-12-31 2021-12-31 Sleep music playing method and device based on electroencephalogram signals and terminal

Country Status (1)

Country Link
CN (1) CN113995939B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115137315A (en) * 2022-09-06 2022-10-04 深圳市心流科技有限公司 Sleep environment scoring method, device, terminal and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105126187A (en) * 2015-08-31 2015-12-09 杭州回车电子科技有限公司 Method and system for assisting sleeping through brain waves
WO2016165308A1 (en) * 2015-04-13 2016-10-20 惠州Tcl移动通信有限公司 System adjustment method and apparatus based on user state
CN108391197A (en) * 2018-04-20 2018-08-10 张涛涛 Speaker with automatic adjusument function and its adaptive regulation method
CN108683969A (en) * 2018-05-14 2018-10-19 深圳市零度智控科技有限公司 Volume and audio method of adjustment, stereo set and computer readable storage medium
CN109561219A (en) * 2018-12-21 2019-04-02 努比亚技术有限公司 Music adjusting method, device, mobile terminal and readable storage medium storing program for executing
CN109669546A (en) * 2019-01-30 2019-04-23 浙江强脑科技有限公司 Music control method, device and computer readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016165308A1 (en) * 2015-04-13 2016-10-20 惠州Tcl移动通信有限公司 System adjustment method and apparatus based on user state
CN105126187A (en) * 2015-08-31 2015-12-09 杭州回车电子科技有限公司 Method and system for assisting sleeping through brain waves
CN108391197A (en) * 2018-04-20 2018-08-10 张涛涛 Speaker with automatic adjusument function and its adaptive regulation method
CN108683969A (en) * 2018-05-14 2018-10-19 深圳市零度智控科技有限公司 Volume and audio method of adjustment, stereo set and computer readable storage medium
CN109561219A (en) * 2018-12-21 2019-04-02 努比亚技术有限公司 Music adjusting method, device, mobile terminal and readable storage medium storing program for executing
CN109669546A (en) * 2019-01-30 2019-04-23 浙江强脑科技有限公司 Music control method, device and computer readable storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115137315A (en) * 2022-09-06 2022-10-04 深圳市心流科技有限公司 Sleep environment scoring method, device, terminal and storage medium

Also Published As

Publication number Publication date
CN113995939B (en) 2022-08-16

Similar Documents

Publication Publication Date Title
CN114010206B (en) Sleep plan customizing method, system and terminal based on electroencephalogram signals
CN107595245B (en) Sleep management method, system and terminal equipment
CN109464130B (en) Sleep assisting method, system and readable storage medium
Schönauer et al. Strengthening procedural memories by reactivation in sleep
US9949714B2 (en) Method, electronic apparatus, and computer readable medium of constructing classifier for disease detection
Vierling-Claassen et al. Modeling GABA alterations in schizophrenia: a link between impaired inhibition and altered gamma and beta range auditory entrainment
CN114053551B (en) Electroencephalogram signal-based auxiliary sleep-helping method and device, terminal and storage medium
Schechtman et al. Multiple memories can be simultaneously reactivated during sleep as effectively as a single memory
US20150217082A1 (en) Sleep assistant system, method, and non-transitory computer-readable medium for assisting in easing hardship of falling asleep
CN113995939B (en) Sleep music playing method and device based on electroencephalogram signals and terminal
Alhanbali et al. Dimensions of self-reported listening effort and fatigue on a digits-in-noise task, and association with baseline pupil size and performance accuracy
CN114511160B (en) Method, device, terminal and storage medium for predicting sleep time
Whitmore et al. Targeted memory reactivation of face-name learning depends on ample and undisturbed slow-wave sleep
Creery et al. Electrophysiological markers of memory consolidation in the human brain when memories are reactivated during sleep
CN114247026A (en) Meditation training scoring method, device and terminal based on electroencephalogram signals
Hu et al. Adaptive computation of approximate entropy and its application in integrative analysis of irregularity of heart rate variability and intracranial pressure signals
CN114191684A (en) Sleep control method and device based on electroencephalogram, intelligent terminal and storage medium
Neagu et al. Investigating the reliability of pupillometry as a measure of individualized listening effort
Hennies et al. Cued memory reactivation during SWS abolishes the beneficial effect of sleep on abstraction
Muñoz-Torres et al. Amygdala and hippocampus dialogue with neocortex during human sleep and wakefulness
CN103093112A (en) Early warning method and device
US20230170097A1 (en) Methods and computing device related to sleep evaluation
WO2023236689A1 (en) High-frequency qrs waveform curve analysis method and apparatus, computer device and storage medium
CN116682556A (en) Clinical multisource data rehabilitation monitoring method
CN113842117A (en) Sleep data acquisition and processing method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant