Electronic device and method for detecting drowsiness state in electronic device
The electronic device accurately detects drowsiness by analyzing brainwave signals with advanced signal processing and AI, addressing noise interference to enhance safety in critical activities.
Patent Information
- Application Number
- PCT/KR2025/001156
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-03-22
- Filing Date
- 2025-01-21
- Publication Date
- 2025-09-25
AI Technical Summary
Existing methods for detecting drowsiness, particularly in critical situations like driving or studying, are not accurate enough due to noise interference in brainwave signals, making it difficult to reliably determine a user's drowsy state.
An electronic device uses a processor to analyze brainwave signals from an external wearable device, calculating power values and peak counts in specific frequency bands to determine a drowsy state by comparing these values to reference thresholds, and employs an artificial intelligence model to enhance accuracy.
The device provides precise detection of drowsiness by filtering noise and using advanced signal processing techniques, enabling timely notifications to users, thereby improving safety and alertness in relevant activities.
Smart Images

Figure KR2025001156_25092025_PF_FP_ABST
Abstract
Description
Electronic devices and methods for detecting drowsiness in electronic devices
[0001] The present disclosure relates to an electronic device and a method for detecting a drowsy state in the electronic device.
[0002] As brainwave signals can be used to interpret a user's activity state (e.g., sleep state or drowsiness state) or health state, various attempts using brainwave signals are emerging.
[0003] In particular, in situations where drowsiness is fatal, such as driving a car, or when the user is concentrating on studying or other subjects, and also for the purpose of healthcare, the user's activity status (e.g., sleep state or drowsiness state) or health status can be checked using brainwave signals.
[0004] The user's drowsiness state can be more accurately determined by using brain wave signals received from an external electronic device worn on a part of the user's body and noise included in the brain wave signals.
[0005] An electronic device according to an embodiment may include a communication circuit, a processor, and a memory storing instructions. The instructions according to an embodiment, when executed by the processor, may cause the wearable electronic device to obtain a power value of at least one frequency band among a plurality of frequency bands of an brainwave signal when receiving an brainwave signal from an external electronic device worn on a part of a user's body. The instructions according to an embodiment, when executed by the processor, may cause the wearable electronic device to determine a state of a time point user as a drowsy state when the power value is equal to or greater than a reference value and the number of peaks at a plurality of time points of the brainwave signal is equal to or greater than a first reference number.
[0006] A method for detecting a drowsy state in an electronic device according to one embodiment may include receiving an brain wave signal from an external electronic device worn on a part of a user's body. The method according to one embodiment may include obtaining a power value of at least one frequency band among a plurality of frequency bands of the brain wave signal, and determining that the user's state is a drowsy state if the power value is equal to or greater than a reference value and the number of peaks at a plurality of time points of the brain wave signal is equal to or greater than a first reference number.
[0007] In one embodiment, a non-volatile storage medium storing commands, wherein the commands are configured to cause the electronic device to perform at least one operation when executed by the electronic device, wherein the at least one operation may include an operation of receiving a brain wave signal from an external electronic device worn on a part of a user's body. In one embodiment, the at least one operation may include an operation of obtaining a power value of at least one frequency band among a plurality of frequency bands of the brain wave signal, and determining a state of the user as a drowsy state if the power value is equal to or greater than a reference value and the number of peaks at a plurality of time points of the brain wave signal is equal to or greater than a first reference number.
[0008] FIG. 1 is a block diagram of an electronic device within a network environment according to one embodiment.
[0009] FIG. 2 is a diagram for explaining an operation of an electronic device according to one embodiment of the present invention to receive brain wave signals from an external electronic device.
[0010] Figure 3 is a block diagram of an electronic device according to one embodiment.
[0011] FIG. 4 is a diagram for explaining a peak number detection operation in an electronic device according to one embodiment.
[0012] FIGS. 5A and 5B are flowcharts for explaining an operation of detecting a drowsy state in an electronic device according to one embodiment.
[0013] FIG. 6 is a flowchart illustrating an operation of detecting a drowsiness state using a first brain wave value in an electronic device according to one embodiment.
[0014] FIGS. 7A and 7B are flowcharts for explaining an operation of detecting a drowsiness state using a peak count in an electronic device according to one embodiment.
[0015] FIGS. 8A and 8B are flowcharts for explaining an operation of detecting a drowsiness state using a peak count in an electronic device according to one embodiment.
[0016] FIGS. 9A and 9B are flowcharts for explaining an operation of detecting a drowsy state in an electronic device according to one embodiment.
[0017] FIGS. 10A, 10B, and 10C illustrate experimental graphs for determining a drowsiness state in an electronic device according to one embodiment.
[0018] FIG. 1 is a block diagram of an electronic device (101) within a network environment (100) according to an embodiment. Referring to FIG. 1, in the network environment (100), the electronic device (101) may communicate with the electronic device (102) via a first network (198) (e.g., a short-range wireless communication network), or may communicate with at least one of the electronic device (104) or the server (108) via a second network (199) (e.g., a long-range wireless communication network). According to an embodiment, the electronic device (101) may communicate with the electronic device (104) via the server (108). According to one embodiment, the electronic device (101) may include a processor (120), a memory (130), an input module (150), an audio output module (155), a display module (160), an audio module (170), a sensor module (176), an interface (177), a connection terminal (178), a haptic module (179), a camera module (180), a power management module (188), a battery (189), a communication module (190), a subscriber identification module (196), or an antenna module (197). In some embodiments, the electronic device (101) may omit at least one of these components (e.g., the connection terminal (178)), or may have one or more other components added. In some embodiments, some of these components (e.g., the sensor module (176), the camera module (180), or the antenna module (197)) may be integrated into one component (e.g., the display module (160)).
[0019] The processor (120) may control at least one other component (e.g., a hardware or software component) of the electronic device (101) connected to the processor (120) by executing, for example, software (e.g., a program (140)), and may perform various data processing or calculations. According to one embodiment, as at least a part of the data processing or calculation, the processor (120) may store a command or data received from another component (e.g., a sensor module (176) or a communication module (190)) in a volatile memory (132), process the command or data stored in the volatile memory (132), and store the resulting data in a non-volatile memory (134). According to one embodiment, the processor (120) may include a main processor (121) (e.g., a central processing unit or an application processor) or a secondary processor (123) (e.g., a graphics processing unit, a neural processing unit (NPU), an image signal processor, a sensor hub processor, or a communication processor) that can operate independently or together therewith. For example, if the electronic device (101) includes a main processor (121) and a secondary processor (123), the secondary processor (123) may be configured to use less power than the main processor (121) or to be specialized for a specified function. The secondary processor (123) may be implemented separately from the main processor (121) or as a part thereof.
[0020] The auxiliary processor (123) may control at least a part of functions or states associated with at least one component (e.g., a display module (160), a sensor module (176), or a communication module (190)) of the electronic device (101), for example, on behalf of the main processor (121) while the main processor (121) is in an inactive (e.g., sleep) state, or together with the main processor (121) while the main processor (121) is in an active (e.g., application execution) state. In one embodiment, the auxiliary processor (123) (e.g., an image signal processor or a communication processor) may be implemented as a part of another functionally related component (e.g., a camera module (180) or a communication module (190)). In one embodiment, the auxiliary processor (123) (e.g., a neural network processing unit) may include a hardware structure specialized for processing artificial intelligence models. The artificial intelligence models may be generated through machine learning. This learning can be performed, for example, on the electronic device (101) itself where the artificial intelligence model is executed, or can be performed through a separate server (e.g., server (108)). The learning algorithm can include, for example, supervised learning, unsupervised learning, semi-supervised learning, or reinforcement learning, but is not limited to the examples described above. The artificial intelligence model can include multiple artificial neural network layers.The artificial neural network may be one of a deep neural network (DNN), a convolutional neural network (CNN), a recurrent neural network (RNN), a restricted Boltzmann machine (RBM), a deep belief network (DBN), a bidirectional recurrent deep neural network (BRDNN), a deep Q-network, or a combination of two or more of the above, but is not limited to the examples described above. In addition to, or alternatively to, a hardware structure, an artificial intelligence model may include a software structure.
[0021] The memory (130) can store various data used by at least one component (e.g., processor (120) or sensor module (176)) of the electronic device (101). The data can include, for example, software (e.g., program (140)) and input data or output data for commands related thereto. The memory (130) can include volatile memory (132) or non-volatile memory (134).
[0022] The program (140) may be stored as software in the memory (130) and may include, for example, an operating system (142), middleware (144), or an application (146).
[0023] The input module (150) can receive commands or data to be used in a component of the electronic device (101) (e.g., a processor (120)) from an external source (e.g., a user) of the electronic device (101). The input module (150) can include, for example, a microphone, a mouse, a keyboard, a key (e.g., a button), or a digital pen (e.g., a stylus pen).
[0024] The audio output module (155) can output audio signals to the outside of the electronic device (101). The audio output module (155) can include, for example, a speaker or a receiver. The speaker can be used for general purposes, such as multimedia playback or recording playback. The receiver can be used to receive incoming calls. According to one embodiment, the receiver can be implemented separately from the speaker or as part of the speaker.
[0025] The display module (160) can visually provide information to an external party (e.g., a user) of the electronic device (101). The display module (160) may include, for example, a display, a holographic device, or a projector and a control circuit for controlling the device. According to one embodiment, the display module (160) may include a touch sensor configured to detect a touch, or a pressure sensor configured to measure the intensity of a force generated by the touch.
[0026] The audio module (170) can convert sound into an electrical signal, or vice versa, convert an electrical signal into sound. According to one embodiment, the audio module (170) can acquire sound through the input module (150), output sound through the sound output module (155), or an external electronic device (e.g., electronic device (102)) (e.g., speaker or headphone) directly or wirelessly connected to the electronic device (101).
[0027] The sensor module (176) can detect the operating status (e.g., power or temperature) of the electronic device (101) or the external environmental status (e.g., user status) and generate an electrical signal or data value corresponding to the detected status. According to one embodiment, the sensor module (176) can include, for example, a gesture sensor, a gyro sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a grip sensor, a proximity sensor, a color sensor, an IR (infrared) sensor, a biometric sensor, a temperature sensor, a humidity sensor, or an illuminance sensor.
[0028] The interface (177) may support one or more designated protocols that may be used to directly or wirelessly connect the electronic device (101) with an external electronic device (e.g., the electronic device (102)). In one embodiment, the interface (177) may include, for example, a high definition multimedia interface (HDMI), a universal serial bus (USB) interface, an SD card interface, or an audio interface.
[0029] The connection terminal (178) may include a connector through which the electronic device (101) may be physically connected to an external electronic device (e.g., electronic device (102)). According to one embodiment, the connection terminal (178) may include, for example, an HDMI connector, a USB connector, an SD card connector, or an audio connector (e.g., a headphone connector).
[0030] A haptic module (179) can convert electrical signals into mechanical stimuli (e.g., vibration or movement) or electrical stimuli that a user can perceive through tactile or kinesthetic sensations. According to one embodiment, the haptic module (179) can include, for example, a motor, a piezoelectric element, or an electrical stimulation device.
[0031] The camera module (180) can capture still images and videos. According to one embodiment, the camera module (180) may include one or more lenses, image sensors, image signal processors, or flashes.
[0032] The power management module (188) can manage power supplied to the electronic device (101). According to one embodiment, the power management module (188) can be implemented as, for example, at least a part of a power management integrated circuit (PMIC).
[0033] A battery (189) may power at least one component of the electronic device (101). In one embodiment, the battery (189) may include, for example, a non-rechargeable primary battery, a rechargeable secondary battery, or a fuel cell.
[0034] The communication module (190) may support the establishment of a direct (e.g., wired) communication channel or a wireless communication channel between the electronic device (101) and an external electronic device (e.g., electronic device (102), electronic device (104), or server (108)), and the performance of communication through the established communication channel. The communication module (190) may operate independently from the processor (120) (e.g., application processor) and may include one or more communication processors that support direct (e.g., wired) communication or wireless communication. According to one embodiment, the communication module (190) may include a wireless communication module (192) (e.g., a cellular communication module, a short-range wireless communication module, or a global navigation satellite system (GNSS) communication module) or a wired communication module (194) (e.g., a local area network (LAN) communication module, or a power line communication module). Among these communication modules, the corresponding communication module can communicate with an external electronic device (104) via a first network (198) (e.g., a short-range communication network such as Bluetooth, wireless fidelity (WiFi) direct, or infrared data association (IrDA)) or a second network (199) (e.g., a long-range communication network such as a legacy cellular network, a 5G network, a next-generation communication network, the Internet, or a computer network (e.g., a LAN or WAN)). These various types of communication modules can be integrated into a single component (e.g., a single chip) or implemented as multiple separate components (e.g., multiple chips). The wireless communication module (192) can verify or authenticate the electronic device (101) within a communication network such as the first network (198) or the second network (199) by using subscriber information (e.g., an international mobile subscriber identity (IMSI)) stored in the subscriber identification module (196).
[0035] The wireless communication module (192) can support 5G networks and next-generation communication technologies following the 4G network, such as NR access technology (new radio access technology). The NR access technology can support high-speed transmission of high-capacity data (eMBB (enhanced mobile broadband)), minimization of terminal power and connection of multiple terminals (mMTC (massive machine type communications)), or high reliability and low latency (URLLC (ultra-reliable and low-latency communications)). The wireless communication module (192) can support, for example, a high-frequency band (e.g., mmWave band) to achieve a high data transmission rate. The wireless communication module (192) can support various technologies for securing performance in a high-frequency band, such as beamforming, massive multiple-input and multiple-output (MIMO), full dimensional MIMO (FD-MIMO), array antenna, analog beam-forming, or large scale antenna. The wireless communication module (192) can support various requirements specified in the electronic device (101), an external electronic device (e.g., the electronic device (104)), or a network system (e.g., the second network (199)). According to one embodiment, the wireless communication module (192) may support a peak data rate (e.g., 20 Gbps or more) for eMBB realization, a loss coverage (e.g., 164 dB or less) for mMTC realization, or a U-plane latency (e.g., 0.5 ms or less for downlink (DL) and uplink (UL), or 1 ms or less for round trip) for URLLC realization.
[0036] The antenna module (197) can transmit or receive signals or power to or from an external device (e.g., an external electronic device). According to one embodiment, the antenna module (197) may include an antenna including a radiator formed of a conductor or a conductive pattern formed on a substrate (e.g., a PCB). According to one embodiment, the antenna module (197) may include a plurality of antennas (e.g., an array antenna). In this case, at least one antenna suitable for a communication method used in a communication network, such as the first network (198) or the second network (199), may be selected from the plurality of antennas, for example, by the communication module (190). A signal or power may be transmitted or received between the communication module (190) and an external electronic device via the selected at least one antenna. According to some embodiments, in addition to the radiator, another component (e.g., a radio frequency integrated circuit (RFIC)) may be additionally formed as a part of the antenna module (197).
[0037] In one embodiment, the antenna module (197) may form a mmWave antenna module. In one embodiment, the mmWave antenna module may include a printed circuit board, an RFIC disposed on or adjacent a first side (e.g., a bottom side) of the printed circuit board and capable of supporting a designated high frequency band (e.g., a mmWave band), and a plurality of antennas (e.g., an array antenna) disposed on or adjacent a second side (e.g., a top side or a side side) of the printed circuit board and capable of transmitting or receiving signals in the designated high frequency band.
[0038] At least some of the above components can be interconnected and exchange signals (e.g., commands or data) with each other via a communication method between peripheral devices (e.g., a bus, GPIO (general purpose input and output), SPI (serial peripheral interface), or MIPI (mobile industry processor interface)).
[0039] According to one embodiment, commands or data may be transmitted or received between the electronic device (101) and an external electronic device (104) via a server (108) connected to a second network (199). Each of the external electronic devices (102 or 104) may be the same or a different type of device as the electronic device (101). According to one embodiment, all or part of the operations executed in the electronic device (101) may be executed in one or more of the external electronic devices (102, 104, or 108). For example, when the electronic device (101) is to perform a certain function or service automatically or in response to a request from a user or another device, the electronic device (101) may, instead of or in addition to executing the function or service itself, request one or more external electronic devices to perform the function or at least a part of the service. One or more external electronic devices that receive the request may execute at least a portion of the requested function or service, or an additional function or service related to the request, and transmit the result of the execution to the electronic device (101). The electronic device (101) may process the result as is or additionally and provide it as at least a portion of a response to the request. For this purpose, cloud computing, distributed computing, mobile edge computing (MEC), or client-server computing technology may be used, for example. The electronic device (101) may provide an ultra-low latency service by using distributed computing or mobile edge computing, for example. In another embodiment, the external electronic device (104) may include an Internet of Things (IoT) device. The server (108) may be an intelligent server utilizing machine learning and / or a neural network. According to one embodiment, the external electronic device (104) or the server (108) may be included in the second network (199).The electronic device (101) can be applied to intelligent services (e.g., smart home, smart city, smart car, or healthcare) based on 5G communication technology and IoT-related technology.
[0040] FIG. 2 is a diagram for explaining an operation of an electronic device according to one embodiment of the present invention to receive brain wave signals from an external electronic device.
[0041] Referring to the above FIG. 2, an external electronic device (201) according to an embodiment may include a wearable electronic device that can be worn on a part of a user's body (e.g., an ear). The wearable electronic device may include an electronic device that can be worn on a part of a user's body (e.g., an ear), such as wireless earbuds (201a), wired earphones (201b), and / or a headset (201c), and that can measure the user's brain waves.
[0042] The external electronic device (201) according to one embodiment includes a brainwave sensor capable of measuring brainwave signals, and can measure brainwave signals through the brainwave sensor when worn on a part of the user's body (e.g., an ear).
[0043] According to one embodiment, when the external electronic device (201) confirms that the external electronic device (201) is worn on a body part (e.g., an ear) of the user, the external electronic device (201) transmits a signal indicating that the external electronic device (201) is worn on a body part (e.g., an ear) of the user to an electronic device (301) that is connected to the external electronic device (201), and then measures a brain wave signal through the brain wave sensor included in the external electronic device (201) and transmits the measured brain wave signal to the electronic device (301).
[0044] According to one embodiment, when the external electronic device (201) receives a signal indicating the start of brain wave measurement for detecting a drowsiness state from the electronic device (301) that is connected to the external electronic device (201) while the external electronic device (201) is worn on a body part (e.g., an ear) of the user, the external electronic device (201) may measure brain wave signals through the brain wave sensor included in the external electronic device (201) and transmit the measured brain wave signals to the electronic device (301).
[0045] According to an embodiment, the electronic device (301) obtains (calculates) a power value of at least one frequency band among a plurality of frequency bands of an brain wave signal received from the external electronic device (201) that is connected to the electronic device (301) in communication, as a first brain wave value, and if the first brain wave value is equal to or greater than a reference value, the electronic device (301) can predict the state of the user wearing the external electronic device (201) as a drowsy state. According to an embodiment, if the electronic device (301) predicts the state of the user wearing the external electronic device (201) as a drowsy state using the first brain wave value, the electronic device (301) can store the number of peaks having a specified amplitude at a plurality of specified time points in the brain wave signal, and if the number of stored peaks is equal to or greater than a first reference number, the electronic device can confirm (determine) the state of the user wearing the external electronic device (201) as a drowsy state.
[0046] According to one embodiment, when the electronic device (301) receives a signal from the external electronic device (201) that the external electronic device (201) is worn on a body part (e.g., an ear) of the user, the electronic device (301) may wait for a brain wave signal to be received from the external electronic device (201).
[0047] According to an embodiment, the electronic device (301), after receiving a signal from the external electronic device (201) that the external electronic device (201) is worn on a body part (e.g., an ear) of the user, and upon receiving a user's selection for detecting a drowsiness state in the electronic device (301), transmits a signal to the external electronic device (201) notifying the start of brain wave measurement for detecting the drowsiness state, and then waits for a brain wave signal to be received from the external electronic device (201). For example, the electronic device (301) may confirm the user's selection of a menu or icon for detecting a drowsiness state in the electronic device (301) as the user's selection for detecting the drowsiness state.
[0048] The configuration of the electronic device (301) can be described in detail in the following drawing 3.
[0049] In one embodiment, the electronic device (301) is described as an operation of determining whether the state of the user wearing the external electronic device (201) is drowsy by using the brain wave signal received from the external electronic device (201), but the external electronic device (201) can also perform an operation of determining whether the state of the user wearing the external electronic device (201) is drowsy by using the brain wave signal measured by the external electronic device (201) in the same manner as the electronic device (301).
[0050] FIG. 3 is a block diagram of an electronic device according to an embodiment, and FIG. 4 is a diagram for explaining a peak number detection operation in an electronic device according to an embodiment.
[0051] Referring to the above drawing 3, the electronic device (301) may include a processor (320), a memory (330), a display (360), and a communication circuit (390).
[0052] According to one embodiment, the processor (320) may perform overall control operations of the electronic device (301). The processor (320) according to one embodiment may execute software (e.g., the program (140) of FIG. 1) to control at least one other component (e.g., a hardware or software component) of the electronic device (301) connected to the processor (320), and may perform data processing or calculations based on instructions. Instructions according to one embodiment may include instructions configured in a machine language that can be processed by the electronic device (301) or the processor (320). For example, the instructions may include instructions corresponding to operation instructions used in the program.
[0053] According to one embodiment, the processor (320) may determine whether the user's state is drowsy by using a first brain wave value calculated based on a brain wave signal received from an external electronic device (e.g., earbuds (201a) of FIG. 2) worn on a part of the user's body (e.g., ear) and a number of peaks detected in a brain wave signal including noise.
[0054] According to one embodiment, the processor (320) can separately and simultaneously execute the operation of calculating the first brain wave value and the operation of detecting the number of peaks when a brain wave signal is received from the external electronic device.
[0055] According to one embodiment, when a drowsiness state detection operation is started, the processor (320) determines that the user is awake for a period of time from the start of the drowsiness state detection operation to a first designated time (e.g., 90 seconds), and calculates a reference value using a brain wave signal received from the external electronic device (201) through the communication circuit (390) during the first designated time (e.g., 90 seconds).
[0056] According to an embodiment, the processor (320) may start the drowsiness state detection operation when receiving a signal from the external electronic device that the external electronic device is worn on a body part (e.g., an ear) of the user. According to an embodiment, after receiving a signal from the external electronic device that the external electronic device is worn on a body part (e.g., an ear) of the user, and then receiving a user selection for drowsiness state detection in the electronic device (301), the processor (320) may start the drowsiness state detection operation after transmitting a signal notifying the start of brain wave measurement for drowsiness state detection to the external electronic device (201).
[0057] According to an embodiment, the processor (320) may convert a time domain of an EEG signal received from the external electronic device from a time point when the drowsiness state detection operation starts to a first designated time (e.g., 90 seconds) into a frequency domain using a fast Fourier transform, and may calculate a power value of at least one frequency band capable of predicting a drowsiness state among a plurality of frequency bands of the EEG signal by applying an integration to the EEG signal converted into the frequency domain. According to an embodiment, the processor (320) may calculate a power value by applying an integration to the at least one frequency band, and may calculate a value obtained by adding the calculated power values as a second EEG value, and may calculate an average value of the second EEG values calculated every second for the first designated time (e.g., 90 seconds), and may calculate a value obtained by doubling the average value as the reference value. For example, the processor (320) may identify frequency bands capable of predicting a drowsy state, among a plurality of frequency bands of the brain wave signal, a theta frequency band (4-7 Hz) that occurs when the user falls asleep and an alpha frequency band (8-12 Hz) that occurs when the user closes his or her eyes, apply integration to the two frequency bands to calculate the power value of each of the two frequency bands, and calculate the second brain wave value by adding the power value of each of the two frequency bands.
[0058] According to one embodiment, the processor (320) may calculate the first brain wave value for comparison with the reference value every second specified time (e.g., 1 second) shorter than the first specified time after a first specified time (e.g., 90 seconds) for calculating the reference value has elapsed.
[0059] According to one embodiment, the processor (320) may convert a time domain of an EEG signal received from the external electronic device into a frequency domain using a fast Fourier transform after a first designated time (e.g., 90 seconds) for calculating the reference value, apply an integration to the EEG signal converted into the frequency domain, calculate a power value of at least one frequency band capable of predicting a drowsy state among a plurality of frequency bands of the EEG signal, and calculate a value obtained by adding the calculated power values as a first EEG value.
[0060] According to one embodiment, the processor (320) may store the first brain wave value calculated at each second designated time (e.g., 1 second) in a first queue having a first length (e.g., 20 seconds in length), calculate an average value of a plurality of first brain wave values stored in the first queue whenever the first brain wave value is stored and updated in the first queue, and compare the average value of the plurality of first brain wave values stored in the first queue with the reference value. According to one embodiment, if the average value of the plurality of first brain wave values stored in the first queue is equal to or greater than the reference value, the processor (320) may store a first value (e.g., true) in a second queue having a second length (e.g., 20 seconds in length), and if the average value of the plurality of first brain wave values stored in the first queue is equal to or less than the reference value, the processor (320) may store a second value (e.g., false) in the second queue. According to an embodiment, the processor (320) may compare the first value (e.g., true) stored in the second queue with a second reference number (e.g., more than half of the length of the second queue) whenever the first value (e.g., true) or the second value (e.g., false) is stored and updated in the second queue. According to an embodiment, if the processor (320) confirms that the first value (e.g., true) stored in the second queue is more than or equal to the second reference number (e.g., more than half of the length of the second queue), the processor may predict (determine) the state of the user wearing the external electronic device as a drowsy state. According to an embodiment, if the processor (320) confirms that the first value (e.g., true) stored in the second queue is less than or equal to the second reference number (e.g., more than half of the length of the second queue), the processor may predict (determine) the state of the user wearing the external electronic device as an awake state.
[0061] According to one embodiment, the processor (320) may, while executing the calculation operation of the first brain wave value, execute an operation of detecting a number of peaks in the brain wave signal that can determine the user's state as a drowsy state if the number of peaks detected separately from the brain wave signal is greater than or equal to a first reference number.
[0062] When a user wearing the external electronic device is in a drowsy state, the EEG signal may contain noise due to motor phenomena (e.g., continuous head shaking or eye blinking), making it difficult to accurately measure the EEG signal. However, the present disclosure utilizes the fact that EEG signals containing noise have larger peaks than EEG signals without noise, which can be used as an additional method for determining the user's drowsy state.
[0063] According to one embodiment, the processor (320) may apply a band-pass filter for low frequencies (0.1 to 20 Hz) to the brain wave signal received from the external electronic device when the drowsiness state detection operation is started, and may calculate a differential signal of the brain wave signal obtained by subtracting the voltage value of the current time and the voltage value of the previous time from the brain wave signal applied to the filter.
[0064] According to one embodiment, the processor (320) can detect the number of peaks having a specified amplitude at a plurality of specified points in time (e.g., four points in time) in the differential signal.
[0065] According to an embodiment, the specified plurality of time points may include a first time point at which the voltage value of the differential signal increases from less than a first voltage value (e.g., 10) to become the first voltage value, a second time point at which the voltage value of the differential signal decreases from greater than the first voltage value (e.g., 10) to become the first voltage value, a third time point at which the voltage value of the differential signal decreases from greater than a second voltage value (e.g., -10) to become the second voltage value, and a fourth time point at which the voltage value of the differential signal increases from less than the second voltage value (e.g., -10) to become the second voltage value.
[0066] According to one embodiment, the processor (320) may detect a detected peak as a positive peak when the time at which the first time point and the second time point are sequentially confirmed in the differential signal is less than a reference time (e.g., 1 second) and the amplitude of a peak related to the first time point and the second time point is greater than or equal to a specified first amplitude (e.g., 60).
[0067] According to one embodiment, the processor (320) may detect a detected peak as a negative peak when the time at which the third time point and the fourth time point are sequentially confirmed in the differential signal is less than the reference time (e.g., 1 second) and the amplitude of a peak related to the third time point and the fourth time point is less than or equal to a designated second amplitude (e.g., -60).
[0068] According to one embodiment, the processor (320) can detect a positive peak and a negative peak that occur consecutively as one peak and store them in the memory (330).
[0069] Referring to the above Fig. 4, when examining the detection operation of the number of peaks in the differential signal, "f1" represents a brain wave signal containing noise having a larger peak than a brain wave signal not containing noise, and "f2" represents a differential signal (slope) of the brain wave signal (f1) obtained by applying a band-pass filter of 0.1-20 Hz to the brain wave signal and subtracting the voltage value of the current time from the voltage value of the previous time from the brain wave signal applied to the filter.
[0070] According to an embodiment, the processor (320) can detect a first time point (t1) at which the voltage value of the differential signal (f2) increases from less than "10" (Cp) to "10" (Cp), a second time point (t2) at which the voltage value of the differential signal decreases from more than "10" (Cp) to "10" (Cp), a third time point (t3) at which the voltage value of the differential signal decreases from more than "-10" (Cn) to "-10" (Cn), and a fourth time point (t4) at which the voltage value of the differential signal increases from less than "-10" (Cn) to "-10" (Cn).
[0071] According to one embodiment, the processor (320) detects the peak as a positive peak when the amplitude of the peak related to the first time point (t1) and the second time point (t2) is equal to or greater than a designated amplitude of "60" (a1), and detects the peak as a negative peak when the amplitude of the peak related to the third time point (t3) and the fourth time point (t4) is equal to or less than "-60" (a2), and when sequentially checking the positive peak and the negative peak, the sequentially checked positive peak and the negative peak can be detected as one peak and stored in the memory (330).
[0072] According to one embodiment, the processor (320) may determine the user's state as a drowsy state if the number of stored peaks is greater than or equal to a reference number (e.g., 15).
[0073] According to one embodiment, the processor (320) may determine the user's state as drowsy if the number of stored peaks is greater than or equal to a first reference number (e.g., 15) using an artificial intelligence model.
[0074] According to one embodiment, the processor (320) may detect and store the number of peaks using an artificial intelligence model, and if the number of stored peaks is greater than or equal to the first reference number (e.g., 15), the user's state may be determined to be drowsy.
[0075] According to one embodiment, the artificial intelligence model may include a leaky integrate and fire (LIF) model, which is a basic model of a spiking neural network (SNN).
[0076] In one embodiment, the artificial intelligence model may initialize the number of peaks to “0” when, while detecting and storing peaks for determining a drowsiness state, the number of stored peaks is less than or equal to a reference number and no peaks are detected within a specified time.
[0077] In one embodiment, the artificial intelligence model may determine the user's state as being drowsy when the number of stored peaks is greater than or equal to the first reference number while detecting and storing peaks for determining a drowsy state, and may accumulate and store the number of peaks when additional peaks for determining a drowsy state are detected when the number of stored peaks is greater than or equal to the first reference number.
[0078] According to one embodiment, the artificial intelligence model is composed of a first variable (v_before) and a second variable (v_now), and when an algorithm for executing the artificial function model starts, the values of the two variables can be initialized to “0”.
[0079] In one embodiment, the artificial intelligence model may, while detecting and storing peaks for determining a drowsy state in the brainwave signal, if the number (n) of the peaks is "1" or greater, store a value obtained by adding the number (n) of peaks to the value of the first variable (v_before) as the value of the first variable (v_now) (value of v_before + n). In one embodiment, the artificial intelligence model may, if the value (value of v_before + n) of the second variable (v_now) is greater than or equal to the first reference number (e.g., 15), determine the user's state as a drowsy state, and if the value (value of v_before + n) of the second variable (v_now) is less than or equal to the first reference number (e.g., 15), determine the user's state as an awake state.
[0080] In one embodiment, the artificial intelligence model may detect and store peaks for determining a drowsy state in the brainwave signal, and if the number (n) of the peaks is "0", if the value obtained by subtracting a first reference number (e.g., 15) from the value of the first variable (v_before) (value of v_before - first reference number) is less than "0", "0" may be stored as the value of the second variable (v_now), and if the value obtained by subtracting a first reference number (e.g., 15) from the value of the first variable (v_before) (value of v_before - first reference number) is greater than "0", the value may be stored as the value of the second variable (v_now) (value of v_before - first reference number). According to an embodiment, the artificial intelligence model may determine the user's state as a drowsy state if the value of the second variable (v_now) (value of v_before - first reference number) is greater than or equal to the first reference number (e.g., 15), and may determine the user's state as an awake state if the value of the second variable (v_now) (value of v_before - first reference number) is less than or equal to the first reference number (e.g., 15).
[0081] According to one embodiment, if the artificial intelligence model determines that the user's state is drowsy, the final value of the second variable (v_before) can be stored as the value of the first variable (v_now).
[0082] According to one embodiment, the artificial intelligence model may repeat the above processes each time the brain wave signal is input, and when the number of peaks for detecting a drowsy state is large or the frequency of occurrence of peaks within a short period of time is high, the value of the first variable (v_now) may increase, and otherwise, the value of the first variable (v_now) may gradually decrease.
[0083] According to one embodiment, if the processor (320) determines that the user's state, when the external electronic device is worn on a part of the body (e.g., an ear), is drowsy, it may notify the user of the drowsy state through the external electronic device. For example, the processor (320) may output a notification of the drowsy state through the external electronic device using vibration and / or sound.
[0084] According to one embodiment, if the processor (320) determines that the user's state, in which the external electronic device is worn on a part of the body (e.g., an ear), is in a drowsy state, the processor (320) may notify the user of the drowsy state through the electronic device (301). For example, the processor (320) may output a notification of the drowsy state through the electronic device (301) using vibration and / or sound.
[0085] According to one embodiment, the processor (320) may determine the state of the user as a drowsy state using a first brain wave value calculated based on a brain wave signal received from an external electronic device (e.g., earbuds (201a) of FIG. 2) worn on a part of the user's body (e.g., ear) and the reference value. According to one embodiment, when the processor (320) determines the state of the user as an awake state using the first brain wave value and the reference value, the processor (320) may determine whether the state of the user is a drowsy state using the number of peaks detected in a brain wave signal including noise.
[0086] According to one embodiment, the processor (320) may determine the state of the user as a drowsy state by using the number of peaks detected in an EEG signal containing noise received from an external electronic device (e.g., earbuds (201a) of FIG. 2) worn on a body part (e.g., ear) of the user. According to one embodiment, when the processor (320) determines the state of the user as an awake state by using the number of peaks detected in the EEG signal containing noise, the processor (320) may determine whether the state of the user is a drowsy state by using the first EEG value calculated based on the EEG signal and the reference value.
[0087] The memory (330) according to one embodiment may be implemented substantially identically or similarly to the memory (130) of FIG. 1.
[0088] In one embodiment, the memory (330) may store a reference value and a first brain wave value calculated using a brain wave signal received from an external electronic device (e.g., earbud (201a) of FIG. 2) that is connected to the electronic device (301) for communication.
[0089] According to one embodiment, the number of peaks detected using a brain wave signal containing noise received from an external electronic device (e.g., earbud (201a) of FIG. 2) connected to the electronic device (301) may be stored in the memory (330).
[0090] A display (360) according to one embodiment may be implemented substantially identically or similarly to the display module (160) of FIG. 1.
[0091] A communication circuit (390) according to one embodiment may be implemented substantially identically or similarly to the communication circuit (190) of FIG. 1.
[0092] According to one embodiment, the communication circuit (390) may include at least one of a wireless LAN circuit (not shown) and a short-range communication circuit (not shown).
[0093] The communication circuit (390) according to one embodiment may include an NFC communication circuit, a BLE communication circuit, and / or a UWB communication circuit capable of transmitting and receiving a UWB signal with an external device using a plurality of antennas, a Wi-Fi communication circuit, and / or a Bluetooth legacy communication circuit.
[0094] An electronic device (e.g., an electronic device (101) of FIG. 1 and / or an electronic device (301) of FIGS. 2 to 3) according to an embodiment may include a communication circuit (e.g., a communication circuit (190) of FIG. 1 and / or a communication circuit (390) of FIG. 3), a processor (e.g., a processor (120) of FIG. 1 and / or a processor (320) of FIG. 3); and a memory (e.g., a memory (130) of FIG. 1 and / or a memory (330) of FIG. 3)) for storing instructions. The instructions according to an embodiment, when executed by the processor, may cause the electronic device to obtain a power value of at least one frequency band among a plurality of frequency bands of an brain wave signal when receiving an brain wave signal from an external electronic device worn on a part of a user's body. The instructions according to one embodiment, when executed by the processor, cause the electronic device to determine the state of the user at a point in time as drowsy if the power value is greater than or equal to a reference value and the number of peaks at a plurality of points in time of the brain wave signal is greater than or equal to a first reference number.
[0095] The instructions according to one embodiment, when executed by the processor, may cause the electronic device to predict the user's state as a drowsy state if the power value is greater than or equal to the reference value. The instructions according to one embodiment, when executed by the processor, may cause the electronic device to detect and store the number of peaks at the plurality of time points of the brainwave signal if the user's state is predicted to be a drowsy state. The instructions according to one embodiment, when executed by the processor, may cause the electronic device to determine the user's state as a drowsy state if the number of peaks is greater than or equal to the first reference number.
[0096] The instructions according to one embodiment, when executed by the processor, may cause the electronic device to, when a drowsiness state detection operation is started, calculate power values of at least one frequency band among the plurality of frequency bands of brain wave signals received from the external electronic device during a first designated period of time from a start time of the drowsiness state detection operation. The instructions according to one embodiment, when executed by the processor, may cause the electronic device to calculate an average value of the power values calculated during the first designated period of time, and to calculate the reference value by doubling the average value.
[0097] The instructions according to one embodiment, when executed by the processor, may cause the electronic device to calculate the power value of at least one band among the plurality of frequency bands of the brainwave signal at a second specified time interval shorter than the first specified time interval after a first specified time interval for calculating the reference value has elapsed. The instructions according to one embodiment, when executed by the processor, may cause the electronic device to store and update the calculated power value in a first queue having a first length.
[0098] In one embodiment, the instructions, when executed by the processor, may cause the electronic device to calculate an average value of power values stored in the first queue when the first queue is updated. In one embodiment, the instructions, when executed by the processor, may cause the electronic device to update a second queue having a second predetermined length by storing a first value therein if the average value is greater than or equal to the reference value. In one embodiment, the instructions, when executed by the processor, may cause the electronic device to update a second queue by storing a second value therein if the average value is less than the reference value. In one embodiment, the instructions, when executed by the processor, may cause the electronic device to determine whether the number of first values stored in the second queue is greater than or equal to a second reference number when the second queue is updated. The instructions according to one embodiment, when executed by the processor, cause the electronic device to predict the user's state as drowsy if the number of first values stored in the second queue is greater than or equal to the second reference number.
[0099] The instructions according to one embodiment, when executed by the processor, may cause the electronic device to apply the brainwave signal to a bandpass filter for low frequencies. The instructions according to one embodiment, when executed by the processor, may cause the electronic device to calculate a differential signal of the brainwave signal obtained by subtracting a voltage value of a previous time from a voltage value of a current time among voltage values of the brainwave signal applied to the filter. The instructions according to one embodiment, when executed by the processor, may cause the electronic device to detect a number of peaks at the plurality of time points in the differential signal.
[0100] According to an embodiment, the plurality of time points may include a first time point at which the voltage value of the differential signal increases from less than a first voltage value to become the first voltage value, a second time point at which the voltage value of the differential signal decreases from greater than the first voltage value to become the first voltage value, a third time point at which the voltage value of the differential signal decreases from greater than a second voltage value to become the second voltage value, and a fourth time point at which the voltage value of the differential signal increases from less than the second voltage value to become the second voltage value.
[0101] In one embodiment, the instructions, when executed by the processor, cause the electronic device to sequentially check the first time point and the second time point among the plurality of time points in the differential signal, and if the amplitude of the peaks related to the first time point and the second time point is greater than or equal to a first amplitude value, determine the peak as a positive peak. In one embodiment, the instructions, when executed by the processor, cause the electronic device to sequentially check the third time point and the fourth time point among the plurality of time points in the differential signal, and if the amplitude of the peaks related to the third time point and the fourth time point is less than a second amplitude value, determine the peak as a negative peak. In one embodiment, the instructions, when executed by the processor, cause the electronic device to detect the positive peak and the negative peak as one peak if they are sequentially checked.
[0102] The instructions according to one embodiment, when executed by the processor, cause the electronic device to detect and store the number of peaks using an artificial intelligence model, and compare the stored number of peaks with the first reference number to determine the user's state as a drowsy state. The artificial intelligence model according to one embodiment may include a leaky integrate and fire (LIF) model, which is a basic model of a spiking neural network (SNN).
[0103] The above instructions, when executed by the processor according to one embodiment, cause the electronic device to, when the user's state is determined to be the drowsy state, notify the user of the drowsy state through the external electronic device worn on a part of the user's body.
[0104] The instructions according to one embodiment, when executed by the processor, may cause the electronic device to initiate a drowsiness detection operation when the external electronic device is worn on a body part of the user or when the user selects a drowsiness detection while the external electronic device is worn on a body part of the user.
[0105] Figures 5a and 5b are flowcharts illustrating operations for detecting a drowsy state in an electronic device according to an embodiment. The operations for detecting the drowsy state may include operations 501 to 543. In the following embodiments, the operations may be performed sequentially, but are not necessarily performed sequentially. For example, the order of the operations may be changed, at least two operations may be performed in parallel, or other operations may be added.
[0106] Referring to FIGS. 5A and 5B, in operation 501, an electronic device (e.g., the electronic device (101) of FIG. 1 and / or the electronic device (301) of FIGS. 2 and 3) may start a drowsy state detection operation.
[0107] According to one embodiment, the electronic device may start the drowsiness detection operation when it receives a signal from an external electronic device (e.g., an earbud (201a) of FIG. 2) connected to a communication circuit of the electronic device (e.g., a communication circuit (390) of FIG. 3) that the external electronic device is worn on a body part (e.g., an ear) of the user.
[0108] In one embodiment, the electronic device may, after receiving a signal from the external electronic device that the external electronic device is worn on a body part (e.g., an ear) of the user, and upon receiving a user's selection for detecting a drowsiness state from the electronic device, transmit a signal to the external electronic device to indicate the start of brain wave measurement for detecting the drowsiness state and then start the drowsiness state detection operation.
[0109] In operation 511, an electronic device (e.g., electronic device (101) of FIG. 1 and / or electronic device (301) of FIGS. 2 to 3) can calculate a first brain wave value using a brain wave signal received from an external electronic device.
[0110] In one embodiment, the electronic device may calculate the first brain wave value every second specified time (e.g., 1 second).
[0111] In operation 531, an electronic device (e.g., electronic device (101) of FIG. 1 and / or electronic device (301) of FIGS. 2 to 3) may detect and store a peak for detecting a drowsy state in a brain wave signal containing noise received from an external electronic device.
[0112] According to one embodiment, the electronic device may detect and store a peak for detecting a drowsy state separately in operation 531 while calculating the first brain wave value in operation 511.
[0113] In operation 513, an electronic device (e.g., electronic device (101) of FIG. 1 and / or electronic device (301) of FIGS. 2 to 3) can compare a first brain wave value with a reference value.
[0114] In one embodiment, the electronic device may calculate the first brain wave value every second specified time (e.g., 1 second) in the operation 511, and compare the first brain wave value with the reference value.
[0115] In the above operation 513, if the first brain wave value is less than or equal to the reference value, the electronic device can determine (predict) the state of the user wearing the external electronic device as being awake in operation 515.
[0116] In the above operation 513, if the first brain wave value is greater than or equal to the reference value, the electronic device can predict the state of the user wearing the external electronic device as a drowsy state in operation 517.
[0117] The operation 510 including the above operations 511 to 517 can be described in detail in FIG. 6 below.
[0118] In operation 533, an electronic device (e.g., electronic device (101) of FIG. 1 and / or electronic device (301) of FIGS. 2 to 3) may compare a peak number with a first reference number.
[0119] According to an embodiment, the electronic device may, when the state of the user wearing the external electronic device is predicted to be a drowsy state using the first brain wave value in operation 517, compare the number of peaks stored through operation 533 with the first reference number.
[0120] In the above operation 533, if the number of peaks is less than or equal to the first reference number, the electronic device can determine the state of the user wearing the external electronic device as an awake state in operation 535.
[0121] In the above operation 533, if the number of peaks is greater than or equal to the first reference number, the electronic device can determine the state of the user wearing the external electronic device as a drowsy state in operation 537.
[0122] The operation 530 including the above operations 531 to 537 can be described in detail in FIGS. 7a to 7b and 8a to 8b below.
[0123] In operation 541, an electronic device (e.g., electronic device (101) of FIG. 1 and / or electronic device (301) of FIGS. 2 to 3) may notify that the user is in a drowsy state.
[0124] In one embodiment, the electronic device may use the first brain wave value to predict the state of a user wearing an external electronic device as being drowsy, and then determine the state of the user as being drowsy using the number of peaks, and may then notify the user of the drowsy state through the external electronic device or the electronic device. For example, the electronic device may output a notification of the drowsy state through the external electronic device or the electronic device using vibration and / or sound.
[0125] In operation 543, an electronic device (e.g., electronic device (101) of FIG. 1 and / or electronic device (301) of FIGS. 2 to 3) can determine whether the drowsiness state detection operation has ended.
[0126] In the above operation 543, if the electronic device confirms that the drowsy state detection operation is not terminated, the electronic device can repeatedly execute the operations 501 to 541.
[0127] In the above operation 543, if the electronic device confirms that the drowsiness state detection operation has ended, the electronic device can end the drowsiness state detection operation.
[0128] FIG. 6 is a flowchart illustrating an operation for detecting a drowsiness state using a first brain wave value in an electronic device according to an embodiment. The operations for detecting the drowsiness state may include operations 601 to 617. In the following embodiments, each operation may be performed sequentially, but is not necessarily performed sequentially. For example, the order of each operation may be changed, at least two operations may be performed in parallel, or other operations may be added.
[0129] Referring to the above FIG. 6, in operation 601, an electronic device (e.g., the electronic device (101) of FIG. 1 and / or the electronic device (301) of FIGS. 2 to 3) can calculate a reference value.
[0130] According to one embodiment, when a drowsiness state detection operation is started, the electronic device determines that the user is awake for a period of time from the start of the drowsiness state detection operation to a first designated time (e.g., 90 seconds), and calculates a reference value using an brain wave signal received from an external electronic device (e.g., an earbud (201a) of FIG. 2) worn on a part of the user's body (e.g., an ear) through a communication circuit of the electronic device (e.g., a communication circuit (390) of FIG. 3).
[0131] According to one embodiment, the electronic device may convert a time domain of an EEG signal received from the external electronic device from a time point at which the drowsiness state detection operation starts to a first designated time (e.g., 90 seconds) into a frequency domain using a fast Fourier transform, and may apply an integration to the EEG signal converted into the frequency domain to calculate a power value of at least one frequency band capable of predicting a drowsiness state among a plurality of frequency bands of the EEG signal.
[0132] The electronic device according to the embodiment may calculate a power value by applying integration to the at least one frequency band, calculate a value by adding all the calculated power values as a second brain wave value, calculate an average value of the second brain wave values calculated every second for the first specified time (e.g., 90 seconds), and calculate a value that is twice the average value as the reference value.
[0133] In operation 603, an electronic device (e.g., electronic device (101) of FIG. 1 and / or electronic device (301) of FIGS. 2 to 3) can calculate a first brain wave value.
[0134] In one embodiment, the electronic device may calculate the first brain wave value for comparison with the reference value every second specified time (e.g., 1 second) that is shorter than the first specified time after a first specified time (e.g., 90 seconds) for calculating the reference value has elapsed.
[0135] According to one embodiment, the electronic device may convert a time domain of an EEG signal received from the external electronic device into a frequency domain using a fast Fourier transform after a first designated time (e.g., 90 seconds) for calculating the reference value, apply an integration to the EEG signal converted into the frequency domain, and calculate a power value of at least one frequency band capable of predicting a drowsy state among a plurality of frequency bands of the EEG signal, and calculate a value obtained by adding the calculated power values as a first EEG value.
[0136] In operation 605, an electronic device (e.g., electronic device (101) of FIG. 1 and / or electronic device (301) of FIGS. 2 to 3) may store a first brain wave value in a first queue.
[0137] According to one embodiment, the electronic device may store and update the first brain wave value calculated every second specified time (e.g., 1 second) in a first queue having a first length (e.g., 20 seconds in length).
[0138] In operation 607, an electronic device (e.g., electronic device (101) of FIG. 1 and / or electronic device (301) of FIGS. 2 to 3) can compare an average value of a plurality of first brain wave values stored in a first queue with a reference value.
[0139] According to one embodiment, the electronic device may calculate an average value of a plurality of first brain wave values stored in the first queue each time a new first brain wave is stored and updated in the first queue, and compare the average value of the plurality of first brain wave values stored in the first queue with the reference value.
[0140] In the above operation 607, if the average value of the plurality of first brain wave values stored in the first queue is greater than or equal to the reference value, the electronic device can store the first value in the second queue in operation 609.
[0141] According to one embodiment, the electronic device may store a first value (e.g., true) in a second queue having a second length (e.g., 20 seconds long) if an average value of a plurality of first brain wave values stored in the first queue is greater than or equal to the reference value.
[0142] In the above operation 607, if the average value of the plurality of first brain wave values stored in the first queue is greater than or equal to the reference value, the electronic device can store the second value in the second queue in operation 611.
[0143] According to one embodiment, the electronic device may store a second value (e.g., false) in the second queue if the average value of the plurality of first brain wave values stored in the first queue is less than or equal to the reference value.
[0144] In operation 613, the electronic device (e.g., the electronic device (101) of FIG. 1 and / or the electronic device (301) of FIGS. 2 to 3) may compare the number of first values (e.g., true) stored in the second queue with the second reference number.
[0145] In one embodiment, the electronic device may compare the number of first values (e.g., true) stored in the second queue with the second reference number (e.g., more than half the length of the second queue) whenever the first value (true) or the second value (false) is stored and updated in the second queue.
[0146] In the above operation 613, if the number of first values stored in the second queue is less than or equal to the second reference number, the electronic device can determine (predict) the state of the user wearing the external electronic device as being awake in operation 615.
[0147] In the above operation 613, if the number of first values stored in the second queue is greater than or equal to the second reference number, the electronic device can predict the state of the user wearing the external electronic device as a drowsy state in operation 617.
[0148] Figures 7a and 7b are flowcharts illustrating operations for detecting a drowsiness state using a peak count in an electronic device according to an embodiment. The operations for detecting the drowsiness state may include operations 701 to 725. In the following embodiments, each operation may be performed sequentially, but is not necessarily performed sequentially. For example, the order of each operation may be changed, at least two operations may be performed in parallel, or other operations may be added.
[0149] The operations of the above-described FIGS. 7a and 7b can be performed using a processor included in the electronic device or under the control of the processor, for example, a LIF (leaky integrate and fire) model, which is a basic model of an SNN (spiking neural network).
[0150] Referring to FIGS. 7A and 7B above, in operation 701, an electronic device (e.g., the electronic device (101) of FIG. 1 and / or the electronic device (301) of FIGS. 2 and 3) can calculate a differential signal of a brain wave signal.
[0151] According to one embodiment, the electronic device may apply a band-pass filter for low frequencies (0.1 to 20 Hz) to brain wave signals received from an external electronic device (e.g., earbuds (201a) of FIG. 2) worn on a part of the user's body (e.g., ear).
[0152] According to one embodiment, the electronic device can calculate a differential signal of the brain wave signal by subtracting a voltage value of a current time from a voltage value of a previous time from the brain wave signal to which a band-pass filter for the low-pass frequency (0.1 - 20 Hz) is applied.
[0153] In operation 703, an electronic device (e.g., electronic device (101) of FIG. 1 and / or electronic device (301) of FIGS. 2 to 3) can detect a plurality of points in time specified in a differential signal.
[0154] According to an embodiment, the specified plurality of time points may include a first time point at which the voltage value of the differential signal increases from less than a first voltage value (e.g., 10) to become the first voltage value, a second time point at which the voltage value of the differential signal decreases from greater than the first voltage value (e.g., 10) to become the first voltage value, a third time point at which the voltage value of the differential signal decreases from greater than a second voltage value (e.g., -10) to become the second voltage value, and a fourth time point at which the voltage value of the differential signal increases from less than the second voltage value (e.g., -10) to become the second voltage value.
[0155] In operation 705, the electronic device (e.g., the electronic device (101) of FIG. 1 and / or the electronic device (301) of FIGS. 2 to 3) sequentially checks a first time point and a second time point among a plurality of time points, and in operation 707, checks whether the amplitude of the peak related to the first time point and the second time point is greater than or equal to the first amplitude (e.g., 60).
[0156] In the above operation 707, if the amplitude of the peak related to the first time point and the second time point is greater than or equal to the first amplitude, in operation 709, the peak sequentially confirmed at the first time point and the second time point can be detected as a positive peak.
[0157] In the above operation 707, if the amplitude of the peak related to the first time point and the second time point is less than or equal to the first amplitude, the above operation 701 can be performed.
[0158] In operation 711, the electronic device (e.g., the electronic device (101) of FIG. 1 and / or the electronic device (301) of FIGS. 2 to 3) sequentially checks a third time point and a fourth time point among a plurality of time points, and in operation 713, it can check whether the amplitude of the peak related to the third time point and the fourth time point is less than or equal to the second amplitude (e.g., -60).
[0159] In the above operation 711, the electronic device (e.g., the electronic device (101) of FIG. 1 and / or the electronic device (301) of FIGS. 2 to 3) may perform the above operation 701 if it cannot confirm multiple points of view.
[0160] In the above operation 713, if the amplitude of the peaks related to the third and fourth time points is less than or equal to the second amplitude, in operation 715, the peaks sequentially confirmed at the third and fourth time points can be detected as negative peaks. In the above operation 713, if the amplitude of the peaks related to the third and fourth time points is greater than or equal to the second amplitude, the above operation 701 can be performed.
[0161] In operation 717, an electronic device (e.g., electronic device (101) of FIG. 1 and / or electronic device (301) of FIGS. 2 to 3) can sequentially identify positive peaks and negative peaks.
[0162] In the above operation 717, the electronic device can sequentially check the positive peak and the negative peak, and then detect and store them as one peak in operation 719.
[0163] In the above operation 717, if the electronic device cannot sequentially confirm the positive peak and the negative peak, it can perform the above operation 701.
[0164] In operation 721, an electronic device (e.g., electronic device (101) of FIG. 1 and / or electronic device (301) of FIGS. 2 to 3) may compare the number of stored peaks with a first reference number.
[0165] In the above operation 721, if the number of stored peaks is less than or equal to a first reference number (e.g., 15), in operation 723, the electronic device can determine the state of the user wearing the external electronic device as an awake state.
[0166] In the above operation 721, if the number of stored peaks is greater than or equal to a first reference number (e.g., 15), in operation 725, the electronic device can determine the state of the user wearing the external electronic device as a drowsy state.
[0167] The operation 720 including the above operation 721 to the above operation 725 can be described in detail in FIGS. 8a and 8b.
[0168] FIGS. 8A and 8B are flowcharts illustrating operations for detecting a drowsiness state using a peak count in an electronic device according to an embodiment. The operations for detecting the drowsiness state may include operations 801 to 821. In the following embodiments, the operations may be performed sequentially, but are not necessarily performed sequentially. For example, the order of the operations may be changed, at least two operations may be performed in parallel, or other operations may be added.
[0169] The operations of the above-described FIGS. 8a and 8b can be performed using a processor included in the electronic device or under the control of the processor, for example, a LIF (leaky integrate and fire) model, which is a basic model of an SNN (spiking neural network).
[0170] Referring to FIGS. 8A and 8B, in operation 801, an electronic device (e.g., the electronic device (101) of FIG. 1 and / or the electronic device (301) of FIGS. 2 and 3) can check the number of peaks.
[0171] According to one embodiment, the electronic device can check the number of peaks stored in a memory of the electronic device (e.g., memory (330) of FIG. 3).
[0172] According to one embodiment, the electronic device may initialize both the value of the first variable (v_now) and the value of the first variable (v_before) for detecting a drowsy state to “0” when peak detection starts.
[0173] In operation 803, an electronic device (e.g., electronic device (101) of FIG. 1 and / or electronic device (301) of FIGS. 2 to 3) can determine whether the number of peaks is 1 or more.
[0174] According to one embodiment, the electronic device can check the number of peaks stored in a memory of the electronic device (e.g., memory (330) of FIG. 3).
[0175] In the above operation 803, if the electronic device confirms that the number of peaks is 1 or more, in operation 805, the value obtained by adding the number of peaks confirmed (n) to the value of the first variable (v_before) can be stored as the value of the second variable (v_now) (value of v_before + n).
[0176] In operation 807, an electronic device (e.g., electronic device (101) of FIG. 1 and / or electronic device (301) of FIGS. 2 to 3) may compare a value of a second variable (v_now) with a first reference number.
[0177] According to one embodiment, the electronic device can compare the value of the second variable (v_now) (the value of v_before + n1) with a first reference number (e.g., 15).
[0178] In the above operation 807, if the value of the second variable (v_now) (value of v_before + n) is greater than or equal to the first reference number, in operation 809, the electronic device can determine the state of the user wearing the external electronic device as a drowsy state.
[0179] In operation 811, if the electronic device (e.g., the electronic device (101) of FIG. 1 and / or the electronic device (301) of FIGS. 2 to 3) determines that the state of the user wearing the external electronic device is a drowsy state, the electronic device may store the final value of the first variable (v_before) as the value of the second variable (v_now).
[0180] In the above operation 807, if the value of the first variable (v_now) (value of v_before + n) is less than or equal to the first reference number, in operation 813, the electronic device can determine the state of the user wearing the external electronic device as an awake state.
[0181] In operation 815, an electronic device (e.g., electronic device (101) of FIG. 1 and / or electronic device (301) of FIGS. 2 to 3) can check whether the number of peaks is 0.
[0182] In the above operation 815, if the electronic device confirms that the number of peaks is 0, in operation 817, it can confirm whether the value obtained by subtracting the first reference number (e.g., 15) from the first variable (v_before) (value of v_before - first reference number) is less than “0”.
[0183] In the above operation 817, if the electronic device determines that the value obtained by subtracting the first reference number (e.g., 15) from the value of the first variable (v_before) (value of v_before - first reference number) is greater than “0”, in operation 819, the electronic device can store the value obtained by subtracting the first reference number (e.g., 15) from the value of the first variable (v_before) in the value of the second variable (v_now) (value of v_before - reference number).
[0184] In the above operation 807, the electronic device can compare the value of the second variable (v_now) (value of v_before - first reference number) with the first reference number.
[0185] According to one embodiment, the electronic device can compare the value of the second variable (v_now) (value of v_before - first reference number) with the first reference number (e.g., 15).
[0186] In the above operation 807, if the value of the second variable (v_now) (value of v_before - first reference number) is greater than or equal to the first reference number, the electronic device can determine, in the above operation 809, the state of the user wearing the external electronic device as a drowsy state.
[0187] In the above operation 811, if the electronic device (e.g., the electronic device (101) of FIG. 1 and / or the electronic device (301) of FIGS. 2 to 3) determines that the state of the user wearing the external electronic device is a drowsy state, the electronic device may store the final value of the first variable (v_before) in the second variable (v_now).
[0188] In the above operation 807, if the value of the second variable (v_now) (value of v_before - first reference number) is less than or equal to the first reference number, in the above operation 813, the electronic device can determine the state of the user wearing the external electronic device as an awake state.
[0189] In the above operation 815, if the electronic device determines that the value obtained by subtracting the first reference number (e.g., 15) from the value of the first variable (v_before) (value of v_before - first reference number) is less than “0”, in operation 821, “0” can be stored as the value of the second variable (v_now).
[0190] Figures 9a and 9b are flowcharts illustrating operations for detecting a drowsy state in an electronic device according to an embodiment. The operations for detecting the drowsy state may include operations 901 to 921. In the following embodiments, the operations may be performed sequentially, but are not necessarily performed sequentially. For example, the order of the operations may be changed, at least two operations may be performed in parallel, or other operations may be added.
[0191] Referring to FIGS. 9A and 9B above, in operation 901, an electronic device (e.g., the electronic device (101) of FIG. 1 and / or the electronic device (301) of FIGS. 2 and 3) may start a drowsy state detection operation.
[0192] According to one embodiment, the electronic device may start the drowsiness detection operation when it receives a signal from an external electronic device (e.g., an earbud (201a) of FIG. 2) connected to a communication circuit of the electronic device (e.g., a communication circuit (390) of FIG. 3) that the external electronic device is worn on a body part (e.g., an ear) of the user.
[0193] In one embodiment, the electronic device may, after receiving a signal from the external electronic device that the external electronic device is worn on a body part (e.g., an ear) of the user, and upon receiving a user's selection for detecting a drowsiness state from the electronic device, transmit a signal to the external electronic device indicating the start of brain wave measurement for detecting the drowsiness state and then start the drowsiness state detection operation.
[0194] In operation 903, an electronic device (e.g., electronic device (101) of FIG. 1 and / or electronic device (301) of FIGS. 2 to 3) can calculate a first brain wave value using a brain wave signal received from an external electronic device.
[0195] In one embodiment, the electronic device may calculate the first brain wave value every second specified time (e.g., 1 second).
[0196] In operation 905, an electronic device (e.g., electronic device (101) of FIG. 1 and / or electronic device (301) of FIGS. 2 to 3) may detect and store a peak for detecting a drowsy state in a brain wave signal containing noise received from an external electronic device.
[0197] According to one embodiment, the electronic device may detect and store a peak for detecting a drowsy state separately in operation 905 while calculating the first brain wave value in operation 903.
[0198] In operation 907, an electronic device (e.g., electronic device (101) of FIG. 1 and / or electronic device (301) of FIGS. 2 to 3) can compare a first brain wave value with a reference.
[0199] In one embodiment, the electronic device may calculate the first brain wave value every second specified time (e.g., 1 second) in operation 903, and compare the first brain wave value with the reference value.
[0200] In the above operation 907, if the first brain wave value is greater than or equal to the reference value, the electronic device can determine the state of the user wearing the external electronic device as a drowsy state in operation 909.
[0201] In one embodiment, the electronic device may use the first brain wave value to predict the state of a user wearing an external electronic device as a drowsy state, and then determine the state of the user as a drowsy state using the number of peaks. In operation 919, the electronic device may notify the user of the drowsy state through the external electronic device or the electronic device. For example, the electronic device may output a notification of the drowsy state through the external electronic device or the electronic device using vibration and / or sound.
[0202] In the above operation 907, if the first brain wave value is less than or equal to the reference value, the electronic device can predict the state of the user wearing the external electronic device as being awake in the operation 911.
[0203] In operation 913, an electronic device (e.g., electronic device (101) of FIG. 1 and / or electronic device (301) of FIGS. 2 to 3) may compare a peak number with a first reference number.
[0204] In one embodiment, the electronic device may, when predicting the state of the user wearing the external electronic device as an awake state using the first brain wave value in operation 911, compare the number of peaks stored through operation 913 with the first reference number.
[0205] In operation 913, if the number of peaks is less than or equal to the first reference number, the electronic device can determine, in operation 915, that the state of the user wearing the external electronic device is an awake state.
[0206] In the above operation 915, if the number of peaks is greater than or equal to the first reference number, the electronic device can determine the state of the user wearing the external electronic device as a drowsy state in operation 917.
[0207] In operation 919, an electronic device (e.g., electronic device (101) of FIG. 1 and / or electronic device (301) of FIGS. 2 to 3) may notify that the user is in a drowsy state.
[0208] In one embodiment, the electronic device may use the first brain wave value to predict the state of a user wearing an external electronic device as being drowsy, and then determine the state of the user as being drowsy using the number of peaks, and may then notify the user of the drowsy state through the external electronic device or the electronic device. For example, the electronic device may output a notification of the drowsy state through the external electronic device or the electronic device using vibration and / or sound.
[0209] In operation 921, an electronic device (e.g., electronic device (101) of FIG. 1 and / or electronic device (301) of FIGS. 2 to 3) can determine whether the drowsiness state detection operation has ended.
[0210] In the above operation 921, if the electronic device confirms that the drowsiness state detection operation is not terminated, the electronic device can repeatedly execute the operations 901 to 919.
[0211] In the above 921 work, the electronic device can terminate the drowsiness state detection operation when it is confirmed that the drowsiness state detection operation has ended.
[0212] FIGS. 10A, 10B, and 10C illustrate experimental graphs for determining a drowsiness state in an electronic device according to one embodiment.
[0213] In Fig. 10a, the shaded portion represents the actual section in which the subjects drowsed as measured by the camera when watching a video that can induce drowsiness for 40 minutes, the solid line represents the first brain wave value calculated using the subjects' brain wave signals, and the dotted line represents the reference value calculated using the subjects' brain wave signals. As in Fig. 10a, if the number of times the first brain wave value is greater than or equal to the reference value for 20 seconds is greater than or equal to the second reference number (e.g., greater than half the length of the second cue), the subject's state can be determined to be drowsy.
[0214] In Fig. 10b, the shaded area represents the actual period in which the subjects drowsied up, as measured by the camera, when the subjects watched a video that could induce drowsiness for 40 minutes, and the solid line represents the value of the second variable (v_now) among the two variables configured in the artificial intelligence model. As shown in Fig. 10b, the value of the second variable (v_now) increases significantly when the subjects move a lot while drowsy, and remains low otherwise. Therefore, when the second variable (v_now) is greater than the standard number of 15, the subject's state can be confirmed as drowsy.
[0215] The shaded portion in Fig. 10c represents the actual period in which the subjects drowsed, as measured by the camera, when watching a video that can induce drowsiness for 40 minutes to 15 subjects, and the solid line represents a graph that adds the results according to the first brain wave value as in Fig. 10a and the results using the number of peaks as in Fig. 10b. As in Fig. 10c, when the value of the graph indicated by the blue line is "0", the subject's state can be confirmed as awake, and when the value of the graph indicated by the blue line is "1", the subject's state can be confirmed as drowsy.
[0216] A method for detecting a drowsy state in an electronic device (e.g., the electronic device (101) of FIG. 1 and / or the electronic device (301) of FIGS. 2 to 3) according to an embodiment may include an operation of receiving an brain wave signal from an external electronic device worn on a part of a user's body. The method according to an embodiment may include an operation of obtaining a power value of at least one frequency band among a plurality of frequency bands of the above-described brain wave signal, and determining a state of the user as a drowsy state if the power value is equal to or greater than a reference value and the number of peaks at a plurality of time points of the brain wave signal is equal to or greater than a first reference number.
[0217] The method according to one embodiment may include an operation of predicting the user's state as a drowsy state if the power value is greater than or equal to the reference value. The method according to one embodiment may include an operation of detecting and storing the number of peaks at the plurality of time points of the brainwave signal if the user's state is predicted to be a drowsy state. The method according to one embodiment may include an operation of confirming the user's state as a drowsy state if the number of peaks is greater than or equal to the first reference number.
[0218] According to one embodiment, the method may include an operation of calculating power values of at least one frequency band among the plurality of frequency bands of brain wave signals received from the external electronic device during a first designated period of time from a start time of the drowsiness state detection operation when the drowsiness state detection operation is started. According to one embodiment, the method may include an operation of calculating an average value of the power values calculated during the first designated period of time and calculating the reference value by doubling the average value.
[0219] In one embodiment, the method may include calculating the power value of at least one band among a plurality of frequency bands of the brainwave signal at a second specified time shorter than the first specified time after a first specified time for calculating the reference value has elapsed. In one embodiment, the method may include storing the calculated power value in a first queue having a first length and updating the same. In one embodiment, the method may include calculating an average value of the power values stored in the first queue when the first queue is updated. In one embodiment, the method may include storing the first value in a second queue having a second predetermined length and updating the same if the average value is greater than or equal to the reference value. In one embodiment, the method may include storing the second value in the second queue and updating the same if the average value is less than the reference value. In one embodiment, the method may include checking whether the number of first values stored in the second queue is greater than or equal to a second reference number when the second queue is updated. The method according to one embodiment may include an operation of predicting the user's state as drowsy if it is confirmed that the number of first values stored in the second queue is greater than or equal to the second reference number.
[0220] The method according to one embodiment may include applying the brainwave signal to a bandpass filter for low frequencies. The method according to one embodiment may include calculating a differential signal of the brainwave signal obtained by subtracting a voltage value of a previous time from a voltage value of a current time among voltage values of the brainwave signal applied to the filter. The method according to one embodiment may include detecting a number of peaks at the plurality of time points in the differential signal.
[0221] In one embodiment, the method may include a first time point at which the voltage value of the differential signal increases from less than a first voltage value to become the first voltage value, a second time point at which the voltage value of the differential signal decreases from greater than the first voltage value to become the first voltage value, a third time point at which the voltage value of the differential signal decreases from greater than a second voltage value to become the second voltage value, and a fourth time point at which the voltage value of the differential signal increases from less than the second voltage value to become the second voltage value.
[0222] In one embodiment, the method may include an operation of sequentially checking the first time point and the second time point among the plurality of time points in the differential signal, and if the amplitude of the peak related to the first time point and the second time point is greater than or equal to a first amplitude value, determining the peak as a positive peak. In one embodiment, the method may include an operation of sequentially checking the third time point and the fourth time point among the plurality of time points in the differential signal, and if the amplitude of the peak related to the third time point and the fourth time point is less than a second amplitude value, determining the peak as a negative peak. In one embodiment, the method may include an operation of detecting the positive peak and the negative peak as one peak when they are sequentially checked.
[0223] The method according to one embodiment may further include an operation of detecting and storing the number of peaks using an artificial intelligence model, and comparing the stored number of peaks with the first reference number to determine the user's state as being drowsy. The artificial function model according to one embodiment may include a leaky integrate and fire (LIF) model, which is a basic model of a spiking neural network (SNN).
[0224] According to one embodiment, the method may include an operation of notifying the user of the drowsiness state through the external electronic device worn on a part of the user's body when the user's state is determined to be the drowsy state.
[0225] The method according to one embodiment may include an operation of initiating a drowsiness detection operation when the external electronic device is worn on a body part of the user or when the user selects a drowsiness detection while the external electronic device is worn on a body part of the user.
[0226] Electronic devices according to embodiments disclosed herein may take various forms. Electronic devices may include, for example, portable communication devices (e.g., smartphones), computer devices, portable multimedia devices, portable medical devices, cameras, wearable devices, or home appliances. Electronic devices according to embodiments disclosed herein are not limited to the aforementioned devices.
[0227] The embodiments of this document and the terminology used herein are not intended to limit the technical features described in this document to specific embodiments, but should be understood to include various modifications, equivalents, or substitutes of the embodiments. In connection with the description of the drawings, similar reference numerals may be used for similar or related components. The singular form of a noun corresponding to an item may include one or more of the items, unless the context clearly indicates otherwise. In this document, each of the phrases "A or B", "at least one of A and B", "at least one of A or B", "A, B, or C", "at least one of A, B, and C", and "at least one of A, B, or C" can include any one of the items listed together in the corresponding phrase among those phrases, or all possible combinations thereof. Terms such as "first," "second," or "first" or "second" may be used merely to distinguish one component from another, and do not limit the components in any other respect (e.g., importance or order). When a component (e.g., a first component) is referred to as "coupled" or "connected" to another (e.g., a second component), with or without the terms "functionally" or "communicatively," it means that the component can be connected to the other component directly (e.g., wired), wirelessly, or through a third component.
[0228] The term "module" used in one embodiment of this document may include a unit implemented in hardware, software, or firmware, and may be used interchangeably with terms such as logic, logic block, component, or circuit. A module may be an integral component, or a minimum unit or part of such a component that performs one or more functions. For example, according to one embodiment, a module may be implemented in the form of an application-specific integrated circuit (ASIC).
[0229] An embodiment of the present document may be implemented as software (e.g., a program (140)) including one or more instructions stored in a storage medium (e.g., an internal memory (136) or an external memory (138)) readable by a machine (e.g., an electronic device (101) or an electronic device (301)). For example, a processor (e.g., a first processor (320)) of the machine (e.g., an electronic device (301)) may call at least one instruction among the one or more instructions stored from the storage medium and execute it. This enables the machine to operate to perform at least one function according to the at least one called instruction. The one or more instructions may include code generated by a compiler or code executable by an interpreter. The machine-readable storage medium may be provided in the form of a non-transitory storage medium. Here, 'non-transitory' simply means that the storage medium is a tangible device and does not contain signals (e.g., electromagnetic waves), and the term does not distinguish between cases where data is stored semi-permanently or temporarily on the storage medium.
[0230] According to one embodiment, the method according to one embodiment disclosed in the present document may be provided as a computer program product. The computer program product may be traded between sellers and buyers as a product. The computer program product may be distributed in the form of a device-readable storage medium (e.g., compact disc read-only memory (CD-ROM)) or may be provided through an application store (e.g., Play Store). TM ) or directly between two user devices (e.g., smart phones), online distribution (e.g., downloading or uploading). In the case of online distribution, at least a portion of the computer program product may be at least temporarily stored or temporarily created in a machine-readable storage medium, such as the memory of a manufacturer's server, an application store's server, or an intermediary server.
[0231] According to one embodiment, each component (e.g., a module or a program) of the above-described components may include one or more entities, and some of the entities may be separated and placed in other components. According to one embodiment, one or more components or operations of the aforementioned components may be omitted, or one or more other components or operations may be added. Alternatively or additionally, a plurality of components (e.g., a module or a program) may be integrated into a single component. In such a case, the integrated component may perform one or more functions of each of the plurality of components identically or similarly to those performed by the corresponding component among the plurality of components prior to the integration. According to one embodiment, the operations performed by a module, program, or other component may be executed sequentially, in parallel, iteratively, or heuristically, or one or more of the operations may be executed in a different order, omitted, or one or more other operations may be added.
Claims
1. In an electronic device (101 of FIG. 1; 301 of FIGS. 2 to 3), Communication circuit (190 in Fig. 1; 390 in Fig. 3); a processor (102 in FIG. 1; 320 in FIG. 3); and It includes a memory (130 in Fig. 1; 330 in Fig. 3) that stores commands, The above instructions, when executed by the processor, cause the electronic device to: An electronic device configured to receive an brainwave signal from an external electronic device worn on a part of a user's body, obtain a power value of at least one frequency band among a plurality of frequency bands of the brainwave signal, and determine the user's state as being drowsy if the power value is greater than or equal to a reference value and the number of peaks at a plurality of time points of the brainwave signal is greater than or equal to a first reference number.
2. In paragraph 1, The above instructions, when executed by the processor, cause the electronic device to: If the power value is greater than the reference value, the user's state is predicted to be drowsy, If the state of the user is predicted to be drowsy, the number of peaks at the multiple points in time of the brain wave signal is detected and stored, An electronic device set to determine the user's status as drowsy if the number of the above peaks is greater than or equal to the first reference number.
3. In paragraph 1 or 2, The above instructions, when executed by the processor, cause the electronic device to: When the drowsiness state detection operation starts, the power values of at least one frequency band among the plurality of frequency bands of the brain wave signal received from the external electronic device are calculated for a first designated time from the start time of the drowsiness state detection operation, An electronic device set to calculate an average value of the power values calculated during the first specified time period and to calculate the reference value by doubling the average value.
4. In any one of paragraphs 1 to 3, The above instructions, when executed by the processor, cause the electronic device to: When the first specified time for calculating the reference value has elapsed, the power value of at least one band among the plurality of frequency bands of the brain wave signal is calculated at every second specified time shorter than the first specified time, Update the calculated power value by storing it in a first queue having a first length, When the first queue is updated, the average value of the power values stored in the first queue is calculated, If the above average value is greater than or equal to the reference value, the first value is stored in a second queue having a second predetermined length and updated. If the above average value is less than the above reference value, the second value is stored in the second queue and updated, When the second queue is updated, it is checked whether the number of first values stored in the second queue is greater than or equal to the second reference number, An electronic device set to predict the user's state as drowsy when the number of first values stored in the second queue is confirmed to be greater than or equal to the second reference number.
5. In any one of paragraphs 1 to 4, The above instructions, when executed by the processor, cause the electronic device to: Applying the above brainwave signal to a band-pass filter for low-frequency, Calculate the differential signal of the brain wave signal by subtracting the voltage value of the previous time from the voltage value of the current time among the voltage values of the brain wave signal applied to the filter, An electronic device configured to detect the number of peaks at said plurality of time points in said differential signal.
6. In any one of paragraphs 1 to 5, An electronic device wherein the plurality of time points are set to include a first time point at which the voltage value of the differential signal increases from less than a first voltage value to become the first voltage value, a second time point at which the voltage value of the differential signal decreases from greater than the first voltage value to become the first voltage value, a third time point at which the voltage value of the differential signal decreases from greater than a second voltage value to become the second voltage value, and a fourth time point at which the voltage value of the differential signal increases from less than the second voltage value to become the second voltage value.
7. In any one of paragraphs 1 to 6, The above instructions, when executed by the processor, cause the electronic device to: In the differential signal, the first time point and the second time point among the plurality of time points are sequentially checked, and if the amplitude of the peak related to the first time point and the second time point is greater than or equal to the first amplitude value, the peak is checked as a positive peak, In the differential signal, the third time point and the fourth time point among the plurality of time points are sequentially checked, and if the amplitude of the peak related to the third time point and the fourth time point is less than the second amplitude value, the peak is checked as a negative peak, An electronic device set to detect the positive peak and the negative peak sequentially as one peak.
8. In any one of paragraphs 1 to 7, The above instructions, when executed by the processor, cause the electronic device to use an artificial intelligence model. Detecting and storing the number of peaks, comparing the stored number of peaks with the first reference number, and determining the user's state as drowsy, The above artificial function model is an electronic device set to include a LIF (leaky integrate and fire) model, which is a basic model of an SNN (spiking neural network).
9. In any one of paragraphs 1 to 8, The above instructions, when executed by the processor, cause the electronic device to: An electronic device set to notify the user of the drowsiness state through the external electronic device worn on a part of the user's body when the user's state is confirmed to be the drowsy state.
10. In any one of paragraphs 1 to 9, The above instructions, when executed by the processor, cause the electronic device to: An electronic device configured to initiate a drowsiness detection operation when the external electronic device is worn on a body part of the user or when the user's selection for drowsiness detection is confirmed while the external electronic device is worn on a body part of the user.
11. A method for detecting a drowsy state in an electronic device, An action of receiving brain wave signals from an external electronic device worn on a part of the user's body; and A method comprising: obtaining a power value of at least one frequency band among a plurality of frequency bands of the above-mentioned brain wave signal; and, if the power value is equal to or greater than a reference value and the number of peaks at a plurality of time points of the brain wave signal is equal to or greater than a first reference number, determining the user's state as being drowsy.
12. In paragraph 11, An operation for predicting the user's state as drowsy if the power value is greater than or equal to the reference value; If the state of the user is predicted to be a drowsy state, an operation of detecting and storing the number of peaks at the plurality of time points of the brain wave signal; and A method further comprising an action of confirming the user's status as drowsy if the number of the peaks is greater than or equal to the first reference number.
13. In paragraph 11 or 12, When a drowsiness detection operation is started, an operation of calculating power values of at least one frequency band among the plurality of frequency bands of brain wave signals received from the external electronic device for a first designated time from the start time of the drowsiness detection operation; and A method further comprising calculating an average value of the power values calculated during the first specified time period, and calculating the reference value by doubling the average value.
14. In any one of paragraphs 11 to 13, When a first specified time for calculating the reference value has elapsed, an operation of calculating the power value of at least one band among a plurality of frequency bands of the brain wave signal at every second specified time shorter than the first specified time; An operation of updating the calculated power value by storing it in a first queue having a first length; An operation of calculating an average value of power values stored in the first queue when the first queue is updated; An operation of updating by storing the first value in a second queue having a second predetermined length if the above average value is greater than or equal to the reference value; An operation of updating the second value by storing it in the second queue if the average value is less than the reference value; When the second queue is updated, an operation of checking whether the number of first values stored in the second queue is greater than or equal to a second reference number; and A method further comprising an action of predicting the user's state as drowsy when the number of first values stored in the second queue is confirmed to be greater than or equal to the second reference number.
15. In a non-volatile storage medium storing commands, the commands are configured to cause the electronic device to perform at least one operation when executed by the electronic device, wherein the at least one operation is: An action of receiving brainwave signals from an external electronic device worn on a part of the user's body; A storage medium including an operation of obtaining a power value of at least one frequency band among a plurality of frequency bands of the above-mentioned brain wave signal, and determining the user's state as being drowsy if the power value is equal to or greater than a reference value and the number of peaks at a plurality of time points of the brain wave signal is equal to or greater than a first reference number.
Citation Information
Patent Citations
A method, system, and apparatus for extracting slow-wave-spindle-wave coupled signals during sleep.
CN115357126B
Alertness and drowsiness detection and tracking system
JP2002529118A
Systems and methods for determining sleep onset latency
JP2021505310A
Method And Apparatus for Measuring Brain Waves
KR101579543B1
The method for estimation of mental states from brain signal
KR1020120135452A