WO2025198169A1 - Electronic device and method for detecting drowsiness state in electronic device - Google Patents
Electronic device and method for detecting drowsiness state in electronic deviceInfo
- Publication number
- WO2025198169A1 WO2025198169A1 PCT/KR2025/001156 KR2025001156W WO2025198169A1 WO 2025198169 A1 WO2025198169 A1 WO 2025198169A1 KR 2025001156 W KR2025001156 W KR 2025001156W WO 2025198169 A1 WO2025198169 A1 WO 2025198169A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- electronic device
- value
- state
- user
- brain wave
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/48—Other medical applications
- A61B5/4806—Sleep evaluation
- A61B5/4809—Sleep detection, i.e. determining whether a subject is asleep or not
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/16—Devices for psychotechnics; Testing reaction times ; Devices for evaluating the psychological state
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/16—Devices for psychotechnics; Testing reaction times ; Devices for evaluating the psychological state
- A61B5/168—Evaluating attention deficit, hyperactivity
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/24—Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
- A61B5/316—Modalities, i.e. specific diagnostic methods
- A61B5/369—Electroencephalography [EEG]
- A61B5/372—Analysis of electroencephalograms
- A61B5/374—Detecting the frequency distribution of signals, e.g. detecting delta, theta, alpha, beta or gamma waves
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/72—Signal processing specially adapted for physiological signals or for diagnostic purposes
- A61B5/7235—Details of waveform analysis
- A61B5/7264—Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16H—HEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
- G16H50/00—ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics
- G16H50/20—ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics for computer-aided diagnosis, e.g. based on medical expert systems
Definitions
- FIGS. 5A and 5B are flowcharts for explaining an operation of detecting a drowsy state in an electronic device according to one embodiment.
- 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.
- 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.
- 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.
- FIGS. 9A and 9B are flowcharts for explaining an operation of detecting a drowsy state in an electronic device according to one embodiment.
- FIGS. 10A, 10B, and 10C illustrate experimental graphs for determining a drowsiness state in an electronic device according to one embodiment.
- FIG. 1 is a block diagram of an electronic device (101) within a network environment (100) according to an embodiment.
- 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).
- the electronic device (101) may communicate with the electronic device (104) via the server (108).
- 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).
- 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.
- 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)).
- 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.
- 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).
- 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.
- a main processor (121) e.g., a central processing unit or an application processor
- 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
- 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.
- 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.
- the auxiliary processor (123) e.g., an image signal processor or a communication processor
- the auxiliary processor (123) 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, in 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 a plurality of artificial neural network layers.
- the artificial neural network can 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), deep Q-networks, or a combination of two or more of the above, but is not limited to the examples described above.
- the artificial intelligence model can additionally or alternatively include a software structure.
- 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).
- 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).
- 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).
- 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.
- 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.
- 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.
- 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).
- an external electronic device e.g., electronic device (102)
- speaker or headphone directly or wirelessly connected to the electronic device (101).
- 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.
- 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.
- 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)).
- 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.
- HDMI high definition multimedia interface
- USB universal serial bus
- SD card interface Secure Digital Card
- 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)).
- 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).
- 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.
- the haptic module (179) can include, for example, a motor, a piezoelectric element, or an electrical stimulation device.
- the camera module (180) can capture still images and videos.
- the camera module (180) may include one or more lenses, image sensors, image signal processors, or flashes.
- the power management module (188) can manage power supplied to the electronic device (101).
- the power management module (188) can be implemented as, for example, at least a part of a power management integrated circuit (PMIC).
- PMIC power management integrated circuit
- a battery (189) may power at least one component of the electronic device (101).
- the battery (189) may include, for example, a non-rechargeable primary battery, a rechargeable secondary battery, or a fuel cell.
- 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.
- 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).
- 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
- GNSS global navigation satellite system
- wired communication module (194) e.g., a local area network (LAN) communication module, or a power line communication module.
- 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)).
- a first network (198) e.g., a short-range communication network such as Bluetooth, wireless fidelity (WiFi) direct, or infrared data association (IrDA)
- 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)
- a computer network e.g., a
- 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).
- subscriber information e.g., an international mobile subscriber identity (IMSI)
- 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)).
- eMBB enhanced mobile broadband
- mMTC massive machine type communications
- 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.
- a high-frequency band e.g., mmWave band
- 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)).
- 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.
- a peak data rate e.g., 20 Gbps or more
- a loss coverage e.g., 164 dB or less
- U-plane latency e.g., 0.5 ms or less for downlink (DL) and uplink (UL), or 1 ms or less for round trip
- the antenna module (197) can transmit or receive signals or power to or from an external device (e.g., an external electronic device).
- 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).
- 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.
- another component e.g., a radio frequency integrated circuit (RFIC)
- RFIC radio frequency integrated circuit
- the antenna module (197) may form a mmWave antenna module.
- 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.
- a first side e.g., a bottom side
- a plurality of antennas e.g., an array antenna
- 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)).
- peripheral devices e.g., a bus, GPIO (general purpose input and output), SPI (serial peripheral interface), or MIPI (mobile industry processor interface)).
- 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).
- 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.
- 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.
- 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.
- 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.
- 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.
- an external electronic device (201) 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.
- the external electronic device (201) 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).
- 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).
- the external electronic device (201) 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).
- a body part e.g., an ear
- 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).
- the external electronic device (201) 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).
- 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.
- 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.
- the electronic device (301) 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).
- a body part e.g., an ear
- 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).
- 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.
- the configuration of the electronic device (301) can be described in detail in the following drawing 3.
- 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).
- FIG. 3 is a block diagram of an electronic device according to an embodiment
- FIG. 4 is a diagram for explaining a peak number detection operation in an electronic device according to an embodiment.
- the electronic device (301) may include a processor (320), a memory (330), a display (360), and a communication circuit (390).
- the processor (320) may perform overall control operations of the electronic device (301).
- the processor (320) 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.
- An instruction may include an instruction configured in a machine language that can be processed by the electronic device (301) or the processor (320).
- the instruction may include an instruction corresponding to an operation instruction used in a program.
- 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.
- an external electronic device e.g., earbuds (201a) of FIG. 2
- a part of the user's body e.g., ear
- 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.
- 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).
- a first designated time e.g. 90 seconds
- 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.
- 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).
- 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.
- a first designated time e.g. 90 seconds
- 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.
- 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.
- 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).
- 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.
- the artificial intelligence model may include a leaky integrate and fire (LIF) model, which is a basic model of a spiking neural network (SNN).
- LIF leaky integrate and fire
- SNN spiking neural network
- 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.
- 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”.
- 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.
- the first reference number e.g. 15
- the processor (320) 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.
- 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.
- an external electronic device e.g., earbuds (201a) of FIG. 2
- 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.
- 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.
- an external electronic device e.g., earbuds (201a) of FIG. 2
- 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.
- the memory (330) may be implemented substantially identically or similarly to the memory (130) of FIG. 1.
- 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.
- an external electronic device e.g., earbud (201a) of FIG. 2
- 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).
- a communication circuit (390) may be implemented substantially identically or similarly to the communication circuit (190) of FIG. 1.
- the communication circuit (390) may include at least one of a wireless LAN circuit (not shown) and a short-range communication circuit (not shown).
- the communication circuit (390) 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.
- An electronic device (e.g., an electronic device (101) of FIG. 1 and/or an electronic device (301) of FIGS. 2 to 3) 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.
- 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
- a memory e.g., a memory (130) of FIG. 1 and/or a memory (330) of FIG. 3)
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- the instructions 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 may include a leaky integrate and fire (LIF) model, which is a basic model of a spiking neural network (SNN).
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- an external electronic device e.g., an earbud (201a) of FIG. 2
- a communication circuit of the electronic device e.g., a communication circuit (390) of FIG.
- 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.
- a body part e.g., an ear
- 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.
- the electronic device may calculate the first brain wave value every second specified time (e.g., 1 second).
- 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.
- 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.
- 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.
- 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.
- second specified time e.g. 1 second
- the electronic device can determine (predict) the state of the user wearing the external electronic device as being awake in operation 515.
- 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.
- 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).
- 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.
- 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.
- the electronic device can store the first value in the second queue in operation 609.
- 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.
- a first value e.g., true
- a second length e.g. 20 seconds long
- the electronic device can store the second value in the second queue in operation 611.
- 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.
- a second value e.g., false
- 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.
- 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.
- first values e.g., true
- second reference number e.g., more than half the length of the second queue
- the electronic device can determine (predict) the state of the user wearing the external electronic device as being awake in operation 615.
- the electronic device can predict the state of the user wearing the external electronic device as a drowsy state in operation 617.
- 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.
- 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.
- 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).
- 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).
- 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.
- 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).
- an external electronic device e.g., earbuds (201a) of FIG. 2
- a part of the user's body e.g., ear
- 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.
- 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.
- 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.
- a first voltage value e.g., 10
- 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 peak sequentially confirmed at the first time point and the second time point can be detected as a positive peak.
- the above operation 701 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.
- 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).
- the second amplitude e.g., -60
- 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.
- 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.
- 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.
- 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.
- 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.
- the operation 720 including the above operation 721 to the above operation 725 can be described in detail in FIGS. 8a and 8b.
- 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.
- 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.
- 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).
- 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).
- 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.
- the electronic device can check the number of peaks stored in a memory of the electronic device (e.g., memory (330) of FIG. 3).
- 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.
- 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.
- the electronic device can check the number of peaks stored in a memory of the electronic device (e.g., memory (330) of FIG. 3).
- 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).
- 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.
- 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).
- the electronic device can determine the state of the user wearing the external electronic device as 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).
- the electronic device can determine the state of the user wearing the external electronic device as an awake state.
- 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.
- the electronic device 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”.
- the first reference number e.g. 15
- the first variable (v_before) value of v_before - first reference number
- 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).
- the first reference number e.g. 15
- 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.
- 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).
- the electronic device can determine, in the above operation 809, the state of the user wearing the external electronic device as a drowsy state.
- 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).
- the electronic device can determine the state of the user wearing the external electronic device as an awake state.
- 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.
- 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.
- 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.
- 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.
- an external electronic device e.g., an earbud (201a) of FIG. 2
- a communication circuit of the electronic device e.g., a communication circuit (390) of FIG.
- 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.
- a body part e.g., an ear
- 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.
- the electronic device may calculate the first brain wave value every second specified time (e.g., 1 second).
- 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.
- 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.
- 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.
- 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.
- second specified time e.g. 1 second
- the electronic device can determine the state of the user wearing the external electronic device as a drowsy state in operation 909.
- 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.
- the electronic device may notify the user of the drowsy state through the external electronic device or the electronic device.
- 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.
- the electronic device can predict the state of the user wearing the external electronic device as being awake in the operation 911.
- 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.
- 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.
- the electronic device can determine, in operation 915, that the state of the user wearing the external electronic device is an awake state.
- the electronic device can determine the state of the user wearing the external electronic device as a drowsy state in operation 917.
- 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.
- 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.
- 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.
- 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.
- the electronic device can repeatedly execute the operations 901 to 919.
- the electronic device can terminate the drowsiness state detection operation when it is confirmed that the drowsiness state detection operation has ended.
- FIGS. 10A, 10B, and 10C illustrate experimental graphs for determining a drowsiness state in an electronic device according to one embodiment.
- 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
- the dotted line represents the reference value calculated using the subjects' brain wave signals.
- 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
- the solid line represents the value of the second variable (v_now) among the two variables configured in the artificial intelligence model.
- 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.
- 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.
- the value of the graph indicated by the blue line is "0"
- the subject's state can be confirmed as awake
- the value of the graph indicated by the blue line is "1”
- the subject's state can be confirmed as drowsy.
- a method for detecting a drowsy state in an electronic device 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- the method may include an operation of detecting the positive peak and the negative peak as one peak when they are sequentially checked.
- 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 may include a leaky integrate and fire (LIF) model, which is a basic model of a spiking neural network (SNN).
- 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.
- 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.
- Electronic devices 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.
- 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).
- a component e.g., a first component
- another e.g., a second component
- functionally e.g., a third component
- 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.
- a module may be implemented in the form of an application-specific integrated circuit (ASIC).
- ASIC application-specific integrated circuit
- 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)).
- a processor e.g., a first processor (320)
- the machine e.g., an electronic device (301)
- 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.
- '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.
- the method according to one embodiment disclosed in the present document may be provided as included in a computer program product.
- the computer program product may be traded as a product between a seller and a buyer.
- the computer program product may be distributed in the form of a machine-readable storage medium (e.g., compact disc read only memory (CD-ROM)), or may be distributed online (e.g., downloaded or uploaded) via an application store (e.g., Play Store TM ) or directly between two user devices (e.g., smart phones).
- an application store e.g., Play Store TM
- at least a portion of the computer program product may be temporarily stored or temporarily generated in a machine-readable storage medium, such as the memory of a manufacturer's server, an application store's server, or an intermediary server.
- 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.
- one or more components or operations of the aforementioned components may be omitted, or one or more other components or operations may be added.
- a plurality of components e.g., a module or a program
- 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.
- 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.
Landscapes
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Engineering & Computer Science (AREA)
- Biomedical Technology (AREA)
- Physics & Mathematics (AREA)
- General Health & Medical Sciences (AREA)
- Public Health (AREA)
- Medical Informatics (AREA)
- Pathology (AREA)
- Biophysics (AREA)
- Molecular Biology (AREA)
- Veterinary Medicine (AREA)
- Animal Behavior & Ethology (AREA)
- Surgery (AREA)
- Heart & Thoracic Surgery (AREA)
- Psychiatry (AREA)
- Artificial Intelligence (AREA)
- Data Mining & Analysis (AREA)
- Psychology (AREA)
- Theoretical Computer Science (AREA)
- Developmental Disabilities (AREA)
- Mathematical Physics (AREA)
- Evolutionary Computation (AREA)
- Hospice & Palliative Care (AREA)
- Computational Linguistics (AREA)
- Social Psychology (AREA)
- Computing Systems (AREA)
- Databases & Information Systems (AREA)
- Educational Technology (AREA)
- Software Systems (AREA)
- Primary Health Care (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Epidemiology (AREA)
- Child & Adolescent Psychology (AREA)
- Signal Processing (AREA)
- Fuzzy Systems (AREA)
- Physiology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Anesthesiology (AREA)
Abstract
Description
본 개시는 전자 장치 및 전자 장치에서 졸음 상태를 검출하기 위한 방법에 관한 것이다.The present disclosure relates to an electronic device and a method for detecting a drowsy state in the electronic device.
뇌파 신호를 이용하여 사용자의 활동 상태(예:수면 상태 또는 졸음 상태등) 또는 사용자의 건강 상태를 해석할 수 있음에 따라, 뇌파 신호를 이용한 다양한 시도들이 대두되고 있다.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.
특히, 졸음이 치명적인 차량 운전 상황이나, 사용자가 공부 등의 집중 상황일 때, 그리고 사용자의 헬스케어 명목으로도 뇌파 신호를 이용하여 사용자의 활동 상태(예: 수면 상태 또는 졸음 상태등) 또는 사용자의 건강 상태를 확인할 수 있다. 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.
사용자의 신체 일부에 착용되는 외부 전자 장치로부터 수신된 뇌파신호와 상기 뇌파 신호에 포함된 노이즈를 이용하여 사용자의 졸음 상태를 더욱 정확히 판단할 수 있다.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.
일 실시 예에 따른 전자 장치는, 통신 회로, 프로세서, 및 명령어들을 저장하는 메모리를 포함할 수 있다. 일 실시 예에 따른 상기 명령어들은, 상기 프로세서에 의해 실행 될 때, 상기 웨어러블 전자 장치로 하여금, 사용자의 신체일부에 착용된 외부 전자 장치로부터 뇌파 신호를 수신하면, 상기 뇌파 신호의 복수의 주파수 대역들 중 적어도 하나의 주파수 대역의 전력 값을 획득할 수 있다. 일 실시 예에 따른 상기 명령어들은, 상기 프로세서에 의해 실행 될 때, 상기 웨어러블 전자 장치로 하여금, 상기 전력 값이 기준 값 이상이고, 상기 뇌파 신호의 복수의 시점들에서 피크의 개수가 제1 기준 개수 이상이면, 시점 사용자의 상태를 졸음 상태로 확인할 수 있다.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.
일 실시 예에 따른 전자 장치에서 졸음 상태를 검출하는 방법은, 사용자의 신체일부에 착용된 외부 전자 장치로부터 뇌파 신호를 수신하는 동작을 포함할 수 있다. 일 실시 예에 따른 상기 방법은, 상기기 뇌파 신호의 복수의 주파수 대역들 중 적어도 하나의 주파수 대역의 전력 값을 획득하고, 상기 전력 값이 기준 값 이상이고, 상기 뇌파 신호의 복수의 시점들에서 피크의 개수가 제1 기준 개수 이상이면, 사용자의 상태를 졸음 상태로 확인하는 동작을 포함할 수 있다.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.
일 실시 예에 따른 명령어들을 저장하고 있는 비휘발성 저장 매체에 있어서, 상기 명령어들은 전자 장치에 의하여 실행될 때에 상기 전자 장치로 하여금 적어도 하나의 동작을 수행하도록 설정된 것으로서, 상기 적어도 하나의 동작은, 사용자의 신체일부에 착용된 외부 전자 장치로부터 뇌파 신호를 수신하는 동작을 포함할 수 있다. 일 실시 예에 따른 상기 적어도 하나의 동작은, 상기기 뇌파 신호의 복수의 주파수 대역들 중 적어도 하나의 주파수 대역의 전력 값을 획득하고, 상기 전력 값이 기준 값 이상이고, 상기 뇌파 신호의 복수의 시점들에서 피크의 개수가 제1 기준 개수 이상이면, 사용자의 상태를 졸음 상태로 확인하는 동작을 포함할 수 있다.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.
도 1은 일 실시 예에 따른 네트워크 환경 내의 전자 장치의 블록도 이다. FIG. 1 is a block diagram of an electronic device within a network environment according to one embodiment.
도 2는 일 실시 예에 따른 전자 장치가 외부 전자 장치로부터 뇌파 신호를 수신하는 동작을 설명하기 위한 도면이다.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.
도 3은 일 실시 예에 따른 전자 장치의 블록도이다.Figure 3 is a block diagram of an electronic device according to one embodiment.
도 4는 일 실시 예에 따른 전자 장치에서 피크 개수의 검출 동작을 설명하기 위한 도면이다.FIG. 4 is a diagram for explaining a peak number detection operation in an electronic device according to one embodiment.
도 5a 내지 도 5b는 일 실시 예에 따른 전자 장치에서 졸음 상태를 검출하는 동작을 설명하기 위한 흐름도이다.FIGS. 5A and 5B are flowcharts for explaining an operation of detecting a drowsy state in an electronic device according to one embodiment.
도 6은 일 실시 예에 따른 전자 장치에서 제1 뇌파 값을 이용하여 졸음 상태를 검출하는 동작을 설명하기 위한 흐름도이다.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.
도 7a 내지 도 7b는 일 실시 예에 따른 전자 장치에서 피크 개수를 이용하여 졸음 상태를 검출하는 동작을 설명하기 위한 흐름도이다.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.
도 8a 내지 도 8b는 일 실시 예에 따른 전자 장치에서 피크 개수를 이용하여 졸음 상태를 검출하는 동작을 설명하기 위한 흐름도이다.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.
도 9a 내지 도 9b는 일 실시 예에 따른 전자 장치에서 졸음 상태를 검출하는 동작을 설명하기 위한 흐름도이다.FIGS. 9A and 9B are flowcharts for explaining an operation of detecting a drowsy state in an electronic device according to one embodiment.
도 10a, 도 10b, 및 도 10c는 일 실시 예에 따른 전자 장치에서 졸음 상태를 결정하기 위한 실험 그래프들을 도시하고 있다.FIGS. 10A, 10B, and 10C illustrate experimental graphs for determining a drowsiness state in an electronic device according to one embodiment.
도 1은, 일 실시 예에 따른, 네트워크 환경(100) 내의 전자 장치(101)의 블록 도이다. 도 1을 참조하면, 네트워크 환경(100)에서 전자 장치(101)는 제1 네트워크(198)(예: 근거리 무선 통신 네트워크)를 통하여 전자 장치(102)와 통신하거나, 또는 제 2 네트워크(199)(예: 원거리 무선 통신 네트워크)를 통하여 전자 장치(104) 또는 서버(108) 중 적어도 하나와 통신할 수 있다. 일 실시 예에 따르면, 전자 장치(101)는 서버(108)를 통하여 전자 장치(104)와 통신할 수 있다. 일 실시 예에 따르면, 전자 장치(101)는 프로세서(120), 메모리(130), 입력 모듈(150), 음향 출력 모듈(155), 디스플레이 모듈(160), 오디오 모듈(170), 센서 모듈(176), 인터페이스(177), 연결 단자(178), 햅틱 모듈(179), 카메라 모듈(180), 전력 관리 모듈(188), 배터리(189), 통신 모듈(190), 가입자 식별 모듈(196), 또는 안테나 모듈(197)을 포함할 수 있다. 어떤 실시 예에서는, 전자 장치(101)에는, 이 구성요소들 중 적어도 하나(예: 연결 단자(178))가 생략되거나, 하나 이상의 다른 구성요소가 추가될 수 있다. 어떤 실시 예에서는, 이 구성요소들 중 일부들(예: 센서 모듈(176), 카메라 모듈(180), 또는 안테나 모듈(197))은 하나의 구성요소(예: 디스플레이 모듈(160))로 통합될 수 있다.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)).
프로세서(120)는, 예를 들면, 소프트웨어(예: 프로그램(140))를 실행하여 프로세서(120)에 연결된 전자 장치(101)의 적어도 하나의 다른 구성요소(예: 하드웨어 또는 소프트웨어 구성요소)를 제어할 수 있고, 다양한 데이터 처리 또는 연산을 수행할 수 있다. 일 실시 예에 따르면, 데이터 처리 또는 연산의 적어도 일부로서, 프로세서(120)는 다른 구성요소(예: 센서 모듈(176) 또는 통신 모듈(190))로부터 수신된 명령 또는 데이터를 휘발성 메모리(132)에 저장하고, 휘발성 메모리(132)에 저장된 명령 또는 데이터를 처리하고, 결과 데이터를 비휘발성 메모리(134)에 저장할 수 있다. 일 실시 예에 따르면, 프로세서(120)는 메인 프로세서(121)(예: 중앙 처리 장치 또는 어플리케이션 프로세서) 또는 이와는 독립적으로 또는 함께 운영 가능한 보조 프로세서(123)(예: 그래픽 처리 장치, 신경망 처리 장치(NPU: neural processing unit), 이미지 시그널 프로세서, 센서 허브 프로세서, 또는 커뮤니케이션 프로세서)를 포함할 수 있다. 예를 들어, 전자 장치(101)가 메인 프로세서(121) 및 보조 프로세서(123)를 포함하는 경우, 보조 프로세서(123)는 메인 프로세서(121)보다 저전력을 사용하거나, 지정된 기능에 특화되도록 설정될 수 있다. 보조 프로세서(123)는 메인 프로세서(121)와 별개로, 또는 그 일부로서 구현될 수 있다.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.
보조 프로세서(123)는, 예를 들면, 메인 프로세서(121)가 인액티브(예: 슬립) 상태에 있는 동안 메인 프로세서(121)를 대신하여, 또는 메인 프로세서(121)가 액티브(예: 어플리케이션 실행) 상태에 있는 동안 메인 프로세서(121)와 함께, 전자 장치(101)의 구성요소들 중 적어도 하나의 구성요소(예: 디스플레이 모듈(160), 센서 모듈(176), 또는 통신 모듈(190))와 관련된 기능 또는 상태들의 적어도 일부를 제어할 수 있다. 일 실시 예에 따르면, 보조 프로세서(123)(예: 이미지 시그널 프로세서 또는 커뮤니케이션 프로세서)는 기능적으로 관련 있는 다른 구성요소(예: 카메라 모듈(180) 또는 통신 모듈(190))의 일부로서 구현될 수 있다. 일 실시 예에 따르면, 보조 프로세서(123)(예: 신경망 처리 장치)는 인공지능 모델의 처리에 특화된 하드웨어 구조를 포함할 수 있다. 인공지능 모델은 기계 학습을 통해 생성될 수 있다. 이러한 학습은, 예를 들어, 인공지능 모델이 수행되는 전자 장치(101) 자체에서 수행될 수 있고, 별도의 서버(예: 서버(108))를 통해 수행될 수도 있다. 학습 알고리즘은, 예를 들어, 지도형 학습(supervised learning), 비지도형 학습(unsupervised learning), 준지도형 학습(semi-supervised learning) 또는 강화 학습(reinforcement learning)을 포함할 수 있으나, 전술한 예에 한정되지 않는다. 인공지능 모델은, 복수의 인공 신경망 레이어들을 포함할 수 있다. 인공 신경망은 심층 신경망(DNN: deep neural network), CNN(convolutional neural network), RNN(recurrent neural network), RBM(restricted boltzmann machine), DBN(deep belief network), BRDNN(bidirectional recurrent deep neural network), 심층 Q-네트워크(deep Q-networks) 또는 상기 중 둘 이상의 조합 중 하나일 수 있으나, 전술한 예에 한정되지 않는다. 인공지능 모델은 하드웨어 구조 이외에, 추가적으로 또는 대체적으로, 소프트웨어 구조를 포함할 수 있다.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, in 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 a plurality of artificial neural network layers. The artificial neural network can 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), deep Q-networks, or a combination of two or more of the above, but is not limited to the examples described above. In addition to the hardware structure, the artificial intelligence model can additionally or alternatively include a software structure.
메모리(130)는, 전자 장치(101)의 적어도 하나의 구성요소(예: 프로세서(120) 또는 센서 모듈(176))에 의해 사용되는 다양한 데이터를 저장할 수 있다. 데이터는, 예를 들어, 소프트웨어(예: 프로그램(140)) 및, 이와 관련된 명령에 대한 입력 데이터 또는 출력 데이터를 포함할 수 있다. 메모리(130)는, 휘발성 메모리(132) 또는 비휘발성 메모리(134)를 포함할 수 있다. 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).
프로그램(140)은 메모리(130)에 소프트웨어로서 저장될 수 있으며, 예를 들면, 운영 체제(142), 미들 웨어(144) 또는 어플리케이션(146)을 포함할 수 있다. 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).
입력 모듈(150)은, 전자 장치(101)의 구성요소(예: 프로세서(120))에 사용될 명령 또는 데이터를 전자 장치(101)의 외부(예: 사용자)로부터 수신할 수 있다. 입력 모듈(150)은, 예를 들면, 마이크, 마우스, 키보드, 키(예: 버튼), 또는 디지털 펜(예: 스타일러스 펜)을 포함할 수 있다. 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).
음향 출력 모듈(155)은 음향 신호를 전자 장치(101)의 외부로 출력할 수 있다. 음향 출력 모듈(155)은, 예를 들면, 스피커 또는 리시버를 포함할 수 있다. 스피커는 멀티미디어 재생 또는 녹음 재생과 같이 일반적인 용도로 사용될 수 있다. 리시버는 착신 전화를 수신하기 위해 사용될 수 있다. 일 실시 예에 따르면, 리시버는 스피커와 별개로, 또는 그 일부로서 구현될 수 있다.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.
디스플레이 모듈(160)은 전자 장치(101)의 외부(예: 사용자)로 정보를 시각적으로 제공할 수 있다. 디스플레이 모듈(160)은, 예를 들면, 디스플레이, 홀로그램 장치, 또는 프로젝터 및 해당 장치를 제어하기 위한 제어 회로를 포함할 수 있다. 일 실시 예에 따르면, 디스플레이 모듈(160)은 터치를 감지하도록 설정된 터치 센서, 또는 상기 터치에 의해 발생되는 힘의 세기를 측정하도록 설정된 압력 센서를 포함할 수 있다. 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.
오디오 모듈(170)은 소리를 전기 신호로 변환시키거나, 반대로 전기 신호를 소리로 변환시킬 수 있다. 일 실시 예에 따르면, 오디오 모듈(170)은, 입력 모듈(150)을 통해 소리를 획득하거나, 음향 출력 모듈(155), 또는 전자 장치(101)와 직접 또는 무선으로 연결된 외부 전자 장치(예: 전자 장치(102))(예: 스피커 또는 헤드폰)를 통해 소리를 출력할 수 있다.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).
센서 모듈(176)은 전자 장치(101)의 작동 상태(예: 전력 또는 온도), 또는 외부의 환경 상태(예: 사용자 상태)를 감지하고, 감지된 상태에 대응하는 전기 신호 또는 데이터 값을 생성할 수 있다. 일 실시 예에 따르면, 센서 모듈(176)은, 예를 들면, 제스처 센서, 자이로 센서, 기압 센서, 마그네틱 센서, 가속도 센서, 그립 센서, 근접 센서, 컬러 센서, IR(infrared) 센서, 생체 센서, 온도 센서, 습도 센서, 또는 조도 센서를 포함할 수 있다. 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.
인터페이스(177)는 전자 장치(101)가 외부 전자 장치(예: 전자 장치(102))와 직접 또는 무선으로 연결되기 위해 사용될 수 있는 하나 이상의 지정된 프로토콜들을 지원할 수 있다. 일 실시 예에 따르면, 인터페이스(177)는, 예를 들면, HDMI(high definition multimedia interface), USB(universal serial bus) 인터페이스, SD카드 인터페이스, 또는 오디오 인터페이스를 포함할 수 있다.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.
연결 단자(178)는, 그를 통해서 전자 장치(101)가 외부 전자 장치(예: 전자 장치(102))와 물리적으로 연결될 수 있는 커넥터를 포함할 수 있다. 일 실시 예에 따르면, 연결 단자(178)는, 예를 들면, HDMI 커넥터, USB 커넥터, SD 카드 커넥터, 또는 오디오 커넥터(예: 헤드폰 커넥터)를 포함할 수 있다.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).
햅틱 모듈(179)은 전기적 신호를 사용자가 촉각 또는 운동 감각을 통해서 인지할 수 있는 기계적인 자극(예: 진동 또는 움직임) 또는 전기적인 자극으로 변환할 수 있다. 일 실시 예에 따르면, 햅틱 모듈(179)은, 예를 들면, 모터, 압전 소자, 또는 전기 자극 장치를 포함할 수 있다.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.
카메라 모듈(180)은 정지 영상 및 동영상을 촬영할 수 있다. 일 실시 예에 따르면, 카메라 모듈(180)은 하나 이상의 렌즈들, 이미지 센서들, 이미지 시그널 프로세서들, 또는 플래시들을 포함할 수 있다.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.
전력 관리 모듈(188)은 전자 장치(101)에 공급되는 전력을 관리할 수 있다. 일 실시 예에 따르면, 전력 관리 모듈(188)은, 예를 들면, PMIC(power management integrated circuit)의 적어도 일부로서 구현될 수 있다.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).
배터리(189)는 전자 장치(101)의 적어도 하나의 구성요소에 전력을 공급할 수 있다. 일 실시 예에 따르면, 배터리(189)는, 예를 들면, 재충전 불가능한 1차 전지, 재충전 가능한 2차 전지 또는 연료 전지를 포함할 수 있다.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.
통신 모듈(190)은 전자 장치(101)와 외부 전자 장치(예: 전자 장치(102), 전자 장치(104), 또는 서버(108)) 간의 직접(예: 유선) 통신 채널 또는 무선 통신 채널의 수립, 및 수립된 통신 채널을 통한 통신 수행을 지원할 수 있다. 통신 모듈(190)은 프로세서(120)(예: 어플리케이션 프로세서)와 독립적으로 운영되고, 직접(예: 유선) 통신 또는 무선 통신을 지원하는 하나 이상의 커뮤니케이션 프로세서를 포함할 수 있다. 일 실시 예에 따르면, 통신 모듈(190)은 무선 통신 모듈(192)(예: 셀룰러 통신 모듈, 근거리 무선 통신 모듈, 또는 GNSS(global navigation satellite system) 통신 모듈) 또는 유선 통신 모듈(194)(예: LAN(local area network) 통신 모듈, 또는 전력선 통신 모듈)을 포함할 수 있다. 이들 통신 모듈 중 해당하는 통신 모듈은 제1 네트워크(198)(예: 블루투스, WiFi(wireless fidelity) direct 또는 IrDA(infrared data association)와 같은 근거리 통신 네트워크) 또는 제 2 네트워크(199)(예: 레거시 셀룰러 네트워크, 5G 네트워크, 차세대 통신 네트워크, 인터넷, 또는 컴퓨터 네트워크(예: LAN 또는 WAN)와 같은 원거리 통신 네트워크)를 통하여 외부의 전자 장치(104)와 통신할 수 있다. 이런 여러 종류의 통신 모듈들은 하나의 구성요소(예: 단일 칩)로 통합되거나, 또는 서로 별도의 복수의 구성요소들(예: 복수 칩들)로 구현될 수 있다. 무선 통신 모듈(192)은 가입자 식별 모듈(196)에 저장된 가입자 정보(예: 국제 모바일 가입자 식별자(IMSI))를 이용하여 제1 네트워크(198) 또는 제 2 네트워크(199)와 같은 통신 네트워크 내에서 전자 장치(101)를 확인 또는 인증할 수 있다. 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).
무선 통신 모듈(192)은 4G 네트워크 이후의 5G 네트워크 및 차세대 통신 기술, 예를 들어, NR 접속 기술(new radio access technology)을 지원할 수 있다. NR 접속 기술은 고용량 데이터의 고속 전송(eMBB(enhanced mobile broadband)), 단말 전력 최소화와 다수 단말의 접속(mMTC(massive machine type communications)), 또는 고신뢰도와 저지연(URLLC(ultra-reliable and low-latency communications))을 지원할 수 있다. 무선 통신 모듈(192)은, 예를 들어, 높은 데이터 전송률 달성을 위해, 고주파 대역(예: mmWave 대역)을 지원할 수 있다. 무선 통신 모듈(192)은 고주파 대역에서의 성능 확보를 위한 다양한 기술들, 예를 들어, 빔포밍(beamforming), 거대 배열 다중 입출력(massive MIMO(multiple-input and multiple-output)), 전차원 다중입출력(FD-MIMO: full dimensional MIMO), 어레이 안테나(array antenna), 아날로그 빔형성(analog beam-forming), 또는 대규모 안테나(large scale antenna)와 같은 기술들을 지원할 수 있다. 무선 통신 모듈(192)은 전자 장치(101), 외부 전자 장치(예: 전자 장치(104)) 또는 네트워크 시스템(예: 제 2 네트워크(199))에 규정되는 다양한 요구사항을 지원할 수 있다. 일 실시 예에 따르면, 무선 통신 모듈(192)은 eMBB 실현을 위한 Peak data rate(예: 20Gbps 이상), mMTC 실현을 위한 손실 Coverage(예: 164dB 이하), 또는 URLLC 실현을 위한 U-plane latency(예: 다운링크(DL) 및 업링크(UL) 각각 0.5ms 이하, 또는 라운드 트립 1ms 이하)를 지원할 수 있다.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.
안테나 모듈(197)은 신호 또는 전력을 외부(예: 외부의 전자 장치)로 송신하거나 외부로부터 수신할 수 있다. 일 실시 예에 따르면, 안테나 모듈(197)은 서브스트레이트(예: PCB) 위에 형성된 도전체 또는 도전성 패턴으로 이루어진 방사체를 포함하는 안테나를 포함할 수 있다. 일 실시 예에 따르면, 안테나 모듈(197)은 복수의 안테나들(예: 어레이 안테나)을 포함할 수 있다. 이런 경우, 제1 네트워크(198) 또는 제 2 네트워크(199)와 같은 통신 네트워크에서 사용되는 통신 방식에 적합한 적어도 하나의 안테나가, 예를 들면, 통신 모듈(190)에 의하여 상기 복수의 안테나들로부터 선택될 수 있다. 신호 또는 전력은 상기 선택된 적어도 하나의 안테나를 통하여 통신 모듈(190)과 외부의 전자 장치 간에 송신되거나 수신될 수 있다. 어떤 실시예에 따르면, 방사체 이외에 다른 부품(예: RFIC(radio frequency integrated circuit))이 추가로 안테나 모듈(197)의 일부로 형성될 수 있다. 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).
일 실시예에 따르면, 안테나 모듈(197)은 mmWave 안테나 모듈을 형성할 수 있다. 일 실시 예에 따르면, mmWave 안테나 모듈은 인쇄 회로 기판, 상기 인쇄 회로 기판의 제1 면(예: 아래 면)에 또는 그에 인접하여 배치되고 지정된 고주파 대역(예: mmWave 대역)을 지원할 수 있는 RFIC, 및 상기 인쇄 회로 기판의 제 2 면(예: 윗 면 또는 측 면)에 또는 그에 인접하여 배치되고 상기 지정된 고주파 대역의 신호를 송신 또는 수신할 수 있는 복수의 안테나들(예: 어레이 안테나)을 포함할 수 있다.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.
상기 구성요소들 중 적어도 일부는 주변 기기들간 통신 방식(예: 버스, GPIO(general purpose input and output), SPI(serial peripheral interface), 또는 MIPI(mobile industry processor interface))을 통해 서로 연결되고 신호(예: 명령 또는 데이터)를 상호간에 교환할 수 있다.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)).
일 실시 예에 따르면, 명령 또는 데이터는 제 2 네트워크(199)에 연결된 서버(108)를 통해서 전자 장치(101)와 외부의 전자 장치(104)간에 송신 또는 수신될 수 있다. 외부의 전자 장치(102, 또는 104) 각각은 전자 장치(101)와 동일한 또는 다른 종류의 장치일 수 있다. 일 실시 예에 따르면, 전자 장치(101)에서 실행되는 동작들의 전부 또는 일부는 외부의 전자 장치들(102, 104, 또는 108) 중 하나 이상의 외부의 전자 장치들에서 실행될 수 있다. 예를 들면, 전자 장치(101)가 어떤 기능이나 서비스를 자동으로, 또는 사용자 또는 다른 장치로부터의 요청에 반응하여 수행해야 할 경우에, 전자 장치(101)는 기능 또는 서비스를 자체적으로 실행시키는 대신에 또는 추가적으로, 하나 이상의 외부의 전자 장치들에게 그 기능 또는 그 서비스의 적어도 일부를 수행하라고 요청할 수 있다. 상기 요청을 수신한 하나 이상의 외부의 전자 장치들은 요청된 기능 또는 서비스의 적어도 일부, 또는 상기 요청과 관련된 추가 기능 또는 서비스를 실행하고, 그 실행의 결과를 전자 장치(101)로 전달할 수 있다. 전자 장치(101)는 상기 결과를, 그대로 또는 추가적으로 처리하여, 상기 요청에 대한 응답의 적어도 일부로서 제공할 수 있다. 이를 위하여, 예를 들면, 클라우드 컴퓨팅, 분산 컴퓨팅, 모바일 에지 컴퓨팅(MEC: mobile edge computing), 또는 클라이언트-서버 컴퓨팅 기술이 이용될 수 있다. 전자 장치(101)는, 예를 들어, 분산 컴퓨팅 또는 모바일 에지 컴퓨팅을 이용하여 초저지연 서비스를 제공할 수 있다. 다른 실시예에 있어서, 외부의 전자 장치(104)는 IoT(internet of things) 기기를 포함할 수 있다. 서버(108)는 기계 학습 및/또는 신경망을 이용한 지능형 서버일 수 있다. 일 실시 예에 따르면, 외부의 전자 장치(104) 또는 서버(108)는 제 2 네트워크(199) 내에 포함될 수 있다. 전자 장치(101)는 5G 통신 기술 및 IoT 관련 기술을 기반으로 지능형 서비스(예: 스마트 홈, 스마트 시티, 스마트 카, 또는 헬스 케어)에 적용될 수 있다. 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.
도 2는 일 실시 예에 따른 전자 장치가 외부 전자 장치로부터 뇌파 신호를 수신하는 동작을 설명하기 위한 도면이다.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.
상기 도 2를 참조하면, 일 실시 예에 따른 외부 전자 장치(201)는, 사용자의 신체 일부(예: 귀)에 착용될 수 있는 웨어러블 전자 장치를 포함할 수 있다. 상기 웨어러블 전자 장치는, 예를 들어 무선 이어버즈(201a), 유선 이어폰(201b) 및/또는 헤드셋(201c)등과 같이 사용자의 신체 일부(예: 귀)에 착용되어 상기 사용자의 뇌파를 측정할 수 있는 전자 장치를 포함할 수 있다. 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.
일 실시 예에 따른 상기 외부 전자 장치(201)는, 뇌파 신호를 측정할 수 있는 뇌파 센서를 포함하고 있으며, 사용자의 신체 일부(예: 귀)에 착용될 때 상기 뇌파 센서를 통해 뇌파 신호를 측정할 수 있다.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).
일 실시 예에 따른 상기 외부 전자 장치(201)는, 상기 외부 전자 장치(201)가 상기 사용자의 신체 일부(예: 귀)에 착용됨을 확인하면, 상기 외부 전자 장치(201)가 상기 사용자의 신체 일부(예: 귀)에 착용되었다는 신호를 상기 외부 전자 장치(201)와 통신이 연결된 전자 장치(301)로 전송한 이후, 상기 외부 전자 장치(201)에 포함된 상기 뇌파 센서를 통해 뇌파 신호를 측정하고, 상기 측정된 뇌파 신호를 상기 전자 장치(301)로 전송할 수 있다.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).
일 실시 예에 따른 상기 외부 전자 장치(201)는, 상기 외부 전자 장치(201)가 상기 사용자의 신체 일부(예: 귀)에 착용되어 있는 동안, 상기 외부 전자 장치(201)와 통신이 연결된 상기 전자 장치(301)로부터 졸음 상태 검출을 위한 뇌파 측정 시작을 알리는 신호를 수신하면, 상기 외부 전자 장치(201)에 포함된 상기 뇌파 센서를 통해 뇌파 신호를 측정하고, 상기 측정된 뇌파 신호를 상기 전자 장치(301)로 전송할 수 있다.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).
일 실시 예에 따른 상기 전자 장치(301)는, 상기 전자 장치(301)와 통신이 연결된 상기 외부 전자 장치(201)로부터 수신되는 뇌파 신호의 복수의 주파수 대역들 중 적어도 하나의 주파수 대역의 전력 값을 제1 뇌파 값으로 획득(계산)하고, 상기 제1 뇌파 값이 기준 값 이상이면, 상기 외부 전자 장치(201)가 착용된 사용자의 상태를 졸음 상태로 예측할 수 있다. 일 실시 예에 따른 상기 전자 장치(301)는, 상기 제1 뇌파 값을 이용하여 상기 외부 전자 장치(201)가 착용된 사용자의 상태를 졸음 상태로 예측하면, 상기 뇌파 신호에서 지정된 복수의 시점들에서 지정된 진폭을 가지는 피크의 개수를 저장하고, 상기 저장된 피크의 개수가 제1 기준 개수 이상이면 상기 외부 전자 장치(201)가 착용된 사용자의 상태를 졸음 상태로 확인(결정)할 수 있다. 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.
일 실시 예에 따른 상기 전자 장치(301)는, 상기 외부 전자 장치(201)로부터 상기 외부 전자 장치(201)가 상기 사용자의 신체 일부(예: 귀)에 착용되었다는 신호를 수신하면, 상기 외부 전자 장치(201)로부터 수신될 뇌파 신호를 대기할 수 있다.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).
일 실시 예에 따른 상기 전자 장치(301)는, 상기 외부 전자 장치(201)로부터 상기 외부 전자 장치(201)가 상기 사용자의 신체 일부(예: 귀)에 착용되었다는 신호를 수신한 이후, 상기 전자 장치(301)에서 졸음 상태 검출을 위한 사용자의 선택을 수신하면, 상기 졸음 상태 검출을 위한 뇌파 측정 시작을 알리는 신호를 상기 외부 전자 장치(201)로 전송한 이후 상기 외부 전자 장치(201)로부터 수신될 뇌파 신호를 대기할 수 있다. 예를 들어 상기 전자 장치(301)는, 상기 전자 장치(301)에서 졸음 상태 검출을 위한 메뉴 또는 아이콘에 대한 사용자의 선택을 상기 졸음 상태 검출을 위한 사용자의 선택으로 확인할 수 있다.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.
하기 도 3에서 상기 전자 장치(301)의 구성이 상세히 설명할 수 있다.The configuration of the electronic device (301) can be described in detail in the following drawing 3.
일 실시 예에서는 상기 전자 장치(301)에서 상기 외부 전자 장치(201)로부터 수신한 뇌파 신호를 이용하여 상기 외부 전자 장치(201)가 착용된 사용자의 상태가 졸음 상태인지 여부를 결정하는 동작으로 설명하고 있으나, 상기 외부 전자 장치(201)에서도 상기 전자 장치(301)와 동일하게 상기 외부 전자 장치(201)에서 측정한 뇌파 신호를 이용하여 상기 외부 전자 장치(201)가 착용된 사용자의 상태가 졸음 상태인지 여부를 결정하는 동작을 수행할 수 있다.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).
도 3은 일 실시 예에 따른 전자 장치의 블록도이고, 도 4는 일 실시 예에 따른 전자 장치에서 피크 개수의 검출 동작을 설명하기 위한 도면이다.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.
상기 도 3을 참조하면, 전자 장치는(301)는, 프로세서(320), 메모리(330), 디스플레이(360) 및 통신 회로(390)를 포함할 수 있다.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).
일 실시 예에 따른, 프로세서(320)는, 전자 장치(301)의 전반적인 제어 동작을 수행할 수 있다. 일 실시 예에 따른 프로세서(320)는 소프트웨어(예: 도 1의 프로그램(140))를 실행하여 프로세서(320)에 연결된 전자 장치(301)의 적어도 하나의 다른 구성요소(예: 하드웨어 또는 소프트웨어 구성요소)를 제어할 수 있고, 명령어에 기반하여 데이터 처리 또는 연산을 수행할 수 있다. 일 실시 예에 따른 명령어(instruction)는 전자 장치(301) 또는 프로세서(320)에 의해 처리 가능한 기계어(machine language)로 구성된 명령을 포함할 수 있다. 예를 들면, 명령어는 프로그램에서 이용되는 동작 지시에 대응된 명령을 포함할 수 있다. 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. An instruction according to one embodiment may include an instruction configured in a machine language that can be processed by the electronic device (301) or the processor (320). For example, the instruction may include an instruction corresponding to an operation instruction used in a program.
일 실시 예에 따른, 프로세서(320)는, 사용자의 신체 일부(예: 귀)에 착용된 외부 전자 장치(예: 도 2의 이어버즈(201a))로부터 수신되는 뇌파 신호를 기반으로 계산된 제1 뇌파 값과 노이즈가 포함된 뇌파 신호에서 검출된 피크 개수를 이용하여, 상기 사용자의 상태가 졸음 상태인지 여부를 결정할 수 있다.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.
일 실시 예에 따른 상기 프로세서(320)는, 상기 제1 뇌파 값의 계산 동작과 상기 피크 개수의 검출 동작은 상기 외부 전자 장치로부터 뇌파 신호가 수신될 때 별도로 동시에 실행할 수 있다.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.
일 실시 예에 따른 상기 프로세서(320)는, 졸음 상태 검출 동작이 시작되면, 상기 졸음 상태 검출 동작이 시작되는 시점부터 제1 지정된 시간(예: 90초)까지를 상기 사용자가 깨어 있는 상태로 판단하고, 상기 제1 지정된 시간(예: 90초)동안 통신 회로(390)를 통해 상기 외부 전자 장치(201)로부터 수신되는 뇌파 신호를 이용하여 기준 값을 계산할 수 있다. 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).
일 실시 예에 따른 상기 프로세서(320)는, 상기 외부 전자 장치로부터 상기 외부 전자 장치가 상기 사용자의 신체 일부(예: 귀)에 착용되었다는 신호를 수신하면, 상기 졸음 상태 검출 동작을 시작할 수 있다. 일 실시 예에 따른 상기 프로세서(320)는, 상기 외부 전자 장치로부터 상기 외부 전자 장치로부터 상기 외부 전자 장치가 상기 사용자의 신체 일부(예: 귀)에 착용되었다는 신호를 수신한 이후, 상기 전자 장치(301)에서 졸음 상태 검출을 위한 사용자의 선택을 수신하면, 상기 졸음 상태 검출을 위한 뇌파 측정 시작을 알리는 신호를 상기 외부 전자 장치(201)로 전송한 이후 상기 졸음 상태 검출 동작을 시작할 수 있다.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).
일 실시 예에 따른 상기 프로세서(320)는, 상기 졸음 상태 검출 동작이 시작되는 시점부터 제1 지정된 시간(예: 90초)까지 상기 외부 전자 장치로부터 수신된 뇌파 신호의 시간 영역을 고속 푸리에 변환을 사용하여 주파수 영역으로 변환하고, 상기 주파수 영역으로 변환된 뇌파 신호에 적분을 적용하여 상기 뇌파 신호의 복수의 주파수 대역들 중 졸음 상태를 예측할 수 있는 적어도 하나의 주파수 대역의 전력 값을 계산할 수 있다. 일 실시 예에 따른 상기 프로세서(320)는, 상기 적어도 하나의 주파수 대역에 적분을 적용하여 전력 값을 계산하고, 상기 계산된 전력 값을 더한 값을 제2 뇌파 값으로 계산하고, 상기 제1 지정된 시간(예: 90초)동안 1초 마다 계산된 제2 뇌파 값들의 평균 값을 계산하고, 상기 평균 값을 두 배한 값을 상기 기준 값으로 계산할 수 있다. 예를 들어, 상기 프로세서(320)는, 상기 뇌파 신호의 복수의 주파수 대역들 중 사용자가 잠들 었을 때 발생하는 세타 주파수 대역(4-7 Hz)과 사용자가 눈을 감을 때 발생하는 알파 주파수 대역(8-12 Hz)을 졸음 상태를 예측할 수 있는 주파수 대역을 확인하고, 상기 두 주파수 대역들에 적분을 적용하여 상기 두 주파수 대역들 각각의 전력 값을 계산하고, 상기 두 주파수 대역들 각각의 전력 값을 더한 상기 제2 뇌파 값을 계산할 수 있다. 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.
일 실시 예에 따른 상기 프로세서(320)는, 상기 기준 값을 계산하기 위한 제1 지정된 시간(예: 90초)이 경과하면, 상기 지정된 제1 시간보다 짧은 제2 지정된 시간(예: 1초) 마다 상기 기준 값과 비교하기 위한 상기 제1 뇌파 값을 계산할 수 있다.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.
일 실시 예에 따른 상기 프로세서(320)는, 상기 기준 값을 계산하기 위한 제1 지정된 시간(예: 90초)이후부터 상기 외부 전자 장치로부터 수신된 뇌파 신호의 시간 영역을 고속 푸리에 변환을 사용하여 주파수 영역으로 변환하고, 상기 주파수 영역으로 변환된 뇌파 신호에 적분을 적용하여 상기 뇌파 신호의 복수의 주파수 대역들 중 졸음 상태를 예측할 수 있는 적어도 하나의 주파수 대역의 전력 값을 계산하고,상기 계산된 전력 값을 더한 값을 제1 뇌파 값으로 계산할 수 있다.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.
일 실시 예에 따른 상기 프로세서(320)는, 상기 제2 지정된 시간(예: 1초) 마다 계산되는 제1 뇌파 값을 제1 길이(예: 20초 길이)를 가지는 제1 큐(queue)에 저장하고, 상기 제1 큐에 제1 뇌파 값이 저장되어 업데이트될 때 마다 상기 제1 큐에 저장된 복수의 제1 뇌파 값들의 평균 값을 계산하고, 상기 제1 큐에 저장된 복수의 제1 뇌파 값들의 평균 값과 상기 기준 값을 비교할 수 있다. 일 실시 예에 따른 상기 프로세서(320)는, 상기 제1 큐에 저장된 복수의 제1 뇌파 값들의 평균 값이 상기 기준 값 이상이면, 제2 길이(예: 20초 길이)를 가지는 제2 큐(queue)에 제1 값(예:true)를 저장하고, 상기 제1 큐에 저장된 복수의 제1 뇌파 값들의 평균 값이 상기 기준 값 이하면, 상기 제2 큐(queue)에 제2 값(예:false)를 저장할 수 있다. 일 실시 예에 따른 상기 프로세서(320)는, 상기 제2 큐에 상기 제1 값(예:true) 또는 상기 제2 값(예:false)이 저장되어 업데이트될 때 마다 상기 제2 큐에 저장된 제1 값(예:true)과 제2 기준 개수(예: 제2 큐의 길이의 절반 이상)를 비교할 수 있다. 일 실시 예에 따른 상기 프로세서(320)는, 상기 제2 큐에 저장된 제1 값(예:true)이 상기 제2 기준 개수(예: 제2 큐의 길이의 절반 이상)이상으로 확인하면, 상기 외부 전자 장치가 착용된 사용자의 상태를 졸음 상태로 예측할 수 있다. 일 실시 예에 따른 상기 프로세서(320)는, 상기 제2 큐에 저장된 제1 값(예:true)이 상기 제2 기준 개수(예: 제2 큐의 길이의 절반 이상)이하로 확인하면, 상기 외부 전자 장치가 착용된 사용자의 상태를 깨어 있는 상태로 예측(결정)할 수 있다.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.
일 실시 예에 따른 상기 프로세서(320)는, 상기 제1 뇌파 값의 계산 동작을 실행하는 동안, 별도로 뇌파 신호에서 검출한 피크의 개수가 제1 기준 개수 이상이면 사용자의 상태를 졸음 상태로 결정할수 있는 뇌파 신호에서 피크 개수를 검출하는 동작을 실행할 수 있다. 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.
상기 외부 전자 장치가 착용된 사용자가 졸음 상태일 때 발생하는 운동적인 현상(예: 머리를 계속 떨구는 등의 현상 또는 눈 깜박임등)으로 상기 뇌파 신호에는 노이즈가 포함되어 정확한 뇌파 신호의 측정이 어려울 수 있다. 그러나, 본 개시에서는 노이즈가 포함된 뇌파 신호가 노이즈가 포함되지 않은 뇌파 신호보가 큰 피크를 가진다는 점을 이용하여 상기 사용자의 졸음 상태를 결정할 수 있는 추가 방법으로 사용할 수 있다.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.
일 실시 예에 따른 상기 프로세서(320)는, 상기 졸음 상태 검출 동작이 시작되면 상기 외부 전자 장치로부터 수신된 뇌파 신호에 대해 저대역 주파수(0.1 - 20 Hz)를 위한 대역 통과 필터를 적용하고, 상기 필터에 적용된 상기 뇌파 신호에서 현재 시간의 전압 값과 이전 시간의 전압 값을 뺀 상기 뇌파 신호의 차분 신호를 계산할 수 있다. 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.
일 실시 예에 따른 상기 프로세서(320)는, 상기 차분 신호에서 지정된 복수의 시점들(예: 4개의 시점들)에서 지정된 진폭을 가지는 피크의 개수를 검출할 수 있다,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.
일 실시 예에 따른 상기 지정된 복수의 시점들은, 상기 차분 신호의 전압 값이 제1 전압 값(예:10) 미만에서 증가하여 상기 제1 전압 값이 되는 제1 시점, 상기 차분 신호의 전압 값이 상기 제1 전압 값(예: 10) 초과에서 감소하여 상기 제1 전압 값이 되는 제2 시점, 상기 차분 신호의 전압 값이 제2 전압 값(예: -10) 초과에서 감소하여 상기 제2 전압 값이 되는 제3 시점, 및 상기 차분 신호의 전압 값이 상기 제2 전압 값(예: -10)미만에서 증가하여 상기 제2 전압 값이 되는 제4 시점을 포함할 수 있다.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.
일 실시 예에 따른 상기 프로세서(320)는, 상기 차분 신호에서 상기 제1 시점과 상기 제2 시점을 순차적으로 확인하는 시점이 기준 시간(예: 1초) 미만이고, 상기 제1 시점과 상기 제2 시점에 관련된 피크의 진폭이 지정된 제1 진폭(예: 60)이상일 때, 검출되는 피크를 양의 피크(positive peak)로 검출할 수 있다.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).
일 실시 예에 따른 상기 프로세서(320)는, 상기 차분 신호에서 상기 제3 시점과 상기 제4 시점을 순차적으로 확인하는 시점이 상기 기준 시간(예: 1초) 미만이고, 상기 제3 시점과 상기 제4 시점에 관련된 피크의 진폭이 지정된 제2 진폭(예: -60)이하일 때, 검출되는 피크를 음의 피크(negative peak)로 검출할 수 있다.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).
일 실시 예에 따른 상기 프로세서(320)는, 양의 피크(positive peak)와 음의 피크(negative peak)가 연속으로 발생하면, 하나의 피크로 검출하여 메모리(330)에 저장할 수 있다.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).
상기 도 4를 참조하여 차분 신호에서 피크 개수의 검출 동작을 살펴보면, "f1"은 노이즈 포함되지 않은 뇌파 신호 보다 큰 피크를 가지는 노이즈가 포함된 뇌파 신호를 나타내고 있고, "f2"는 상기 뇌파 신호에 0.1-20 Hz로 대역 통과 필터를 적용하고,상기 필터에 적용된 상기 뇌파 신호에서 현재 시간의 전압 값과 이전 시간의 전압 값을 뺀 상기 뇌파 신호(f1)의 차분 신호(기울기)를 나타내고 있다.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.
일 실시 예에 따른 상기 프로세서(320)는, 상기 차분 신호(f2)에서 상기 차분 신호의 전압 값이 "10"(Cp) 미만에서 증가하여"10" (Cp) 이 되는 제1 시점(t1), 상기 차분 신호의 전압 값이 "10" (Cp) 초과에서 감소하여"10" (Cp) 이 되는 제2 시점(t2), 상기 차분 신호의 전압 값이 "-10" (Cn) 초과에서 감소하여"-10" (Cn) 이 되는 제3 시점(t3), 및 상기 차분 신호의 전압 값이 "-10"미만(Cn) 에서 증가하여"-10" (Cn) 이 되는 제4 시점(t4)을 검출할 수 있다.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).
일 실시 예에 따른 상기 프로세서(320)는, 상기 제1 시점(t1)과 상기 제2 시점(t2)에 관련된 피크의 진폭이 지정된 진폭인"60"(a1)이상일 때, 상기 피크를 양의 피크(positive peak)로 검출하고, 상기 제3 시점(t3)과 상기 제4 시점(t4)에 관련된 피크의 진폭이"-60"(a2))이하일 때, 상기 피크를 음의 피크(negative peak)로 검출하고, 양의 피크(positive peak)와 음의 피크(negative peak)를 순차적으로 확인할 때, 상기 순차적으로 확인한 양의 피크(positive peak)와 음의 피크(negative peak)를 하나의 피크로 검출하여 메모리(330)에 저장할 수 있다.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).
일 실시 예에 따른 상기 프로세서(320)는, 상기 저장된 피크의 개수가 기준 개수(예: 15개) 이상이면, 상기 사용자의 상태를 졸음 상태로 결정할 수 있다.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).
일 실시 예에 따른 상기 프로세서(320)는, 인공 지능 모델을 이용하여 상기 저장된 피크의 개수가 제1 기준 개수(예: 15개) 이상이면, 상기 사용자의 상태를 졸음 상태로 결정할 수 있다.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.
일 실시 예에 따른 상기 프로세서(320)는, 인공 지능 모델을 이용하여 상기 피크 개수를 검출하여 저장하고, 상기 저장된 피크 개수가 상기 제1 기준 개수(예: 15개)이상이면 상기 사용자의 상태를 졸음 상태로 결정할 수 있다.According to one embodiment, the processor (320) may detect and store the number of peaks using an artificial intelligence model, and if the stored number of peaks is greater than or equal to the first reference number (e.g., 15), the user's state may be determined to be drowsy.
일 실시 예에 따른 상기 인공 지능 모델은, SNN(spiking neural network)의 기본 모델인 LIF(leaky integrate and fire)모델을 포함할 수 있다.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).
일 실시 예에 따른 상기 인공 지능 모델은, 졸음 상태를 결정하기 위한 피크를 검출하여 저장하는 동안, 상기 저장된 피크의 개수가 기준 개수 이하일 때 지정된 시간 내에 피크를 검출하지 못하면, 상기 피크의 개수를 "0"으로 초기화할 수 있다.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.
일 실시 예에 따른 상기 인공 지능 모델은, 졸음 상태를 결정하기 위한 피크를 검출하여 저장하는 동안, 상기 저장된 피크의 개수가 상기 제1 기준 개수 이상일 때 상기 사용자의 상태를 졸음 상태로 결정하고, 상기 저장된 피크의 개수가 상기 제1 기준 개수 이상일 때 졸음 상태를 결정하기 위한 피크가 추가로 검출되는 경우 피크의 개수를 누적하여 저장할 수 있다.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.
일 실시 예에 따른 상기 인공 지능 모델은, 제1 변수(v_before)와 제2 변수(v_now)로 구성되어 있으며, 상기 인공 기능 모델의 실행을 위한 알고리즘이 시작되면 상기 두 개의 변수들의 값을 " 0"으로 초기화할 수 있다.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”.
일 실시 예에 따른 상기 인공 지능 모델은, 상기 뇌파 신호에서 졸음 상태를 결정하기 위한 피크를 검출하여 저장하는 동안, 상기 피크의 개수(n)가 "1개"이상이면, 제1 변수(v_before)의 값에 피크의 개수( n)만큼 더한 값을 제1 변수(v_now)의 값(v_before의 값 + n)으로 저장할 수 있다. 일 실시 예에 따른 상기 인공 지능 모델은, 제2 변수(v_now)의 값(v_before의 값 + n)이 상기 제1 기준 개수(예: 15개)이상이면 사용자의 상태를 졸음 상태로 결정하고, 제2 변수(v_now)의 값(v_before의 값 + n)이 상기 제1 기준 개수(예: 15개)이하이면 상기 사용자의 상태를 깨어 있는 상태로 결정할 수 있다.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.
일 실시 예에 따른 상기 인공 지능 모델은, 상기 뇌파 신호에서 졸음 상태를 결정하기 위한 피크를 검출하여 저장하는 동안, 상기 피크의 개수(n)가 "0"개 이면, 제1 변수(v_before)의 값에 제1 기준 개수(예: 15)를 뺀 값(v_before의 값 - 제1 기준 개수)이 " 0"보다 작을 경우, "0"을 제2 변수(v_now)의 값으로 저장하고, 제1 변수(v_before)의 값에 제1 기준 개수(예: 15)를 뺀 값(v_before의 값 - 제1 기준 개수)이 " 0"보다 클 경우 상기 값을 제2 변수(v_now)의 값(v_before의 값 - 제1 기준 개수)으로 저장할 수 있다. 일 실시 예에 따른 상기 인공 지능 모델은, 제2 변수(v_now)의 값(v_before의 값 - 제1 기준 개수)이 상기 제1 기준 개수(예: 15개)이상이면 사용자의 상태를 졸음 상태로 결정하고, 제2 변수(v_now)의 값(v_before의 값 - 제1 기준 개수)이 상기 제1 기준 개수(예: 15개)이하이면 상기 사용자의 상태를 깨어 있는 상태로 결정할 수 있다.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).
일 실시 예에 따른 상기 인공 지능 모델은 사용자의 상태를 졸음 상태로 결정하면, 제2 변수(v_before)의 최종 값을 제1 변수(v_now)의 값으로 저장할 수 있다.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).
일 실시 예에 따른 상기 인공 지능 모델은, 상기 뇌파 신호가 입력될 때 마다 상기 과정들을 반복할 수 있으며, 졸음 상태를 검출하기 위한 피크의 개수가 많거나 짧은 시간 내에 피크의 발생빈도가 높을 경우 제1 변수(v_now)의 값은 커지고, 그렇지 않은 경우 제1 변수(v_now)의 값은 점점 작아질 수 있다.According to an 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.
일 실시 예에 따른, 프로세서(320)는, 상기 외부 전자 장치가 신체의 일부(예: 귀)에 착용된 사용자의 상태를 상기 졸음 상태로 판단하면, 상기 외부 전자 장치를 통해 졸음 상태를 알릴 수 있다. 예를 들어, 상기 프로세서(320)는, 진동 및/또는 사운드를 이용하여 상기 외부 전자 장치를 통해 졸음 상태의 알림을 출력할 수 있다.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.
일 실시 예에 따른, 프로세서(320)는, 상기 외부 전자 장치가 신체의 일부(예: 귀)에 착용된 사용자의 상태를 상기 졸음 상태로 판단하면, 상기 전자 장치(301)를 통해 졸음 상태를 알릴 수 있다. 예를 들어, 상기 프로세서(320)는, 진동 및/또는 사운드를 이용하여 상기 전자 장치(301)를 통해 졸음 상태의 알림을 출력할 수 있다.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.
일 실시 예에 따른, 프로세서(320)는, 사용자의 신체 일부(예: 귀)에 착용된 외부 전자 장치(예: 도 2의 이어버즈(201a))로부터 수신되는 뇌파 신호를 기반으로 계산된 제1 뇌파 값과 상기 기준값을 이용하여 상기 사용자의 상태를 졸음 상태로 결정할 수 있다. 일 실시 예에 따른, 상기 프로세서(320)는, 상기 제1 뇌파 값과 상기 기준 값을 이용하여 상기 사용자의 상태를 깨어있는 상태로 결정하면, 노이즈가 포함된 뇌파 신호에서 검출된 피크 개수를 이용하여 상기 사용자의 상태가 졸음 상태인지 여부를 결정할 수 있다.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.
일 실시 예에 따른, 프로세서(320)는, 사용자의 신체 일부(예: 귀)에 착용된 외부 전자 장치(예: 도 2의 이어버즈(201a))로부터 수신되는 노이즈가 포함된 뇌파 신호에서 검출된 피크 개수를 이용하여 상기 사용자의 상태를 졸음 상태로 결정할 수 있다. 일 실시 예에 따른, 상기 프로세서(320)는, 상기 노이즈가 포함된 뇌파 신호에서 검출된 피크 개수를 이용하여 상기 사용자의 상태를 깨어있는 상태로 결정하면, 상기 뇌파 신호를 기반으로 계산된 상기 제1 뇌파 값과 상기 기준 값을 이용하여 상기 사용자의 상태가 졸음 상태인지 여부를 결정할 수 있다.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.
일 실시 예에 따른 메모리(330)는, 도 1의 메모리(130)와 실질적으로 동일하거나 유사하게 구현될 수 있다.The memory (330) according to one embodiment may be implemented substantially identically or similarly to the memory (130) of FIG. 1.
일 실시 예에 따른 상기 메모리(330)에, 전자 장치(301)와 통신이 연결된 외부 전자 장치(예: 도 2의 이어버드(201a))로부터 수신되는 뇌파 신호를 이용하여 계산된 기준 값과 제1 뇌파 값이 저장될 수 있다.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.
일 실시 예에 따른 상기 메모리(330)에, 전자 장치(301)와 통신이 연결된 외부 전자 장치(예: 도 2의 이어버드(201a))로부터 수신되는 노이즈가 포함된 뇌파 신호를 이용하여 검출된 피크의 개수가 저장될 수 있다.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).
일 실시 예에 따른 디스플레이(360)는, 도 1의 디스플레이 모듈(160)과 실질적으로 동일하거나 유사하게 구현될 수 있다. A display (360) according to one embodiment may be implemented substantially identically or similarly to the display module (160) of FIG. 1.
일 실시 예에 따른 통신 회로(390)는, 도 1의 통신 회로(190)과 실질적으로 동일하거나 유사하게 구현될 수 있다.A communication circuit (390) according to one embodiment may be implemented substantially identically or similarly to the communication circuit (190) of FIG. 1.
일 실시 예에 따른 상기 통신 회로(390)에는, 무선랜 회로(미도시)와 근거리통신 회로(미도시) 중 적어도 하나를 포함할 수 있다.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).
일 실시 예에 따른 상기 통신 회로(390)는, NFC 통신 회로, BLE통신 회로 및/또는 복수의 안테나들을 이용하여 외부 장치와 UWB 신호를 송수신할 수 있는 UWB 통신 회로, Wi-Fi 통신 회로 및/또는 블루투스 레거시(Legacy) 통신 회로를 포함할 수 있다. 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.
일 실시 예에 따른 전자 장치(예: 도 1의 전자 장치(101), 및/또는 도 2 내지 도 3의 전자 장치(301))는, 통신 회로(예: 도 1의 통신 회로(190) 및/또는 도 3의 통신 회로(390)), 프로세서(예: 도 1의 프로세서(120) 및/또는 도 3의 프로세서(320)); 및 명령어들을 저장하는 메모리(예: 도 1의 메모리(130) 및/또는 도 3의 메모리(330))를 포함할 수 있다.일 실시 예에 따른 상기 명령어들은, 상기 프로세서에 의해 실행 될 때, 상기 전자 장치로 하여금, 사용자의 신체일부에 착용된 외부 전자 장치로부터 뇌파 신호를 수신하면, 상기 뇌파 신호의 복수의 주파수 대역들 중 적어도 하나의 주파수 대역의 전력 값을 획득할 수 있다. 일 실시 예에 따른 상기 명령어들은, 상기 프로세서에 의해 실행 될 때, 상기 전자 장치로 하여금, 상기 전력 값이 기준 값 이상이고, 상기 뇌파 신호의 복수의 시점들에서 피크의 개수가 제1 기준 개수 이상이면, 시점 사용자의 상태를 졸음 상태로 확인할 수 있다.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.
일 실시 예에 따른 상기 명령어들은, 상기 프로세서에 의해 실행 될 때, 상기 전자 장치로 하여금, 상기 전력 값이 상기 기준값 이상이면 상기 사용자의 상태를 졸음 상태로 예측할 수 있다. 일 실시 예에 따른 상기 명령어들은, 상기 프로세서에 의해 실행 될 때, 상기 전자 장치로 하여금, 상기 사용자의 상태를 졸음 상태로 예측하면, 상기 뇌파 신호의 상기 복수의 시점들에서 피크의 개수를 검출하여 저장할 수 있다. 일 실시 예에 따른 상기 명령어들은, 상기 프로세서에 의해 실행 될 때, 상기 전자 장치로 하여금, 상기 피크의 개수가 상기 제1 기준 개수 이상이면, 상기 사용자의 상태를 졸음 상태로 확인할 수 있다.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.
일 실시 예에 따른 상기 명령어들은, 상기 프로세서에 의해 실행 될 때, 상기 전자 장치로 하여금, 졸음 상태 검출 동작이 시작되면, 상기 졸음 상태 검출 동작의 시작 시점부터 제1 지정된 시간 동안 상기 외부 전자 장치로부터 수신되는 뇌파 신호의 상기 복수의 주파수 대역들 중 상기 적어도 하나의 주파수 대역의 전력 값들을 계산할 수 있다. 일 실시 예에 따른 상기 명령어들은, 상기 프로세서에 의해 실행 될 때, 상기 전자 장치로 하여금, 상기 제1 지정된 시간 동안 계산된 상기 전력 값들의 평균 값을 계산하고, 상기 평균 값을 두 배하여 상기 기준 값을 계산할 수 있다.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.
일 실시 예에 따른 상기 명령어들은, 상기 프로세서에 의해 실행 될 때, 상기 전자 장치로 하여금, 상기 기준 값을 계산하기 위한 제1 지정된 시간이 경과하면, 상기 지정된 제1 시간 보다 짧은 제2 지정된 시간 마다 상기 뇌파 신호의 복수의 주파수 대역들 중 적어도 하나의 대역의 상기 전력 값을 계산할 수 있다. 일 실시 예에 따른 상기 명령어들은, 상기 프로세서에 의해 실행 될 때, 상기 전자 장치로 하여금, 상기 계산된 전력 값을 제1 길이를 가지는 제1 큐에 저장하여 업데이트할 수 있다.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.
일 실시 예에 따른 상기 명령어들은, 상기 프로세서에 의해 실행 될 때, 상기 전자 장치로 하여금, 상기 제1 큐가 업데이트되면 상기 제1 큐에 저장된 전력 값들의 평균 값을 계산할 수 있다. 일 실시 예에 따른 상기 명령어들은, 상기 프로세서에 의해 실행 될 때, 상기 전자 장치로 하여금, 상기 평균 값이 상기 기준 값 이상이면 제2 일정길이를 가지는 제2 큐에 제1 값을 저장하여 업데이트할 수 있다. 일 실시 예에 따른 상기 명령어들은, 상기 프로세서에 의해 실행 될 때, 상기 전자 장치로 하여금, 상기 평균 값이 상기 기준 값 미만이면 상기 제2 큐에 제2 값을 저장하여 업데이트할 수 있다. 일 실시 예에 따른 상기 명령어들은, 상기 프로세서에 의해 실행 될 때, 상기 전자 장치로 하여금, 상기 제2 큐가 업데이트 되면, 상기 제2 큐에 저장된 제1 값의 개수가 제2 기준 개수 이상인지 확인할 수 있다. 일 실시 예에 따른 상기 명령어들은, 상기 프로세서에 의해 실행 될 때, 상기 전자 장치로 하여금, 상기 제2 큐에 저장된 제1 값의 개수가 상기 제2 기준 개수 이상으로 확인하면, 상기 사용자의 상태를 졸음 상태로 예측할 수 있다.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.
일 실시 예에 따른 상기 명령어들은, 상기 프로세서에 의해 실행 될 때, 상기 전자 장치로 하여금, 상기 뇌파 신호를 저대역 주파수를 위한 대역 통과 필터에 적용할 수 있다. 일 실시 예에 따른 상기 명령어들은, 상기 프로세서에 의해 실행 될 때, 상기 전자 장치로 하여금, 상기 필터에 적용된 상기 뇌파 신호의 전압 값들 중 현재 시간의 전압 값에서 이전 시간의 전압 값을 뺀 상기 뇌파 신호의 차분 신호를 계산할 수 있다. 일 실시 예에 따른 상기 명령어들은, 상기 프로세서에 의해 실행 될 때, 상기 전자 장치로 하여금, 상기 차분 신호에서 상기 복수의 시점들에서 피크의 개수를 검출할 수 있다.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.
일 실시 예에 따른 상기 복수의 시점들은, 상기 차분 신호의 전압 값이 제1 전압 값 미만에서 증가하여 상기 제1 전압 값이 되는 제1 시점, 상기 차분 신호의 전압 값이 상기 제1 전압 값 초과에서 감소하여 상기 제1 전압 값이 되는 제2 시점, 상기 차분 신호의 전압 값이 제2 전압 값 초과에서 감소하여 상기 제2 전압 값이 되는 제3 시점, 및 상기 차분 신호의 전압 값이 상기 제2 전압 값 미만에서 증가하여 상기 제2 전압 값이 되는 제4 시점을 포함할 수 있다.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.
일 실시 예에 따른 상기 명령어들은, 상기 프로세서에 의해 실행 될 때, 상기 전자 장치로 하여금, 상기 차분 신호에서 상기 복수의 시점들 중 상기 제1 시점과 상기 제2 시점을 순차적으로 확인하고, 상기 제1 시점과 상기 제2 시점에 관련된 피크의 진폭이 제1 진폭 값 이상이면, 상기 피크를 양의 피크로 확인할 수 있다.일 실시 예에 따른 상기 명령어들은, 상기 프로세서에 의해 실행 될 때, 상기 전자 장치로 하여금, 상기 차분 신호에서 상기 복수의 시점들 중 상기 제3 시점과 상기 제4 시점을 순차적으로 확인하고, 상기 제3 시점과 상기 제4 시점에 관련된 피크의 진폭이 제2 진폭 값 미만이면, 상기 피크를 음의 피크로 확인할 수 있다. 일 실시 예에 따른 상기 명령어들은, 상기 프로세서에 의해 실행 될 때, 상기 전자 장치로 하여금, 상기 양의 피크와 상기 음의 피크가 순차적으로 확인하면, 하나의 피크로 검출할 수 있다.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.
일 실시 예에 따른 상기 명령어들은, 상기 프로세서에 의해 실행 될 때, 상기 전자 장치로 하여금, 상기 명령어들은, 상기 프로세서에 의해 실행 될 때, 상기 전자 장치로 하여금, 인공 지능 모델을 이용하여 상기 피크 개수를 검출하여 저장하고, 상기 저장된 피크 개수와 상기 제1 기준 개수를 비교하여 상기 사용자의 상태를 졸음 상태로 결정할 수 있다. 일 실시 예에 따른 상기 인공 기능 모델은, SNN(spiking neural network)의 기본 모델인 LIF(leaky integrate and fire)모델을 포함할 수 있다.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).
일 실시 예에 따른 상기 명령어들은, 상기 프로세서에 의해 실행 될 때, 상기 전자 장치로 하여금, 상기 사용자의 상태를 상기 졸음 상태로 확인하면, 상기 사용자의 신체 일부에 착용된 상기 외부 전자 장치를 통해 졸음 상태를 알릴 수 있다.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.
일 실시 예에 따른 상기 명령어들은, 상기 프로세서에 의해 실행 될 때, 상기 전자 장치로 하여금, 상기 외부 전자 장치가 상기 사용자의 신체 일부에 착용될 때 또는 상기 외부 전자 장치가 상기 사용자의 신체 일부에 착용되어 있는 동안 졸음 상태 검출을 위한 사용자의 선택을 확인할 때, 졸음 상태 검출 동작을 시작할 수 있다.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.
도 5a 내지 도 5b는 일 실시 예에 따른 전자 장치에서 졸음 상태를 검출하는 동작을 설명하기 위한 흐름도이다. 상기 졸음 상태를 검출하는 동작들은 501동작 내지 543동작을 포함할 수 있다. 이하 실시 예에서 각 동작들은 순차적으로 수행될 수도 있으나, 반드시 순차적으로 수행되는 것은 아니다. 예를 들어, 각 동작들의 순서가 변경될 수도 있으며, 적어도 두 동작들이 병렬적으로 수행되거나, 다른 동작이 추가될 수도 있다.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.
상기 도 5a 내지 상기 도 5b를 참조하면, 501동작에서, 전자 장치(예: 도 1의 전자 장치(101) 및/또는 도 2 내지 도 3의 전자 장치(301))는, 졸음 상태 검출 동작을 시작할 수 있다.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.
일 실시 예에 따른 상기 전자 장치는, 상기 전자 장치의 통신 회로(예: 도 3의 통신 회로(390))을 통해 통신이 연결된 외부 전자 장치(예: 도 2의 이어 버드(201a))로부터 상기 외부 전자 장치가 상기 사용자의 신체 일부(예: 귀)에 착용되었다는 신호를 수신하면, 상기 졸음 상태 검출 동작을 시작할 수 있다. 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.
일 실시 예에 따른 상기 전자 장치는, 상기 외부 전자 장치로부터 상기 외부 전자 장치가 상기 사용자의 신체 일부(예: 귀)에 착용되었다는 신호를 수신한 이후, 상기 전자 장치에서 졸음 상태 검출을 위한 사용자의 선택을 수신하면, 상기 졸음 상태 검출을 위한 뇌파 측정 시작을 알리는 신호를 상기 외부 전자 장치로 전송한 이후 상기 졸음 상태 검출 동작을 시작할 수 있다.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.
511동작에서, 전자 장치(예: 도 1의 전자 장치(101) 및/또는 도 2 내지 도 3의 전자 장치(301))는, 외부 전자 장치로부터 수신되는 뇌파 신호를 이용하여 제1 뇌파 값을 계산할 수 있다.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.
일 실시 예에 따른 상기 전자 장치는, 제2 지정된 시간(예: 1초) 마다 상기 제1 뇌파 값을 계산할 수 있다.In one embodiment, the electronic device may calculate the first brain wave value every second specified time (e.g., 1 second).
531동작에서, 전자 장치(예: 도 1의 전자 장치(101) 및/또는 도 2 내지 도 3의 전자 장치(301))는, 외부 전자 장치로부터 수신되는 노이즈가 포함된 뇌파 신호에서 졸음 상태를 검출하기 위한 피크를 검출하여 저장할 수 있다.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.
일 실시 예에 따른 상기 전자 장치는, 상기 511동작에서 상기 제1 뇌파 값을 계산하는 동안 상기 531동작에서 별도로 졸음 상태를 검출하기 위한 피크를 검출하여 저장할 수 있다.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.
513동작에서, 전자 장치(예: 도 1의 전자 장치(101) 및/또는 도 2 내지 도 3의 전자 장치(301))는, 제1 뇌파 값과 기준 값을 비교할 수 있다.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.
일 실시 예에 따른 상기 전자 장치는, 상기 511동작에서 상기 제2 지정된 시간(예: 1초)마다 제1 뇌파 값을 계산하면, 상기 제1 뇌파 값과 상기 기준 값을 비교할 수 있다.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.
상기 513동작에서, 상기 전자 장치는, 상기 제1 뇌파 값이 상기 기준 값 이하이면, 515동작에서 상기 외부 전자 장치가 착용된 사용자의 상태를 깨어 있는 상태로 결정(예측)할 수 있다.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.
상기 513동작에서, 상기 전자 장치는, 상기 제1 뇌파 값이 상기 기준 값 이상이면, 517동작에서 상기 외부 전자 장치가 착용된 사용자의 상태를 졸음 상태로 예측할 수 있다.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.
상기 511동작 내지 상기 517동작을 포함하는 510동작은 하기 도 6에서 상세히 설명할 수 있다.The operation 510 including the above operations 511 to 517 can be described in detail in FIG. 6 below.
533동작에서, 전자 장치(예: 도 1의 전자 장치(101) 및/또는 도 2 내지 도 3의 전자 장치(301))는, 피크 개수와 제1 기준 개수를 비교할 수 있다.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.
일 실시 예에 따른 상기 전자 장치는, 상기 517동작에서 상기 제1 뇌파 값을 이용하여 상기 외부 전자 장치가 착용된 사용자의 상태를 졸음 상태로 예측하면, 상기 533동작을 통해 저장된 피크의 개수와 상기 제1 기준 개수를 비교할 수 있다.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.
상기 533동작에서, 상기 전자 장치는, 상기 피크 개수가 상기 제1 기준 개수 이하이면, 535동작에서 상기 외부 전자 장치가 착용된 사용자의 상태를 깨어 있는 상태로 결정할 수 있다.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.
상기 533동작에서, 상기 전자 장치는, 상기 피크 개수가 상기 제1 기준 개수 이상이면, 537동작에서 상기 외부 전자 장치가 착용된 사용자의 상태를 졸음 상태로 결정할 수 있다.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.
상기 531동작 내지 상기 537동작을 포함하는 530동작은 하기 도 7a 내지 도 7b 및 도 8a 내지 도 8b에서 상세히 설명할 수 있다.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.
541동작에서, 전자 장치(예: 도 1의 전자 장치(101) 및/또는 도 2 내지 도 3의 전자 장치(301))는, 사용자의 상태가 졸음 상태임을 알릴 수 있다.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.
일 실시 예에 따른 상기 전자 장치는, 상기 제1 뇌파 값을 이용하여 외부 전자 장치가 착용된 사용자의 상태를 졸음 상태로 예측한 이후 상기 피크의 개수를 이용하여 상기 사용자의 상태를 졸음 상태로 결정하면, 상기 외부 전자 장치 또는 상기 전자 장치를 통해 졸음 상태를 알릴 수 있다. 예를 들어, 상기 전자 장치는, 진동 및/또는 사운드를 이용하여 상기 외부 전자 장치 또는 상기 전자 장치를 통해 졸음 상태의 알림을 출력할 수 있다.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.
543동작에서, 전자 장치(예: 도 1의 전자 장치(101) 및/또는 도 2 내지 도 3의 전자 장치(301))는, 졸음 상태 검출 동작의 종료 여부를 확인할 수 있다.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.
상기 543동작에서, 상기 전자 장치는, 상기 졸음 상태 검출 동작이 종료되지 않음을 확인하면, 상기 501동작 내지 541동작을 반복적으로 실행할 수 있다.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.
상기 543동작에서, 상기 전자 장치는, 상기 졸음 상태 검출 동작이 종료되었음을 확인하면, 상기 졸음 상태 검출 동작을 종료할 수 있다.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.
도 6은 일 실시 예에 따른 전자 장치에서 제1 뇌파 값을 이용하여 졸음 상태를 검출하는 동작을 설명하기 위한 흐름도이다. 상기 졸음 상태를 검출하는 동작들은 601동작 내지 617동작을 포함할 수 있다. 이하 실시 예에서 각 동작들은 순차적으로 수행될 수도 있으나, 반드시 순차적으로 수행되는 것은 아니다. 예를 들어, 각 동작들의 순서가 변경될 수도 있으며, 적어도 두 동작들이 병렬적으로 수행되거나, 다른 동작이 추가될 수도 있다.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.
상기 도 6을 참조하면, 601동작에서, 전자 장치(예: 도 1의 전자 장치(101) 및/또는 도 2 내지 도 3의 전자 장치(301))는, 기준 값을 계산할 수 있다.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.
일 실시 예에 따른 상기 전자 장치는, 졸음 상태 검출 동작이 시작되면, 상기 졸음 상태 검출 동작이 시작되는 시점부터 제1 지정된 시간(예: 90초)까지를 상기 사용자가 깨어 있는 상태로 판단하고, 상기 전자 장치의 통신 회로(예: 도 3의 통신 회로(390))를 통해 사용자의 신체 일부(예: 귀)에 착용된 외부 전자 장치(예: 도 2의 이어 버드(201a))로부터 수신되는 뇌파 신호를 이용하여 기준 값을 계산할 수 있다. 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).
일 실시 예에 따른 상기 전자 장치는, 상기 졸음 상태 검출 동작이 시작되는 시점부터 제1 지정된 시간(예: 90초)까지 상기 외부 전자 장치로부터 수신된 뇌파 신호의 시간 영역을 고속 푸리에 변환을 사용하여 주파수 영역으로 변환하고, 상기 주파수 영역으로 변환된 뇌파 신호에 적분을 적용하여 상기 뇌파 신호의 복수의 주파수 대역들 중 졸음 상태를 예측할 수 있는 적어도 하나의 주파수 대역의 전력 값을 계산할 수 있다. 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.
실시 예에 따른 상기 전자 장치는, 상기 적어도 하나의 주파수 대역에 적분을 적용하여 전력 값을 계산하고, 상기 계산된 전력 값을 모두 더한 값을 제2 뇌파 값으로 계산하고, 상기 제1 지정된 시간(예: 90초)동안 1초 마다 계산된 제2 뇌파 값들의 평균 값을 계산하고, 상기 평균 값을 두 배한 값을 상기 기준 값으로 계산할 수 있다.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.
603동작에서, 전자 장치(예: 도 1의 전자 장치(101) 및/또는 도 2 내지 도 3의 전자 장치(301))는, 제1 뇌파 값을 계산할 수 있다.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.
일 실시 예에 따른 상기 전자 장치는, 상기 기준 값을 계산하기 위한 제1 지정된 시간(예: 90초)이 경과하면, 상기 지정된 제1 시간보다 짧은 제2 지정된 시간(예: 1초) 마다 상기 기준 값과 비교하기 위한 상기 제1 뇌파 값을 계산할 수 있다.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.
일 실시 예에 따른 상기 전자 장치는, 상기 기준 값을 계산하기 위한 제1 지정된 시간(예: 90초)이후부터 상기 외부 전자 장치로부터 수신된 뇌파 신호의 시간 영역을 고속 푸리에 변환을 사용하여 주파수 영역으로 변환하고, 상기 주파수 영역으로 변환된 뇌파 신호에 적분을 적용하여 상기 뇌파 신호의 복수의 주파수 대역들 중 졸음 상태를 예측할 수 있는 적어도 하나의 주파수 대역의 전력 값을 계산하고,상기 계산된 전력 값을 더한 값을 제1 뇌파 값으로 계산할 수 있다.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.
605동작에서, 전자 장치(예: 도 1의 전자 장치(101) 및/또는 도 2 내지 도 3의 전자 장치(301))는, 제1 뇌파 값을 제1 큐에 저장할 수 있다.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.
일 실시 예에 따른 상기 전자 장치는, 상기 제2 지정된 시간(예: 1초) 마다 계산되는 제1 뇌파 값을 제1 길이(예: 20초 길이)를 가지는 제1 큐(queue)에 저장하여 업데이트할 수 있다.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).
607동작에서, 전자 장치(예: 도 1의 전자 장치(101) 및/또는 도 2 내지 도 3의 전자 장치(301))는, 제1 큐에 저장된 복수의 제1 뇌파 값들의 평균값과 기준 값을 비교할 수 있다.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.
일 실시 예에 따른 상기 전자 장치는, 상기 제1 큐(queue)에 새로운 제1 뇌파 저장되어 업데이트될 때 마다 상기 제1 큐에 저장된 복수의 제1 뇌파 값들의 평균 값을 계산하고, 상기 제1 큐에 저장된 복수의 제1 뇌파 값들의 평균 값과 상기 기준 값을 비교할 수 있다.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.
상기 607동작에서, 상기 전자 장치는, 상기 제1 큐에 저장된 복수의 제1 뇌파 값들의 평균 값이 상기 기준 값 이상이면, 609동작에서 제2 큐에 제1 값을 저장할 수 있다.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.
일 실시 예에 따른 상기 전자 장치는, 상기 제1 큐에 저장된 복수의 제1 뇌파 값들의 평균 값이 상기 기준 값 이상이면, 제2 길이(예: 20초 길이)를 가지는 제2 큐(queue)에 제1 값(예:true)를 저장할 수 있다.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.
상기 607동작에서, 상기 전자 장치는, 상기 제1 큐에 저장된 복수의 제1 뇌파 값들의 평균 값이 상기 기준 값 이상이면, 611동작에서 제2 큐에 제2 값을 저장할 수 있다.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.
일 실시 예에 따른 상기 전자 장치는, 상기 제1 큐에 저장된 복수의 제1 뇌파 값들의 평균 값이 상기 기준 값 이하이면, 상기 제2 큐(queue)에 제2 값(예: false)를 저장할 수 있다.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.
613동작에서, 전자 장치(예: 도 1의 전자 장치(101) 및/또는 도 2 내지 도 3의 전자 장치(301))는, 상기 제2 큐에 저장된 제1 값(예:true)의 개수와 상기 제2 기준 개수를 비교할 수 있다.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.
일 실시 예에 따른 상기 전자 장치는, 상기 제2 큐에 상기 제1 값(true) 또는 상기 제2 값(false)가 저장되어 업데이트될 때 마다 상기 제2 큐에 저장된 제1 값(예:true)의 개수와 상기 제2 기준 개수(예: 제2 큐의 길이의 절반 이상)를 비교할 수 있다.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.
상기 613동작에셔, 상기 전자 장치는, 상기 제2 큐에 저장된 제1 값의 개수가 상기 제2 기준 개수 이하이면, 615동작에서 상기 외부 전자 장치가 착용된 사용자의 상태를 깨어 있는 상태로 결정(예측)할 수 있다. 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.
상기 613동작에셔, 상기 전자 장치는, 상기 제2 큐에 저장된 제1 값의 개수가 상기 제2 기준 개수 이상이면, 617동작에서 상기 외부 전자 장치가 착용된 사용자의 상태를 졸음 상태로 예측할 수 있다.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.
도 7a 내지 도 7b는 일 실시 예에 따른 전자 장치에서 피크 개수를 이용하여 졸음 상태를 검출하는 동작을 설명하기 위한 흐름도이다. 상기 졸음 상태를 검출하는 동작들은 701동작 내지 725동작을 포함할 수 있다. 이하 실시 예에서 각 동작들은 순차적으로 수행될 수도 있으나, 반드시 순차적으로 수행되는 것은 아니다. 예를 들어, 각 동작들의 순서가 변경될 수도 있으며, 적어도 두 동작들이 병렬적으로 수행되거나, 다른 동작이 추가될 수도 있다.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.
상기 도 7a 내지 상기 도 7b의 동작들은 상기 전자 장치에 포함된 프로세서 또는 상기 프로세서의 제어하에 상기 인공 지능 모델 예를 들어, SNN(spiking neural network)의 기본 모델인 LIF(leaky integrate and fire)모델을 이용하여 수행될 수 있다.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).
상기 도 7a 내지 상기 도 7b를 참조하면, 701동작에서, 전자 장치(예: 도 1의 전자 장치(101) 및/또는 도 2 내지 도 3의 전자 장치(301))는, 뇌파 신호의 차분 신호를 계산할 수 있다.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.
일 실시 예에 따른 상기 전자 장치는, 사용자의 신체 일부(예:귀)에 착용된 외부 전자 장치(예: 도 2의 이어버드(201a))로부터 수신된 뇌파 신호에 대해 저대역 주파수(0.1 - 20 Hz)를 위한 대역 통과 필터를 적용할 수 있다.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).
일 실시 예에 따른 상기 전자 장치는, 상기 저대역 주파수(0.1 - 20 Hz)를 위한 대역 통과 필터가 적용된 상기 뇌파 신호에서 현재 시간의 전압 값과 이전 시간의 전압 값을 뺀 상기 뇌파 신호의 차분 신호를 계산할 수 있다. 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.
703동작에서, 전자 장치(예: 도 1의 전자 장치(101) 및/또는 도 2 내지 도 3의 전자 장치(301))는, 차분 신호에서 지정된 복수의 시점들을 검출할 수 있다.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.
일 실시 예에 따른 상기 지정된 복수의 시점들은, 상기 차분 신호의 전압 값이 제1 전압 값(예:10) 미만에서 증가하여 상기 제1 전압 값이 되는 제1 시점, 상기 차분 신호의 전압 값이 상기 제1 전압 값(예: 10) 초과에서 감소하여 상기 제1 전압 값이 되는 제2 시점, 상기 차분 신호의 전압 값이 제2 전압 값(예: -10) 초과에서 감소하여 상기 제2 전압 값이 되는 제3 시점, 및 상기 차분 신호의 전압 값이 상기 제2 전압 값(예: -10)미만에서 증가하여 상기 제2 전압 값이 되는 제4 시점을 포함할 수 있다.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.
705동작에서, 전자 장치(예: 도 1의 전자 장치(101) 및/또는 도 2 내지 도 3의 전자 장치(301))는, 복수의 시점들 중 제1 시점과 제2 시점을 순차적으로 확인하면, 707동작에서 제1 시점과 제2 시점에 관련된 피크의 진폭이 제1 진폭(예: 60) 이상인지 확인할 수 있다.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).
상기 707동작에서, 제1 시점과 제2 시점에 관련된 피크의 진폭이 제1 진폭 이상이면, 709동작에서 제1 시점과 제2 시점을 순차적으로 확인한피크를 양의 피크(positive peak)로 검출할 수 있다. 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.
상기 707동작에서, 제1 시점과 제2 시점에 관련된 피크의 진폭이 제1 진폭 이하이면, 상기 701동작을 수행할 수 있다.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.
711동작에서, 전자 장치(예: 도 1의 전자 장치(101) 및/또는 도 2 내지 도 3의 전자 장치(301))는, 복수의 시점들 중 제3 시점과 제4 시점을 순차적으로 확인하면, 713동작에서 제3 시점과 제4 시점에 관련된 피크의 진폭이 제2 진폭(예: -60) 이하 인지 확인할 수 있다.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).
상기 711동작에서, 전자 장치(예: 도 1의 전자 장치(101) 및/또는 도 2 내지 도 3의 전자 장치(301))는, 복수의 시점들을 확인하지 못하면 상기 701동작을 수행할 수 있다.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.
상기 713동작에서, 제3 시점시점과 제4 시점에 관련된 피크의 진폭이 제2 진폭 이하이면, 715동작에서 제3 시점과 제4 시점을 순차적으로 확인한 피크를 음의 피크(negative peak)로 검출할 수 있다. 상기 713동작에서, 제3 시점과 제4 시점에 관련된 피크의 진폭이 제2 진폭 이상이면, 상기 701동작을 수행할 수 있다.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.
717동작에서, 전자 장치(예: 도 1의 전자 장치(101) 및/또는 도 2 내지 도 3의 전자 장치(301))는, 양의 피크와 음의 피크를 순차적으로 확인할 수 있다.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.
상기 717동작에서, 상기 전자 장치는, 양의 피크와 음의 피크를 순차적으로 확인하면, 719동작에서 하나의 피크로 검출하여 저장할 수 있다.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.
상기 717동작에서, 상기 전자 장치는, 양의 피크와 음의 피크를 순차적으로 확인하지 못하면, 상기 701동작을 수행할 수 있다.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.
721동작에서, 전자 장치(예: 도 1의 전자 장치(101) 및/또는 도 2 내지 도 3의 전자 장치(301))는, 저장된 피크의 개수와 제1 기준 개수를 비교할 수 있다.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.
상기 721동작에서, 상기 전자 장치는, 상기 저장된 피크의 개수와 제1 기준 개수(예: 15개) 이하이면, 723동작에서, 상기 외부 전자 장치가 착용된 사용자의 상태를 깨어 있는 상태로 결정할 수 있다.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.
상기 721동작에서, 상기 전자 장치는, 상기 저장된 피크의 개수와 제1 기준 개수(예: 15개) 이상이면, 725동작에서, 상기 외부 전자 장치가 착용된 사용자의 상태를 졸음 상태로 결정할 수 있다.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.
상기 721동작 내지 상기 725동작을 포함하는 720동작을 하기 도 8a 내지 도 8b는 에서 상세히 설명할 수 있다.The operation 720 including the above operation 721 to the above operation 725 can be described in detail in FIGS. 8a and 8b.
도 8a 내지 도 8b는 은 일 실시 예에 따른 전자 장치에서 피크 개수를 이용하여 졸음 상태를 검출하는 동작을 설명하기 위한 흐름도이다. 상기 졸음 상태를 검출하는 동작들은 801동작 내지 821동작을 포함할 수 있다. 이하 실시 예에서 각 동작들은 순차적으로 수행될 수도 있으나, 반드시 순차적으로 수행되는 것은 아니다. 예를 들어, 각 동작들의 순서가 변경될 수도 있으며, 적어도 두 동작들이 병렬적으로 수행되거나, 다른 동작이 추가될 수도 있다.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.
상기 도 8a 내지 상기 도 8b의 동작들은 상기 전자 장치에 포함된 프로세서 또는 상기 프로세서의 제어하에 상기 인공 지능 모델 예를 들어, SNN(spiking neural network)의 기본 모델인 LIF(leaky integrate and fire)모델을 이용하여 수행될 수 있다.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).
상기 도 8a 내지 상기 도 8b를 참조하면, 801동작에서, 전자 장치(예: 도 1의 전자 장치(101) 및/또는 도 2 내지 도 3의 전자 장치(301))는, 피크의 개수를 확인할 수 있다.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.
일 실시 예에 따른 상기 전자 장치는, 상기 전자 장치의 메모리(예: 도 3의 메모리(330))에 저장된 피크의 개수를 확인할 수 있다.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).
일 실시 예에 따른 상기 전자 장치는, 피크 검출이 시작되면, 졸음 상태를 검출하기 위한 제1 변수(v_now)의 값과 제1 변수(v_before)의 값을 모두 "0"으로 초기화할 수 있다.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.
803동작에서, 전자 장치(예: 도 1의 전자 장치(101) 및/또는 도 2 내지 도 3의 전자 장치(301))는, 피크의 개수가 1개 이상인지 확인할 수 있다.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.
일 실시 예에 따른 상기 전자 장치는, 상기 전자 장치의 메모리(예: 도 3의 메모리(330))에 저장된 피크의 개수를 확인할 수 있다.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).
상기 803동작에서, 상기 전자 장치는, 상기 피크의 개수가 1개 이상으로 확인하면, 805동작에서, 제1 변수(v_before)의 값에 상기 확인한 피크의 개수(n)만큼 더한 값을 제2 변수(v_now)의 값(v_before의 값 + n)으로 저장할 수 있다.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).
807동작에서, 전자 장치(예: 도 1의 전자 장치(101) 및/또는 도 2 내지 도 3의 전자 장치(301))는, 제2 변수의 값(v_now)과 제1 기준 개수를 비교할 수 있다.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.
일 실시 예에 따르면, 상기 전자 장치는, 제2 변수(v_now)의 값(v_before의 값 + n1과 제1 기준 개수(예: 15개)를 비교할 수 있다.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).
상기 807동작에서, 상기 전자 장치는, 상기 제2 변수(v_now)의 값(v_before의 값 + n)이 상기 제1 기준 개수 이상이면, 809동작에서, 상기 외부 전자 장치가 착용된 사용자의 상태를 졸음 상태로 결정할 수 있다.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.
811동작에서, 전자 장치(예: 도 1의 전자 장치(101) 및/또는 도 2 내지 도 3의 전자 장치(301))는, 상기 외부 전자 장치가 착용된 사용자의 상태를 졸음 상태로 결정하면, 제1 변수(v_before)의 최종 값을 제2 변수(v_now)의 값으로 저장할 수 있다.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).
상기 807동작에서, 상기 전자 장치는, 상기 제1 변수(v_now)의 값(v_before의 값 + n)이 상기 제1 기준 개수 이하이면, 813동작에서, 상기 외부 전자 장치가 착용된 사용자의 상태를 깨어 있는 상태로 결정할 수 있다.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.
815동작에서, 전자 장치(예: 도 1의 전자 장치(101) 및/또는 도 2 내지 도 3의 전자 장치(301))는, 피크의 개수가 0개인지 확인할 수 있다.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.
상기 815동작에서, 상기 전자 장치는, 상기 피크의 개수를 0개로 확인하면, 817동작에서, 제1 변수(v_before)에 제1 기준 개수(예: 15)를 뺀 값(v_before의 값 - 제1 기준 개수)이 "0"보다 작은지 여부를 확인할 수 이다.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”.
상기 817동작에서, 상기 전자 장치는, 제1 변수(v_before)의 값에 제1 기준 개수(예: 15)를 뺀 값(v_before의 값 - 제1 기준 개수)이 "0"보다 크다고 확인하면, 819동작에서, 제1 변수(v_before)의 값에 제1 기준 개수(예: 15)를 뺀 값을 제2 변수(v_now)의 값(v_before의 값 - 기준 개수)에 저장할 수 있다.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).
상기 807동작에서, 상기 전자 장치는, 제2 변수(v_now)의 값(v_before의 값 - 제1 기준 개수)과 제1 기준 개수를 비교할 수 있다.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.
일 실시 예에 따르면, 상기 전자 장치는, 제2 변수(v_now)의 값(v_before의 값 - 제1 기준 개수)과 제1 기준 개수(예: 15개)를 비교할 수 있다.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).
상기 807동작에서, 상기 전자 장치는, 상기 제2 변수(v_now)의 값(v_before의 값 - 제1 기준 개수)이 상기 제1 기준 개수를 이상이면, 상기 809동작에서, 상기 외부 전자 장치가 착용된 사용자의 상태를 졸음 상태로 결정할 수 있다.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.
상기 811동작에서, 전자 장치(예: 도 1의 전자 장치(101) 및/또는 도 2 내지 도 3의 전자 장치(301))는, 상기 외부 전자 장치가 착용된 사용자의 상태를 졸음 상태로 결정하면, 제1 변수(v_before)의 최종 값을 제2 변수(v_now) 에 저장할 수 있다.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).
상기 807동작에서, 상기 전자 장치는, 상기 제2 변수(v_now)의 값(v_before의 값 - 제1 기준 개수)이 상기 제1 기준 개수 이하이면, 상기 813동작에서, 상기 외부 전자 장치가 착용된 사용자의 상태를 깨어 있는 상태로 결정할 수 있다.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.
상기 815동작에서, 상기 전자 장치는, 제1 변수(v_before)의 값에 제1 기준 개수(예: 15)를 뺀 값(v_before의 값 - 제1 기준 개수)이 "0"보다 작다고 확인하면, 821동작에서, "0"을 제2 변수(v_now)의 값으로 저장할 수 있다.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).
도 9a 내지 도 9b는 일 실시 예에 따른 전자 장치에서 졸음 상태를 검출하는 동작을 설명하기 위한 흐름도이다. 상기 졸음 상태를 검출하는 동작들은 901동작 내지 921동작을 포함할 수 있다. 이하 실시 예에서 각 동작들은 순차적으로 수행될 수도 있으나, 반드시 순차적으로 수행되는 것은 아니다. 예를 들어, 각 동작들의 순서가 변경될 수도 있으며, 적어도 두 동작들이 병렬적으로 수행되거나, 다른 동작이 추가될 수도 있다.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.
상기 도 9a 내지 상기 도 9b를 참조하면, 901동작에서, 전자 장치(예: 도 1의 전자 장치(101) 및/또는 도 2 내지 도 3의 전자 장치(301))는, 졸음 상태 검출 동작을 시작할 수 있다.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.
일 실시 예에 따른 상기 전자 장치는, 상기 전자 장치의 통신 회로(예: 도 3의 통신 회로(390))을 통해 통신이 연결된 외부 전자 장치(예: 도 2의 이어 버드(201a))로부터 상기 외부 전자 장치가 상기 사용자의 신체 일부(예: 귀)에 착용되었다는 신호를 수신하면, 상기 졸음 상태 검출 동작을 시작할 수 있다. 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.
일 실시 예에 따른 상기 전자 장치는, 상기 외부 전자 장치로부터 상기 외부 전자 장치로부터 상기 외부 전자 장치가 상기 사용자의 신체 일부(예: 귀)에 착용되었다는 신호를 수신한 이후, 상기 전자 장치에서 졸음 상태 검출을 위한 사용자의 선택을 수신하면, 상기 졸음 상태 검출을 위한 뇌파 측정 시작을 알리는 신호를 상기 외부 전자 장치로 전송한 이후 상기 졸음 상태 검출 동작을 시작할 수 있다.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.
903동작에서, 전자 장치(예: 도 1의 전자 장치(101) 및/또는 도 2 내지 도 3의 전자 장치(301))는, 외부 전자 장치로부터 수신되는 뇌파 신호를 이용하여 제1 뇌파 값을 계산할 수 있다.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.
일 실시 예에 따른 상기 전자 장치는, 제2 지정된 시간(예: 1초) 마다 상기 제1 뇌파 값을 계산할 수 있다.In one embodiment, the electronic device may calculate the first brain wave value every second specified time (e.g., 1 second).
905동작에서, 전자 장치(예: 도 1의 전자 장치(101) 및/또는 도 2 내지 도 3의 전자 장치(301))는, 외부 전자 장치로부터 수신되는 노이즈가 포함된 뇌파 신호에서 졸음 상태를 검출하기 위한 피크를 검출하여 저장할 수 있다.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.
일 실시 예에 따른 상기 전자 장치는, 상기 903동작에서 상기 제1 뇌파 값을 계산하는 동안 상기 905동작에서 별도로 졸음 상태를 검출하기 위한 피크를 검출하여 저장할 수 있다.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.
907동작에서, 전자 장치(예: 도 1의 전자 장치(101) 및/또는 도 2 내지 도 3의 전자 장치(301))는, 제1 뇌파 값과 기준을 비교할 수 있다.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.
일 실시 예에 따른 상기 전자 장치는, 상기 903동작에서 상기 제2 지정된 시간(예: 1초) 마다 제1 뇌파 값을 계산하면, 상기 제1 뇌파 값과 상기 기준 값을 비교할 수 있다.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.
상기 907동작에서, 상기 전자 장치는, 상기 제1 뇌파 값이 상기 기준 값 이상이면, 909동작에서 상기 외부 전자 장치가 착용된 사용자의 상태를 졸음 상태로 결정할 수 있다.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.
일 실시 예에 따른 상기 전자 장치는, 상기 제1 뇌파 값을 이용하여 외부 전자 장치가 착용된 사용자의 상태를 졸음 상태로 예측한 이후 상기 피크의 개수를 이용하여 상기 사용자의 상태를 졸음 상태로 결정하면, 919동작에서 상기 외부 전자 장치 또는 상기 전자 장치를 통해 졸음 상태를 알릴 수 있다. 예를 들어, 상기 전자 장치는, 진동 및/또는 사운드를 이용하여 상기 외부 전자 장치 또는 상기 전자 장치를 통해 졸음 상태의 알림을 출력할 수 있다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.
상기 907동작에서, 상기 전자 장치는, 상기 제1 뇌파 값이 상기 기준 값 이하이면, 911동작에서 상기 외부 전자 장치가 착용된 사용자의 상태를 깨어 있는 상태로 예측할 수 있다.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.
913동작에서, 전자 장치(예: 도 1의 전자 장치(101) 및/또는 도 2 내지 도 3의 전자 장치(301))는, 피크 개수와 제1 기준 개수를 비교할 수 있다.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.
일 실시 예에 따른 상기 전자 장치는, 상기 911동작에서 상기 제1 뇌파 값을 이용하여 상기 외부 전자 장치가 착용된 사용자의 상태를 깨어 있는 상태로 예측하면, 상기 913동작을 통해 저장된 피크의 개수와 상기 제1 기준 개수를 비교할 수 있다.According to an 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.
상기 913동작에서, 상기 전자 장치는, 상기 피크 개수가 상기 제1 기준 개수 이하이면, 915동작에서 상기 외부 전자 장치가 착용된 사용자의 상태를 깨어 있는 상태로 결정할 수 있다.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.
상기 915동작에서, 상기 전자 장치는, 상기 피크 개수가 상기 제1 기준 개수 이상이면, 917동작에서 상기 외부 전자 장치가 착용된 사용자의 상태를 졸음 상태로 결정할 수 있다.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.
919동작에서, 전자 장치(예: 도 1의 전자 장치(101) 및/또는 도 2 내지 도 3의 전자 장치(301))는, 사용자의 상태가 졸음 상태임을 알릴 수 있다.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.
일 실시 예에 따른 상기 전자 장치는, 상기 제1 뇌파 값을 이용하여 외부 전자 장치가 착용된 사용자의 상태를 졸음 상태로 예측한 이후 상기 피크의 개수를 이용하여 상기 사용자의 상태를 졸음 상태로 결정하면, 상기 외부 전자 장치 또는 상기 전자 장치를 통해 졸음 상태를 알릴 수 있다. 예를 들어, 상기 전자 장치는, 진동 및/또는 사운드를 이용하여 상기 외부 전자 장치 또는 상기 전자 장치를 통해 졸음 상태의 알림을 출력할 수 있다.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.
921동작에서, 전자 장치(예: 도 1의 전자 장치(101) 및/또는 도 2 내지 도 3의 전자 장치(301))는, 졸음 상태 검출 동작의 종료 여부를 확인할 수 있다.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.
상기 921동작에서, 상기 전자 장치는, 상기 졸음 상태 검출 동작이 종료되지 않음을 확인하면, 상기 901동작 내지 919동작을 반복적으로 실행할 수 있다.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.
상기 921작에서, 상기 전자 장치는, 상기 졸음 상태 검출 동작이 종료되었음을 확인하면, 상기 졸음 상태 검출 동작을 종료할 수 있다.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.
도 10a, 도 10b, 및 도 10c는 일 실시 예에 따른 전자 장치에서 졸음 상태를 결정하기 위한 실험 그래프들을 도시하고 있다.FIGS. 10A, 10B, and 10C illustrate experimental graphs for determining a drowsiness state in an electronic device according to one embodiment.
도 10a에서 음영처리로 표시된 부분은 15명의 피실험자들에게 40분 동안 졸음을 유발할 수 있는 영상을 시청하였을 때, 카메라를 통해 측정된 실제 피실험자들이 졸았던 구간을 나타내고, 실선은 피실험자들의 뇌파 신호를 이용하여 계산된 제1 뇌파 값을 나타내고, 점선은 피실험자들의 뇌파 신호를 이용하여 계산된 기준 값을 나타내고 있다. 상기 도 10a와 같이, 20초 동안 제1 뇌파 값이 기준값 이상인 경우가 제2 기준 개수 제2 기준 개수 이상(예: 제2 큐의 길이의 절반 이상)이면 피실험자의 상태를 졸음 상태로 확인할 수 있다.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.
도 10b에서 음영처리로 표시된 부분은 15명의 피실험자들에게 40분 동안 졸음을 유발할 수 있는 영상을 시청하였을 때, 카메라를 통해 측정된 실제 피실험자들이 졸았던 구간을 나타내고, 실선은 인공 지능 모델에 구성된 두 개의 변수들 중 제2 변수(v_now)의 값을 나타내고 있다. 상기 도 10b와 같이, 졸고 있는 동안 피실험즈들의 움직임이 많이 발생하는 시점에 제2 변수(v_now)의 값이 높게 올라가고 그렇지 않은 경우에는 낮제 유지됨으로 제2 변수(v_now)가 기준 개수인 15이상인 경우 피실험자의 상태를 졸음 상태로 확인할 수 있다.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.
도 10c에서 음영처리로 표시된 부분은 15명의 피실험자들에게 40분 동안 졸음을 유발할 수 있는 영상을 시청하였을 때, 카메라를 통해 측정된 실제 피실험자들이 졸았던 구간을 나타내고, 실선은 상기 도 10a와 같이 제1 뇌파 값에 따른 결과와 상기 도 10b와 같이 피크의 개수를 이용한 결과 값을 합한 결과 그래프를 나타내고 있다. 상기 도 10c와 같이, 상기 파란색 선으로 표시되는 그래프의 값이 "0"일 경우 피실험자의 상태를 깨어 있는 상태로 확인하고, 상기 파란색 선으로 표시되는 그래프의 값이 "1"일 경우 피실험자의 상태를 졸음 상태로 확인할 수 있다.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.
일 실시 예에 따른 전자 장치(예: 도 1의 전자 장치(101) 및/또는 도 2 내지 도 3의 전자 장치(301))에서 졸음 상태를 검출하는 방법은, 사용자의 신체일부에 착용된 외부 전자 장치로부터 뇌파 신호를 수신하는 동작을 포함할 수 있다. 일 실시 예에 따른 상기 방법은, 상기기 뇌파 신호의 복수의 주파수 대역들 중 적어도 하나의 주파수 대역의 전력 값을 획득하고,상기 전력 값이 기준 값 이상이고, 상기 뇌파 신호의 복수의 시점들에서 피크의 개수가 제1 기준 개수 이상이면, 사용자의 상태를 졸음 상태로 확인하는 동작을 포함할 수 있다.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.
일 실시 예에 따른 상기 방법은, 상기 전력 값이 상기 기준값 이상이면 상기 사용자의 상태를 졸음 상태로 예측하는 동작을 포함할 수 있다. 일 실시 예에 따른 상기 방법은, 상기 사용자의 상태를 졸음 상태로 예측하면, 상기 뇌파 신호의 상기 복수의 시점들에서 피크의 개수를 검출하여 저장하는 동작을 포함할 수 있다. 일 실시 예에 따른 상기 방법은, 상기 피크의 개수가 상기 제1 기준 개수 이상이면, 상기 사용자의 상태를 졸음 상태로 확인하는 동작을 포함할 수 있다.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.
일 실시 예에 따른 상기 방법은, 졸음 상태 검출 동작이 시작되면, 상기 졸음 상태 검출 동작의 시작 시점부터 제1 지정된 시간 동안 상기 외부 전자 장치로부터 수신되는 뇌파 신호의 상기 복수의 주파수 대역들 중 상기 적어도 하나의 주파수 대역의 전력 값들을 계산하는 동작을 포함할 수 있다. 일 실시 예에 따른 상기 방법은, 상기 제1 지정된 시간 동안 계산된 상기 전력 값들의 평균 값을 계산하고, 상기 평균 값을 두 배하여 상기 기준 값을 계산하는 동작을 포함할 수 있다.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.
일 실시 예에 따른 상기 방법은, 상기 기준 값을 계산하기 위한 제1 지정된 시간이 경과하면, 상기 지정된 제1 시간 보다 짧은 제2 지정된 시간 마다 상기 뇌파 신호의 복수의 주파수 대역들 중 적어도 하나의 대역의 상기 전력 값을 계산하는 동작을 포함할 수 있다. 일 실시 예에 따른 상기 방법은, 상기 계산된 전력 값을 제1 길이를 가지는 제1 큐에 저장하여 업데이트하는 동작을 포함할 수 있다. 일 실시 예에 따른 상기 방법은, 상기 제1 큐가 업데이트되면 상기 제1 큐에 저장된 전력 값들의 평균 값을 계산하는 동작을 포함할 수 있다. 일 실시 예에 따른 상기 방법은, 상기 평균 값이 상기 기준 값 이상이면 제2 일정길이를 가지는 제2 큐에 제1 값을 저장하여 업데이트하는 동작을 포함할 수 있다. 일 실시 예에 따른 상기 방법은, 상기 평균 값이 상기 기준 값 미만이면 상기 제2 큐에 제2 값을 저장하여 업데이트하는 동작을 포함할 수 있다. 일 실시 예에 따른 상기 방법은, 상기 제2 큐가 업데이트 되면, 상기 제2 큐에 저장된 제1 값의 개수가 제2 기준 개수 이상인지 확인하는 동작을 포함할 수 있다. 일 실시 예에 따른 상기 방법은, 상기 제2 큐에 저장된 제1 값의 개수가 상기 제2 기준 개수 이상으로 확인하면, 상기 사용자의 상태를 졸음 상태로 예측하는 동작을 포함할 수 있다.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.
일 실시 예에 따른 상기 방법은, 상기 뇌파 신호를 저대역 주파수를 위한 대역 통과 필터에 적용하는 동작을 포함할 수 있다. 일 실시 예에 따른 상기 방법은, 상기 필터에 적용된 상기 뇌파 신호의 전압 값들 중 현재 시간의 전압 값에서 이전 시간의 전압 값을 뺀 상기 뇌파 신호의 차분 신호를 계산하는 동작을 포함할 수 있다. 일 실시 예에 따른 상기 방법은, 상기 차분 신호에서 상기 복수의 시점들에서 피크의 개수를 검출하는 동작을 포함할 수 있다.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.
일 실시 예에 따른 상기 방법은, 상기 복수의 시점들은, 상기 차분 신호의 전압 값이 제1 전압 값 미만에서 증가하여 상기 제1 전압 값이 되는 제1 시점, 상기 차분 신호의 전압 값이 상기 제1 전압 값 초과에서 감소하여 상기 제1 전압 값이 되는 제2 시점, 상기 차분 신호의 전압 값이 제2 전압 값 초과에서 감소하여 상기 제2 전압 값이 되는 제3 시점, 및 상기 차분 신호의 전압 값이 상기 제2 전압 값 미만에서 증가하여 상기 제2 전압 값이 되는 제4 시점을 포함할 수 있다.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.
일 실시 예에 따른 상기 방법은, 상기 차분 신호에서 상기 복수의 시점들 중 상기 제1 시점과 상기 제2 시점을 순차적으로 확인하고, 상기 제1 시점과 상기 제2 시점에 관련된 피크의 진폭이 제1 진폭 값 이상이면, 상기 피크를 양의 피크로 확인하는 동작을 포함할 수 있다. 일 실시 예에 따른 상기 방법은, 상기 차분 신호에서 상기 복수의 시점들 중 상기 제3 시점과 상기 제4 시점을 순차적으로 확인하고, 상기 제3 시점과 상기 제4 시점에 관련된 피크의 진폭이 제2 진폭 값 미만이면, 상기 피크를 음의 피크로 확인하는 동작을 포함할 수 있다. 일 실시 예에 따른 상기 방법은, 상기 양의 피크와 상기 음의 피크가 순차적으로 확인하면, 하나의 피크로 검출하는 동작을 포함할 수 있다.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.
일 실시 예에 따른 상기 방법은, 인공 지능 모델을 이용하여, 상기 피크 개수를 검출하여 저장하고, 상기 저장된 피크 개수와 상기 제1 기준 개수를 비교하여 상기 사용자의 상태를 졸음 상태로 결정하는 동작을 더 포함할 수 있다. 일 실시 예에 따른 상기 인공 기능 모델은, SNN(spiking neural network)의 기본 모델인 LIF(leaky integrate and fire)모델을 포함할 수 있다.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).
일 실시 예에 따른 상기 방법은, 상기 사용자의 상태를 상기 졸음 상태로 확인하면, 상기 사용자의 신체 일부에 착용된 상기 외부 전자 장치를 통해 졸음 상태를 알리는 동작을 포함할 수 있다.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.
일 실시 예에 따른 상기 방법은, 상기 외부 전자 장치가 상기 사용자의 신체 일부에 착용될 때 또는 상기 외부 전자 장치가 상기 사용자의 신체 일부에 착용되어 있는 동안 졸음 상태 검출을 위한 사용자의 선택을 확인할 때, 졸음 상태 검출 동작을 시작하는 동작을 포함할 수 있다.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.
본 문서에 개시된 일 실시 예에 따른 전자 장치는 다양한 형태의 장치가 될 수 있다. 전자 장치는, 예를 들면, 휴대용 통신 장치(예: 스마트폰), 컴퓨터 장치, 휴대용 멀티미디어 장치, 휴대용 의료 기기, 카메라, 웨어러블 장치, 또는 가전 장치를 포함할 수 있다. 본 문서의 실시 예에 따른 전자 장치는 전술한 기기들에 한정되지 않는다.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.
본 문서의 일 실시 예 및 이에 사용된 용어들은 본 문서에 기재된 기술적 특징들을 특정한 실시 예들로 한정하려는 것이 아니며, 해당 실시예의 다양한 변경, 균등물, 또는 대체물을 포함하는 것으로 이해되어야 한다. 도면의 설명과 관련하여, 유사한 또는 관련된 구성요소에 대해서는 유사한 참조 부호가 사용될 수 있다. 아이템에 대응하는 명사의 단수 형은 관련된 문맥상 명백하게 다르게 지시하지 않는 한, 상기 아이템 한 개 또는 복수 개를 포함할 수 있다. 본 문서에서, "A 또는 B", "A 및 B 중 적어도 하나", "A 또는 B 중 적어도 하나", "A, B 또는 C", "A, B 및 C 중 적어도 하나", 및 "A, B, 또는 C 중 적어도 하나"와 같은 문구들 각각은 그 문구들 중 해당하는 문구에 함께 나열된 항목들 중 어느 하나, 또는 그들의 모든 가능한 조합을 포함할 수 있다. "제 1", "제 2", 또는 "첫째" 또는 "둘째"와 같은 용어들은 단순히 해당 구성요소를 다른 해당 구성요소와 구분하기 위해 사용될 수 있으며, 해당 구성요소들을 다른 측면(예: 중요성 또는 순서)에서 한정하지 않는다. 어떤(예: 제 1) 구성요소가 다른(예: 제 2) 구성요소에, "기능적으로" 또는 "통신적으로"라는 용어와 함께 또는 이런 용어 없이, "커플드" 또는 "커넥티드"라고 언급된 경우, 그것은 상기 어떤 구성요소가 상기 다른 구성요소에 직접적으로(예: 유선으로), 무선으로, 또는 제 3 구성요소를 통하여 연결될 수 있다는 것을 의미한다.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.
본 문서의 일 실시 예에서 사용된 용어 "모듈"은 하드웨어, 소프트웨어 또는 펌웨어로 구현된 유닛을 포함할 수 있으며, 예를 들면, 로직, 논리 블록, 부품, 또는 회로와 같은 용어와 상호 호환적으로 사용될 수 있다. 모듈은, 일체로 구성된 부품 또는 하나 또는 그 이상의 기능을 수행하는, 상기 부품의 최소 단위 또는 그 일부가 될 수 있다. 예를 들면, 일 실시 예에 따른, 모듈은 ASIC(application-specific integrated circuit)의 형태로 구현될 수 있다. 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).
본 문서의 일 실시 예는 기기(machine)(예: 전자 장치(101) 또는 전자 장치(301)) 의해 읽을 수 있는 저장 매체(storage medium)(예: 내장 메모리(136) 또는 외장 메모리(138))에 저장된 하나 이상의 명령어들을 포함하는 소프트웨어(예: 프로그램(140))로서 구현될 수 있다. 예를 들면, 기기(예: 전자 장치(301))의 프로세서(예: 제1 프로세서(320))는, 저장 매체로부터 저장된 하나 이상의 명령어들 중 적어도 하나의 명령을 호출하고, 그것을 실행할 수 있다. 이것은 기기가 상기 호출된 적어도 하나의 명령어에 따라 적어도 하나의 기능을 수행하도록 운영되는 것을 가능하게 한다. 상기 하나 이상의 명령어들은 컴파일러에 의해 생성된 코드 또는 인터프리터에 의해 실행될 수 있는 코드를 포함할 수 있다. 기기로 읽을 수 있는 저장 매체는, 비일시적(non-transitory) 저장 매체의 형태로 제공될 수 있다. 여기서, '비일시적'은 저장 매체가 실재(tangible)하는 장치이고, 신호(signal)(예: 전자기파)를 포함하지 않는다는 것을 의미할 뿐이며, 이 용어는 데이터가 저장 매체에 반영구적으로 저장되는 경우와 임시적으로 저장되는 경우를 구분하지 않는다.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.
일 실시 예에 따르면, 본 문서에 개시된 일 실시 예에 따른 방법은 컴퓨터 프로그램 제품(computer program product)에 포함되어 제공될 수 있다. 컴퓨터 프로그램 제품은 상품으로서 판매자 및 구매자 간에 거래될 수 있다. 컴퓨터 프로그램 제품은 기기로 읽을 수 있는 저장 매체(예: compact disc read only memory(CD-ROM))의 형태로 배포되거나, 또는 어플리케이션 스토어(예: 플레이 스토어TM)를 통해 또는 두 개의 사용자 장치들(예: 스마트 폰들) 간에 직접, 온라인으로 배포(예: 다운로드 또는 업로드)될 수 있다. 온라인 배포의 경우에, 컴퓨터 프로그램 제품의 적어도 일부는 제조사의 서버, 어플리케이션 스토어의 서버, 또는 중계 서버의 메모리와 같은 기기로 읽을 수 있는 저장 매체에 적어도 일시 저장되거나, 임시적으로 생성될 수 있다.According to one embodiment, the method according to one embodiment disclosed in the present document may be provided as included in a computer program product. The computer program product may be traded as a product between a seller and a buyer. The computer program product may be distributed in the form of a machine-readable storage medium (e.g., compact disc read only memory (CD-ROM)), or may be distributed online (e.g., downloaded or uploaded) via an application store (e.g., Play Store ™ ) or directly between two user devices (e.g., smart phones). In the case of online distribution, at least a portion of the computer program product may be temporarily stored or temporarily generated in a machine-readable storage medium, such as the memory of a manufacturer's server, an application store's server, or an intermediary server.
일 실시 예에 따르면, 상기 기술한 구성요소들의 각각의 구성요소(예: 모듈 또는 프로그램)는 단수 또는 복수의 개체를 포함할 수 있으며, 복수의 개체 중 일부는 다른 구성요소에 분리 배치될 수도 있다. 일 실시예에 따르면, 전술한 해당 구성요소들 중 하나 이상의 구성요소들 또는 동작들이 생략되거나, 또는 하나 이상의 다른 구성요소들 또는 동작들이 추가될 수 있다. 대체적으로 또는 추가적으로, 복수의 구성요소들(예: 모듈 또는 프로그램)은 하나의 구성요소로 통합될 수 있다. 이런 경우, 통합된 구성요소는 상기 복수의 구성요소들 각각의 구성요소의 하나 이상의 기능들을 상기 통합 이전에 상기 복수의 구성요소들 중 해당 구성요소에 의해 수행되는 것과 동일 또는 유사하게 수행할 수 있다. 일 실시 예에 따르면, 모듈, 프로그램 또는 다른 구성요소에 의해 수행되는 동작들은 순차적으로, 병렬적으로, 반복적으로, 또는 휴리스틱하게 실행되거나, 상기 동작들 중 하나 이상이 다른 순서로 실행되거나, 생략되거나, 또는 하나 이상의 다른 동작들이 추가될 수 있다.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 (15)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR10-2024-0039968 | 2024-03-22 | ||
| KR1020240039968A KR20250142694A (en) | 2024-03-22 | 2024-03-22 | Electronic device and method for detecting drowsy state in the electronic device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2025198169A1 true WO2025198169A1 (en) | 2025-09-25 |
Family
ID=97139879
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/KR2025/001156 Pending WO2025198169A1 (en) | 2024-03-22 | 2025-01-21 | Electronic device and method for detecting drowsiness state in electronic device |
Country Status (2)
| Country | Link |
|---|---|
| KR (1) | KR20250142694A (en) |
| WO (1) | WO2025198169A1 (en) |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2002529118A (en) * | 1996-04-05 | 2002-09-10 | コンソリデイティド リサーチ オブ リッチモンド,インコーポレイテッド | Alert and drowsiness detection and tracking system |
| KR20120135452A (en) * | 2011-06-06 | 2012-12-14 | 소순상 | The method for estimation of mental states from brain signal |
| KR101579543B1 (en) * | 2009-04-15 | 2015-12-28 | 에스케이텔레콤 주식회사 | EEG method and apparatus |
| JP2021505310A (en) * | 2017-12-12 | 2021-02-18 | コーニンクレッカ フィリップス エヌ ヴェKoninklijke Philips N.V. | Systems and methods for determining sleep latency |
| US20210369169A1 (en) * | 2013-06-04 | 2021-12-02 | Medtronic, Inc. | Patient state determination based on one or more spectral characteristics of a bioelectrical brain signal |
| CN115357126B (en) * | 2022-10-19 | 2023-01-24 | 之江实验室 | Method, system and device for extracting sleep slow wave-spindle wave coupling signal |
-
2024
- 2024-03-22 KR KR1020240039968A patent/KR20250142694A/en active Pending
-
2025
- 2025-01-21 WO PCT/KR2025/001156 patent/WO2025198169A1/en active Pending
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2002529118A (en) * | 1996-04-05 | 2002-09-10 | コンソリデイティド リサーチ オブ リッチモンド,インコーポレイテッド | Alert and drowsiness detection and tracking system |
| KR101579543B1 (en) * | 2009-04-15 | 2015-12-28 | 에스케이텔레콤 주식회사 | EEG method and apparatus |
| KR20120135452A (en) * | 2011-06-06 | 2012-12-14 | 소순상 | The method for estimation of mental states from brain signal |
| US20210369169A1 (en) * | 2013-06-04 | 2021-12-02 | Medtronic, Inc. | Patient state determination based on one or more spectral characteristics of a bioelectrical brain signal |
| JP2021505310A (en) * | 2017-12-12 | 2021-02-18 | コーニンクレッカ フィリップス エヌ ヴェKoninklijke Philips N.V. | Systems and methods for determining sleep latency |
| CN115357126B (en) * | 2022-10-19 | 2023-01-24 | 之江实验室 | Method, system and device for extracting sleep slow wave-spindle wave coupling signal |
Also Published As
| Publication number | Publication date |
|---|---|
| KR20250142694A (en) | 2025-09-30 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2022075564A1 (en) | Electronic device and method for providing wireless charging guidance by electronic device | |
| WO2023013878A1 (en) | Device and method for establishing connection | |
| WO2022055319A1 (en) | Electronic device for outputting sound and method for operating the same | |
| WO2022154363A1 (en) | Audio device for processing audio data and operating method thereof | |
| WO2022154349A1 (en) | Method for controlling electronic device on basis of remaining battery capacity, and electronic device thereof | |
| WO2024225788A1 (en) | Method and electronic device for requesting remote control of camera | |
| WO2025198169A1 (en) | Electronic device and method for detecting drowsiness state in electronic device | |
| WO2023085642A1 (en) | Operation control method and electronic device therefor | |
| WO2023014120A1 (en) | Audio signal processing method and electronic device supporting same | |
| WO2023033438A1 (en) | Electronic device for performing matching between electronic devices and method for operating same | |
| WO2022145914A1 (en) | Method for finding audio output device by using power supply device and power supply device thereof | |
| WO2026005194A1 (en) | Wearable device, method, and non-transitory computer-readable recording medium for performing pairing on basis of input event from external electronic device | |
| WO2026010319A1 (en) | Wearable electronic device for executing function, operating method thereof, and recording medium | |
| WO2024106806A1 (en) | Wearable device comprising communication circuit, and operating method therefor | |
| WO2026010292A1 (en) | Electronic device for managing communication link with wearable electronic device and operating method thereof | |
| WO2025014103A1 (en) | Electronic device including speaker and operation method thereof | |
| WO2024117501A1 (en) | Electronic device for controlling transmission power, and electronic device operating method | |
| WO2025254446A1 (en) | Electronic device, operation method thereof, and storage medium | |
| WO2025095442A1 (en) | Method for adjusting point in time for sound output from external electronic device and electronic device performing same | |
| WO2025121630A1 (en) | Wearable device that acquires signal by movement of user, electronic device that checks movement of user, and operating method thereof | |
| WO2023146104A1 (en) | Wireless charging guide providing method and electronic device performing same | |
| WO2025121741A1 (en) | Electronic device for providing data, electronic device for adjusting volume on basis of data, and operating method thereof | |
| WO2024186008A1 (en) | System for identifying external electronic device connected to electronic device, electronic device, and method for identifying external electronic device connected to electronic device | |
| WO2024106749A1 (en) | Electronic device and method for identifying priority of connection, and non-transitory computer-readable storage medium | |
| WO2024039046A1 (en) | Wearable device and method for establishing call connection with external electronic device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 25774833 Country of ref document: EP Kind code of ref document: A1 |