CN116269258B - Pillow type sleep detection method and device and computer equipment - Google Patents

Pillow type sleep detection method and device and computer equipment Download PDF

Info

Publication number
CN116269258B
CN116269258B CN202310148454.2A CN202310148454A CN116269258B CN 116269258 B CN116269258 B CN 116269258B CN 202310148454 A CN202310148454 A CN 202310148454A CN 116269258 B CN116269258 B CN 116269258B
Authority
CN
China
Prior art keywords
data
time
sleep
user
sleep state
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310148454.2A
Other languages
Chinese (zh)
Other versions
CN116269258A (en
Inventor
李翀
陆轲
岳雨珊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
First People's Hospital Of Kunshan
Original Assignee
First People's Hospital Of Kunshan
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 First People's Hospital Of Kunshan filed Critical First People's Hospital Of Kunshan
Priority to CN202310148454.2A priority Critical patent/CN116269258B/en
Publication of CN116269258A publication Critical patent/CN116269258A/en
Application granted granted Critical
Publication of CN116269258B publication Critical patent/CN116269258B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/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/08Detecting, measuring or recording devices for evaluating the respiratory organs
    • 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/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/4818Sleep apnoea
    • 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/6887Arrangements of detecting, measuring or recording means, e.g. sensors, in relation to patient mounted on external non-worn devices, e.g. non-medical devices
    • A61B5/6892Mats
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7235Details of waveform analysis
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61FFILTERS IMPLANTABLE INTO BLOOD VESSELS; PROSTHESES; DEVICES PROVIDING PATENCY TO, OR PREVENTING COLLAPSING OF, TUBULAR STRUCTURES OF THE BODY, e.g. STENTS; ORTHOPAEDIC, NURSING OR CONTRACEPTIVE DEVICES; FOMENTATION; TREATMENT OR PROTECTION OF EYES OR EARS; BANDAGES, DRESSINGS OR ABSORBENT PADS; FIRST-AID KITS
    • A61F5/00Orthopaedic methods or devices for non-surgical treatment of bones or joints; Nursing devices; Anti-rape devices
    • A61F5/56Devices for preventing snoring
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9537Spatial or temporal dependent retrieval, e.g. spatiotemporal queries

Landscapes

  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Engineering & Computer Science (AREA)
  • Public Health (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Veterinary Medicine (AREA)
  • Animal Behavior & Ethology (AREA)
  • Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Pathology (AREA)
  • Biophysics (AREA)
  • Molecular Biology (AREA)
  • Surgery (AREA)
  • Medical Informatics (AREA)
  • Physiology (AREA)
  • Cardiology (AREA)
  • Databases & Information Systems (AREA)
  • Pulmonology (AREA)
  • Theoretical Computer Science (AREA)
  • Orthopedic Medicine & Surgery (AREA)
  • Signal Processing (AREA)
  • Otolaryngology (AREA)
  • Nursing (AREA)
  • Artificial Intelligence (AREA)
  • Vascular Medicine (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Psychiatry (AREA)
  • Measurement Of The Respiration, Hearing Ability, Form, And Blood Characteristics Of Living Organisms (AREA)

Abstract

The application provides a pillow type sleep detection method, a pillow type sleep detection device and computer equipment, relates to the field of sleep detection, and is used for detecting the accuracy of sleep. The method mainly comprises the following steps: collecting head movement amplitude data, heartbeat data and breathing data of a user through an intelligent headrest; performing sliding processing on the head movement amplitude data, the heartbeat data and the breathing data according to the time window length L and the time interval D to obtain peak value data in each time window; merging time windows with absolute values of differences of peak data in adjacent time windows smaller than preset values into time slices, and acquiring historical sleep states and time marking data of time slices corresponding to the time slices from a sleep database of a user; and determining the sleep state of the user through the head movement amplitude data, the heartbeat data, the breathing data, the historical sleep state and the time mark data corresponding to the time slices.

Description

Pillow type sleep detection method and device and computer equipment
Technical Field
The present application relates to the field of sleep detection technologies, and in particular, to a pillow-type sleep detection method, apparatus, and computer device.
Background
Sleep is an important physiological activity and has a very critical role in the physical and mental self-recovery of the human body. In recent years, with the acceleration of social rhythm, the working and living pressures of people are increased increasingly, and the sleep quality is reduced to be a problem facing a plurality of people, so that the physical and mental health is seriously affected.
At present, the basic functions of sleep-wake time statistics, shallow sleep-deep sleep time statistics and the like are mainly realized through detection of wrist movement information. However, the sleep state of the user is detected mainly at unit intervals, and it is difficult to obtain higher detection accuracy to detect the sleep state of the user at unit time.
Disclosure of Invention
The embodiment of the application provides a pillow type sleep detection method, a pillow type sleep detection device and computer equipment, which are used for improving the accuracy of sleep detection.
The embodiment of the application provides a pillow type sleep detection method, which comprises the following steps:
collecting head movement amplitude data, heartbeat data and breathing data of a user through an intelligent headrest;
performing sliding processing on the head movement amplitude data, the heartbeat data and the breathing data according to the time window length L and the time interval D to obtain peak value data in each time window;
merging time windows with absolute values of differences of peak values in adjacent time windows smaller than preset values into time slices, wherein the time length of each time slice is greater than or equal to 2L-D;
acquiring historical sleep state and time mark data of a time slice corresponding to a time period from a sleep database of the user; the sleep database of the user stores historical sleep states and time marking data corresponding to different time periods of the user;
and determining the sleep state of the user through the head movement amplitude data, the heartbeat data, the breathing data, the historical sleep state and the time mark data corresponding to the time slice.
The embodiment of the application provides a pillow type sleep detection device, which comprises:
the acquisition module is used for acquiring head movement amplitude data, heartbeat data and breathing data of the user through the intelligent headrest;
the acquisition module is used for carrying out sliding processing on the head movement amplitude data, the heartbeat data and the breathing data according to the time window length L and the time interval D to acquire peak value data in each time window;
the merging module is used for merging time windows with the absolute value of the difference value of the peak value data in the adjacent time windows smaller than a preset value into time slices, and the time length of the time slices is more than or equal to 2L-D;
the acquisition module is further used for acquiring historical sleep states and time mark data of the time slices corresponding to the time periods from a sleep database of the user; the sleep database of the user stores historical sleep states and time marking data corresponding to different time periods of the user;
and the determining module is used for determining the sleep state of the user through the head movement amplitude data, the heartbeat data, the breathing data, the historical sleep state and the time mark data corresponding to the time slice.
A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the above-described pillow sleep detection method when executing the computer program.
A computer readable storage medium storing a computer program which when executed by a processor implements the above-described pillow sleep detection method.
A computer program product comprising a computer program which when executed by a processor implements the pillow sleep detection method described above.
The application provides a pillow type sleep detection method, a pillow type sleep detection device and computer equipment, wherein head movement amplitude data, heartbeat data and breathing data of a user are collected through an intelligent pillow; performing sliding processing on the head movement amplitude data, the heartbeat data and the breathing data according to the time window length L and the time interval D to obtain peak value data in each time window; merging time windows with absolute values of differences of peak data in adjacent time windows smaller than preset values into time slices, and acquiring historical sleep states and time marking data of time slices corresponding to the time slices from a sleep database of a user; and determining the sleep state of the user through the head movement amplitude data, the heartbeat data, the breathing data, the historical sleep state and the time mark data corresponding to the time slices. Compared with the prior art that the sleep state of the user is determined at unit time intervals, the sleep detection method and device based on the head movement amplitude data, the heartbeat data and the breathing data divide the acquired data into time slices, and then the sleep state of the user is determined in the form of the time slices, so that the detection precision of sleep detection, namely the detection accuracy, can be improved.
Drawings
FIG. 1 is a flow chart of a pillow type sleep detection method provided by the application;
fig. 2 is a schematic structural diagram of a pillow-type sleep detection device provided by the application;
fig. 3 is a schematic diagram of a computer device provided by the present application.
Detailed Description
In order to better understand the above technical solutions, the following detailed description of the technical solutions of the embodiments of the present application is made by using the accompanying drawings and the specific embodiments, and it should be understood that the specific features of the embodiments of the present application are detailed descriptions of the technical solutions of the embodiments of the present application, and not limit the technical solutions of the present application, and the technical features of the embodiments of the present application may be combined with each other without conflict.
Referring to fig. 1, a pillow-type sleep detection method according to an embodiment of the present application is shown in the following description, and is used for executing steps S101 to S105:
step S101, head movement amplitude data, heartbeat data and breathing data of a user are acquired through the intelligent headrest.
Specifically, in this embodiment, the gyroscope is used to collect the head motion parameters of the head of the human body on the intelligent headrest, and then the head motion amplitude data is obtained based on the head motion parameters. The head motion parameters are filtered, and the filtered head motion parameters are obtained; and performing amplitude modulo processing on the filtered head motion parameters to obtain head motion amplitude data. The amplitude modulo processing process for the filtered head motion parameter comprises the following steps: establishing a coordinate system by taking the value of the filtered head motion parameter as an ordinate and taking the acquisition time point corresponding to each head motion parameter as an abscissa, and determining a data set formed by all peak data and the acquisition time point corresponding to each peak data in the coordinate system as head motion amplitude data, wherein each head motion amplitude data comprises: amplitude and corresponding acquisition time point. The peak value corresponding to each head motion amplitude data is the amplitude of the head motion amplitude parameter.
Step S102, sliding the head movement amplitude data, the heartbeat data and the breathing data according to the time window length L and the time interval D to obtain peak value data in each time window.
The time window length L may be 3 minutes, 5 minutes, 10 minutes, etc., and the time interval D may be 2 minutes, 4 minutes, 6 minutes, etc., which is not particularly limited in this embodiment.
For example, the time interval is 2 minutes, the time window length is 6 minutes, the head movement amplitude data, the heartbeat data and the breathing data of the user are acquired through the intelligent headrest at the zero point moment, the time range of the first time window is 00:00:00-00:06:00, the time range of the second time window is 00:02:00-00:08:00, the time range of the third time window is 00:04:00-00:10:00: 00 … …, then the peak value data in each time window, namely the data with the largest value in the time window, namely the maximum data corresponding to the head movement amplitude data, the heartbeat data and/or the breathing data in the time window are acquired.
In an optional embodiment of the present application, the sliding processing is performed on the head motion amplitude data, the heartbeat data, and the respiration data at a time window length L and a time interval D, to obtain peak data in each time window, including:
in step S1021, the head motion amplitude data, the heartbeat data, and the respiration data belonging to the same time point are weighted to obtain time point data.
Step S1022, performing sliding processing on the time point data with a time window length L and a time interval D, and acquiring peak data in each time window.
Specifically, in this embodiment, the head motion amplitude data, the heartbeat data, and the respiration data may be normalized and filtered, and then the normalized and filtered head motion amplitude data, heartbeat data, and respiration data may be weighted to obtain the time point data. The weight values corresponding to the head movement amplitude data, the heartbeat data and the breathing data respectively can be set according to actual requirements, and the three weight values are added to be 1.
Step S103, merging the time windows with the absolute value of the difference value of the peak value data in the adjacent time windows smaller than the preset value into a time slice.
The time length of the time slice is a preset length, the preset length is greater than or equal to 2L-D, the specific time length of the time slice can be 3L, and the preset value can be set according to actual requirements. It should be noted that, in the process of merging time slices of adjacent time windows, if it is determined that the length of time for merging is smaller than the preset length, the time slices are filtered. For example, the preset length is 3L, and the combined time slice length is less than 3L, and the time slice is filtered.
For example, the peak data in the first time window is a, the peak data in the second time window is B, the peak data in the third time window is C, the peak data in the fourth time window is D, if the absolute value of the difference between a and B is smaller than the preset value, the absolute value of the difference between B and C is also smaller than the preset value, and the absolute value of the difference between C and D is larger than the preset value, the first time window, the second time window and the third time window are combined into a time slice. Assuming that the time range of the first time window is 00:00:00-00:06:00, the time range of the second time window is 00:02:00-00:08:00, and the time range of the third time window is 00:04:00-00:10:00, the time ranges of the combined time slices are 00:00:00:00-00:10:00.
Step S104, acquiring historical sleep state and time mark data of the time slice corresponding to the time period from a sleep database of the user.
The sleep database of the user stores historical sleep states and time mark data corresponding to different time periods of the user respectively, the historical sleep states are used for representing historical predicted or real sleep states of the user, the sleep states can be divided into a plurality of types, and if the sleep states can be: deep sleep, moderate sleep, light sleep, etc. The time stamp data may be time stamp data such as an alarm clock, a time task reminder, etc. set by the user, which is not specifically limited in this embodiment.
In the embodiment of the application, the sleep database stores the historical sleep states and time mark data corresponding to the users in different time periods respectively, and the definition of the time period can be a self-defined time period, a time slice determined based on the embodiment of the application can be used as the time period, and the sleep state determined based on the sleep state of the users can be also used.
For example, if a time slice of the user ranges from 00:04:00 to 00:30:00, the time slice corresponds to a time period of 00:00:00 to 00:60:00, i.e. the historical sleep state and time stamp data corresponding to all time periods of 00:00:00 to 00:60:00 in the historical time are obtained.
It should be noted that, if the time slice spans multiple time periods, historical sleep states and time stamp data corresponding to the multiple time periods are obtained. For example, if a time slice of the user has a time range of 00:40:00-01:10:00, the time slice corresponds to a time period of 00:00:00-01:00:00, and the time period of 01:00:00-02:00:00, historical sleep states and time stamp data corresponding to the two time points are obtained.
Step S105, determining the sleep state of the user according to the head motion amplitude data, the heartbeat data, the respiration data, the historical sleep state and the time stamp data corresponding to the time slice.
In an optional embodiment provided by the application, a voice recognition module is further arranged in the intelligent headrest, and the voice recognition module is used for acquiring voice of a user and recognizing whether the user snores currently according to the acquired voice, and if the user snores, the height of the intelligent headrest is changed through a lifting module arranged in the intelligent headrest so as to improve the snoring of the user.
The embodiment of the application provides a pillow type sleep detection method, which comprises the steps of collecting head movement amplitude data, heartbeat data and breathing data of a user through an intelligent headrest; performing sliding processing on the head movement amplitude data, the heartbeat data and the breathing data according to the time window length L and the time interval D to obtain peak value data in each time window; merging time windows with absolute values of differences of peak data in adjacent time windows smaller than preset values into time slices, and acquiring historical sleep states and time marking data of time slices corresponding to the time slices from a sleep database of a user; and determining the sleep state of the user through the head movement amplitude data, the heartbeat data, the breathing data, the historical sleep state and the time mark data corresponding to the time slices. Compared with the prior art that the sleep state of the user is determined at unit time intervals, the sleep detection method and device based on the head movement amplitude data, the heartbeat data and the breathing data divide the acquired data into time slices, and then the sleep state of the user is determined in the form of the time slices, so that the detection precision of sleep detection, namely the detection accuracy, can be improved.
In an optional embodiment of the present application, the determining the sleep state of the user according to the head motion amplitude data, the heartbeat data, the respiration data, the historical sleep state and the time stamp data corresponding to the time slice includes:
in step S1051, the head movement amplitude data, the heartbeat data, and the respiration data corresponding to the time slices are converted into feature data.
Specifically, in this embodiment, the head motion amplitude data, the heartbeat data and the respiration data corresponding to each time point in the time slice may be converted into feature matrices, and then the feature matrices are used as feature data, and the feature data is used as a basis for identifying the sleep state corresponding to the time slice.
Step S1052, inputting the feature data into the sleep detection model to obtain the predicted sleep state and probability value corresponding to the time slice.
In this embodiment, the sleep detection model is trained according to sleep sample data and a corresponding sleep state label. Specifically, the training process of the sleep detection model in this embodiment is as follows: dividing the sleep sample data into a plurality of time slices; converting head motion amplitude data, heartbeat data and respiration data corresponding to each divided time slice into characteristic data; and performing model training according to the feature data corresponding to each divided time slice and the sleep state label to obtain the sleep detection model.
The model training is performed according to the feature data and the sleep state label corresponding to each divided time slice to obtain the sleep detection model, which comprises the following steps: inputting the feature data corresponding to the divided time slices into the sleep detection model to obtain a predicted value; calculating a loss value according to the predicted value and the measured value corresponding to each divided time slice; and if the loss value is smaller than a preset value, stopping training of the sleep detection model.
In an alternative embodiment provided by the present application, the predicted and measured loss values may be calculated based on the following formula:
where P is the number of divided time slices, X i For the measured value corresponding to the i-th time slice,the predicted value corresponding to the ith time slice.
Step S1053, determining the sleep state of the user based on the predicted sleep state and the probability value corresponding to the time slice and the historical sleep state and the time stamp data corresponding to the time slice obtained by the sleep detection model.
In an optional embodiment of the present application, the determining the sleep state of the user based on the predicted sleep state and the probability value corresponding to the time slice obtained by the sleep detection model, and the historical sleep state and the time stamp data corresponding to the time slice includes:
determining the sleep state of the user by the following formula:
wherein Z is the sleep state of the user, A P To predict sleep state with highest probability by sleep detection model, Q P In order to obtain the probability value of the predicted sleep state with the highest probability through the sleep detection model, n is the number of the sleep states, B n C is the historical sleep state value corresponding to the nth sleep state n Is the nthAnd the time mark data values corresponding to the sleep state are weight values, and alpha and beta are preset probability values. The weight value and the preset probability value can be set according to actual requirements. The number of sleep states in this embodiment may be multiple, and if the sleep states include deep sleep, medium sleep, and light sleep, the number of sleep states n is 3. The historical sleep state value is a value corresponding to the historical sleep state, which can be represented by 0 or 1; the time stamp data value is a value corresponding to the time stamp data, which can be represented by 0 or 1 as well. For example, if the sleep state represented by n is 1 is deep sleep, the sleep state represented by n is 2 is medium sleep, the sleep state represented by n is 3 is light sleep, and the history sleep state of the time slot corresponding to the time slot obtained from the sleep database of the user is medium sleep, B 1 =0,B 2 =1,B 3 =0, i.e. by B 2 =1 indicates that the history sleep state is moderate sleep. Similarly, C n May also be represented by 0 or 1, e.g. C 1 Representing that the sleep state is a value corresponding to deep sleep, if the time mark data of the time period corresponding to the time slice is an alarm state, indicating that the user is in light sleep at the moment, namely C 1 =0,C 2 =0,C 3 =1。
In another optional embodiment of the present application, the determining the sleep state of the user based on the predicted sleep state and the probability value corresponding to the time slice obtained by the sleep detection model, and the historical sleep state and the time stamp data corresponding to the time slice includes:
determining the sleep state of the user by the following formula:
Z=max(A i );
wherein Z is the sleep state of the user, Q i B is the probability value of the ith predicted sleep state obtained by the sleep detection model ij I-th sleep state of the j-th day's historical sleep statesState value, C ij I=1, 2, … n, n is the number of sleep states, m is the number of days in the history sleep state, and a, b, c are weight values. The state value may be represented by 0 or 1, and the sleep state includes deep sleep A 1 Moderate sleep A 2 Shallow sleep A 3 Such as B 12 =1 indicates that the sleep state of the corresponding period of the first day of history is moderate sleep, if B 12 =0 indicates that the sleep state of the corresponding period of the first day is non-moderate sleep, and the specific sleep state needs to be combined with B 11 And B 13 To determine if B 11 =0,B 13 =1, then the sleep state for the corresponding period of the first day of history is light sleep.
For example, if the sleep state includes deep sleep A 1 Moderate sleep A 2 Shallow sleep A 3 If it passes the formula After numerical results of deep sleep, medium sleep, and light sleep were calculated, respectively, the numerical results were calculated by the formula z=max (a i )=max(A 1 ,A 2 ,A 3 ) Determination of A 2 And (3) the numerical result of the (c) is maximum, the sleep state of the user can be determined to be moderate sleep.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present application.
In one embodiment, a pillow-type sleep detection apparatus is provided, which corresponds to the pillow-type sleep detection method in the above embodiment one by one. As shown in fig. 2, the functional modules of the device are described in detail as follows:
the acquisition module 21 is used for acquiring head movement amplitude data, heartbeat data and breathing data of the user through the intelligent headrest;
an acquisition module 22, configured to perform sliding processing on the head motion amplitude data, the heartbeat data, and the respiration data at a time window length L and a time interval D, and acquire peak data in each time window;
a merging module 23, configured to merge time windows in which the absolute value of the difference value of the peak data in adjacent time windows is smaller than a preset value into time slices, where the time length of the time slices is greater than or equal to 2L-D;
the acquiring module 22 is further configured to acquire historical sleep states and time stamp data of a time slice corresponding to a time period from a sleep database of the user; the sleep database of the user stores historical sleep states and time marking data corresponding to different time periods of the user;
a determining module 24, configured to determine a sleep state of the user according to the head motion amplitude data, the heartbeat data, the respiration data, the historical sleep state, and the time stamp data corresponding to the time slice.
In an alternative embodiment provided by the present application, the obtaining module 22 is specifically configured to:
performing weighted calculation on head movement amplitude data, heartbeat data and breathing data belonging to the same time point to obtain time point data;
and performing sliding processing on the time point data according to the time window length L and the time interval D, and acquiring peak value data in each time window.
In an alternative embodiment provided by the present application, the determining module 24 is specifically configured to:
converting the head movement amplitude data, the heartbeat data and the breathing data corresponding to the time slices into characteristic data;
inputting the characteristic data into a sleep detection model to obtain a predicted sleep state and a probability value corresponding to the time slice; the sleep detection model is obtained by training according to sleep sample data and corresponding sleep state labels;
and determining the sleep state of the user based on the predicted sleep state and the probability value corresponding to the time slice and the historical sleep state and the time mark data corresponding to the time slice obtained through the sleep detection model.
In an alternative embodiment provided by the present application, the determining module 24 is further configured to:
determining the sleep state of the user by the following formula:
wherein Z is the sleep state of the user, A P To predict sleep state with highest probability by sleep detection model, Q P In order to obtain the probability value of the predicted sleep state with the highest probability through the sleep detection model, n is the number of the sleep states, B n C is the historical sleep state value corresponding to the nth sleep state n And (3) the time stamp data value corresponding to the nth sleep state, wherein a, b and c are weight values, and alpha and beta are preset probability values.
In an alternative embodiment provided by the present application, the determining module 24 is further configured to:
determining the sleep state of the user by the following formula:
Z=max(A i );
wherein Z is the sleep state of the user, Q i B is the probability value of the ith predicted sleep state obtained by the sleep detection model ij State value of the ith sleep state in the j-th historical sleep state, C ij I=1, 2, … n, n is the number of sleep states, m is the number of days in the history sleep state, and a, b, c are weight values.
In an alternative embodiment provided by the present application, the obtaining module 22 is further configured to:
dividing the sleep sample data into a plurality of time slices;
converting head motion amplitude data, heartbeat data and respiration data corresponding to each divided time slice into characteristic data;
and performing model training according to the feature data corresponding to each divided time slice and the sleep state label to obtain the sleep detection model.
In an alternative embodiment provided by the present application, the obtaining module 22 is specifically configured to:
inputting the feature data corresponding to the divided time slices into the sleep detection model to obtain a predicted value;
calculating a loss value according to the predicted value and the measured value corresponding to each divided time slice;
and if the loss value is smaller than a preset value, stopping training of the sleep detection model.
For specific limitations of the device, reference may be made to the above limitations of the pillow-type sleep detection method, and no further description is given here. The various modules in the apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 3. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program when executed by a processor implements a pillow sleep detection method.
In one embodiment, a computer device is provided comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of when executing the computer program:
collecting head movement amplitude data, heartbeat data and breathing data of a user through an intelligent headrest;
performing sliding processing on the head movement amplitude data, the heartbeat data and the breathing data according to the time window length L and the time interval D to obtain peak value data in each time window;
merging time windows with absolute values of differences of peak values in adjacent time windows smaller than preset values into time slices, wherein the time length of each time slice is greater than or equal to 2L-D;
acquiring historical sleep state and time mark data of a time slice corresponding to a time period from a sleep database of the user; the sleep database of the user stores historical sleep states and time marking data corresponding to different time periods of the user;
and determining the sleep state of the user through the head movement amplitude data, the heartbeat data, the breathing data, the historical sleep state and the time mark data corresponding to the time slice.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
collecting head movement amplitude data, heartbeat data and breathing data of a user through an intelligent headrest;
performing sliding processing on the head movement amplitude data, the heartbeat data and the breathing data according to the time window length L and the time interval D to obtain peak value data in each time window;
merging time windows with absolute values of differences of peak values in adjacent time windows smaller than preset values into time slices, wherein the time length of each time slice is greater than or equal to 2L-D;
acquiring historical sleep state and time mark data of a time slice corresponding to a time period from a sleep database of the user; the sleep database of the user stores historical sleep states and time marking data corresponding to different time periods of the user;
and determining the sleep state of the user through the head movement amplitude data, the heartbeat data, the breathing data, the historical sleep state and the time mark data corresponding to the time slice.
In one embodiment, a computer program product is provided, the computer program product comprising a computer program to be executed by a processor to perform the steps of:
collecting head movement amplitude data, heartbeat data and breathing data of a user through an intelligent headrest;
performing sliding processing on the head movement amplitude data, the heartbeat data and the breathing data according to the time window length L and the time interval D to obtain peak value data in each time window;
merging time windows with absolute values of differences of peak values in adjacent time windows smaller than preset values into time slices, wherein the time length of each time slice is greater than or equal to 2L-D;
acquiring historical sleep state and time mark data of a time slice corresponding to a time period from a sleep database of the user; the sleep database of the user stores historical sleep states and time marking data corresponding to different time periods of the user;
and determining the sleep state of the user through the head movement amplitude data, the heartbeat data, the breathing data, the historical sleep state and the time mark data corresponding to the time slice.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (6)

1. A pillow type sleep detection method, characterized in that the pillow type sleep detection method comprises:
collecting head movement amplitude data, heartbeat data and breathing data of a user through an intelligent headrest;
performing sliding processing on the head movement amplitude data, the heartbeat data and the breathing data according to the time window length L and the time interval D to obtain peak value data in each time window;
merging time windows with absolute values of differences of peak values in adjacent time windows smaller than preset values into time slices, wherein the time length of each time slice is greater than or equal to 2L-D;
acquiring historical sleep state and time mark data of a time slice corresponding to a time period from a sleep database of the user; the sleep database of the user stores historical sleep states and time marking data corresponding to different time periods of the user;
determining the sleep state of the user through the head movement amplitude data, the heartbeat data, the breathing data, the historical sleep state and the time mark data corresponding to the time slice;
performing weighted calculation on head movement amplitude data, heartbeat data and breathing data belonging to the same time point to obtain time point data;
performing sliding processing on the time point data according to the time window length L and the time interval D to obtain peak value data in each time window;
the determining the sleep state of the user according to the head movement amplitude data, the heartbeat data, the breathing data, the historical sleep state and the time mark data corresponding to the time slice comprises the following steps:
converting the head movement amplitude data, the heartbeat data and the breathing data corresponding to the time slices into characteristic data;
inputting the characteristic data into a sleep detection model to obtain a predicted sleep state and a probability value corresponding to the time slice; the sleep detection model is obtained by training according to sleep sample data and corresponding sleep state labels;
determining the sleep state of the user based on the predicted sleep state and probability value corresponding to the time slice and the historical sleep state and time mark data corresponding to the time slice obtained through the sleep detection model;
the determining the sleep state of the user based on the predicted sleep state and the probability value corresponding to the time slice and the historical sleep state and the time stamp data corresponding to the time slice obtained by the sleep detection model comprises the following steps:
determining the sleep state of the user by the following formula:wherein,for the sleeping state of the user in question,for the calculated value corresponding to the ith sleep state,for the probability value of the i-th predicted sleep state obtained by the sleep detection model,is the state value of the ith sleep state in the j-th historical sleep states,i=1, 2, … n, n is the number of sleep states, m is the number of days in the history sleep state, and a, b, c are weight values.
2. The method for detecting sleep as claimed in claim 1, wherein the method for detecting sleep as is further comprises:
dividing the sleep sample data into a plurality of time slices;
converting head motion amplitude data, heartbeat data and respiration data corresponding to each divided time slice into characteristic data;
and performing model training according to the feature data corresponding to each divided time slice and the sleep state label to obtain the sleep detection model.
3. The method for detecting sleep in a pillow according to claim 2, wherein the training the model according to the feature data and the sleep state label corresponding to each divided time slice to obtain the sleep detection model comprises:
inputting the feature data corresponding to the divided time slices into the sleep detection model to obtain a predicted value;
calculating a loss value according to the predicted value and the measured value corresponding to each divided time slice;
and if the loss value is smaller than a preset value, stopping training of the sleep detection model.
4. A pillow-type sleep detection apparatus that performs a pillow-type sleep detection method as claimed in any one of claims 1-3, characterized in that the pillow-type sleep detection apparatus comprises:
the acquisition module is used for acquiring head movement amplitude data, heartbeat data and breathing data of the user through the intelligent headrest;
the acquisition module is used for carrying out sliding processing on the head movement amplitude data, the heartbeat data and the breathing data according to the time window length L and the time interval D to acquire peak value data in each time window;
the merging module is used for merging time windows with the absolute value of the difference value of the peak value data in the adjacent time windows smaller than a preset value into time slices, and the time length of the time slices is more than or equal to 2L-D;
the acquisition module is further used for acquiring historical sleep states and time mark data of the time slices corresponding to the time periods from a sleep database of the user; the sleep database of the user stores historical sleep states and time marking data corresponding to different time periods of the user;
and the determining module is used for determining the sleep state of the user through the head movement amplitude data, the heartbeat data, the breathing data, the historical sleep state and the time mark data corresponding to the time slice.
5. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the pillow sleep detection method of any of claims 1 to 3 when the computer program is executed by the processor.
6. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the pillow sleep detection method according to any one of claims 1 to 3.
CN202310148454.2A 2023-02-22 2023-02-22 Pillow type sleep detection method and device and computer equipment Active CN116269258B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310148454.2A CN116269258B (en) 2023-02-22 2023-02-22 Pillow type sleep detection method and device and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310148454.2A CN116269258B (en) 2023-02-22 2023-02-22 Pillow type sleep detection method and device and computer equipment

Publications (2)

Publication Number Publication Date
CN116269258A CN116269258A (en) 2023-06-23
CN116269258B true CN116269258B (en) 2023-11-21

Family

ID=86784436

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310148454.2A Active CN116269258B (en) 2023-02-22 2023-02-22 Pillow type sleep detection method and device and computer equipment

Country Status (1)

Country Link
CN (1) CN116269258B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104077309A (en) * 2013-03-28 2014-10-01 日电(中国)有限公司 Method and device for carrying out dimension reduction processing on time-sequential sequence
CN104720748A (en) * 2013-12-24 2015-06-24 中国移动通信集团公司 Sleep stage determining method and sleep stage determining system
CN109223004A (en) * 2018-09-19 2019-01-18 深圳市赛亿科技开发有限公司 The implementation method and device that human body wakes up
CN109222908A (en) * 2018-09-19 2019-01-18 深圳市赛亿科技开发有限公司 Intelligence headrest and its sleep quality of human body monitoring method
CN109674459A (en) * 2018-12-24 2019-04-26 深圳和而泰数据资源与云技术有限公司 A kind of method and device of data processing
CN113806353A (en) * 2020-06-12 2021-12-17 第四范式(北京)技术有限公司 Method and device for realizing time sequence feature extraction
CN114947754A (en) * 2022-06-30 2022-08-30 北京京东拓先科技有限公司 Method and apparatus for determining sleep data
WO2022269936A1 (en) * 2021-06-25 2022-12-29 ヘルスセンシング株式会社 Sleeping state estimation system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104077309A (en) * 2013-03-28 2014-10-01 日电(中国)有限公司 Method and device for carrying out dimension reduction processing on time-sequential sequence
CN104720748A (en) * 2013-12-24 2015-06-24 中国移动通信集团公司 Sleep stage determining method and sleep stage determining system
CN109223004A (en) * 2018-09-19 2019-01-18 深圳市赛亿科技开发有限公司 The implementation method and device that human body wakes up
CN109222908A (en) * 2018-09-19 2019-01-18 深圳市赛亿科技开发有限公司 Intelligence headrest and its sleep quality of human body monitoring method
CN109674459A (en) * 2018-12-24 2019-04-26 深圳和而泰数据资源与云技术有限公司 A kind of method and device of data processing
CN113806353A (en) * 2020-06-12 2021-12-17 第四范式(北京)技术有限公司 Method and device for realizing time sequence feature extraction
WO2022269936A1 (en) * 2021-06-25 2022-12-29 ヘルスセンシング株式会社 Sleeping state estimation system
CN114947754A (en) * 2022-06-30 2022-08-30 北京京东拓先科技有限公司 Method and apparatus for determining sleep data

Also Published As

Publication number Publication date
CN116269258A (en) 2023-06-23

Similar Documents

Publication Publication Date Title
Yang et al. Lifelogging data validation model for internet of things enabled personalized healthcare
CN108597609A (en) A kind of doctor based on LSTM networks is foster to combine health monitor method
CN106886675B (en) Method and system for monitoring continuous biomedical signals
CN109493979A (en) A kind of disease forecasting method and apparatus based on intelligent decision
CN111657890A (en) Sleep state monitoring method and device, intelligent mattress and medium
JP2018524750A (en) Method and system for monitoring stress conditions
US20160128638A1 (en) System and method for detecting and quantifying deviations from physiological signals normality
CN112185561A (en) User portrait generation method and device and computer equipment
CN114512239B (en) Cerebral apoplexy risk prediction method and system based on transfer learning
Sanchez et al. Hidden markov models for activity recognition in ambient intelligence environments
CN116821809B (en) Vital sign data acquisition system based on artificial intelligence
WO2023097780A1 (en) Classification method and device for classifying patient‑ventilator asynchrony phenomenon in mechanical ventilation process
CN116269258B (en) Pillow type sleep detection method and device and computer equipment
CN114758786A (en) Dynamic early warning system for post-traumatic hemorrhagic shock based on noninvasive parameters
CN109770904A (en) Monitoring method, device, computer equipment and the storage medium of apnea
CN105009130A (en) Detection device, detection method and detection program which support detection of sign of state transition in living organism on basis of network entropy
WO2020209117A1 (en) Stress estimation device, stress estimation method, and computer-readable recording medium
CN112957018A (en) Heart state detection method and device based on artificial intelligence
CN102428468A (en) Method for automatically generating a user-specific measurement data capturing regime for a discontinuous blood sugar measurement and data processing device and blood sugar measuring device
CN116831523A (en) Alarm method, device, equipment and storage medium based on health monitoring
CN111870250A (en) User state monitoring method and device, computing equipment and computer storage medium
CN107194918B (en) Data analysis method and device
CN109119155A (en) ICU mortality prediction assessment system based on deep learning
Hallgrímsson et al. Learning individualized cardiovascular responses from large-scale wearable sensors data
CN114424934A (en) Apnea event screening model training method and device and computer equipment

Legal Events

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