CN112690761A - Sleep state detection method, device, equipment and computer readable medium - Google Patents

Sleep state detection method, device, equipment and computer readable medium Download PDF

Info

Publication number
CN112690761A
CN112690761A CN202110049730.0A CN202110049730A CN112690761A CN 112690761 A CN112690761 A CN 112690761A CN 202110049730 A CN202110049730 A CN 202110049730A CN 112690761 A CN112690761 A CN 112690761A
Authority
CN
China
Prior art keywords
sleep state
model
data
body movement
target
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.)
Granted
Application number
CN202110049730.0A
Other languages
Chinese (zh)
Other versions
CN112690761B (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.)
Gree Electric Appliances Inc of Zhuhai
Zhuhai Lianyun Technology Co Ltd
Original Assignee
Gree Electric Appliances Inc of Zhuhai
Zhuhai Lianyun Technology Co Ltd
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 Gree Electric Appliances Inc of Zhuhai, Zhuhai Lianyun Technology Co Ltd filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN202110049730.0A priority Critical patent/CN112690761B/en
Publication of CN112690761A publication Critical patent/CN112690761A/en
Application granted granted Critical
Publication of CN112690761B publication Critical patent/CN112690761B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Measurement Of The Respiration, Hearing Ability, Form, And Blood Characteristics Of Living Organisms (AREA)

Abstract

The application relates to a sleep state detection method, a sleep state detection device, sleep state detection equipment and a computer readable medium. The method comprises the following steps: acquiring body motion data of a target object, wherein the body motion data is acquired from a first moment to a second moment for the target object in a sleeping state; and determining the change relation of the body movement of the target object from the first moment to the second moment according to the body movement data, and determining the target sleep state of the target object at the second moment according to the change relation. According to the method and the device, the sleep state of the user is detected more accurately through the relation established between the previous moment and the current moment, and the problem that the detection result of the sleep state is inaccurate is solved.

Description

Sleep state detection method, device, equipment and computer readable medium
Technical Field
The present application relates to the field of neural network technologies, and in particular, to a sleep state detection method, apparatus, device, and computer readable medium.
Background
With the development of deep learning technology, the neural network gradually enters thousands of households, and particularly, when the neural network model is applied to analyzing the sleep of a user, the neural network can detect the sleep state of the user after training of a large amount of data, and can objectively evaluate the sleep quality of the user by using the sleep state detection result of the user, so that the conventional mode that the user needs to manually and subjectively evaluate is replaced.
Currently, in the related art, iris data, eye movement data, eye contour data and the like in a sleep state of a user are generally used for training a neural network model, so that the sleep state of the user is detected by detecting iris characteristics and determining a human eye region and a human eye contour according to a human eye position; and the sleep state is detected through brain wave signals. The inventor finds that the detection result of the detection model obtained in the above mode is not accurate enough when the detection result of the same user in the sleep state in the continuous time period has a large deviation in the research process.
Aiming at the problem that the detection result of the sleep state is not accurate enough, an effective solution is not provided at present.
Disclosure of Invention
The application provides a sleep state detection method, a sleep state detection device, sleep state detection equipment and a computer readable medium, and aims to solve the technical problem that detection of a sleep state is inaccurate.
According to an aspect of an embodiment of the present application, there is provided a sleep state detection method, including:
acquiring body motion data of a target object, wherein the body motion data is acquired from a first moment to a second moment for the target object in a sleeping state;
and determining the change relation of the body movement of the target object from the first moment to the second moment according to the body movement data, and determining the target sleep state of the target object at the second moment according to the change relation.
Optionally, determining a change relationship of the body movement of the target object from the first time to the second time according to the body movement data, and determining the target sleep state of the target object at the second time according to the change relationship includes:
extracting body movement characteristics of body movement data, wherein the body movement characteristics comprise at least one of heart rate variation, respiration variation and eye movement variation of a target object from a first moment to a second moment, and the body movement data comprise at least one of heart rate data, respiration data and eye movement data;
inputting the body movement characteristics into a trained sleep state detection model, and acquiring a predicted sleep state output by the sleep state detection model, wherein the sleep state detection model is used for establishing a change relation of body movement of a target object from a first moment to a second moment and identifying the sleep state of the target object at the second moment according to the change relation;
in a case where the predicted sleep state satisfies the target condition, the predicted sleep state is determined as a target sleep state.
Optionally, inputting the body movement characteristics into the trained sleep state detection model, and acquiring the predicted sleep state output by the sleep state detection model includes at least one of the following ways:
inputting the body movement characteristics into a moving average model, and acquiring a first predicted sleep state output by the moving average model, wherein the sleep state detection model comprises a moving average model, the moving average model is used for calculating a change curve by using the body movement characteristics, and determining a first predicted sleep state corresponding to a target value according to the target value of the change curve at a second moment, the change curve is used for representing the body movement change condition of a target object, and the change relationship comprises the relationship represented by the change curve;
the sleep state detection model comprises a gated cycle unit model, the gated cycle unit model is used for determining the carrying-in amount of the information of the first moment carried into the second moment by the updating gate by using the characteristic vector, the writing-in amount of the information of the first moment written into the candidate data set of the second moment by the resetting gate, and the second predicted sleep state is output by using the calculation results of the updating gate and the resetting gate, and the change relation comprises the relation expressed by the carrying-in amount and the writing-in amount.
Optionally, in a case where the predicted sleep state satisfies the target condition, determining the predicted sleep state as the target sleep state includes:
determining a similarity of the first predicted sleep state and the second predicted sleep state;
determining at least one of the first predicted sleep state and the second predicted sleep state as a target sleep state if the similarity is greater than or equal to a target threshold.
Optionally, in a case that the similarity is smaller than the target threshold, the method further includes:
taking the first predicted sleep state as the input of a moving average model, iteratively training the moving average model, taking the second predicted sleep state as the input of a gating cycle unit model, and iteratively training the gating cycle unit model;
and determining the similarity of a new first predicted sleep state output by the moving average model and a new second predicted sleep state output by the gating circulation unit model each time until the similarity is greater than or equal to a target threshold value, and determining at least one of the first predicted sleep state and the second predicted sleep state obtained last time as a target sleep state.
Optionally, before performing sleep state detection using the moving average model, the method further includes training the moving average model as follows:
inputting the training data carrying noise into a moving average model;
inputting the weighted average of the data of the previous time to a moving average model before predicting the output of the current time by using the data of the current time so as to predict the output of the current time by using the data of the previous time and the data of the current time;
initializing a regularization parameter, and adjusting the regularization parameter to filter the output noise of the moving average model;
and taking the regularization parameter which minimizes the error between the estimated residual of the output noise and the actual noise variance as the final regularization parameter of the moving average model.
Optionally, before performing sleep state detection using the gated loop unit model, the method further includes training the gated loop unit model as follows:
initializing parameters in each network layer in the gating cycle unit model;
training the door control circulation unit model through training data;
stopping training under the condition that the identification accuracy of the gate control cycle unit model on the test data reaches a set threshold value, and obtaining a trained gate control cycle unit model;
and under the condition that the identification accuracy of the gated circulation unit model on the test data does not reach the set threshold, training the gated circulation unit model by using the training data continuously to adjust the numerical values of the parameters in each network layer in the gated circulation unit model until the identification accuracy of the gated circulation unit model on the test data reaches the set threshold.
According to another aspect of the embodiments of the present application, there is provided a sleep state detection apparatus including:
the body movement data acquisition module is used for acquiring body movement data of the target object, wherein the body movement data is acquired from a first moment to a second moment for the target object in a sleeping state;
and the sleep state determining module is used for determining the change relation of the body movement of the target object from the first moment to the second moment according to the body movement data and determining the target sleep state of the target object at the second moment according to the change relation.
According to another aspect of the embodiments of the present application, there is provided an electronic device, including a memory, a processor, a communication interface, and a communication bus, where the memory stores a computer program executable on the processor, and the memory and the processor communicate with each other through the communication bus and the communication interface, and the processor implements the steps of the method when executing the computer program.
According to another aspect of embodiments of the present application, there is also provided a computer readable medium having non-volatile program code executable by a processor, the program code causing the processor to perform the above-mentioned method.
Compared with the related art, the technical scheme provided by the embodiment of the application has the following advantages:
the method comprises the steps of acquiring body motion data of a target object, wherein the body motion data are acquired from a first moment to a second moment when the target object is in a sleeping state; and determining the change relation of the body movement of the target object from the first moment to the second moment according to the body movement data, and determining the target sleep state of the target object at the second moment according to the change relation. According to the method and the device, the sleep state of the user is detected more accurately through the relation established between the previous moment and the current moment, and the problem that the detection result of the sleep state is inaccurate is solved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the technical solutions in the embodiments or related technologies of the present application, the drawings needed to be used in the description of the embodiments or related technologies will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without any creative effort.
Fig. 1 is a schematic diagram of a hardware environment of an alternative sleep state detection method according to an embodiment of the present application;
fig. 2 is a flowchart of an alternative sleep state detection method according to an embodiment of the present application;
fig. 3 is a block diagram of an alternative sleep state detection apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an alternative electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for the convenience of description of the present application, and have no specific meaning in themselves. Thus, "module" and "component" may be used in a mixture.
In the related technology, iris data, eye movement data, eye contour data and the like in a sleep state of a user are usually utilized to train a neural network model, so that the sleep state of the user is detected by detecting iris characteristics and determining human eye regions and contours according to human eye positions; and the sleep state is detected through brain wave signals. In the research process, the inventor of the application finds that the detection model obtained in the above mode has a larger deviation on the detection result of the sleep state of the same user in a continuous time period. However, when the user sleeps in a continuous period, there is a correlation between the sleep state at the previous time and the sleep state at the next time, and a sudden change phenomenon with a large change is not generated, so that the detection result of the detection model obtained by the related art is not accurate enough.
In order to solve the problems mentioned in the background art, according to an aspect of the embodiments of the present application, an embodiment of a sleep state detection method is provided, in which a model is trained cyclically through a link established between data at a previous time and data at a current time, state results of the two models are compared, and the models are updated, so that the accuracy of the sleep state detection result is improved, and influences caused by abnormal values are reduced.
Alternatively, in the embodiment of the present application, the sleep state detection method may be applied to a hardware environment formed by the terminal 101 and the server 103 as shown in fig. 1. As shown in fig. 1, a server 103 is connected to a terminal 101 through a network, which may be used to provide services for the terminal or a client installed on the terminal, and a database 105 may be provided on the server or separately from the server, and is used to provide data storage services for the server 103, and the network includes but is not limited to: wide area network, metropolitan area network, or local area network, and the terminal 101 includes but is not limited to a PC, a cell phone, a tablet computer, and the like.
A sleep state detection method in this embodiment may be executed by the server 103, or may be executed by both the server 103 and the terminal 101, as shown in fig. 2, where the method may include the following steps:
step S202, body movement data of the target object is obtained, wherein the body movement data is acquired from the first time to the second time for the target object in the sleep state.
In the embodiment of the application, the body movement data are obtained by continuously sampling within a period of time, and can be heart rate data, respiration data, eye movement data and the like of a user. Such as the user's heart rate, breathing, eye movement, etc. within 5 minutes. The time point when the data collection is started is the first time point, and the time point when the data collection is finished after 5 minutes is the second time point.
Step S204, determining the change relation of the body movement of the target object from the first time to the second time according to the body movement data, and determining the target sleep state of the target object at the second time according to the change relation.
In the embodiment of the application, the sleep state detection model can be used for determining the change relation of the body movement of the target object from the first time to the second time according to the body movement data, and determining the target sleep state of the target object at the second time according to the change relation.
Optionally, the step S204 of determining a change relationship of the body movement of the target object from the first time to the second time according to the body movement data, and determining the target sleep state of the target object at the second time according to the change relationship includes the following steps:
step 11, extracting the body movement characteristics of the body movement data, wherein the body movement characteristics comprise at least one of heart rate variation, respiration variation and eye movement variation of the target object from a first moment to a second moment, and the body movement data comprise at least one of heart rate data, respiration data and eye movement data.
In the embodiment of the application, the heart rate variation, the respiration variation and the eye movement variation from the first moment to the second moment can be calculated by utilizing the heart rate data, the respiration data and the eye movement data which are acquired at the first moment and the heart rate data, the respiration data and the eye movement data which are acquired at the second moment, and the variation of the data can be used as the body movement characteristics of the user in the period.
In the embodiment of the present application, the variation may be a variation of the whole first time to the second time, or may be a variation between each previous time and each next time in a continuous time period from the first time to the second time. Similarly, the average amount may be an average amount of the entire first time to the second time, or may be an average amount between every previous time and every next time in a continuous period from the first time to the second time.
In the embodiment of the present application, the body motion characteristics may be the average amount of heart rate, the average amount of respiration, the average amount of eye movement, or the like.
And step 12, inputting the body movement characteristics into the trained sleep state detection model, and acquiring the predicted sleep state output by the sleep state detection model, wherein the sleep state detection model is used for establishing the change relation of the body movement of the target object from the first moment to the second moment and identifying the sleep state of the target object at the second moment according to the change relation.
In the embodiment of the present application, the body movement characteristics obtained through the above steps have a change relationship from the first time to the second time, so the body movement characteristics are input into the sleep state detection model to establish a change relationship of the body movement from the first time to the second time by using the sleep state detection model, and the sleep state detection model predicts the sleep state of the user at the second time according to the change relationship.
And step 13, determining the predicted sleep state as the target sleep state under the condition that the predicted sleep state meets the target condition.
In the embodiment of the application, the detection accuracy of the sleep state detection model can be improved by establishing the body activity change relationship of the user between the first moment and the second moment, the body activity change relationship of the user between the first moment and the second moment can be established by adopting two sleep state detection models, the detection results of the two models are compared, and the two models are trained in an iterative manner continuously to further improve the detection accuracy of the sleep state. The following describes establishing a relationship between changes in body activities of a user at a first time and a second time by using two sleep state detection models, and identifying a sleep state of the user at the second time according to the relationship.
Optionally, inputting the body movement characteristics into the trained sleep state detection model, and acquiring the predicted sleep state output by the sleep state detection model includes at least one of the following ways:
firstly, inputting body movement characteristics into a moving average model, and acquiring a first predicted sleep state output by the moving average model, wherein the sleep state detection model comprises the moving average model, the moving average model is used for calculating a change curve by using the body movement characteristics, and determining a first predicted sleep state corresponding to a target value according to the target value of the change curve at a second moment, the change curve is used for representing the body activity change condition of a target object, and the change relationship comprises the relationship represented by the change curve.
In the embodiment of the application, a moving average model can be used as a sleep state detection model, and the moving average model can draw a change curve by using data such as heart rate variation, respiration variation, eye movement variation, heart rate average, respiration average, eye movement average and the like. Or performing weighted average (for example, performing weighted average on data within 5 minutes) on the heart rate data, the respiration data, the eye movement data and the like from the first moment to the second moment, filtering noise data, and obtaining a smooth filter curve, where the filter curve is the above change curve, and the weighted weight is a model parameter obtained by learning the moving average model in the training process. And obtaining a change curve, namely determining a first predicted sleep state corresponding to the target value according to the target value corresponding to the second moment in the curve.
In the embodiment of the application, the moving average model can also remove noise, such as body movement, white noise, electromagnetic interference and the like caused by wind blowing, a plurality of noise parameters can be met during training, and the parameters can be inhibited by using the moving average model, so that the robustness of the model is improved, and the resistance to malignant parameters is enhanced.
And secondly, converting the body movement characteristics into characteristic vectors, inputting the characteristic vectors into a gated circulation unit model, and acquiring a second predicted sleep state output by the gated circulation unit model, wherein the sleep state detection model comprises the gated circulation unit model, the gated circulation unit model is used for determining the carrying-in amount of the information of the first moment carried into the second moment by an update gate by using the characteristic vectors, writing the information of the first moment into the writing-in amount of the candidate data set of the second moment by a reset gate, and outputting the second predicted sleep state by using the calculation results of the update gate and the reset gate, and the change relationship comprises the relationship expressed by the carrying-in amount and the writing-in amount.
In this embodiment of the present application, a Gated current Unit (GRU) may be used as another sleep state detection model, and an update gate of the Gated current Unit model may control a degree, that is, an amount of entrainment, by which heart rate, respiration, and eye movement data acquired at a first time are entrained into a second time for prediction. The larger the variation of the data between the first time and the second time, the larger the carrying-in amount, and conversely, the smaller the variation, the smaller the carrying-in amount. The reset gate of the gated cyclic unit model can control the degree, i.e., the write volume, of writing the heart rate, respiration, and eye movement data acquired at the first time into the candidate data set at the second time. The smaller the reset gate, the less the amount of writing of heart rate, respiration, and eye movement data collected at the first time.
In the embodiment of the present application, the maximum function of the gated loop unit model is as follows: the second moment and the first moment are connected with each other through body movement characteristics such as heart rate, respiration and eye movement, and therefore detection accuracy is improved. And converting the body motion characteristics into a characteristic vector, taking the characteristic vector as an input vector of the gating circulation unit model, and outputting and predicting the sleep state by the gating circulation unit model according to the input characteristic vector.
In the embodiment of the application, the gated cyclic unit model is a variant of a Long Short-Term Memory Network (LSTM), is a time cyclic Neural Network, and is specially designed to solve the Long-Term dependence problem of a general cyclic Neural Network (RNN). The gated-loop cell model has two gates, namely a reset gate and an update gate. Intuitively, the reset gate determines how to combine the new input information with the previous memory, and the update gate defines the amount of previous memory saved to the current time step.
The following description will compare the detection results of the two models to obtain a more accurate sleep state.
Optionally, in a case where the predicted sleep state satisfies the target condition, determining the predicted sleep state as the target sleep state includes:
step 21, determining the similarity between the first predicted sleep state and the second predicted sleep state;
and step 22, determining at least one of the first predicted sleep state and the second predicted sleep state as the target sleep state under the condition that the similarity is greater than or equal to the target threshold.
In the embodiment of the present application, the similarity between the first predicted sleep state and the second predicted sleep state may be represented by calculating the euclidean distance, the manhattan distance, the mingmen distance, and the like of the two predicted sleep states, so as to compare the detection results of the moving average model and the gated loop unit model, and if the similarity between the first predicted sleep state and the second predicted sleep state is greater than or equal to the target threshold, it is proved that the predicted sleep states of the two models are consistent, for example: and if the first predicted sleep state and the second predicted sleep state both indicate that the probability of deep sleep of the user is greater than 0.8, determining the deep sleep as the target sleep state.
Optionally, in a case that the similarity is smaller than the target threshold, the method further includes:
step 31, using the first predicted sleep state as the input of a moving average model, and iteratively training the moving average model, using the second predicted sleep state as the input of a gating cycle unit model, and iteratively training the gating cycle unit model;
and step 32, determining the similarity of the new first predicted sleep state output by the moving average model and the new second predicted sleep state output by the gating circulation unit model each time until the similarity is greater than or equal to a target threshold value, and determining at least one of the first predicted sleep state and the second predicted sleep state obtained last time as a target sleep state.
In the embodiment of the application, if the similarity is smaller than the target threshold, it indicates that at least one of the two models has a recognition error, and further iterative training is required to reduce the output difference between the two models, so as to further improve the detection accuracy of the sleep state.
Optionally, before performing sleep state detection using the moving average model, the method further includes training the moving average model as follows:
step 41, inputting the training data with noise into a moving average model;
step 42, before the output of the current time is predicted by using the data of the current time, inputting the weighted average value of the data of the previous time into a moving average model so as to predict the output of the current time by using the data of the previous time and the data of the current time;
step 43, initializing a regularization parameter and adjusting the regularization parameter to filter the output noise of the moving average model;
and step 44, taking the regularization parameter which minimizes the error between the estimated residual of the output noise and the actual noise variance as the final regularization parameter of the moving average model.
In the embodiment of the application, because the moving average model can remove noise, such as body movement, white noise, electromagnetic interference and the like caused by wind blowing, a plurality of noise parameters can be encountered during training, and therefore, when the moving average model is trained, the noise input into the moving average model can be modeled by using the regular term. And in the training process, the output noise and the actual noise in the prediction output of the moving average model are simultaneously estimated by using a least square method, and the regularization parameter corresponding to the minimization of the error between the estimated residual error of the output noise and the variance of the actual noise is used as the final regularization parameter of the moving average model. The regularization parameters are used for suppressing the intensity of the output noise, and when the error between the estimated residual error of the output noise and the actual noise variance is minimized, the noise suppression capability of the moving average model is strongest.
Optionally, before performing sleep state detection using the gated loop unit model, the method further includes training the gated loop unit model as follows:
step 51, initializing parameters in each network layer in the gated loop unit model;
step 52, training the gating cycle unit model through training data;
step 53, stopping training under the condition that the identification accuracy of the gate control cycle unit model on the test data reaches a set threshold value, and obtaining a trained gate control cycle unit model;
and step 54, under the condition that the identification accuracy of the gated circulation unit model on the test data does not reach the set threshold, continuing to train the gated circulation unit model by using the training data to adjust the numerical values of the parameters in each network layer in the gated circulation unit model until the identification accuracy of the gated circulation unit model on the test data reaches the set threshold.
In the embodiment of the application, the body movement data of a large number of users can be acquired as training samples, each training sample comprises the body movement data of the heart rate, the respiration, the eye movement and the like of the user in different sleep periods, and the practical sleep state labels of the user in various sleep periods, such as deep sleep, shallow sleep, falling asleep and the like. And initializing parameters in each network layer in the gated circulation unit model by using a plurality of training samples, and further training the gated circulation unit model until the gated circulation unit model converges, namely the identification accuracy of the gated circulation unit model on the test data reaches a set threshold value.
Optionally, the training the gated loop unit model until the gated loop unit model converges may further include:
inputting each training sample into a gating cycle unit model respectively to obtain a training prediction value of the sleep state;
determining a loss value according to a difference between the plurality of training prediction values and the actual sleep state label in the corresponding training sample;
and correcting the gating cycle unit model by using a plurality of loss values until the precision of the output result of the gating cycle unit model reaches a target threshold value.
According to still another aspect of the embodiments of the present application, as shown in fig. 3, there is provided a sleep state detection apparatus including:
the body movement data acquisition module 301 is configured to acquire body movement data of a target object, where the body movement data is acquired from a first time to a second time for the target object in a sleep state;
the sleep state determining module 303 is configured to determine a change relationship of the body movement of the target object from the first time to the second time according to the body movement data, and determine a target sleep state of the target object at the second time according to the change relationship.
It should be noted that the body movement data acquiring module 301 in this embodiment may be configured to execute step S202 in this embodiment, and the sleep state determining module 303 in this embodiment may be configured to execute step S204 in this embodiment.
It should be noted here that the modules described above are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of the above embodiments. It should be noted that the modules described above as a part of the apparatus may operate in a hardware environment as shown in fig. 1, and may be implemented by software or hardware.
Optionally, the sleep state determining module further includes:
the characteristic extraction unit is used for extracting body movement characteristics of the body movement data, the body movement characteristics comprise at least one of heart rate variation, respiration variation and eye movement variation of the target object from a first moment to a second moment, and the body movement data comprise at least one of heart rate data, respiration data and eye movement data;
the model prediction unit is used for inputting the body movement characteristics into a trained sleep state detection model and acquiring a predicted sleep state output by the sleep state detection model, and the sleep state detection model is used for establishing a change relation of body activities of a target object from a first moment to a second moment and identifying the sleep state of the target object at the second moment according to the change relation;
a sleep state determination unit for determining the predicted sleep state as the target sleep state if the predicted sleep state satisfies the target condition.
Optionally, the model prediction unit further includes:
the first model subunit is used for inputting the body movement characteristics into the moving average model and acquiring a first predicted sleep state output by the moving average model, the sleep state detection model comprises a moving average model, the moving average model is used for calculating a change curve by using the body movement characteristics and determining a first predicted sleep state corresponding to a target value according to the target value of the change curve at a second moment, the change curve is used for representing the body activity change condition of a target object, and the change relationship comprises the relationship represented by the change curve;
and the second model subunit is used for converting the body movement characteristics into the characteristic vectors, inputting the characteristic vectors into the gated circulation unit model, and acquiring a second predicted sleep state output by the gated circulation unit model, the sleep state detection model comprises the gated circulation unit model, the gated circulation unit model is used for determining the carrying-in amount of the information of the first moment carried into the second moment by the updating gate by using the characteristic vectors, writing the information of the first moment into the writing-in amount of the candidate data set of the second moment by the resetting gate, and outputting the second predicted sleep state by using the calculation results of the updating gate and the resetting gate, and the change relationship comprises the relationship expressed by the carrying-in amount and the writing-in amount.
Optionally, the sleep state determining unit further includes:
a similarity determining subunit, configured to determine a similarity between the first predicted sleep state and the second predicted sleep state;
a first sleep state determination subunit configured to determine at least one of the first predicted sleep state and the second predicted sleep state as the target sleep state if the degree of similarity is greater than or equal to the target threshold.
Optionally, the sleep state determining unit further includes:
the iterative training subunit is used for taking the first predicted sleep state as the input of the moving average model, iteratively training the moving average model, taking the second predicted sleep state as the input of the gated loop unit model, and iteratively training the gated loop unit model;
and the second sleep state determining subunit is used for determining the similarity of the new first predicted sleep state output by the moving average model and the new second predicted sleep state output by the gating circulation unit model each time until the similarity is greater than or equal to the target threshold value, and determining at least one of the first predicted sleep state and the second predicted sleep state obtained last time as the target sleep state.
Optionally, the sleep-state detection apparatus further includes a first model training module, configured to:
inputting the training data carrying noise into a moving average model;
inputting the weighted average of the data of the previous time to a moving average model before predicting the output of the current time by using the data of the current time so as to predict the output of the current time by using the data of the previous time and the data of the current time;
initializing a regularization parameter, and adjusting the regularization parameter to filter the output noise of the moving average model;
and taking the regularization parameter which minimizes the error between the estimated residual of the output noise and the actual noise variance as the final regularization parameter of the moving average model.
Optionally, the sleep-state detection apparatus further includes a second model training module, configured to:
initializing parameters in each network layer in the gating cycle unit model;
training the door control circulation unit model through training data;
stopping training under the condition that the identification accuracy of the gate control cycle unit model on the test data reaches a set threshold value, and obtaining a trained gate control cycle unit model;
and under the condition that the identification accuracy of the gated circulation unit model on the test data does not reach the set threshold, training the gated circulation unit model by using the training data continuously to adjust the numerical values of the parameters in each network layer in the gated circulation unit model until the identification accuracy of the gated circulation unit model on the test data reaches the set threshold.
According to another aspect of the embodiments of the present application, there is provided an electronic device, as shown in fig. 4, including a memory 401, a processor 403, a communication interface 405, and a communication bus 407, where the memory 401 stores a computer program that is executable on the processor 403, the memory 401 and the processor 403 communicate with each other through the communication interface 405 and the communication bus 407, and the processor 403 implements the steps of the method when executing the computer program.
The memory and the processor in the electronic equipment are communicated with the communication interface through a communication bus. The communication bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
There is also provided, in accordance with yet another aspect of an embodiment of the present application, a computer-readable medium having non-volatile program code executable by a processor.
Optionally, in an embodiment of the present application, a computer readable medium is configured to store program code for the processor to perform the following steps:
acquiring body motion data of a target object, wherein the body motion data is acquired from a first moment to a second moment for the target object in a sleeping state;
and determining the change relation of the body movement of the target object from the first moment to the second moment according to the body movement data, and determining the target sleep state of the target object at the second moment according to the change relation.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
When the embodiments of the present application are specifically implemented, reference may be made to the above embodiments, and corresponding technical effects are achieved.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the Processing units may be implemented within one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described herein may be implemented by means of units performing the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and in actual implementation, there may be other divisions, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially implemented or make a contribution to the prior art, or may be implemented in the form of a software product stored in a storage medium and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk. It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is merely exemplary of the present application and is presented to enable those skilled in the art to understand and practice the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A sleep state detection method, comprising:
acquiring body motion data of a target object, wherein the body motion data is acquired from a first time to a second time for the target object in a sleeping state;
determining the change relation of the body movement of the target object from the first time to the second time according to the body movement data, and determining the target sleep state of the target object at the second time according to the change relation.
2. The method of claim 1, wherein determining a relationship of change in body movement of the target subject from the first time to the second time based on the body movement data, and determining a target sleep state of the target subject at the second time based on the relationship of change comprises:
extracting body movement features of the body movement data, wherein the body movement features comprise at least one of heart rate variation, respiration variation and eye movement variation of the target object from the first time to the second time, and the body movement data comprise at least one of heart rate data, respiration data and eye movement data;
inputting the body movement characteristics into a trained sleep state detection model, and acquiring a predicted sleep state output by the sleep state detection model, wherein the sleep state detection model is used for establishing a change relation of body movement of the target object from the first time to the second time, and identifying the sleep state of the target object at the second time according to the change relation;
determining the predicted sleep state as the target sleep state if the predicted sleep state satisfies a target condition.
3. The method of claim 2, wherein inputting the body movement characteristics into a trained sleep state detection model and obtaining the predicted sleep state output by the sleep state detection model comprises at least one of:
inputting the body movement characteristics into a moving average model, and acquiring a first predicted sleep state output by the moving average model, wherein the sleep state detection model comprises the moving average model, the moving average model is used for calculating a variation curve by using the body movement characteristics, and determining the first predicted sleep state corresponding to a target value according to the target value of the variation curve at the second moment, the variation curve is used for representing the body movement variation condition of the target object, and the variation relation comprises a relation represented by the variation curve;
and converting the body movement characteristics into characteristic vectors, inputting the characteristic vectors into a gated circulation unit model, and acquiring a second predicted sleep state output by the gated circulation unit model, wherein the sleep state detection model comprises the gated circulation unit model, the gated circulation unit model is used for determining a carrying-in amount of an update gate for carrying the information at the first moment into the second moment by using the characteristic vectors, writing the information at the first moment into a writing amount of a candidate data set at the second moment by using a reset gate, and outputting the second predicted sleep state by using calculation results of the update gate and the reset gate, and the change relation comprises a relation expressed by the carrying-in amount and the writing amount.
4. The method of claim 3, wherein determining the predicted sleep state as the target sleep state if the predicted sleep state satisfies a target condition comprises:
determining a similarity of the first predicted sleep state and the second predicted sleep state;
determining at least one of the first predicted sleep state and the second predicted sleep state as the target sleep state if the similarity is greater than or equal to a target threshold.
5. The method of claim 4, wherein if the similarity is less than the target threshold, the method further comprises:
taking the first predicted sleep state as the input of the moving average model, and iteratively training the moving average model, taking the second predicted sleep state as the input of the gated loop unit model, and iteratively training the gated loop unit model;
determining the similarity of a new first predicted sleep state output by the moving average model and a new second predicted sleep state output by the gated loop unit model each time until the similarity is greater than or equal to the target threshold, and determining at least one of the first predicted sleep state and the second predicted sleep state obtained last time as the target sleep state.
6. The method of any of claims 3 to 5, wherein prior to performing sleep state detection using the moving average model, the method further comprises training the moving average model as follows:
inputting noisy training data into the moving average model;
inputting a weighted average of data of a previous time to the moving average model before predicting an output of the current time using the data of the current time to predict the output of the current time using the data of the previous time and the data of the current time;
initializing a regularization parameter, and adjusting the regularization parameter to filter the output noise of the moving average model;
and taking the regularization parameter which minimizes the error between the estimated residual of the output noise and the actual noise variance as the final regularization parameter of the moving average model.
7. The method according to any of claims 3 to 5, wherein prior to performing sleep state detection using the gated loop unit model, the method further comprises training the gated loop unit model as follows:
initializing parameters in each network layer in the gating cycle unit model;
training the gating cycle unit model through training data;
stopping training under the condition that the identification accuracy of the gate control cycle unit model on the test data reaches a set threshold value, and obtaining the trained gate control cycle unit model;
under the condition that the identification accuracy of the gated circulation unit model to the test data does not reach the set threshold, training the gated circulation unit model by using the training data is continued so as to adjust the numerical values of the parameters in each network layer in the gated circulation unit model until the identification accuracy of the gated circulation unit model to the test data reaches the set threshold.
8. A sleep state detection apparatus, comprising:
the body movement data acquisition module is used for acquiring body movement data of a target object, wherein the body movement data is acquired from a first moment to a second moment for the target object in a sleeping state;
and the sleep state determining module is used for determining the change relation of the body movement of the target object from the first moment to the second moment according to the body movement data and determining the target sleep state of the target object at the second moment according to the change relation.
9. An electronic device comprising a memory, a processor, a communication interface and a communication bus, wherein the memory stores a computer program operable on the processor, and the memory and the processor communicate via the communication bus and the communication interface, wherein the processor implements the steps of the method according to any of the claims 1 to 7 when executing the computer program.
10. A computer-readable medium having non-volatile program code executable by a processor, wherein the program code causes the processor to perform the method of any of claims 1 to 7.
CN202110049730.0A 2021-01-14 2021-01-14 Sleep state detection method, device, equipment and computer readable medium Active CN112690761B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110049730.0A CN112690761B (en) 2021-01-14 2021-01-14 Sleep state detection method, device, equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110049730.0A CN112690761B (en) 2021-01-14 2021-01-14 Sleep state detection method, device, equipment and computer readable medium

Publications (2)

Publication Number Publication Date
CN112690761A true CN112690761A (en) 2021-04-23
CN112690761B CN112690761B (en) 2022-02-18

Family

ID=75515113

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110049730.0A Active CN112690761B (en) 2021-01-14 2021-01-14 Sleep state detection method, device, equipment and computer readable medium

Country Status (1)

Country Link
CN (1) CN112690761B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113671489A (en) * 2021-08-09 2021-11-19 珠海格力电器股份有限公司 State reminding method and device, electronic equipment and computer readable storage medium
CN115496105A (en) * 2022-09-28 2022-12-20 广东省新黄埔中医药联合创新研究院 Sleep prediction model training method, sleep condition prediction method and related device
CN115590477A (en) * 2022-11-16 2023-01-13 中国医学科学院药用植物研究所(Cn) Sleep staging method and device based on self-supervision, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150164409A1 (en) * 2013-12-16 2015-06-18 Blue Ocean Laboratories, Inc. Sleep system for obtaining sleep state information
US20150289803A1 (en) * 2014-04-14 2015-10-15 Quanta Computer Inc. Method and system of sleep detection
CN109033472A (en) * 2018-09-05 2018-12-18 深圳灵图慧视科技有限公司 Picture retrieval method and device, computer equipment and computer-readable medium
CN110236491A (en) * 2019-05-16 2019-09-17 华南师范大学 A kind of sleep stage monitoring method
CN113499037A (en) * 2021-08-13 2021-10-15 珠海格力电器股份有限公司 Method and device for determining sleep quality of user, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150164409A1 (en) * 2013-12-16 2015-06-18 Blue Ocean Laboratories, Inc. Sleep system for obtaining sleep state information
US20150289803A1 (en) * 2014-04-14 2015-10-15 Quanta Computer Inc. Method and system of sleep detection
CN109033472A (en) * 2018-09-05 2018-12-18 深圳灵图慧视科技有限公司 Picture retrieval method and device, computer equipment and computer-readable medium
CN110236491A (en) * 2019-05-16 2019-09-17 华南师范大学 A kind of sleep stage monitoring method
CN113499037A (en) * 2021-08-13 2021-10-15 珠海格力电器股份有限公司 Method and device for determining sleep quality of user, electronic equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
JAN WERTH等: "Deep learning approach for ECG-based automatic sleep stateclassification in preterm infants", 《BIOMEDICAL SIGNAL PROCESSING AND CONTROL》 *
张俊民等: "基于特征融合的ARMA短时睡眠状态分析", 《华东理工大学学报》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113671489A (en) * 2021-08-09 2021-11-19 珠海格力电器股份有限公司 State reminding method and device, electronic equipment and computer readable storage medium
CN113671489B (en) * 2021-08-09 2023-10-17 珠海格力电器股份有限公司 State reminding method and device, electronic equipment and computer readable storage medium
CN115496105A (en) * 2022-09-28 2022-12-20 广东省新黄埔中医药联合创新研究院 Sleep prediction model training method, sleep condition prediction method and related device
CN115496105B (en) * 2022-09-28 2023-10-24 广东省新黄埔中医药联合创新研究院 Sleep prediction model training method, sleep condition prediction method and related devices
CN115590477A (en) * 2022-11-16 2023-01-13 中国医学科学院药用植物研究所(Cn) Sleep staging method and device based on self-supervision, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN112690761B (en) 2022-02-18

Similar Documents

Publication Publication Date Title
CN112690761B (en) Sleep state detection method, device, equipment and computer readable medium
CN107169454B (en) Face image age estimation method and device and terminal equipment thereof
US11551103B2 (en) Data-driven activity prediction
US20180060507A1 (en) Method and system for optimized wake-up strategy via sleeping stage prediction with recurrent neural networks
US11270565B2 (en) Electronic device and control method therefor
US20200133211A1 (en) Electronic device and method for controlling electronic device thereof
CN113780466B (en) Model iterative optimization method, device, electronic equipment and readable storage medium
EP3671441B1 (en) Application management method and apparatus, storage medium, and electronic device
CN116821809B (en) Vital sign data acquisition system based on artificial intelligence
WO2021051944A1 (en) Automatic sleep aid music pushing method and apparatus, computer device, and storage medium
CN110852442B (en) Behavior identification and model training method and device
EP3726435A1 (en) Deep neural network training method and apparatus, and computer device
US20120054133A1 (en) Method of configuring a sensor-based detection device and a corresponding computer program and adaptive device
CN114465678A (en) Complex activity WIFI perception method based on deep learning
CN113762401A (en) Self-adaptive classification task threshold adjusting method, device, equipment and storage medium
CN114529962A (en) Image feature processing method and device, electronic equipment and storage medium
CN115115038B (en) Model construction method based on single lead electrocardiosignal and gender identification method
JP2019160240A (en) Information processing device and information processing method
CN115496105B (en) Sleep prediction model training method, sleep condition prediction method and related devices
CN113095153A (en) Mobile terminal human situation recognition method based on depth residual error network
Pipanmaekaporn et al. Mining Acceleration Data for Smartphone-based Fall Detection
Jeebun et al. Optimal number of states in hidden Markov models and its application to the detection of human movement
CN113130024A (en) Medical event prediction method, wearable device and computer-readable storage medium
CN111126294A (en) Method and server for recognizing gait of terminal user based on mobile terminal data
Duffy et al. An investigation into smartphone based weakly supervised activity recognition systems

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