WO2022161067A1 - Pre-sleep state detection method and device - Google Patents

Pre-sleep state detection method and device Download PDF

Info

Publication number
WO2022161067A1
WO2022161067A1 PCT/CN2021/141615 CN2021141615W WO2022161067A1 WO 2022161067 A1 WO2022161067 A1 WO 2022161067A1 CN 2021141615 W CN2021141615 W CN 2021141615W WO 2022161067 A1 WO2022161067 A1 WO 2022161067A1
Authority
WO
WIPO (PCT)
Prior art keywords
user
state
sleep
signal
bedtime
Prior art date
Application number
PCT/CN2021/141615
Other languages
French (fr)
Chinese (zh)
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 华为技术有限公司
Publication of WO2022161067A1 publication Critical patent/WO2022161067A1/en

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/02Detecting, measuring or recording pulse, heart rate, blood pressure or blood flow; Combined pulse/heart-rate/blood pressure determination; Evaluating a cardiovascular condition not otherwise provided for, e.g. using combinations of techniques provided for in this group with electrocardiography or electroauscultation; Heart catheters for measuring blood pressure
    • A61B5/024Detecting, measuring or recording pulse rate or heart rate
    • A61B5/02438Detecting, measuring or recording pulse rate or heart rate with portable devices, e.g. worn by the patient
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/02Detecting, measuring or recording pulse, heart rate, blood pressure or blood flow; Combined pulse/heart-rate/blood pressure determination; Evaluating a cardiovascular condition not otherwise provided for, e.g. using combinations of techniques provided for in this group with electrocardiography or electroauscultation; Heart catheters for measuring blood pressure
    • A61B5/0205Simultaneously evaluating both cardiovascular conditions and different types of body conditions, e.g. heart and respiratory condition
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/02Detecting, measuring or recording pulse, heart rate, blood pressure or blood flow; Combined pulse/heart-rate/blood pressure determination; Evaluating a cardiovascular condition not otherwise provided for, e.g. using combinations of techniques provided for in this group with electrocardiography or electroauscultation; Heart catheters for measuring blood pressure
    • A61B5/024Detecting, measuring or recording pulse rate or heart rate
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/02Detecting, measuring or recording pulse, heart rate, blood pressure or blood flow; Combined pulse/heart-rate/blood pressure determination; Evaluating a cardiovascular condition not otherwise provided for, e.g. using combinations of techniques provided for in this group with electrocardiography or electroauscultation; Heart catheters for measuring blood pressure
    • A61B5/024Detecting, measuring or recording pulse rate or heart rate
    • A61B5/02416Detecting, measuring or recording pulse rate or heart rate using photoplethysmograph signals, e.g. generated by infrared radiation
    • 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
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/16Devices for psychotechnics; Testing reaction times ; Devices for evaluating the psychological state
    • A61B5/18Devices for psychotechnics; Testing reaction times ; Devices for evaluating the psychological state for vehicle drivers or machine operators
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/369Electroencephalography [EEG]
    • A61B5/372Analysis of electroencephalograms
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/369Electroencephalography [EEG]
    • A61B5/384Recording apparatus or displays specially adapted therefor
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/369Electroencephalography [EEG]
    • A61B5/386Accessories or supplementary instruments therefor
    • 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/48Other medical applications
    • A61B5/4806Sleep evaluation
    • A61B5/4809Sleep detection, i.e. determining whether a subject is asleep or not
    • 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
    • A61B5/4812Detecting sleep stages or cycles
    • 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
    • A61B5/4815Sleep quality
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/68Arrangements of detecting, measuring or recording means, e.g. sensors, in relation to patient
    • A61B5/6801Arrangements of detecting, measuring or recording means, e.g. sensors, in relation to patient specially adapted to be attached to or worn on the body surface
    • A61B5/6802Sensor mounted on worn items
    • 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
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/74Details of notification to user or communication with user or patient ; user input means
    • A61B5/7405Details of notification to user or communication with user or patient ; user input means using sound
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/74Details of notification to user or communication with user or patient ; user input means
    • A61B5/742Details of notification to user or communication with user or patient ; user input means using visual displays
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/74Details of notification to user or communication with user or patient ; user input means
    • A61B5/746Alarms related to a physiological condition, e.g. details of setting alarm thresholds or avoiding false alarms
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/74Details of notification to user or communication with user or patient ; user input means
    • A61B5/7465Arrangements for interactive communication between patient and care services, e.g. by using a telephone network
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/74Details of notification to user or communication with user or patient ; user input means
    • A61B5/7475User input or interface means, e.g. keyboard, pointing device, joystick

Definitions

  • the present application relates to the technical field of sports health, and in particular to a method and device for detecting a bedtime state.
  • the related technology can detect the user's on-off time and sleep stage during the sleep process, and calculate the user's sleep score by combining the on-off time and sleep stage, but it cannot monitor the user's state before going to bed, resulting in the user's inability to grasp sleep. The complete state before and after, so that it cannot further improve the quality of sleep.
  • the present application provides a bedtime state detection method and device, which can accurately monitor a user's bedtime state, so that the user can grasp the complete state before and after sleep, thereby further improving their own sleep quality.
  • an embodiment of the present application provides a method for detecting a bedtime state, including:
  • a bedtime state curve is displayed.
  • the user inputs the first query operation to query the state curve before going to sleep, which is convenient for the user to check the state curve before going to sleep at any time, and can grasp the state before going to sleep.
  • it also includes:
  • the detection time is set.
  • the user inputs the first setting operation to set the detection time, so that the electronic device can perform detection according to the detection time expected by the user, so that the generated bedtime state curve is more in line with the user's expectation.
  • it also includes:
  • the operating mode is set.
  • the user inputs the second setting operation to set the working mode, so that the electronic device can work according to the working mode expected by the user, and the user experience is improved.
  • the method further includes:
  • the pre-sleep state score is generated
  • a bedtime state curve is generated.
  • the bedtime state curve is generated according to the first signal of the user, and the generated bedtime state curve can accurately monitor the bedtime state of the user for a period of time before bedtime, so that the user can grasp the complete state before bedtime. This will further improve your sleep quality.
  • the first signal includes one of an acceleration signal, a heart rate signal and an electroencephalogram signal or any combination thereof.
  • using multiple signals as the first signal can further improve the accuracy of the generated bedtime state score.
  • the method before acquiring the first signal of the user according to the first time interval, the method includes:
  • the electronic device compares the current time with the detection time expected by the user, and obtains the user's first signal according to the detection time expected by the user, so that the generated bedtime state curve is more in line with the user's expectation.
  • the method further includes:
  • the first characteristic parameter determine the first sleep state of the user
  • the judgment result is that the first sleep state is suspected of falling asleep or falling out of sleep, generating a bedtime state score according to the bedtime state evaluation model and the first characteristic parameter, and generating a bedtime state curve according to the bedtime state score;
  • the sleep time is recorded, and the first signal of the user is acquired according to the second time interval.
  • the pre-sleep state score is continued to be generated and the pre-sleep state curve is generated according to the pre-sleep state score, so as to ensure the integrity of the user's pre-sleep state score within a period of time before going to sleep, thereby So that the user can grasp the complete state before sleep.
  • the method further includes:
  • the second sleep state is the suspected sleep state, acquiring the first signal of the user according to the first time interval;
  • the second sleep state is a sleep-out state, determine whether the pre-sleep state curve satisfies the reminder condition; wherein, the reminder condition includes that the pre-sleep state score corresponding to the consecutive first specified number of time points gradually increases;
  • the user is reminded in a first reminder mode; the first reminder mode includes displaying a breathing light and/or a reminder message.
  • the first signal is continued to be obtained to ensure the integrity of the user's pre-sleep state score within a period of time before going to sleep; If it increases gradually, the user is reminded to sleep by displaying a breathing light and/or a reminder message, which is a milder reminder, thereby improving the user's own sleep quality.
  • the method further includes:
  • the second sleep state is the suspected sleep state, acquiring the first signal of the user according to the first time interval;
  • the second sleep state is the state of falling asleep, then determine whether the pre-sleep state curve satisfies the reminder condition; wherein, the reminder condition includes that the pre-sleep state scores corresponding to the consecutive first specified number of time points are all greater than the score threshold;
  • the user is reminded in a first reminder mode; the first reminder mode includes displaying a breathing light and/or a reminder message.
  • the first signal is continued to be obtained to ensure the integrity of the user's pre-sleep state score within a period of time before going to sleep; If it increases gradually, the user is reminded to sleep by displaying a breathing light and/or a reminder message, which is a milder reminder, thereby improving the user's own sleep quality.
  • the method further includes:
  • the first signal determine whether the user is in a driving state
  • the user is reminded in a second reminder mode; the second reminder mode includes playing the first type of music;
  • the third reminder mode includes playing the second type of music.
  • the first type of music that is relatively intense is played to refresh the user and improve the safety of the user during driving; Enhance the user's drowsiness, prompt the user to go to sleep as soon as possible, thereby improving the user's own sleep quality.
  • it also includes:
  • the sleep quality score is displayed.
  • the user inputs the second query operation to query the sleep quality score, which is convenient for the user to grasp the sleep quality during sleep.
  • the method further includes:
  • the third sleep state is a sleep-out state
  • a sleep quality score is generated.
  • whether the user wakes up from sleep is monitored during the user's sleep process, and if the user wakes up from sleep, a sleep quality score is generated in time for the user to check the sleep quality score.
  • an electronic device comprising:
  • a display screen ; one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more computer programs including instructions that, when executed by the device, cause The device executes the first aspect or the instructions of the method in any possible implementation of the first aspect.
  • an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium is used for program code executed by a device, and the program code includes the first aspect or any of the first aspect. Instructions for a method in a possible implementation.
  • the embodiments of the present application provide a computer program product containing instructions, when the computer program product is run on a computer or any at least one processor, the computer is made to execute the first aspect or any one of the first aspect Instructions for methods in possible implementations.
  • the first signal of the user is obtained according to the set first time interval, and the first characteristic parameter is extracted from the first signal; through the generated bedtime state evaluation model, according to the first characteristic parameter, The pre-sleep state score is generated, which can accurately monitor the user's pre-sleep state, so that the user can grasp the complete state before and after sleep, thereby further improving their sleep quality.
  • FIG. 1 is a schematic ranking diagram of the reasons for affecting sleep in a kind of "2019 Chinese Sleep White Paper” provided by the embodiment of the present application;
  • FIG. 2 is a schematic diagram of the distribution of the age groups of staying up late every day in a kind of "2019 Chinese Sleep White Paper” provided by the embodiment of the application;
  • 3a is a schematic diagram of a sleepiness change curve provided by an embodiment of the application.
  • Fig. 3b is a schematic diagram of another drowsiness change curve provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a bedtime state detection system provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of an external structure of a wearable device provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of the internal structure of a wearable device provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of a homepage of a terminal device provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram of a sports health interface provided by an embodiment of the present application.
  • FIG. 9 is a schematic diagram of a sleep function module interface provided by an embodiment of the present application.
  • FIG. 10 is a schematic diagram of a bedtime detection function interface provided by an embodiment of the present application.
  • FIG. 11 is a schematic diagram of yet another bedtime detection function interface provided by an embodiment of the present application.
  • FIG. 12 is a schematic diagram of a function setting interface provided by an embodiment of the present application.
  • 13a is a schematic diagram of a user-selected reminder mode interface provided by an embodiment of the present application.
  • Figure 13b is a schematic diagram of yet another bedtime state curve provided by an embodiment of the present application.
  • 13c is a schematic diagram of a reminder user interface provided by an embodiment of the present application.
  • 14a is a schematic diagram of a user-selected reminder mode interface provided by an embodiment of the present application.
  • Figure 14b is a schematic diagram of yet another bedtime state curve provided by an embodiment of the application.
  • 14c is a schematic diagram of another reminder user interface provided by an embodiment of the present application.
  • 15a is a schematic diagram of a user-selected promotion mode interface provided by an embodiment of the present application.
  • 15b is a schematic diagram of another reminder user interface provided by an embodiment of the present application.
  • 15c is a schematic diagram of another reminder user interface provided by an embodiment of the present application.
  • 16a is a schematic diagram of a sleep function module interface provided by an embodiment of the application.
  • 16b is a schematic diagram of a sleep scoring interface provided by an embodiment of the application.
  • FIG. 17 is a schematic diagram of a homepage of a wearable device provided by an embodiment of the present application.
  • FIG. 18 is a schematic structural diagram of a processor of an electronic device according to an embodiment of the present application.
  • 19 is an algorithm flow chart of a method for detecting a bedtime state provided by an embodiment of the present application.
  • FIG. 20 is a flowchart of a method for detecting a bedtime state provided by an embodiment of the present application
  • FIG. 21 is a flowchart of constructing a bedtime state assessment model provided by an embodiment of the present application.
  • 22a to 22e are schematic diagrams of a generation state curve provided by an embodiment of the present application.
  • FIG. 24 is a schematic diagram of a multi-user recording mode provided by an embodiment of the present application.
  • Fig. 1 is a schematic diagram of the ranking of the reasons for affecting sleep in the "2019 Chinese Sleep White Paper" provided by the embodiment of the present application. As shown in Fig. 1, among the reasons affecting sleep, the reason that accounts for the largest proportion is psychological pressure, which accounts for The ratio is 26%; the second reason affecting sleep is heavy work and study tasks, accounting for 21%; the third reason affecting sleep is personal sleep habits, accounting for 21% 19%. Fig.
  • FIG. 2 is a schematic diagram of the distribution of the age groups of staying up late every day in a "2019 Chinese Sleep White Paper" provided by an embodiment of the application, as shown in Fig. 2, the horizontal axis of the distribution is the people of each age group, and the vertical axis is the ratio .
  • the proportion of staying up late before 70 is 2%
  • the proportion of post-70 staying up late is 7%
  • the proportion of post-80s staying up late was 19%
  • the proportion of post-90s staying up late was 43%
  • post-00s those born after 2000
  • the rate of staying up late after 00 was 27%.
  • Figure 1 and Figure 2 that psychological stress is the primary reason that affects the sleep of Chinese people. Among the people who stay up late every day, the post-90s have the highest proportion.
  • Fig. 3a is a schematic diagram of a drowsiness change curve provided by an embodiment of the present application. As shown in Fig.
  • the horizontal axis of the schematic diagram of the curve is time, and the vertical axis is drowsiness.
  • the schematic diagram of the curve includes two curves, namely a "fake” sleepiness curve and a real sleepiness curve.
  • the "fake” sleepiness curve the user's sleepiness increases with time.
  • the real drowsiness curve the user's drowsiness increases with time, but the increase of the user's drowsiness before the user lies on the bed is greater than the increase of the user's drowsiness after the user lies on the bed.
  • Fig. 3b is a schematic diagram of yet another drowsiness change curve provided by an embodiment of the present application.
  • the horizontal axis of the schematic diagram of the curve is time, and the vertical axis is drowsiness. From this curve, it can be seen that the user reaches the extremely sleepy point before lying on the bed. At this time, the user's sleepiness is the highest, but the user still has to-do items unfinished and delays sleeping. When the user is lying on the bed, the user's brain In the excited state, the user's sleepiness has dropped a lot compared to the extremely sleepy point, and the sleepiness is low, which makes it difficult for the user to fall asleep.
  • the drowsiness depth of the user can be identified, and corresponding sleep assistance content is played for the user according to the drowsiness depth.
  • the user wears a wearable device
  • the wearable device collects the bioelectrical signal of the user, and extracts drowsiness identification information according to the bioelectrical signal;
  • the wearable device inputs the drowsiness identification information into a pre-trained drowsiness depth detection model for identification, Generate the user's current sleepiness depth and send the current sleepiness depth to the server;
  • the server matches the sleep aid content according to the current sleepiness depth, and sends the sleep aid content to the wearable device, so that the wearable device plays the sleep aid content to assist the user's sleep .
  • the related technology can match and play the corresponding sleep assistance content according to the user's drowsiness depth, which improves the scientificity of the played sleep assistance content and enhances the sleep assistance effect. monitoring and improvement, lack of tracking and management of the user's bedtime state.
  • the sleep stages of the user can also be detected and a sleep quality score can be calculated.
  • the user wears a wearable device, and the wearable device collects the user's heart rate variability signal and triaxial acceleration data; the wearable device divides the heart rate variability signal and triaxial acceleration data according to a specified time length, and extracts each time length. multiple characteristic parameters of the heart rate variability signal and triaxial acceleration data; the wearable device inputs multiple characteristic parameters within a time length into the pre-trained sleep stage prediction model to generate sleep stages within a time length; Multiple sleep stages during sleep time, and sleep quality scores are calculated based on sleep time and multiple sleep stages.
  • the related technology can process the user's heart rate variability signal and triaxial acceleration data to generate a sleep quality score, which provides an effective reference for users to manage their own sleep. Improve, lack of tracking and management of the user's bedtime state.
  • the present application provides a bedtime state detection method, which can accurately monitor a user's bedtime state, so that the user can grasp the complete state before and after sleep, thereby further improving their own sleep quality.
  • FIG. 4 is a schematic diagram of a bedtime state detection system provided by an embodiment of the present application.
  • the system includes at least one terminal device 201 and at least one wearable device 203 , and both the terminal device 201 and the wearable device 203 are for electronic equipment.
  • the terminal device 201 includes but is not limited to a mobile phone, a tablet computer, a speaker, and a personal computer;
  • the wearable device 203 includes but is not limited to a smart watch, a smart bracelet, a head-mounted display, augmented reality (AR), Virtual reality (virtual reality, referred to as: VR) equipment.
  • a bedtime state detection method provided by an embodiment of the present application can be applied to a bedtime state detection system.
  • the terminal device 201 can perform wireless communication with the wearable device 203 through a wireless communication technology, wherein the wireless communication technology includes: wireless local area networks (WLAN for short) (such as wireless fidelity (Wi-Fi for short)) network), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC) ), infrared technology (infrared, referred to as: IR) and so on.
  • WLAN wireless local area networks
  • BT wireless fidelity
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC near field communication
  • IR infrared technology
  • FIG. 5 is a schematic diagram of an external structure of a wearable device according to an embodiment of the present application.
  • the wearable device 203 includes a main microphone 150 , a secondary microphone 160 , a power button 210 , a receiver 140 and a display screen 170 .
  • the secondary microphone 160 is located at the top of the wearable device 203, and the main microphone 150 is located at the bottom of the wearable device.
  • the secondary microphone 160 and the primary microphone 150 can be symmetrically arranged on the wearable device in the shape of a small circular hole. 203 top and bottom.
  • the wearable device 203 is provided with two microphones, and uses the principle of dual microphone noise reduction to maintain stable calls. Among them, the main microphone 150 is used to collect the sound of the call, and the secondary microphone 160 is used to collect the noise around the call environment, and the sound of the call and the surrounding noise are processed in opposite directions, so as to achieve the purpose of noise reduction.
  • the power button 210 is located on the side of the wearable device 203.
  • the power button 210 is arranged on the side of the wearable device 203 in the form of a raised button, which is convenient for the user to operate while holding it. It also does not need to occupy the front area of the display screen 170, which can further increase the screen ratio.
  • the power button 210 can be used to control the wearable device 203, including the functions of keeping the screen on, brightening the screen, and turning on or off. The specific functions can be set according to user requirements.
  • the wearable device 203 when the wearable device 203 is in the on state, the user presses the power button 210 for a long time to turn the wearable device 203 into the off state; when the wearable device 203 is in the off-screen state, the user briefly presses the power button 210 to turn the wearable device 203 on. Screen.
  • the receiver 140 also called “earpiece” is located above the wearable device 203, and is used to convert audio electrical signals into sound signals. When the wearable device 203 answers a call or a voice message, the sound can be answered by bringing the receiver 140 close to the user's ear.
  • the display screen 170 is located on the front of the wearable device 203, and is used for displaying images or videos, and for receiving touch instructions input by the user.
  • the touch instructions include single click, double click, pressing or sliding.
  • a curved screen can also be a flat screen with no radian on the side.
  • the display screen 170 includes a display panel, and the display panel includes a liquid crystal display 170 (liquid crystal display, LCD for short), an organic light-emitting diode (OLED for short), an active matrix organic light emitting diode or an active matrix Active-matrix organic light emitting diode (AMOLED), flexible light-emitting diode (FLED), Mini LED, Micro LED, Micro OLED (Micro-OLED) or quantum dot light emitting diodes (quantum dot light emitting diodes, referred to as: QLED).
  • the display screen 170 includes a touch display screen.
  • the display screen 170 is also used for displaying the pre-sleep state curve for the user to view; the display screen 170 is also used for displaying the sleep quality score and providing a feedback result button for the user.
  • the difference between the terminal device 201 and the wearable device 203 is only the size of the display area of the display screen, that is, the size of the display screen of the terminal device 201 is larger than that of the wearable device 203 .
  • Other structures included in the terminal device 201 are the same as those included in the wearable device 203 , and details are not described herein again.
  • FIG. 6 is a schematic diagram of the internal structure of a wearable device provided by an embodiment of the application.
  • the wearable device 203 includes a memory 100, a processor 110, a communication module, a receiver 140, a main microphone 150, and a secondary microphone. 160 , a display screen 170 , a sensor module 180 and an interaction module 190 .
  • the sensor module 180 includes one or any combination of an acceleration (ACC) sensor 180a, a photoplethysmography sensor 180b, a brain wave sensor 180c and a humidity sensor 180d
  • the communication module includes a mobile communication module 120a and/or a wireless communication module 120b.
  • the memory 100, the processor 110 and the interaction module 190 can communicate with each other through an internal connection path to transmit control and/or data signals.
  • the memory 100 is used to store computer programs, and the processor 110 is used to call and run the computer from the memory 100. program.
  • Memory 100 may be read-only memory (ROM), other types of static storage devices that can store static information and instructions, random access memory (RAM), or other types of information and instructions that can be stored It can also be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disk storage, CD-ROM storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices, or can be used to carry or store desired program code in the form of instructions or data structures and Any other medium that can be accessed by a computer, etc.
  • ROM read-only memory
  • RAM random access memory
  • EEPROM electrically erasable programmable read-only memory
  • CD-ROM compact disc read-only memory
  • CD-ROM storage including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.
  • magnetic disk storage media or other magnetic storage devices, or can be used to carry
  • the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, referred to as: AP), a modem processor, a graphics processor (graphics processing unit, referred to as: GPU), Image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, neural-network processing unit (abbreviation: NPU) or any combination thereof. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, referred to as: AP
  • modem processor graphics processor
  • ISP Image signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • different processing units may be independent devices, or may be integrated in one or more processors.
  • the above-mentioned processor 110 and the memory 100 may be combined into a processing device, which is more commonly an independent component.
  • the processor 110 is configured to execute program codes stored in the memory 100 to implement the above functions.
  • the memory 100 may also be integrated in the processor 110 , or be independent of the processor 110 .
  • the processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, referred to as: I2C) interface, integrated circuit built-in audio (inter-integrated circuit sound, referred to as: I2S) interface, pulse code modulation (pulse code modulation, referred to as: PCM) interface, universal asynchronous Transmitter (universal asynchronous receiver/transmitter, referred to as: UART) interface, mobile industry processor interface (mobile industry processor interface, referred to as: MIPI), general-purpose input/output (general-purpose input/output, referred to as: GPIO) interface, user Identity module (subscriber identity module, referred to as: SIM) interface, universal serial bus (universal serial bus, referred to as: USB) interface one or any combination thereof.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous Transmitter
  • MIPI mobile industry processor interface
  • the interface connection relationship between the modules illustrated in the embodiments of the present application is only a schematic illustration, and does not constitute a structural limitation on the system architecture of the wearable device.
  • the wearable device may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the mobile communication module 120a can provide a wireless communication solution including 2G/3G/4G/5G etc. applied on the wearable device 203 .
  • the mobile communication module 120a may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA for short) and the like.
  • the wearable device 203 may further include the first antenna 130 .
  • the mobile communication module 120a can receive the electromagnetic wave by the first antenna 130, filter, amplify and other processing on the received electromagnetic wave, and transmit it to the modulation and demodulation processor for demodulation.
  • the mobile communication module 120a can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the first antenna 130 .
  • At least part of the functional modules of the mobile communication module 120a may be provided in the processor 110 . In some embodiments, at least some of the functional modules of the mobile communication module 120a may be provided in the same device as at least some of the modules of the processor 110.
  • the wireless communication module 120b can provide wireless local area networks (wireless local area networks, referred to as: WLAN) (such as wireless fidelity (wireless fidelity, referred to as: Wi-Fi) networks), Bluetooth (bluetooth, referred to as: BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (Infrared) IR) and other wireless communication solutions.
  • the wireless communication module 120b may be one or more devices integrating at least one communication processing module.
  • the wearable device 203 may further include the second antenna 131 .
  • the wireless communication module 120b receives electromagnetic waves via the second antenna 131 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 120b can also receive the signal to be sent from the processor 110, frequency-modulate the signal, amplify the signal, and then convert it into an electromagnetic wave for radiation through the second antenna 131.
  • the first antenna 130 is coupled with the mobile communication module 120a
  • the second antenna 131 is coupled with the wireless communication module 120b, so that the wearable device 203 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include a global system for mobile communications (GSM for short), a general packet radio service (GPRS for short), a code division multiple access (code division multiple access), Abbreviation: CDMA), wideband code division multiple access (WCDMA), time division code division multiple access (time-division code division multiple access, abbreviation: TDSCDMA), long term evolution (long term evolution, abbreviation: LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc.
  • GSM global system for mobile communications
  • GPRS general packet radio service
  • CDMA code division multiple access
  • WCDMA wideband code division multiple access
  • TDSCDMA time division code division multiple access
  • LTE long term evolution
  • BT GNSS
  • WLAN NFC
  • FM FM
  • the GNSS may include global positioning system (global positioning system, referred to as: GPS), global navigation satellite system (global navigation satellite system, referred to as: GLONASS), Beidou satellite navigation system (bei dou navigation satellite system, referred to as: BDS) , quasi-zenith satellite system (quasi-zenith satellite system, referred to as: QZSS) and/or satellite based augmentation systems (satellite based augmentation systems, referred to as: SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • Beidou satellite navigation system bei dou navigation satellite system, referred to as: BDS
  • BDS Beidou satellite navigation system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the receiver 140 is connected to the processor 110, and the receiver 140 is used for converting audio electrical signals into sound signals.
  • the main microphone 150 is connected to the processor 110, and the main microphone 150 is used for collecting the sound signal of the call and converting the sound signal into an electrical signal.
  • the user needs to make a call, send a voice signal, or trigger the wearable device 203 to perform a certain function through a voice assistant, the user can approach the main microphone and make a sound for the main microphone 150 to collect the sound signal.
  • the sub-microphone 160 is connected to the processor 110, and the sub-microphone 160 is used for collecting the noise around the call environment.
  • the wearable device 203 includes two microphones, the main microphone 150 and the secondary microphone 160, so that it can not only collect sound signals, but also realize a noise reduction function.
  • the wearable device may further be provided with three or four microphones, so as to realize the functions of collecting sound signals, reducing noise, identifying sound sources, and realizing directional recording.
  • the display screen 170 is connected to the processor 110, and the display screen 170 is used for receiving the touch command input by the user, and sending the touch command to the processor 110, so that the processor 110 can call the relevant interface according to the touch command and send the relevant interface Sent to the display screen 170, the display screen 170 displays the relevant interface; the display screen 170 is also used to display the pre-sleep state curve for the user to view; the display screen 170 is also used to display the sleep quality score and provide the user with a feedback result button.
  • the sensor module 180 is connected to the processor 110 , and the sensor module 180 is used for collecting state information of each sensor for the processor 110 to process.
  • the sensor module 180 includes an acceleration (Accelerometer, ACC for short) sensor 180a, a photoplethysmograph (PPG for short) sensor 180b, a brain wave sensor 180c and a humidity sensor 180d.
  • the acceleration sensor 180a is used to detect the first acceleration around the x-axis, the second acceleration around the y-axis, and the third acceleration around the z-axis of the wearable device 203 in the three-dimensional space.
  • the PPG sensor 180b is used to detect the user's heart rate signal and send the heart rate signal to the processor 110 .
  • the brain wave sensor 180 c is used to detect the user's brain electrical signals and send the brain electrical signals to the processor 110 .
  • the humidity sensor 180d is used to detect the humidity of the surrounding environment of the wearable device 203 and send the humidity to the processor 110 .
  • the interaction module 190 is connected to the processor 110, and the interaction module 190 is used for receiving a user's long-press operation or a short-press operation on the power key; the interaction module 190 is also used for receiving a feedback result input by the user.
  • the structure diagram shown in FIG. 6 does not constitute a specific limitation on the structure of the wearable device 203 .
  • the structure of the wearable device 203 may include more or less components than shown, or combine some components, or separate some components, or different component arrangements.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • the difference between the terminal device 201 and the wearable device 203 lies in the size of the display area of the display screen, the type of the sensor, and the computing capability of the processor, that is, the display of the terminal device 201
  • the area is larger than the display area of the wearable device 203;
  • the type of the sensor of the terminal device 201 can be different from the type of the sensor of the wearable device 203, for example: the wearable device 203 has the PPG sensor 108b, the terminal device 201 does not have the PPG sensor; the terminal device
  • the computing power of the processor of 201 is greater than the computing power of the processor of the wearable device 203 .
  • Other internal structures included in the terminal device 201 are the same as those included in the wearable device 203 , and details are not described herein again.
  • the user can turn on the terminal device 201 by turning on the power button, so that the display screen of the terminal device 201 displays the home page of the terminal device 201.
  • a schematic diagram of the homepage of the terminal device 201 is shown in FIG. 7 , the homepage includes a status bar 300 , a menu bar 400 and a function bar 500 .
  • Status bar 300 includes operator, current time, current geographic location and local weather, network status, signal status, and power level.
  • the operator is China Mobile; the current time is 08:08 on Monday, December 21; the current geographical location is Beijing, the weather in Beijing is cloudy and the temperature is 6 degrees Celsius; the network status is wifi network; the signal status is A full-scale signal indicates that the current signal is strong; the black part of the power supply can indicate the remaining power of the terminal device 201 .
  • An application can be installed in the terminal device. In the process of using the terminal device 201, the user will use various applications based on their different needs. For example, the terminal device 201 is installed with an application with a function of detecting the state before going to bed, that is, a sports health application . As shown in FIG.
  • the menu bar 400 includes icons of at least one application program, and the name of the corresponding application program is under the icon of each application program, such as: gallery, task card store, Weibo, sports health, WeChat, card package , Settings, Camera, Phone, SMS and Contacts.
  • the positions of the icon of the application program and the name of the corresponding application program may be adjusted according to the user's preference, which is not limited in this embodiment of the present application.
  • the function bar 500 includes a back key, a home key, and a menu key. The return key is used to return to the previous level, the home key is used to return to the home page, and the menu key is used to display multiple background applications.
  • FIG. 7 is an exemplary display of the embodiment of the present application, and the schematic diagram of the homepage of the terminal device 201 may also be in other styles, which are not limited in this embodiment of the present application.
  • Fig. 8 is a schematic diagram of a sports health interface provided by an embodiment of the present application.
  • the interface includes a classification column 410 and a plurality of functional modules 420, and the classification column 410 includes health, sports, equipment and mine. For example: when the user clicks on health, as shown in FIG.
  • the display screen of the terminal device 201 displays the interface of exercise health; when the user clicks on exercise, the display screen of the terminal device 201 displays the detailed exercise record of the user; when the user clicks on the device , the display screen of the terminal device 201 displays the device paired with the terminal device 201, and the user can perform pairing and removal operations on the device; when the user clicks on me, the display screen of the terminal device 201 can display personal information about the user , the user can update the personal information.
  • the function module 420 includes a sleep function module 421 , a step count function module 422 and a weight function module 423 .
  • the sleep function module 421 is used to record and display the latest sleep date and sleep duration, for example: the sleep duration on December 21 is 7.5 hours;
  • the step count function module 422 is used to record and display the current date and the current number of steps, for example: The current date is December 21, and the current number of steps is 1053 steps;
  • the weight function module 423 is used to record and display the latest weight record date and weight, for example: the last weight record date is December 20, and the weight is 49.5 Kilogram.
  • FIG. 9 is a schematic diagram of an interface of a sleep function module provided by an embodiment of the present application.
  • the interface includes enabling a bedtime detection module 431 and a sleep scoring module 432 .
  • the bedtime detection module 431 is used to start the bedtime detection function;
  • the sleep scoring module 432 is used to score the user's sleep quality, and display the score on the display screen.
  • the user can click to open the bedtime detection module 431, so that the display screen of the user's terminal device 201 displays an interface of the bedtime detection function.
  • FIG. 10 is a schematic diagram of a bedtime detection function interface provided by an embodiment of the application.
  • the interface includes a sleep state curve, and the horizontal axis of the bedtime state curve is a time point, and the time point is from 22:00 Start, it indicates that the terminal device 201 starts to perform bedtime detection and generate bedtime state score from 22:00; the vertical axis is bedtime state score; the current time is 08:08, so the current time has not reached 22:00, and the bedtime state score has not yet started.
  • Pre-bed detection and generation of bedtime state scores is a schematic diagram of another pre-sleep detection function interface provided by an embodiment of the application. As shown in FIG.
  • the interface includes a sleep state curve
  • the horizontal axis of the pre-sleep state curve is the time point
  • the vertical axis is the time before going to bed Status score
  • the current time is 23:08, indicating that the terminal device 201 starts to perform bedtime detection and generate bedtime status scores
  • one time point corresponds to a bedtime status score
  • the bedtime status scores corresponding to each time point are connected to generate Bedtime state curve.
  • the pre-sleep state score indicates the degree to which the user is currently suitable for sleep, and the higher the pre-sleep state score, the more suitable the user is to go to sleep.
  • the bedtime detection function interface further includes a function setting button 433 , and the user can click the function setting button 433 to set the work mode and detection time of bedtime detection.
  • FIG. 12 is a schematic diagram of a function setting interface provided by an embodiment of the present application. As shown in FIG. 12 , the user can input a desired detection time through the first setting operation. For example, the user inputs the desired detection time as 22:00, Then the terminal device 201 will start to perform bedtime detection at 22:00 every day.
  • the terminal device 201 can also perform bedtime detection according to a specified time interval, so as to realize the real-time bedtime detection of the user; optionally, the terminal device 201 can also perform bedtime detection in response to the user's activation operation of the bedtime detection module. For example, before going to bed, the user clicks the icon of the sports health application, the sleep function module 421 and the bedtime detection module 431 in sequence on the terminal device 201 to activate the bedtime detection function, and the user starts to respond to the activation operation. Check before going to bed. It should be noted that the above description is only an exemplary operation for enabling the terminal device 201 to start bedtime detection, and other methods may also be used to enable the terminal device to start bedtime detection, which is not limited in this embodiment of the present application.
  • the user can also select a desired working mode through the second setting operation, the working modes include a do not disturb mode, a reminder mode and a promotion mode, and the user can select one of the above three working modes.
  • the processor If the user selects the do not disturb mode, the processor only generates a state curve before going to bed, and does not remind the user, so as not to disturb the user.
  • the processor determines that the user is in the state of falling asleep and the current user state meets the reminder condition, and reminds the user through the set first reminder mode to remind the user to sleep.
  • the current user state includes a bedtime state curve, and the bedtime state curve includes a time point and a bedtime state score corresponding to each time point.
  • the reminder condition can be set so that the bedtime state score corresponding to the first specified number of consecutive time points gradually increases high.
  • the first specified number can be set according to the actual situation.
  • the first specified number is 3.
  • the reminder condition may also be set such that the pre-sleep state scores corresponding to the second consecutive second specified number of time points are all greater than the set score threshold.
  • the second specified number can be set according to the actual situation.
  • the second specified number is 3.
  • the scoring threshold can be set according to the actual situation. As an optional solution, the scoring threshold is 80 points.
  • the first reminder method includes displaying a breathing light and/or generating and displaying a reminder message.
  • Fig. 13a is a schematic diagram of an interface for a user to select a reminder mode provided by an embodiment of the application.
  • the user selects the reminder mode on the bedtime detection function interface and the desired detection time is 22:00, and the terminal device 201 is at 22:00.
  • bedtime testing begins.
  • the reminder condition is set to gradually increase the bedtime state score corresponding to three consecutive time points, and the first reminder mode is set to display the breathing light.
  • Fig. 13b is a schematic diagram of another bedtime state curve provided by an embodiment of the present application. As shown in Fig.
  • the former state score gradually increases, indicating that the state curve before going to bed satisfies the reminder condition.
  • Figure 13c is a schematic diagram of a reminder user interface provided by the embodiment of the application. When the state curve before going to sleep satisfies the reminder condition, the terminal device 201 displays the breathing light 434, to remind the user to sleep.
  • Fig. 14a is a schematic diagram of a user selecting a reminder mode interface provided by an embodiment of the application.
  • the user has selected the reminder mode on the bedtime detection function interface and the desired detection time is 22:00, and the terminal device 201 is at 22:00.
  • bedtime testing begins.
  • the reminder condition is set to three consecutive time points, the pre-sleep state scores are all greater than the set score threshold, the score threshold is set to 80 points, and the first reminder mode is set to generate and display a reminder message.
  • FIG. 14b is a schematic diagram of another bedtime state curve provided by an embodiment of the present application. As shown in FIG.
  • the horizontal axis of the bedtime state curve is the time point, and the vertical axis is the bedtime state score. It can be seen from Figure 14b that the score of the bedtime state corresponding to 22:35 is 82 points; the bedtime state score corresponding to 22:40 is 85 points; the bedtime state score corresponding to 22:45 is 90 points, that is: 3 consecutive
  • the pre-sleep state scores corresponding to each time point are all greater than the set score threshold, indicating that the pre-sleep state curve satisfies the reminder condition.
  • Figure 14c is a schematic diagram of another reminder user interface provided by the embodiment of the application. condition, the terminal device 201 generates and displays a reminder message to remind the user to sleep, for example, the reminder message is: exercise health reminds you that it is time to sleep.
  • the reminder condition may also be set to other conditions, and the first reminder mode may also be set to other forms.
  • the embodiments of the present application are only illustratively described here, and are not limited thereto.
  • Fig. 15a is a schematic diagram of a user-selected promotion mode interface provided by an embodiment of the application.
  • the user if the user selects the promotion mode, the user needs to input a third setting operation, that is, input a desired promotion time, for example: promotion The time is set to 23:00. If the user is in a driving state and the current time is greater than the promotion time, the user is reminded by the set second reminder mode; if the user is in a non-driving state and the current time is greater than the promotion time, the user is reminded through the set third reminder mode.
  • the second reminder method includes playing the first type of music, which is refreshing music to avoid danger caused by excessive drowsiness during driving;
  • the third reminder method includes playing the second type of music, and the second type of music is White noise music to enhance user drowsiness.
  • the user selects the promotion mode and the desired promotion time is 23:00.
  • the current time is 23:08, which is greater than the promotion time.
  • the terminal device 201 can play rock music, and the wearable device vibrates at the same time, so as to prevent the user from being too drowsy and dangerous during driving.
  • Fig. 15b is this application.
  • Another schematic diagram of a reminder user interface provided by an embodiment, the interface includes a music player, and the music player is playing rock music.
  • the display screen of the terminal device 201 keeps displaying the music player for a duration greater than or equal to the specified duration, the display screen is turned off.
  • FIG. 15c is a schematic diagram of another reminding user interface provided by the embodiment of the present application.
  • the interface includes a music player , the music player is playing white noise.
  • the display screen of the terminal device 201 keeps displaying the music player for a duration greater than or equal to the specified duration, the display screen is turned off.
  • the specified duration can be set according to user requirements, for example, the specified duration is 30 seconds.
  • promotion mode can be selected on the terminal device, and the first type of music or the second type of music can be played on the wearable device and/or the terminal device; And/or the first type of music or the second type of music is played on the terminal device.
  • the second reminder mode and the third reminder mode may also be set to other forms, and the embodiments of the present application are only illustratively described here, and the specific forms of the reminder mode are not limited.
  • Fig. 16a is a schematic diagram of a sleep function module interface provided by an embodiment of the present application. As shown in Fig. 16a, the interface includes enabling the bedtime detection module 431. And the sleep scoring module 432, the user can click on the sleep scoring module 432, so that the display screen of the terminal device 201 displays the interface of sleep scoring.
  • Fig. 16b is a schematic diagram of a sleep scoring interface provided by an embodiment of the present application. As shown in Fig. 16b, the interface includes a date, a sleep duration, and a sleep quality score. for 7.5 hours. Users can also click the double triangle to the left of the date to view the previous day's sleep quality score and sleep duration.
  • FIG. 17 is a schematic diagram of a homepage of a wearable device provided by an embodiment of the present application.
  • the homepage includes the current time , current geographic location, local weather and icons of multiple applications, as shown in Figure 17, the current time is 08:08 on Monday, December 21; the current geographic location is Beijing, the weather in Beijing is cloudy and the temperature is 6 degrees Celsius, Icons for multiple applications include: Gallery, Weibo, Sports Health, WeChat, SMS, and Contacts.
  • the user can click the icon of the sports health application, so that the display screen of the user's wearable device 203 displays the sports health interface.
  • the schematic diagram of the sports health interface of the wearable device 203 is the same as the schematic diagram of the sports interface of the terminal device 201, and the difference is only in the size of the display area of the display screen, that is, the display area of the terminal device 201 is larger, and the wearable The display area of device 203 is small. It is not repeated here.
  • the user can also turn on the sleep function module through the wearable device 203 to check the sleep date and sleep duration, turn on the step count function module to check the current number of steps, turn on the weight function module to check the weight; the user can also use the sleep function module to check the weight.
  • Open the bedtime detection module to view the bedtime state curve, set the detection time, and select the work mode of bedtime detection; you can also open the sleep score module to view the sleep quality score.
  • the specific interface and operation process can be referred to FIG. 7 to FIG. 16b, which will not be repeated here.
  • FIG. 18 is a schematic structural diagram of a processor of an electronic device provided by an embodiment of the present application.
  • the processor 110 of the electronic device includes a falling asleep module 111 , a pre-sleep evaluation module 113 , and a sleep staging and evaluation module 115 .
  • the falling asleep module 111 is respectively connected with the pre-sleep evaluation module 113 and the sleep staging and evaluation module 115 .
  • the falling asleep module 111 can receive the first signal sent by the sensor module 180; extract the first characteristic parameter from the first signal; Sleeping state and suspected falling asleep state.
  • the falling asleep state is a state in which the user is sleeping
  • the falling asleep state is a state in which the user is awake
  • the suspected falling asleep state is a state in which the user may be sleeping. If the first sleeping state of the user is a suspected falling asleep state, it indicates that it is not currently determined that the user is in a sleeping or awake state, and more first signals need to be collected for further judgment.
  • the first sleep state is the sleep state
  • the first sleep state is sent to the sleep staging and evaluation module 115, and the sleep staging and evaluation module 115 can receive the user's third sleep state sent by the sleep and fall module 111.
  • the third sleep state includes falling asleep state, falling asleep and suspected falling asleep. If the third sleep state is the falling asleep state or the suspected falling asleep state, continue to perform the step of receiving the third sleep state of the user sent by the falling asleep module 111; if the third sleeping state is the falling asleep state, the sleep staging and evaluation module 115 generates a sleep quality score.
  • the pre-sleep evaluation module 113 may receive the first signal sent by the sensor module 180; extract the first characteristic parameter from the first signal, and use the pre-sleep state evaluation model according to the first characteristic parameter , to generate a bedtime state score; according to the bedtime state score, generate a bedtime state curve, and send the generated bedtime state curve to the display screen 170 for the display screen 170 to display the bedtime state curve; continue to receive the falling asleep module 111
  • the second sleep state sent, the second sleep state includes falling asleep state, falling asleep state and suspected falling asleep state, if the second sleeping state includes falling asleep state, turn off the pre-sleep evaluation module 113, and open the sleep staging and evaluation module 115;
  • the second sleeping state includes the suspected falling asleep state, indicating that it is not currently determined that the user is in a sleeping or awake state, and more first signals need to be collected for further judgment, then the falling asleep module 111 continues to receive the first signal sent by the sensor module 180;
  • the first characteristic parameter is
  • the falling asleep module 111 continues to receive the first signal sent by the sensor module 180. signal; extracting a first characteristic parameter from the first signal; generating a second sleep state of the user according to the first characteristic parameter.
  • FIG. 19 is an algorithm flowchart of a method for detecting a bedtime state provided by an embodiment of the application.
  • the wearable device obtains the current time. If the current time is less than the set detection time, the current time time; if the current time is greater than or equal to the set detection time, obtain the first signal of the user according to the first time interval (step 11).
  • the sleep module 111 of the processor starts the sleep module 111 of the processor to detect the first sleep state (step 12), if the sleep module 111 detects that the user's first sleep state is the sleep state, open the sleep stage and evaluation module 115 (step 13), and the sleep stage And the evaluation module 115 receives the third sleep state sent by the falling asleep module 111, and judges whether the third sleep state is the falling asleep state (step 14), if not, continue to perform step 14; if so, close the sleep stage and the evaluation module 115 (step 14). 15), save the first signal and the sleep quality score generated by the sleep stage evaluation module 115 (step 16). If it is detected that the first sleep state of the user is suspected of falling asleep or falling out of sleep, the pre-sleep evaluation module 113 is activated (step 17 ).
  • the state score dynamically generates a bedtime state curve (step 18); the bedtime evaluation module 113 obtains the second sleep state sent by the falling asleep module 111, and judges whether the second sleep state is the sleep state (step 19), and if so, execute step 13; If not, judge whether the second sleep state is a suspected sleep state (step 20), if yes, go to step 18; if not, identify the working mode (step 21), if the working mode is the do not disturb mode, continue to execute step 18; The mode is the reminder mode, and it is judged whether the state curve before going to bed meets the set reminder condition (22), if so, remind the user (step 23), and continue to execute step 18; if not, continue to execute step 18; if the working mode is the promotion mode , judge whether the promotion time is not empty and whether the current time is greater than the promotion time (step 24), if so, judge whether the user is in a driving state (step 25), if so, play the first type of music to refresh the user (step 26), continue to perform steps 18; If
  • step 21 identifies the working mode and can be executed before step 19 or step 20. If it is the reminder mode, there is no need to obtain the second sleep state, and the bedtime state is directly determined. Whether the curve meets the setting reminder conditions.
  • FIG. 20 is a flowchart of a method for detecting a bedtime state provided by an embodiment of the present application. As shown in FIG. 20 , the method includes:
  • Step 102 Obtain the current time.
  • the current time shown in FIG. 10 is 8:08
  • the current time shown in FIG. The current time is 23:08.
  • Step 104 determine whether the current time is greater than or equal to the set detection time, if yes, go to step 106 ; if not, go to step 102 .
  • the set detection time is the time to start tracking the first signal, and the user can set it according to his actual needs.
  • the detection time input by the user through the first setting operation is 22:00.
  • the interaction module of the electronic device receives a first setting operation input by the user, where the first setting operation includes an operation of setting the detection time; the processor of the electronic device sets the detection time in response to the first setting operation.
  • the first setting operation corresponds to one or any combination of the multiple operations shown in FIG. 7 to FIG. 12 .
  • the processor of the wearable device determines that the current time is greater than or equal to the detection time, it indicates that the acquisition of the user's first signal can begin, and step 106 is continued; if it is determined that the current time is less than the detection time, it indicates that it has not arrived Obtain the time of the user's first signal, and after a period of time, continue to perform step 102 . For example, if the current time is 22:30 and the detection time is 22:00, the processor of the wearable device determines that the current time 22:30 is greater than the detection time 22:00, indicating that the user's first signal can be obtained, and the steps are continued. 106.
  • the processor of the wearable device determines that the current time 21:00 is less than the detection time 22:00, indicating that it is not time to obtain the user's first signal. After 10 minutes, the current time is re-acquired, that is, step 102 is continued.
  • Step 106 Acquire the first signal of the user according to the set first time interval.
  • the first time interval may be set according to actual conditions.
  • the first time interval is 500 milliseconds (ms).
  • the first time interval is 1 second (s).
  • the first signal includes one of an acceleration signal, a heart rate signal, and an electroencephalogram signal, or any combination thereof.
  • the first signal may further include a humidity signal and/or a noise signal, and the humidity signal and/or the noise signal are used as auxiliary signals, which can further improve the accuracy of the subsequently generated bedtime state score.
  • the user wears the wearable device, and the acceleration sensor of the wearable device will detect the acceleration signal of the wearable device, and send the acceleration signal to the processor, so that the processor can obtain the acceleration signal, and the acceleration signal includes electronic
  • the device has a first acceleration around the x-axis, a second acceleration around the y-axis, and a third acceleration around the z-axis in three-dimensional space.
  • the PPG sensor can detect the heart rate signal of the user.
  • the PPG sensor includes a light emitting diode (LED), and the LED sends a light signal to the skin tissue, and the skin tissue reflects the light signal and reflects it back to the PPG sensor. Reflected light signal; the PPG sensor converts the reflected light signal into an electrical signal, and then converts the electrical signal into a digital signal through analog-to-digital (A/D) conversion, which is the heart rate signal; the PPG sensor sends the heart rate signal to the processing so that the processor can obtain the heart rate signal.
  • A/D analog-to-digital
  • the brain wave sensor can detect the user's brain electrical signal, and send the brain electrical signal to the processor, so that the processor can obtain the brain electrical signal, and the processor preprocesses the brain electrical signal, After the signal is extracted, the amplitude and frequency of the EEG signal can be obtained.
  • the EEG frequency can reflect the user's brain activity. The higher the EEG frequency, the more active the user's brain activity is; the lower the EEG frequency, the quieter the user's brain activity.
  • the humidity sensor can detect the humidity signal, and send the humidity signal to the processor, so that the processor obtains the humidity signal and converts it into a humidity value, and the humidity signal includes the humidity of the surrounding environment of the wearable device.
  • the humidity sensor has a humidity sensor, and a film made of a humidity-sensitive material is covered on the substrate of the humidity sensor. When the water vapor in the air is adsorbed on the humidity-sensitive film, the resistance value of the humidity sensor will change. Changed, the humidity signal includes the resistance value of the humidity sensor.
  • the secondary microphone may collect the noise signal and send the noise signal to the processor.
  • the processor obtains the noise signal, and the noise signal includes the noise of the surrounding environment of the wearable device.
  • Step 108 Extract the first characteristic parameter from the first signal.
  • the processor of the electronic device extracts the first characteristic parameter from the first signal.
  • the electronic device is a wearable device or a terminal device.
  • the first characteristic parameter includes a first acceleration around the x-axis, a second acceleration around the y-axis, and a third acceleration around the z-axis of the electronic device in three-dimensional space.
  • the processor extracts the first acceleration, the second acceleration and the third acceleration from the acceleration signal.
  • the first characteristic parameter further includes the movement time interval.
  • the memory stores a plurality of historical acceleration signals and the time corresponding to each historical acceleration signal; the processor queries the memory for at least one motion acceleration signal that satisfies the motion quantity condition and the time corresponding to each motion acceleration signal, and the motion quantity condition Including that the first acceleration is greater than the set first acceleration threshold and/or the second acceleration is greater than the set second acceleration threshold and/or the third acceleration is greater than the set third acceleration threshold, wherein the first acceleration threshold, the second acceleration threshold and The third acceleration threshold can be set according to the actual situation; the processor queries the motion time closest to the current time from the time corresponding to each motion acceleration signal; the processor calculates the motion time interval according to the motion time and the current time.
  • the processor extracts the heart rate variability from the heart rate signal by specifying an analysis method.
  • the specified analysis method includes a time domain analysis method, a frequency domain analysis method or a nonlinear analysis method.
  • the first characteristic parameter when the first signal includes an EEG signal, the first characteristic parameter includes an EEG waveform.
  • the EEG signal includes an EEG frequency
  • the processor extracts the EEG frequency from the EEG signal, and generates an EEG waveform according to the EEG frequency.
  • EEG waveforms include delta waves, theta waves, alpha waves and beta waves.
  • the EEG frequency of the delta wave is 1-3 Hz and the amplitude is 20-200 ⁇ V. Under extreme fatigue and lethargy or anesthesia, this band can be recorded in the temporal lobe and parietal lobe; the EEG frequency of theta wave is 4 to 7 Hz, and the amplitude is 5 to 20 ⁇ V.
  • Theta waves are prone to appear; the EEG frequencies of alpha waves are 8-13Hz, and the amplitude is 20-100 ⁇ V. People are most likely to appear alpha waves when the brain is quiet and eyes are closed; the EEG frequencies of beta waves are 14-30Hz, and the amplitude is 100 ⁇ 150 ⁇ V, when people are nervous, emotional or excited, ⁇ waves are likely to appear.
  • the first characteristic parameter includes humidity.
  • the humidity signal includes the resistance value of the humidity sensing element, and the processor generates humidity corresponding to the resistance value according to the resistance value, where the humidity is the humidity of the surrounding environment of the electronic device.
  • the processor extracts the noise from the noise signal, and the noise is the noise of the surrounding environment of the electronic device.
  • Step 110 Determine the first sleep state of the user according to the first characteristic parameter. If the first sleep state is a sleep state, go to step 116; if the first sleep state is a suspected sleep state or a sleep out state, go to step 112.
  • the processor inputs the first characteristic parameter into a support vector machine (SVM) model, and outputs the first sleep state of the user.
  • the first sleep state of the user includes a sleep-in state, a suspected sleep-in state, or a sleep-out state.
  • the falling asleep state is a state in which the user is sleeping
  • the falling asleep state is a state in which the user is awake
  • the suspected falling asleep state is a state in which the user may be sleeping.
  • the first characteristic parameter includes exercise time interval, heart rate variability and brain wave pattern.
  • the exercise time interval is less than the first threshold, the heart rate variability is less than the second threshold, and the EEG waveform is ⁇ wave, it can be determined that the user's The first sleep state is the state of falling asleep; if the exercise time interval is greater than or equal to the first threshold and less than the third threshold, the heart rate variability is greater than or equal to the second threshold and less than the fourth threshold, and the EEG waveform is alpha wave, it can be It is determined that the user's first sleep state is a suspected sleep state; if the exercise time interval is greater than or equal to the third threshold, the heart rate variability is greater than or equal to the fourth threshold, and the brain wave pattern is delta waves, the user's first sleep state can be determined.
  • the state is sleep state.
  • the sleep state of the user may also be generated in other manners, which is only illustratively described here, and the embodiment of the present application does not limit the manner of generating the sleep state of the user.
  • Step 112 generating a pre-sleep state score according to the first characteristic parameter through the pre-sleep state evaluation model.
  • the processor inputs the first characteristic parameter into the bedtime state evaluation model to generate a bedtime state score.
  • the pre-sleep state score indicates the degree to which the user is currently suitable for sleep, and the higher the pre-sleep state score, the more suitable the user is to sleep.
  • a pre-sleep state score is output according to a specified time interval, which can better reflect the user's pre-sleep state.
  • a time interval of 5 minutes.
  • FIG. 21 is a flowchart of constructing a pre-sleep state evaluation model provided by the embodiment of the application. As shown in FIG. 21 , the construction process includes:
  • Step 202 Acquire an initial first signal.
  • multiple subjects may be recruited, the first signal of each subject may be collected, and the collected first signal may be determined as the initial first signal.
  • the recruited subjects need to be widely distributed in terms of gender, age and occupation, which can improve the accuracy of the bedtime state assessment model.
  • the initial first signal includes one of an acceleration signal, a heart rate signal, and an electroencephalogram signal, or any combination thereof.
  • the initial first signal may further include a humidity signal and/or a noise signal, and the humidity signal and/or the noise signal are used as auxiliary signals, which can further improve the accuracy of the constructed pre-sleep state evaluation model.
  • Step 204 Extract the initial first characteristic parameter from the initial first signal.
  • the first characteristic parameter includes the first acceleration of the electronic device around the x-axis, the second acceleration around the y-axis, and the third acceleration around the z-axis in the three-dimensional space.
  • the initial first characteristic parameter when the initial first signal includes a heart rate signal, the initial first characteristic parameter includes heart rate variability.
  • the initial first characteristic parameter includes heart rate variability.
  • the first characteristic parameter when the first signal includes an EEG signal, the first characteristic parameter includes an EEG waveform.
  • the first characteristic parameter includes an EEG waveform.
  • the first characteristic parameter when the first signal includes a humidity signal, the first characteristic parameter includes humidity.
  • the first characteristic parameter includes humidity.
  • the first characteristic parameter when the first signal includes a noise signal, the first characteristic parameter includes noise.
  • the first characteristic parameter when the first signal includes a noise signal, the first characteristic parameter includes noise.
  • Step 206 Obtain an initial sleep quality score.
  • the initial first characteristic parameter is divided into a training set and a test set
  • the training set is input into the random forest classification generator for training, and a sleep quality evaluation model is generated
  • the test set is input into the sleep quality evaluation model, and the initial sleep quality is output. Quality rating.
  • Step 208 generating a pre-sleep label value according to the initial sleep quality score.
  • the initial sleep quality score is corrected to generate a pre-sleep label value. For example: display the initial sleep quality score to the user through the display screen, and receive the feedback result input by the user by clicking the set feedback result button.
  • the feedback result includes high, accurate or low. If the feedback result input by the user is high, Then the initial sleep quality score is subtracted from the set first threshold to generate the pre-sleep label value.
  • the first threshold is 10; if the feedback result input by the user is accurate, then the initial sleep quality score can accurately represent The sleep quality of the user, the initial sleep quality score is determined as the bedtime label value; if the feedback result input by the user is low, the initial sleep quality score is subtracted from the set second threshold to generate the bedtime label value, which is used as a bedtime label value.
  • the second threshold is 10.
  • the sleep quality score may be on a percentile scale.
  • steps 202 to 204 and steps 206 to 208 are not limited, that is, steps 202 to 204 may be executed first, and then steps 206 to 208 may be executed; or steps may be executed first Step 206 to step 208, and then perform step 202 to step 204.
  • Step 210 Input the initial first feature parameter and the pre-sleep label value into the machine learning algorithm for training, and generate a pre-sleep state evaluation model.
  • the machine learning algorithm includes a decision tree algorithm, a least squares algorithm, or a linear regression algorithm.
  • Step 114 generating a bedtime state curve according to the bedtime state score.
  • each time the processor outputs a bedtime state score according to a specified time interval the generated bedtime state score is connected with the bedtime state score output at the previous time interval to generate a bedtime state curve, and the bedtime state curve is generated.
  • the pre-sleep state curve is sent to the display; the display shows the pre-sleep state curve for the user to view at any time.
  • FIGS. 22a to 22e are schematic diagrams of generating a state curve provided by an embodiment of the present application. As shown in FIG. 22a, at 22:00, the processor outputs a state score 70 before going to bed.
  • the processor outputs a bedtime state score of 65, records the bedtime state score, and connects with the bedtime state score corresponding to 70 at 22:00, and connects The bedtime state curve after the line is shown in Figure 22b; at 22:20, the processor outputs a bedtime state score of 73 points, records the bedtime state score, and compares it with the bedtime state score of 65 points corresponding to 22:10.
  • the processor outputs a bedtime state score of 75 points, records the bedtime state score, and records the bedtime state score corresponding to the bedtime state at 22:20 The score of 73 points is connected, and the bedtime state curve after the connection is shown in Figure 22d; at 22:40, the processor outputs a bedtime state score of 80 points, records the bedtime state score, and corresponds to 22:30 The bedtime state score of 75 points is connected, and the bedtime state curve after the connection is shown in Figure 22e.
  • the processor dynamically generates the bedtime state curve according to the output bedtime state score, which can not only reduce the power consumption of the device, but also better reflect the user's bedtime state.
  • the specified time interval can be set according to the power consumption of the device and the reflection effect of the user's bedtime state.
  • the processor may acquire the first signal according to a relatively small first time interval and generate a bedtime state score according to the first signal, and if a bedtime state score is output every time a bedtime state score is generated, the generated bedtime state curve
  • the pre-sleep state scores corresponding to the time point of are relatively dense, although it can accurately reflect the user's pre-sleep state, it will also lead to high power consumption of the device; if the pre-sleep state score is output according to the specified time interval, that is: If the corresponding bedtime state score is output at the time point, the generated bedtime state curve can not only better reflect the bedtime state of the user, but also reduce the power consumption of the device in the process of generating the bedtime state curve.
  • the interaction module of the electronic device receives a first query operation input by the user, and the first query operation includes an operation of querying the bedtime state curve; the processor of the electronic device responds to the first query operation, The curve is sent to the display, which shows the bedtime state curve.
  • Electronic devices include wearable devices or terminal devices.
  • the first query operation may correspond to one or any combination of the multiple operations shown in FIG. 7 to FIG. 10 .
  • the bedtime state curve includes a time point and a bedtime state score corresponding to each time point.
  • Fig. 13b is a schematic diagram of a bedtime state curve provided by an embodiment of the present application. As shown in Fig. 13b, the horizontal axis of the bedtime state curve is a time point, and the vertical axis is a bedtime state score.
  • the score of the bedtime state corresponding to 22:00 is 65 points; the bedtime state score corresponding to 22:05 is 50 points; the bedtime state score corresponding to 22:10 is 55 points; the bedtime state score corresponding to 22:15 is 55 points; 22:20 corresponds to 60 points; 22:25 corresponds to 57 points; 22:30 corresponds to 75 points; 22:30 corresponds to 75 points. 35 corresponds to a bedtime state score of 80 points; 22:40 corresponds to a bedtime state score of 85 points.
  • the user can view the state curve before going to bed through the display screen of the electronic device, so as to provide a personalized reference for the user's management of his own work and rest.
  • the user can decide when to sleep according to the bedtime state curve, or review the bedtime state of the previous night after waking up the next day, so as to adjust the sleep time and improve the user's sleep quality.
  • Step 116 Acquire the second sleep state of the user. If the sleep state includes the falling asleep state, go to step 118; if the sleep state includes the suspected falling asleep state, go to step 106;
  • the sleeping module of the processor inputs the first characteristic parameter into the support vector machine (SVM) model, and outputs the second sleep state of the user, so that the pre-sleep evaluation module or the sleep staging and evaluation module of the processor
  • the second sleep state of the user can be acquired.
  • the second sleep state includes a sleep-in state, a sleep-out state, or a suspected sleep-in state.
  • the falling asleep state is a state in which the user is sleeping
  • the falling asleep state is a state in which the user is awake
  • the suspected falling asleep state is a state in which the user may be sleeping.
  • the sleep state of the user may also be generated in other manners, which is only illustratively described here, and the embodiment of the present application does not limit the manner of generating the sleep state of the user.
  • Step 118 record the time to fall asleep.
  • step 110 or step 116 If the sleep state of the user generated in step 110 or step 116 is the sleep state, the current time of the electronic device is recorded as the time to fall asleep, and step 120 is further performed to obtain the user's sleep state at a second time interval. first signal.
  • Step 120 Acquire the first signal of the user according to the second time interval.
  • the second time interval may be set according to actual conditions. For example, if it is necessary to further improve the accuracy of the current sleep state generated by the subsequent steps, as an optional solution, the second time interval can be set to 1 minute; if it is necessary to reduce the power consumption of the electronic device, as an optional solution, The second time interval can be set to 5 minutes.
  • the first signal includes one of an acceleration signal, a heart rate signal and an electroencephalogram signal or any combination thereof.
  • the first signal may further include a humidity signal and/or a noise signal, and the humidity signal and/or the noise signal are used as auxiliary signals, which can further improve the accuracy of the current sleep state generated by the subsequent steps.
  • Step 122 Generate a third sleep state of the user according to the first signal.
  • the processor extracts the first characteristic parameter from the first signal.
  • the first characteristic parameter includes heart rate variability
  • the first signal includes an EEG signal
  • the first characteristic parameter includes an EEG waveform.
  • the specific extraction process please refer to step 108; when the first signal includes a humidity signal, the first characteristic parameter includes humidity; when the first signal includes a noise signal, the first characteristic parameter includes noise.
  • step 108 which will not be repeated here.
  • the processor inputs the first characteristic parameter into a support vector machine (SVM) model, and outputs the third sleep state of the user.
  • the third sleep state includes a sleep-in state, a suspected sleep-in state, or a sleep-out state.
  • the third sleep state of the user may also be generated in other manners, which is only illustratively described here, and the embodiment of the present application does not limit the manner of generating the third sleep state of the user.
  • Step 124 determine whether the third sleep state includes the falling asleep state, if yes, go to step 126 ; if not, go to step 120 .
  • the third sleep state includes the falling asleep state, it indicates that the user has woken up, and the step 126 is continued; if it is determined that the third sleeping state does not include the falling asleep state, it indicates that the user is still sleeping, and the process continues Step 120 is performed.
  • Step 126 Generate a sleep quality score, and the process ends.
  • step 126 specifically includes:
  • Step 1262 Record the sleep time and calculate the sleep time.
  • the time to fall asleep is subtracted from the time to fall asleep to calculate the sleep duration.
  • Step 1264 Divide the first signal of the entire sleep duration according to the specified duration, and generate each duration and the corresponding first signal.
  • Step 1266 Extract the first characteristic parameter from the first signal of each time length.
  • Step 1268 Input the first characteristic parameter into the trained sleep stage prediction model to generate sleep stages within each time length.
  • Step 1270 Calculate a sleep quality score according to the sleep stage and sleep duration in each time length.
  • a sleep quality score is generated by calculating the sleep stage and sleep duration in each time length through the set sleep quality formula.
  • sleep stages include the first stage, the second stage, the third stage and the fourth stage.
  • the brain waves are dominated by theta waves, without spindle waves or K complex waves. It is a transitional stage from fully awake to sleep. The response to external stimuli is weakened, mental activity enters a floating state, and thinking and reality are disconnected.
  • the brain waves are mainly spindle waves and K complex waves, and the delta wave is less than 20%; in the third stage, the brain wave delta wave accounts for 20% to 50%; in the fourth stage, the brain wave delta wave accounts for 50%. above.
  • the sleep quality score may also be generated in other manners, which is only illustratively described here, and the embodiment of the present application does not limit the manner of generating the sleep quality score.
  • the interaction module of the electronic device receives the second query operation input by the user, and the second query operation includes the operation of querying the sleep quality score; the processor of the electronic device sends the sleep quality score to the second query operation in response to the second query operation. Display, the display shows the sleep quality score.
  • the second query operation corresponds to one or any combination of the multiple operations shown in FIG. 16a to FIG. 16b.
  • the sleep quality score indicates the sleep quality of the user, and the higher the sleep quality score, the better the sleep quality of the user.
  • the sleep quality score may also be calculated in other manners, which is only illustratively described here, and the embodiment of the present application does not limit the manner of calculating the sleep quality score.
  • the sleep quality score is stored in the memory.
  • FIG. 23 is a flowchart of updating and training a bedtime state evaluation model provided by an embodiment of the present application.
  • the training process includes: the processor sends the sleep quality score to the Display screen; the display screen displays the sleep quality score and provides the user with a feedback result button; the interaction unit receives the feedback result input by the user, and sends the feedback result to the processor; the processor corrects the label value before going to bed according to the feedback result, and learns through online learning
  • the algorithm updates the bedtime state assessment model online.
  • the feedback results include high, accurate, or low.
  • the pre-sleep state evaluation model when the user uses the electronic device, the pre-sleep state evaluation model is updated and trained, so that the pre-sleep state evaluation model can learn the user's personalized physiological laws, and can provide the user with more and more accurate sleep patterns. pre-status score.
  • Step 128 Determine whether the current user status satisfies the set reminder condition, if yes, go to Step 130; if not, go to Step 106.
  • the current user state includes a bedtime state curve
  • the bedtime state curve includes a time point and a bedtime state score corresponding to each time point
  • the reminder condition includes a first specified number of consecutive time points corresponding to bedtime
  • the status score gradually increased.
  • the first specified number can be set according to the actual situation.
  • the first specified number is 3.
  • 22:25 corresponds to a bedtime state score of 57 points
  • 22:30 corresponds to a bedtime state score of 75 points
  • 22:35 corresponds to a bedtime state score of 80 points
  • 22:40 corresponds to a bedtime state score of 80 points
  • the bedtime state score is 85 points, namely: 22:30, 22:35 and 22:40.
  • the bedtime state score corresponding to three consecutive time points gradually increases, indicating that the bedtime state curve meets the reminder condition, and the steps are continued. 128.
  • the current user state includes a bedtime state curve
  • the bedtime state curve includes a time point and a bedtime state score corresponding to each time point
  • the reminder condition includes a second consecutive specified number of time points corresponding to sleep
  • the previous state scores are all greater than the set score threshold.
  • the second specified number can be set according to the actual situation.
  • the second specified number is 3.
  • the scoring threshold can be set according to the actual situation.
  • the scoring threshold is 80 points. For example, as shown in Figure 14b, the horizontal axis of the bedtime state curve is the time point, and the vertical axis is the bedtime state score.
  • the score of the bedtime state corresponding to 22:35 is 82 points; the bedtime state score corresponding to 22:40 is 85 points; the bedtime state score corresponding to 22:45 is 90 points, that is, three consecutive
  • the pre-sleep state scores corresponding to each time point are all greater than the set score threshold, indicating that the pre-sleep state curve meets the reminder condition, and step 128 is continued.
  • the current user state includes the user's driving state
  • the reminder condition includes that the user is in the driving state and the acquired current time is greater than the set promotion time. If the user is in the driving state and the current time is greater than the promotion time, it indicates that the current user state satisfies the reminder condition, and proceeds to step 130; if the user is in the non-driving state and the current time is greater than the promotion time, it indicates that the current user state meets the reminder condition, and proceeds to step 130 ; If the current time is less than or equal to the promotion time, it indicates that the current user state does not meet the reminder condition, and step 106 is continued.
  • the promotion time is the time for judging the driving state, and the user can set it according to the actual situation.
  • the promotion time is set to 23:00.
  • the interaction module of the electronic device receives a third setting operation input by the user, where the third setting operation includes an operation of setting the promotion time; the processor of the electronic device sets the promotion time in response to the third setting operation.
  • the third setting operation corresponds to FIG. 15a.
  • judging whether the user is in a driving state specifically includes the processor judging whether there is a connection channel between the wireless communication module and the vehicle-mounted device or whether the motion trajectory of the electronic device is an arc-shaped structure. There is a connection channel between the devices or the movement trajectory of the electronic device is an arc-shaped structure, indicating that the user is in a driving state; if it is determined that there is no connection channel between the wireless communication module and the in-vehicle device and the movement trajectory of the electronic device is not an arc-shaped structure , indicating that the user is not driving.
  • the acceleration sensor in the electronic device can determine whether the motion trajectory of the electronic device is based on the variation law of the first acceleration around the x-axis, the second acceleration around the y-axis, and the third acceleration around the z-axis of the electronic device in three-dimensional space. For the arc-shaped structure, if it is determined that one of the first acceleration, the second acceleration and the third acceleration or any combination thereof is not zero within the first time period, it indicates that the motion trajectory of the electronic device is an arc-shaped structure. As an optional solution, by judging whether the device name of the device connected to the wireless communication module includes the device name of the in-vehicle device, it is judged whether there is a connection channel between the wireless communication module and the in-vehicle device.
  • the device name includes the device name of the in-vehicle device, indicating that there is a connection channel between the wireless communication module and the in-vehicle device; if the device name of the device connected to the wireless communication module does not include the device name of the in-vehicle device, it indicates that there is no connection between the wireless communication module and the in-vehicle device. A connection channel exists.
  • the device name of the in-vehicle device is car kit, if the device name of the device connected to the wireless communication module includes car kit, it indicates that there is a connection channel between the wireless communication module and the in-vehicle device; if the device name of the device connected to the wireless communication module does not include car kit, indicating that there is no connection channel between the wireless communication module and the in-vehicle device.
  • judging whether the user is in the driving state specifically includes the processor judging whether there is a connection channel between the wireless communication module and the in-vehicle device and whether the motion trajectory of the electronic device is Arc-shaped structure, if it is determined that there is a connection channel between the wireless communication module and the in-vehicle device and the movement trajectory of the electronic device is an arc-shaped structure, it indicates that the user is in a driving state; if it is determined that there is no connection between the wireless communication module and the in-vehicle device.
  • the movement trajectory of the connection channel or electronic device is not an arc-like structure, indicating that the user is not driving.
  • the processor determines that the current user status satisfies the set reminder conditions, it indicates that the user can be reminded, and proceeds to step 130; if it determines that the current user status does not meet the set reminder conditions, it indicates that the user cannot be reminded. Reminder, continue to step 106.
  • reminder condition may also be set to other content, which is only illustratively described here, and the specific content of the reminder condition is not limited in this embodiment of the present application.
  • Step 130 remind the user, and proceed to step 106 .
  • the working mode of the electronic device includes a reminder mode, and the electronic device reminds the user through the set first reminder mode to remind the user to sleep.
  • the first reminder method includes displaying a breathing light and/or generating and displaying a reminder message.
  • the user's sleep state includes a sleep-out state and the pre-sleep state score corresponding to the first specified number of consecutive time points in the pre-sleep state curve gradually increases, the user is reminded by the first reminder; or, if The sleep state of the user includes the state of falling asleep, and the pre-sleep state scores corresponding to the first specified number of consecutive time points in the pre-sleep state curve are all greater than the set score threshold, and the user is reminded by the first reminder method.
  • the working mode of the electronic device further includes a do not disturb mode, that is, the processor only generates a bedtime state curve according to the bedtime state, and does not remind the user to avoid disturbing the user.
  • a do not disturb mode that is, the processor only generates a bedtime state curve according to the bedtime state, and does not remind the user to avoid disturbing the user.
  • the working mode of the wearable device includes a facilitation mode
  • the user can set the facilitation mode to be turned on or off according to his own needs, and the facilitation mode is turned off by default.
  • the processor determines that the user is in a driving state and the current time is greater than the promotion time, it will remind the user through the set second reminder mode; if it is determined that the user is in a non-driving state and the current time is greater than the promotion time , and remind the user through the set third reminder method.
  • the electronic device receives a second setting operation input by the user, the second setting operation includes an operation of setting the working mode, and the electronic device sets the working mode in response to the second setting operation.
  • the second setting operation corresponds to one or any combination of the multiple operations shown in FIG. 7 to FIG. 15 .
  • both the second reminder mode and the third reminder mode may be set according to actual conditions.
  • the second reminder mode includes playing the first type of music
  • the third reminder mode includes playing the second type of music.
  • the processor determines that the user is in a driving state, it acquires the pre-stored first type of music from the memory and plays it.
  • the first type of music is refreshing music, so as to prevent the user from being in danger due to excessive sleepiness during driving;
  • the pre-stored second type of music is acquired from the memory and played, and the second type of music is white noise music to enhance the user's drowsiness.
  • first reminder mode the second reminder mode and the third reminder mode may also be set to other forms, and the embodiments of the present application are only illustratively described here, and the specific forms of the reminder modes are not limited.
  • FIG. 24 is a schematic diagram of a multi-user recording mode provided by an embodiment of the present application. As shown in FIG.
  • the bedtime state evaluation model is first constructed, and the construction steps refer to steps 202 to 210, which will not be repeated here; when user 1 uses the electronic device for the first time, the bedtime state evaluation model is initialized, that is, the factory
  • the constructed pre-sleep state evaluation model is used as the pre-sleep state evaluation model of user 1; through the pre-sleep state evaluation model, the pre-sleep state curve and sleep quality score of user 1 are generated according to the first signal of user 1; according to the feedback results of user 1 Correct the label value before going to bed, and update the bedtime state evaluation model online through the online learning algorithm.
  • the bedtime state evaluation model is constructed according to the physiological laws of user 1, and can accurately evaluate the bedtime state of user 1. As shown in FIG.
  • the bedtime state evaluation model generated by User 2 is constructed according to the physiological law of User 2 and can accurately evaluate the user. 2's bedtime state; the bedtime state evaluation model generated by user 3 is constructed based on user 3's physiological laws, and can accurately assess user 3's bedtime state.
  • the first signal of the user is obtained according to the set first time interval, and the first characteristic parameter is extracted from the first signal; the sleep state evaluation model is generated, and the sleep condition is generated according to the first characteristic parameter.
  • the pre-state score can accurately monitor the user's pre-sleep state, so that the user can grasp the complete state before and after sleep, thereby further improving their sleep quality.
  • An embodiment of the present application further provides an electronic device, where the electronic device may be a terminal device or a circuit device built in the terminal device.
  • the device may be used to perform the functions/steps in the above method embodiments.
  • the present application also provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, when the instructions are executed on the computer, the computer is made to perform the bedtime state detection shown in the above-mentioned FIG. 19 and FIG. 20 . steps in the method.
  • the present application also provides a computer program product containing instructions, when the computer program product runs on a computer or any at least one processor, the computer causes the computer to perform the bedtime state detection shown in the above-mentioned FIGS. 19 and 20 . steps in the method.
  • the involved processor 110 may include, for example, a central processing unit (CPU), a microprocessor, a microcontroller or a digital signal processor, and may also include a GPU, an NPU, and an ISP.
  • CPU central processing unit
  • microprocessor a microcontroller or a digital signal processor
  • GPU graphics processing unit
  • NPU an NPU
  • ISP an ISP
  • Necessary hardware accelerators or logic processing hardware circuits may also be included, such as application-specific integrated circuits (ASICs), or one or more integrated circuits used to control the execution of the programs of the technical solution of the present application.
  • ASICs application-specific integrated circuits
  • the processor may have the functionality to operate one or more software programs, which may be stored in the memory.
  • the memory can be read-only memory (ROM), other types of static storage devices that can store static information and instructions, random access memory (RAM), or other types of storage devices that can store information and instructions
  • the dynamic storage device can also be electrically erasable programmable read-only memory (electrically erasable programmable read-only memory, EEPROM), compact disc read-only memory (CD-ROM) or other optical disk storage, optical disk storage (including compact discs, laser discs, compact discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices, or may also be capable of carrying or storing desired program code in the form of instructions or data structures and capable of Any other medium accessed by a computer, etc.
  • “at least one” refers to one or more, and “multiple” refers to two or more.
  • “And/or”, which describes the association relationship of the associated objects means that there can be three kinds of relationships, for example, A and/or B, which can indicate the existence of A alone, the existence of A and B at the same time, and the existence of B alone. where A and B can be singular or plural.
  • the character “/” generally indicates that the associated objects are an “or” relationship.
  • “At least one of the following” and similar expressions refer to any combination of these items, including any combination of single or plural items.
  • At least one of a, b, and c may represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c may be single or multiple.
  • any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution, and the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program codes .

Landscapes

  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Engineering & Computer Science (AREA)
  • Medical Informatics (AREA)
  • Surgery (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Physics & Mathematics (AREA)
  • Molecular Biology (AREA)
  • Pathology (AREA)
  • Animal Behavior & Ethology (AREA)
  • General Health & Medical Sciences (AREA)
  • Public Health (AREA)
  • Veterinary Medicine (AREA)
  • Physiology (AREA)
  • Cardiology (AREA)
  • Psychiatry (AREA)
  • Psychology (AREA)
  • Dentistry (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Child & Adolescent Psychology (AREA)
  • Developmental Disabilities (AREA)
  • Educational Technology (AREA)
  • Hospice & Palliative Care (AREA)
  • Pulmonology (AREA)
  • Social Psychology (AREA)
  • Anesthesiology (AREA)
  • Nursing (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Signal Processing (AREA)
  • Measurement Of The Respiration, Hearing Ability, Form, And Blood Characteristics Of Living Organisms (AREA)

Abstract

A pre-sleep state detection method and device (201, 203). The method comprises: obtaining a first signal of a user according to a set first time interval (106) and extracting a first feature parameter from the first signal (108); inputting the first feature parameter into a pre-sleep state evaluation model to generate a pre-sleep state score (112); and forming a pre-sleep state curve (114). The pre-sleep state of the user can be accurately monitored, such that the user can grasp a complete state before and after sleep, and thus the sleep quality of the user is further improved.

Description

一种睡前状态检测方法及设备A bedtime state detection method and device 技术领域technical field
本申请涉及运动健康技术领域,具体涉及一种睡前状态检测方法及设备。The present application relates to the technical field of sports health, and in particular to a method and device for detecting a bedtime state.
背景技术Background technique
现代社会的快速发展以及日益激烈的工作步伐和生活节奏,使得越来越多高压生活之下的人们出现睡眠障碍问题。相关技术中可以检测出用户在睡眠过程中的出入睡时间和睡眠分期,并综合出入睡时间和睡眠分期计算出用户的睡眠评分,但不能实现对用户睡前状态的监测,导致用户无法掌握睡眠前后的完整状态,从而无法进一步提高自身的睡眠质量。With the rapid development of modern society and the increasingly intense pace of work and life, more and more people living under high pressure have problems with sleep disorders. The related technology can detect the user's on-off time and sleep stage during the sleep process, and calculate the user's sleep score by combining the on-off time and sleep stage, but it cannot monitor the user's state before going to bed, resulting in the user's inability to grasp sleep. The complete state before and after, so that it cannot further improve the quality of sleep.
发明内容SUMMARY OF THE INVENTION
有鉴于此,本申请提供一种睡前状态检测方法及设备,能够准确监测到用户的睡前状态,使得用户可以掌握睡眠前后的完整状态,从而进一步提高自身的睡眠质量。In view of this, the present application provides a bedtime state detection method and device, which can accurately monitor a user's bedtime state, so that the user can grasp the complete state before and after sleep, thereby further improving their own sleep quality.
一方面,本申请实施例提供了一种睡前状态检测方法,包括:On the one hand, an embodiment of the present application provides a method for detecting a bedtime state, including:
接收用户输入第一查询操作,第一查询操作包括查询睡前状态曲线的操作;receiving a user input of a first query operation, where the first query operation includes an operation of querying the state curve before going to bed;
响应于第一查询操作,显示睡前状态曲线。In response to the first query operation, a bedtime state curve is displayed.
本申请实施例中,用户输入第一查询操作查询出睡前状态曲线,方便用户随时对睡前状态曲线进行查看,可以掌握进入睡眠之前的状态。In the embodiment of the present application, the user inputs the first query operation to query the state curve before going to sleep, which is convenient for the user to check the state curve before going to sleep at any time, and can grasp the state before going to sleep.
在一种可能的实现方式中,还包括:In a possible implementation, it also includes:
接收用户输入的第一设置操作,第一设置操作包括设置检测时间的操作;receiving a first setting operation input by the user, where the first setting operation includes an operation of setting the detection time;
响应于第一设置操作,设置检测时间。In response to the first setting operation, the detection time is set.
本申请实施例中,用户输入第一设置操作对检测时间进行设置,使得电子设备可以按照用户期望的检测时间进行检测,使得生成的睡前状态曲线更符合用户预期。In the embodiment of the present application, the user inputs the first setting operation to set the detection time, so that the electronic device can perform detection according to the detection time expected by the user, so that the generated bedtime state curve is more in line with the user's expectation.
在一种可能的实现方式中,还包括:In a possible implementation, it also includes:
接收用户输入的第二设置操作,第二设置操作包括设置工作模式的操作;receiving a second setting operation input by the user, where the second setting operation includes an operation of setting the working mode;
响应于第二设置操作,设置工作模式。In response to the second setting operation, the operating mode is set.
本申请实施例中,用户输入第二设置操作对工作模式进行设置,使得电子设备可以按照用户期望的工作模式进行工作,提高用户体验感。In the embodiment of the present application, the user inputs the second setting operation to set the working mode, so that the electronic device can work according to the working mode expected by the user, and the user experience is improved.
在一种可能的实现方式中,方法还包括:In a possible implementation, the method further includes:
按照第一时间间隔获取用户的第一信号;Obtain the first signal of the user according to the first time interval;
从第一信号中提取出第一特征参数;extracting the first characteristic parameter from the first signal;
根据睡前状态评估模型和第一特征参数,生成睡前状态评分;According to the pre-sleep state evaluation model and the first characteristic parameter, the pre-sleep state score is generated;
根据睡前状态评分,生成睡前状态曲线。Based on the bedtime state score, a bedtime state curve is generated.
本申请实施例中,根据用户的第一信号生成睡前状态曲线,生成的睡前状态曲线能够准确监测到用户在睡前一段时间内的睡前状态,使得用户可以掌握睡眠前的完整 状态,从而进一步提高自身的睡眠质量。In the embodiment of the present application, the bedtime state curve is generated according to the first signal of the user, and the generated bedtime state curve can accurately monitor the bedtime state of the user for a period of time before bedtime, so that the user can grasp the complete state before bedtime. This will further improve your sleep quality.
在一种可能的实现方式中,第一信号包括加速度信号、心率信号和脑电信号中之一或其任意组合。In a possible implementation manner, the first signal includes one of an acceleration signal, a heart rate signal and an electroencephalogram signal or any combination thereof.
本申请实施例中,将多种信号作为第一信号可以进一步提高生成的睡前状态评分的准确性。In the embodiment of the present application, using multiple signals as the first signal can further improve the accuracy of the generated bedtime state score.
在一种可能的实现方式中,在按照第一时间间隔获取用户的第一信号之前,包括:In a possible implementation manner, before acquiring the first signal of the user according to the first time interval, the method includes:
获取当前时间;get the current time;
若当前时间小于设置的检测时间,在一段时间后重新获取当前时间;If the current time is less than the set detection time, re-acquire the current time after a period of time;
若当前时间大于或等于设置的检测时间,则按照第一时间间隔获取用户的第一信号。If the current time is greater than or equal to the set detection time, acquire the first signal of the user according to the first time interval.
本申请实施例中,电子设备将当前时间与用户期望的检测时间进行对比,按照用户期望的检测时间获取用户的第一信号,使得生成的睡前状态曲线更符合用户预期。In the embodiment of the present application, the electronic device compares the current time with the detection time expected by the user, and obtains the user's first signal according to the detection time expected by the user, so that the generated bedtime state curve is more in line with the user's expectation.
在一种可能的实现方式中,在从第一信号中提取出第一特征参数之后,还包括:In a possible implementation manner, after extracting the first characteristic parameter from the first signal, the method further includes:
根据第一特征参数,判断用户的第一睡眠状态;According to the first characteristic parameter, determine the first sleep state of the user;
若判断结果为第一睡眠状态为疑似入睡状态或出睡状态,则根据睡前状态评估模型和第一特征参数,生成睡前状态评分,根据睡前状态评分,生成睡前状态曲线;If the judgment result is that the first sleep state is suspected of falling asleep or falling out of sleep, generating a bedtime state score according to the bedtime state evaluation model and the first characteristic parameter, and generating a bedtime state curve according to the bedtime state score;
若判断结果为第一睡眠状态为入睡状态,则记录入睡时间,按照第二时间间隔获取用户的第一信号。If the determination result is that the first sleep state is the sleep state, the sleep time is recorded, and the first signal of the user is acquired according to the second time interval.
本申请实施例中,若用户未进入入睡状态,则继续生成睡前状态评分并根据睡前状态评分生成睡前状态曲线,保证用户在睡前一段时间内的睡前状态评分的完整性,从而使得用户可以掌握睡眠前的完整状态。In the embodiment of the present application, if the user does not fall asleep, the pre-sleep state score is continued to be generated and the pre-sleep state curve is generated according to the pre-sleep state score, so as to ensure the integrity of the user's pre-sleep state score within a period of time before going to sleep, thereby So that the user can grasp the complete state before sleep.
在一种可能的实现方式中,方法还包括:In a possible implementation, the method further includes:
获取用户的第二睡眠状态;Get the second sleep state of the user;
若第二睡眠状态为疑似入睡状态,则按照第一时间间隔获取用户的第一信号;If the second sleep state is the suspected sleep state, acquiring the first signal of the user according to the first time interval;
若第二睡眠状态为出睡状态,则判断睡前状态曲线是否满足提醒条件;其中,提醒条件包括连续的第一指定数量的时间点对应的睡前状态评分逐渐升高;If the second sleep state is a sleep-out state, determine whether the pre-sleep state curve satisfies the reminder condition; wherein, the reminder condition includes that the pre-sleep state score corresponding to the consecutive first specified number of time points gradually increases;
若判断结果为睡前状态曲线满足提醒条件,以第一提醒方式提醒用户;第一提醒方式包括显示呼吸灯和/或提醒消息。If the judgment result is that the state curve before bed meets the reminder condition, the user is reminded in a first reminder mode; the first reminder mode includes displaying a breathing light and/or a reminder message.
本申请实施例中,若用户处于疑似入睡状态,则继续获取第一信号,保证用户在睡前一段时间内的睡前状态评分的完整性;若用户处于出睡状态且随时间推移用户的睡意逐渐增强,则通过显示呼吸灯和/或提醒消息这种较为温和的提醒方式提醒用户睡觉,从而提高用户自身的睡眠质量。In the embodiment of the present application, if the user is suspected of falling asleep, the first signal is continued to be obtained to ensure the integrity of the user's pre-sleep state score within a period of time before going to sleep; If it increases gradually, the user is reminded to sleep by displaying a breathing light and/or a reminder message, which is a milder reminder, thereby improving the user's own sleep quality.
在一种可能的实现方式中,方法还包括:In a possible implementation, the method further includes:
获取用户的第二睡眠状态;Get the second sleep state of the user;
若第二睡眠状态为疑似入睡状态,则按照第一时间间隔获取用户的第一信号;If the second sleep state is the suspected sleep state, acquiring the first signal of the user according to the first time interval;
若第二睡眠状态为出睡状态,则判断睡前状态曲线是否满足提醒条件;其中,提醒条件包括连续的第一指定数量的时间点对应的睡前状态评分均大于评分阈值;If the second sleep state is the state of falling asleep, then determine whether the pre-sleep state curve satisfies the reminder condition; wherein, the reminder condition includes that the pre-sleep state scores corresponding to the consecutive first specified number of time points are all greater than the score threshold;
若判断结果为睡前状态曲线满足提醒条件,以第一提醒方式提醒用户;第一提醒方式包括显示呼吸灯和/或提醒消息。If the judgment result is that the state curve before bed meets the reminder condition, the user is reminded in a first reminder mode; the first reminder mode includes displaying a breathing light and/or a reminder message.
本申请实施例中,若用户处于疑似入睡状态,则继续获取第一信号,保证用户在睡前一段时间内的睡前状态评分的完整性;若用户处于出睡状态且随时间推移用户的睡意逐渐增强,则通过显示呼吸灯和/或提醒消息这种较为温和的提醒方式提醒用户睡觉,从而提高用户自身的睡眠质量。In the embodiment of the present application, if the user is suspected of falling asleep, the first signal is continued to be obtained to ensure the integrity of the user's pre-sleep state score within a period of time before going to sleep; If it increases gradually, the user is reminded to sleep by displaying a breathing light and/or a reminder message, which is a milder reminder, thereby improving the user's own sleep quality.
在一种可能的实现方式中,方法还包括:In a possible implementation, the method further includes:
根据第一信号,判断用户是否处于驾驶状态;According to the first signal, determine whether the user is in a driving state;
若判断结果为用户处于驾驶状态,则以第二提醒方式提醒用户;第二提醒方式包括播放第一类型音乐;If the judgment result is that the user is in a driving state, the user is reminded in a second reminder mode; the second reminder mode includes playing the first type of music;
若判断结果为用户处于非驾驶状态,则以第三提醒方式提醒用户;第三提醒方式包括播放第二类型音乐。If the judgment result is that the user is in a non-driving state, the user is reminded in a third reminder mode; the third reminder mode includes playing the second type of music.
本申请实施例中,若用户处于驾驶状态,播放较为激烈的第一类型音乐为用户提神,提高用户在驾驶过程中的安全性;若用户处于非驾驶状态,播放较为柔和的第二类型音乐以增强用户睡意,促使用户尽快进入睡眠,从而提高用户自身的睡眠质量。In the embodiment of the present application, if the user is in a driving state, the first type of music that is relatively intense is played to refresh the user and improve the safety of the user during driving; Enhance the user's drowsiness, prompt the user to go to sleep as soon as possible, thereby improving the user's own sleep quality.
在一种可能的实现方式中,还包括:In a possible implementation, it also includes:
接收用户输入的第二查询操作,第二查询操作包括查询睡眠质量评分的操作;receiving a second query operation input by the user, where the second query operation includes an operation of querying the sleep quality score;
响应于第二查询操作,显示睡眠质量评分。In response to the second query operation, the sleep quality score is displayed.
本申请实施例中,用户输入第二查询操作查询出睡眠质量评分,方便用户掌握处于睡眠中的睡眠质量。In this embodiment of the present application, the user inputs the second query operation to query the sleep quality score, which is convenient for the user to grasp the sleep quality during sleep.
在一种可能的实现方式中,方法还包括:In a possible implementation, the method further includes:
记录入睡时间;record sleep time;
按照第二时间间隔获取用户的第一信号;Obtain the first signal of the user according to the second time interval;
根据第一信号,生成用户的第三睡眠状态;generating a third sleep state of the user according to the first signal;
若第三睡眠状态为出睡状态,生成睡眠质量评分。If the third sleep state is a sleep-out state, a sleep quality score is generated.
本申请实施例中,在用户睡眠过程中监测用户是否从睡眠中醒来,若用户从睡眠中醒来,及时生成睡眠质量评分,以供用户查看睡眠质量评分。In the embodiment of the present application, whether the user wakes up from sleep is monitored during the user's sleep process, and if the user wakes up from sleep, a sleep quality score is generated in time for the user to check the sleep quality score.
第二方面,本申请实施例提供了一种电子设备,设备包括:In a second aspect, an embodiment of the present application provides an electronic device, the device comprising:
显示屏;一个或多个处理器;存储器;以及一个或多个计算机程序,其中一个或多个计算机程序被存储在存储器中,一个或多个计算机程序包括指令,当指令被设备执行时,使得设备执行第一方面或者第一方面的任一可能的实现方式中的方法的指令。a display screen; one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more computer programs including instructions that, when executed by the device, cause The device executes the first aspect or the instructions of the method in any possible implementation of the first aspect.
第三方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质用于设备执行的程序代码,所述程序代码包括用于执行第一方面或者第一方面的任一可能的实现方式中的方法的指令。In a third aspect, an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium is used for program code executed by a device, and the program code includes the first aspect or any of the first aspect. Instructions for a method in a possible implementation.
第四方面,本申请实施例提供了一种包含指令的计算机程序产品,当计算机程序产品在计算机或任一至少一种处理器上运行时,使得计算机执行第一方面或者第一方面的任一可能的实现方式中的方法的指令。In a fourth aspect, the embodiments of the present application provide a computer program product containing instructions, when the computer program product is run on a computer or any at least one processor, the computer is made to execute the first aspect or any one of the first aspect Instructions for methods in possible implementations.
本申请实施例提供的技术方案中,按照设置的第一时间间隔获取用户的第一信号从第一信号中提取出第一特征参数;通过生成的睡前状态评估模型,根据第一特征参数,生成睡前状态评分,能够准确监测到用户的睡前状态,使得用户可以掌握睡眠前后的完整状态,从而进一步提高自身的睡眠质量。In the technical solution provided by the embodiment of the present application, the first signal of the user is obtained according to the set first time interval, and the first characteristic parameter is extracted from the first signal; through the generated bedtime state evaluation model, according to the first characteristic parameter, The pre-sleep state score is generated, which can accurately monitor the user's pre-sleep state, so that the user can grasp the complete state before and after sleep, thereby further improving their sleep quality.
附图说明Description of drawings
图1为本申请实施例提供的一种《2019年中国人睡眠白皮书》中影响睡眠的原因的排名示意图;1 is a schematic ranking diagram of the reasons for affecting sleep in a kind of "2019 Chinese Sleep White Paper" provided by the embodiment of the present application;
图2为本申请实施例提供的一种《2019年中国人睡眠白皮书》中每天熬夜年龄段分布的示意图;2 is a schematic diagram of the distribution of the age groups of staying up late every day in a kind of "2019 Chinese Sleep White Paper" provided by the embodiment of the application;
图3a为本申请实施例提供的一种睡意变化曲线的示意图;3a is a schematic diagram of a sleepiness change curve provided by an embodiment of the application;
图3b为本申请实施例提供的又一种睡意变化曲线的示意图;Fig. 3b is a schematic diagram of another drowsiness change curve provided by an embodiment of the present application;
图4为本申请实施例提供的一种睡前状态检测系统的示意图;4 is a schematic diagram of a bedtime state detection system provided by an embodiment of the present application;
图5为本申请实施例提供的一种可穿戴设备的外部结构示意图;5 is a schematic diagram of an external structure of a wearable device provided by an embodiment of the present application;
图6为本申请实施例提供的一种可穿戴设备的内部结构示意图;6 is a schematic diagram of the internal structure of a wearable device provided by an embodiment of the present application;
图7为本申请实施例提供的一种终端设备的主页的示意图;7 is a schematic diagram of a homepage of a terminal device provided by an embodiment of the present application;
图8为本申请实施例提供的一种运动健康界面的示意图;8 is a schematic diagram of a sports health interface provided by an embodiment of the present application;
图9为本申请实施例提供的一种睡眠功能模块界面的示意图;9 is a schematic diagram of a sleep function module interface provided by an embodiment of the present application;
图10为本申请实施例提供的一种睡前检测功能界面的示意图;10 is a schematic diagram of a bedtime detection function interface provided by an embodiment of the present application;
图11为本申请实施例提供的又一种睡前检测功能界面的示意图;FIG. 11 is a schematic diagram of yet another bedtime detection function interface provided by an embodiment of the present application;
图12为本申请实施例提供的一种功能设置界面的示意图;12 is a schematic diagram of a function setting interface provided by an embodiment of the present application;
图13a为本申请实施例提供的一种用户选择提醒模式界面的示意图;13a is a schematic diagram of a user-selected reminder mode interface provided by an embodiment of the present application;
图13b为本申请实施例提供的又一种睡前状态曲线的示意图;Figure 13b is a schematic diagram of yet another bedtime state curve provided by an embodiment of the present application;
图13c为本申请实施例提供的一种提醒用户界面的示意图;13c is a schematic diagram of a reminder user interface provided by an embodiment of the present application;
图14a为本申请实施例提供的一种用户选择提醒模式界面的示意图;14a is a schematic diagram of a user-selected reminder mode interface provided by an embodiment of the present application;
图14b为本申请实施例提供的又一种睡前状态曲线的示意图;Figure 14b is a schematic diagram of yet another bedtime state curve provided by an embodiment of the application;
图14c为本申请实施例提供的又一种提醒用户界面的示意图;14c is a schematic diagram of another reminder user interface provided by an embodiment of the present application;
图15a为本申请实施例提供的一种用户选择促进模式界面的示意图;15a is a schematic diagram of a user-selected promotion mode interface provided by an embodiment of the present application;
图15b为本申请实施例提供的又一种提醒用户界面的示意图;15b is a schematic diagram of another reminder user interface provided by an embodiment of the present application;
图15c为本申请实施例提供的又一种提醒用户界面的示意图;15c is a schematic diagram of another reminder user interface provided by an embodiment of the present application;
图16a为本申请实施例提供的一种睡眠功能模块界面的示意图;16a is a schematic diagram of a sleep function module interface provided by an embodiment of the application;
图16b为本申请实施例提供的一种睡眠评分界面的示意图;16b is a schematic diagram of a sleep scoring interface provided by an embodiment of the application;
图17为本申请实施例提供的一种可穿戴设备的主页的示意图;17 is a schematic diagram of a homepage of a wearable device provided by an embodiment of the present application;
图18为本申请实施例提供的一种电子设备的处理器的结构示意图;FIG. 18 is a schematic structural diagram of a processor of an electronic device according to an embodiment of the present application;
图19为本申请实施例提供的一种睡前状态检测方法的算法流程图;19 is an algorithm flow chart of a method for detecting a bedtime state provided by an embodiment of the present application;
图20为本申请实施例提供的一种睡前状态检测方法的流程图;20 is a flowchart of a method for detecting a bedtime state provided by an embodiment of the present application;
图21为本申请实施例提供的一种构建睡前状态评估模型的流程图;FIG. 21 is a flowchart of constructing a bedtime state assessment model provided by an embodiment of the present application;
图22a至图22e为本申请实施例提供的一种生成状态曲线的示意图;22a to 22e are schematic diagrams of a generation state curve provided by an embodiment of the present application;
图23为本申请实施例提供的一种对睡前状态评估模型进行更新训练的流程图;23 is a flowchart of updating and training a bedtime state evaluation model provided by an embodiment of the present application;
图24为本申请实施例提供的一种多用户记录模式的示意图。FIG. 24 is a schematic diagram of a multi-user recording mode provided by an embodiment of the present application.
具体实施方式Detailed ways
为了更好的理解本申请的技术方案,下面结合附图对本申请实施例进行详细描述。In order to better understand the technical solutions of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.
应当明确,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的 所有其它实施例,都属于本申请保护的范围。It should be clear that the described embodiments are only a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.
在本申请实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本申请。在本申请实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. As used in the embodiments of this application and the appended claims, the singular forms "a," "the," and "the" are intended to include the plural forms as well, unless the context clearly dictates otherwise.
应当理解,本文中使用的术语“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,甲和/或乙,可以表示:单独存在甲,同时存在甲和乙,单独存在乙这三种情况。另外,本文中字符“况。一般表示前后关联对象是一种“或”的关系。It should be understood that the term "and/or" used in this article is only an association relationship to describe related objects, indicating that there can be three kinds of relationships, for example, A and/or B, which can mean that A exists alone, and A and B exist at the same time. B, there are three cases of B alone. In addition, the character "condition." in this article generally indicates that the related objects before and after are an "or" relationship.
随着现代社会物质生活水平的不断提高,人们对自身健康的关注度越来越高,而睡眠是人体恢复身体和保持健康的一种最简单且最重要的方式。良好的睡眠是精神健康和身体健康的基础,而睡眠障碍或睡眠不足会对人们的身体健康情况造成负面影响,例如:心血管疾病、新陈代谢过快或过慢、心理疾病、免疫功能紊乱。With the continuous improvement of material living standards in modern society, people pay more and more attention to their own health, and sleep is the easiest and most important way for the human body to recover and maintain health. Good sleep is the foundation of mental and physical health, and sleep disturbances or lack of sleep can negatively impact people's physical health, such as cardiovascular disease, over- or over-slow metabolism, mental illness, immune dysfunction.
睡眠的关键环节在于入睡,入睡困难会直接导致睡眠质量低下。造成入睡困难的原因有很多,例如:生活节奏过快、压力大和焦虑等心理因素;睡前剧烈活动、加班时间过长、饮茶、饮咖啡、摄食过量和使用电子产品时间过长等不健康的睡前习惯。图1为本申请实施例提供的一种《2019年中国人睡眠白皮书》中影响睡眠的原因的排名示意图,如图1所示,影响睡眠的原因中占比最大的原因是心理压力大,占比为26%;影响睡眠的原因中占比第二名的原因是工作、学习任务繁重,占比为21%;影响睡眠的原因中占比第三名的原因是个人睡眠习惯,占比为19%。图2为本申请实施例提供的一种《2019年中国人睡眠白皮书》中每天熬夜年龄段分布的示意图,如图2所示,该分布的横轴为各年龄段的人,纵轴为比例。70前表示1970年之前出生的人,70前熬夜的比例为2%;70后表示1970年之后且1980年之前的出生的人,70后的熬夜的比例为7%;80后表示1980年之后且1990年之前出生的人,80后熬夜的比例为19%;90后表示1990年之后且2000年之前出生的人,90后熬夜的比例为43%;00后表示2000年之后出生的人,00后熬夜的比例为27%。由图1和图2可以看出,心理压力大是影响国人睡眠的首要原因,每天都在熬夜的人群中,90后占有最高比例。The key to sleep is falling asleep, and difficulty falling asleep will directly lead to poor sleep quality. There are many reasons for difficulty falling asleep, such as psychological factors such as fast pace of life, stress and anxiety; unhealthy factors such as strenuous activity before bed, excessive overtime, drinking tea, coffee, excessive food intake, and excessive use of electronic products. Habits before bed. Fig. 1 is a schematic diagram of the ranking of the reasons for affecting sleep in the "2019 Chinese Sleep White Paper" provided by the embodiment of the present application. As shown in Fig. 1, among the reasons affecting sleep, the reason that accounts for the largest proportion is psychological pressure, which accounts for The ratio is 26%; the second reason affecting sleep is heavy work and study tasks, accounting for 21%; the third reason affecting sleep is personal sleep habits, accounting for 21% 19%. Fig. 2 is a schematic diagram of the distribution of the age groups of staying up late every day in a "2019 Chinese Sleep White Paper" provided by an embodiment of the application, as shown in Fig. 2, the horizontal axis of the distribution is the people of each age group, and the vertical axis is the ratio . Before 70 means people born before 1970, the proportion of staying up late before 70 is 2%; after 70 means people born after 1970 and before 1980, the proportion of post-70 staying up late is 7%; after 80 means after 1980 And for those born before 1990, the proportion of post-80s staying up late was 19%; for those born after 1990 and before 2000, the proportion of post-90s staying up late was 43%; for post-00s, those born after 2000, The rate of staying up late after 00 was 27%. It can be seen from Figure 1 and Figure 2 that psychological stress is the primary reason that affects the sleep of Chinese people. Among the people who stay up late every day, the post-90s have the highest proportion.
入睡困难的用户通常无法掌握自身的睡前状态,例如:用户感到疲惫,但由于刚刚结束其它工作,用户的大脑尚处于兴奋状态,因此即使用户感到疲惫,却仍存在入睡困难的问题;或者,用户感到疲惫,但还有待办事项未完成而不去睡觉,等到可以睡觉的时候大脑却处于兴奋状态而无法入睡;或者,用户有熬夜的习惯,即使感到疲惫仍旧进行无意识的惯性熬夜,导致用户入睡困难。图3a为本申请实施例提供的一种睡意变化曲线的示意图,如图3a所示,该曲线示意图的横轴为时间,纵轴为睡意。该曲线示意图包括两条曲线,分别是“假”睡意曲线和真实睡意曲线。“假”睡意曲线中,用户睡意随时间的增长而增长。真实睡意曲线中,用户睡意随时间的增长而增长,但用户躺在床上之前的用户睡意的增长幅度大于用户躺在床上之后的用户睡意的增长幅度,即:用户躺在床上之后的睡意反而比躺在床上之前的睡意低,即:用户存在入睡困难;如真实睡意曲线中的虚线部分所示,假设用户此时没有躺在床上,用户的睡意会随着时间的增长而增长,即:用户过早尝试睡觉,反而会出现入睡困难的情况。将“假”睡意曲线和真实睡意曲线两条曲线结合来看,每个时刻中,“假”睡意曲线 中的用户睡意比真实睡意曲线的用户睡意高,即:用户感到疲惫或困意,但真实睡意较低,因此入睡并不顺利。图3b为本申请实施例提供的又一种睡意变化曲线的示意图,如图3b所示,该曲线示意图的横轴为时间,纵轴为睡意。由该曲线可以看出,用户在躺在床上之前达到了极困点,此时用户的睡意最高,但用户此时还有待办事项未完成而拖延睡觉,当用户躺在床上时,用户的大脑处于兴奋状态,此时用户睡意相对于极困点已下降很多,睡意较低,造成用户入睡困难。Users who have difficulty falling asleep usually cannot grasp their own state before going to bed. For example: the user is tired, but the user's brain is still in an excited state because he has just finished other work, so even if the user is tired, he still has difficulty falling asleep; or, The user feels tired, but there are still unfinished items to do, so he does not go to sleep. When he can sleep, his brain is in a state of excitement and cannot fall asleep; or, the user has the habit of staying up late, even if he feels tired, he still stays up unconsciously, causing the user to stay up late. Difficulty falling asleep. Fig. 3a is a schematic diagram of a drowsiness change curve provided by an embodiment of the present application. As shown in Fig. 3a, the horizontal axis of the schematic diagram of the curve is time, and the vertical axis is drowsiness. The schematic diagram of the curve includes two curves, namely a "fake" sleepiness curve and a real sleepiness curve. In the "fake" sleepiness curve, the user's sleepiness increases with time. In the real drowsiness curve, the user's drowsiness increases with time, but the increase of the user's drowsiness before the user lies on the bed is greater than the increase of the user's drowsiness after the user lies on the bed. The sleepiness before lying in bed is low, that is: the user has difficulty falling asleep; as shown by the dotted line in the real sleepiness curve, assuming that the user is not lying on the bed at this time, the user's sleepiness will increase with time, that is: the user Trying to sleep too early can make it difficult to fall asleep. Combining the two curves of the "fake" sleepiness curve and the real sleepiness curve, at each moment, the user in the "fake" sleepiness curve is more sleepy than the user in the real sleepiness curve, that is, the user feels tired or sleepy, but True drowsiness is low, so falling asleep is not smooth. Fig. 3b is a schematic diagram of yet another drowsiness change curve provided by an embodiment of the present application. As shown in Fig. 3b, the horizontal axis of the schematic diagram of the curve is time, and the vertical axis is drowsiness. From this curve, it can be seen that the user reaches the extremely sleepy point before lying on the bed. At this time, the user's sleepiness is the highest, but the user still has to-do items unfinished and delays sleeping. When the user is lying on the bed, the user's brain In the excited state, the user's sleepiness has dropped a lot compared to the extremely sleepy point, and the sleepiness is low, which makes it difficult for the user to fall asleep.
相关技术中可以识别出用户的睡意深度,并根据睡意深度为用户播放对应的睡眠辅助内容。具体地,用户佩戴可穿戴设备,可穿戴设备采集用户的生物电信号,并根据生物电信号提取出睡意识别信息;可穿戴设备将睡意识别信息输入预先训练好的睡意深度检测模型中进行识别,生成用户的当前睡意深度并将当前睡意深度发送至服务器;服务器根据当前睡意深度匹配出睡眠辅助内容,并将睡眠辅助内容发送至可穿戴设备,使得可穿戴设备播放睡眠辅助内容,以辅助用户睡眠。相关技术可以根据用户的睡意深度匹配并播放对应的睡眠辅助内容,提高了所播放的睡眠辅助内容的科学性,增强了睡眠辅助效果,但该技术用于用户进入睡眠状态后,对用户睡眠质量的监测和提高,缺少对用户睡前状态的跟踪和管理。In the related art, the drowsiness depth of the user can be identified, and corresponding sleep assistance content is played for the user according to the drowsiness depth. Specifically, the user wears a wearable device, the wearable device collects the bioelectrical signal of the user, and extracts drowsiness identification information according to the bioelectrical signal; the wearable device inputs the drowsiness identification information into a pre-trained drowsiness depth detection model for identification, Generate the user's current sleepiness depth and send the current sleepiness depth to the server; the server matches the sleep aid content according to the current sleepiness depth, and sends the sleep aid content to the wearable device, so that the wearable device plays the sleep aid content to assist the user's sleep . The related technology can match and play the corresponding sleep assistance content according to the user's drowsiness depth, which improves the scientificity of the played sleep assistance content and enhances the sleep assistance effect. monitoring and improvement, lack of tracking and management of the user's bedtime state.
相关技术中还可以检测出用户的睡眠分期并计算出睡眠质量评分。具体地,用户佩戴可穿戴设备,可穿戴设备采集用户的心率变异信号和三轴加速度数据;可穿戴设备对心率变异信号和三轴加速度数据按照指定时间长度进行划分,并提取出每个时间长度的心率变异信号和三轴加速度数据的多个特征参数;可穿戴设备将一个时间长度内的多个特征参数输入预先训练好的睡眠分期预测模型,生成一个时间长度内的睡眠分期;统计出整个睡眠时间内的多个睡眠分期,并根据睡眠时间和多个睡眠分期计算出睡眠质量评分。相关技术可以根据用户的心率变异信号和三轴加速度数据进行处理生成睡眠质量评分,为用户管理自身的睡眠提供有效参考依据,但该技术用于用户进入睡眠状态后,对用户睡眠质量的监测和提高,缺少对用户睡前状态的跟踪和管理。In the related art, the sleep stages of the user can also be detected and a sleep quality score can be calculated. Specifically, the user wears a wearable device, and the wearable device collects the user's heart rate variability signal and triaxial acceleration data; the wearable device divides the heart rate variability signal and triaxial acceleration data according to a specified time length, and extracts each time length. multiple characteristic parameters of the heart rate variability signal and triaxial acceleration data; the wearable device inputs multiple characteristic parameters within a time length into the pre-trained sleep stage prediction model to generate sleep stages within a time length; Multiple sleep stages during sleep time, and sleep quality scores are calculated based on sleep time and multiple sleep stages. The related technology can process the user's heart rate variability signal and triaxial acceleration data to generate a sleep quality score, which provides an effective reference for users to manage their own sleep. Improve, lack of tracking and management of the user's bedtime state.
针对上述问题,本申请提供了一种睡前状态检测方法,能够准确监测到用户的睡前状态,使得用户可以掌握睡眠前后的完整状态,从而进一步提高自身的睡眠质量。In view of the above problems, the present application provides a bedtime state detection method, which can accurately monitor a user's bedtime state, so that the user can grasp the complete state before and after sleep, thereby further improving their own sleep quality.
图4为本申请实施例提供的一种睡前状态检测系统的示意图,如图4所示,该系统包括至少一个终端设备201和至少一个可穿戴设备203,终端设备201和可穿戴设备203均为电子设备。其中,终端设备201包括但不限于手机、平板电脑、音箱、个人计算机;可穿戴设备203包括但不限于智能手表、智能手环、头戴式显示器、增强现实(augmented reality,简称:AR)、虚拟现实(virtual reality,简称:VR)设备。本申请实施例提供的一种睡前状态检测方法可以应用于睡前状态检测系统。终端设备201可以通过无线通信技术与可穿戴设备203进行无线通信,其中,无线通信技术包括:无线局域网(wirelesslocal area networks,简称:WLAN)(如无线保真(wireless fidelity,简称:Wi-Fi)网络),蓝牙(bluetooth,简称:BT),全球导航卫星系统(global navigation satellite system,简称:GNSS),调频(frequency modulation,简称:FM),近距离无线通信技术(near field communication,简称:NFC),红外技术(infrared,简称:IR)等。FIG. 4 is a schematic diagram of a bedtime state detection system provided by an embodiment of the present application. As shown in FIG. 4 , the system includes at least one terminal device 201 and at least one wearable device 203 , and both the terminal device 201 and the wearable device 203 are for electronic equipment. Wherein, the terminal device 201 includes but is not limited to a mobile phone, a tablet computer, a speaker, and a personal computer; the wearable device 203 includes but is not limited to a smart watch, a smart bracelet, a head-mounted display, augmented reality (AR), Virtual reality (virtual reality, referred to as: VR) equipment. A bedtime state detection method provided by an embodiment of the present application can be applied to a bedtime state detection system. The terminal device 201 can perform wireless communication with the wearable device 203 through a wireless communication technology, wherein the wireless communication technology includes: wireless local area networks (WLAN for short) (such as wireless fidelity (Wi-Fi for short)) network), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC) ), infrared technology (infrared, referred to as: IR) and so on.
图5为本申请实施例提供的一种可穿戴设备的外部结构示意图。如图5所示,该可穿戴设备203包括主麦克风150、副麦克风160、电源(Power)键210、受话器140 和显示屏170。FIG. 5 is a schematic diagram of an external structure of a wearable device according to an embodiment of the present application. As shown in FIG. 5 , the wearable device 203 includes a main microphone 150 , a secondary microphone 160 , a power button 210 , a receiver 140 and a display screen 170 .
副麦克风160位于可穿戴设备203的顶部,主麦克风150位于可穿戴设备的底部,为了可穿戴设备203的美观效果,可以将副麦克风160与主麦克风150以小圆孔形状对称设置于可穿戴设备203的顶部与底部。可穿戴设备203设置两个麦克风,利用双麦降噪原理保持稳定通话。其中,主麦克风150用于收集通话的声音,副麦克风160用于收集通话环境周边的噪音,将通话的声音和周边噪音进行声向相反处理,从而达到降噪的目的。The secondary microphone 160 is located at the top of the wearable device 203, and the main microphone 150 is located at the bottom of the wearable device. For the aesthetic effect of the wearable device 203, the secondary microphone 160 and the primary microphone 150 can be symmetrically arranged on the wearable device in the shape of a small circular hole. 203 top and bottom. The wearable device 203 is provided with two microphones, and uses the principle of dual microphone noise reduction to maintain stable calls. Among them, the main microphone 150 is used to collect the sound of the call, and the secondary microphone 160 is used to collect the noise around the call environment, and the sound of the call and the surrounding noise are processed in opposite directions, so as to achieve the purpose of noise reduction.
如图5所示,电源键210位于可穿戴设备203侧面,作为一种可选方案,电源键210以凸起的按钮形式设置于可穿戴设备203的侧面,既方便用户握持时进行操作,也无需占用显示屏170的正面面积,能够进一步提高屏占比。电源键210可用于控制可穿戴设备203,包括息屏、亮屏、开启或关闭功能,具体功能可根据用户需求进行设置。例如,可穿戴设备203处于开启状态时,用户长按电源键210,使可穿戴设备203进入关闭状态;可穿戴设备203处于息屏状态时,用户短按电源键210,使可穿戴设备203亮屏。As shown in FIG. 5, the power button 210 is located on the side of the wearable device 203. As an optional solution, the power button 210 is arranged on the side of the wearable device 203 in the form of a raised button, which is convenient for the user to operate while holding it. It also does not need to occupy the front area of the display screen 170, which can further increase the screen ratio. The power button 210 can be used to control the wearable device 203, including the functions of keeping the screen on, brightening the screen, and turning on or off. The specific functions can be set according to user requirements. For example, when the wearable device 203 is in the on state, the user presses the power button 210 for a long time to turn the wearable device 203 into the off state; when the wearable device 203 is in the off-screen state, the user briefly presses the power button 210 to turn the wearable device 203 on. Screen.
受话器140也称"听筒",位于可穿戴设备203的上方,用于将音频电信号转换成声音信号。当可穿戴设备203接听电话或语音信息时,可以通过将受话器140靠近用户耳朵接听声音。The receiver 140, also called "earpiece", is located above the wearable device 203, and is used to convert audio electrical signals into sound signals. When the wearable device 203 answers a call or a voice message, the sound can be answered by bringing the receiver 140 close to the user's ear.
显示屏170位于可穿戴设备203的正面,用于显示图像或视频,以及用于接收用户输入的触控指示,触控指示包括单击、双击,按压或滑动,显示屏170可以是侧边有弧度的曲面屏,也可以是侧边没有弧度的平面屏。显示屏170包括显示面板,显示面板包括液晶显示屏170(liquid crystal display,简称:LCD)、有机发光二极管(organic light-emitting diode,简称:OLED)、有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode,简称:AMOLED)、柔性发光二极管(flex light-emitting diode,简称:FLED)、迷你LED(Mini LED)、微型LED(Micro LED)、微型OLED(Micro-OLED)或量子点发光二极管(quantum dot light emitting diodes,简称:QLED)。作为一种可选方案,显示屏170包括触控显示屏。显示屏170还用于显示睡前状态曲线,以供用户查看;显示屏170还用于显示睡眠质量评分并为用户提供反馈结果按钮。The display screen 170 is located on the front of the wearable device 203, and is used for displaying images or videos, and for receiving touch instructions input by the user. The touch instructions include single click, double click, pressing or sliding. A curved screen can also be a flat screen with no radian on the side. The display screen 170 includes a display panel, and the display panel includes a liquid crystal display 170 (liquid crystal display, LCD for short), an organic light-emitting diode (OLED for short), an active matrix organic light emitting diode or an active matrix Active-matrix organic light emitting diode (AMOLED), flexible light-emitting diode (FLED), Mini LED, Micro LED, Micro OLED (Micro-OLED) or quantum dot light emitting diodes (quantum dot light emitting diodes, referred to as: QLED). As an optional solution, the display screen 170 includes a touch display screen. The display screen 170 is also used for displaying the pre-sleep state curve for the user to view; the display screen 170 is also used for displaying the sleep quality score and providing a feedback result button for the user.
本申请实施例中,从外部结构方面来看,终端设备201与可穿戴设备203的区别仅在于显示屏的显示区域的大小,即:终端设备201的显示屏的尺寸大于可穿戴设备203的尺寸。终端设备201所包括的其它结构与可穿戴设备203所包括的结构相同,在此不再赘述。In this embodiment of the present application, from the perspective of external structure, the difference between the terminal device 201 and the wearable device 203 is only the size of the display area of the display screen, that is, the size of the display screen of the terminal device 201 is larger than that of the wearable device 203 . Other structures included in the terminal device 201 are the same as those included in the wearable device 203 , and details are not described herein again.
图6为本申请实施例提供的一种可穿戴设备的内部结构示意图,如图6所示,该可穿戴设备203包括存储器100、处理器110、通信模块、受话器140、主麦克风150、副麦克风160、显示屏170、传感器模块180和交互模块190。其中,传感器模块180包括加速度(ACC)传感器180a、光电容积描记传感器180b、脑电波传感器180c和湿度传感器180d中之一或其任意组合,通信模块包括移动通信模块120a和/或无线通信模块120b。存储器100、处理器110和交互模块190之间可以通过内部连接通路互相通信,传递控制和/或数据信号,存储器100用于存储计算机程序,处理器110用于 从存储器100中调用并运行该计算机程序。FIG. 6 is a schematic diagram of the internal structure of a wearable device provided by an embodiment of the application. As shown in FIG. 6 , the wearable device 203 includes a memory 100, a processor 110, a communication module, a receiver 140, a main microphone 150, and a secondary microphone. 160 , a display screen 170 , a sensor module 180 and an interaction module 190 . The sensor module 180 includes one or any combination of an acceleration (ACC) sensor 180a, a photoplethysmography sensor 180b, a brain wave sensor 180c and a humidity sensor 180d, and the communication module includes a mobile communication module 120a and/or a wireless communication module 120b. The memory 100, the processor 110 and the interaction module 190 can communicate with each other through an internal connection path to transmit control and/or data signals. The memory 100 is used to store computer programs, and the processor 110 is used to call and run the computer from the memory 100. program.
存储器100可以是只读存储器(read-only memory,ROM)、可存储静态信息和指令的其它类型的静态存储设备、随机存取存储器(random access memory,RAM)或可存储信息和指令的其它类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其它磁存储设备,或者还可以是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其它介质等。 Memory 100 may be read-only memory (ROM), other types of static storage devices that can store static information and instructions, random access memory (RAM), or other types of information and instructions that can be stored It can also be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disk storage, CD-ROM storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices, or can be used to carry or store desired program code in the form of instructions or data structures and Any other medium that can be accessed by a computer, etc.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,简称:AP)、调制解调处理器、图形处理器(graphics processing unit,简称:GPU)、图像信号处理器(image signal processor,简称:ISP)、控制器、存储器、视频编解码器、数字信号处理器(digital signal processor,简称:DSP)、基带处理器、神经网络处理(neural-network processing unit,简称:NPU)中之一或其任意组合。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, referred to as: AP), a modem processor, a graphics processor (graphics processing unit, referred to as: GPU), Image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, neural-network processing unit (abbreviation: NPU) or any combination thereof. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
本申请实施例中,上述处理器110可以和存储器100可以合成一个处理装置,更常见的是彼此独立的部件,处理器110用于执行存储器100中存储的程序代码来实现上述功能。具体实现时,该存储器100也可以集成在处理器110中,或者,独立于处理器110。In this embodiment of the present application, the above-mentioned processor 110 and the memory 100 may be combined into a processing device, which is more commonly an independent component. The processor 110 is configured to execute program codes stored in the memory 100 to implement the above functions. During specific implementation, the memory 100 may also be integrated in the processor 110 , or be independent of the processor 110 .
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,简称:I2C)接口、集成电路内置音频(inter-integrated circuit sound,简称:I2S)接口、脉冲编码调制(pulse code modulation,简称:PCM)接口、通用异步收发传输器(universal asynchronous receiver/transmitter,简称:UART)接口、移动产业处理器接口(mobile industry processor interface,简称:MIPI)、通用输入输出(general-purpose input/output,简称:GPIO)接口、用户标识模块(subscriber identity module,简称:SIM)接口、通用串行总线(universal serial bus,简称:USB)接口中之一或其任意组合。In some embodiments, the processor 110 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, referred to as: I2C) interface, integrated circuit built-in audio (inter-integrated circuit sound, referred to as: I2S) interface, pulse code modulation (pulse code modulation, referred to as: PCM) interface, universal asynchronous Transmitter (universal asynchronous receiver/transmitter, referred to as: UART) interface, mobile industry processor interface (mobile industry processor interface, referred to as: MIPI), general-purpose input/output (general-purpose input/output, referred to as: GPIO) interface, user Identity module (subscriber identity module, referred to as: SIM) interface, universal serial bus (universal serial bus, referred to as: USB) interface one or any combination thereof.
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对可穿戴设备的系统架构的结构限定。在另一些实施例中,可穿戴设备也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is only a schematic illustration, and does not constitute a structural limitation on the system architecture of the wearable device. In other embodiments, the wearable device may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
移动通信模块120a可以提供应用在可穿戴设备203上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块120a可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,简称:LNA)等。进一步地,可穿戴设备203还可以包括第一天线130。移动通信模块120a可以由第一天线130接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块120a还可以对经调制解调处理器调制后的信号放大,经第一天线130转为电磁波辐射出去。在一些实施例中,移动通信模块120a的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块120a的至少部分功能模块可以与处理器110的至少部 分模块被设置在同一个器件中。The mobile communication module 120a can provide a wireless communication solution including 2G/3G/4G/5G etc. applied on the wearable device 203 . The mobile communication module 120a may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA for short) and the like. Further, the wearable device 203 may further include the first antenna 130 . The mobile communication module 120a can receive the electromagnetic wave by the first antenna 130, filter, amplify and other processing on the received electromagnetic wave, and transmit it to the modulation and demodulation processor for demodulation. The mobile communication module 120a can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the first antenna 130 . In some embodiments, at least part of the functional modules of the mobile communication module 120a may be provided in the processor 110 . In some embodiments, at least some of the functional modules of the mobile communication module 120a may be provided in the same device as at least some of the modules of the processor 110.
无线通信模块120b可以提供应用在可穿戴设备203上的包括无线局域网(wirelesslocal area networks,简称:WLAN)(如无线保真(wireless fidelity,简称:Wi-Fi)网络),蓝牙(bluetooth,简称:BT),全球导航卫星系统(global navigation satellite system,简称:GNSS),调频(frequency modulation,简称:FM),近距离无线通信技术(near field communication,简称:NFC),红外技术(infrared,简称:IR)等无线通信的解决方案。无线通信模块120b可以是集成至少一个通信处理模块的一个或多个器件。进一步地,可穿戴设备203还可以包括第二天线131。无线通信模块120b经由第二天线131接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块120b还可以从处理器110接收待发送的信号,对其进行调频,放大,经第二天线131转为电磁波辐射出去。The wireless communication module 120b can provide wireless local area networks (wireless local area networks, referred to as: WLAN) (such as wireless fidelity (wireless fidelity, referred to as: Wi-Fi) networks), Bluetooth (bluetooth, referred to as: BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (Infrared) IR) and other wireless communication solutions. The wireless communication module 120b may be one or more devices integrating at least one communication processing module. Further, the wearable device 203 may further include the second antenna 131 . The wireless communication module 120b receives electromagnetic waves via the second antenna 131 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 . The wireless communication module 120b can also receive the signal to be sent from the processor 110, frequency-modulate the signal, amplify the signal, and then convert it into an electromagnetic wave for radiation through the second antenna 131.
本申请实施例中,第一天线130和移动通信模块120a耦合,第二天线131和无线通信模块120b耦合,使得可穿戴设备203可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,简称:GSM),通用分组无线服务(general packet radio service,简称:GPRS),码分多址接入(code division multiple access,简称:CDMA),宽带码分多址(wideband code division multiple access,简称:WCDMA),时分码分多址(time-division code division multiple access,简称:TDSCDMA),长期演进(long term evolution,简称:LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global posi tioning system,简称:GPS),全球导航卫星系统(global navigation satellite system,简称:GLONASS),北斗卫星导航系统(bei dou navigation satellite system,简称:BDS),准天顶卫星系统(quasi-zenith satellite system,简称:QZSS)和/或星基增强系统(satellite based augmentation systems,简称:SBAS)。In this embodiment of the present application, the first antenna 130 is coupled with the mobile communication module 120a, and the second antenna 131 is coupled with the wireless communication module 120b, so that the wearable device 203 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include a global system for mobile communications (GSM for short), a general packet radio service (GPRS for short), a code division multiple access (code division multiple access), Abbreviation: CDMA), wideband code division multiple access (WCDMA), time division code division multiple access (time-division code division multiple access, abbreviation: TDSCDMA), long term evolution (long term evolution, abbreviation: LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc. The GNSS may include global positioning system (global positioning system, referred to as: GPS), global navigation satellite system (global navigation satellite system, referred to as: GLONASS), Beidou satellite navigation system (bei dou navigation satellite system, referred to as: BDS) , quasi-zenith satellite system (quasi-zenith satellite system, referred to as: QZSS) and/or satellite based augmentation systems (satellite based augmentation systems, referred to as: SBAS).
受话器140与处理器110连接,受话器140用于将音频电信号转换成声音信号。The receiver 140 is connected to the processor 110, and the receiver 140 is used for converting audio electrical signals into sound signals.
主麦克风150与处理器110连接,主麦克风150用于收集通话的声音信号,并将声音信号转换为电信号。当用户需要拨打电话、发送语音信号或者通过语音助手触发可穿戴设备203执行某种功能时,用户可以靠近主麦克风并发出声音,以供主麦克风150收集声音信号。The main microphone 150 is connected to the processor 110, and the main microphone 150 is used for collecting the sound signal of the call and converting the sound signal into an electrical signal. When the user needs to make a call, send a voice signal, or trigger the wearable device 203 to perform a certain function through a voice assistant, the user can approach the main microphone and make a sound for the main microphone 150 to collect the sound signal.
副麦克风160与处理器110连接,副麦克风160用于收集通话环境周边的噪音。该可穿戴设备203包括主麦克风150和副麦克风160两个麦克风,这样既可以采集声音信号,还可以实现降噪功能。在另一些实施例中,可穿戴设备还可以设置三个或四个麦克风,以实现采集声音信号、降噪、识别声音来源、实现定向录音功能。The sub-microphone 160 is connected to the processor 110, and the sub-microphone 160 is used for collecting the noise around the call environment. The wearable device 203 includes two microphones, the main microphone 150 and the secondary microphone 160, so that it can not only collect sound signals, but also realize a noise reduction function. In other embodiments, the wearable device may further be provided with three or four microphones, so as to realize the functions of collecting sound signals, reducing noise, identifying sound sources, and realizing directional recording.
显示屏170与处理器110连接,显示屏170用于接收用户输入的触控指令,并将触控指令发送至处理器110,以供处理器110根据触控指令调取相关界面并将相关界面发送至显示屏170,显示屏170显示相关界面;显示屏170还用于显示睡前状态曲线,以供用户查看;显示屏170还用于显示睡眠质量评分并为用户提供反馈结果按钮。The display screen 170 is connected to the processor 110, and the display screen 170 is used for receiving the touch command input by the user, and sending the touch command to the processor 110, so that the processor 110 can call the relevant interface according to the touch command and send the relevant interface Sent to the display screen 170, the display screen 170 displays the relevant interface; the display screen 170 is also used to display the pre-sleep state curve for the user to view; the display screen 170 is also used to display the sleep quality score and provide the user with a feedback result button.
传感器模块180与处理器110连接,传感器模块180用于采集各传感器的状态信息,以供处理器110进行处理。传感器模块180包括:加速度(Accelerometer,简称:ACC)传感器180a、光电容积描记(Photoplethysmograph,简称:PPG)传感器180b、 脑电波传感器180c和湿度传感器180d。其中,加速度传感器180a用于检测可穿戴设备203在三维空间内围绕x轴的第一加速度、围绕y轴的第二加速度和围绕z轴的第三加速度。PPG传感器180b用于检测用户的心率信号并将心率信号发送至处理器110。脑电波传感器180c用于检测用户的脑电信号并将脑电信号发送至处理器110。湿度传感器180d用于检测可穿戴设备203周围环境的湿度并将湿度发送至处理器110。The sensor module 180 is connected to the processor 110 , and the sensor module 180 is used for collecting state information of each sensor for the processor 110 to process. The sensor module 180 includes an acceleration (Accelerometer, ACC for short) sensor 180a, a photoplethysmograph (PPG for short) sensor 180b, a brain wave sensor 180c and a humidity sensor 180d. The acceleration sensor 180a is used to detect the first acceleration around the x-axis, the second acceleration around the y-axis, and the third acceleration around the z-axis of the wearable device 203 in the three-dimensional space. The PPG sensor 180b is used to detect the user's heart rate signal and send the heart rate signal to the processor 110 . The brain wave sensor 180 c is used to detect the user's brain electrical signals and send the brain electrical signals to the processor 110 . The humidity sensor 180d is used to detect the humidity of the surrounding environment of the wearable device 203 and send the humidity to the processor 110 .
交互模块190与处理器110连接,交互模块190用于接收用户对电源键的长按操作或短按操作;交互模块190还用于接收用户输入的反馈结果。The interaction module 190 is connected to the processor 110, and the interaction module 190 is used for receiving a user's long-press operation or a short-press operation on the power key; the interaction module 190 is also used for receiving a feedback result input by the user.
可以理解的是,图6所示的结构图并不构成对可穿戴设备203的结构的具体限定。在另一些实施例中,可穿戴设备203的结构可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件、软件或软件和硬件的组合实现。It can be understood that the structure diagram shown in FIG. 6 does not constitute a specific limitation on the structure of the wearable device 203 . In other embodiments, the structure of the wearable device 203 may include more or less components than shown, or combine some components, or separate some components, or different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
本申请实施例中,从内部系统架构方面来看,终端设备201与可穿戴设备203的区别在于显示屏的显示区域的大小、传感器的种类和处理器的运算能力,即:终端设备201的显示区域大于可穿戴设备203的显示区域;终端设备201的传感器的种类可以不同于可穿戴设备203的传感器的种类,例如:可穿戴设备203具备PPG传感器108b,终端设备201不具备PPG传感器;终端设备201的处理器的运算能力大于可穿戴设备203的处理器的运算能力。终端设备201所包括的其它内部结构与可穿戴设备203所包括的结构相同,在此不再赘述。In the embodiment of the present application, from the perspective of the internal system architecture, the difference between the terminal device 201 and the wearable device 203 lies in the size of the display area of the display screen, the type of the sensor, and the computing capability of the processor, that is, the display of the terminal device 201 The area is larger than the display area of the wearable device 203; the type of the sensor of the terminal device 201 can be different from the type of the sensor of the wearable device 203, for example: the wearable device 203 has the PPG sensor 108b, the terminal device 201 does not have the PPG sensor; the terminal device The computing power of the processor of 201 is greater than the computing power of the processor of the wearable device 203 . Other internal structures included in the terminal device 201 are the same as those included in the wearable device 203 , and details are not described herein again.
以用户对终端设备201进行操作为例,用户可以通过开启电源键的操作打开自己的终端设备201,使得终端设备201的显示屏显示终端设备201的主页,图7为本申请实施例提供的一种终端设备201的主页的示意图,如图7所示,该主页包括状态栏300、菜单栏400和功能栏500。状态栏300包括运营商、当前时间、当前地理位置及当地天气、网络状态、信号状态和电源电量。如图7所示,运营商为中国移动;当前时间为12月21日星期一08:08;当前地理位置为北京,北京天气为多云且温度为6摄氏度;网络状态为wifi网络;信号状态为满格信号,表示当前信号较强;电源电量中的黑色部分可以表示终端设备201的剩余电量。终端设备中可以安装有应用程序。用户在使用终端设备201的过程中,基于自己的不同需求,会使用各种各样的应用程序,例如,终端设备201中安装有具备睡前状态检测功能的应用程序,即:运动健康应用程序。如图7所示,菜单栏400包括至少一个应用程序的图标,每个应用程序的图标下方具有相应的应用程序的名称,例如:图库、任务卡商店、微博、运动健康、微信、卡包、设置、相机、电话、短信和通讯录。其中,应用程序的图标以及相应的应用程序的名称的位置可以根据用户的喜好进行调整,本申请实施例对此不作限定。功能栏500包括返回键、主页键和菜单键。返回键用于返回上一级,主页键用于返回主页,菜单键用于显示出多个后台应用。Taking the user's operation on the terminal device 201 as an example, the user can turn on the terminal device 201 by turning on the power button, so that the display screen of the terminal device 201 displays the home page of the terminal device 201. A schematic diagram of the homepage of the terminal device 201 is shown in FIG. 7 , the homepage includes a status bar 300 , a menu bar 400 and a function bar 500 . Status bar 300 includes operator, current time, current geographic location and local weather, network status, signal status, and power level. As shown in Figure 7, the operator is China Mobile; the current time is 08:08 on Monday, December 21; the current geographical location is Beijing, the weather in Beijing is cloudy and the temperature is 6 degrees Celsius; the network status is wifi network; the signal status is A full-scale signal indicates that the current signal is strong; the black part of the power supply can indicate the remaining power of the terminal device 201 . An application can be installed in the terminal device. In the process of using the terminal device 201, the user will use various applications based on their different needs. For example, the terminal device 201 is installed with an application with a function of detecting the state before going to bed, that is, a sports health application . As shown in FIG. 7 , the menu bar 400 includes icons of at least one application program, and the name of the corresponding application program is under the icon of each application program, such as: gallery, task card store, Weibo, sports health, WeChat, card package , Settings, Camera, Phone, SMS and Contacts. The positions of the icon of the application program and the name of the corresponding application program may be adjusted according to the user's preference, which is not limited in this embodiment of the present application. The function bar 500 includes a back key, a home key, and a menu key. The return key is used to return to the previous level, the home key is used to return to the home page, and the menu key is used to display multiple background applications.
需要说明的是,图7所示的终端设备201的主页的示意图为本申请实施例的示例性的展示,终端设备201的主页的示意图也可以为其他样式,本申请实施例对此不作限定。It should be noted that the schematic diagram of the homepage of the terminal device 201 shown in FIG. 7 is an exemplary display of the embodiment of the present application, and the schematic diagram of the homepage of the terminal device 201 may also be in other styles, which are not limited in this embodiment of the present application.
如图7所示,用户可以点击菜单栏400中的运动健康应用程序的图标,使得用户的终端设备201的显示屏显示运动健康的界面。图8为本申请实施例提供的一种运动 健康界面的示意图,如图8所示,该界面包括分类栏410和多个功能模块420,分类栏410包括健康、运动、设备和我的。例如:当用户点击健康时,如图8所示,终端设备201的显示屏显示运动健康的界面;当用户点击运动时,终端设备201的显示屏显示用户的详细运动记录;当用户点击设备时,终端设备201的显示屏显示与该终端设备201配对的设备,用户可以进行对设备的配对操作和移除操作;当用户点击我的时,终端设备201的显示屏可以显示关于用户的个人信息,用户可以对个人信息进行更新操作。功能模块420包括睡眠功能模块421、步数功能模块422和体重功能模块423。睡眠功能模块421用于记录并显示最近一次的睡眠日期和睡眠时长,例如:12月21日的睡眠时长为7.5小时;步数功能模块422用于记录并显示当前日期和当前步数,例如:当前日期为12月21日,当前步数为1053步;体重功能模块423用于记录并显示最近一次的体重记录日期和体重,例如:最近一次的体重记录日期为12月20日,体重为49.5公斤。As shown in FIG. 7 , the user can click the icon of the sports health application in the menu bar 400 , so that the display screen of the user's terminal device 201 displays the sports health interface. Fig. 8 is a schematic diagram of a sports health interface provided by an embodiment of the present application. As shown in Fig. 8 , the interface includes a classification column 410 and a plurality of functional modules 420, and the classification column 410 includes health, sports, equipment and mine. For example: when the user clicks on health, as shown in FIG. 8 , the display screen of the terminal device 201 displays the interface of exercise health; when the user clicks on exercise, the display screen of the terminal device 201 displays the detailed exercise record of the user; when the user clicks on the device , the display screen of the terminal device 201 displays the device paired with the terminal device 201, and the user can perform pairing and removal operations on the device; when the user clicks on me, the display screen of the terminal device 201 can display personal information about the user , the user can update the personal information. The function module 420 includes a sleep function module 421 , a step count function module 422 and a weight function module 423 . The sleep function module 421 is used to record and display the latest sleep date and sleep duration, for example: the sleep duration on December 21 is 7.5 hours; the step count function module 422 is used to record and display the current date and the current number of steps, for example: The current date is December 21, and the current number of steps is 1053 steps; the weight function module 423 is used to record and display the latest weight record date and weight, for example: the last weight record date is December 20, and the weight is 49.5 Kilogram.
如图8所示,用户可以点击睡眠功能模块421,使得用户的终端设备201的显示屏显示睡眠功能模块的界面。图9为本申请实施例提供的一种睡眠功能模块界面的示意图,如图9所示,该界面包括开启睡前检测模块431和睡眠评分模块432。开启睡前检测模块431用于启动睡前检测功能;睡眠评分模块432用于对用户的睡眠质量进行评分,并通过显示屏显示该评分。用户可以点击开启睡前检测模块431,使得用户的终端设备201的显示屏显示睡前检测功能的界面。图10为本申请实施例提供的一种睡前检测功能界面的示意图,如图10所示,该界面包括睡眠状态曲线,该睡前状态曲线的横轴为时间点,时间点从22:00开始,表明终端设备201从22:00开始进行睡前检测并生成睡前状态评分;纵轴为睡前状态评分;当前时间为08:08,因此当前时间未到22:00,尚未开始进行睡前检测并生成睡前状态评分。图11为本申请实施例提供的又一种睡前检测功能界面的示意图,如图11所示,该界面包括睡眠状态曲线,该睡前状态曲线的横轴为时间点,纵轴为睡前状态评分,当前时间为23:08,表明终端设备201开始进行睡前检测并生成睡前状态评分,一个时间点对应一个睡前状态评分,将每个时间点对应的睡前状态评分进行连接生成睡前状态曲线。睡前状态评分表明用户当前适合睡眠的程度,睡前状态评分越高,表明用户越适合进入睡眠。As shown in FIG. 8 , the user may click on the sleep function module 421, so that the display screen of the user's terminal device 201 displays the interface of the sleep function module. FIG. 9 is a schematic diagram of an interface of a sleep function module provided by an embodiment of the present application. As shown in FIG. 9 , the interface includes enabling a bedtime detection module 431 and a sleep scoring module 432 . Turning on the bedtime detection module 431 is used to start the bedtime detection function; the sleep scoring module 432 is used to score the user's sleep quality, and display the score on the display screen. The user can click to open the bedtime detection module 431, so that the display screen of the user's terminal device 201 displays an interface of the bedtime detection function. FIG. 10 is a schematic diagram of a bedtime detection function interface provided by an embodiment of the application. As shown in FIG. 10 , the interface includes a sleep state curve, and the horizontal axis of the bedtime state curve is a time point, and the time point is from 22:00 Start, it indicates that the terminal device 201 starts to perform bedtime detection and generate bedtime state score from 22:00; the vertical axis is bedtime state score; the current time is 08:08, so the current time has not reached 22:00, and the bedtime state score has not yet started. Pre-bed detection and generation of bedtime state scores. FIG. 11 is a schematic diagram of another pre-sleep detection function interface provided by an embodiment of the application. As shown in FIG. 11 , the interface includes a sleep state curve, the horizontal axis of the pre-sleep state curve is the time point, and the vertical axis is the time before going to bed Status score, the current time is 23:08, indicating that the terminal device 201 starts to perform bedtime detection and generate bedtime status scores, one time point corresponds to a bedtime status score, and the bedtime status scores corresponding to each time point are connected to generate Bedtime state curve. The pre-sleep state score indicates the degree to which the user is currently suitable for sleep, and the higher the pre-sleep state score, the more suitable the user is to go to sleep.
如图11所示,睡前检测功能界面还包括功能设置按钮433,用户可以点击功能设置按钮433以对睡前检测的工作模式和检测时间进行设置。图12为本申请实施例提供的一种功能设置界面的示意图,如图12所示,用户可以通过对第一设置操作输入希望的检测时间,例如:用户输入希望的检测时间为22:00,则终端设备201会在每天22:00开始进行睡前检测。可选地,终端设备201还可以根据指定时间间隔进行睡前检测,以实现实时对用户进行睡前检测;可选地,终端设备201还可以响应于用户对睡前检测模块的激活操作进行睡前检测,例如:用户睡前在终端设备201上依次点击运动健康应用程序的图标、睡眠功能模块421和开启睡前检测模块431,以激活睡前检测功能,用户响应于该激活操作,开始进行睡前检测。需要说明的是,以上所述仅为使得终端设备201开始进行睡前检测的示例性操作,还可以以其它方式使得终端设备开始进行睡前检测,本申请实施例对此不作限定。As shown in FIG. 11 , the bedtime detection function interface further includes a function setting button 433 , and the user can click the function setting button 433 to set the work mode and detection time of bedtime detection. FIG. 12 is a schematic diagram of a function setting interface provided by an embodiment of the present application. As shown in FIG. 12 , the user can input a desired detection time through the first setting operation. For example, the user inputs the desired detection time as 22:00, Then the terminal device 201 will start to perform bedtime detection at 22:00 every day. Optionally, the terminal device 201 can also perform bedtime detection according to a specified time interval, so as to realize the real-time bedtime detection of the user; optionally, the terminal device 201 can also perform bedtime detection in response to the user's activation operation of the bedtime detection module. For example, before going to bed, the user clicks the icon of the sports health application, the sleep function module 421 and the bedtime detection module 431 in sequence on the terminal device 201 to activate the bedtime detection function, and the user starts to respond to the activation operation. Check before going to bed. It should be noted that the above description is only an exemplary operation for enabling the terminal device 201 to start bedtime detection, and other methods may also be used to enable the terminal device to start bedtime detection, which is not limited in this embodiment of the present application.
用户还可以通过对第二设置操作选择希望的工作模式,工作模式包括勿扰模式、 提醒模式和促进模式,用户可以选择以上三种工作模式之一。若用户选择勿扰模式,处理器仅生成睡前状态曲线,不对用户进行提醒,以免打扰用户。若用户选择提醒模式,处理器判断出用户处于出睡状态且当前用户状态符合提醒条件,通过设置的第一提醒方式对用户进行提醒,以提醒用户睡觉。当前用户状态包括睡前状态曲线,睡前状态曲线包括时间点和每个时间点对应的睡前状态评分,提醒条件可以设置为连续的第一指定数量的时间点对应的睡前状态评分逐渐升高。第一指定数量可根据实际情况进行设置,作为一种可选方案,第一指定数量为3。可选地,提醒条件还可以设置为连续的第二指定数量的时间点对应的睡前状态评分均大于设置的评分阈值。第二指定数量可根据实际情况进行设置,作为一种可选方案,第二指定数量为3。评分阈值可根据实际情况进行设置,作为一种可选方案,评分阈值为80分。第一提醒方式包括显示呼吸灯和/或生成并显示提醒消息。The user can also select a desired working mode through the second setting operation, the working modes include a do not disturb mode, a reminder mode and a promotion mode, and the user can select one of the above three working modes. If the user selects the do not disturb mode, the processor only generates a state curve before going to bed, and does not remind the user, so as not to disturb the user. If the user selects the reminder mode, the processor determines that the user is in the state of falling asleep and the current user state meets the reminder condition, and reminds the user through the set first reminder mode to remind the user to sleep. The current user state includes a bedtime state curve, and the bedtime state curve includes a time point and a bedtime state score corresponding to each time point. The reminder condition can be set so that the bedtime state score corresponding to the first specified number of consecutive time points gradually increases high. The first specified number can be set according to the actual situation. As an optional solution, the first specified number is 3. Optionally, the reminder condition may also be set such that the pre-sleep state scores corresponding to the second consecutive second specified number of time points are all greater than the set score threshold. The second specified number can be set according to the actual situation. As an optional solution, the second specified number is 3. The scoring threshold can be set according to the actual situation. As an optional solution, the scoring threshold is 80 points. The first reminder method includes displaying a breathing light and/or generating and displaying a reminder message.
下面用一个具体的例子对提醒模式进行说明:The following uses a specific example to illustrate the reminder mode:
图13a为本申请实施例提供的一种用户选择提醒模式界面的示意图,如图13a所示,用户在睡前检测功能界面选中了提醒模式且希望的检测时间为22:00,终端设备201在22:00开始进行睡前检测。提醒条件设置为连续的3个时间点对应的睡前状态评分逐渐升高,第一提醒方式设置为显示呼吸灯。图13b为本申请实施例提供的又一种睡前状态曲线的示意图,如图13b所示,22:25对应的睡前状态评分为57分;22:30对应的睡前状态评分为75分;22:35对应的睡前状态评分为80分;22:40对应的睡前状态评分为85分,即:22:30、22:35和22:40,3个连续的时间点对应的睡前状态评分逐渐升高,表明睡前状态曲线满足提醒条件,图13c为本申请实施例提供的一种提醒用户界面的示意图,当睡前状态曲线满足提醒条件,终端设备201显示呼吸灯434,以提醒用户睡觉。Fig. 13a is a schematic diagram of an interface for a user to select a reminder mode provided by an embodiment of the application. As shown in Fig. 13a, the user selects the reminder mode on the bedtime detection function interface and the desired detection time is 22:00, and the terminal device 201 is at 22:00. At 22:00, bedtime testing begins. The reminder condition is set to gradually increase the bedtime state score corresponding to three consecutive time points, and the first reminder mode is set to display the breathing light. Fig. 13b is a schematic diagram of another bedtime state curve provided by an embodiment of the present application. As shown in Fig. 13b, the bedtime state score corresponding to 22:25 is 57 points; the bedtime state score corresponding to 22:30 is 75 points ; 22:35 corresponds to a bedtime state score of 80 points; 22:40 corresponds to a bedtime state score of 85 points, namely: 22:30, 22:35 and 22:40, three consecutive time points corresponding to sleep The former state score gradually increases, indicating that the state curve before going to bed satisfies the reminder condition. Figure 13c is a schematic diagram of a reminder user interface provided by the embodiment of the application. When the state curve before going to sleep satisfies the reminder condition, the terminal device 201 displays the breathing light 434, to remind the user to sleep.
下面用另一个具体的例子对提醒模式进行说明:Let's use another specific example to illustrate the reminder mode:
图14a为本申请实施例提供的一种用户选择提醒模式界面的示意图,如图14a所示,用户在睡前检测功能界面选中了提醒模式且希望的检测时间为22:00,终端设备201在22:00开始进行睡前检测。提醒条件设置为连续的3个的时间点对应的睡前状态评分均大于设置的评分阈值,评分阈值设置为80分,第一提醒方式设置为生成并显示提醒消息。图14b为本申请实施例提供的又一种睡前状态曲线的示意图,如图14b所示,该睡前状态曲线的横轴为时间点,纵轴为睡前状态评分。由图14b可以看出,22:35对应的睡前状态评分为82分;22:40对应的睡前状态评分为85分;22:45对应的睡前状态评分为90分,即:连续3个时间点对应的睡前状态评分均大于设置的评分阈值,表明睡前状态曲线满足提醒条件,图14c为本申请实施例提供的又一种提醒用户界面的示意图,当睡前状态曲线满足提醒条件,终端设备201生成并显示提醒消息,以提醒用户睡觉,例如:提醒消息为:运动健康提醒您该睡觉啦。Fig. 14a is a schematic diagram of a user selecting a reminder mode interface provided by an embodiment of the application. As shown in Fig. 14a, the user has selected the reminder mode on the bedtime detection function interface and the desired detection time is 22:00, and the terminal device 201 is at 22:00. At 22:00, bedtime testing begins. When the reminder condition is set to three consecutive time points, the pre-sleep state scores are all greater than the set score threshold, the score threshold is set to 80 points, and the first reminder mode is set to generate and display a reminder message. FIG. 14b is a schematic diagram of another bedtime state curve provided by an embodiment of the present application. As shown in FIG. 14b , the horizontal axis of the bedtime state curve is the time point, and the vertical axis is the bedtime state score. It can be seen from Figure 14b that the score of the bedtime state corresponding to 22:35 is 82 points; the bedtime state score corresponding to 22:40 is 85 points; the bedtime state score corresponding to 22:45 is 90 points, that is: 3 consecutive The pre-sleep state scores corresponding to each time point are all greater than the set score threshold, indicating that the pre-sleep state curve satisfies the reminder condition. Figure 14c is a schematic diagram of another reminder user interface provided by the embodiment of the application. condition, the terminal device 201 generates and displays a reminder message to remind the user to sleep, for example, the reminder message is: exercise health reminds you that it is time to sleep.
需要说明的是,提醒条件还可以设置为其它条件,第一提醒方式还可以设置为其它形式,本申请实施例在此仅作示例性说明,对此不做限制。It should be noted that the reminder condition may also be set to other conditions, and the first reminder mode may also be set to other forms. The embodiments of the present application are only illustratively described here, and are not limited thereto.
图15a为本申请实施例提供的一种用户选择促进模式界面的示意图,如图15a所示,若用户选择促进模式,用户需要输入第三设置操作,即:输入希望的促进时间,例如:促进时间设置为23:00。若用户处于驾驶状态且当前时间大于促进时间,通过 设置的第二提醒方式对用户进行提醒;若用户处于非驾驶状态且当前时间大于促进时间,通过设置的第三提醒方式对用户进行提醒。例如:第二提醒方式包括播放第一类型音乐,第一类型音乐为提神音乐,避免用户在驾驶过程中睡意过高而出现危险;第三提醒方式包括播放第二类型音乐,第二类型音乐为白噪声音乐,增强用户睡意。Fig. 15a is a schematic diagram of a user-selected promotion mode interface provided by an embodiment of the application. As shown in Fig. 15a, if the user selects the promotion mode, the user needs to input a third setting operation, that is, input a desired promotion time, for example: promotion The time is set to 23:00. If the user is in a driving state and the current time is greater than the promotion time, the user is reminded by the set second reminder mode; if the user is in a non-driving state and the current time is greater than the promotion time, the user is reminded through the set third reminder mode. For example: the second reminder method includes playing the first type of music, which is refreshing music to avoid danger caused by excessive drowsiness during driving; the third reminder method includes playing the second type of music, and the second type of music is White noise music to enhance user drowsiness.
下面用一个具体的例子对促进模式进行说明:The following is a concrete example to illustrate the promotion mode:
以终端设备201为例,如图15a所示,用户选择促进模式且希望的促进时间为23:00。当前时间为23:08,大于促进时间,若用户处于驾驶状态,终端设备201可以播放摇滚乐,同时可穿戴设备进行振动,以避免用户在驾驶过程中睡意过高而出现危险,图15b为本申请实施例提供的又一种提醒用户界面的示意图,该界面包括音乐播放器,音乐播放器正在播放摇滚乐。为节约终端设备201的功耗,终端设备201的显示屏保持显示音乐播放器的时长大于或等于指定时长后,熄灭显示屏。若用户处于非驾驶状态,终端设备201可以播放白噪声,以增强用户睡意,图15c为本申请实施例提供的又一种提醒用户界面的示意图,如图15c所示,该界面包括音乐播放器,音乐播放器正在播放白噪声。为节约可穿戴设备的功耗,终端设备201的显示屏保持显示音乐播放器的时长大于或等于指定时长后,熄灭显示屏。其中,指定时长可以根据用户需求进行设置,例如:指定时长为30秒。值得说明的是,可以在终端设备上选择促进模式,在可穿戴设备和/或终端设备上播放第一类型音乐或第二类型音乐;也可以在可穿戴设备上选择促进模式,在可穿戴设备和/或终端设备上播放第一类型音乐或第二类型音乐。Taking the terminal device 201 as an example, as shown in FIG. 15a, the user selects the promotion mode and the desired promotion time is 23:00. The current time is 23:08, which is greater than the promotion time. If the user is in the driving state, the terminal device 201 can play rock music, and the wearable device vibrates at the same time, so as to prevent the user from being too drowsy and dangerous during driving. Fig. 15b is this application. Another schematic diagram of a reminder user interface provided by an embodiment, the interface includes a music player, and the music player is playing rock music. In order to save the power consumption of the terminal device 201, after the display screen of the terminal device 201 keeps displaying the music player for a duration greater than or equal to the specified duration, the display screen is turned off. If the user is in a non-driving state, the terminal device 201 can play white noise to enhance the user's drowsiness. FIG. 15c is a schematic diagram of another reminding user interface provided by the embodiment of the present application. As shown in FIG. 15c, the interface includes a music player , the music player is playing white noise. In order to save the power consumption of the wearable device, after the display screen of the terminal device 201 keeps displaying the music player for a duration greater than or equal to the specified duration, the display screen is turned off. The specified duration can be set according to user requirements, for example, the specified duration is 30 seconds. It is worth noting that the promotion mode can be selected on the terminal device, and the first type of music or the second type of music can be played on the wearable device and/or the terminal device; And/or the first type of music or the second type of music is played on the terminal device.
值得说明的是,第二提醒方式和第三提醒方式还可以设置为其它形式,本申请实施例在此仅作示例性说明,对提醒方式的具体形式不做限制。It should be noted that the second reminder mode and the third reminder mode may also be set to other forms, and the embodiments of the present application are only illustratively described here, and the specific forms of the reminder mode are not limited.
用户还可以通过输入第二查询操作以查看自身的睡眠质量评分,图16a为本申请实施例提供的一种睡眠功能模块界面的示意图,如图16a所示,该界面包括开启睡前检测模块431和睡眠评分模块432,用户可以点击睡眠评分模块432,使得终端设备201的显示屏显示睡眠评分的界面。图16b为本申请实施例提供的一种睡眠评分界面的示意图,如图16b所示,该界面包括日期、睡眠时长和睡眠质量评分,例如:12月21日睡眠质量评分为77分,睡眠时长为7.5小时。用户还可以点击日期左侧的双三角符号,以查看前一天的睡眠质量评分和睡眠时长。The user can also check his own sleep quality score by entering a second query operation. Fig. 16a is a schematic diagram of a sleep function module interface provided by an embodiment of the present application. As shown in Fig. 16a, the interface includes enabling the bedtime detection module 431. And the sleep scoring module 432, the user can click on the sleep scoring module 432, so that the display screen of the terminal device 201 displays the interface of sleep scoring. Fig. 16b is a schematic diagram of a sleep scoring interface provided by an embodiment of the present application. As shown in Fig. 16b, the interface includes a date, a sleep duration, and a sleep quality score. for 7.5 hours. Users can also click the double triangle to the left of the date to view the previous day's sleep quality score and sleep duration.
作为一种可选方案,用户还可以通过可穿戴设备203查询睡前状态曲线图17为本申请实施例提供的一种可穿戴设备的主页的示意图,如图17所示,该主页包括当前时间、当前地理位置、当地天气和多个应用程序的图标,如图17所示,当前时间为12月21日星期一08:08;当前地理位置为北京,北京天气为多云且温度为6摄氏度,多个应用程序的图标包括:图库、微博、运动健康、微信、短信和通讯录。如图17所示,用户可以点击运动健康应用程序的图标,使得用户的可穿戴设备203的显示屏显示运动健康的界面。As an optional solution, the user can also query the bedtime state curve through the wearable device 203. Figure 17 is a schematic diagram of a homepage of a wearable device provided by an embodiment of the present application. As shown in Figure 17, the homepage includes the current time , current geographic location, local weather and icons of multiple applications, as shown in Figure 17, the current time is 08:08 on Monday, December 21; the current geographic location is Beijing, the weather in Beijing is cloudy and the temperature is 6 degrees Celsius, Icons for multiple applications include: Gallery, Weibo, Sports Health, WeChat, SMS, and Contacts. As shown in FIG. 17 , the user can click the icon of the sports health application, so that the display screen of the user's wearable device 203 displays the sports health interface.
本申请实施例中,可穿戴设备203的运动健康界面的示意图与终端设备201的运动界面的示意图相同,区别仅在于显示屏的显示区域大小,即:终端设备201的显示区域较大,可穿戴设备203的显示区域较小。在此不再赘述。In the embodiment of the present application, the schematic diagram of the sports health interface of the wearable device 203 is the same as the schematic diagram of the sports interface of the terminal device 201, and the difference is only in the size of the display area of the display screen, that is, the display area of the terminal device 201 is larger, and the wearable The display area of device 203 is small. It is not repeated here.
值得说明的是,用户也可以通过可穿戴设备203开启睡眠功能模块查看睡眠日期和睡眠时长、开启步数功能模块以查看当前步数、开启体重功能模块以查看体重;用 户还可以通过睡眠功能模块开启睡前检测模块以查看睡前状态曲线、设置检测时间以及选择睡前检测的工作模式;还可以开启睡眠评分模块以查看睡眠质量评分。具体界面和操作过程可以参见图7至图16b,在此不再一一赘述。It is worth noting that the user can also turn on the sleep function module through the wearable device 203 to check the sleep date and sleep duration, turn on the step count function module to check the current number of steps, turn on the weight function module to check the weight; the user can also use the sleep function module to check the weight. Open the bedtime detection module to view the bedtime state curve, set the detection time, and select the work mode of bedtime detection; you can also open the sleep score module to view the sleep quality score. The specific interface and operation process can be referred to FIG. 7 to FIG. 16b, which will not be repeated here.
图18为本申请实施例提供的一种电子设备的处理器的结构示意图,如图18所示,电子设备的处理器110包括出入睡模块111、睡前评估模块113、睡眠分期和评估模块115。其中,出入睡模块111分别与睡前评估模块113和睡眠分期和评估模块115连接。出入睡模块111可以接收传感器模块180发送的第一信号;从第一信号中提取出第一特征参数;根据第一特征参数,生成用户的第一睡眠状态,第一睡眠状态包括入睡状态、出睡状态和疑似入睡状态。其中,入睡状态为用户处于睡眠中的状态,出睡状态为用户处于清醒的状态,疑似入睡状态为用户可能处于睡眠中的状态。若用户的第一睡眠状态为疑似入睡状态,表明当前并不能确定出用户处于睡眠或清醒状态,还需要采集更多的第一信号进行进一步判断。FIG. 18 is a schematic structural diagram of a processor of an electronic device provided by an embodiment of the present application. As shown in FIG. 18 , the processor 110 of the electronic device includes a falling asleep module 111 , a pre-sleep evaluation module 113 , and a sleep staging and evaluation module 115 . Wherein, the falling asleep module 111 is respectively connected with the pre-sleep evaluation module 113 and the sleep staging and evaluation module 115 . The falling asleep module 111 can receive the first signal sent by the sensor module 180; extract the first characteristic parameter from the first signal; Sleeping state and suspected falling asleep state. The falling asleep state is a state in which the user is sleeping, the falling asleep state is a state in which the user is awake, and the suspected falling asleep state is a state in which the user may be sleeping. If the first sleeping state of the user is a suspected falling asleep state, it indicates that it is not currently determined that the user is in a sleeping or awake state, and more first signals need to be collected for further judgment.
若第一睡眠状态为入睡状态,将第一睡眠状态发送至睡眠分期和评估模块115,睡眠分期和评估模块115可以接收出入睡模块111发送的用户的第三睡眠状态,第三睡眠状态包括入睡状态、出睡状态和疑似入睡状态。若第三睡眠状态为入睡状态或疑似入睡状态,继续执行接收出入睡模块111发送的用户的第三睡眠状态的步骤;若第三睡眠状态为出睡状态,睡眠分期和评估模块115生成睡眠质量评分。If the first sleep state is the sleep state, the first sleep state is sent to the sleep staging and evaluation module 115, and the sleep staging and evaluation module 115 can receive the user's third sleep state sent by the sleep and fall module 111. The third sleep state includes falling asleep state, falling asleep and suspected falling asleep. If the third sleep state is the falling asleep state or the suspected falling asleep state, continue to perform the step of receiving the third sleep state of the user sent by the falling asleep module 111; if the third sleeping state is the falling asleep state, the sleep staging and evaluation module 115 generates a sleep quality score.
若第一睡眠状态为出睡状态,睡前评估模块113可以接收传感器模块180发送的第一信号;从第一信号中提取出第一特征参数,通过睡前状态评估模型,根据第一特征参数,生成睡前状态评分;根据睡前状态评分,生成睡前状态曲线,并将生成的睡前状态曲线发送至显示屏170,以供显示屏170显示睡前状态曲线;继续接收出入睡模块111发送的第二睡眠状态,第二睡眠状态包括入睡状态、出睡状态和疑似入睡状态,若第二睡眠状态包括入睡状态,则关闭睡前评估模块113,开启睡眠分期和评估模块115;若第二睡眠状态包括疑似入睡状态,表明当前并不能确定出用户处于睡眠或清醒状态,还需要采集更多的第一信号进行进一步判断,则出入睡模块111继续接收传感器模块180发送的第一信号;从第一信号中提取出第一特征参数;根据第一特征参数,生成用户的第二睡眠状态;若第二睡眠状态包括出睡状态,继续执行通过睡前状态评估模型,根据第一特征参数,生成睡前状态评分,并生成睡前状态曲线的步骤。If the first sleep state is the state of falling asleep, the pre-sleep evaluation module 113 may receive the first signal sent by the sensor module 180; extract the first characteristic parameter from the first signal, and use the pre-sleep state evaluation model according to the first characteristic parameter , to generate a bedtime state score; according to the bedtime state score, generate a bedtime state curve, and send the generated bedtime state curve to the display screen 170 for the display screen 170 to display the bedtime state curve; continue to receive the falling asleep module 111 The second sleep state sent, the second sleep state includes falling asleep state, falling asleep state and suspected falling asleep state, if the second sleeping state includes falling asleep state, turn off the pre-sleep evaluation module 113, and open the sleep staging and evaluation module 115; The second sleeping state includes the suspected falling asleep state, indicating that it is not currently determined that the user is in a sleeping or awake state, and more first signals need to be collected for further judgment, then the falling asleep module 111 continues to receive the first signal sent by the sensor module 180; The first characteristic parameter is extracted from the first signal; the second sleep state of the user is generated according to the first characteristic parameter; if the second sleep state includes the falling asleep state, continue to execute the pre-sleep state evaluation model, and according to the first characteristic parameter , steps to generate a bedtime state score, and generate a bedtime state curve.
若第一睡眠状态为疑似入睡状态,表明当前并不能确定出用户处于睡眠或清醒状态,还需要采集更多的第一信号进行进一步判断,则出入睡模块111继续接收传感器模块180发送的第一信号;从第一信号中提取出第一特征参数;根据第一特征参数,生成用户的第二睡眠状态。If the first sleeping state is a suspected falling asleep state, it indicates that it is not currently determined that the user is in a sleeping or awake state, and more first signals need to be collected for further judgment, the falling asleep module 111 continues to receive the first signal sent by the sensor module 180. signal; extracting a first characteristic parameter from the first signal; generating a second sleep state of the user according to the first characteristic parameter.
下面用一个具体的实施例,以可穿戴设备为例,示例性说明睡前状态检测的工作流程,本申请实施例中,各步骤由可穿戴设备执行。图19为本申请实施例提供的一种睡前状态检测方法的算法流程图,如图19所示,可穿戴设备获取当前时间,若当前时间小于设置的检测时间,在一段时间后重新获取当前时间;若当前时间大于或等于设置的检测时间,按照第一时间间隔获取用户的第一信号(步骤11)。启动处理器的出 入睡模块111,检测第一睡眠状态(步骤12),若出入睡模块111检测到用户的第一睡眠状态为入睡状态,开启睡眠分期和评估模块115(步骤13),睡眠分期和评估模块115接收出入睡模块111发送的第三睡眠状态,判断第三睡眠状态是否为出睡状态(步骤14),若否,继续执行步骤14;若是,关闭睡眠分期和评估模块115(步骤15),保存第一信号和睡眠分期评估模块115生成的睡眠质量评分(步骤16)。若检测到用户的第一睡眠状态为疑似入睡状态或出睡状态,启动睡前评估模块113(步骤17),睡前评估模块113以指定时间间隔输出睡前状态评分,并根据多个睡前状态评分动态生成睡前状态曲线(步骤18);睡前评估模块113获取出入睡模块111发送的第二睡眠状态,判断第二睡眠状态是否为入睡状态(步骤19),若是,执行步骤13;若否,判断第二睡眠状态是否为疑似入睡状态(步骤20),若是,执行步骤18;若否,识别工作模式(步骤21),若工作模式为勿扰模式,继续执行步骤18;若工作模式为提醒模式,判断睡前状态曲线是否满足设置的提醒条件(22),若是,对用户进行提醒(步骤23),继续执行步骤18;若否,继续执行步骤18;若工作模式为促进模式,判断促进时间是否非空且当前时间是否大于促进时间(步骤24),若是,判断用户是否处于驾驶状态(步骤25),若是,播放第一类型音乐为用户提神(步骤26),继续执行步骤18;若否,播放第二类型音乐为用户增强睡意(步骤27),继续执行步骤18。The following uses a specific embodiment, taking a wearable device as an example, to illustrate the workflow of bedtime state detection exemplarily. In this embodiment of the present application, each step is performed by the wearable device. FIG. 19 is an algorithm flowchart of a method for detecting a bedtime state provided by an embodiment of the application. As shown in FIG. 19 , the wearable device obtains the current time. If the current time is less than the set detection time, the current time time; if the current time is greater than or equal to the set detection time, obtain the first signal of the user according to the first time interval (step 11). Start the sleep module 111 of the processor to detect the first sleep state (step 12), if the sleep module 111 detects that the user's first sleep state is the sleep state, open the sleep stage and evaluation module 115 (step 13), and the sleep stage And the evaluation module 115 receives the third sleep state sent by the falling asleep module 111, and judges whether the third sleep state is the falling asleep state (step 14), if not, continue to perform step 14; if so, close the sleep stage and the evaluation module 115 (step 14). 15), save the first signal and the sleep quality score generated by the sleep stage evaluation module 115 (step 16). If it is detected that the first sleep state of the user is suspected of falling asleep or falling out of sleep, the pre-sleep evaluation module 113 is activated (step 17 ). The state score dynamically generates a bedtime state curve (step 18); the bedtime evaluation module 113 obtains the second sleep state sent by the falling asleep module 111, and judges whether the second sleep state is the sleep state (step 19), and if so, execute step 13; If not, judge whether the second sleep state is a suspected sleep state (step 20), if yes, go to step 18; if not, identify the working mode (step 21), if the working mode is the do not disturb mode, continue to execute step 18; The mode is the reminder mode, and it is judged whether the state curve before going to bed meets the set reminder condition (22), if so, remind the user (step 23), and continue to execute step 18; if not, continue to execute step 18; if the working mode is the promotion mode , judge whether the promotion time is not empty and whether the current time is greater than the promotion time (step 24), if so, judge whether the user is in a driving state (step 25), if so, play the first type of music to refresh the user (step 26), continue to perform steps 18; If no, play the second type of music to enhance sleepiness for the user (step 27), and continue to step 18.
上述步骤11至步骤22也可由终端设备执行,执行过程与可穿戴设备相同,在此不再一一赘述。可以理解的是,根据可穿戴设备与终端设备的显示区域、运算能力等不同之处,上述步骤11至步骤22中部分步骤可以由可穿戴设备执行,部分步骤可以由终端设备执行。以上步骤执行顺序也可以根据设备运行情况和用户设置等发生变化,例如,步骤21识别工作模式可以在步骤19或步骤20之前执行,如果是提醒模式无需获取第二睡眠状态,直接判断睡前状态曲线是否满足设置提醒条件。The above steps 11 to 22 can also be executed by a terminal device, and the execution process is the same as that of the wearable device, and details are not repeated here. It can be understood that, according to the difference in display area and computing capability of the wearable device and the terminal device, some steps in the above steps 11 to 22 may be performed by the wearable device, and some steps may be performed by the terminal device. The execution order of the above steps can also be changed according to the operating conditions of the equipment and user settings. For example, step 21 identifies the working mode and can be executed before step 19 or step 20. If it is the reminder mode, there is no need to obtain the second sleep state, and the bedtime state is directly determined. Whether the curve meets the setting reminder conditions.
图20为本申请实施例提供的一种睡前状态检测方法的流程图,如图20所示,该方法包括:FIG. 20 is a flowchart of a method for detecting a bedtime state provided by an embodiment of the present application. As shown in FIG. 20 , the method includes:
步骤102、获取当前时间。Step 102: Obtain the current time.
示例性地,如图9所示,用户点击睡前检测模块431,电子设备执行步骤102,获取电子设备的当前时间,例如:图10所示的当前时间为8:08,图11所示的当前时间为23:08。Exemplarily, as shown in FIG. 9, the user clicks the bedtime detection module 431, and the electronic device executes step 102 to obtain the current time of the electronic device. For example, the current time shown in FIG. 10 is 8:08, and the current time shown in FIG. The current time is 23:08.
步骤104、判断当前时间是否大于或等于设置的检测时间,若是,执行步骤106;若否,执行步骤102。 Step 104 , determine whether the current time is greater than or equal to the set detection time, if yes, go to step 106 ; if not, go to step 102 .
本申请实施例中,设置的检测时间为开始跟踪第一信号的时间,用户可根据自身的实际需求进行设置。示例性地,如图12所示,用户通过对第一设置操作输入的检测时间为22:00。具体地,电子设备的交互模块接收用户输入的第一设置操作,第一设置操作包括设置检测时间的操作;电子设备的处理器响应于第一设置操作,设置检测时间。In this embodiment of the present application, the set detection time is the time to start tracking the first signal, and the user can set it according to his actual needs. Exemplarily, as shown in FIG. 12 , the detection time input by the user through the first setting operation is 22:00. Specifically, the interaction module of the electronic device receives a first setting operation input by the user, where the first setting operation includes an operation of setting the detection time; the processor of the electronic device sets the detection time in response to the first setting operation.
本申请实施例中,第一设置操作对应于图7至图12所示的多个操作中的一个或任意组合。In this embodiment of the present application, the first setting operation corresponds to one or any combination of the multiple operations shown in FIG. 7 to FIG. 12 .
本申请实施例中,可穿戴设备的处理器若判断出当前时间大于或等于检测时间,表明可以开始获取用户的第一信号,继续执行步骤106;若判断出当前时间小于检测 时间,表明未到获取用户的第一信号的时间,在一段时间后,继续执行步骤102。例如:当前时间为22:30,检测时间为22:00,则可穿戴设备的处理器判断出当前时间22:30大于检测时间22:00,表明可以开始获取用户的第一信号,继续执行步骤106。例如:当前时间为21:00,检测时间为22:00,则可穿戴设备的处理器判断出当前时间21:00小于检测时间22:00,表明未到获取用户的第一信号的时间,在10分钟后,重新获取当前时间,即:继续执行步骤102。In the embodiment of the present application, if the processor of the wearable device determines that the current time is greater than or equal to the detection time, it indicates that the acquisition of the user's first signal can begin, and step 106 is continued; if it is determined that the current time is less than the detection time, it indicates that it has not arrived Obtain the time of the user's first signal, and after a period of time, continue to perform step 102 . For example, if the current time is 22:30 and the detection time is 22:00, the processor of the wearable device determines that the current time 22:30 is greater than the detection time 22:00, indicating that the user's first signal can be obtained, and the steps are continued. 106. For example, if the current time is 21:00 and the detection time is 22:00, the processor of the wearable device determines that the current time 21:00 is less than the detection time 22:00, indicating that it is not time to obtain the user's first signal. After 10 minutes, the current time is re-acquired, that is, step 102 is continued.
步骤106、按照设置的第一时间间隔获取用户的第一信号。Step 106: Acquire the first signal of the user according to the set first time interval.
本申请实施例中,第一时间间隔可根据实际情况进行设置。作为一种可选方案,第一时间间隔为500毫秒(ms)。作为另一种可选方案,第一时间间隔为1秒(s)。In this embodiment of the present application, the first time interval may be set according to actual conditions. As an option, the first time interval is 500 milliseconds (ms). As another alternative, the first time interval is 1 second (s).
本申请实施例中,第一信号包括加速度信号、心率信号和脑电信号中之一或其任意组合。可选地,第一信号还可以包括湿度信号和/或噪声信号,湿度信号和/或噪声信号作为辅助信号,可以进一步后提高后续生成的睡前状态评分的准确性。In this embodiment of the present application, the first signal includes one of an acceleration signal, a heart rate signal, and an electroencephalogram signal, or any combination thereof. Optionally, the first signal may further include a humidity signal and/or a noise signal, and the humidity signal and/or the noise signal are used as auxiliary signals, which can further improve the accuracy of the subsequently generated bedtime state score.
本申请实施例中,用户佩戴可穿戴设备,可穿戴设备的加速度传感器会检测出可穿戴设备的加速度信号,并将加速度信号发送至处理器,以使处理器获取到加速度信号,加速度信号包括电子设备在三维空间内围绕x轴的第一加速度、围绕y轴的第二加速度和围绕z轴的第三加速度。In the embodiment of the present application, the user wears the wearable device, and the acceleration sensor of the wearable device will detect the acceleration signal of the wearable device, and send the acceleration signal to the processor, so that the processor can obtain the acceleration signal, and the acceleration signal includes electronic The device has a first acceleration around the x-axis, a second acceleration around the y-axis, and a third acceleration around the z-axis in three-dimensional space.
本申请实施例中,PPG传感器可以检测出用户的心率信号,具体地,PPG传感器包括发光二极管(LED),LED向皮肤组织发送光信号,皮肤组织对光信号进行反射,并向PPG传感器反射回反射光信号;PPG传感器将反射光信号转换为电信号,再通过模数(A/D)转换,将电信号转换为数字信号,该数字信号即为心率信号;PPG传感器将心率信号发送至处理器,以使处理器获取到心率信号。In the embodiment of the present application, the PPG sensor can detect the heart rate signal of the user. Specifically, the PPG sensor includes a light emitting diode (LED), and the LED sends a light signal to the skin tissue, and the skin tissue reflects the light signal and reflects it back to the PPG sensor. Reflected light signal; the PPG sensor converts the reflected light signal into an electrical signal, and then converts the electrical signal into a digital signal through analog-to-digital (A/D) conversion, which is the heart rate signal; the PPG sensor sends the heart rate signal to the processing so that the processor can obtain the heart rate signal.
本申请实施例中,脑电波传感器可以检测出用户的脑电信号,并将脑电信号发送至处理器,以使处理器获取到脑电信号,处理器对所述脑电信号进行预处理、信号提取后可以获取脑电信号的幅值和频率等。脑电频率可以反映出用户的大脑活动,脑电频率越高,表明用户的大脑活动越活跃;脑电频率越低,表明用户的大脑活动越安静。In the embodiment of the present application, the brain wave sensor can detect the user's brain electrical signal, and send the brain electrical signal to the processor, so that the processor can obtain the brain electrical signal, and the processor preprocesses the brain electrical signal, After the signal is extracted, the amplitude and frequency of the EEG signal can be obtained. The EEG frequency can reflect the user's brain activity. The higher the EEG frequency, the more active the user's brain activity is; the lower the EEG frequency, the quieter the user's brain activity.
本申请实施例中,湿度传感器可以检测出湿度信号,并将湿度信号发送至处理器,以使处理器获取到湿度信号并转换为湿度值,湿度信号包括可穿戴设备周围环境的湿度。具体地,湿度传感器具备湿敏元件,在湿敏元件的基片上覆盖一层用感湿材料制成的膜,当空气中的水蒸气吸附在感湿膜上时,湿敏元件的电阻值会发生变化,湿度信号包括湿敏元件的电阻值。In the embodiment of the present application, the humidity sensor can detect the humidity signal, and send the humidity signal to the processor, so that the processor obtains the humidity signal and converts it into a humidity value, and the humidity signal includes the humidity of the surrounding environment of the wearable device. Specifically, the humidity sensor has a humidity sensor, and a film made of a humidity-sensitive material is covered on the substrate of the humidity sensor. When the water vapor in the air is adsorbed on the humidity-sensitive film, the resistance value of the humidity sensor will change. Changed, the humidity signal includes the resistance value of the humidity sensor.
本申请实施例中,副麦克风可以采集到噪声信号,并将噪声信号发送至处理器,一是处理器获取到噪声信号,噪声信号包括为可穿戴设备周围环境的噪声。In the embodiment of the present application, the secondary microphone may collect the noise signal and send the noise signal to the processor. First, the processor obtains the noise signal, and the noise signal includes the noise of the surrounding environment of the wearable device.
步骤108、从第一信号中提取出第一特征参数。Step 108: Extract the first characteristic parameter from the first signal.
本申请实施例中,电子设备的处理器从第一信号中提取出第一特征参数。电子设备为可穿戴设备或终端设备。In this embodiment of the present application, the processor of the electronic device extracts the first characteristic parameter from the first signal. The electronic device is a wearable device or a terminal device.
本申请实施例中,当第一信号包括加速度信号时,第一特征参数包括电子设备在三维空间内围绕x轴的第一加速度、围绕y轴的第二加速度和围绕z轴的第三加速度。具体地,处理器从加速度信号中提取出第一加速度、第二加速度和第三加速度。In this embodiment of the present application, when the first signal includes an acceleration signal, the first characteristic parameter includes a first acceleration around the x-axis, a second acceleration around the y-axis, and a third acceleration around the z-axis of the electronic device in three-dimensional space. Specifically, the processor extracts the first acceleration, the second acceleration and the third acceleration from the acceleration signal.
进一步地,当第一信号包括加速度信号时,第一特征参数还包括运动时间间隔。 具体地,存储器中存储有多个历史加速度信号和每个历史加速度信号对应的时间;处理器从存储器中查询出满足运动量条件的至少一个运动加速度信号和每个运动加速度信号对应的时间,运动量条件包括第一加速度大于设置的第一加速度阈值和/或第二加速度大于设置的第二加速度阈值和/或第三加速度大于设置的第三加速度阈值,其中,第一加速度阈值、第二加速度阈值和第三加速度阈值可以根据实际情况进行设置;处理器从每个运动加速度信号对应的时间中查询出距离当前时间最近的运动时间;处理器根据运动时间和当前时间,计算出运动时间间隔。Further, when the first signal includes the acceleration signal, the first characteristic parameter further includes the movement time interval. Specifically, the memory stores a plurality of historical acceleration signals and the time corresponding to each historical acceleration signal; the processor queries the memory for at least one motion acceleration signal that satisfies the motion quantity condition and the time corresponding to each motion acceleration signal, and the motion quantity condition Including that the first acceleration is greater than the set first acceleration threshold and/or the second acceleration is greater than the set second acceleration threshold and/or the third acceleration is greater than the set third acceleration threshold, wherein the first acceleration threshold, the second acceleration threshold and The third acceleration threshold can be set according to the actual situation; the processor queries the motion time closest to the current time from the time corresponding to each motion acceleration signal; the processor calculates the motion time interval according to the motion time and the current time.
本申请实施例中,当第一信号包括心率信号时,第一特征参数包括心率变异性。具体地,处理器通过指定分析方法从心率信号中提取出心率变异性。其中,指定分析方法包括时域分析法、频域分析法或非线性分析法。In this embodiment of the present application, when the first signal includes a heart rate signal, the first characteristic parameter includes heart rate variability. Specifically, the processor extracts the heart rate variability from the heart rate signal by specifying an analysis method. The specified analysis method includes a time domain analysis method, a frequency domain analysis method or a nonlinear analysis method.
本申请实施例中,当第一信号包括脑电信号时,第一特征参数包括脑电图波形。具体地,脑电信号包括脑电频率,处理器从脑电信号中提取出脑电频率,根据脑电频率生成脑电图波形。脑电图波形包括δ波、θ波、α波和β波,其中,δ波的脑电频率为1~3Hz,幅度为20~200μV,当人在婴儿期或智力发育不成熟、成年人在极度疲劳和昏睡或麻醉状态下,可在颞叶和顶叶记录到这种波段;θ波的脑电频率为4~7Hz,幅度为5~20μV,在成年人意愿受挫或者抑郁以及精神病患者中容易出现θ波;α波的脑电频率为8~13Hz,幅度为20~100μV,人在大脑活动安静并闭眼时最容易出现α波;β波的脑电频率为14~30Hz,幅度为100~150μV,当人在精神紧张、情绪激动或亢奋时容易出现β波。In this embodiment of the present application, when the first signal includes an EEG signal, the first characteristic parameter includes an EEG waveform. Specifically, the EEG signal includes an EEG frequency, and the processor extracts the EEG frequency from the EEG signal, and generates an EEG waveform according to the EEG frequency. EEG waveforms include delta waves, theta waves, alpha waves and beta waves. The EEG frequency of the delta wave is 1-3 Hz and the amplitude is 20-200 μV. Under extreme fatigue and lethargy or anesthesia, this band can be recorded in the temporal lobe and parietal lobe; the EEG frequency of theta wave is 4 to 7 Hz, and the amplitude is 5 to 20 μV. Theta waves are prone to appear; the EEG frequencies of alpha waves are 8-13Hz, and the amplitude is 20-100μV. People are most likely to appear alpha waves when the brain is quiet and eyes are closed; the EEG frequencies of beta waves are 14-30Hz, and the amplitude is 100 ~ 150μV, when people are nervous, emotional or excited, β waves are likely to appear.
本申请实施例中,当第一信号包括湿度信号时,第一特征参数包括湿度。具体地,湿度信号包括湿敏元件的电阻值,处理器根据电阻值生成电阻值对应的湿度,该湿度为电子设备周围环境的湿度。In this embodiment of the present application, when the first signal includes a humidity signal, the first characteristic parameter includes humidity. Specifically, the humidity signal includes the resistance value of the humidity sensing element, and the processor generates humidity corresponding to the resistance value according to the resistance value, where the humidity is the humidity of the surrounding environment of the electronic device.
本申请实施例中,当第一信号包括噪声信号时,第一特征参数包括噪声。具体地,处理器从噪声信号中提取出噪声,该噪声为电子设备周围环境的噪声。In this embodiment of the present application, when the first signal includes a noise signal, the first characteristic parameter includes noise. Specifically, the processor extracts the noise from the noise signal, and the noise is the noise of the surrounding environment of the electronic device.
步骤110、根据第一特征参数,判断所述用户的第一睡眠状态,若第一睡眠状态为入睡状态,执行步骤116;若第一睡眠状态为疑似入睡状态或出睡状态,执行步骤112。Step 110: Determine the first sleep state of the user according to the first characteristic parameter. If the first sleep state is a sleep state, go to step 116; if the first sleep state is a suspected sleep state or a sleep out state, go to step 112.
作为一种可选方案,处理器将第一特征参数输入支持向量机(SVM)模型,输出用户的第一睡眠状态。其中,用户的第一睡眠状态包括入睡状态、疑似入睡状态或出睡状态。入睡状态为用户处于睡眠中的状态,出睡状态为用户处于清醒的状态,疑似入睡状态为用户可能处于睡眠中的状态。例如:第一特征参数包括运动时间间隔、心率变异性和脑电波图形,若运动时间间隔小于第一门限、心率变异性小于第二门限,脑电图波形为β波时,可以确定出用户的第一睡眠状态为出睡状态;若运动时间间隔大于或等于第一门限且小于第三门限、心率变异性大于或等于第二门限且小于第四门限,脑电图波形为α波时,可以确定出用户的第一睡眠状态为疑似入睡状态;若运动时间间隔大于或等于第三门限,心率变异性大于或等于第四门限,脑电波图形为δ波时,可以确定出用户的第一睡眠状态为入睡状态。As an optional solution, the processor inputs the first characteristic parameter into a support vector machine (SVM) model, and outputs the first sleep state of the user. The first sleep state of the user includes a sleep-in state, a suspected sleep-in state, or a sleep-out state. The falling asleep state is a state in which the user is sleeping, the falling asleep state is a state in which the user is awake, and the suspected falling asleep state is a state in which the user may be sleeping. For example: the first characteristic parameter includes exercise time interval, heart rate variability and brain wave pattern. If the exercise time interval is less than the first threshold, the heart rate variability is less than the second threshold, and the EEG waveform is β wave, it can be determined that the user's The first sleep state is the state of falling asleep; if the exercise time interval is greater than or equal to the first threshold and less than the third threshold, the heart rate variability is greater than or equal to the second threshold and less than the fourth threshold, and the EEG waveform is alpha wave, it can be It is determined that the user's first sleep state is a suspected sleep state; if the exercise time interval is greater than or equal to the third threshold, the heart rate variability is greater than or equal to the fourth threshold, and the brain wave pattern is delta waves, the user's first sleep state can be determined. The state is sleep state.
值得说明的是,还可以通过其他方式生成用户的睡眠状态,在此仅进行示例性说明,本申请实施例对生成用户的睡眠状态的方式不作限定。It should be noted that the sleep state of the user may also be generated in other manners, which is only illustratively described here, and the embodiment of the present application does not limit the manner of generating the sleep state of the user.
步骤112、通过睡前状态评估模型,根据第一特征参数,生成睡前状态评分。 Step 112 , generating a pre-sleep state score according to the first characteristic parameter through the pre-sleep state evaluation model.
本申请实施例中,处理器将第一特征参数输入睡前状态评估模型,生成睡前状态评分。其中,睡前状态评分表明用户当前适合睡眠的程度,睡前状态评分越高,表明用户越适合进入睡眠。In this embodiment of the present application, the processor inputs the first characteristic parameter into the bedtime state evaluation model to generate a bedtime state score. Among them, the pre-sleep state score indicates the degree to which the user is currently suitable for sleep, and the higher the pre-sleep state score, the more suitable the user is to sleep.
本申请实施例中,为减小设备功耗,按照指定时间间隔输出一个睡前状态评分,能够较好体现出用户的睡前状态。作为一种可选方案,指定时间间隔为5分钟。In the embodiment of the present application, in order to reduce the power consumption of the device, a pre-sleep state score is output according to a specified time interval, which can better reflect the user's pre-sleep state. As an option, specify a time interval of 5 minutes.
下面对睡前状态评估模型的构建过程进行描述,图21为本申请实施例提供的一种构建睡前状态评估模型的流程图,如图21所示,该构建过程包括:The construction process of the pre-sleep state evaluation model is described below. FIG. 21 is a flowchart of constructing a pre-sleep state evaluation model provided by the embodiment of the application. As shown in FIG. 21 , the construction process includes:
步骤202、获取初始第一信号。Step 202: Acquire an initial first signal.
本申请实施例中,可以招募多个受试者,并采集每个受试者的第一信号,将采集到的第一信号确定为初始第一信号。其中,招募的受试者需要在性别、年龄和职业等方面的分布较广,可以提高睡前状态评估模型的准确性。In this embodiment of the present application, multiple subjects may be recruited, the first signal of each subject may be collected, and the collected first signal may be determined as the initial first signal. Among them, the recruited subjects need to be widely distributed in terms of gender, age and occupation, which can improve the accuracy of the bedtime state assessment model.
本申请实施例中,初始第一信号包括加速度信号、心率信号和脑电信号中之一或其任意组合。可选地,初始第一信号还可以包括湿度信号和/或噪声信号,湿度信号和/或噪声信号作为辅助信号,可以进一步后提高构建出的睡前状态评估模型的准确性。In this embodiment of the present application, the initial first signal includes one of an acceleration signal, a heart rate signal, and an electroencephalogram signal, or any combination thereof. Optionally, the initial first signal may further include a humidity signal and/or a noise signal, and the humidity signal and/or the noise signal are used as auxiliary signals, which can further improve the accuracy of the constructed pre-sleep state evaluation model.
步骤204、从初始第一信号中提取出初始第一特征参数。Step 204: Extract the initial first characteristic parameter from the initial first signal.
本申请实施例中,当第一信号包括加速度信号时,第一特征参数包括电子设备在三维空间内围绕x轴的第一加速度、围绕y轴的第二加速度和围绕z轴的第三加速度,具体提取过程请参见步骤108,在此不再赘述。In this embodiment of the present application, when the first signal includes an acceleration signal, the first characteristic parameter includes the first acceleration of the electronic device around the x-axis, the second acceleration around the y-axis, and the third acceleration around the z-axis in the three-dimensional space, For the specific extraction process, please refer to step 108, which will not be repeated here.
本申请实施例中,当初始第一信号包括心率信号时,初始第一特征参数包括心率变异性,具体提取过程请参见步骤108,在此不再赘述。In this embodiment of the present application, when the initial first signal includes a heart rate signal, the initial first characteristic parameter includes heart rate variability. For a specific extraction process, please refer to step 108, which will not be repeated here.
本申请实施例中,当第一信号包括脑电信号时,第一特征参数包括脑电图波形,具体提取过程请参见步骤108,在此不再赘述。In this embodiment of the present application, when the first signal includes an EEG signal, the first characteristic parameter includes an EEG waveform. For a specific extraction process, please refer to step 108, which will not be repeated here.
本申请实施例中,当第一信号包括湿度信号时,第一特征参数包括湿度,具体提取过程请参见步骤108,在此不再赘述。In this embodiment of the present application, when the first signal includes a humidity signal, the first characteristic parameter includes humidity. For a specific extraction process, please refer to step 108, which will not be repeated here.
本申请实施例中,当第一信号包括噪声信号时,第一特征参数包括噪声,具体提取过程请参见步骤108,在此不再赘述。In this embodiment of the present application, when the first signal includes a noise signal, the first characteristic parameter includes noise. For a specific extraction process, please refer to step 108, which will not be repeated here.
步骤206、获取初始睡眠质量评分。Step 206: Obtain an initial sleep quality score.
本申请实施例中,将初始第一特征参数划分为训练集和测试集,将训练集输入随机森林分类生成器进行训练,生成睡眠质量评估模型;将测试集输入睡眠质量评估模型,输出初始睡眠质量评分。In the embodiment of the present application, the initial first characteristic parameter is divided into a training set and a test set, the training set is input into the random forest classification generator for training, and a sleep quality evaluation model is generated; the test set is input into the sleep quality evaluation model, and the initial sleep quality is output. Quality rating.
步骤208、根据初始睡眠质量评分,生成睡前标签值。 Step 208 , generating a pre-sleep label value according to the initial sleep quality score.
本申请实施例中,对初始睡眠质量评分进行修正,生成睡前标签值。例如:将初始睡眠质量评分通过显示屏向用户显示,并接收用户通过点击设置的反馈结果按钮输入的反馈结果,反馈结果包括偏高、准确或偏低,若用户输入的反馈结果为偏高,则将初始睡眠质量评分减去设置的第一阈值生成睡前标签值,作为一种可选方案,第一阈值为10;若用户输入的反馈结果为准确,此时初始睡眠质量评分能够准确表示用户的睡眠质量,则将初始睡眠质量评分确定为睡前标签值;若用户输入的反馈结果为偏低,则将初始睡眠质量评分与设置的第二阈值相减生成睡前标签值,作为一种可选方 案,第二阈值为10。可选地,睡眠质量评分可以为百分制。In the embodiment of the present application, the initial sleep quality score is corrected to generate a pre-sleep label value. For example: display the initial sleep quality score to the user through the display screen, and receive the feedback result input by the user by clicking the set feedback result button. The feedback result includes high, accurate or low. If the feedback result input by the user is high, Then the initial sleep quality score is subtracted from the set first threshold to generate the pre-sleep label value. As an optional solution, the first threshold is 10; if the feedback result input by the user is accurate, then the initial sleep quality score can accurately represent The sleep quality of the user, the initial sleep quality score is determined as the bedtime label value; if the feedback result input by the user is low, the initial sleep quality score is subtracted from the set second threshold to generate the bedtime label value, which is used as a bedtime label value. An optional solution, the second threshold is 10. Optionally, the sleep quality score may be on a percentile scale.
需要说明的是,对初始睡眠质量评分的修正还可以使用其它方法,本申请实施例中做出示例性描述,对初始睡眠质量评分的修正方法不作限定。It should be noted that other methods may also be used for the correction of the initial sleep quality score, which are exemplarily described in the embodiments of the present application, and the correction method of the initial sleep quality score is not limited.
本申请实施例中,对步骤202至步骤204与步骤206至步骤208之间的执行顺序不作限定,即:可以先执行步骤202至步骤204,再执行步骤206至步骤208;也可以先执行步骤206至步骤208,再执行步骤202至步骤204。In this embodiment of the present application, the execution order between steps 202 to 204 and steps 206 to 208 is not limited, that is, steps 202 to 204 may be executed first, and then steps 206 to 208 may be executed; or steps may be executed first Step 206 to step 208, and then perform step 202 to step 204.
步骤210、将初始第一特征参数和睡前标签值输入机器学习算法进行训练,生成睡前状态评估模型。Step 210: Input the initial first feature parameter and the pre-sleep label value into the machine learning algorithm for training, and generate a pre-sleep state evaluation model.
本申请实施例中,机器学习算法包括决策树算法、最小二乘算法或线性回归算法。In the embodiments of the present application, the machine learning algorithm includes a decision tree algorithm, a least squares algorithm, or a linear regression algorithm.
步骤114、根据睡前状态评分,生成睡前状态曲线。 Step 114 , generating a bedtime state curve according to the bedtime state score.
本申请实施例中,处理器按照指定时间间隔每输出一个睡前状态评分,将生成的睡前状态评分与前一个时间间隔输出的睡前状态评分进行连线生成睡前状态曲线,并将睡前状态曲线发送至显示屏;显示屏显示睡前状态曲线,以供用户可以随时查看。以指定时间间隔为10分钟为例,图22a至图22e为本申请实施例提供的一种生成状态曲线的示意图,如图22a所示,22:00时,处理器输出一个睡前状态评分70分,记录该睡前状态评分;22:10时,处理器输出一个睡前状态评分65分,记录该睡前状态评分,并与22:00对应的睡前状态评分70分进行连线,连线后的睡前状态曲线如图22b所示;22:20时,处理器输出一个睡前状态评分73分,记录该睡前状态评分,并与22:10对应的睡前状态评分65分进行连线,连线后的睡前状态曲线如图22c所示;22:30时,处理器输出一个睡前状态评分75分,记录该睡前状态评分,并于22:20对应的睡前状态评分73分进行连线,连线后的睡前状态曲线如图22d所示;22:40时,处理器输出一个睡前状态评分80分,记录该睡前状态评分,并与22:30对应的睡前状态评分75分进行连线,连线后的睡前状态曲线如图22e所示。处理器根据输出的睡前状态评分动态生成睡前状态曲线,既能减小设备功耗,又可以较好的反映出用户的睡前状态。In the embodiment of the present application, each time the processor outputs a bedtime state score according to a specified time interval, the generated bedtime state score is connected with the bedtime state score output at the previous time interval to generate a bedtime state curve, and the bedtime state curve is generated. The pre-sleep state curve is sent to the display; the display shows the pre-sleep state curve for the user to view at any time. Taking the specified time interval as 10 minutes as an example, FIGS. 22a to 22e are schematic diagrams of generating a state curve provided by an embodiment of the present application. As shown in FIG. 22a, at 22:00, the processor outputs a state score 70 before going to bed. score, record the bedtime state score; at 22:10, the processor outputs a bedtime state score of 65, records the bedtime state score, and connects with the bedtime state score corresponding to 70 at 22:00, and connects The bedtime state curve after the line is shown in Figure 22b; at 22:20, the processor outputs a bedtime state score of 73 points, records the bedtime state score, and compares it with the bedtime state score of 65 points corresponding to 22:10. Connected, the bedtime state curve after the connection is shown in Figure 22c; at 22:30, the processor outputs a bedtime state score of 75 points, records the bedtime state score, and records the bedtime state score corresponding to the bedtime state at 22:20 The score of 73 points is connected, and the bedtime state curve after the connection is shown in Figure 22d; at 22:40, the processor outputs a bedtime state score of 80 points, records the bedtime state score, and corresponds to 22:30 The bedtime state score of 75 points is connected, and the bedtime state curve after the connection is shown in Figure 22e. The processor dynamically generates the bedtime state curve according to the output bedtime state score, which can not only reduce the power consumption of the device, but also better reflect the user's bedtime state.
值得说明的是,指定时间间隔可以根据设备功耗以及用户的睡前状态反映效果进行设置。处理器可以按照较小的第一时间间隔获取第一信号并根据第一信号生成睡前状态评分,若按照每生成一个睡前状态评分即输出一个睡前状态评分,则生成的睡前状态曲线的时间点对应的睡前状态评分较为密集,虽然能够准确反映出用户的睡前状态,也会导致设备功耗较高;若按照指定时间间隔输出睡前状态评分,即:按照指定时间间隔的时间点输出对应的睡前状态评分,则生成的睡前状态曲线既能较好的反映出用户的睡前状态,在生成睡前状态曲线的过程中也能减小设备功耗。作为一种可选方案,指定时间间隔为5分钟或10分钟。It is worth noting that the specified time interval can be set according to the power consumption of the device and the reflection effect of the user's bedtime state. The processor may acquire the first signal according to a relatively small first time interval and generate a bedtime state score according to the first signal, and if a bedtime state score is output every time a bedtime state score is generated, the generated bedtime state curve The pre-sleep state scores corresponding to the time point of , are relatively dense, although it can accurately reflect the user's pre-sleep state, it will also lead to high power consumption of the device; if the pre-sleep state score is output according to the specified time interval, that is: If the corresponding bedtime state score is output at the time point, the generated bedtime state curve can not only better reflect the bedtime state of the user, but also reduce the power consumption of the device in the process of generating the bedtime state curve. As an option, specify a time interval of 5 minutes or 10 minutes.
作为一种可选方案,电子设备的交互模块接收用户输入的第一查询操作,第一查询操作包括查询睡前状态曲线的操作;电子设备的处理器响应于第一查询操作,将睡前状态曲线发送至显示屏,显示屏显示睡前状态曲线。电子设备包括可穿戴设备或终端设备。As an optional solution, the interaction module of the electronic device receives a first query operation input by the user, and the first query operation includes an operation of querying the bedtime state curve; the processor of the electronic device responds to the first query operation, The curve is sent to the display, which shows the bedtime state curve. Electronic devices include wearable devices or terminal devices.
本申请实施例中,第一查询操作可以对应于图7至图10所示的多个操作中的一个或任意组合。In this embodiment of the present application, the first query operation may correspond to one or any combination of the multiple operations shown in FIG. 7 to FIG. 10 .
本申请实施例中,睡前状态曲线包括时间点和每个时间点对应的睡前状态评分。图13b为本申请实施例提供的一种睡前状态曲线的示意图,如图13b所示,该睡前状态曲线的横轴为时间点,纵轴为睡前状态评分。由图13b可以看出,22:00对应的睡前状态评分为65分;22:05对应的睡前状态评分为50分;22:10对应的睡前状态评分为55分;22:15对应的睡前状态评分为69分;22:20对应的睡前状态评分为60分;22:25对应的睡前状态评分为57分;22:30对应的睡前状态评分为75分;22:35对应的睡前状态评分为80分;22:40对应的睡前状态评分为85分。In the embodiment of the present application, the bedtime state curve includes a time point and a bedtime state score corresponding to each time point. Fig. 13b is a schematic diagram of a bedtime state curve provided by an embodiment of the present application. As shown in Fig. 13b, the horizontal axis of the bedtime state curve is a time point, and the vertical axis is a bedtime state score. As can be seen from Figure 13b, the score of the bedtime state corresponding to 22:00 is 65 points; the bedtime state score corresponding to 22:05 is 50 points; the bedtime state score corresponding to 22:10 is 55 points; the bedtime state score corresponding to 22:15 is 55 points; 22:20 corresponds to 60 points; 22:25 corresponds to 57 points; 22:30 corresponds to 75 points; 22:30 corresponds to 75 points. 35 corresponds to a bedtime state score of 80 points; 22:40 corresponds to a bedtime state score of 85 points.
本申请实施例中,用户可以通过电子设备的显示屏查看睡前状态曲线,为用户对自身作息的管理提供个性化参考。用户可以根据睡前状态曲线决定何时睡眠,或者翌日醒后回顾前一晚的睡前状态,从而调整睡眠时间,进而提高用户的睡眠质量。In the embodiment of the present application, the user can view the state curve before going to bed through the display screen of the electronic device, so as to provide a personalized reference for the user's management of his own work and rest. The user can decide when to sleep according to the bedtime state curve, or review the bedtime state of the previous night after waking up the next day, so as to adjust the sleep time and improve the user's sleep quality.
步骤116、获取用户的第二睡眠状态,若睡眠状态包括为入睡状态,执行步骤118;若睡眠状态为包括疑似入睡状态,执行步骤106;若睡眠状态为包括出睡状态,执行步骤128。Step 116: Acquire the second sleep state of the user. If the sleep state includes the falling asleep state, go to step 118; if the sleep state includes the suspected falling asleep state, go to step 106;
作为一种可选方案,处理器的出入睡模块将第一特征参数输入支持向量机(SVM)模型,输出用户的第二睡眠状态,以使处理器的睡前评估模块或睡眠分期和评估模块可以获取到用户的第二睡眠状态。第二睡眠状态包括入睡状态,出睡状态或疑似入睡状态。入睡状态为用户处于睡眠中的状态,出睡状态为用户处于清醒的状态,疑似入睡状态为用户可能处于睡眠中的状态。As an optional solution, the sleeping module of the processor inputs the first characteristic parameter into the support vector machine (SVM) model, and outputs the second sleep state of the user, so that the pre-sleep evaluation module or the sleep staging and evaluation module of the processor The second sleep state of the user can be acquired. The second sleep state includes a sleep-in state, a sleep-out state, or a suspected sleep-in state. The falling asleep state is a state in which the user is sleeping, the falling asleep state is a state in which the user is awake, and the suspected falling asleep state is a state in which the user may be sleeping.
值得说明的是,还可以通过其他方式生成用户的睡眠状态,在此仅进行示例性说明,本申请实施例对生成用户的睡眠状态的方式不作限定。It should be noted that the sleep state of the user may also be generated in other manners, which is only illustratively described here, and the embodiment of the present application does not limit the manner of generating the sleep state of the user.
步骤118、记录入睡时间。 Step 118, record the time to fall asleep.
如果步骤110或步骤116中生成的用户的睡眠状态为入睡状态,那么将所述电子设备的当前时间记录下来,作为入睡时间,并且进一步执行步骤120,以第二时间间隔来获取用户的所述第一信号。If the sleep state of the user generated in step 110 or step 116 is the sleep state, the current time of the electronic device is recorded as the time to fall asleep, and step 120 is further performed to obtain the user's sleep state at a second time interval. first signal.
步骤120、按照第二时间间隔获取用户的第一信号。Step 120: Acquire the first signal of the user according to the second time interval.
本申请实施例中,第二时间间隔可根据实际情况进行设置。例如:若需要进一步提高后续步骤生成的当前睡眠状态的准确率,作为一种可选方案,第二时间间隔可以设置为1分钟;若需要减小电子设备功耗,作为一种可选方案,第二时间间隔可以设置为5分钟。In this embodiment of the present application, the second time interval may be set according to actual conditions. For example, if it is necessary to further improve the accuracy of the current sleep state generated by the subsequent steps, as an optional solution, the second time interval can be set to 1 minute; if it is necessary to reduce the power consumption of the electronic device, as an optional solution, The second time interval can be set to 5 minutes.
作为一种可选方案,第一信号包括加速度信号、心率信号和脑电信号中之一或其任意组合。可选地,第一信号还可以包括湿度信号和/或噪声信号,湿度信号和/或噪声信号作为辅助信号,可以进一步后提高后续步骤生成的当前睡眠状态的准确性。As an optional solution, the first signal includes one of an acceleration signal, a heart rate signal and an electroencephalogram signal or any combination thereof. Optionally, the first signal may further include a humidity signal and/or a noise signal, and the humidity signal and/or the noise signal are used as auxiliary signals, which can further improve the accuracy of the current sleep state generated by the subsequent steps.
步骤122、根据第一信号,生成用户的第三睡眠状态。Step 122: Generate a third sleep state of the user according to the first signal.
本申请实施例中,处理器从第一信号中提取出第一特征参数,具体地,当第一信号包括心率信号时,第一特征参数包括心率变异性;当第一信号包括脑电信号时,第一特征参数包括脑电图波形,具体提取过程请参见步骤108;当第一信号包括湿度信号时,第一特征参数包括湿度;当第一信号包括噪声信号时,第一特征参数包括噪声。具体提取过程请参见步骤108,在此不再赘述。In this embodiment of the present application, the processor extracts the first characteristic parameter from the first signal. Specifically, when the first signal includes a heart rate signal, the first characteristic parameter includes heart rate variability; when the first signal includes an EEG signal , the first characteristic parameter includes an EEG waveform. For the specific extraction process, please refer to step 108; when the first signal includes a humidity signal, the first characteristic parameter includes humidity; when the first signal includes a noise signal, the first characteristic parameter includes noise. . For the specific extraction process, please refer to step 108, which will not be repeated here.
作为一种可选方案,处理器将第一特征参数输入支持向量机(SVM)模型,输出 用户的第三睡眠状态。第三睡眠状态包括入睡状态、疑似入睡状态或出睡状态。As an optional solution, the processor inputs the first characteristic parameter into a support vector machine (SVM) model, and outputs the third sleep state of the user. The third sleep state includes a sleep-in state, a suspected sleep-in state, or a sleep-out state.
值得说明的是,还可以通过其他方式生成用户的第三睡眠状态,在此仅进行示例性说明,本申请实施例对生成用户的第三睡眠状态的方式不作限定。It should be noted that the third sleep state of the user may also be generated in other manners, which is only illustratively described here, and the embodiment of the present application does not limit the manner of generating the third sleep state of the user.
步骤124、判断第三睡眠状态是否包括出睡状态,若是,执行步骤126;若否,执行步骤120。 Step 124 , determine whether the third sleep state includes the falling asleep state, if yes, go to step 126 ; if not, go to step 120 .
本申请实施例中,若判断出第三睡眠状态包括出睡状态,表明用户已经醒来,继续执行步骤126;若判断出第三睡眠状态不包括出睡状态,表明用户仍在睡眠中,继续执行步骤120。In the embodiment of the present application, if it is determined that the third sleep state includes the falling asleep state, it indicates that the user has woken up, and the step 126 is continued; if it is determined that the third sleeping state does not include the falling asleep state, it indicates that the user is still sleeping, and the process continues Step 120 is performed.
步骤126、生成睡眠质量评分,流程结束。Step 126: Generate a sleep quality score, and the process ends.
本申请实施例中,步骤126具体包括:In this embodiment of the present application, step 126 specifically includes:
步骤1262、记录出睡时间,并计算出睡眠时长。Step 1262: Record the sleep time and calculate the sleep time.
本申请实施例中,将出睡时间减去入睡时间,计算出睡眠时长。In the embodiment of the present application, the time to fall asleep is subtracted from the time to fall asleep to calculate the sleep duration.
步骤1264、按照指定时间长度对整个睡眠时长的第一信号进行划分,生成每个时间长度及对应的第一信号。Step 1264: Divide the first signal of the entire sleep duration according to the specified duration, and generate each duration and the corresponding first signal.
步骤1266、从每个时间长度的第一信号中提取出第一特征参数。Step 1266: Extract the first characteristic parameter from the first signal of each time length.
步骤1268、将第一特征参数输入训练好的睡眠分期预测模型,生成每个时间长度内的睡眠分期。Step 1268: Input the first characteristic parameter into the trained sleep stage prediction model to generate sleep stages within each time length.
步骤1270、根据每个时间长度内的睡眠分期和睡眠时长,计算出睡眠质量评分。Step 1270: Calculate a sleep quality score according to the sleep stage and sleep duration in each time length.
作为一种可选方案,通过设置的睡眠质量公式,对每个时间长度内的睡眠分期和睡眠时长进行计算,生成睡眠质量评分。其中,睡眠分期包括第一期、第二期、第三期和第四期。第一期,脑电波以θ波为主,不出现纺锤波或K综合波,是由完全清醒至睡眠之间的过渡阶段,对外界刺激的反应减弱,精神活动进入飘浮境界,思维和现实脱节;第二期,脑电波为纺锤波与K综合波为主,δ波少于20%;第三期,脑电波δ波占20%~50%;第四期,脑电波δ波占50%以上。例如:根据每个时间长度内的睡眠分期,计算出第四期比例,即:第四期时长占整个睡眠分期时长的比例;对第四期比例设置第一权重,对睡眠时长设置第二权重;将第一权重与第四期比例相乘生成第一相乘结果;将第二权重与睡眠时长相乘生成第二相乘结果;将第一相乘结果与第二相乘结果相加,生成睡眠质量评分。As an optional solution, a sleep quality score is generated by calculating the sleep stage and sleep duration in each time length through the set sleep quality formula. Among them, sleep stages include the first stage, the second stage, the third stage and the fourth stage. In the first phase, the brain waves are dominated by theta waves, without spindle waves or K complex waves. It is a transitional stage from fully awake to sleep. The response to external stimuli is weakened, mental activity enters a floating state, and thinking and reality are disconnected. In the second stage, the brain waves are mainly spindle waves and K complex waves, and the delta wave is less than 20%; in the third stage, the brain wave delta wave accounts for 20% to 50%; in the fourth stage, the brain wave delta wave accounts for 50%. above. For example: Calculate the proportion of the fourth period according to the sleep stages in each time length, that is: the proportion of the fourth period to the total sleep period; set the first weight for the fourth period proportion, and set the second weight for the sleep duration ; Multiply the first weight by the ratio of the fourth period to generate the first multiplication result; multiply the second weight by the sleep duration to generate the second multiplication result; add the first multiplication result and the second multiplication result, Generate a sleep quality score.
值得说明的是,还可以通过其他方式生成睡眠质量评分,在此仅进行示例性说明,本申请实施例对生成睡眠质量评分的方式不作限定。It should be noted that the sleep quality score may also be generated in other manners, which is only illustratively described here, and the embodiment of the present application does not limit the manner of generating the sleep quality score.
本申请实施例中,电子设备的交互模块接收用户输入的第二查询操作,第二查询操作包括查询睡眠质量评分的操作;电子设备的处理器响应于第二查询操作,将睡眠质量评分发送至显示屏,显示屏显示睡眠质量评分。In the embodiment of the present application, the interaction module of the electronic device receives the second query operation input by the user, and the second query operation includes the operation of querying the sleep quality score; the processor of the electronic device sends the sleep quality score to the second query operation in response to the second query operation. Display, the display shows the sleep quality score.
本申请实施例中,第二查询操作对应于图16a至图16b所示的多个操作中的一个或任意组合。In this embodiment of the present application, the second query operation corresponds to one or any combination of the multiple operations shown in FIG. 16a to FIG. 16b.
本申请实施例中,睡眠质量评分表明用户的睡眠质量,睡眠质量评分越高,表明用户的睡眠质量越好。In the embodiment of the present application, the sleep quality score indicates the sleep quality of the user, and the higher the sleep quality score, the better the sleep quality of the user.
值得说明的是,还可以通过其他方式计算出睡眠质量评分,在此仅进行示例性说明,本申请实施例对计算出睡眠质量评分的方式不作限定。It should be noted that the sleep quality score may also be calculated in other manners, which is only illustratively described here, and the embodiment of the present application does not limit the manner of calculating the sleep quality score.
进一步地,将睡眠质量评分存储至存储器。Further, the sleep quality score is stored in the memory.
进一步地,由于不同用户的个人特征、作息习惯和生理规律是不同的,对睡前状态评估模型进行更新训练,从而提高睡前状态评估模型的可靠性。作为一种可选方案,图23为本申请实施例提供的一种对睡前状态评估模型进行更新训练的流程图,如图23所示,该训练过程包括:处理器将睡眠质量评分发送至显示屏;显示屏显示睡眠质量评分并为用户提供反馈结果按钮;交互单元接收用户输入的反馈结果,并将反馈结果发送至处理器;处理器根据反馈结果修正睡前标签值,并通过在线学习算法在线更新睡前状态评估模型。Further, since different users have different personal characteristics, work and rest habits, and physiological laws, the pre-sleep state evaluation model is updated and trained, thereby improving the reliability of the pre-sleep state evaluation model. As an optional solution, FIG. 23 is a flowchart of updating and training a bedtime state evaluation model provided by an embodiment of the present application. As shown in FIG. 23 , the training process includes: the processor sends the sleep quality score to the Display screen; the display screen displays the sleep quality score and provides the user with a feedback result button; the interaction unit receives the feedback result input by the user, and sends the feedback result to the processor; the processor corrects the label value before going to bed according to the feedback result, and learns through online learning The algorithm updates the bedtime state assessment model online.
作为一种可选方案,反馈结果包括偏高、准确或偏低。As an option, the feedback results include high, accurate, or low.
本申请实施例中,在用户使用电子设备的过程中,对睡前状态评估模型进行更新训练,可以使睡前状态评估模型学习用户的个性化生理规律,能够为用户提供越来越准确的睡前状态评分。In the embodiment of the present application, when the user uses the electronic device, the pre-sleep state evaluation model is updated and trained, so that the pre-sleep state evaluation model can learn the user's personalized physiological laws, and can provide the user with more and more accurate sleep patterns. pre-status score.
步骤128、判断当前用户状态是否满足设置的提醒条件,若是,执行步骤130;若否,执行步骤106。Step 128: Determine whether the current user status satisfies the set reminder condition, if yes, go to Step 130; if not, go to Step 106.
本申请实施例中,当前用户状态包括睡前状态曲线,睡前状态曲线包括时间点和每个时间点对应的睡前状态评分,提醒条件包括连续的第一指定数量的时间点对应的睡前状态评分逐渐升高。第一指定数量可根据实际情况进行设置,作为一种可选方案,第一指定数量为3。如图13b所示,22:25对应的睡前状态评分为57分;22:30对应的睡前状态评分为75分;22:35对应的睡前状态评分为80分;22:40对应的睡前状态评分为85分,即:22:30、22:35和22:40,三个连续的时间点对应的睡前状态评分逐渐升高,表明睡前状态曲线满足提醒条件,继续执行步骤128。In the embodiment of the present application, the current user state includes a bedtime state curve, the bedtime state curve includes a time point and a bedtime state score corresponding to each time point, and the reminder condition includes a first specified number of consecutive time points corresponding to bedtime The status score gradually increased. The first specified number can be set according to the actual situation. As an optional solution, the first specified number is 3. As shown in Figure 13b, 22:25 corresponds to a bedtime state score of 57 points; 22:30 corresponds to a bedtime state score of 75 points; 22:35 corresponds to a bedtime state score of 80 points; 22:40 corresponds to a bedtime state score of 80 points The bedtime state score is 85 points, namely: 22:30, 22:35 and 22:40. The bedtime state score corresponding to three consecutive time points gradually increases, indicating that the bedtime state curve meets the reminder condition, and the steps are continued. 128.
作为一种可选方案,当前用户状态包括睡前状态曲线,睡前状态曲线包括时间点和每个时间点对应的睡前状态评分,提醒条件包括连续的第二指定数量的时间点对应的睡前状态评分均大于设置的评分阈值。第二指定数量可根据实际情况进行设置,作为一种可选方案,第二指定数量为3。评分阈值可根据实际情况进行设置,作为一种可选方案,评分阈值为80分。例如:如图14b所示,该睡前状态曲线的横轴为时间点,纵轴为睡前状态评分。由图14b可以看出,22:35对应的睡前状态评分为82分;22:40对应的睡前状态评分为85分;22:45对应的睡前状态评分为90分,即:连续三个时间点对应的睡前状态评分均大于设置的评分阈值,表明睡前状态曲线满足提醒条件,继续执行步骤128。As an optional solution, the current user state includes a bedtime state curve, the bedtime state curve includes a time point and a bedtime state score corresponding to each time point, and the reminder condition includes a second consecutive specified number of time points corresponding to sleep The previous state scores are all greater than the set score threshold. The second specified number can be set according to the actual situation. As an optional solution, the second specified number is 3. The scoring threshold can be set according to the actual situation. As an optional solution, the scoring threshold is 80 points. For example, as shown in Figure 14b, the horizontal axis of the bedtime state curve is the time point, and the vertical axis is the bedtime state score. As can be seen from Figure 14b, the score of the bedtime state corresponding to 22:35 is 82 points; the bedtime state score corresponding to 22:40 is 85 points; the bedtime state score corresponding to 22:45 is 90 points, that is, three consecutive The pre-sleep state scores corresponding to each time point are all greater than the set score threshold, indicating that the pre-sleep state curve meets the reminder condition, and step 128 is continued.
可选地,当前用户状态包括用户的驾驶状态,提醒条件包括用户处于驾驶状态且获取的当前时间大于设置的促进时间。若用户处于驾驶状态且当前时间大于促进时间,表明当前用户状态满足提醒条件,继续执行步骤130;若用户处于非驾驶状态且当前时间大于促进时间,表明当前用户状态满足提醒条件,继续执行步骤130;若当前时间小于或等于促进时间,表明当前用户状态不满足提醒条件,继续执行步骤106。Optionally, the current user state includes the user's driving state, and the reminder condition includes that the user is in the driving state and the acquired current time is greater than the set promotion time. If the user is in the driving state and the current time is greater than the promotion time, it indicates that the current user state satisfies the reminder condition, and proceeds to step 130; if the user is in the non-driving state and the current time is greater than the promotion time, it indicates that the current user state meets the reminder condition, and proceeds to step 130 ; If the current time is less than or equal to the promotion time, it indicates that the current user state does not meet the reminder condition, and step 106 is continued.
本申请实施例中,促进时间为判断驾驶状态的时间,用户可根据实际情况进行设置。作为一种可选方案,促进时间设置为23:00。具体地,电子设备的交互模块接收用户输入的第三设置操作,第三设置操作包括设置促进时间的操作;电子设备的处理器响应于第三设置操作,设置促进时间。In the embodiment of the present application, the promotion time is the time for judging the driving state, and the user can set it according to the actual situation. As an option, the promotion time is set to 23:00. Specifically, the interaction module of the electronic device receives a third setting operation input by the user, where the third setting operation includes an operation of setting the promotion time; the processor of the electronic device sets the promotion time in response to the third setting operation.
本申请实施例中,第三设置操作对应于图15a。In the embodiment of the present application, the third setting operation corresponds to FIG. 15a.
本申请实施例中,判断用户是否处于驾驶状态具体包括处理器判断无线通信模块是否与车载设备之间存在连接通道或电子设备的运动轨迹是否为圆弧状结构,若判断出无线通信模块与车载设备之间存在连接通道或电子设备的运动轨迹为圆弧状结构,表明用户处于驾驶状态;若判断出无线通信模块与车载设备之间不存在连接通道且电子设备的运动轨迹不是圆弧状结构,表明用户处于非驾驶状态。其中,电子设备中的加速度传感器可以通过电子设备在三维空间内围绕x轴的第一加速度、围绕y轴的第二加速度和围绕z轴的第三加速度的变化规律判断出电子设备的运动轨迹是否圆弧状结构,若判断出在第一时长内,第一加速度、第二加速度和第三加速度中之一或其任意组合不为零,表明电子设备的运动轨迹为圆弧状结构。作为一种可选方案,通过判断无线通信模块连接的设备的设备名称是否包括车载设备的设备名称,从而判断出无线通信模块是否与车载设备之间存在连接通道,若无线通信模块连接的设备的设备名称包括车载设备的设备名称,表明无线通信模块与车载设备之间存在连接通道;若无线通信模块连接的设备的设备名称不包括车载设备的设备名称,表明无线通信模块与车载设备之间不存在连接通道。例如:车载设备的设备名称为car kit,若无线通信模块连接的设备的设备名称包括car kit,表明无线通信模块与车载设备之间存在连接通道;若无线通信模块连接的设备的设备名称不包括car kit,表明无线通信模块与车载设备之间不存在连接通道。In the embodiment of the present application, judging whether the user is in a driving state specifically includes the processor judging whether there is a connection channel between the wireless communication module and the vehicle-mounted device or whether the motion trajectory of the electronic device is an arc-shaped structure. There is a connection channel between the devices or the movement trajectory of the electronic device is an arc-shaped structure, indicating that the user is in a driving state; if it is determined that there is no connection channel between the wireless communication module and the in-vehicle device and the movement trajectory of the electronic device is not an arc-shaped structure , indicating that the user is not driving. Wherein, the acceleration sensor in the electronic device can determine whether the motion trajectory of the electronic device is based on the variation law of the first acceleration around the x-axis, the second acceleration around the y-axis, and the third acceleration around the z-axis of the electronic device in three-dimensional space. For the arc-shaped structure, if it is determined that one of the first acceleration, the second acceleration and the third acceleration or any combination thereof is not zero within the first time period, it indicates that the motion trajectory of the electronic device is an arc-shaped structure. As an optional solution, by judging whether the device name of the device connected to the wireless communication module includes the device name of the in-vehicle device, it is judged whether there is a connection channel between the wireless communication module and the in-vehicle device. The device name includes the device name of the in-vehicle device, indicating that there is a connection channel between the wireless communication module and the in-vehicle device; if the device name of the device connected to the wireless communication module does not include the device name of the in-vehicle device, it indicates that there is no connection between the wireless communication module and the in-vehicle device. A connection channel exists. For example: the device name of the in-vehicle device is car kit, if the device name of the device connected to the wireless communication module includes car kit, it indicates that there is a connection channel between the wireless communication module and the in-vehicle device; if the device name of the device connected to the wireless communication module does not include car kit, indicating that there is no connection channel between the wireless communication module and the in-vehicle device.
为了进一步提高识别用户的驾驶状态的精确度,作为一种可选方案,判断用户是否处于驾驶状态具体包括处理器判断无线通信模块是否与车载设备之间存在连接通道且电子设备的运动轨迹是否为圆弧状结构,若判断出无线通信模块与车载设备之间存在连接通道且电子设备的运动轨迹为圆弧状结构,表明用户处于驾驶状态;若判断出无线通信模块与车载设备之间不存在连接通道或电子设备的运动轨迹不是圆弧状结构,表明用户处于非驾驶状态。In order to further improve the accuracy of identifying the user's driving state, as an optional solution, judging whether the user is in the driving state specifically includes the processor judging whether there is a connection channel between the wireless communication module and the in-vehicle device and whether the motion trajectory of the electronic device is Arc-shaped structure, if it is determined that there is a connection channel between the wireless communication module and the in-vehicle device and the movement trajectory of the electronic device is an arc-shaped structure, it indicates that the user is in a driving state; if it is determined that there is no connection between the wireless communication module and the in-vehicle device. The movement trajectory of the connection channel or electronic device is not an arc-like structure, indicating that the user is not driving.
本申请实施例中,处理器若判断出当前用户状态满足设置的提醒条件,表明可以对用户进行提醒,继续执行步骤130;若判断出当前用户状态不满足设置的提醒条件,表明不能对用户进行提醒,继续执行步骤106。In the embodiment of the present application, if the processor determines that the current user status satisfies the set reminder conditions, it indicates that the user can be reminded, and proceeds to step 130; if it determines that the current user status does not meet the set reminder conditions, it indicates that the user cannot be reminded. Reminder, continue to step 106.
值得说明的是,提醒条件还可以设置为其它内容,在此仅进行示例性说明,本申请实施例对提醒条件的具体内容不作限定。It should be noted that the reminder condition may also be set to other content, which is only illustratively described here, and the specific content of the reminder condition is not limited in this embodiment of the present application.
步骤130、对用户进行提醒,继续执行步骤106。 Step 130 , remind the user, and proceed to step 106 .
本申请实施例中,电子设备的工作模式包括提醒模式,电子设备通过设置的第一提醒方式对用户进行提醒,以提醒用户睡觉。例如:第一提醒方式包括显示呼吸灯和/或生成并显示提醒消息。具体地,若用户的睡眠状态包括出睡状态且睡前状态曲线中连续的第一指定数量的时间点对应的睡前状态评分逐渐升高,通过第一提醒方式对用户进行提醒;或者,若用户的睡眠状态包括出睡状态且睡前状态曲线中连续的第一指定数量的时间点对应的睡前状态评分均大于设置的评分阈值,通过第一提醒方式对用户进行提醒。In the embodiment of the present application, the working mode of the electronic device includes a reminder mode, and the electronic device reminds the user through the set first reminder mode to remind the user to sleep. For example, the first reminder method includes displaying a breathing light and/or generating and displaying a reminder message. Specifically, if the user's sleep state includes a sleep-out state and the pre-sleep state score corresponding to the first specified number of consecutive time points in the pre-sleep state curve gradually increases, the user is reminded by the first reminder; or, if The sleep state of the user includes the state of falling asleep, and the pre-sleep state scores corresponding to the first specified number of consecutive time points in the pre-sleep state curve are all greater than the set score threshold, and the user is reminded by the first reminder method.
可选地,电子设备的工作模式还包括勿扰模式,即:处理器仅根据睡前状态生成睡前状态曲线,不对用户进行提醒,以免打扰用户。Optionally, the working mode of the electronic device further includes a do not disturb mode, that is, the processor only generates a bedtime state curve according to the bedtime state, and does not remind the user to avoid disturbing the user.
可选地,可穿戴设备的工作模式包括促进模式,用户可以根据自身需要设置开启促进模式或关闭促进模式,促进模式默认关闭。当用户设置开启促进模式时,处理器若判断出用户处于驾驶状态且当前时间大于促进时间,通过设置的第二提醒方式对用户进行提醒;若判断出用户处于非驾驶状态且当前时间大于促进时间,通过设置的第三提醒方式对用户进行提醒。Optionally, the working mode of the wearable device includes a facilitation mode, the user can set the facilitation mode to be turned on or off according to his own needs, and the facilitation mode is turned off by default. When the user sets to turn on the promotion mode, if the processor determines that the user is in a driving state and the current time is greater than the promotion time, it will remind the user through the set second reminder mode; if it is determined that the user is in a non-driving state and the current time is greater than the promotion time , and remind the user through the set third reminder method.
本申请实施例中,电子设备接收用户输入的第二设置操作,第二设置操作包括设置工作模式的操作,电子设备响应于第二设置操作,设置工作模式。In this embodiment of the present application, the electronic device receives a second setting operation input by the user, the second setting operation includes an operation of setting the working mode, and the electronic device sets the working mode in response to the second setting operation.
本申请实施例中,第二设置操作对应于图7至图15所示的多个操作中的一个或任意组合。In this embodiment of the present application, the second setting operation corresponds to one or any combination of the multiple operations shown in FIG. 7 to FIG. 15 .
本申请实施例中,第二提醒方式和第三提醒方式均可以根据实际情况进行设置。例如:第二提醒方式包括播放第一类型音乐;第三提醒方式包括播放第二类型音乐。具体地,处理器若判断出用户处于驾驶状态,从存储器中获取预先存储的第一类型音乐并播放,第一类型音乐为提神音乐,避免用户在驾驶过程中睡意过高而出现危险;若判断出用户处于非驾驶状态,从存储器中获取预先存储的第二类型音乐并播放,第二类型音乐为白噪声音乐,增强用户睡意。In this embodiment of the present application, both the second reminder mode and the third reminder mode may be set according to actual conditions. For example, the second reminder mode includes playing the first type of music; the third reminder mode includes playing the second type of music. Specifically, if the processor determines that the user is in a driving state, it acquires the pre-stored first type of music from the memory and plays it. The first type of music is refreshing music, so as to prevent the user from being in danger due to excessive sleepiness during driving; When it is found that the user is in a non-driving state, the pre-stored second type of music is acquired from the memory and played, and the second type of music is white noise music to enhance the user's drowsiness.
值得说明的是,第一提醒方式、第二提醒方式和第三提醒方式还可以设置为其它形式,本申请实施例在此仅作示例性说明,对提醒方式的具体形式不做限制。It should be noted that the first reminder mode, the second reminder mode and the third reminder mode may also be set to other forms, and the embodiments of the present application are only illustratively described here, and the specific forms of the reminder modes are not limited.
进一步地,本申请实施例的电子设备支持多用户记录模式,即:不同的用户使用电子设备,可以为每个用户包保存各自对应的睡前状态评估模型。图24为本申请实施例提供的一种多用户记录模式的示意图。如图24所示,首先构造睡前状态评估模型,构建步骤参见步骤202至步骤210,在此不再赘述;用户1首次使用电子设备时,对睡前状态评估模型进行初始化,即:将出厂构建的睡前状态评估模型作为用户1的睡前状态评估模型;通过睡前状态评估模型,根据用户1的第一信号生成用户1的睡前状态曲线和睡眠质量评分;根据用户1的反馈结果修正睡前标签值,并通过在线学习算法在线更新睡前状态评估模型,该睡前状态评估模型是针对用户1的生理规律构建的,能够精准评估用户1的睡前状态。如图24所示,用户2和用户3与用户1使用电子设备的过程相同,在此不再赘述,用户2生成的睡前状态评估模型是针对用户2的生理规律构建的,能够精准评估用户2的睡前状态;用户3生成的睡前状态评估模型是针对用户3的生理规律构建的,能够精准评估用户3的睡前状态。Further, the electronic device in this embodiment of the present application supports a multi-user recording mode, that is, different users using the electronic device can save their corresponding bedtime state evaluation models for each user package. FIG. 24 is a schematic diagram of a multi-user recording mode provided by an embodiment of the present application. As shown in FIG. 24 , the bedtime state evaluation model is first constructed, and the construction steps refer to steps 202 to 210, which will not be repeated here; when user 1 uses the electronic device for the first time, the bedtime state evaluation model is initialized, that is, the factory The constructed pre-sleep state evaluation model is used as the pre-sleep state evaluation model of user 1; through the pre-sleep state evaluation model, the pre-sleep state curve and sleep quality score of user 1 are generated according to the first signal of user 1; according to the feedback results of user 1 Correct the label value before going to bed, and update the bedtime state evaluation model online through the online learning algorithm. The bedtime state evaluation model is constructed according to the physiological laws of user 1, and can accurately evaluate the bedtime state of user 1. As shown in FIG. 24 , the process of using the electronic device for User 2 and User 3 is the same as that of User 1, which will not be repeated here. The bedtime state evaluation model generated by User 2 is constructed according to the physiological law of User 2 and can accurately evaluate the user. 2's bedtime state; the bedtime state evaluation model generated by user 3 is constructed based on user 3's physiological laws, and can accurately assess user 3's bedtime state.
本申请实施例的方案中,按照设置的第一时间间隔获取用户的第一信号从第一信号中提取出第一特征参数;通过生成的睡前状态评估模型,根据第一特征参数,生成睡前状态评分,能够准确监测到用户的睡前状态,使得用户可以掌握睡眠前后的完整状态,从而进一步提高自身的睡眠质量。In the solution of the embodiment of the present application, the first signal of the user is obtained according to the set first time interval, and the first characteristic parameter is extracted from the first signal; the sleep state evaluation model is generated, and the sleep condition is generated according to the first characteristic parameter. The pre-state score can accurately monitor the user's pre-sleep state, so that the user can grasp the complete state before and after sleep, thereby further improving their sleep quality.
本申请实施例还提供一种电子设备,该电子设备可以是终端设备也可以是内置于所述终端设备的电路设备。该设备可以用于执行上述方法实施例中的功能/步骤。An embodiment of the present application further provides an electronic device, where the electronic device may be a terminal device or a circuit device built in the terminal device. The device may be used to perform the functions/steps in the above method embodiments.
本申请还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当该指令在计算机上运行时,使得计算机执行如上述图19和图20所示的睡前状态检测方法中的各个步骤。The present application also provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, when the instructions are executed on the computer, the computer is made to perform the bedtime state detection shown in the above-mentioned FIG. 19 and FIG. 20 . steps in the method.
本申请还提供了一种包含指令的计算机程序产品,当该计算机程序产品在计算机 或任一至少一种处理器上运行时,使得计算机执行如上述图19和图20所示的睡前状态检测方法中的各个步骤。The present application also provides a computer program product containing instructions, when the computer program product runs on a computer or any at least one processor, the computer causes the computer to perform the bedtime state detection shown in the above-mentioned FIGS. 19 and 20 . steps in the method.
以上各实施例中,涉及的处理器110可以例如包括中央处理器(central processing unit,CPU)、微处理器、微控制器或数字信号处理器,还可包括GPU、NPU和ISP,该处理器还可包括必要的硬件加速器或逻辑处理硬件电路,如特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制本申请技术方案程序执行的集成电路等。此外,处理器可以具有操作一个或多个软件程序的功能,软件程序可以存储在存储器中。In the above embodiments, the involved processor 110 may include, for example, a central processing unit (CPU), a microprocessor, a microcontroller or a digital signal processor, and may also include a GPU, an NPU, and an ISP. Necessary hardware accelerators or logic processing hardware circuits may also be included, such as application-specific integrated circuits (ASICs), or one or more integrated circuits used to control the execution of the programs of the technical solution of the present application. In addition, the processor may have the functionality to operate one or more software programs, which may be stored in the memory.
存储器可以是只读存储器(read-only memory,ROM)、可存储静态信息和指令的其它类型的静态存储设备、随机存取存储器(random access memory,RAM)或可存储信息和指令的其它类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其它磁存储设备,或者还可以是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其它介质等。The memory can be read-only memory (ROM), other types of static storage devices that can store static information and instructions, random access memory (RAM), or other types of storage devices that can store information and instructions The dynamic storage device can also be electrically erasable programmable read-only memory (electrically erasable programmable read-only memory, EEPROM), compact disc read-only memory (CD-ROM) or other optical disk storage, optical disk storage ( including compact discs, laser discs, compact discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices, or may also be capable of carrying or storing desired program code in the form of instructions or data structures and capable of Any other medium accessed by a computer, etc.
本申请实施例中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示单独存在A、同时存在A和B、单独存在B的情况。其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项”及其类似表达,是指的这些项中的任意组合,包括单项或复数项的任意组合。例如,a,b和c中的至少一项可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。In the embodiments of the present application, "at least one" refers to one or more, and "multiple" refers to two or more. "And/or", which describes the association relationship of the associated objects, means that there can be three kinds of relationships, for example, A and/or B, which can indicate the existence of A alone, the existence of A and B at the same time, and the existence of B alone. where A and B can be singular or plural. The character "/" generally indicates that the associated objects are an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, and c may represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c may be single or multiple.
本领域普通技术人员可以意识到,本文中公开的实施例中描述的各单元及算法步骤,能够以电子硬件、计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can realize that the units and algorithm steps described in the embodiments disclosed herein can be implemented by a combination of electronic hardware, computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described systems, devices and units may refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
在本申请所提供的几个实施例中,任一功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。In the several embodiments provided in this application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution, and the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program codes .
以上所述,仅为本申请的具体实施方式,任何熟悉本技术领域的技术人员在本申 请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present application. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. The protection scope of the present application shall be subject to the protection scope of the claims.

Claims (15)

  1. 一种睡前状态检测方法,应用于电子设备,所述电子设备包括显示屏,其特征在于,包括:A bedtime state detection method, applied to an electronic device, the electronic device comprising a display screen, characterized in that it includes:
    接收用户输入第一查询操作,所述第一查询操作包括查询睡前状态曲线的操作;receiving a first query operation input by the user, where the first query operation includes an operation of querying the state curve before going to bed;
    响应于所述第一查询操作,显示所述睡前状态曲线。In response to the first query operation, the bedtime state curve is displayed.
  2. 根据权利要求1所述的方法,其特征在于,还包括:The method of claim 1, further comprising:
    接收用户输入的第一设置操作,所述第一设置操作包括设置检测时间的操作;receiving a first setting operation input by a user, where the first setting operation includes an operation of setting a detection time;
    响应于所述第一设置操作,设置所述检测时间。The detection time is set in response to the first setting operation.
  3. 根据权利要求1所述的方法,其特征在于,还包括:The method of claim 1, further comprising:
    接收用户输入的第二设置操作,所述第二设置操作包括设置工作模式的操作;receiving a second setting operation input by a user, the second setting operation including an operation of setting a working mode;
    响应于所述第二设置操作,设置所述工作模式。In response to the second setting operation, the operating mode is set.
  4. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    按照第一时间间隔获取用户的第一信号;Obtain the first signal of the user according to the first time interval;
    从所述第一信号中提取出第一特征参数;extracting a first characteristic parameter from the first signal;
    根据睡前状态评估模型和所述第一特征参数,生成睡前状态评分;generating a bedtime state score according to the bedtime state assessment model and the first characteristic parameter;
    根据所述睡前状态评分,生成睡前状态曲线。According to the bedtime state score, a bedtime state curve is generated.
  5. 根据权利要求4所述的方法,其特征在于,所述第一信号包括加速度信号、心率信号和脑电信号中之一或其任意组合。The method according to claim 4, wherein the first signal comprises one of an acceleration signal, a heart rate signal and an electroencephalogram signal or any combination thereof.
  6. 根据权利要求4所述的方法,其特征在于,在所述按照第一时间间隔获取用户的第一信号之前,包括:The method according to claim 4, wherein before the acquiring the first signal of the user according to the first time interval, the method comprises:
    获取当前时间;get the current time;
    若所述当前时间小于设置的检测时间,在一段时间后重新获取当前时间;If the current time is less than the set detection time, re-acquire the current time after a period of time;
    若所述当前时间大于或等于设置的检测时间,则按照第一时间间隔获取用户的第一信号。If the current time is greater than or equal to the set detection time, the first signal of the user is acquired according to the first time interval.
  7. 根据权利要求6所述的方法,其特征在于,在从所述第一信号中提取出第一特征参数之后,还包括:The method according to claim 6, wherein after extracting the first characteristic parameter from the first signal, the method further comprises:
    根据所述第一特征参数,判断所述用户的第一睡眠状态;According to the first characteristic parameter, determine the first sleep state of the user;
    若判断结果为所述第一睡眠状态为疑似入睡状态或出睡状态,则根据睡前状态评估模型和所述第一特征参数,生成睡前状态评分,根据所述睡前状态评分,生成睡前状态曲线;If the judgment result is that the first sleep state is suspected of falling asleep or falling out of sleep, a sleep state score is generated according to the sleep state evaluation model and the first characteristic parameter, and a sleep state score is generated according to the sleep state score. pre-state curve;
    若判断结果为所述第一睡眠状态为入睡状态,则记录入睡时间,按照第二时间间隔获取所述用户的所述第一信号。If the determination result is that the first sleep state is the sleep state, the sleep time is recorded, and the first signal of the user is acquired according to a second time interval.
  8. 根据权利要求4所述的方法,其特征在于,所述方法还包括:The method according to claim 4, wherein the method further comprises:
    获取所述用户的第二睡眠状态;obtaining the second sleep state of the user;
    若所述第二睡眠状态为疑似入睡状态,则按照第一时间间隔获取用户的第一信号;If the second sleep state is a suspected sleep state, acquiring the first signal of the user according to the first time interval;
    若所述第二睡眠状态为出睡状态,则判断所述睡前状态曲线是否满足提醒条件;其中,所述提醒条件包括连续的第一指定数量的时间点对应的所述睡前状态评分逐渐升高;If the second sleep state is a sleep-out state, then determine whether the pre-sleep state curve satisfies a reminder condition; wherein the reminder condition includes that the pre-sleep state score corresponding to the first specified number of consecutive time points gradually increases. rise;
    若判断结果为所述睡前状态曲线满足提醒条件,以第一提醒方式提醒用户;其中, 所述第一提醒方式包括显示呼吸灯和/或提醒消息。If the judgment result is that the bedtime state curve meets the reminder condition, the user is reminded in a first reminder mode; wherein, the first reminder mode includes displaying a breathing light and/or a reminder message.
  9. 根据权利要求4所述的方法,其特征在于,所述方法还包括:The method according to claim 4, wherein the method further comprises:
    获取所述用户的第二睡眠状态;obtaining the second sleep state of the user;
    若所述第二睡眠状态为疑似入睡状态,则按照第一时间间隔获取用户的第一信号;If the second sleep state is a suspected sleep state, acquiring the first signal of the user according to the first time interval;
    若所述第二睡眠状态为出睡状态,则判断所述睡前状态曲线是否满足提醒条件;其中,所述提醒条件包括连续的第一指定数量的时间点对应的所述睡前状态评分均大于评分阈值;If the second sleep state is the state of falling asleep, then determine whether the pre-sleep state curve satisfies the reminder condition; wherein, the reminder condition includes that the pre-sleep state scores corresponding to the first specified number of consecutive time points are all equal to each other. greater than the scoring threshold;
    若判断结果为所述睡前状态曲线满足提醒条件,以第一提醒方式提醒用户;其中,所述第一提醒方式包括显示呼吸灯和/或提醒消息。If the judgment result is that the bedtime state curve meets the reminder condition, the user is reminded in a first reminder mode; wherein, the first reminder mode includes displaying a breathing light and/or a reminder message.
  10. 根据权利要求4所述的方法,其特征在于,所述方法还包括:The method according to claim 4, wherein the method further comprises:
    根据所述第一信号,判断所述用户是否处于驾驶状态;According to the first signal, determine whether the user is in a driving state;
    若判断结果为所述用户处于驾驶状态,则以第二提醒方式提醒用户;其中,所述第二提醒方式包括播放第一类型音乐;If the judgment result is that the user is in a driving state, the user is reminded in a second reminder mode; wherein, the second reminder mode includes playing the first type of music;
    若判断结果为所述用户处于非驾驶状态,则以第三提醒方式提醒用户;其中,所述第三提醒方式包括播放第二类型音乐。If the judgment result is that the user is in a non-driving state, the user is reminded in a third reminder mode; wherein the third reminder mode includes playing the second type of music.
  11. 根据权利要求1所述的方法,其特征在于,还包括:The method of claim 1, further comprising:
    接收用户输入的第二查询操作,所述第二查询操作包括查询睡眠质量评分的操作;receiving a second query operation input by the user, where the second query operation includes an operation of querying the sleep quality score;
    响应于所述第二查询操作,显示所述睡眠质量评分。The sleep quality score is displayed in response to the second query operation.
  12. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    记录入睡时间;record sleep time;
    按照第二时间间隔获取用户的第一信号;Obtain the first signal of the user according to the second time interval;
    根据所述第一信号,生成所述用户的第三睡眠状态;generating a third sleep state of the user according to the first signal;
    若所述第三睡眠状态为出睡状态,则生成睡眠质量评分。If the third sleep state is a sleep-out state, a sleep quality score is generated.
  13. 一种电子设备,其特征在于,包括:An electronic device, comprising:
    显示屏;一个或多个处理器;存储器;以及一个或多个计算机程序,其中所述一个或多个计算机程序被存储在所述存储器中,所述一个或多个计算机程序包括指令,当所述指令被所述设备执行时,使得所述设备执行如权利要求1至12中任一项所述的睡前状态检测方法。a display screen; one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more computer programs comprising instructions for When the instruction is executed by the device, the device is caused to execute the bedtime state detection method according to any one of claims 1 to 12.
  14. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质包括存储的程序,其中,在所述程序运行时控制所述计算机可读存储介质所在设备执行权利要求1至12中任意一项所述的睡前状态检测方法。A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored program, wherein when the program runs, a device where the computer-readable storage medium is located is controlled to execute any one of claims 1 to 12 A described method for detecting a bedtime state.
  15. 一种包含指令的计算机程序产品,其特征在于,当所述计算机程序产品在计算机或任一至少一种处理器上运行时,使得所述计算机执行如权利要求1至12中任一项所述的睡前状态检测方法。A computer program product comprising instructions, characterized in that, when the computer program product is run on a computer or any one of at least one processor, the computer is made to perform the execution of any one of claims 1 to 12. sleep state detection method.
PCT/CN2021/141615 2021-01-28 2021-12-27 Pre-sleep state detection method and device WO2022161067A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110115638.XA CN114795159A (en) 2021-01-28 2021-01-28 Method and equipment for detecting state before sleep
CN202110115638.X 2021-01-28

Publications (1)

Publication Number Publication Date
WO2022161067A1 true WO2022161067A1 (en) 2022-08-04

Family

ID=82524176

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/141615 WO2022161067A1 (en) 2021-01-28 2021-12-27 Pre-sleep state detection method and device

Country Status (2)

Country Link
CN (1) CN114795159A (en)
WO (1) WO2022161067A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115171850B (en) * 2022-09-07 2022-12-09 深圳市心流科技有限公司 Sleep scheme generation method and device, terminal equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102620382A (en) * 2012-03-23 2012-08-01 广东美的制冷设备有限公司 Sound sleep curve inquiring and setting device of air conditioner and control method of device
CN105433904A (en) * 2015-11-24 2016-03-30 小米科技有限责任公司 Sleep state detection method, device and system
CN108310587A (en) * 2018-02-02 2018-07-24 贺鹏程 A kind of sleep control device and method
CN108810300A (en) * 2018-04-28 2018-11-13 平安科技(深圳)有限公司 The method and its control method and device of adjustment intelligent terminal the tinkle of bells
WO2019003446A1 (en) * 2017-06-30 2019-01-03 ユニファ株式会社 Sleep checking system, sleep checking program, and sleep checking method
JP2019010522A (en) * 2018-08-21 2019-01-24 ユニファ株式会社 Sleep check system, sleep check program, and sleep check method
CN110825449A (en) * 2019-09-19 2020-02-21 咪咕音乐有限公司 Music playing method, electronic equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102620382A (en) * 2012-03-23 2012-08-01 广东美的制冷设备有限公司 Sound sleep curve inquiring and setting device of air conditioner and control method of device
CN105433904A (en) * 2015-11-24 2016-03-30 小米科技有限责任公司 Sleep state detection method, device and system
WO2019003446A1 (en) * 2017-06-30 2019-01-03 ユニファ株式会社 Sleep checking system, sleep checking program, and sleep checking method
CN108310587A (en) * 2018-02-02 2018-07-24 贺鹏程 A kind of sleep control device and method
CN108810300A (en) * 2018-04-28 2018-11-13 平安科技(深圳)有限公司 The method and its control method and device of adjustment intelligent terminal the tinkle of bells
JP2019010522A (en) * 2018-08-21 2019-01-24 ユニファ株式会社 Sleep check system, sleep check program, and sleep check method
CN110825449A (en) * 2019-09-19 2020-02-21 咪咕音乐有限公司 Music playing method, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN114795159A (en) 2022-07-29

Similar Documents

Publication Publication Date Title
US11571153B2 (en) Information processing system, information processing device, storage medium storing information processing program, and information processing method
EP3274035B1 (en) Wearable device for sleep assistance
US8768648B2 (en) Selection of display power mode based on sensor data
US8751194B2 (en) Power consumption management of display in portable device based on prediction of user input
KR102405405B1 (en) How to allow users to receive information related to their goals
US9848796B2 (en) Method and apparatus for controlling media play device
KR20160057837A (en) User interface displaying method and apparatus
CN113545745B (en) Usage monitoring method and medium for wearable electronic device and electronic device thereof
CN109528183A (en) Human body abnormality monitoring method, equipment and computer readable storage medium
WO2019031257A1 (en) Information processing device, method, and program
US20220031233A1 (en) Electronic device for evaluating sleep quality and method for operation in the electronic device
CN109222927A (en) A kind of processing method based on health status, intelligent wearable device and storage medium
JP7401634B2 (en) Server device, program and method
JPWO2018116703A1 (en) Display control apparatus, display control method, and computer program
WO2022161067A1 (en) Pre-sleep state detection method and device
JP7288064B2 (en) visual virtual agent
JP2016059765A (en) Sound information processing device and system
WO2019104779A1 (en) Pressure measurement method and terminal
CN109464152A (en) Detection method, equipment and the computer readable storage medium of brain fatigue state
KR101912860B1 (en) Smart jewelry system for depression cognitive and care
US20200237295A1 (en) Method for calculating recovery index based on rem sleep stage and electronic device thereof
JP6726256B2 (en) Program, game server, information processing terminal, method and game system
WO2024066962A1 (en) Respiratory health detection method and wearable electronic device
EP4335477A1 (en) Electronic device providing user interface in accordance with sleeping state, and operation method thereof
WO2023197957A1 (en) Age-determination method and wearable device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21922656

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21922656

Country of ref document: EP

Kind code of ref document: A1