Method and device for evaluating sleep quality, storage medium and computer device
By acquiring the basic characteristics and sleep attribute data of the assessment subjects, constructing feature vectors, and using a preset model to assess sleep quality, the problem of low efficiency and low accuracy of manual assessment is solved, achieving a more efficient and accurate sleep quality assessment.
Patent Information
- Application Number
- CN202310471998.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-24
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2043-04-24
AI Technical Summary
In existing technologies, assessing sleep quality by manually analyzing a user's heart rate chart after waking up is inefficient and inaccurate, and is greatly affected by the skill level of the assessor.
By acquiring basic characteristic data and sleep attribute data of the evaluation object, basic attribute feature vectors and sleep time series feature vectors are constructed, and a comprehensive evaluation is carried out using a preset sleep quality prediction model, including random forest regression or linear regression models.
It improves the accuracy of sleep quality assessment, reduces the time spent on manual assessment, and avoids erroneous assessments due to the lack of experience of the assessors.
Smart Images

Figure CN116530933B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of information technology and digital medical technology, and in particular to a sleep quality evaluation method and device, a storage medium and a computer device. BACKGROUND
[0002] Sleep is very important to the human body, and maintaining sufficient sleep is of great significance to the energy recovery of the human body and the normal operation of the brain. Based on this, it is particularly important to evaluate the sleep quality of the human body.
[0003] At present, the sleep quality of a user is usually evaluated by manually analyzing the heart rate graph of the user after waking up. However, this manual evaluation method requires the analyst to consult a large amount of information in advance, resulting in low evaluation efficiency of sleep quality. At the same time, due to the uneven technical level of the evaluation personnel, it may lead to errors in analyzing the heart rate graph, thereby resulting in low accuracy of sleep quality evaluation. SUMMARY
[0004] The present application provides a sleep quality evaluation method and device, a storage medium and a computer device, which can improve the evaluation accuracy and efficiency of sleep quality.
[0005] According to a first aspect of the present application, a sleep quality evaluation method is provided, comprising:
[0006] obtaining basic feature data and sleep attribute data of an evaluation object;
[0007] determining time sequence feature data of the evaluation object during sleep based on the sleep attribute data;
[0008] determining a basic attribute feature vector corresponding to the basic feature data, and determining a sleep time sequence feature vector corresponding to the time sequence feature data;
[0009] inputting the basic attribute feature vector and the sleep time sequence feature vector into a preset sleep quality prediction model, and using the preset sleep quality prediction model to predict the conversion quality corresponding to the basic attribute feature vector and the sleep time sequence feature vector, to obtain a sleep quality prediction parameter corresponding to the evaluation object;
[0010] evaluating the sleep quality of the evaluation object based on the sleep quality prediction parameter.
[0011] According to a second aspect of the present application, a sleep quality evaluation device is provided, comprising:
[0012] an acquisition unit for acquiring basic feature data and sleep attribute data of an evaluation object;
[0013] determining, based on the sleep attribute data, time sequence feature data of the evaluation object during sleep;
[0014] determining a basic attribute feature vector corresponding to the basic feature data and a sleep time sequence feature vector corresponding to the time sequence feature data;
[0015] inputting the basic attribute feature vector and the sleep time sequence feature vector into a preset sleep quality prediction model, and predicting, by using the preset sleep quality prediction model, a converted quality corresponding to the basic attribute feature vector and the sleep time sequence feature vector, to obtain a sleep quality prediction parameter corresponding to the evaluation object;
[0016] evaluating, based on the sleep quality prediction parameter, sleep quality of the evaluation object.
[0017] According to a third aspect of the present application, a computer readable storage medium is provided, which stores a computer program, and the program is executed by a processor to implement the following steps:
[0018] obtaining basic feature data and sleep attribute data of an evaluation object;
[0019] determining, based on the sleep attribute data, time sequence feature data of the evaluation object during sleep;
[0020] determining a basic attribute feature vector corresponding to the basic feature data and a sleep time sequence feature vector corresponding to the time sequence feature data;
[0021] inputting the basic attribute feature vector and the sleep time sequence feature vector into a preset sleep quality prediction model, and predicting, by using the preset sleep quality prediction model, a converted quality corresponding to the basic attribute feature vector and the sleep time sequence feature vector, to obtain a sleep quality prediction parameter corresponding to the evaluation object;
[0022] evaluating, based on the sleep quality prediction parameter, sleep quality of the evaluation object.
[0023] According to a fourth aspect of the present application, a computer device is provided, which comprises a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor implements the following steps when executing the program:
[0024] obtaining basic feature data and sleep attribute data of an evaluation object;
[0025] determining, based on the sleep attribute data, time sequence feature data of the evaluation object during sleep;
[0026] determine a basic attribute feature vector corresponding to the basic feature data, and determine a sleep timing feature vector corresponding to the timing feature data;
[0027] input the basic attribute feature vector and the sleep timing feature vector into a preset sleep quality prediction model, and use the preset sleep quality prediction model to predict a converted quality corresponding to the basic attribute feature vector and the sleep timing feature vector, to obtain a sleep quality prediction parameter corresponding to the evaluation object;
[0028] based on the sleep quality prediction parameter, evaluate the sleep quality of the evaluation object.
[0029] Compared with the method of determining the sleep quality of a user by measuring the heart rate of the user after waking up, the sleep quality of an evaluation object is evaluated according to the basic feature data and sleep attribute data of the evaluation object, which can avoid the defect that the sleep quality cannot be accurately evaluated according to a single signal. Then, the converted quality corresponding to the basic feature data and the sleep attribute data is predicted by using a preset sleep quality prediction model, to obtain a sleep quality prediction parameter corresponding to the evaluation. Finally, the sleep quality of the evaluation object is evaluated based on the sleep quality prediction parameter, which can avoid the situation that the sleep quality is evaluated incorrectly due to insufficient experience of an evaluation personnel, thereby improving the evaluation accuracy of the sleep quality. In addition, the sleep quality is predicted by using the preset sleep quality prediction model, which can reduce the time for checking data when the sleep quality is evaluated manually, and therefore the evaluation efficiency of the sleep quality is improved. BRIEF DESCRIPTION OF DRAWINGS
[0030] The accompanying drawings, which are included to provide a further understanding of the application and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application. In the drawings:
[0031] Figure 1 a flowchart of a sleep quality evaluation method according to an embodiment of the application is shown;
[0032] Figure 2 a flowchart of another sleep quality evaluation method according to an embodiment of the application is shown;
[0033] Figure 3 a structural schematic diagram of a sleep quality evaluation device according to an embodiment of the application is shown;
[0034] Figure 4 a structural schematic diagram of another sleep quality evaluation device according to an embodiment of the application is shown;
[0035] Figure 5 An entity structure schematic diagram of a computer device provided by an embodiment of the present application is shown. DETAILED DESCRIPTION
[0036] The present application will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0037] At present, the sleep quality of a user is evaluated by manually analyzing a heart rate graph of the user after waking up, which results in low evaluation efficiency of the sleep quality. At the same time, due to the uneven technical level of the evaluation personnel, the analysis of the heart rate graph may be wrong, which results in low accuracy of the evaluation of the sleep quality.
[0038] In order to solve the above problems, an embodiment of the present application provides an evaluation method of sleep quality, as shown in the figure, the method comprises the following steps. Figure 1
[0039] 101. Obtain basic feature data and sleep attribute data of an evaluation object.
[0040] The basic feature data includes age, gender, disease history, work data, etc. of the evaluation object, and the sleep attribute data includes sleep duration, sleep time, electrocardiogram data and blood pressure data, etc. of the evaluation object.
[0041] It should be noted that the basic feature data and the sleep attribute data of the evaluation object obtained in the embodiment are not personal privacy data of the evaluation object. The basic feature data of the evaluation object can be obtained in a database. At the same time, the electrocardiogram data and the blood pressure data, etc. of the user during the sleep process can be measured by a measuring device, and the sleep duration and the sleep time, etc. of the evaluation object can be determined based on a timing device. Then, the sleep quality of the evaluation object is evaluated by using the above basic feature data and the sleep attribute data, which can avoid the defect that the sleep quality cannot be accurately evaluated according to a single data, so that all factors affecting the sleep quality can be comprehensively analyzed, thereby improving the evaluation accuracy of the sleep quality.
[0042] 102. Determine time sequence feature data of the evaluation object during the sleep period based on the sleep attribute data.
[0043] The time sequence feature data refers to data of electrocardiogram data and blood pressure data indexed by time dimension during sleep. The time sequence feature data in the embodiment of the present application includes data such as heart rate, respiratory rate and heart rate variability of the evaluation object. The sleep period is the interval from falling asleep to waking up of the evaluation object. For example, if the user falls asleep at 20:00 in the evening and wakes up at 6:00 in the morning the next day, the sleep period of the evaluation object is from 20:00 of the previous day to 6:00 of the next day.
[0044] For the embodiment of the present application, the falling asleep time and sleep duration of the evaluation object, and the electrocardiogram data and blood pressure data of the user during sleep can be collected. The time sequence feature data such as heart rate, respiratory rate and heart rate variability of the evaluation object during sleep is constructed by using the above data, and the sleep quality of the evaluation object is evaluated according to the time sequence feature data and the basic feature data, thereby avoiding the problem that the evaluation result is inaccurate due to the evaluation of sleep quality according to a single data, and improving the evaluation accuracy of sleep quality.
[0045] 103, determine the basic attribute feature vector corresponding to the basic feature data, and determine the sleep time sequence feature vector corresponding to the time sequence feature data.
[0046] For the embodiment of the present application, after obtaining the basic feature data and the time sequence feature data of the evaluation object, in order to improve the prediction accuracy of the preset sleep quality prediction model and make the data more fully utilized, the hidden features corresponding to the basic feature data and the time sequence feature data need to be extracted first, that is, the basic feature data and the time sequence feature data in different fields are processed into vectors of the same latitude. The method is to determine the basic attribute feature vector corresponding to the basic feature data and the sleep time sequence feature vector corresponding to the time sequence feature data, and then use the preset sleep quality prediction model to predict the transformation quality corresponding to the basic attribute feature vector and the sleep time sequence feature vector together, to obtain the sleep quality prediction parameter corresponding to the evaluation object.
[0047] 104, the basic attribute feature vector and the sleep time sequence feature vector are input into the preset sleep quality prediction model, and the transformation quality corresponding to the basic attribute feature vector and the sleep time sequence feature vector together is predicted by using the preset sleep quality prediction model, to obtain the sleep quality prediction parameter corresponding to the evaluation object.
[0048] The preset sleep quality prediction model can be a random forest regression model, a linear regression model, etc., which is not limited in the embodiment of the present application. The sleep quality prediction parameter can be the energy recovery value of the evaluation object after sleep.
[0049] For the embodiment of the present application, after obtaining the basic attribute feature vector corresponding to the basic feature data and the sleep timing feature vector corresponding to the timing feature data, the basic attribute feature vector and the sleep timing feature vector are processed to obtain a processed vector, and the processed vector is input into a preset sleep quality prediction model for quality parameter prediction to obtain a sleep quality prediction parameter corresponding to the evaluation object. Finally, the sleep quality of the evaluation object is evaluated according to the sleep quality prediction parameter, which can avoid evaluating the sleep quality according to human experience. Since the technical level of the evaluation personnel is uneven, the accuracy of sleep quality evaluation is low, thereby improving the evaluation accuracy of sleep quality.
[0050] 105、Based on the sleep quality prediction parameter, the sleep quality of the evaluation object is evaluated.
[0051] Among them, the sleep quality of the evaluation object is evaluated, that is, the sleep level of the evaluation object is determined. For the embodiment of the present application, after the sleep quality prediction parameter corresponding to the evaluation object is predicted by the preset sleep quality prediction model, that is, the energy recovery value, the preset sleep quality configuration table is queried. The sleep quality configuration table records the sleep level corresponding to different recovery values. Based on the sleep quality configuration table, the sleep quality level corresponding to the energy recovery value is determined, for example, the sleep quality corresponding to the energy recovery value 1 is low, the sleep quality corresponding to the energy recovery value 2 is primary, the sleep quality corresponding to the energy recovery value 3 is middle, the sleep quality corresponding to the energy recovery value 4 is high, and the sleep quality corresponding to the energy recovery value 5 is special.
[0052] According to the sleep quality evaluation method, device, storage medium and computer equipment provided by the present application, compared with the method of determining the sleep quality of the user by measuring the heart rate of the user after waking up, the sleep quality of the evaluation object is evaluated according to the basic feature data and sleep attribute data of the evaluation object, which can avoid the defect that the sleep quality cannot be accurately evaluated according to a single signal. Then, the transformed quality corresponding to the basic feature data and the sleep attribute data is predicted by using the preset sleep quality prediction model to obtain the sleep quality prediction parameter corresponding to the evaluation. Finally, the sleep quality of the evaluation object is evaluated based on the sleep quality prediction parameter, which can avoid the situation that the sleep quality is evaluated incorrectly due to insufficient experience of the evaluation personnel, thereby improving the evaluation accuracy of the sleep quality. At the same time, the sleep quality is predicted by using the preset sleep quality prediction model, which can reduce the time for checking data when the sleep quality is evaluated manually, so that the evaluation efficiency of the sleep quality is improved.
[0053] Further, in order to better illustrate the above process of processing sleep data, as a refinement and expansion of the above embodiment, the embodiment of the present application provides another sleep quality evaluation method, as shown in Figure 2 The method comprises:
[0054] 201、acquire the basic feature data and sleep attribute data of the evaluation object.
[0055] Specifically, the basic feature data of the evaluation object, such as height, weight, age, gender, occupation, and disease history, can be acquired in the database, and at the same time, the sleep attribute data of the evaluation object is collected by using a wearable electrocardiogram monitoring device, for example, during the sleep of the evaluation object, the sleep attribute data such as night electrocardiogram data and blood pressure data is collected by the wearable electrocardiogram monitoring watch, and at the same time, the sleep attribute data such as the sleep start time and the sleep duration of the evaluation object is recorded by the electronic timing device.
[0056] 202、determine the timing feature data of the evaluation object during sleep based on the sleep attribute data.
[0057] For the embodiment of the application, based on the electrocardiogram data, blood pressure data, sleep start time and sleep duration, the timing feature data such as heart rate, respiratory rate and heart rate variability is constructed for the evaluation object.
[0058] 203、determine the basic attribute feature vector corresponding to the basic feature data, and determine the sleep timing feature vector corresponding to the timing feature data.
[0059] For the embodiment of the application, after acquiring the basic attribute data and timing feature data of the evaluation object, in order to predict the sleep quality of the patient, it is necessary to first determine the basic attribute feature vector corresponding to the basic feature data, and determine the sleep timing feature vector corresponding to the timing feature data, based on which, step 203 specifically includes: determining each first character contained in the basic feature data, and determining each second character contained in the timing feature data; determining the first embedding vector corresponding to each first character, and determining the second embedding vector corresponding to each second character; inputting the first embedding vector into the preset feature extraction model for feature extraction to obtain the basic attribute feature vector corresponding to the basic feature data; inputting the second embedding vector into the preset feature extraction model for feature extraction to obtain the sleep timing feature vector corresponding to the timing feature data.
[0060] The preset feature extraction model can be a preset encoder, which includes an attention layer and a feedforward neural network layer.
[0061] Specifically, in order to reduce the computational load of the preset sleep quality prediction model and improve its prediction accuracy, it is first necessary to determine the first characters contained in the basic attribute data. For example, if the basic attribute data is "male 32 years old", then the corresponding first characters are "male / female / 3 / 2 / years old / ". Then, word embedding methods such as Word2Vec are used to convert each first character in the basic attribute data into a first embedding vector. Similarly, word embedding methods such as Word2Vec are used to convert each second character in the time series feature data into a second embedding vector. The first embedding vector is then input into the attention layer of the preset encoder. Using the multi-head attention mechanism of the attention layer, the correlation information vector between each first character is extracted, which is the attention layer output vector corresponding to each first character. Furthermore, in order to improve the extraction accuracy of the basic attribute feature vector, the attention layer output vector and the embedding vector residual corresponding to each first character are added together to obtain the first feature vector corresponding to each first character. Then, the first feature vector is input into the feedforward neural network layer of the encoder for feature extraction to obtain the output vector of the feedforward neural network layer, which is the basic attribute feature vector corresponding to the basic feature data. Similarly, in the above manner, the sleep time-series feature vector corresponding to the time-series feature data can be extracted using the preset feature extraction model.
[0062] 204. Perform vector cross processing on the basic attribute feature vector and the sleep time sequence feature vector to obtain the sleep cross feature vector.
[0063] The embodiments of this invention can fully utilize the relationships between data to extract more latent features, while taking into account both high-order and low-order processing, making data utilization more efficient and the subsequent prediction results more accurate, thus meeting the needs of practical application scenarios. Based on this, vector cross processing can be performed on the basic attribute feature vector and the sleep time-series feature vector. The specific cross processing method includes: performing feature cross processing on the basic attribute feature vector and the sleep time-series feature vector to obtain a first processing result; performing element-wise cross processing on the basic attribute feature vector and the sleep time-series feature vector to obtain a second processing result; performing high-order cross processing on the basic attribute feature vector and the sleep time-series feature vector to obtain a third processing result; and using a preset transformation function to transform the first processing result, the second processing result, and the third processing result to obtain the sleep cross feature vector.
[0064] In practical applications, the basic attribute data and time-series feature data of the evaluated object belong to different domains. The processing method is to process the data from both domains into vectors of the same dimension. For example, the feature vectors of the two domains are (a1, a2, a3) and (b1, b2, b3), and the specific cross-processing includes:
[0065] (1) Cross at feature level between data of different fields, i.e. Hadamard product is performed on all elements between vectors, and then convolution transformation is performed under certain weight, f(w*(a1*b1, a2*b2, a3*b3));
[0066] (2) Cross at element level between vector data of different fields, i.e. Hadamard product is performed on each element between vectors, and then linear transformation is performed on each product result after being given different weight values, f(w1*a1*b1, w2*a2*b2, w3*a3*b3);
[0067] (3) Two-by-two combination of data of different fields, and high-order cross processing f(w(a1, a2, a3, b1, b2, b3));
[0068] The above three processing results are combined together, and transformation processing is performed by using a preset transformation function to obtain a sleep cross feature vector. The preset transformation function can be set according to actual conditions, and the embodiment is not limited in this regard. It should be noted that the above examples are only illustrative and do not limit the embodiments of the present application.
[0069] 205. inputting the sleep cross feature vector into a preset sleep quality prediction model, and predicting the transformation quality of the sleep cross feature vector by using the preset sleep quality prediction model to obtain a sleep quality prediction parameter corresponding to the evaluation object.
[0070] The preset sleep quality prediction model is a numerical prediction model constructed based on a neural network. In an optional embodiment of the present application, before the step 205, the preset sleep quality prediction model can also be established and trained first, and the specific training method is as follows: a plurality of preset initial sleep quality prediction models are constructed; sample basic feature data and sample sleep attribute data of sample evaluation objects are obtained, and actual sleep quality parameters corresponding to the sample evaluation objects are obtained; a training set and a test set are constructed based on the sample basic feature data, the sample sleep attribute data and the actual sleep quality parameters, and the training set is used to train the plurality of preset initial sleep quality prediction models to obtain a plurality of trained preset initial sleep quality prediction models; the test set is used to test the plurality of trained preset initial sleep quality prediction models to obtain a test result, and the preset sleep quality prediction model is determined based on the test result.
[0071] Specifically, the embodiment of the present application can construct a plurality of preset initial sleep quality prediction models, which can be constructed based on a lightGBM model, an FM model or other neural network models. The model architecture of each preset initial sleep quality prediction model can be the same or different. After constructing a plurality of preset initial sleep quality prediction models, the plurality of preset initial sleep quality prediction models can be trained. The specific training method is as follows: first, the sample evaluation object sample basic feature data and sample sleep attribute data are obtained, and the actual sleep quality parameter corresponding to the sample evaluation object is determined. The correspondence between the sample basic feature data, the sample sleep attribute data and the actual sleep quality parameter is established, and then the data set is constructed. When the model is trained, the data set can be divided into a plurality of sub-data sets according to the number of preset initial sleep quality prediction models. Then, the plurality of data in each group of sub-data sets are used to train each preset initial sleep quality prediction model, wherein the sample basic attribute data and the sample sleep attribute data are used as input data, and the actual sleep quality parameter is used as output data. For example, in the present embodiment, preset initial sleep quality prediction model 1 and preset initial sleep quality prediction model 2 are constructed, and the data set can also be randomly divided into sub-data set 1 and sub-data set 2. Further, the preset initial sleep quality prediction model 1 can be trained by using the sub-data set 1, and the preset initial sleep quality prediction model 2 can be trained by using the sub-data set 1. Thus, two preset initial sleep quality prediction models optimized after training can be obtained.
[0072] Further, 70% of the data in the sub-data set can be used as a training set and 30% of the data can be used as a test set. Then, the preset initial sleep quality prediction model can be trained by using the training set, and the trained preset initial sleep quality prediction model can be tested and optimized by using the test set. Finally, according to the test result, the preset sleep quality prediction model can be determined from the plurality of preset initial sleep quality prediction models. The specific method for determining the preset sleep quality prediction model includes: predicting the sleep quality prediction parameters of the sample evaluation personnel in the test set by using the plurality of trained preset initial sleep quality prediction models, to obtain the prediction sleep quality parameters corresponding to the plurality of trained preset initial sleep quality prediction models respectively; determining the sleep quality parameter prediction errors corresponding to the plurality of trained preset initial sleep quality prediction models respectively based on the actual sleep quality parameters and the prediction sleep quality parameters of the sample evaluation personnel in the test set; and determining the minimum sleep quality parameter prediction error from the sleep quality parameter prediction errors corresponding to the plurality of trained preset initial sleep quality prediction models respectively, and determining the preset initial sleep quality prediction model corresponding to the minimum sleep quality parameter prediction error as the preset sleep quality prediction model.
[0073] Specifically, the accuracy of the plurality of preset initial sleep quality prediction models needs to be detected, and the detection method is as follows: a prediction sleep quality parameter corresponding to the sample evaluation object is estimated by using any one of the preset initial sleep quality prediction models, the root mean square error is calculated based on the prediction sleep quality parameter and the actual sleep quality parameter corresponding to the evaluation object, and the accuracy of the preset initial sleep quality prediction model is determined according to the root mean square error. The formula for calculating the root mean square error is as follows:
[0074]
[0075] wherein Z represents the root mean square error, u1, u2...ur represent the prediction sleep quality parameters, u represents the actual sleep quality parameter, and r represents the estimation times. Thus, the root mean square errors corresponding to the plurality of preset initial sleep quality prediction models can be calculated, the minimum root mean square error is determined among the root mean square errors corresponding to the plurality of preset initial sleep quality prediction models, and the preset initial sleep quality prediction model corresponding to the minimum root mean square error is determined as the preset sleep quality prediction model.
[0076] Further, after the preset sleep quality prediction model is constructed, the preset sleep quality prediction model can be used to predict the transformation quality of the sleep cross feature vector to obtain the sleep quality prediction parameter corresponding to the evaluation object.
[0077] 206, based on the sleep quality prediction parameter, the sleep quality of the evaluation object is evaluated.
[0078] Specifically, after the sleep quality prediction parameter corresponding to the evaluation object is determined, the sleep quality rating corresponding to the sleep quality prediction parameter is searched in the preset sleep quality configuration table, so as to obtain the evaluation result of the sleep quality. For example, if the sleep quality prediction parameter is 3, the sleep quality rating corresponding to the sleep quality prediction parameter 3 in the preset sleep quality configuration table is intermediate, and finally the sleep quality rating corresponding to the evaluation object is determined as intermediate.
[0079] According to the sleep quality evaluation method provided by the application, compared with the method of determining the sleep quality of a user by measuring the heart rate of the user after waking up, the sleep quality of the evaluation object is evaluated according to the basic characteristic data and the sleep attribute data of the evaluation object, so that the defect that the sleep quality cannot be accurately evaluated according to a single signal is avoided, then the conversion quality corresponding to the basic characteristic data and the sleep attribute data is predicted by using a preset sleep quality prediction model, sleep quality prediction parameters corresponding to the evaluation are obtained, the sleep quality of the evaluation object is finally evaluated based on the sleep quality prediction parameters, the situation that the sleep quality is evaluated incorrectly due to insufficient experience of the evaluation personnel is avoided, and therefore the evaluation accuracy of the sleep quality is improved, meanwhile, the sleep quality is predicted by using the preset sleep quality prediction model, the time for checking data by a person when evaluating the sleep quality is reduced, and therefore the evaluation efficiency of the sleep quality is improved.
[0080] Further, as a specific implementation of Figure 1 , the embodiment of the application provides a sleep quality evaluation device, as shown in Figure 3 , the device comprises an acquisition unit 31, a data determination unit 32, a vector determination unit 33, a prediction unit 34 and an evaluation unit 35.
[0081] The acquisition unit 31 can be used to acquire the basic characteristic data and the sleep attribute data of an evaluation object.
[0082] The data determination unit 32 can be used to determine the time sequence characteristic data of the evaluation object during sleep based on the sleep attribute data.
[0083] The vector determination unit 33 can be used to determine the basic attribute characteristic vector corresponding to the basic characteristic data and determine the sleep time sequence characteristic vector corresponding to the time sequence characteristic data.
[0084] The prediction unit 34 can be used to input the basic attribute characteristic vector and the sleep time sequence characteristic vector into a preset sleep quality prediction model, and predict the conversion quality corresponding to the basic attribute characteristic vector and the sleep time sequence characteristic vector by using the preset sleep quality prediction model, so as to obtain sleep quality prediction parameters corresponding to the evaluation object.
[0085] The evaluation unit 35 can be used to evaluate the sleep quality of the evaluation object based on the sleep quality prediction parameters.
[0086] In a specific application scenario, in order to determine the basic attribute characteristic vector and the sleep time sequence characteristic vector, as shown in Figure 4 , the vector determination unit 33 comprises a determination module 331 and a feature extraction module 332.
[0087] The determination module 331 can be configured to determine each first character included in the basic feature data, and determine each second character included in the timing feature data.
[0088] The determination module 331 can be further configured to determine a first embedding vector corresponding to each first character, and determine a second embedding vector corresponding to each second character.
[0089] The feature extraction module 332 can be configured to input the first embedding vector into a preset feature extraction model for feature extraction, to obtain a basic attribute feature vector corresponding to the basic feature data.
[0090] The feature extraction module 332 can be further configured to input the second embedding vector into the preset feature extraction model for feature extraction, to obtain a sleep timing feature vector corresponding to the timing feature data.
[0091] In a specific application scenario, in order to perform conversion quality prediction, the prediction unit 34 includes a cross processing module 341 and a prediction module 342.
[0092] The cross processing module 341 can be configured to perform vector cross processing on the basic attribute feature vector and the sleep timing feature vector, to obtain a sleep cross feature vector.
[0093] The prediction module 342 can be configured to input the sleep cross feature vector into a preset sleep quality prediction model for conversion quality prediction.
[0094] In a specific application scenario, in order to perform cross processing on the basic attribute feature vector and the sleep timing feature vector, the cross processing module 341 includes a feature cross processing submodule, an element cross processing submodule, a high-order cross processing submodule, and a transformation processing submodule.
[0095] The feature cross processing submodule can be configured to perform feature cross processing on the basic attribute feature vector and the sleep timing feature vector, to obtain a first processing result.
[0096] The element cross processing submodule can be configured to perform element cross processing on the basic attribute feature vector and the sleep timing feature vector, to obtain a second processing result.
[0097] The high-order cross processing submodule can be configured to perform high-order cross processing on the basic attribute feature vector and the sleep timing feature vector, to obtain a third processing result.
[0098] The transformation processing submodule can be configured to perform transformation processing on the first processing result, the second processing result and the third processing result by using a preset transformation function to obtain a sleep cross feature vector.
[0099] In a specific application scenario, in order to construct the preset sleep quality prediction model, the device further includes a construction unit 36, a training unit 37 and a test unit 38.
[0100] The construction unit 36 can be configured to construct a plurality of preset initial sleep quality prediction models.
[0101] The acquisition unit 31 can also be configured to acquire sample basic feature data and sample sleep attribute data of a sample evaluation object, and acquire an actual sleep quality parameter corresponding to the sample evaluation object.
[0102] The training unit 37 can be configured to construct a training set and a test set based on the sample basic feature data, sample sleep attribute data and actual sleep quality parameter, and train the plurality of preset initial sleep quality prediction models by using the training set to obtain a plurality of trained preset initial sleep quality prediction models.
[0103] The test unit 38 can be configured to test the plurality of trained preset initial sleep quality prediction models by using the test set to obtain a test result, and determine the preset sleep quality prediction model based on the test result.
[0104] In a specific application scenario, in order to select a preset sleep quality prediction model from the plurality of preset initial sleep quality prediction models, the test unit 38 can specifically be configured to estimate sleep quality prediction parameters of a sample evaluation personnel in the test set by using the plurality of trained preset initial sleep quality prediction models to obtain prediction sleep quality parameters respectively corresponding to the plurality of trained preset initial sleep quality prediction models; determine sleep quality parameter estimation errors respectively corresponding to the plurality of trained preset initial sleep quality prediction models based on actual sleep quality parameters of the sample evaluation personnel in the test set and the prediction sleep quality parameters; determine a minimum sleep quality parameter estimation error in the sleep quality parameter estimation errors respectively corresponding to the plurality of trained preset initial sleep quality prediction models, and determine a preset initial sleep quality prediction model corresponding to the minimum sleep quality parameter estimation error as the preset sleep quality prediction model.
[0105] In a specific application scenario, in order to acquire sleep attribute data of an evaluation object, the acquisition unit 31 can specifically be configured to collect sleep attribute data of the evaluation object by using a wearable electrocardiogram monitoring device.
[0106] It should be noted that other corresponding descriptions of the functions of the sleep quality evaluation device provided by the embodiments of the present application are described in the corresponding descriptions of the methods shown in the above Figure 1 The corresponding descriptions of the methods shown in the above are not described here.
[0107] Based on the above method as shown in Figure 1 Correspondingly, the embodiments of the present application also provide a computer readable storage medium, which stores a computer program, and the program is executed by a processor to realize the following steps: obtaining basic feature data and sleep attribute data of an evaluation object; determining time sequence feature data of the evaluation object during sleep based on the sleep attribute data; determining a basic attribute feature vector corresponding to the basic feature data, and determining a sleep time sequence feature vector corresponding to the time sequence feature data; inputting the basic attribute feature vector and the sleep time sequence feature vector into a preset sleep quality prediction model, and predicting a conversion quality corresponding to the basic attribute feature vector and the sleep time sequence feature vector by using the preset sleep quality prediction model, to obtain a sleep quality prediction parameter corresponding to the evaluation object; and evaluating the sleep quality of the evaluation object based on the sleep quality prediction parameter.
[0108] Based on the above method as shown in Figure 1 and the device as shown in Figure 3 The embodiments of the present application also provide a physical structure diagram of a computer device, as shown in Figure 5 The computer device comprises a processor 41, a memory 42, and a computer program stored in the memory 42 and executable on the processor, wherein the memory 42 and the processor 41 are both arranged on a bus 43, and the processor 41 realizes the following steps when executing the program: obtaining basic feature data and sleep attribute data of an evaluation object; determining time sequence feature data of the evaluation object during sleep based on the sleep attribute data; determining a basic attribute feature vector corresponding to the basic feature data, and determining a sleep time sequence feature vector corresponding to the time sequence feature data; inputting the basic attribute feature vector and the sleep time sequence feature vector into a preset sleep quality prediction model, and predicting a conversion quality corresponding to the basic attribute feature vector and the sleep time sequence feature vector by using the preset sleep quality prediction model, to obtain a sleep quality prediction parameter corresponding to the evaluation object; and evaluating the sleep quality of the evaluation object based on the sleep quality prediction parameter.
[0109] Through the technical scheme of the present application, the basic feature data and sleep attribute data of an evaluation object are acquired, and based on the sleep attribute data, time sequence feature data of the evaluation object during sleep is determined; at the same time, a basic attribute feature vector corresponding to the basic feature data is determined, and a sleep time sequence feature vector corresponding to the time sequence feature data is determined; then the basic attribute feature vector and the sleep time sequence feature vector are jointly input into a preset sleep quality prediction model, and the preset sleep quality prediction model is used to predict the conversion quality corresponding to the basic attribute feature vector and the sleep time sequence feature vector, so as to obtain a sleep quality prediction parameter corresponding to the evaluation object; finally, the sleep quality of the evaluation object is evaluated based on the sleep quality prediction parameter, so that the conversion quality corresponding to the basic feature data and the sleep attribute data is predicted by using the preset sleep quality prediction model to obtain the sleep quality prediction parameter corresponding to the evaluation, and finally the sleep quality of the evaluation object is evaluated based on the sleep quality prediction parameter, which can avoid the situation that the sleep quality is evaluated incorrectly due to insufficient experience of the evaluation personnel, thereby improving the evaluation accuracy of the sleep quality, and at the same time, the sleep quality is predicted by using the preset sleep quality prediction model, which can reduce the time for checking data when the sleep quality is evaluated manually, so that the evaluation efficiency of the sleep quality is improved.
[0110] Obviously, those skilled in the art should understand that the modules or steps of the present application described above can be realized by general computing devices, which can be concentrated on a single computing device or distributed on a network composed of multiple computing devices, and alternatively, they can be realized by program codes executable by computing devices, so that they can be stored in storage devices and executed by computing devices, and in some cases, the steps shown or described herein can be executed in different order, or they can be manufactured into individual integrated circuit modules or a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.
[0111] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method of assessing sleep quality, characterized in that, The method comprises the following steps: obtaining basic feature data and sleep attribute data of an evaluation object; determining time sequence feature data of the evaluation object during sleep based on the sleep attribute data, wherein the time sequence feature data refers to data of electrocardiogram data and blood pressure data indexed in time dimension during sleep; determining a basic attribute feature vector corresponding to the basic feature data and a sleep time sequence feature vector corresponding to the time sequence feature data; performing feature cross processing on the basic attribute feature vector and the sleep time sequence feature vector to obtain a first processing result, performing element cross processing on the basic attribute feature vector and the sleep time sequence feature vector to obtain a second processing result, and performing high-order cross processing on the basic attribute feature vector and the sleep time sequence feature vector to obtain a third processing result; and performing transformation processing on the first processing result, the second processing result and the third processing result by using a preset transformation function to obtain a sleep cross feature vector; inputting the sleep cross feature vector into a preset sleep quality prediction model, and predicting a converted quality corresponding to the sleep cross feature vector by using the preset sleep quality prediction model to obtain a sleep quality prediction parameter corresponding to the evaluation object; evaluating the sleep quality of the evaluation object based on the sleep quality prediction parameter.
2. The method of claim 1, wherein, The method comprises the following steps: determining each first character contained in the basic feature data and each second character contained in the time sequence feature data; determining a first embedding vector corresponding to each first character and a second embedding vector corresponding to each second character; inputting the first embedding vector into a preset feature extraction model for feature extraction to obtain a basic attribute feature vector corresponding to the basic feature data; inputting the second embedding vector into the preset feature extraction model for feature extraction to obtain a sleep time sequence feature vector corresponding to the time sequence feature data.
3. The method of claim 1, wherein, Before the sleep cross feature vector is inputted into the preset sleep quality prediction model, the method further comprises the following steps: constructing a plurality of preset initial sleep quality prediction models; obtaining sample basic feature data and sample sleep attribute data of a sample evaluation object, and obtaining an actual sleep quality parameter corresponding to the sample evaluation object; based on the sample basic feature data, the sample sleep attribute data and the actual sleep quality parameter, constructing a training set and a test set, and training the plurality of preset initial sleep quality prediction models by using the training set to obtain a plurality of trained preset initial sleep quality prediction models; testing the plurality of trained preset initial sleep quality prediction models by using the test set to obtain a test result, and determining the preset sleep quality prediction model based on the test result.
4. The method of claim 3, wherein, The method comprises the following steps: The sleep quality prediction parameters of the sample evaluators in the test set are estimated by using the plurality of trained preset initial sleep quality prediction models, to obtain predicted sleep quality parameters corresponding to the plurality of trained preset initial sleep quality prediction models respectively; Based on the actual sleep quality parameters and the predicted sleep quality parameters of the sample evaluators in the test set, sleep quality parameter estimation errors corresponding to the plurality of trained preset initial sleep quality prediction models respectively are determined. The method comprises the following steps: The minimum sleep quality parameter estimation error is determined from the sleep quality parameter estimation errors corresponding to the plurality of trained preset initial sleep quality prediction models respectively, and the preset initial sleep quality prediction model corresponding to the minimum sleep quality parameter estimation error is determined as the preset sleep quality prediction model.
5. The method of claim 1, wherein, The sleep attribute data of an evaluation object is acquired, comprising: The sleep attribute data of the evaluation object is collected by using a wearable electrocardio monitoring device.
6. A sleep quality assessment device, characterized in that, Comprise: An acquisition unit is configured to acquire basic feature data and sleep attribute data of an evaluation object; A data determination unit is configured to determine time sequence feature data of the evaluation object during sleep based on the sleep attribute data, wherein the time sequence feature data refers to data of electrocardio data and blood pressure data indexed in a time dimension during sleep; A vector determination unit is configured to determine a basic attribute feature vector corresponding to the basic feature data, and determine a sleep time sequence feature vector corresponding to the time sequence feature data; A prediction unit is configured to perform feature cross processing on the basic attribute feature vector and the sleep time sequence feature vector to obtain a first processing result, perform element cross processing on the basic attribute feature vector and the sleep time sequence feature vector to obtain a second processing result, perform high-order cross processing on the basic attribute feature vector and the sleep time sequence feature vector to obtain a third processing result, perform transformation processing on the first processing result, the second processing result and the third processing result by using a preset transformation function to obtain a sleep cross feature vector, input the sleep cross feature vector into a preset sleep quality prediction model, and predict a converted quality corresponding to the sleep cross feature vector by using the preset sleep quality prediction model to obtain sleep quality prediction parameters corresponding to the evaluation object; An evaluation unit is configured to evaluate sleep quality of the evaluation object based on the sleep quality prediction parameters.
7. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 5.
8. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 5.
Citation Information
Patent Citations
Sleep quality evaluation method and device for portable intelligent wearable equipment
CN110037653A
Sleep quality evaluation method and device thereof, electronic equipment and medium
CN110558934A
Sleep quality prediction method and device
CN111489019A