KR102268804B1 - Method and apparatus for providing lighting and music according to sleep conditions using artificial intelligence - Google Patents

Method and apparatus for providing lighting and music according to sleep conditions using artificial intelligence Download PDF

Info

Publication number
KR102268804B1
KR102268804B1 KR1020210020319A KR20210020319A KR102268804B1 KR 102268804 B1 KR102268804 B1 KR 102268804B1 KR 1020210020319 A KR1020210020319 A KR 1020210020319A KR 20210020319 A KR20210020319 A KR 20210020319A KR 102268804 B1 KR102268804 B1 KR 102268804B1
Authority
KR
South Korea
Prior art keywords
sleep state
vector
neural network
sleep
music
Prior art date
Application number
KR1020210020319A
Other languages
Korean (ko)
Inventor
최현수
Original Assignee
최현수
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 최현수 filed Critical 최현수
Priority to KR1020210020319A priority Critical patent/KR102268804B1/en
Priority to KR1020210079108A priority patent/KR102344875B1/en
Application granted granted Critical
Publication of KR102268804B1 publication Critical patent/KR102268804B1/en

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61MDEVICES FOR INTRODUCING MEDIA INTO, OR ONTO, THE BODY; DEVICES FOR TRANSDUCING BODY MEDIA OR FOR TAKING MEDIA FROM THE BODY; DEVICES FOR PRODUCING OR ENDING SLEEP OR STUPOR
    • A61M21/00Other devices or methods to cause a change in the state of consciousness; Devices for producing or ending sleep by mechanical, optical, or acoustical means, e.g. for hypnosis
    • A61M21/02Other devices or methods to cause a change in the state of consciousness; Devices for producing or ending sleep by mechanical, optical, or acoustical means, e.g. for hypnosis for inducing sleep or relaxation, e.g. by direct nerve stimulation, hypnosis, analgesia
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/103Detecting, measuring or recording devices for testing the shape, pattern, colour, size or movement of the body or parts thereof, for diagnostic purposes
    • A61B5/11Measuring movement of the entire body or parts thereof, e.g. head or hand tremor, mobility of a limb
    • A61B5/1116Determining posture transitions
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/103Detecting, measuring or recording devices for testing the shape, pattern, colour, size or movement of the body or parts thereof, for diagnostic purposes
    • A61B5/11Measuring movement of the entire body or parts thereof, e.g. head or hand tremor, mobility of a limb
    • A61B5/1126Measuring movement of the entire body or parts thereof, e.g. head or hand tremor, mobility of a limb using a particular sensing technique
    • A61B5/1128Measuring movement of the entire body or parts thereof, e.g. head or hand tremor, mobility of a limb using a particular sensing technique using image analysis
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/48Other medical applications
    • A61B5/4806Sleep evaluation
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7235Details of waveform analysis
    • A61B5/7264Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/16Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61MDEVICES FOR INTRODUCING MEDIA INTO, OR ONTO, THE BODY; DEVICES FOR TRANSDUCING BODY MEDIA OR FOR TAKING MEDIA FROM THE BODY; DEVICES FOR PRODUCING OR ENDING SLEEP OR STUPOR
    • A61M21/00Other devices or methods to cause a change in the state of consciousness; Devices for producing or ending sleep by mechanical, optical, or acoustical means, e.g. for hypnosis
    • A61M2021/0005Other devices or methods to cause a change in the state of consciousness; Devices for producing or ending sleep by mechanical, optical, or acoustical means, e.g. for hypnosis by the use of a particular sense, or stimulus
    • A61M2021/0027Other devices or methods to cause a change in the state of consciousness; Devices for producing or ending sleep by mechanical, optical, or acoustical means, e.g. for hypnosis by the use of a particular sense, or stimulus by the hearing sense
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61MDEVICES FOR INTRODUCING MEDIA INTO, OR ONTO, THE BODY; DEVICES FOR TRANSDUCING BODY MEDIA OR FOR TAKING MEDIA FROM THE BODY; DEVICES FOR PRODUCING OR ENDING SLEEP OR STUPOR
    • A61M21/00Other devices or methods to cause a change in the state of consciousness; Devices for producing or ending sleep by mechanical, optical, or acoustical means, e.g. for hypnosis
    • A61M2021/0005Other devices or methods to cause a change in the state of consciousness; Devices for producing or ending sleep by mechanical, optical, or acoustical means, e.g. for hypnosis by the use of a particular sense, or stimulus
    • A61M2021/0044Other devices or methods to cause a change in the state of consciousness; Devices for producing or ending sleep by mechanical, optical, or acoustical means, e.g. for hypnosis by the use of a particular sense, or stimulus by the sight sense
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61MDEVICES FOR INTRODUCING MEDIA INTO, OR ONTO, THE BODY; DEVICES FOR TRANSDUCING BODY MEDIA OR FOR TAKING MEDIA FROM THE BODY; DEVICES FOR PRODUCING OR ENDING SLEEP OR STUPOR
    • A61M2230/00Measuring parameters of the user
    • A61M2230/63Motion, e.g. physical activity

Landscapes

  • Health & Medical Sciences (AREA)
  • Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Physics & Mathematics (AREA)
  • Biomedical Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Public Health (AREA)
  • Mathematical Physics (AREA)
  • Veterinary Medicine (AREA)
  • Animal Behavior & Ethology (AREA)
  • Biophysics (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Molecular Biology (AREA)
  • Pathology (AREA)
  • Theoretical Computer Science (AREA)
  • Medical Informatics (AREA)
  • General Physics & Mathematics (AREA)
  • Surgery (AREA)
  • Physiology (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Dentistry (AREA)
  • Computational Mathematics (AREA)
  • Software Systems (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Analysis (AREA)
  • Anesthesiology (AREA)
  • Evolutionary Computation (AREA)
  • Computing Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Engineering & Computer Science (AREA)
  • Hematology (AREA)
  • Acoustics & Sound (AREA)
  • Psychiatry (AREA)
  • Fuzzy Systems (AREA)
  • Algebra (AREA)
  • Databases & Information Systems (AREA)
  • Psychology (AREA)

Abstract

Disclosed is a method and device for providing lighting and music depending on a sleep state using artificial intelligence (AI). The device for providing the lighting and music depending on the sleep state using the AI comprises: at least one processor; and a memory storing instructions by which the at least one processor performs at least one operation.

Description

AI를 이용하여 수면 상태에 따른 조명과 음악을 제공하는 방법 및 장치{METHOD AND APPARATUS FOR PROVIDING LIGHTING AND MUSIC ACCORDING TO SLEEP CONDITIONS USING ARTIFICIAL INTELLIGENCE}A method and apparatus for providing lighting and music according to the sleep state using AI {METHOD AND APPARATUS FOR PROVIDING LIGHTING AND MUSIC ACCORDING TO SLEEP CONDITIONS USING ARTIFICIAL INTELLIGENCE}

본 발명은 AI를 이용하여 수면 상태를 감지하고 빛과 음악을 제공하는 방법 및 장치에 관한 것으로, 더욱 상세하게는 생체 정보와 영상 정보를 인공 신경망을 이용하여 분석함으로써 사용자의 수면 상태를 감지하고, 감지된 수면 상태에 대응하는 조명과 음악을 제공하는 방법 및 장치에 관한 것이다.The present invention relates to a method and apparatus for detecting a sleep state using AI and providing light and music, and more particularly, detects a user's sleep state by analyzing biometric information and image information using an artificial neural network, A method and apparatus for providing lighting and music corresponding to a sensed sleep state.

수면은 몸의 피로를 회복시키고 생체 리듬을 유지하기 위하여 사람에게 하루 중 1/3 또는 1/4에 상응하는 시간 동안 필수적으로 제공되어야 한다. 사회가 고도화됨에 따라 이러한 수면의 질을 향상시키는 것에 대한 사람들의 관심이 크게 증가하고 있다.Sleep must be provided for one-third or one-quarter of a day in order to recover body fatigue and maintain circadian rhythm. As society is advanced, people's interest in improving the quality of sleep is greatly increasing.

특히, 스마트폰을 비롯한 각종 디스플레이 장치들이 널리 보급됨에 따라 사람들은 장시간 디스플레이서 제공되는 빛에 노출되고 이로인한 불면증을 호소하는 경우도 많다.In particular, as various display devices, including smartphones, are widely used, people are exposed to light provided by the display for a long time and often complain of insomnia.

따라서, 수면 중에 적절한 조명을 제공하거나 음악을 제공함으로써 더욱 쉽고 깊게 수면 상태를 유지하고자 하는 사람들이 많다. 그러나 통상적인 수면 무드등이나 음악 플레이어기기들은 모두 사용자의 조작에 의해 정해진 조명을 발산하거나 정해진 음악을 순차적 또는 랜덤하게 플레이하는 방식이기 때문에 수면 상태에 따라 적절하게 변화된 조명이나 음악을 사용자에게 제공하기 어렵다.Therefore, there are many people who want to maintain a sleep state more easily and deeply by providing appropriate lighting or providing music during sleep. However, it is difficult to provide the user with lighting or music that is appropriately changed according to the sleeping state, because all of the conventional sleep mood lights and music player devices emit light determined by the user's operation or play music sequentially or randomly. .

한편, 인공지능(Artificial intelligence)는 1956년도에 이르러 처음으로 등장하였고, 1980년대에는 딥러닝 기반의 인공 신경망이 제안되었으나 컴퓨팅 디바이스의 처리 능력이 딥러닝 기반의 인공 신경망을 수용하지 못하여 보급되기 어려웠다.On the other hand, artificial intelligence first appeared in 1956, and deep learning-based artificial neural networks were proposed in the 1980s, but the processing power of computing devices did not accommodate deep learning-based artificial neural networks, so it was difficult to spread.

그러나, 최근에는 컴퓨팅 디바이스의 처리 능력이 급격히 향상됨에 따라 딥러닝 기반의 인공 신경망의 효과와 성능에 대해 인정받게 되었다. 다만, 이러한 딥러닝 기반의 인공 신경망은 어떻게 데이터를 학습 데이터 형태로 만들어 지도학습시킬지에 따라 큰 폭의 성능차를 나타낸다.However, recently, as the processing power of computing devices has rapidly improved, the effectiveness and performance of deep learning-based artificial neural networks have been recognized. However, such deep learning-based artificial neural networks show a large performance difference depending on how the data is made in the form of training data and supervised learning.

또한, 딥러닝 기반의 인공 신경망에서 목적한 결과를 나타내는 목표 벡터와 인공 신경망의 출력값 사이의 차이를 최소화하는 손실 함수(loss function) 및 목표 벡터를 어떻게 결정하는 지에 따라서도 전혀 다른 출력결과를 나타낸다.In addition, in a deep learning-based artificial neural network, a loss function that minimizes the difference between a target vector representing a target result and an output value of the artificial neural network and a loss function that minimizes the difference between the target vector and the output value of the artificial neural network are completely different depending on how the target vector is determined.

따라서, 이러한 딥러닝 기반의 인공 신경망을 적극적으로 연구하여 사용자의 수면 상태에 적합한 조명이나 음악을 제공하기 위한 기술이 필요한 실정이다.Therefore, there is a need for a technology for actively researching such deep learning-based artificial neural networks to provide lighting or music suitable for a user's sleep state.

대한민국 공개특허공보 10-2019-0100888 (2019.08.29.)Republic of Korea Patent Publication No. 10-2019-0100888 (2019.08.29.)

상기와 같은 문제점을 해결하기 위한 본 발명의 목적은, AI를 이용하여 수면 상태에 따른 조명과 음악을 제공하는 방법 및 장치를 제공하는 데 있다.An object of the present invention for solving the above problems is to provide a method and apparatus for providing lighting and music according to a sleep state using AI.

상기 목적을 달성하기 위한 본 발명의 일 측면은, AI(Artificial Intelligence)를 이용하여 수면 상태에 따른 조명과 음악을 제공하는 장치를 제공한다.One aspect of the present invention for achieving the above object provides an apparatus for providing lighting and music according to a sleep state using AI (Artificial Intelligence).

AI(Artificial Intelligence)를 이용하여 수면 상태에 따른 조명과 음악을 제공하는 장치는, 적어도 하나의 프로세서(processor); 및 상기 적어도 하나의 프로세서가 적어도 하나의 동작(operation)을 수행하는 명령어들(instructions)을 저장하는 메모리(memory)를 포함한다.An apparatus for providing lighting and music according to a sleep state using artificial intelligence (AI) includes: at least one processor; and a memory for storing instructions for the at least one processor to perform at least one operation.

상기 적어도 하나의 동작은, 웨어러블 디바이스(wearable device)를 이용하여 측정된 사용자의 생체 정보를 획득하고, 카메라를 이용하여 촬영된 상기 사용자의 영상 정보를 획득하는 단계; 상기 영상 정보를 합성곱 신경망(convolutional neural network, CNN)에 입력하여 제1 수면 상태를 결정하는 단계; 상기 생체 정보에 포함된 움직임 신호에 기초하여 제2 수면 상태를 결정하는 단계; 상기 생체 정보에 포함된 PPG(photo-plethysmograph) 신호에 기초하여 제3 수면 상태를 결정하는 단계; 상기 제1 수면 상태, 상기 제2 수면 상태, 및 상기 제3 수면 상태를 미리 정의된 제1 매칭 테이블을 참조하여 각각 제1 내지 제3 수면 상태 벡터들로 변환하는 단계; 변환된 상기 제1 내지 제3 수면 상태 벡터들을 미리 지도학습(supervised learning)된 순환 신경망(Recurrent neural network, RNN) 기반의 인공 신경망에 입력하는 단계; 상기 인공 신경망의 출력으로 상기 사용자의 최종 수면 상태를 지시하는 최종 수면 상태 벡터를 획득하는 단계; 및 상기 최종 수면 상태 벡터에 대응하는 조명과 음악을 선정하는 단계를 포함한다.The at least one operation may include: obtaining biometric information of a user measured using a wearable device, and obtaining image information of the user photographed using a camera; determining a first sleep state by inputting the image information into a convolutional neural network (CNN); determining a second sleep state based on a motion signal included in the biometric information; determining a third sleep state based on a photo-plethysmograph (PPG) signal included in the biometric information; converting the first sleep state, the second sleep state, and the third sleep state into first to third sleep state vectors with reference to a first predefined matching table, respectively; inputting the converted first to third sleep state vectors into a pre-supervised learning recurrent neural network (RNN)-based artificial neural network; obtaining a final sleep state vector indicating the final sleep state of the user as an output of the artificial neural network; and selecting lighting and music corresponding to the final sleep state vector.

상기 제1 매칭 테이블은, 미리 설정된 수면 상태들과 1:1로 대응하도록 미리 설정된 원-핫 벡터들(one-hot vectors)을 지시할 수 있다.The first matching table may indicate preset one-hot vectors to correspond 1:1 with preset sleep states.

상기 최종 수면 상태 벡터는, 상기 제1 매칭 테이블에 의해 지시되는 상기 원-핫 벡터들 중 하나일 수 있다.The final sleep state vector may be one of the one-hot vectors indicated by the first matching table.

상기 조명과 음악을 선정하는 단계는, 상기 최종 수면 상태 벡터의 성분값 '1'의 기초하여 조도의 단계를 결정할 수 있다.In the selecting of the lighting and music, the level of illumination may be determined based on the component value '1' of the final sleep state vector.

상기 최종 수면 상태 벡터는, 상기 제1 매칭 테이블에 의해 지시되는 상기 원-핫 벡터들 중 하나일 수 있다.The final sleep state vector may be one of the one-hot vectors indicated by the first matching table.

상기 조명과 음악을 선정하는 단계는, 다수의 후보 음악들 각각의 시간에 따른 음파 신호를 주파수 변환(FFT, fast fourier transform)하여 주파수 영역으로 변환하는 단계; 변환된 주파수 영역에서 가청 주파수에 해당하는 20 내지 20000 (Hz)에 해당하는 음파 신호를 필터링하여 획득하는 단계; 필터링된 상기 음파 신호를 상기 최종 수면 상태 벡터의 성분값들 각각과 대응하는 균등한 주파수 구간들로 분할하고, 분할된 주파수 구간들 각각에 대하여 상기 음파 신호를 주파수 영역에서 적분하는 단계; 및 적분된 상기 음파 신호의 결과값이 가장 큰 주파수 구간을 결정하고, 결정된 주파수 구간과 대응하는 상기 최종 수면 상태 벡터의 성분값이 '1'인 후보 음악을 상기 사용자에게 제공할 음악으로서 선정하는 단계를 포함할 수 있다.The step of selecting the lighting and music may include: converting a sound wave signal according to time of each of a plurality of candidate songs to a frequency domain by performing fast Fourier transform (FFT); Filtering and obtaining a sound wave signal corresponding to 20 to 20000 (Hz) corresponding to the audible frequency in the converted frequency domain; dividing the filtered sound wave signal into equal frequency sections corresponding to each of the component values of the final sleep state vector, and integrating the sound wave signal in a frequency domain for each of the divided frequency sections; and determining a frequency section having the largest result value of the integrated sound wave signal, and selecting candidate music in which the component value of the final sleep state vector corresponding to the determined frequency section is '1' as the music to be provided to the user. may include.

상기 순환 신경망 기반의 인공 신경망은, 상기 제1 내지 제3 수면 상태 벡터들 각각의 성분들과 대응하는 입력 노드들로 구성되고, 상기 제1 내지 제3 수면 상태 벡터들 각각의 성분들에 제1 연결강도 행렬을 적용하여 은닉층으로 전달하는 입력층; 상기 입력층으로부터 전달된 출력값을 이용하여 중간 목표 벡터를 생성하고, 상기 중간 목표 벡터에 제2 연결강도 행렬을 적용하여 생성된 점수 벡터를 출력층으로 전달하는 은닉층; 및 상기 점수 벡터에 활성화 함수를 적용하여 상기 점수 벡터에 대응하는 확률을 결정하는 출력층을 포함할 수 있다.The artificial neural network based on the recurrent neural network is composed of input nodes corresponding to components of each of the first to third sleep state vectors, and a first to each component of the first to third sleep state vectors is provided. an input layer that applies a connection strength matrix and transmits it to the hidden layer; a hidden layer that generates an intermediate target vector by using the output value transmitted from the input layer, and transmits the score vector generated by applying a second connection strength matrix to the intermediate target vector to the output layer; and an output layer that determines a probability corresponding to the score vector by applying an activation function to the score vector.

상기와 같은 본 발명에 따른 AI를 이용하여 수면 상태에 따른 조명과 음악을 제공하는 방법 및 장치를 이용할 경우에는 영상 정보에서 확인되는 제1 수면 상태, 움직임 신호에서 확인되는 제2 수면 상태, PPG 신호에서 확인되는 제3 수면 상태를 인공 신경망에 대한 입력 벡터들로 활용하여 목적 벡터를 생성하고, 목적 벡터를 기반으로 인공 신경망을 학습시켜 최종 수면 상태를 결정하기 때문에, 가장 최적의 수면 상태를 정확하게 판단할 수 있다.When using the method and apparatus for providing lighting and music according to the sleep state using AI according to the present invention as described above, the first sleep state identified in the image information, the second sleep state identified in the motion signal, and the PPG signal By using the third sleep state identified in , as input vectors to the artificial neural network, an object vector is generated, and the final sleep state is determined by learning the artificial neural network based on the object vector, so the most optimal sleep state is accurately determined. can do.

또한, 영상 기반의 입력 데이터를 사용하는 CNN을 사용하여 1차적인 제1 수면 상태를 판단할 수 있기 때문에 부정확하고 모호한 영상 정보의 처리를 정형화하여 수면 상태로서 표시할 수 있는 장점이 있다.In addition, since it is possible to determine the primary first sleep state using CNN using image-based input data, there is an advantage in that the processing of inaccurate and ambiguous image information can be standardized and displayed as a sleep state.

도 1은 일 실시예에 따른 AI를 이용하여 수면 상태에 따른 조명과 음악을 제공하는 방법 및 장치를 설명하기 위한 개요도이다.
도 2는 도 1에 따른 서비스 제공 장치의 동작을 개괄적으로 나타낸 개요도이다.
도 3은 수면 상태들과 대응하는 원-핫 벡터와 조도를 결정하는 과정을 설명하기 위한 도면이다.
도 4는 일 실시예에 따른 최종 수면 상태 벡터의 성분값 1의 위치를 기초로 음악을 선정하는 방법을 설명하기 위한 개념도이다.
도 5는 도 2에 따른 합성곱 신경망의 구조를 나타낸 블록도이다.
도 6은 움직임 강도를 기초로 제2 수면 상태를 결정하는 방법을 설명하기 위한 도면이다.
도 7은 PPG 신호를 기초로 제3 수면 상태를 결정하는 방법을 설명하기 위한 도면이다.
도 8은 도 2에 따른 순환 신경망 기반의 인공 신경망의 구조를 나타낸 블록도이다.
도 9는 도 1에 따른 서비스 제공 장치의 기본적인 하드웨어 구성을 나타낸 도면이다.
1 is a schematic diagram for explaining a method and apparatus for providing lighting and music according to a sleep state using AI according to an embodiment.
FIG. 2 is a schematic diagram schematically illustrating an operation of the service providing apparatus according to FIG. 1 .
3 is a diagram for explaining a process of determining a one-hot vector and illuminance corresponding to sleep states.
4 is a conceptual diagram for explaining a method of selecting music based on a position of a component value 1 of a final sleep state vector according to an embodiment.
FIG. 5 is a block diagram illustrating the structure of the convolutional neural network according to FIG. 2 .
6 is a diagram for explaining a method of determining a second sleep state based on a motion intensity.
7 is a diagram for explaining a method of determining a third sleep state based on a PPG signal.
8 is a block diagram illustrating the structure of an artificial neural network based on a recurrent neural network according to FIG. 2 .
9 is a diagram illustrating a basic hardware configuration of the service providing apparatus according to FIG. 1 .

본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세한 설명에 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 각 도면을 설명하면서 유사한 참조부호를 유사한 구성요소에 대해 사용하였다. Since the present invention can have various changes and can have various embodiments, specific embodiments are illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the present invention to specific embodiments, and it should be understood to include all modifications, equivalents and substitutes included in the spirit and scope of the present invention. In describing each figure, like reference numerals have been used for like elements.

제1, 제2, A, B 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다. 및/또는 이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다. Terms such as first, second, A, and B may be used to describe various elements, but the elements should not be limited by the terms. The above terms are used only for the purpose of distinguishing one component from another. For example, without departing from the scope of the present invention, a first component may be referred to as a second component, and similarly, a second component may also be referred to as a first component. and/or includes a combination of a plurality of related listed items or any of a plurality of related listed items.

어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다. When a component is referred to as being “connected” or “connected” to another component, it is understood that the other component may be directly connected or connected to the other component, but other components may exist in between. it should be On the other hand, when it is said that a certain element is "directly connected" or "directly connected" to another element, it should be understood that no other element is present in the middle.

본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terms used in the present application are only used to describe specific embodiments, and are not intended to limit the present invention. The singular expression includes the plural expression unless the context clearly dictates otherwise. In the present application, terms such as “comprise” or “have” are intended to designate that a feature, number, step, operation, component, part, or combination thereof described in the specification exists, but one or more other features It should be understood that this does not preclude the existence or addition of numbers, steps, operations, components, parts, or combinations thereof.

다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가지고 있다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥 상 가지는 의미와 일치하는 의미를 가지는 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Unless defined otherwise, all terms used herein, including technical and scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. Terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with the meaning in the context of the related art, and should not be interpreted in an ideal or excessively formal meaning unless explicitly defined in the present application. does not

이하, 본 발명에 따른 바람직한 실시예를 첨부된 도면을 참조하여 상세하게 설명한다.Hereinafter, preferred embodiments according to the present invention will be described in detail with reference to the accompanying drawings.

도 1은 일 실시예에 따른 AI를 이용하여 수면 상태에 따른 조명과 음악을 제공하는 방법 및 장치를 설명하기 위한 개요도이다.1 is a schematic diagram for explaining a method and apparatus for providing lighting and music according to a sleep state using AI according to an embodiment.

도 1을 참조하면, 본 발명의 일 실시예에 따른 AI를 이용하여 수면 상태에 따른 조명과 음악을 제공하는 장치(100, 이하에서 서비스 제공 장치로 약칭될 수 있음)는, 사용자의 신체에 착용되어 사용자의 생체 정보를 측정하는 웨어러블 디바이스(200)와 연동하여 동작할 수 있다.Referring to FIG. 1 , an apparatus 100 (which may be abbreviated as a service providing apparatus hereinafter) that provides lighting and music according to a sleep state using AI according to an embodiment of the present invention is worn on a user's body. It can operate in conjunction with the wearable device 200 that measures the user's biometric information.

서비스 제공 장치(100)는, 사용자의 영상 정보와 생체 정보를 기반으로 사용자의 최종 수면 상태를 결정하고, 결정된 최종 수면 상태에 따라 조명과 음악을 사용자에게 제공할 수 있다.The service providing apparatus 100 may determine the final sleep state of the user based on the user's image information and biometric information, and provide lighting and music to the user according to the determined final sleep state.

웨어러블 디바이스(200)는, 스마트 밴드, 스마트 워치, 스마트 의류 등으로서, 사용자의 움직임을 감지하는 움직임 센서 및 사용자의 심박 활동 상태를 감지하는 생체 신호 센서를 포함할 수 있다.The wearable device 200 is a smart band, a smart watch, smart clothing, and the like, and may include a motion sensor detecting a user's motion and a biosignal sensor detecting a user's heartbeat activity state.

움직임 센서는 사용자의 움직임을 감지할 수 있는 지자기 센서, 자이로스코프 센서, 중력 센서 등을 포함할 수 있으나 이에 한정되지 않는다.The motion sensor may include, but is not limited to, a geomagnetic sensor, a gyroscope sensor, a gravity sensor, etc. capable of detecting a user's motion.

생체 신호 센서는 광학적 특성을 통해 사용자 몸의 혈류량을 측정하여 심박 활동 상태를 추정하는 광용적맥파(PPG, photo-plethysmograph) 센서일 수 있으나, 이에 한정되지 않는다.The biosignal sensor may be a photo-plethysmograph (PPG) sensor for estimating a heartbeat activity state by measuring blood flow in the user's body through optical characteristics, but is not limited thereto.

웨어러블 디바이스(200)는, 움직임 센서를 통해 감지된 사용자의 움직임을 지시하는 움직임 신호 및 생체 신호 센서를 통해 감지된 사용자의 PPG 신호를 포함하는 생체 정보를 측정하고, 측정된 생체 정보를 주기적으로 또는 서비스 제공 장치(100)의 요청에 따른 응답으로 서비스 제공 장치(100)로 전송할 수 있다.The wearable device 200 measures biometric information including a motion signal indicating a user's motion detected through a motion sensor and a PPG signal of a user detected through a biosignal sensor, and periodically or In response to the request of the service providing apparatus 100 , the data may be transmitted to the service providing apparatus 100 .

서비스 제공 장치(100)는, 외부의 카메라 또는 내부에 일체형으로 설치된 카메라를 통해 사용자의 얼굴을 포함하는 영상 정보를 획득할 수 있다. 서비스 제공 장치(100)는, 획득된 영상 정보에 기초하여 사용자의 제1 수면 상태를 결정할 수 있다. 구체적으로 서비스 제공 장치(100)는, 미리 지도학습(supervised learning)된 합성곱 신경망(Convolutional Neural Network, 10)에 사용자의 얼굴에 대응하는 얼굴 이미지를 입력하고, 합성곱 신경망의 출력으로 제1 수면 상태를 결정할 수 있다. 이를 위해, 서비스 제공 장치(100)는 미리 합성곱 신경망(10)을 지도학습시킬 수 있다.The service providing apparatus 100 may acquire image information including the user's face through an external camera or a camera integrally installed therein. The service providing apparatus 100 may determine the user's first sleep state based on the obtained image information. Specifically, the service providing apparatus 100 inputs a face image corresponding to the user's face to a pre-supervised convolutional neural network 10 , and outputs the first sleep as an output of the convolutional neural network. state can be determined. To this end, the service providing apparatus 100 may supervise the convolutional neural network 10 in advance.

또한, 서비스 제공 장치(100)는, 생체 정보에 포함된 움직임 신호와 PPG 신호에 기초하여 제2 내지 제3 수면 상태를 결정할 수 있다.Also, the service providing apparatus 100 may determine the second to third sleep states based on the motion signal and the PPG signal included in the biometric information.

또한, 서비스 제공 장치(100)는, 제1 내지 제3 수면 상태를 인공 신경망(20)을 이용하여 분석함으로써 사용자의 최종 수면 상태를 결정할 수 있다. 즉, 제1 내지 제3 수면 상태는 사용자의 수면 상태를 결정한 초기 데이터로 볼 수 있고, 최종 수면 상태는 확정적으로 결정된 사용자의 수면 상태일 수 있다.Also, the service providing apparatus 100 may determine the user's final sleep state by analyzing the first to third sleep states using the artificial neural network 20 . That is, the first to third sleep states may be viewed as initial data for determining the user's sleep state, and the final sleep state may be the user's definitively determined sleep state.

이처럼, 서비스 제공 장치(100)는, 사용자의 수면 상태를 결정할 때 불명확하거나 모호한 결과를 초래할 수 있는 각종 기초 자료들을 통해 분석한 제1 내지 제3 수면 상태를 1차적인 지표로서 활용하고, 이러한 제1 내지 제3 수면 상태를 인공 신경망(20)을 통해 분석함으로써 최종적으로 사용자의 현재 수면 상태를 가장 잘 나타내는 최종 수면 상태를 결정한다. 따라서, 수면 상태를 결정하는 정확도가 크게 향상될 수 있다.As such, the service providing apparatus 100 utilizes, as a primary indicator, the first to third sleep states analyzed through various basic data that may cause unclear or ambiguous results when determining the user's sleep state, and By analyzing the first to third sleep states through the artificial neural network 20, a final sleep state that best represents the user's current sleep state is finally determined. Accordingly, the accuracy of determining the sleep state can be greatly improved.

또한, 단지 움직임 신호나 PPG 신호 자체를 인공 신경망으로 학습하는 경우에는 지도학습에 사용되는 학습 데이터를 선정하는 어려움과 학습 데이터가 바뀜에 따라 수면 상태를 결정하는 결과가 크게 달라지는 문제점이 있다. 따라서, 본 발명에서는 움직임 신호와 PPG 신호를 기반으로 제2 내지 제3 수면 상태를 1차적인 지표로서 결정한 후, 이렇게 결정된 제2 내지 제3 수면 상태들 제1 수면 상태와 결합하여 인공 신경망(20)에 입력하기 때문에 정확도가 훨씬 높고 구현 용이성이 향상될 수 있는 장점을 가진다.In addition, when only a motion signal or a PPG signal itself is learned by an artificial neural network, there is a problem in that it is difficult to select the learning data used for supervised learning, and the result of determining the sleep state varies greatly as the learning data changes. Therefore, in the present invention, after determining the second to third sleep states as primary indicators based on the motion signal and the PPG signal, the determined second to third sleep states are combined with the first sleep state to form an artificial neural network (20). ), so the accuracy is much higher and the ease of implementation can be improved.

도 2는 도 1에 따른 서비스 제공 장치의 동작을 개괄적으로 나타낸 개요도이다.FIG. 2 is a schematic diagram schematically illustrating an operation of the service providing apparatus according to FIG. 1 .

도 2를 참조하면, 서비스 제공 장치(100)는, 사용자의 얼굴에 대응하는 얼굴 이미지를 미리 지도 학습된 합성곱 신경망(10)에 입력할 수 있다. 이때, 얼굴 이미지는 사용자의 정면 또는 측면 얼굴 이미지를 사용할 수 있다.Referring to FIG. 2 , the service providing apparatus 100 may input a face image corresponding to the user's face into the pre-trained convolutional neural network 10 . In this case, as the face image, a front or side face image of the user may be used.

서비스 제공 장치(100)는 사용자의 뇌파와 안구 운동을 측정하여 정확하게 측정한 사용자의 수면 상태를 결과값으로 하고, 이러한 수면 상태에 따른 사용자의 얼굴 이미지를 입력값으로 하는 훈련 데이터를 미리 입력받고, 입력받은 훈련 데이터를 이용하여 합성곱 신경망(10)을 미리 지도학습시킬 수 있다. The service providing apparatus 100 measures the user's brain waves and eye movements and uses the user's sleep state accurately measured as a result value, and receives training data using the user's face image according to the sleep state as an input value in advance, The convolutional neural network 10 may be supervised in advance by using the received training data.

서비스 제공 장치(100)는, 합성곱 신경망(10)의 출력으로 사용자의 얼굴 이미지를 기반으로 판단한 사용자의 수면 상태를 나타내는 제1 수면 상태를 결정할 수 있다. 서비스 제공 장치(100)는, 결정된 제1 수면 상태를 제1 수면 상태 벡터(Vx)로 변환할 수 있다. The service providing apparatus 100 may determine the first sleep state indicating the user's sleep state determined based on the user's face image as an output of the convolutional neural network 10 . The service providing apparatus 100 may convert the determined first sleep state into a first sleep state vector Vx.

한편, 서비스 제공 장치(100)는, 생체 정보에 포함된 움직임 신호에 기초하여 제2 수면 상태를 결정하고, 결정된 제2 수면 상태를 제2 수면 상태 벡터(Vx)로 변환할 수 있다.Meanwhile, the service providing apparatus 100 may determine a second sleep state based on a motion signal included in the biometric information, and convert the determined second sleep state into a second sleep state vector Vx.

또한, 서비스 제공 장치(100)는, 생체 정보에 포함된 PPG 신호에 기초하여 제3 수면 상태를 결정하고, 결정된 제3 수면 상태를 제3 수면 상태 벡터(Vz)로 변환할 수 있다.Also, the service providing apparatus 100 may determine a third sleep state based on the PPG signal included in the biometric information, and convert the determined third sleep state into a third sleep state vector Vz.

여기서, 제1 내지 제3 수면 상태 벡터(Vx, Vy, Vz)는 미리 설정된 수면 상태들과 1:1로 대응하도록 미리 설정된 원-핫 벡터일 수 있다. 원-핫 벡터는 하나의 성분값이 '1'이고 나머지 성분값들은 모두 '0'인 벡터로서 수면 상태들 각각을 고유하게 대표하는 벡터로서 사용될 수 있다. 이를 위해, 서비스 제공 장치(100)는, 미리 설정된 수면 상태들 각각과 1:1로 대응하는 원-핫 벡터를 지시하는 제1 매칭 테이블을 미리 저장할 수 있다. 서비스 제공 장치(100)는 이러한 제1 매칭 테이블을 참조하여 수면 상태들 각각과 대응하는 원-핫 벡터를 결정하고, 결정된 원-핫 벡터를 제1 내지 제3 수면 상태(Vx, Vy, Vz)들 중 하나로 결정할 수 있다.Here, the first to third sleep state vectors Vx, Vy, and Vz may be preset one-hot vectors to correspond 1:1 with preset sleep states. The one-hot vector is a vector in which one component value is '1' and all other component values are '0', and may be used as a vector uniquely representing each of the sleep states. To this end, the service providing apparatus 100 may store in advance a first matching table indicating a one-hot vector corresponding to each of the preset sleep states 1:1. The service providing apparatus 100 determines a one-hot vector corresponding to each of the sleep states by referring to the first matching table, and sets the determined one-hot vector to the first to third sleep states (Vx, Vy, Vz) You can decide on one of these.

한편, 합성곱 신경망(10)은, 이미지를 입력 데이터로 수신하고, 수신된 이미지가 미리 설정된 클래스(classes)들 중 어느 클래스에 해당하는 지를 나타내는 확률을 결정하고, 결정된 확률이 가장 높은 클래스를 출력값으로 제시할 수 있다. 여기서 미리 설정된 클래스들이란 미리 설정된 다수의 수면 상태들을 의미할 수 있다.On the other hand, the convolutional neural network 10 receives an image as input data, determines a probability indicating which class the received image corresponds to among preset classes, and sets the class having the highest determined probability as an output value can be presented as Here, the preset classes may mean a plurality of preset sleep states.

서비스 제공 장치(100)는, 제1 내지 제3 수면 상태들 각각에 대응하는 제1 내지 제3 수면 상태 벡터들(Vx, Vy, Vz)을 인공 신경망(20)에 입력하고, 인공 신경망(20)의 출력으로 최종 수면 상태에 대응하는 최종 수면 상태 벡터(Vf)를 획득할 수 있다. 여기서 최종 수면 상태 벡터(Vf)는 앞선 제1 매칭 테이블을 참조하여 최종 수면 상태로 변환될 수 있다. 최종 수면 상태 벡터(Vf)도 미리 설정된 수면 상태들과 1:1로 대응하도록 미리 설정된 원-핫 벡터일 수 있다.The service providing apparatus 100 inputs the first to third sleep state vectors Vx, Vy, and Vz corresponding to each of the first to third sleep states to the artificial neural network 20 , and the artificial neural network 20 ), a final sleep state vector Vf corresponding to the final sleep state may be obtained. Here, the final sleep state vector Vf may be converted into the final sleep state with reference to the first matching table. The final sleep state vector Vf may also be a preset one-hot vector to correspond 1:1 with preset sleep states.

여기서 인공 신경망(20)은, 순환 신경망(Recurrent neural network, RNN) 또는 LSTM (Long Shot Term Memory) 신경망일 수 있다. 순환 신경망(RNN)은 은닉층의 은닉 노드들 사이에 순환 엣지가 존재한다. 따라서, 순환 신경망(RNN)은 사용자의 시간의 경과에 따른 제1 내지 제3 수면 상태들의 변화를 고려하여 최종 수면 상태를 결정하는 데 용이한 장점이 있다.Here, the artificial neural network 20 may be a recurrent neural network (RNN) or a Long Shot Term Memory (LSTM) neural network. In a recurrent neural network (RNN), there is a recursive edge between the hidden nodes of the hidden layer. Accordingly, the recurrent neural network (RNN) has an advantage in that it is easy to determine the final sleep state in consideration of changes in the first to third sleep states over time of the user.

인공 신경망(20)을 학습시키기 위하여 먼저 서비스 제공 장치(100)는, 사용자의 영상 정보와 생체 정보를 이용하여 결정된 제1 내지 제3 수면 상태를 각각 제1 내지 제3 수면 상태 벡터들로 변환하여 인공 신경망(20)에 입력한다. 이때, 제1 내지 제3 수면 상태를 결정한 시점에서의 사용자의 실제 수면 상태를 뇌파 등을 이용해 정확하게 측정한다. 서비스 제공 장치(100)는, 이렇게 측정된 실제 수면 상태를 제1 매칭 테이블을 참조해 학습용 원-핫 벡터로 변환하고, 변환된 학습용 원-핫 벡터를 인공 신경망(20)에서의 목표 원-핫 벡터로서 사용한다. 이때, 제1 내지 제3 수면 상태는 시간 경과에 따라 지속적으로 결정된 후, 제1 내지 제3 수면 상태 벡터들이 시퀀스(sequence) 형태로서 인공 신경망(20)에 입력될 수 있다. 따라서, 인공 신경망(20)은 입력된 제1 내지 제3 수면 상태 벡터들을 입력받고 출력층을 통해 출력되는 출력값과 앞선 뇌파를 이용하여 정확하게 측정된 실제 수면 상태와 대응하는 학습용 원-핫 벡터 사이의 차이가 최소화되도록 지도학습된다.In order to learn the artificial neural network 20, first, the service providing apparatus 100 converts the first to third sleep states determined using the user's image information and biometric information into first to third sleep state vectors, respectively. input to the artificial neural network 20 . In this case, the actual sleep state of the user at the time when the first to third sleep states are determined is accurately measured using brain waves or the like. The service providing apparatus 100 converts the measured actual sleep state into a one-hot vector for learning by referring to the first matching table, and converts the converted one-hot vector for learning into a target one-hot in the artificial neural network 20 . used as a vector. In this case, after the first to third sleep states are continuously determined over time, the first to third sleep state vectors may be input to the artificial neural network 20 in the form of a sequence. Accordingly, the artificial neural network 20 receives the input first to third sleep state vectors, and the difference between the output value output through the output layer and the actual sleep state accurately measured using the preceding EEG and the corresponding one-hot vector for learning. supervised learning is minimized.

도 3은 수면 상태들과 대응하는 원-핫 벡터와 조도를 결정하는 과정을 설명하기 위한 도면이다.3 is a diagram for explaining a process of determining a one-hot vector and illuminance corresponding to sleep states.

구체적으로 도 3을 참조하면, 다수의 수면 상태들은 n1개의 단계들로 구분되는 각성 상태, n2개의 단계들로 구분되는 비렘(non-REM) 수면 상태, n3 개의 단계들로 구분되는 렘(REM) 수면 상태를 포함할 수 있다. 여기서 렘(REM) 수면 상태는 수면 단계들 중에서 안구가 급속도로 움직이는 것이 관찰되는 단계의 수면에 해당하며, 보통 꿈을 꾸는 수면 상태를 의미하고, 비렘 수면 상태는 안구의 움직임이 관찰되지 않는 수면 단계일 수 있으며, 각성 상태는 수면 상태가 아닌 단계일 수 있다.Specifically, referring to FIG. 3 , the plurality of sleep states include an arousal state divided into n1 stages, a non-REM sleep state divided into n2 stages, and REM divided into n3 stages. may include sleep states. Here, the REM (REM) sleep state corresponds to a sleep in which rapid eye movements are observed among sleep stages, and refers to a sleep state in which the eyes are usually dreaming, and the non-REM sleep state is a sleep stage in which eye movements are not observed. may be, and the arousal state may be a stage other than a sleep state.

렘 수면은 일반적으로 뇌파 분석에서 빠르고 낮은 전압의 베타파가 나타나는 것을 통해 확인될 수 있으나, 본 발명에서는 움직임 신호와 영상 정보, PPG 신호 등을 기반으로 최종 수면 상태로서 렘 수면 상태를 결정할 수 있다.REM sleep can be generally confirmed through the appearance of fast and low-voltage beta waves in EEG analysis, but in the present invention, it is possible to determine the REM sleep state as the final sleep state based on motion signals, image information, PPG signals, and the like.

본 발명에서 n1, n2, n3는 모두 1 보다 큰 자연수일 수 있으며, n2 > n3> n1 의 크기 관계를 가질 수 있다. 즉, 비렘 수면 상태를 가장 상세한 n3개의 단계들로 분류하고, 각성 상태는 가장 적은 n1개의 단계들로 분류한다.In the present invention, all of n1, n2, and n3 may be natural numbers greater than 1, and may have a size relationship of n2 > n3 > n1. That is, the non-REM sleep state is classified into the most detailed n3 stages, and the arousal state is classified into the smallest n1 stages.

한편, 다수의 수면 상태들 각각은 고유의 원-핫 벡터와 대응하도록 미리 설정된다. 예를 들어, 원-핫 벡터에서 처음 n1개의 성분값들 각각은 각성 상태의 단계들과 대응할 때 '1'을 갖는 성분들일 수 있다. 예를 들어, 각성 상태가 2개의 단계로 구분되고, 원-핫 벡터가 그중 하나의 각성 상태와 대응한다면, 원-핫 벡터는 첫번째 성분값이 '1'이고 나머지 성분값들이 '0'인 벡터이거나, 첫번째 성분값이 '0'이고 나머지 성분값들이 '1'인 벡터일 수 있다.Meanwhile, each of the plurality of sleep states is preset to correspond to a unique one-hot vector. For example, each of the first n1 component values in the one-hot vector may be a component having a '1' when corresponding to the stages of the awakening state. For example, if an arousal state is divided into two stages, and a one-hot vector corresponds to one of the arousal states, the one-hot vector is a vector in which the first component value is '1' and the remaining component values are '0'. Or, it may be a vector in which the first component value is '0' and the remaining component values are '1'.

또한, 원-핫 벡터에서 n1+1번째부터 n1+n2번째에 대응하는 성분값들 각각은 비렘 수면 상태의 단계들과 대응할 때 '1'을 갖는 성분들일 수 있다. 또한, 원-핫 벡터에서 n1+n2+1번째부터 n1+n2+n3번째에 대응하는 성분값들 각각은 렘 수면 상태의 단계들과 대응할 때 '1'을 갖는 성분들일 수 있다.Also, each of the component values corresponding to the n1+1-th to the n1+n2-th in the one-hot vector may be a component having a '1' when it corresponds to the stages of the non-REM sleep state. In addition, each of the component values corresponding to the n1+n2+1th to the n1+n2+n3th in the one-hot vector may be a component having a '1' when it corresponds to the stages of the REM sleep state.

즉, 본 발명에서 수면 상태들 각각과 대응하는 원-핫 벡터는 성분값 '1'이 순서상 앞에 위치할수록 각성 상태에 가깝고 '1'이 순서상 뒤에 위치할수록 렘 수면에 가깝도록 미리 설정된다. 따라서, 원-핫 벡터 자체가 수면 상태의 깊이를 그대로 대표할 수 있으므로, 이러한 원-핫 벡터를 사용하여 인공 신경망(20)을 학습시킬 경우 수면 상태의 단계들 사이의 거리 관계까지 반영될 수 있는 장점이 있다.That is, in the present invention, the one-hot vector corresponding to each of the sleep states is preset to be closer to the awakening state as the component value '1' is positioned earlier in the sequence, and closer to the REM sleep as the '1' is positioned later in the sequence. Therefore, since the one-hot vector itself can represent the depth of the sleep state as it is, when the artificial neural network 20 is trained using this one-hot vector, even the distance relationship between the sleep state steps can be reflected. There are advantages.

이처럼 n1+n2+n3개의 수면 상태들 각각은 고유의 원-핫 벡터와 대응되도록 미리 설정되며, 이러한 대응 관계는 제1 매칭 테이블로서 서비스 제공 서버(100)에 저장된다. 따라서, 제1 내지 제3 수면 상태들은 제1 매칭 테이블을 참조하여 획득 가능한 원-핫 벡터로 변환될 수 있다.As such, each of the n1+n2+n3 sleep states is preset to correspond to a unique one-hot vector, and this correspondence is stored in the service providing server 100 as a first matching table. Accordingly, the first to third sleep states may be converted into one-hot vectors obtainable by referring to the first matching table.

한편, 도 2를 참조하여 설명한 것과 같이, 최종 수면 상태는 최종 수면 상태 벡터(Vf)의 형태로서 인공 신경망(20)에서 출력된다. Meanwhile, as described with reference to FIG. 2 , the final sleep state is output from the artificial neural network 20 in the form of a final sleep state vector Vf.

서비스 제공 장치(100)는, 최종 수면 상태 벡터(Vf)에서 성분값 '1'의 위치를 기준으로 조도의 단계를 결정할 수 있다. 예를 들어, 성분값 '1'이 최종 수면 상태 벡터(Vf)의 앞에 위치할수록 각성 상태에 가까운 것으로 보고 조도의 단계를 높게(밝게) 결정하며, 성분값 '1'이 최종 수면 상태 벡터(Vf)의 뒤에 위치할수록 렘 수면 상태에 가까운 것으로 보고 조도의 단계를 낮게(어둡게) 결정한다. The service providing apparatus 100 may determine the level of illumination based on the position of the component value '1' in the final sleep state vector Vf. For example, the closer the component value '1' is located in front of the final sleep state vector (Vf), the closer to the awakening state, the higher (brighter) the illuminance level is determined, and the component value '1' is the final sleep state vector (Vf) ), it is regarded as closer to the state of REM sleep and the level of illumination is determined to be lower (darker).

도 4는 일 실시예에 따른 최종 수면 상태 벡터의 성분값 1의 위치를 기초로 음악을 선정하는 방법을 설명하기 위한 개념도이다.4 is a conceptual diagram for explaining a method of selecting music based on a position of a component value 1 of a final sleep state vector according to an embodiment.

일 실시예에서, 서비스 제공 장치(100)는, 최종 수면 상태 벡터(Vf)에서 성분값 '1'의 위치를 기준으로 미리 저장된 다수의 후보 음악들 중 하나를 선정할 수 있다.In an embodiment, the service providing apparatus 100 may select one of a plurality of pre-stored candidate music based on the position of the component value '1' in the final sleep state vector Vf.

예를 들어, 서비스 제공 장치(100)는 다수의 후보 음악들 각각의 시간에 따른 음파 신호를 주파수 변환(FFT, fast fourier transform)하여 주파수 영역으로 변환하고, 변환된 주파수 영역에서 가청 주파수에 해당하는 20 내지 20000 (Hz)에 해당하는 음파 신호를 필터링하여 획득할 수 있다.For example, the service providing apparatus 100 converts a sound wave signal according to time of each of a plurality of candidate songs to a frequency domain by performing fast Fourier transform (FFT), and in the converted frequency domain, corresponding to an audible frequency. It can be obtained by filtering the sound wave signal corresponding to 20 to 20000 (Hz).

서비스 제공 장치(100)는 필터링된 음파 신호를 최종 수면 상태 벡터의 성분값들 각각과 대응하는 균등한 주파수 구간들(n1+n2+n3개의 구간들)로 분할하고, 분할된 구간들 각각에 대하여 음파 신호를 주파수 영역에서 적분할 수 있다. 여기서 적분된 음파 신호의 결과값이 가장 큰 주파수 구간을 결정할 수 있다.The service providing apparatus 100 divides the filtered sound wave signal into equal frequency sections (n1 + n2 + n3 sections) corresponding to each of the component values of the final sleep state vector, and for each of the divided sections A sound wave signal can be integrated in the frequency domain. Here, a frequency section having the largest result value of the integrated sound wave signal may be determined.

서비스 제공 장치(100)는, 결정된 주파수 구간과 대응하는 최종 수면 상태 벡터(Vf)의 성분값이 '1'인 경우 해당하는 후보 음악을 사용자에게 제공할 음악으로 결정할 수 있다. 이때, 서비스 제공 장치(100)는, 주파수 구간들 각각과 대응하는 성분값들을 미리 설정하여 제2 매칭 테이블로서 저장할 수 있다. When the component value of the final sleep state vector Vf corresponding to the determined frequency section is '1', the service providing apparatus 100 may determine the corresponding candidate music as the music to be provided to the user. In this case, the service providing apparatus 100 may preset component values corresponding to each of the frequency sections and store them as a second matching table.

예를 들어, 주파수 구간들 중에서 20 Hz에 가장 가까운 구간은 최종 수면 상태 벡터(Vf)의 마지막 성분값에 대응하고, 20 kHz에 가장 가까운 구간은 최종 수면 상태 벡터(Vf)의 첫번째 성분값에 대응할 수 있다. 즉, 서비스 제공 장치(100)는, 최종 수면 상태 벡터(Vf)의 첫번째 성분값부터 마지막 성분값을 주파수가 작아지는 방향으로 주파수 구간들 각각에 대응시켜 제2 매칭 테이블을 생성할 수 있다.For example, among the frequency sections, the section closest to 20 Hz corresponds to the last component value of the final sleep state vector (Vf), and the section closest to 20 kHz corresponds to the first component value of the final sleep state vector (Vf). can That is, the service providing apparatus 100 may generate the second matching table by matching the first to last component values of the final sleep state vector Vf to each of the frequency sections in the direction in which the frequency decreases.

이와 같이 제2 매칭 테이블을 구성할 경우, 성분값 '1'이 최종 수면 상태 벡터(Vf)의 뒤에 올수록 깊은 수면 상태에 해당하고, 이러한 최종 수면 상태 벡터(Vf)에서 서비스 제공 장치(100)는, 주파수의 주 대역이 저주파수에 해당하는 후보 음악을 사용자에게 제공할 음악으로 선정한다. 따라서, 수면 상태가 깊을수록 주파수의 주대역이 낮은 음악을 사용자에게 제공하고, 수면 상태가 낮거나 각성 상태일수록 주파수의 주대역이 높은 음악을 사용자에게 제공할 수 있다.When configuring the second matching table in this way, as the component value '1' comes after the final sleep state vector Vf, it corresponds to a deeper sleep state, and in this final sleep state vector Vf, the service providing apparatus 100 , the candidate music corresponding to the low frequency in the main band of the frequency is selected as the music to be provided to the user. Accordingly, as the sleep state is deep, music having a lower main band frequency may be provided to the user, and music having a higher main frequency frequency band may be provided to the user as the sleep state is lower or awakened.

도 5는 도 2에 따른 합성곱 신경망의 구조를 나타낸 블록도이다.FIG. 5 is a block diagram illustrating the structure of the convolutional neural network according to FIG. 2 .

도 5를 참조하면, 본 발명의 일 실시예에 따른 합성곱 신경망(convolutional neural network, CNN, 10)은, 미리 설정된 크기의 이미지(사용자의 얼굴 이미지)를 입력 이미지로 입력받아, 특징 맵을 추출하는 컨볼루셔널 계층(11), 추출된 특징에 대해 활성화 함수를 이용해 출력을 활성화할지 여부를 결정하는 활성화 계층(12), 활성화 계층(12)에 따른 출력에 대해 샘플링을 수행하는 풀링 계층(13), 클래스에 따른 분류를 수행하는 완전 연결 계층(14), 완전 연결 계층(14)에 따른 출력을 최종적으로 출력하는 출력 계층(15)을 포함할 수 있다.Referring to FIG. 5 , a convolutional neural network (CNN) 10 according to an embodiment of the present invention receives an image (user's face image) of a preset size as an input image, and extracts a feature map A convolutional layer 11 that performs a function, an activation layer 12 that determines whether to activate an output using an activation function on the extracted features, and a pooling layer 13 that performs sampling on the output according to the activation layer 12 ), a fully connected layer 14 that performs classification according to a class, and an output layer 15 that finally outputs an output according to the fully connected layer 14 .

컨볼루셔널 계층(11)은 입력 이미지와 필터를 서로 합성곱함으로써 입력 데이터의 특징을 추출하는 계층일 수 있다. 여기서 필터는 입력 영상의 특징적 부분을 검출하는 함수로서, 일반적으로 행렬로 표현된다. 컨볼루셔널 계층(11)에 의해 추출된 특징은 특징 맵(feature map)으로 지칭될 수도 있다. 또한, 합성곱을 수행하는 간격 값을 스트라이드(stride)라고 지칭할 수 있는데, 스트라이드 값에 따라 다른 크기의 특징 맵이 추출될 수 있다. 이때, 특징 맵은 필터의 크기가 입력 영상보다 작으면, 기존의 입력 영상보다 더 작은 크기를 갖게 되는데, 여러 단계를 거쳐 특징이 소실되는 것을 방지하기 위하여 패딩 과정이 추가로 수행될 수 있다. 이때, 패딩 과정은 생성된 특징 맵의 외곽에 미리 설정된 값(예를 들면 0)을 추가함으로써 입력 영상의 크기와 특징 맵의 크기를 동일하게 유지하는 과정일 수 있다. The convolutional layer 11 may be a layer for extracting features of the input data by convolutionally multiplying the input image and the filter. Here, the filter is a function that detects a characteristic part of the input image, and is generally expressed as a matrix. The feature extracted by the convolutional layer 11 may be referred to as a feature map. Also, an interval value for which convolution is performed may be referred to as a stride, and a feature map having a different size may be extracted according to the stride value. In this case, when the size of the filter is smaller than that of the input image, the feature map has a size smaller than that of the existing input image, and a padding process may be additionally performed to prevent the feature from being lost through several steps. In this case, the padding process may be a process of maintaining the same size of the input image and the size of the feature map by adding a preset value (eg, 0) to the outside of the generated feature map.

한편, 합성곱 신경망(10)은 이미지 처리에 기반하여 필터를 입력 이미지에 합성곱하기 때문에 많은 연산 부하를 갖는다. 이러한 소형의 무드등이나 스피커에서 조명이나 음악을 사용자에게 제공하려면, 연산 부하를 최소화하여 가장 고속으로 합성곱 신경망(10)을 구동할 필요가 있다. 이를 위해 본 발명의 일 실시예에 따른 컨볼루셔널 계층(11)은, 1×1 컨볼루셔널 계층과 3×3 컨볼루셔널 계층을 순차로 반복 연결된 구조를 사용함으로써 연산 부하를 최소화하여 신속한 연산이 가능할 수 있다.On the other hand, the convolutional neural network 10 has a lot of computational load because it convolutions a filter to an input image based on image processing. In order to provide lighting or music to a user from such a small mood lamp or speaker, it is necessary to drive the convolutional neural network 10 at the highest speed by minimizing the computational load. To this end, the convolutional layer 11 according to an embodiment of the present invention uses a structure in which a 1×1 convolutional layer and a 3×3 convolutional layer are sequentially and repeatedly connected, thereby minimizing the computational load and performing fast calculation. This may be possible.

활성화 계층(12)는 어떠한 값(또는 행렬)으로 추출된 특징을 활성화 함수에 따라 비선형 값으로 바꾸어 활성화 여부를 결정하는 계층으로, 활성화 함수로는 시그모이드(sigmoid) 함수, ReLU 함수, 소프트맥스(softmax) 함수 등이 사용될 수 있다. 예를 들어, 소프트맥스 함수는 입력된 값을 0~1사이의 값으로 모두 정규화하며 출력 값들의 총합은 항상 1이 되는 특성을 가진 함수일 수 있다.The activation layer 12 is a layer that determines whether to activate by changing a feature extracted with a certain value (or matrix) to a non-linear value according to the activation function. The activation functions include a sigmoid function, a ReLU function, and a softmax. (softmax) function or the like may be used. For example, the softmax function may be a function having a characteristic that all input values are normalized to values between 0 and 1 and the sum of output values is always 1.

풀링 계층(130)은 활성화 계층(12)의 출력에 대하여 서브 샘플링(subsampling) 또는 풀링(pooling)을 수행하여 특징맵을 대표하는 특징을 선정하는 계층으로서, 특징맵의 일정 영역에 대하여 가장 큰 값을 추출하는 맥스 풀링(max pooling), 평균값을 추출하는 애버리지 풀링(average pooling) 등이 수행될 수 있다. 이때, 풀링 계층은 활성화 함수 이후에 반드시 수행되는 것이 아니라 선택적으로 수행될 수 있다.The pooling layer 130 performs subsampling or pooling on the output of the activation layer 12 to select a feature representing the feature map, and has the largest value for a certain region of the feature map. Max pooling for extracting , average pooling for extracting an average value, etc. may be performed. In this case, the pooling layer is not necessarily performed after the activation function, but may be selectively performed.

또한, 여기서 합성곱 신경망(10)은, 컨볼루셔널 계층(11), 활성화 계층(12), 풀링 계층(13)의 연결 구조가 복수개 포함될 수도 있다.Also, here, the convolutional neural network 10 may include a plurality of connection structures of the convolutional layer 11 , the activation layer 12 , and the pooling layer 13 .

도 6은 움직임 강도를 기초로 제2 수면 상태를 결정하는 방법을 설명하기 위한 도면이다.6 is a diagram for explaining a method of determining a second sleep state based on a motion intensity.

서비스 제공 서버(100)는, 생체 정보에 포함된 움직임 신호를 기초로 시간에 따른 움직임 거리를 산출하고, 산출된 움직임 거리에 기초하여 제2 수면 상태를 결정할 수 있다.The service providing server 100 may calculate a movement distance according to time based on the movement signal included in the biometric information, and determine the second sleep state based on the calculated movement distance.

여기서 움직임 거리(MV)는 움직임 신호를 기초로 사용자가 움직인 거리를 산출한 값으로서 움직임 신호가 사용자의 x, y, z 방향의 이동거리를 포함할 경우 다음의 수학식 1과 같이 산출할 수 있다.Here, the movement distance (MV) is a value obtained by calculating the distance moved by the user based on the movement signal. When the movement signal includes the user's movement distance in the x, y, and z directions, it can be calculated as in Equation 1 below. have.

Figure 112021018422734-pat00001
Figure 112021018422734-pat00001

상기 수학식 1을 참조하면, 본 발명에서 움직임 거리(MV)는 사용자(또는 사용자가 착용한 웨어러블 기기)가 이동한 거리를 의미할 수 있으며, m 단위일 수 있으나 mm 단위일 수도 있다.Referring to Equation 1, in the present invention, the movement distance MV may mean a distance traveled by a user (or a wearable device worn by the user), and may be in units of m, but may also be in units of mm.

서비스 제공 서버(100)는, 수면 상태들 각각과 대응하는 임계 거리(mth)를 넘는 펄스들의 개수(pn), 임계 거리(mth)를 넘는 펄스들 사이의 펄스 시간 간격(itv), 및 임계 거리(mth)를 넘는 펄스들 각각에서 임계 거리(mth)와 대응하는 임계 시간 간격(w)을 산출할 수 있다.The service providing server 100, the number of pulses exceeding the threshold distance (mth) corresponding to each of the sleep states (pn), the pulse time interval (itv) between the pulses exceeding the threshold distance (mth), and the threshold distance In each of the pulses exceeding (mth), a threshold distance (mth) and a corresponding threshold time interval (w) may be calculated.

여기서 임계 거리(mth)는 수면 상태들 각각에 대하여 개별적으로 설정되며, 예를 들어 수면 상태가 각성 상태에서 렘 수면 상태로 이동할수록 임계 거리(mth)는 작게 설정될 수 있다. Here, the threshold distance mth is individually set for each of the sleep states. For example, as the sleep state moves from the waking state to the REM sleep state, the threshold distance mth may be set smaller.

구체적으로, 서비스 제공 서버(100)는, 인터벌 간격(itv), 임계 거리(mth)를 넘는 펄스들의 개수(pn), 및 임계 시간 간격(w)에 기초하여 다음의 수학식 2에 따른 움직임 상태도를 산출하고, 산출된 움직임 상태도가 수면 상태들 각각에 대하여 고유하게 결정된 임계범위 내에 있는지 판단하여 제2 수면 상태를 결정할 수 있다.Specifically, the service providing server 100, based on the interval interval (itv), the number of pulses (pn) exceeding the threshold distance (mth), and the threshold time interval (w), the motion state diagram according to the following equation (2) , and determining whether the calculated motion state diagram is within a threshold range uniquely determined for each of the sleep states may determine the second sleep state.

여기서, 움직임 상태도는 다음의 수학식 2와 같이 결정될 수 있다.Here, the motion state diagram may be determined as in Equation 2 below.

Figure 112021018422734-pat00002
Figure 112021018422734-pat00002

수학식 2를 참조하면, 움직임 상태도는 펄스 시간 간격(itv[i]는 임의의 i번째 펄스 시간 간격을 지칭)의 총합에서 임계 시간 간격(w[j]는 임의의 j번째 임계 시간 간격을 지칭)의 총합을 뺀 값으로서 시간(min)의 단위를 가질 수 있다.Referring to Equation 2, in the motion state diagram, a threshold time interval (w[j] refers to an arbitrary j-th critical time interval) in the sum of the pulse time intervals (itv[i] refers to an arbitrary i-th pulse time interval) ), which is a value obtained by subtracting the sum of the time (min).

도 7은 PPG 신호를 기초로 제3 수면 상태를 결정하는 방법을 설명하기 위한 도면이다.7 is a diagram for explaining a method of determining a third sleep state based on a PPG signal.

PPG(photoplethysmography) 신호는 빛을 이용하여 맥파를 측정하는 데 활용되는 신호로서, 광용적맥파 신호로 불린다. A photoplethysmography (PPG) signal is a signal used to measure a pulse wave using light, and is called a photoplethysmography signal.

매 분 간격으로 PPG 센서를 이용하여 사용자의 PPG 신호를 측정(샘플링)하여 심박수를 측정한 결과는 도 7과 같이 도시될 수 있다. 이때, 샘플링되는 PPG 신호는 웨어러블 디바이스(200)의 성능에 따라 일부 누락되거나 측정되지 않는 경우가 발생할 수 있다.A result of measuring (sampling) the user's PPG signal using the PPG sensor at intervals of every minute to measure the heart rate may be illustrated as shown in FIG. 7 . In this case, the sampled PPG signal may be partially omitted or not measured depending on the performance of the wearable device 200 .

따라서, PPG 신호에서 측정된 심박수가 0 이거나, 미리 설정된 기준값 이하인 경우 직전에 샘플링된 심박수로 대체하는 보간법(interpolating)을 수행하여 PPG 신호를 얻을 수 있다. 다만, 시간에 따른 심박율은 특정 시점에 따른 심박율을 나타낸 것이어서 시간에 따라 사용자가 수면 상태에 진입하거나 각성 상태로 이동하는 과정을 판단하기에 다소 부적절할 수 있다.Accordingly, when the heart rate measured from the PPG signal is 0 or less than a preset reference value, the PPG signal may be obtained by performing interpolating in which the heart rate sampled immediately before is replaced. However, since the heart rate according to time represents the heart rate according to a specific time point, it may be somewhat inappropriate to determine the process in which the user enters the sleep state or moves to the awakening state according to time.

수면 상태를 좀더 용이하게 판단할 수 있도록, 서비스 제공 장치(100)는, 샘플링된 각 시각에 따른 심박율들을 미리 설정된 시간 간격만큼 평균화함으로써 시간에 따른 평균 심박율을 획득할 수 있다. 예를 들어, 시각 t1에 따른 평균 심박율을 획득하기 위하여, 서비스 제공 장치(100)는, t1 시각을 기준으로 직전의 제1 시간 간격(예를 들어 10분)에 해당하는 심박율들의 평균값을 산출하고, 산출된 평균값을 시각 t1에 따른 평균 심박율로 결정할 수 있다. 같은 방식으로, 시각 t1 바로 이후의 샘플링 시각인 시각 t2에 따른 평균 심박율을 획득하기 위하여, 서비스 제공 장치(100)는, 시각 t2를 기준으로 직전의 제1 시간 간격(예를 들어 10분)에 해당하는 심박율들의 평균값을 산출하고, 산출된 평균값을 시각 t2에 따른 평균 심박율로 결정할 수 있다.In order to more easily determine the sleep state, the service providing apparatus 100 may obtain an average heart rate according to time by averaging heart rates according to each sampled time by a preset time interval. For example, in order to obtain an average heart rate according to time t1, the service providing apparatus 100 calculates an average value of heart rates corresponding to a first time interval immediately preceding (eg, 10 minutes) based on time t1. may be calculated, and the calculated average value may be determined as an average heart rate according to time t1. In the same manner, in order to obtain an average heart rate according to time t2, which is a sampling time immediately after time t1, the service providing apparatus 100 may perform a first time interval immediately before time t2 (for example, 10 minutes) It is possible to calculate an average value of heart rates corresponding to , and determine the calculated average value as an average heart rate according to time t2.

수면 상태의 경우, 각성 상태에서 수면 상태로 진입할 경우 심박율이 감소하며, 렘 수면은 비렘 수면보다 심박율이 오히려 증가하는 경향성을 보인다. 따라서, 서비스 제공 장치(100)는, 평균 심박율이 수면 임계 심박율(HRth1) 이하인 시간 구간을 검색하고, 검색된 시간 구간에서 평균 심박율의 변화(즉 기울기)가 미리 설정된 제1 변화량(제1 기울기로 지칭될 수도 있음)을 초과하는 시점(tx)을 찾고, 초과하는 시점(tx)에서 현재 시점(tc)을 뺀 차분값(df)에 따라 제3 수면 상태를 결정할 수 있다.In the sleep state, when entering the sleep state from the waking state, the heart rate decreases, and the REM sleep tends to increase the heart rate rather than the non-REM sleep. Accordingly, the service providing apparatus 100 searches for a time interval in which the average heart rate is equal to or less than the sleep threshold heart rate (HRth1), and in the searched time interval, the change (ie, slope) of the average heart rate is set in advance by a first change amount (first The third sleep state may be determined by finding a time point tx exceeding the time point tx (which may be referred to as a slope) and determining the third sleep state according to a difference value df obtained by subtracting the current time point tc from the time point tx exceeding the time point tx.

예를 들어, 서비스 제공 장치(100)는, 차분값(df)이 음수인 경우, 현재 시점은 렘 수면에 진입한 이후이므로, 렘 수면에 해당하는 수면 단계들 중 하나일 수 있다. 따라서, 서비스 제공 장치(100)는, 차분값(df)이 음수이고, 현재 시점(tc)에서의 평균 심박율이 수면 임계 심박율(HRth1)보다 큰 값에 해당하는 각성 임계 심박율(HRth2) 이하인 경우, 차분값(df)의 절대값이 클수록 렘 수면의 수면 단계들 중 깊은 수면 단계로 결정할 수 있다. 다만, 차분값(df)이 음수이더라도 현재 시점(tc)에서의 평균 심박율이 각성 임계 심박율(HRth2)을 초과하는 경우, 수면에서 벗어나 각성 상태에 진입한 것으로 볼 수 있다. 따라서, 이 경우에, 서비스 제공 장치(100)는, 차분값(df)의 절대값이 클수록 각성 상태에 가깝도록 각성 상태의 단계들 중 하나로 사용자의 수면 상태를 결정할 수 있다.For example, when the difference value df is negative, the service providing apparatus 100 may be one of sleep stages corresponding to REM sleep because the current time is after entering REM sleep. Accordingly, in the service providing apparatus 100, the difference value df is negative, and the wake-up threshold heart rate HRth2 corresponds to a value in which the average heart rate at the current time point tc is greater than the sleep threshold heart rate HRth1. In the case of less than or equal to, the greater the absolute value of the difference value df, the deeper the sleep stage among sleep stages of REM sleep may be determined. However, even if the difference value df is negative, if the average heart rate at the current time point tc exceeds the awakening threshold heart rate HRth2, it may be considered that the user has departed from the sleep and entered the awakening state. Accordingly, in this case, the service providing apparatus 100 may determine the user's sleep state as one of the phases of the awakening state so that the greater the absolute value of the difference value df, the closer to the awakening state.

같은 방식으로, 서비스 제공 장치(100)는, 차분값(df)이 양수인 경우, 현재 시점은 렘 수면에 진입한 이전으로 볼 수 있다. 따라서, 서비스 제공 장치(100)는, 이 경우 차분값(df)의 절대값이 작을수록 비렘 수면의 수면 단계들 중 깊은 수면 단계로 결정할 수 있다.In the same way, when the difference value df is positive, the service providing apparatus 100 may view the current time point as before entering the REM sleep. Accordingly, in this case, as the absolute value of the difference value df decreases, the service providing apparatus 100 may determine the deep sleep phase among sleep phases of non-REM sleep.

여기서 차분값(df)의 절대값과 수면 단계들 사이의 관계는 절대값의 크기를 수면 단계들의 개수에 따라 균등 또는 비균등 분할하여 절대값의 크기를 비교함으로써 수면 단계들을 세부적으로 결정할 수 있다.Here, as for the relationship between the absolute value of the difference value df and the sleep stages, the sleep stages can be determined in detail by dividing the absolute value equally or unequally according to the number of sleep stages and comparing the absolute values.

도 8은 도 2에 따른 순환 신경망 기반의 인공 신경망의 구조를 나타낸 블록도이다.8 is a block diagram illustrating the structure of an artificial neural network based on a recurrent neural network according to FIG. 2 .

도 8을 참조하면, 인공 신경망(20)은 입력층(21), 은닉층(22), 및 출력층(23)을 포함할 수 있다.Referring to FIG. 8 , the artificial neural network 20 may include an input layer 21 , a hidden layer 22 , and an output layer 23 .

입력층(21)은, 제1 내지 제3 수면 상태 벡터들(Vx, Vy, Vz) 각각의 성분 개수(V)와 동일한 개수(V)의 입력 노드들로 구성될 수 있다. 예를 들어, 제1 내지 제3 수면 상태 벡터들(Vx, Vy, Vz) 각각이 n1+n2+n3개의 수면 상태들과 대응하는 성분값들을 갖는 경우, 입력층(21)은 n1+n2+n3개의 입력 노드들로 구성될 수 있다.The input layer 21 may include the same number (V) of input nodes as the number of components (V) of each of the first to third sleep state vectors Vx, Vy, and Vz. For example, when each of the first to third sleep state vectors Vx, Vy, and Vz has component values corresponding to n1+n2+n3 sleep states, the input layer 21 is n1+n2+ It may consist of n3 input nodes.

입력층(21)은 제1 수면 상태 벡터(Vx)에 입력 노드들 각각에 대응하는 하나 이상의 연결 강도값들을 적용하여 은닉층(22)에 전달할 수 있다.The input layer 21 may apply one or more connection strength values corresponding to each of the input nodes to the first sleep state vector Vx and transmit it to the hidden layer 22 .

예를 들어, 입력 노드들 각각에 대응하는 하나 이상의 연결 강도값들은 V×N의 크기를 갖는 제1 연결강도 행렬(WV×N)로 표현할 수 있다. 이때, V는 입력 노드들과 동일한 개수일 수 있고, N은 V개의 차원으로 구성된 수면 상태 벡터들(Vx, Vy, Vz)을 충분히 작은 차원으로 사상(projection)할 수 있도록 V보다 1/10 이하일 수 있다. 제1 연결강도 행렬(WV×N)은 임의의 초기값으로 설정된 후 지도학습을 통해 지속적으로 갱신될 수 있다.For example, one or more connection strength values corresponding to each of the input nodes may be expressed as a first connection strength matrix (W V×N ) having a size of V×N. In this case, V may be the same number as the input nodes, and N may be 1/10 or less than V so that the sleep state vectors (Vx, Vy, Vz) composed of V dimensions can be projected into a sufficiently small dimension. can The first connection strength matrix (W V×N ) may be continuously updated through supervised learning after being set to an arbitrary initial value.

같은 방식으로, 입력층(21)은 제2 수면 상태 벡터(Vy)에 입력 노드들 각각에 대응하는 하나 이상의 연결 강도값들을 적용하여 은닉층(22)에 전달하고, 제3 수면 상태 벡터(Vz)에 입력 노드들 각각에 대응하는 하나 이상의 연결 강도값들을 적용하여 은닉층(22)에 전달할 수 있다.In the same way, the input layer 21 applies one or more connection strength values corresponding to each of the input nodes to the second sleep state vector Vy and transmits them to the hidden layer 22, and the third sleep state vector Vz. One or more connection strength values corresponding to each of the input nodes may be applied to and transmitted to the hidden layer 22 .

종합하면, 입력층(21)은 입력받은 제1 수면 상태 벡터(Vx)에 제1 연결강도 행렬(WV×N)을 행렬곱 연산하여 얻어진 제1 중간 벡터(Xa)를 은닉층(22)에 전달하고, 제2 수면 상태 벡터(Vy)에 제1 연결강도 행렬(WV×N)을 행렬곱 연산하여 얻어진 제2 중간 벡터(Xb)를 은닉층(22)에 전달하고, 제3 수면 상태 벡터(Vz)에 제1 연결강도 행렬(WV×N)을 행렬곱 연산하여 얻어진 제3 중간 벡터(Xc)를 은닉층(22)에 전달할 수 있다. In summary, the input layer 21 applies the first intermediate vector (Xa) obtained by the matrix multiplication operation of the received first sleep state vector (Vx) with the first connection strength matrix (W V×N ) to the hidden layer 22 . and transfer the second intermediate vector (Xb) obtained by matrix multiplication operation of the first connection strength matrix (W V×N ) to the second sleep state vector (Vy) to the hidden layer 22, and the third sleep state vector A third intermediate vector (Xc) obtained by performing a matrix multiplication operation on (Vz) of the first connection strength matrix (W V×N ) may be transmitted to the hidden layer 22 .

은닉층(22)은, N개의 은닉 노드들로 구성될 수 있고, 제1 중간 벡터(Xa)와 제2 중간 벡터(Xb), 및 제3 중간 벡터(Xc)를 서로 합성하여 중간 목표 벡터를 생성할 수 있다. 예를 들어, 은닉층(22)은, 아래의 수학식 3에 기초하여 중간 목표 벡터(X`)를 생성할 수 있다.The hidden layer 22 may be composed of N hidden nodes, and generates an intermediate target vector by synthesizing the first intermediate vector Xa, the second intermediate vector Xb, and the third intermediate vector Xc with each other. can do. For example, the hidden layer 22 may generate an intermediate target vector X′ based on Equation 3 below.

Figure 112021018422734-pat00003
Figure 112021018422734-pat00003

수학식 3에서, k1은 영상 정보를 통해 결정되는 제1 수면 상태에 대한 가중치 상수이고, k2는 움직임 신호를 통해 결정되는 제2 수면 상태에 대한 가중치 상수이며, k1과 k2는 0과 1 사이의 정수일 수 있다.In Equation 3, k1 is a weight constant for the first sleep state determined through image information, k2 is a weight constant for the second sleep state determined through a motion signal, and k1 and k2 are between 0 and 1. It can be an integer.

은닉층(22)은, 생성된 중간 목표 벡터(X`)에 은닉 노드들 각각에 대응하는 하나 이상의 연결 강도를 적용하여 생성된 점수 벡터(Y`)를 출력층(23)에 전달할 수 있다. 이때, 은닉 노드들 각각에 대응하는 하나 이상의 연결 강도값들은 N×V의 크기를 갖는 제2 연결강도 행렬(UN×V)로 표현할 수 있다. 즉, 제2 연결강도 행렬(UN×V)은 N개의 차원으로 사상된 중간 목표 벡터(X`)를 다시 V개의 차원으로 복원한다.The hidden layer 22 may transmit a score vector Y′ generated by applying one or more connection strengths corresponding to each of the hidden nodes to the generated intermediate target vector X′ to the output layer 23 . In this case, one or more connection strength values corresponding to each of the hidden nodes may be expressed as a second connection strength matrix U N×V having a size of N×V. That is, the second connection strength matrix (U N×V ) restores the intermediate target vector (X`) mapped to N dimensions back to V dimensions.

한편, 제2 연결강도 행렬(UN×V)의 초기값은 임의의 값으로 설정된 후, 학습 데이터를 지속적으로 지도학습함에 따라 갱신될 수 있다.Meanwhile, the initial value of the second connection strength matrix (U N×V ) may be set to an arbitrary value and then updated as the learning data is continuously supervised.

출력층(23)은, 은닉층(22)으로부터 전달받은 점수 벡터(Y`)에 활성화 함수를 적용함으로써 점수 벡터(Y`)에 대응하는 확률(p)을 결정할 수 있다. 활성화 함수는, LeRU 함수 또는 Softmax 함수일 수 있으나 이에 한정되는 것은 아니다.The output layer 23 may determine the probability p corresponding to the score vector Y′ by applying an activation function to the score vector Y′ received from the hidden layer 22 . The activation function may be a LeRU function or a Softmax function, but is not limited thereto.

예를 들어, 점수 벡터(Y`)는 제1 매칭 테이블에 정의된 수면 상태들 중 하나와 대응하는 특정 원-핫 벡터를 나타낼 수 있으며, 따라서, 점수 벡터(Y`)에 대응하는 확률(p)은 특정 원-핫 벡터와 대응하는 수면 상태가 사용자의 최종 수면 상태일 확률(p)을 나타낸다.For example, the score vector Y′ may represent a particular one-hot vector corresponding to one of the sleep states defined in the first matching table, and thus the probability p corresponding to the score vector Y′. ) represents the probability (p) that the sleep state corresponding to the specific one-hot vector is the final sleep state of the user.

따라서, 서비스 제공 장치(100)는, 출력층(23)을 통해 출력되는 확률(p)들을 참조하여 가장 확률(p)이 높은 점수 벡터(Y`)에 대응하는 최종 수면 상태를 결정할 수 있다.Accordingly, the service providing apparatus 100 may determine the final sleep state corresponding to the score vector Y′ having the highest probability p with reference to the probabilities p output through the output layer 23 .

한편 일 실시예에서 인공 신경망(20)의 학습 데이터는, 사용자의 영상 정보, 움직임 신호, PPG 신호로부터 얻은 제1 내지 제3 수면 상태를 제1 매칭 테이블을 참조하여 원-핫 벡터들로 변환하여 얻어지는 학습 입력 데이터, 사용자의 뇌파를 측정하여 정확하게 판단한 사용자의 수면 상태를 제1 매칭 테이블을 참조하여 원-핫 벡터로 변환하여 얻어지는 학습 출력 데이터를 포함할 수 있다.Meanwhile, in an embodiment, the learning data of the artificial neural network 20 converts the first to third sleep states obtained from the user's image information, motion signal, and PPG signal into one-hot vectors with reference to the first matching table. It may include the learning input data obtained and the learning output data obtained by converting the user's sleep state accurately determined by measuring the user's brain waves into a one-hot vector with reference to the first matching table.

서비스 제공 장치(100)는, 학습 입력 데이터를 인공 신경망(20)에 입력하여 얻어지는 점수 벡터(Y`)와 학습 출력 데이터(Y)를 손실 함수(loss function)에 기초하여 서로 비교하고, 점수 벡터(Y`)와 학습 출력 데이터(Y) 사이의 차이가 최소화되도록 제1 연결강도 행렬(WV×N)과 제2 연결강도 행렬(UN×V)을 지속적으로 갱신하는 방식으로 지도학습될 수 있다.The service providing apparatus 100 compares the score vector Y` obtained by inputting the learning input data to the artificial neural network 20 and the learning output data Y based on a loss function, and the score vector Supervised learning is performed in such a way that the first connection strength matrix (W V×N ) and the second connection strength matrix (U N×V ) are continuously updated so that the difference between (Y`) and the learning output data (Y) is minimized. can

더욱 구체적으로, 인공 신경망(10)은, 미리 정의된 손실 함수(Loss function)에 점수 벡터(Y`)와 학습 출력 데이터(Y)를 대입하고, 손실 함수의 결과값이 최소화되도록 제1 연결강도 행렬(WV×N)과 제2 연결강도 행렬(UN×V)을 지속적으로 갱신할 수 있다.More specifically, the artificial neural network 10 substitutes the score vector (Y`) and the learning output data (Y) into a predefined loss function, and the first connection strength so that the result value of the loss function is minimized. The matrix (W V×N ) and the second connection strength matrix (U N×V ) may be continuously updated.

예를 들어, 손실 함수는, 크로스 엔트로피(Cross Entropy) 함수일 수 있다. 점수 벡터(Y`)와 학습 출력 데이터(Y) 사이의 크로스 엔트로피(H(Y,Y`))는 다음의 수학식 4와 같이 정의될 수 있다.For example, the loss function may be a cross entropy function. The cross entropy (H(Y, Y')) between the score vector (Y') and the learning output data (Y) may be defined as in Equation 4 below.

Figure 112021018422734-pat00004
Figure 112021018422734-pat00004

수학식 4에서 Ym은 학습 출력 데이터(Y)의 m(m은 1 이상의 자연수이고 V보다 작거나 같음)번째 성분이고, Y`m은 점수 벡터(Y`)의 m번째 성분일 수 있다.In Equation 4, Ym may be the m-th component (m is a natural number greater than or equal to 1 and less than or equal to V) of the learning output data Y, and Y'm may be the m-th component of the score vector Y'.

한편, 본 발명의 일 실시예에서 손실 함수(Loss function, LF)는 정확도를 향상시키기 위해 다음의 수학식 5와 같이 정의될 수도 있다.Meanwhile, in an embodiment of the present invention, a loss function (LF) may be defined as in Equation 5 below to improve accuracy.

Figure 112021018422734-pat00005
Figure 112021018422734-pat00005

수학식 5를 참조하면, 손실 함수(LF)는, 크로스 엔트로피(H(Y,Y`))와 민코스키 거리(Minkowski distance)에 따른 결과값 중 큰 값을 출력하는 함수로 정의된다. 민코스키 거리는 학습 출력 데이터(Y)와 점수 벡터(Y`) 사이의 가장 큰 차이를 나타내기 때문에 이러한 손실 함수(LF)를 정의할 경우 수면 상태를 결정할 때 발생하는 큰 폭의 오차를 최소화할 수 있다.Referring to Equation 5, the loss function LF is defined as a function that outputs a larger value among the result values according to the cross entropy H(Y, Y`) and the Minkowski distance. Since the Minkowski distance represents the largest difference between the learning output data (Y) and the score vector (Y`), defining such a loss function (LF) can minimize the large error that occurs when determining the sleep state. have.

따라서, 사용자의 수면 상태를 예측하는 성능을 크게 향상시킬 수 있는 장점을 갖는다.Accordingly, it has the advantage of greatly improving the performance of predicting the user's sleep state.

도 9는 도 1에 따른 서비스 제공 장치의 기본적인 하드웨어 구성을 나타낸 도면이다.9 is a diagram illustrating a basic hardware configuration of the service providing apparatus according to FIG. 1 .

도 9를 참조하면, 서비스 제공 장치(100)는, 적어도 하나의 프로세서(processor, 110); 및 상기 적어도 하나의 프로세서가 적어도 하나의 동작(operation)을 수행하는 명령어들(instructions)을 저장하는 메모리(memory, 120)를 포함한다.Referring to FIG. 9 , the service providing apparatus 100 includes at least one processor 110 ; and a memory 120 for storing instructions for the at least one processor to perform at least one operation.

상기 적어도 하나의 동작은, 웨어러블 디바이스(wearable device)를 이용하여 측정된 사용자의 생체 정보를 획득하고, 카메라를 이용하여 촬영된 상기 사용자의 영상 정보를 획득하는 단계; 상기 영상 정보를 합성곱 신경망(convolutional neural network, CNN)에 입력하여 제1 수면 상태를 결정하는 단계; 상기 생체 정보에 포함된 움직임 신호에 기초하여 제2 수면 상태를 결정하는 단계; 상기 생체 정보에 포함된 PPG(photo-plethysmograph) 신호에 기초하여 제3 수면 상태를 결정하는 단계; 상기 제1 수면 상태, 상기 제2 수면 상태, 및 상기 제3 수면 상태를 미리 정의된 제1 매칭 테이블을 참조하여 각각 제1 내지 제3 수면 상태 벡터들로 변환하는 단계; 변환된 상기 제1 내지 제3 수면 상태 벡터들을 미리 지도학습(supervised learning)된 순환 신경망(Recurrent neural network, RNN) 기반의 인공 신경망에 입력하는 단계; 상기 인공 신경망의 출력으로 상기 사용자의 최종 수면 상태를 지시하는 최종 수면 상태 벡터를 획득하는 단계; 및 상기 최종 수면 상태 벡터에 대응하는 조명과 음악을 선정하는 단계를 포함한다.The at least one operation may include: acquiring biometric information of a user measured using a wearable device, and acquiring image information of the user photographed using a camera; determining a first sleep state by inputting the image information into a convolutional neural network (CNN); determining a second sleep state based on a motion signal included in the biometric information; determining a third sleep state based on a photo-plethysmograph (PPG) signal included in the biometric information; converting the first sleep state, the second sleep state, and the third sleep state into first to third sleep state vectors, respectively, with reference to a first predefined matching table; inputting the converted first to third sleep state vectors to a pre-supervised learning recurrent neural network (RNN)-based artificial neural network; obtaining a final sleep state vector indicating the final sleep state of the user as an output of the artificial neural network; and selecting lighting and music corresponding to the final sleep state vector.

그 밖에도 적어도 하나의 동작은 도 1 내지 도 8을 참조하여 설명한 서비스 제공 장치(100)의 동작들 중 적어도 일부를 포함할 수 있다.In addition, the at least one operation may include at least some of the operations of the service providing apparatus 100 described with reference to FIGS. 1 to 8 .

여기서 적어도 하나의 프로세서(110)는 중앙 처리 장치(central processing unit, CPU), 그래픽 처리 장치(graphics processing unit, GPU), 또는 본 발명의 실시예들에 따른 방법들이 수행되는 전용의 프로세서를 의미할 수 있다. 메모리(120) 및 저장 장치(160) 각각은 휘발성 저장 매체 및 비휘발성 저장 매체 중에서 적어도 하나로 구성될 수 있다. 예를 들어, 메모리(120)는 읽기 전용 메모리(read only memory, ROM) 및 랜덤 액세스 메모리(random access memory, RAM) 중 하나일 수 있고, 저장 장치(160)는, 플래시메모리(flash-memory), 하드디스크 드라이브(HDD), 솔리드 스테이트 드라이브(SSD), 또는 각종 메모리 카드(예를 들어, micro SD 카드) 등일 수 있다.Here, the at least one processor 110 may mean a central processing unit (CPU), a graphics processing unit (GPU), or a dedicated processor on which methods according to embodiments of the present invention are performed. can Each of the memory 120 and the storage device 160 may be configured as at least one of a volatile storage medium and a non-volatile storage medium. For example, the memory 120 may be one of a read only memory (ROM) and a random access memory (RAM), and the storage device 160 is a flash-memory. , a hard disk drive (HDD), a solid state drive (SSD), or various memory cards (eg, micro SD card).

또한, 서비스 제공 장치(100)는, 무선 네트워크를 통해 통신을 수행하는 송수신 장치(transceiver)(130)를 포함할 수 있다. 또한, 계층적 식별자 관리 체계에 기초한 데이터 제공 장치(100)는 입력 인터페이스 장치(140), 출력 인터페이스 장치(150), 저장 장치(160) 등을 더 포함할 수 있다. 서비스 제공 장치(100)에 포함된 각각의 구성 요소들은 버스(bus)(170)에 의해 연결되어 서로 통신을 수행할 수 있다.Also, the service providing apparatus 100 may include a transceiver 130 that performs communication through a wireless network. In addition, the data providing apparatus 100 based on the hierarchical identifier management system may further include an input interface device 140 , an output interface device 150 , a storage device 160 , and the like. Each component included in the service providing apparatus 100 may be connected by a bus 170 to communicate with each other.

서비스 제공 장치(100)의 예를 들면, 통신 가능한 데스크탑 컴퓨터(desktop computer), 랩탑 컴퓨터(laptop computer), 노트북(notebook), 스마트폰(smart phone), 태블릿 PC(tablet PC), 모바일폰(mobile phone), 스마트 워치(smart watch), 스마트 글래스(smart glass), e-book 리더기, PMP(portable multimedia player), 휴대용 게임기, 네비게이션(navigation) 장치, 디지털 카메라(digital camera), DMB(digital multimedia broadcasting) 재생기, 디지털 음성 녹음기(digital audio recorder), 디지털 음성 재생기(digital audio player), 디지털 동영상 녹화기(digital video recorder), 디지털 동영상 재생기(digital video player), PDA(Personal Digital Assistant) 등일 수 있다.For example, the service providing device 100, a communicable desktop computer (desktop computer), a laptop computer (laptop computer), a notebook (notebook), a smart phone (smart phone), a tablet PC (tablet PC), a mobile phone (mobile) phone), smart watch, smart glass, e-book reader, PMP (portable multimedia player), portable game console, navigation device, digital camera, DMB (digital multimedia broadcasting) ) player, digital audio recorder, digital audio player, digital video recorder, digital video player, PDA (Personal Digital Assistant), and the like.

본 발명에 따른 방법들은 다양한 컴퓨터 수단을 통해 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 컴퓨터 판독 가능 매체에 기록되는 프로그램 명령은 본 발명을 위해 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다.The methods according to the present invention may be implemented in the form of program instructions that can be executed by various computer means and recorded in a computer-readable medium. The computer-readable medium may include program instructions, data files, data structures, and the like, alone or in combination. The program instructions recorded on the computer-readable medium may be specially designed and configured for the present invention, or may be known and available to those skilled in the art of computer software.

컴퓨터 판독 가능 매체의 예에는 롬(ROM), 램(RAM), 플래시 메모리(flash memory) 등과 같이 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함될 수 있다. 프로그램 명령의 예에는 컴파일러(compiler)에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터(interpreter) 등을 사용해서 컴퓨터에 의해 실행될 수 있는 고급 언어 코드를 포함할 수 있다. 상술한 하드웨어 장치는 본 발명의 동작을 수행하기 위해 적어도 하나의 소프트웨어 모듈로 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.Examples of computer-readable media may include hardware devices specially configured to store and execute program instructions, such as ROM, RAM, flash memory, and the like. Examples of program instructions may include not only machine language codes such as those generated by a compiler, but also high-level language codes that can be executed by a computer using an interpreter or the like. The hardware device described above may be configured to operate as at least one software module to perform the operations of the present invention, and vice versa.

또한, 상술한 방법 또는 장치는 그 구성이나 기능의 전부 또는 일부가 결합되어 구현되거나, 분리되어 구현될 수 있다. In addition, the above-described method or apparatus may be implemented by combining all or part of its configuration or function, or may be implemented separately.

상기에서는 본 발명의 바람직한 실시예를 참조하여 설명하였지만, 해당 기술 분야의 숙련된 당업자는 하기의 특허 청구의 범위에 기재된 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 및 변경시킬 수 있음을 이해할 수 있을 것이다. Although the above has been described with reference to preferred embodiments of the present invention, those skilled in the art can variously modify and change the present invention within the scope without departing from the spirit and scope of the present invention as set forth in the claims below. You will understand that it can be done.

Claims (5)

AI(Artificial Intelligence)를 이용하여 수면 상태에 따른 조명과 음악을 제공하는 장치로서,
적어도 하나의 프로세서(processor); 및
상기 적어도 하나의 프로세서가 적어도 하나의 동작(operation)을 수행하는 명령어들(instructions)을 저장하는 메모리(memory)를 포함하고,
상기 적어도 하나의 동작은,
웨어러블 디바이스(wearable device)를 이용하여 측정된 사용자의 생체 정보를 획득하고, 카메라를 이용하여 촬영된 상기 사용자의 영상 정보를 획득하는 단계;
상기 영상 정보를 합성곱 신경망(convolutional neural network, CNN)에 입력하여 제1 수면 상태를 결정하는 단계;
상기 생체 정보에 포함된 움직임 신호에 기초하여 제2 수면 상태를 결정하는 단계;
상기 생체 정보에 포함된 PPG(photo-plethysmograph) 신호에 기초하여 제3 수면 상태를 결정하는 단계;
상기 제1 수면 상태, 상기 제2 수면 상태, 및 상기 제3 수면 상태를 미리 정의된 제1 매칭 테이블을 참조하여 각각 제1 내지 제3 수면 상태 벡터들로 변환하는 단계;
변환된 상기 제1 내지 제3 수면 상태 벡터들을 미리 지도학습(supervised learning)된 순환 신경망(Recurrent neural network, RNN) 기반의 인공 신경망에 입력하는 단계;
상기 인공 신경망의 출력으로 상기 사용자의 최종 수면 상태를 지시하는 최종 수면 상태 벡터를 획득하는 단계; 및
상기 최종 수면 상태 벡터에 대응하는 조명과 음악을 선정하는 단계를 포함하는, AI를 이용하여 수면 상태에 따른 조명과 음악을 제공하는 장치.
A device that provides lighting and music according to the sleep state using AI (Artificial Intelligence),
at least one processor; and
and a memory for storing instructions for the at least one processor to perform at least one operation,
The at least one operation is
acquiring biometric information of a user measured using a wearable device, and acquiring image information of the user photographed using a camera;
determining a first sleep state by inputting the image information into a convolutional neural network (CNN);
determining a second sleep state based on a motion signal included in the biometric information;
determining a third sleep state based on a photo-plethysmograph (PPG) signal included in the biometric information;
converting the first sleep state, the second sleep state, and the third sleep state into first to third sleep state vectors, respectively, with reference to a first predefined matching table;
inputting the converted first to third sleep state vectors to a pre-supervised learning recurrent neural network (RNN)-based artificial neural network;
obtaining a final sleep state vector indicating the final sleep state of the user as an output of the artificial neural network; and
A device for providing lighting and music according to the sleep state using AI, comprising the step of selecting lighting and music corresponding to the final sleep state vector.
청구항 1에서,
상기 제1 매칭 테이블은,
미리 설정된 수면 상태들과 1:1로 대응하도록 미리 설정된 원-핫 벡터들(one-hot vectors)을 지시하는, AI를 이용하여 수면 상태에 따른 조명과 음악을 제공하는 장치.
In claim 1,
The first matching table is
A device that provides lighting and music according to the sleep state using AI, which instructs preset one-hot vectors to correspond 1:1 with preset sleep states.
청구항 2에서,
상기 최종 수면 상태 벡터는, 상기 제1 매칭 테이블에 의해 지시되는 상기 원-핫 벡터들 중 하나이고,
상기 조명과 음악을 선정하는 단계는,
상기 최종 수면 상태 벡터의 성분값 '1'의 기초하여 조도의 단계를 결정하는, AI를 이용하여 수면 상태에 따른 조명과 음악을 제공하는 장치.
In claim 2,
The final sleep state vector is one of the one-hot vectors indicated by the first matching table,
The step of selecting the lighting and music,
An apparatus for providing lighting and music according to the sleep state using AI, which determines the level of illumination based on the component value '1' of the final sleep state vector.
◈청구항 4은(는) 설정등록료 납부시 포기되었습니다.◈◈Claim 4 was abandoned when paying the registration fee.◈ 청구항 2에서,
상기 최종 수면 상태 벡터는, 상기 제1 매칭 테이블에 의해 지시되는 상기 원-핫 벡터들 중 하나이고,
상기 조명과 음악을 선정하는 단계는,
다수의 후보 음악들 각각의 시간에 따른 음파 신호를 주파수 변환(FFT, fast fourier transform)하여 주파수 영역으로 변환하는 단계;
변환된 주파수 영역에서 가청 주파수에 해당하는 20 내지 20000 (Hz)에 해당하는 음파 신호를 필터링하여 획득하는 단계;
필터링된 상기 음파 신호를 상기 최종 수면 상태 벡터의 성분값들 각각과 대응하는 균등한 주파수 구간들로 분할하고, 분할된 주파수 구간들 각각에 대하여 상기 음파 신호를 주파수 영역에서 적분하는 단계; 및
적분된 상기 음파 신호의 결과값이 가장 큰 주파수 구간을 결정하고, 결정된 주파수 구간과 대응하는 상기 최종 수면 상태 벡터의 성분값이 '1'인 후보 음악을 상기 사용자에게 제공할 음악으로서 선정하는 단계를 포함하는, AI를 이용하여 수면 상태에 따른 조명과 음악을 제공하는 장치.
In claim 2,
The final sleep state vector is one of the one-hot vectors indicated by the first matching table,
The step of selecting the lighting and music,
frequency transforming (FFT, fast fourier transform) sound wave signals according to time of each of the plurality of candidate songs into a frequency domain;
Filtering and obtaining a sound wave signal corresponding to 20 to 20000 (Hz) corresponding to the audible frequency in the converted frequency domain;
dividing the filtered sound wave signal into equal frequency sections corresponding to each of the component values of the final sleep state vector, and integrating the sound wave signal in a frequency domain for each of the divided frequency sections; and
determining a frequency section having the largest result value of the integrated sound wave signal, and selecting candidate music in which the component value of the final sleep state vector corresponding to the determined frequency section is '1' as the music to be provided to the user; A device that provides lighting and music according to sleep states using AI, including.
청구항 1에서,
상기 순환 신경망 기반의 인공 신경망은,
상기 제1 내지 제3 수면 상태 벡터들 각각의 성분들과 대응하는 입력 노드들로 구성되고, 상기 제1 내지 제3 수면 상태 벡터들 각각의 성분들에 제1 연결강도 행렬을 적용하여 은닉층으로 전달하는 입력층;
상기 입력층으로부터 전달된 출력값을 이용하여 중간 목표 벡터를 생성하고, 상기 중간 목표 벡터에 제2 연결강도 행렬을 적용하여 생성된 점수 벡터를 출력층으로 전달하는 은닉층; 및
상기 점수 벡터에 활성화 함수를 적용하여 상기 점수 벡터에 대응하는 확률을 결정하는 출력층을 포함하는, AI를 이용하여 수면 상태에 따른 조명과 음악을 제공하는 장치.
In claim 1,
The artificial neural network based on the recurrent neural network,
It is composed of input nodes corresponding to components of each of the first to third sleep state vectors, and a first connection strength matrix is applied to each component of the first to third sleep state vectors and transmitted to the hidden layer. the input layer;
a hidden layer that generates an intermediate target vector by using the output value transmitted from the input layer, and transmits the score vector generated by applying a second connection strength matrix to the intermediate target vector to the output layer; and
and an output layer that determines a probability corresponding to the score vector by applying an activation function to the score vector.
KR1020210020319A 2021-02-16 2021-02-16 Method and apparatus for providing lighting and music according to sleep conditions using artificial intelligence KR102268804B1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
KR1020210020319A KR102268804B1 (en) 2021-02-16 2021-02-16 Method and apparatus for providing lighting and music according to sleep conditions using artificial intelligence
KR1020210079108A KR102344875B1 (en) 2021-02-16 2021-06-18 Method and apparatus for determining a frequency band and illuminance according to the sleeping state, and providing music according to the determined frequency band and lighting according to the illuminance

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020210020319A KR102268804B1 (en) 2021-02-16 2021-02-16 Method and apparatus for providing lighting and music according to sleep conditions using artificial intelligence

Related Child Applications (1)

Application Number Title Priority Date Filing Date
KR1020210079108A Division KR102344875B1 (en) 2021-02-16 2021-06-18 Method and apparatus for determining a frequency band and illuminance according to the sleeping state, and providing music according to the determined frequency band and lighting according to the illuminance

Publications (1)

Publication Number Publication Date
KR102268804B1 true KR102268804B1 (en) 2021-06-25

Family

ID=76628968

Family Applications (2)

Application Number Title Priority Date Filing Date
KR1020210020319A KR102268804B1 (en) 2021-02-16 2021-02-16 Method and apparatus for providing lighting and music according to sleep conditions using artificial intelligence
KR1020210079108A KR102344875B1 (en) 2021-02-16 2021-06-18 Method and apparatus for determining a frequency band and illuminance according to the sleeping state, and providing music according to the determined frequency band and lighting according to the illuminance

Family Applications After (1)

Application Number Title Priority Date Filing Date
KR1020210079108A KR102344875B1 (en) 2021-02-16 2021-06-18 Method and apparatus for determining a frequency band and illuminance according to the sleeping state, and providing music according to the determined frequency band and lighting according to the illuminance

Country Status (1)

Country Link
KR (2) KR102268804B1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102358948B1 (en) * 2021-08-18 2022-02-08 (주)썬컴퍼니 Automated system for manufacturing paper boxes for packaging based on ai
KR102403213B1 (en) * 2022-01-27 2022-05-30 노승완 Deep learning sleep assistant system through ultradian rhythm optimization
CN114699040A (en) * 2022-02-21 2022-07-05 华南师范大学 Waking-up detection method, device, equipment and storage medium based on physiological signals

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20180133779A (en) * 2017-06-07 2018-12-17 한국전자통신연구원 Method and apparatus for sensing sleep state using biometric data and motion information
KR101984410B1 (en) * 2017-12-19 2019-05-30 건국대학교 산학협력단 A method and apparatus for lighting therapy based on emotianal state
US20190192068A1 (en) * 2017-12-12 2019-06-27 Koninklijke Philips N.V. System and method for determining sleep onset latency
KR20190100888A (en) 2018-02-21 2019-08-29 연세대학교 원주산학협력단 Sleep stage classification device and method using pulse oximeter
KR20200128002A (en) * 2018-02-28 2020-11-11 가부시키가이샤 엠티지 Sleep device and sleep system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20180133779A (en) * 2017-06-07 2018-12-17 한국전자통신연구원 Method and apparatus for sensing sleep state using biometric data and motion information
US20190192068A1 (en) * 2017-12-12 2019-06-27 Koninklijke Philips N.V. System and method for determining sleep onset latency
KR101984410B1 (en) * 2017-12-19 2019-05-30 건국대학교 산학협력단 A method and apparatus for lighting therapy based on emotianal state
KR20190100888A (en) 2018-02-21 2019-08-29 연세대학교 원주산학협력단 Sleep stage classification device and method using pulse oximeter
KR20200128002A (en) * 2018-02-28 2020-11-11 가부시키가이샤 엠티지 Sleep device and sleep system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102358948B1 (en) * 2021-08-18 2022-02-08 (주)썬컴퍼니 Automated system for manufacturing paper boxes for packaging based on ai
KR102463064B1 (en) * 2021-08-18 2022-11-04 (주)썬컴퍼니 Paper box manufacturing system for detecting errors in manufacturing modules in real time based on convolutional neural network
KR102403213B1 (en) * 2022-01-27 2022-05-30 노승완 Deep learning sleep assistant system through ultradian rhythm optimization
CN114699040A (en) * 2022-02-21 2022-07-05 华南师范大学 Waking-up detection method, device, equipment and storage medium based on physiological signals

Also Published As

Publication number Publication date
KR102344875B1 (en) 2021-12-28

Similar Documents

Publication Publication Date Title
KR102268804B1 (en) Method and apparatus for providing lighting and music according to sleep conditions using artificial intelligence
CN110826466B (en) Emotion recognition method, device and storage medium based on LSTM audio-video fusion
Slim et al. Survey on human activity recognition based on acceleration data
Ringeval et al. Prediction of asynchronous dimensional emotion ratings from audiovisual and physiological data
Scherer et al. Tinyradarnn: Combining spatial and temporal convolutional neural networks for embedded gesture recognition with short range radars
US10636524B2 (en) Method and system for optimized wake-up strategy via sleeping stage prediction with recurrent neural networks
CN105654952B (en) Electronic device, server and method for outputting voice
US8781991B2 (en) Emotion recognition apparatus and method
CN107784357A (en) Individualized intelligent based on multi-modal deep neural network wakes up system and method
KR101605078B1 (en) The method and system for providing user optimized information, recording medium for performing the method
Gu et al. Hierarchical CNN‐based real‐time fatigue detection system by visual‐based technologies using MSP model
KR102036987B1 (en) Method and apparatus for sensing sleep state using biometric data and motion information
CN105748057A (en) Information Display Method And Electronic Device For Supporting The Same
US10789961B2 (en) Apparatus and method for predicting/recognizing occurrence of personal concerned context
Zhang et al. Human activity recognition based on time series analysis using U-Net
CN113450771B (en) Awakening method, model training method and device
CN111523593B (en) Method and device for analyzing medical images
Palaghias et al. A survey on mobile social signal processing
CN111387936A (en) Sleep stage identification method, device and equipment
CN113827240B (en) Emotion classification method, training device and training equipment for emotion classification model
Wu et al. Statistical sleep pattern modelling for sleep quality assessment based on sound events
CN109543187A (en) Generation method, device and the storage medium of electronic health record feature
Kumar Human Activity Recognition with Deep Learning: Methods, Progress & Possibilities
US20220215932A1 (en) Server for providing psychological stability service, user device, and method of analyzing multimodal user experience data for the same
US20240185850A1 (en) System and method for keyword false alarm reduction

Legal Events

Date Code Title Description
A107 Divisional application of patent
GRNT Written decision to grant