Wake-up and sleep detection method, device, equipment and storage medium based on physiological signals

Through the neural network model based on physiological signals, feature vectors are extracted and wake-sleep detection sequences are generated, which solves the problem of the inability of existing technology to accurately analyze sleep status, achieving precise analysis of sleep status and improving the accuracy of heart function monitoring.

CN114699040BActive Publication Date: 2024-10-18SOUTH CHINA NORMAL UNIV
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202210156199.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-21
Publication Date
2024-10-18
Estimated Expiration
2042-02-21

AI Technical Summary

Technical Problem

Existing piezoelectric sensing sleep monitoring methods cannot accurately analyze sleep status, especially for target groups with many short-duration awakening segments, and cannot effectively distinguish between sleep and wake states, affecting the cardiac function monitoring and monitoring of patients with sleep apnea syndrome. Cardiovascular disease prevention.

Method used

Based on physiological signals, respiratory signals, ballistocardiogram signals and body movement signals are extracted at different time scales, feature vectors are calculated, and neural network models are used for training to generate wake and sleep detection sequences and labels, and obtain accurate sleep state analysis based on thresholds.

Benefits of technology

It achieves precise analysis of sleep status, can effectively identify awakening and sleep status, improves the accuracy of heart function monitoring in patients with sleep apnea syndrome, and promotes the prevention of cardiovascular diseases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114699040B_ABST
    Figure CN114699040B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of signal processing technology, and in particular to a method, device, equipment and storage medium for waking and sleeping detection based on physiological signals. Based on physiological signals, corresponding feature vectors of a user at different time scales are obtained, a neural network model is trained according to the feature vectors, and the corresponding waking and sleeping detection sequences at different time scales output by the trained neural network model are obtained. According to a preset first waking and sleeping detection threshold, each waking and sleeping detection vector in the waking and sleeping detection sequence is marked with a waking and sleeping label. According to the waking and sleeping labels corresponding to each waking and sleeping detection vector, the waking and sleeping detection results of the user are accurately obtained, so that the user's sleep state can be effectively analyzed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of signal processing technology, and in particular to a method, device, equipment and storage medium for detecting wakefulness or sleepiness based on physiological signals. Background Art

[0002] Sleep apnea syndrome is a common sleep disorder in which patients stop breathing many times during sleep, and in severe cases the number can reach hundreds of times. This will cause severe hypoxia of the brain and other organs of the human body, thereby increasing the risk of major dangerous diseases such as hypertension, coronary heart disease, and arrhythmia. Reports have shown that sleep breathing disorders are closely related to the induction of cardiovascular diseases. If people with sleep apnea syndrome are monitored for heart function as early as possible, this will be of great significance for the prevention of subsequent cardiovascular disease events and subsequent treatment of patients;

[0003] For a target population with many short awakening segments during sleep, when the existing piezoelectric sensing sleep monitoring method is used to analyze the sleep state of the target population, the short awakening segments are often judged as the sleep state, and the sleep state of the target population cannot be accurately and effectively analyzed. Summary of the invention

[0004] Based on this, the purpose of the present invention is to provide a method, device, equipment and storage medium for wake-up and sleep detection based on physiological signals, obtain corresponding feature vectors of the user at different time scales based on physiological signals, train a neural network model according to the feature vectors, obtain the corresponding wake-up and sleep detection sequences at different time scales output by the trained neural network model, and mark each wake-up and sleep detection vector in the wake-up and sleep detection sequence with a wake-up and sleep label according to a preset first wake-up and sleep detection threshold, and accurately obtain the user's wake-up and sleep detection results according to the wake-up and sleep labels corresponding to each wake-up and sleep detection vector, so as to effectively analyze the user's sleep state.

[0005] In a first aspect, an embodiment of the present application provides a method for detecting wakefulness or sleepiness based on physiological signals, comprising the following steps:

[0006] Acquire a user's physiological signal, and extract a respiratory signal, a ballistocardiogram signal, and a body movement signal at a plurality of different time scales from the physiological signal according to a plurality of preset different time scales;

[0007] Acquire feature vectors corresponding to the respiratory signal, the ballistocardiogram signal and the body motion signal at several different time scales, wherein the feature vectors include heart rate features, respiratory rate features, heart rate-respiratory rate correlation coefficients and body motion features;

[0008] Inputting the feature vectors at the same time scale into a preset neural network model, performing forward propagation training and backward propagation training on the neural network model, updating the weights of the neural network model according to the results of the backward propagation training, and obtaining a trained neural network model;

[0009] Inputting the feature vectors corresponding to the plurality of different time scales into the trained neural network model to obtain the wake-up and sleep-down detection sequences corresponding to the plurality of different time scales, wherein the wake-up and sleep-down detection sequences include a plurality of wake-up and sleep-down detection vectors;

[0010] According to the value corresponding to each wake-up and sleep detection vector in the wake-up and sleep detection sequences corresponding to the plurality of different time scales and a preset first wake-up and sleep detection threshold, obtaining a wake-up and sleep label corresponding to each wake-up and sleep detection vector in the wake-up and sleep detection sequences corresponding to the plurality of different time scales, wherein the wake-up and sleep label includes an awakening label and a sleeping label;

[0011] The number of awakening labels and the number of sleeping labels corresponding to each awakening and sleeping detection vector in the awakening and sleeping detection sequences corresponding to the plurality of different time scales are obtained, and the awakening and sleeping detection result is obtained according to the number of awakening labels and the number of sleeping labels.

[0012] In a second aspect, an embodiment of the present application provides a wake-up and sleep-down detection device based on physiological signals, comprising:

[0013] A signal acquisition module, used to acquire the user's physiological signals, and extract a respiratory signal, a ballistocardiogram signal and a body movement signal at a plurality of different time scales from the physiological signals according to a plurality of preset different time scales;

[0014] A feature vector acquisition module, used to acquire feature vectors corresponding to the respiratory signal, the ballistocardiogram signal and the body motion signal at several different time scales, wherein the feature vectors include heart rate features, respiratory rate features, heart rate-respiratory rate correlation coefficients and body motion features;

[0015] A model training module, used to input the feature vectors at the same time scale into a preset neural network model, perform forward propagation training and backward propagation training on the neural network model, update the weight of the neural network model according to the result of the backward propagation training, and obtain a trained neural network model;

[0016] A detection sequence acquisition module, used to input the feature vectors corresponding to the several different time scales into the trained neural network model to obtain the wake-sleep detection sequences corresponding to the several different time scales, wherein the wake-sleep detection sequence includes several wake-sleep detection vectors;

[0017] a label acquisition module, configured to acquire, according to the value corresponding to each wake-up and sleep detection vector in the wake-up and sleep detection sequences corresponding to the plurality of different time scales and a preset first wake-up and sleep detection threshold, a wake-up and sleep label corresponding to each wake-up and sleep detection vector in the wake-up and sleep detection sequences corresponding to the plurality of different time scales, wherein the wake-up and sleep labels include wakefulness labels and sleep labels;

[0018] The detection module is used to obtain the number of awakening labels and the number of sleeping labels corresponding to each awakening and sleeping detection vector in the awakening and sleeping detection sequences corresponding to the several different time scales, and obtain the awakening and sleeping detection results according to the number of awakening labels and the number of sleeping labels.

[0019] In a third aspect, an embodiment of the present application provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the method for waking or sleeping based on physiological signals as described in the first aspect are implemented.

[0020] In a fourth aspect, an embodiment of the present application provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the wake-up and sleep detection method based on physiological signals as described in the first aspect are implemented.

[0021] In an embodiment of the present application, a method, apparatus, device and storage medium for waking and sleeping detection based on physiological signals are provided. Based on the physiological signals, feature vectors corresponding to the user at different time scales are obtained, a neural network model is trained according to the feature vectors, and the corresponding waking and sleeping detection sequences at different time scales output by the trained neural network model are obtained. According to a preset first waking and sleeping detection threshold, each waking and sleeping detection vector in the waking and sleeping detection sequence is marked with a waking and sleeping label. According to the waking and sleeping labels corresponding to each waking and sleeping detection vector, the waking and sleeping detection results of the user are accurately obtained, so that the user's sleep state can be effectively analyzed.

[0022] For better understanding and implementation, the present invention is described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 A schematic diagram of a flow chart of a method for detecting wakefulness and sleepiness based on physiological signals provided in one embodiment of the present application;

[0024] Figure 2 A schematic diagram of S1 in the process of a method for detecting wakefulness and sleepiness based on physiological signals provided in one embodiment of the present application;

[0025] Figure 3 A schematic diagram of S104 in the process of a method for detecting wakefulness and sleepiness based on physiological signals provided in one embodiment of the present application;

[0026] Figure 4 A schematic diagram of S2 in the process of a method for detecting wakefulness and sleepiness based on physiological signals provided in one embodiment of the present application;

[0027] Figure 5 A schematic diagram of the process of S3 in the method for detecting wakefulness and sleepiness based on physiological signals provided in one embodiment of the present application;

[0028] Figure 6 A flowchart of a method for detecting wakefulness or sleepiness based on physiological signals provided in another embodiment of the present application;

[0029] Figure 7 A schematic diagram of the structure of a wake-up and sleep-down detection device based on physiological signals provided in one embodiment of the present application;

[0030] Figure 8 A schematic diagram of the structure of a computer device provided for one embodiment of the present application. DETAILED DESCRIPTION

[0031] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0032] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0033] It should be understood that, although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" / "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determination".

[0034] See also Figure 1 , Figure 1 A flowchart of a method for detecting sleep and wakefulness based on physiological signals is provided in accordance with an embodiment of the present application. The method comprises the following steps:

[0035] S1: Acquire a physiological signal of a user, and extract a respiratory signal, a ballistocardiogram signal, and a body movement signal at a plurality of different time scales from the physiological signal according to a plurality of preset different time scales.

[0036] The executor of the wake-up and sleep-detection method based on physiological signals is a detection device of the wake-up and sleep-detection method based on physiological signals (hereinafter referred to as the detection device). In an optional embodiment, the detection device can be a computer device, a server, or a server cluster composed of multiple computer devices.

[0037] The detection device can obtain the user's physiological signals by querying in a preset database, or by using a photoelectric volumetric pulse wave sensor or an acceleration sensor.

[0038] In this embodiment, the detection device performs filtering processing on the physiological signal by filtering and adopts 10 seconds, 20 seconds and 30 seconds as the time scale, and extracts the respiratory signal, the ballistocardiogram signal and the body movement signal from the physiological signal.

[0039] Since there are interferences such as aliased respiratory noise, power frequency noise and motion artifacts in the physiological signals, and since the energy of Gaussian noise and power frequency noise in the physiological signals is above 20Hz, the detection equipment uses a filter to remove the power frequency interference and baseline offset in the physiological signals before extracting the respiratory signal, the ballistocardiogram signal and the body movement signal, and obtains the processed physiological signal, so as to better separate the respiratory signal, the ballistocardiogram signal and the body movement signal from the physiological signal.

[0040] See also Figure 2 , Figure 2 The schematic diagram of S1 in the process of the method for waking and sleeping detection based on physiological signals provided in one embodiment of the present application includes steps S101 to S103, which are specifically as follows:

[0041] S101: resampling the physiological signals at the multiple different time scales to obtain the resampled physiological signals at the multiple different time scales.

[0042] In this embodiment, the detection device first resamples the acquired physiological signal of the user to 100 Hz, and obtains the physiological signals of several different time scales after resampling, so as to improve the operation speed without distorting the signal.

[0043] S102: Acquire respiratory signals at several different time scales according to the resampled physiological signals at several different time scales.

[0044] Since the energy of physiological signals is mainly between 0 and 50 Hz, the energy spectrum of respiratory signals is between 0.01 and 1 Hz, and the energy spectrum of ballistocardiogram signals is mainly between 1 and 10 Hz, the detection device can filter the physiological signals to separate the respiratory signals.

[0045] In this embodiment, the detection device uses a low-pass filter according to the physiological signals of several different time scales after resampling.

[0046] S103: Acquire a plurality of first physiological signals at different time scales according to the resampled physiological signals at a plurality of different time scales and a preset first wavelet function as the ballistocardiogram signals at a plurality of different time scales.

[0047] In this embodiment, the detection device adopts a wavelet filtering method to obtain a plurality of ballistocardiogram signals of different time scales according to the resampled physiological signals of the plurality of different time scales and a preset first wavelet function, wherein the first wavelet function is an approximately symmetrical compact support set orthogonal wavelet function sym, the vanishing moment is set to 8, the decomposition level is set to 3,

[0048] The detection device obtains the first high-frequency detail coefficient group and the first low-frequency approximation coefficient group of the physiological signals of several different time scales after resampling corresponding to each decomposition layer according to the first wavelet function, sets the first low-frequency approximation coefficient group to zero, reconstructs the physiological signals of several different time scales after resampling according to the first high-frequency detail coefficient group, and obtains the reconstructed first physiological signals of several different time scales as the heart ballistogram signal, thereby obtaining the heart ballistogram signals of several different time scales.

[0049] S104: acquiring a plurality of second physiological signals at different time scales according to the resampled physiological signals at a plurality of different time scales and a preset second wavelet function, and acquiring a plurality of body motion signals at different time scales according to the plurality of second physiological signals at different time scales.

[0050] In this embodiment, the detection device adopts a wavelet filtering method, and obtains the reconstructed physiological signals of several different time scales according to the resampled physiological signals of several different time scales and the preset second wavelet function, and obtains the body motion signals of several different time scales according to the reconstructed physiological signals of several different time scales and the preset body motion signal threshold, wherein the second wavelet function is an approximately symmetrical compact support set orthogonal wavelet function sym, the vanishing moment is set to 8, and the decomposition level is set to 10;

[0051] The detection device obtains the second high-frequency detail coefficient group and the second low-frequency approximation coefficient group of the physiological signals of several different time scales after resampling corresponding to each decomposition layer according to the second wavelet function, sets the second high-frequency detail coefficient value and the second low-frequency approximation signal group corresponding to the last layer of the decomposition layer to zero, reconstructs the physiological signals of several different time scales after resampling according to the second high-frequency detail coefficient group and the second low-frequency approximation coefficient group, obtains the reconstructed second physiological signals of several different time scales, and obtains body motion signals of several different time scales according to the second physiological signals of several different time scales and a preset body motion signal threshold.

[0052] See also Figure 3 , Figure 3 The schematic diagram of S104 in the process of the method for waking and sleeping detection based on physiological signals provided in one embodiment of the present application includes steps S1041 to S1043, which are specifically as follows:

[0053] S1041: Obtain a mean value and a standard value of the second physiological signal, and obtain a second physiological signal after standardization according to the mean value, the standard value and a standardization formula of the second physiological signal.

[0054] The standardized formula is:

[0055]

[0056] Wherein, data is the value corresponding to each vector in the second physiological signal, mean_data is the mean value of the second physiological signal, and std_data is the standard value of the second physiological signal;

[0057] In this embodiment, the detection device respectively obtains the mean value and the standard value corresponding to the reconstructed second physiological signals of several different time scales, subtracts the value corresponding to each vector in the reconstructed second physiological signals of several different time scales from the mean value corresponding to the same time scale of the reconstructed second physiological signals, obtains the difference result, and obtains the second physiological signals of several different time scales after standardization according to the standard value and the standardization formula.

[0058] S1042: According to the second physiological signal after difference and a preset unit time, obtain a vector corresponding to the maximum value of the second physiological signal after difference within a unit time, and construct a maximum value array; obtain the maximum value and mean of the maximum value array, and obtain the first body motion signal detection value corresponding to the standardized second physiological signal within the unit time according to the maximum value, mean and first body motion signal detection value calculation formula of the maximum value array.

[0059] The calculation formula of the first body motion signal detection value is:

[0060] q = abs(max_df / mean_df)

[0061] Wherein, q is the first body motion signal detection value, max_df is the maximum value of the maximum value array, and mean_df is the mean value of the maximum value array;

[0062] In this embodiment, the detection device obtains, according to a preset unit time, from the second physiological signals of several different time scales after the standardized processing, vectors corresponding to the maximum values ​​in the second physiological signals of several different time scales after the standardized processing, respectively, constructs maximum value arrays of the second physiological signals of several different time scales after the standardized processing, and obtains the maximum value and mean of the maximum value arrays of the second physiological signals of several different time scales after the standardized processing; according to the first body motion signal detection value calculation formula, the maximum value and mean of the maximum value array of the second physiological signal of the same time scale after the standardized processing are divided and the absolute value is taken to obtain the first body motion signal detection value corresponding to the standardized second physiological signals of several different time scales within the unit time.

[0063] S1043: According to the first body movement signal detection value and the preset body movement signal detection start threshold, respond to the body movement signal detection instruction, obtain the value of each vector in the maximum value array, obtain a plurality of target vectors from the maximum value array according to the preset body movement signal threshold, construct a target vector set, obtain a plurality of vectors corresponding to the target vector from the second physiological signal according to the target vector set, combine the plurality of vectors corresponding to the target vector, and obtain the body movement signal.

[0064] In this embodiment, when the first body motion signal detection value is greater than or equal to the preset body motion signal detection start threshold, the generation of a body motion signal detection instruction is triggered, and the detection device responds to the body motion signal detection instruction, obtains the value corresponding to each vector in the maximum value array of the second physiological signal at several different time scales after the standardized processing as the second body motion signal detection value, compares the second body motion signal detection value with the body motion signal threshold, obtains the vector corresponding to the second body motion signal detection value greater than the body motion signal threshold from the maximum value array as the target vector, thereby obtaining the target vector in the maximum value array of the second physiological signal at several different time scales after the standardized processing, constructs a target vector set, and according to the target vector set corresponding to the second physiological signal at several different time scales after the standardized processing, obtains several vectors corresponding to the target vector at the same time scale from the second physiological signal at several different time scales after the standardized processing, combines the several vectors at the same time scale as the body motion signal at the time scale, thereby obtaining body motion signals at several different time scales.

[0065] Among them, the detection device obtains the mode of the maximum value array of the second physiological signal at several different time scales after the standardized processing as the body motion signal threshold, and after constructing the target vector set, obtains the mode of the target vector according to the target vector in the target vector set, updates the body motion signal threshold, and repeats the above steps of constructing the target vector set until the body motion signal threshold is no longer updated.

[0066] S2: Obtaining feature vectors corresponding to the respiratory signal, the ballistocardiogram signal and the body movement signal at several different time scales.

[0067] The feature vector includes heart rate features, breathing rate features, heart rate and breathing rate correlation coefficients, and body movement features.

[0068] In this embodiment, the detection device obtains the heart rate characteristics, respiratory rate characteristics, heart rate-respiratory rate correlation coefficients and body movement characteristics corresponding to the respiratory signal, ballistocardiogram signal and body movement signal at several different time scales.

[0069] See also Figure 4 , Figure 4 The schematic diagram of S2 in the process of the method for detecting wakefulness and sleepiness based on physiological signals provided in one embodiment of the present application includes steps S201 to S205, which are specifically as follows:

[0070] S201: Obtain differential, square sum, and integral parameters corresponding to the respiratory signal and the ballistocardiogram signal, and obtain peak point positioning results corresponding to the respiratory signal and the ballistocardiogram signal respectively according to the differential, square sum, and integral parameters corresponding to the respiratory signal and the ballistocardiogram signal.

[0071] The detection device obtains the differential, square sum, and integral parameters corresponding to the respiratory signal and the ballistocardiogram signal. In one embodiment, the detection device divides the respiratory signal and the ballistocardiogram signal into a plurality of windows according to the data length of the respiratory signal, the data length of the ballistocardiogram signal, and a preset unit data length, and performs differential calculation on the data in the plurality of windows of the respiratory signal, that is, calculates the slope of two adjacent points, thereby obtaining the differential parameters of the respiratory signal. Perform differential calculation on the data in the plurality of windows of the ballistocardiogram signal, thereby obtaining the differential parameters of the ballistocardiogram signal;

[0072] Performing square sum calculations on the data in several windows of the respiratory signal and the data in several windows of the ballistocardiogram signal respectively, to obtain square sum parameters of the respiratory signal and the square sum parameters of the ballistocardiogram signal;

[0073] Performing integral calculation according to the square sum parameter of the respiratory signal and the square sum parameter of the ballistocardiogram signal, wherein the integral parameter corresponds to the area of ​​the respiratory signal and the ballistocardiogram signal, and thus it is only necessary to approximately calculate the area formed by two adjacent points in the respiratory signal and the ballistocardiogram signal and the coordinate axis, thereby obtaining the integral parameter of the respiratory signal and the integral parameter of the ballistocardiogram signal;

[0074] According to the differential, square sum, and integral parameters corresponding to the respiratory signal and the ballistocardiogram signal, the respiratory signal and the ballistocardiogram signal are respectively subjected to "micro-shift" processing to obtain the respiratory signal and the ballistocardiogram signal after "micro-shift" processing, which are used to increase the value of the data of the peak part in the respiratory signal and the ballistocardiogram signal, and reduce the value of the data except the peak part, which is beneficial to subsequent peak detection.

[0075] Peak point positioning is performed according to the respiratory signal and the ballistocardiogram signal processed by the "micro-shift method", and peak point positioning results corresponding to the respiratory signal and the ballistocardiogram signal are obtained, wherein the peak point positioning results include peak points.

[0076] S202: According to the peak point positioning results corresponding to the respiratory signal and the ballistocardiogram signal, respectively obtain the peak point intervals corresponding to the respiratory signal and the ballistocardiogram signal, and according to the peak point intervals and the rate value calculation algorithm, obtain the respiratory rate data corresponding to the respiratory signal and the heart rate data corresponding to the ballistocardiogram signal.

[0077] The rate calculation algorithm includes a respiratory rate calculation algorithm and a heart rate calculation algorithm, wherein the respiratory rate calculation algorithm is:

[0078] breath_rate=60 / rri_breath

[0079] Wherein, breath_rate is the breathing rate, and rri_breath is the peak point interval corresponding to the breathing signal;

[0080] The heart rate calculation algorithm is:

[0081] heart_rate=60 / rri_heart

[0082] Wherein, heart_rate is the heart rate, rri_heart is the peak point interval corresponding to the respiratory signal;

[0083] In this embodiment, the detection device obtains the peak point intervals corresponding to the respiratory signal and the ballistocardiogram signal respectively based on the peak point positioning results corresponding to the respiratory signal and the ballistocardiogram signal, obtains the respiratory rate data corresponding to the respiratory signal based on the peak point interval corresponding to the respiratory signal and the respiratory rate calculation algorithm, and obtains the heart rate data corresponding to the ballistocardiogram signal based on the peak point interval corresponding to the ballistocardiogram signal and the heart rate calculation algorithm.

[0084] S203: Obtain numerical parameters corresponding to the respiratory rate data and the heart rate data as the respiratory rate characteristics and the heart rate characteristics.

[0085] The numerical parameters include cumulative difference, mean, standard deviation, maximum value, minimum value, peak-to-valley difference and energy value.

[0086] In this embodiment, the detection device obtains the cumulative difference, mean, standard deviation, maximum value, minimum value, peak-to-valley difference and energy value corresponding to the respiratory rate data as the respiratory rate feature based on the respiratory rate data, and obtains the cumulative difference, mean, standard deviation, maximum value, minimum value, peak-to-valley difference and energy value corresponding to the heart rate data as the heart rate feature based on the heart rate data.

[0087] S204: Obtaining a cross-correlation coefficient between the respiratory rate data and the heart rate data according to the respiratory rate data, the heart rate data and a preset cross-correlation coefficient calculation algorithm.

[0088] Since the heart rate and the respiratory rate show a mutually influential relationship during sleep, in this embodiment, the detection device obtains the mutual correlation coefficient of the respiratory rate data and the heart rate data according to the respiratory rate data, the heart rate data and a preset mutual correlation coefficient calculation algorithm, wherein the mutual correlation coefficient calculation algorithm is:

[0089]

[0090] Wherein, R is the mutual correlation coefficient, Cov(rate_heart, rate_breath) is the covariance of the respiratory rate data and the heart rate data, Var|rate_heart| is the variance of the heart rate data, and Var|rate_breath| is the variance of the respiratory rate data.

[0091] S205: Obtain the number of vectors of the second physiological signal after the standardization processing and the number of vectors of the body motion signal, and obtain the body motion duty cycle as the body motion feature based on the number of vectors of the second physiological signal after the standardization processing and the number of vectors of the body motion signal.

[0092] In this embodiment, the detection device obtains the number of vectors of the standardized second physiological signal and the number of vectors of the body motion signal at the same time scale, and divides the number of vectors of the body motion signal by the number of vectors of the standardized second physiological signal, thereby obtaining the body motion duty cycle at each time scale as the body motion feature.

[0093] S3: Input the feature vectors at the same time scale into a preset neural network model, perform forward propagation training and backward propagation training on the neural network model, update the weights of the neural network model according to the results of the backward propagation training, and obtain a trained neural network model.

[0094] The neural network model is a dendritic neural network model, including an input layer, an intermediate layer and an output layer. The input layer, the intermediate layer and the output layer each include a number of corresponding layers, and each layer includes a weight matrix.

[0095] In this embodiment, the detection device inputs the feature vectors at the same time scale into a preset neural network model based on the feature vectors at each time scale, performs forward propagation training and backward propagation training on the neural network model according to a preset number of training times, updates the weights of the neural network model based on the results of the backward propagation training, and obtains the trained neural network model.

[0096] See also Figure 5 , Figure 5The flowchart of S3 in the method for detecting sleep and wakefulness based on physiological signals provided in one embodiment of the present application includes steps S301 to S303, which are specifically as follows:

[0097] S301: Input the feature vector at the same time scale as an input vector into the neural network model, and obtain a predicted value output by the neural network model according to a forward propagation algorithm in the neural network model.

[0098] The forward propagation algorithm is:

[0099]

[0100] f2=A L =W L,L-1 A L-1

[0101]

[0102] Wherein, f1 is the forward propagation algorithm of the input layer and output layer of the neural network model, f2 is the forward propagation algorithm of the output layer of the neural network model, f3 is the forward propagation algorithm based on the neural network model, and A l-1 is the input value of the l-1th layer of the neural network model, A l is the output value of the l-1th layer of the neural network model and serves as the input value of the lth layer. X represents the input vector of the neural network model. A L represents the output value of the output layer of the neural network model, A L-1 represents the input value of the output layer of the neural network model, W l,l-1 is the weight matrix from the l-1th layer to the lth layer of the neural network model, Y represents the predicted value of the neural network model, Represents the Hadamard product.

[0103] In this embodiment, the detection device inputs the feature vectors at the same time scale into a preset neural network model based on the feature vectors at each time scale, and obtains the predicted value of the output of the neural network model based on the forward propagation algorithm in the neural network model.

[0104] S302: Obtain a true value corresponding to the predicted value, and obtain the error value of each layer of the neural network model according to the predicted value, the true value and the error back propagation algorithm in the neural network model.

[0105] The error back propagation algorithm is:

[0106]

[0107] dAl-1 =(W 1,l-1 ) T Z l

[0108] In the formula, Z L is the error value of the output layer of the neural network model, dZ L is the partial derivative of the error value of the output layer, Z l is the error value of the middle layer of the neural network model, dZ 1 is the partial derivative of the error value of the intermediate layer, MSE is the error loss value of the neural network model; dA l-1 is the partial derivative of the input value of the l-1th layer, (W l,l-1 ) T is the transpose of the weight matrix from the l-1th layer to the lth layer of the neural network model.

[0109] The true value is data obtained by collecting multiple signals such as the subject's electrocardiogram, electromyography, electroencephalogram, electrooculography, heartbeat and respiration, and then corrected by a professional doctor. In this embodiment, the detection device obtains the true value corresponding to the predicted value, and obtains the error value of each layer of the neural network model based on the predicted value, the true value and the error back propagation algorithm in the neural network model.

[0110] S303: According to the error value of each layer of the neural network model and the weight updating algorithm in the neural network model, the weight matrix of each layer of the neural network model is updated to obtain a trained neural network model.

[0111] The weight update algorithm is:

[0112]

[0113] W l,l-1(new) =W l,l-1 -αdW l,l-1

[0114] Where m is the number of input vectors of the neural network model for each training. l-1 ) T is the transpose of the input value of the l-1th layer, dW l,l-1 is the partial derivative of the weight matrix from the l-1th layer to the lth layer of the neural network model, α is the learning rate, W l,l-1(old) represents the weight matrix from the l-1th layer to the lth layer of the neural network model when it is not updated, W l,l-1 Represents the updated weight matrix from the l-1th layer to the lth layer of the neural network model.

[0115] In this embodiment, the detection device updates the weight matrix of each layer of the neural network model according to the error value of each layer of the neural network model and the weight update algorithm in the neural network model to obtain the trained neural network model.

[0116] S4: Inputting the feature vectors corresponding to the several different time scales into the trained neural network model to obtain the wake-up and sleep-down detection sequences corresponding to the several different time scales.

[0117] In this embodiment, the detection device inputs the feature vectors corresponding to the several different time scales into the trained neural network model to obtain the corresponding wake-up and sleep-up detection sequences at the several different time scales, wherein the wake-up and sleep-up detection sequence includes several wake-up and sleep-up detection vectors.

[0118] S5: According to the value corresponding to each wake-up and sleep detection vector in the wake-up and sleep detection sequences corresponding to the several different time scales and a preset first wake-up and sleep detection threshold, obtain the wake-up and sleep label corresponding to each wake-up and sleep detection vector in the wake-up and sleep detection sequences corresponding to the several different time scales.

[0119] The wake-up and sleep-down tags include wake-up tags and sleep tags. In this embodiment, the detection device obtains the maximum value x corresponding to the wake-up and sleep-down detection sequences corresponding to each time scale. max and the minimum value x min , according to the preset first wake-sleep detection threshold calculation algorithm, the first wake-sleep detection threshold corresponding to each time scale is obtained, wherein the first wake-sleep detection threshold calculation algorithm is:

[0120]

[0121] In the formula, th pre is the first wake-sleep detection threshold, x max is the maximum value corresponding to the wake-sleep detection sequence, x min is the minimum value corresponding to the wake-sleep detection sequence;

[0122] According to the first wake-up and sleep detection threshold, the wake-up and sleep detection sequences corresponding to the various time scales are traversed respectively; when the value of the wake-up and sleep detection vector of the wake-up and sleep detection sequence corresponding to the various time scales is greater than or equal to the first wake-up and sleep detection threshold corresponding to the time scale, the wake-up and sleep label of the wake-up and sleep detection vector is set to the wakefulness label; when the value of the wake-up and sleep detection vector of the wake-up and sleep detection sequence corresponding to the various time scales is less than the first wake-up and sleep detection threshold corresponding to the time scale, the wake-up and sleep label of the wake-up and sleep detection vector is set to the sleep label, thereby obtaining the wake-up and sleep label corresponding to each wake-up and sleep detection vector in the wake-up and sleep detection sequences corresponding to the several different time scales.

[0123] In an optional embodiment, the detection device performs smoothing filtering on the wake-up and sleep-down detection sequences corresponding to the several different time scales, and obtains the wake-up and sleep-down detection sequences corresponding to the several different time scales after the smoothing filtering process, so as to improve the smoothness of the data curve and reduce the interference of noise, so as to more accurately set the wake-up and sleep-down label corresponding to each wake-up and sleep-down detection vector in the wake-up and sleep-down detection sequence.

[0124] See also Figure 6 , Figure 6 A schematic flow chart of a method for detecting sleep and wakefulness based on physiological signals provided in another embodiment of the present application includes step S7, which is before step S6 and is specifically as follows:

[0125] S7: Correct the wake-up and sleep label corresponding to each wake-up and sleep detection vector in the wake-up and sleep detection sequences corresponding to the several different time scales, and obtain the corrected wake-up and sleep label corresponding to each wake-up and sleep detection vector in the wake-up and sleep detection sequences corresponding to the several different time scales.

[0126] In this embodiment, the detection device obtains a plurality of wake-up and sleep-down detection sequence segments corresponding to the sampling time at a plurality of different time scales according to the preset sampling time and the wake-up and sleep-down detection sequences corresponding to the plurality of different time scales;

[0127] Respectively obtaining the proportion of the number of wakefulness detection vectors corresponding to the wakefulness labels in the plurality of wakefulness detection sequence segments as proportion data;

[0128] According to the first proportion data and a preset second wakefulness / sleepiness judgment threshold, obtaining wakefulness / sleepiness judgment results of the plurality of wakefulness / sleepiness detection sequence segments, wherein the wakefulness / sleepiness judgment results include a wakefulness state and a sleep state;

[0129] Obtaining a proportion of the wake-up / sleep detection sequence segments corresponding to the wakefulness state in the wake-up / sleep detection sequence segments as a third wake-up / sleep judgment threshold, and correcting the wake-up / sleep judgment results of the plurality of wake-up / sleep detection sequence segments according to the third wake-up / sleep judgment threshold and the proportion data, to obtain the corrected wake-up / sleep judgment results of the plurality of wake-up / sleep detection sequence segments;

[0130] According to the first-corrected wake-up and sleep determination results of the several wake-up and sleep detection sequence segments, the position information of the wake-up and sleep detection sequence segments corresponding to the wakefulness state after the first-corrected wake-up and sleep determination results is obtained, and according to the position information, the first-corrected wake-up and sleep determination results are secondarily corrected to obtain the second-corrected wake-up and sleep determination results of the several wake-up and sleep detection sequence segments, and according to the second-corrected wake-up and sleep determination results, the wake-up and sleep labels corresponding to the wake-up and sleep detection vectors in the several wake-up and sleep detection sequence segments are corrected to obtain the corrected wake-up and sleep labels corresponding to each wake-up and sleep detection vector in the several wake-up and sleep detection sequences corresponding to the several different time scales.

[0131] S6: Obtain the number of awakening labels and the number of sleeping labels corresponding to each awakening and sleeping detection vector in the awakening and sleeping detection sequences corresponding to the plurality of different time scales, and obtain the awakening and sleeping detection result according to the number of awakening labels and the number of sleeping labels.

[0132] The wake-up and sleep detection results include wake-up results and sleep results. In this embodiment, the detection device obtains the number of wake-up tags and the number of sleep tags corresponding to each wake-up and sleep detection vector in the wake-up and sleep detection sequences corresponding to the several different time scales. When the number of wake-up tags is greater than or equal to the number of sleep tags, the wake-up result is obtained, and the number of wake-up tags is less than the number of sleep tags, and the sleep result is obtained.

[0133] Please refer to Figure 7 , Figure 7 This is a schematic diagram of the structure of a wake-up and sleep-detection device based on physiological signals provided by an embodiment of the present application. The device can implement all or part of the wake-up and sleep-detection device based on physiological signals through software, hardware, or a combination of both. The device 7 includes:

[0134] The signal acquisition module 71 is used to acquire the physiological signal of the user, and extract the respiratory signal, the ballistocardiogram signal and the body movement signal at different time scales from the physiological signal according to the preset different time scales;

[0135] A feature vector acquisition module 72, used to acquire feature vectors corresponding to the respiratory signal, the ballistocardiogram signal and the body motion signal at several different time scales, wherein the feature vectors include heart rate features, respiratory rate features, heart rate-respiratory rate correlation coefficients and body motion features;

[0136] A model training module 73 is used to input the feature vectors at the same time scale into a preset neural network model, perform forward propagation training and backward propagation training on the neural network model, update the weight of the neural network model according to the result of the backward propagation training, and obtain a trained neural network model;

[0137] A detection sequence acquisition module 74 is used to input the feature vectors corresponding to the plurality of different time scales into the trained neural network model to obtain the wake-sleep detection sequences corresponding to the plurality of different time scales, wherein the wake-sleep detection sequence includes a plurality of wake-sleep detection vectors;

[0138] The label acquisition module 75 is used to acquire the wake-up and sleep labels corresponding to each wake-up and sleep detection vector in the wake-up and sleep detection sequences corresponding to the plurality of different time scales according to the value corresponding to each wake-up and sleep detection vector in the wake-up and sleep detection sequences corresponding to the plurality of different time scales and the preset first wake-up and sleep detection threshold, wherein the wake-up and sleep labels include wakefulness labels and sleep labels;

[0139] The detection module 76 is used to obtain the number of wakefulness labels and the number of sleep labels corresponding to each wakefulness detection vector in the wakefulness detection sequences corresponding to the plurality of different time scales, and obtain the wakefulness detection result according to the number of wakefulness labels and the number of sleep labels.

[0140] In an embodiment of the present application, a signal acquisition module is used to acquire a user's physiological signal, and according to a plurality of preset different time scales, a respiratory signal, a cardiopulmonary signal and a body movement signal at a plurality of different time scales are extracted from the physiological signal; a feature vector acquisition module is used to acquire feature vectors corresponding to the respiratory signal, the cardiopulmonary signal and the body movement signal at a plurality of different time scales, wherein the feature vectors include heart rate features, respiratory rate features, heart rate-respiratory rate correlation coefficients and body movement features; a model training module is used to input the feature vectors at the same time scale into a preset neural network model, and forward propagation training and backward propagation training are performed on the neural network model. According to the result of the backward propagation training, the weight of the neural network model is updated to acquire the trained neural network model; and a detection sequence acquisition module is used to acquire the feature vectors corresponding to the respiratory signal, the cardiopulmonary signal and the body movement signal at a plurality of different time scales. The feature vectors corresponding to the several different time scales are input into the trained neural network model to obtain the corresponding wake-sleep detection sequences at the several different time scales, wherein the wake-sleep detection sequence includes several wake-sleep detection vectors; through the label acquisition module, according to the value corresponding to each wake-sleep detection vector in the wake-sleep detection sequences corresponding to the several different time scales and a preset first wake-sleep detection threshold, the wake-sleep label corresponding to each wake-sleep detection vector in the wake-sleep detection sequences corresponding to the several different time scales is obtained, wherein the wake-sleep label includes a wakefulness label and a sleep label; through the detection module, the number of wakefulness labels and the number of sleep labels corresponding to each wake-sleep detection vector in the wake-sleep detection sequences corresponding to the several different time scales are obtained, and the wake-sleep detection result is obtained according to the number of wakefulness labels and the number of sleep labels. Based on physiological signals, the corresponding feature vectors of the user at different time scales are obtained, and a neural network model is trained according to the feature vectors to obtain the corresponding wake-up and sleep-down detection sequences at different time scales output by the trained neural network model. According to a preset first wake-up and sleep-down detection threshold, each wake-up and sleep-down detection vector in the wake-up and sleep-down detection sequence is marked with a wake-up and sleep-down label. According to the wake-up and sleep label corresponding to each wake-up and sleep-down detection vector, the user's wake-up and sleep-down detection results are accurately obtained, thereby effectively analyzing the user's sleep state.

[0141] Please refer to Figure 8 , Figure 8 The computer device 8 is a schematic diagram of a structure of a computer device provided in an embodiment of the present application. The computer device 8 includes: a processor 81, a memory 82, and a computer program 83 stored in the memory 82 and executable on the processor 81; the computer device may store multiple instructions, which are suitable for being loaded and executed by the processor 81. Figures 1 to 6 The method steps of the embodiment shown in the figure can be found in the specific implementation process. Figures 1 to 6 The specific description of the illustrated embodiment will not be repeated here.

[0142] Among them, the processor 81 may include one or more processing cores. The processor 81 uses various interfaces and lines to connect various parts in the server, and executes various functions and processes data of the wake-up and sleep detection device 7 based on physiological signals by running or executing instructions, programs, code sets or instruction sets stored in the memory 82, and calling the data in the memory 82. Optionally, the processor 81 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programble Logic Array, PLA). The processor 81 can integrate one or more combinations of a central processing unit 81 (Central Processing Unit, CPU), an image processor 81 (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the touch display; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 81, and it can be implemented by a single chip.

[0143] Among them, the memory 82 may include a random access memory 82 (Random Access Memory, RAM), and may also include a read-only memory 82 (Read-Only Memory). Optionally, the memory 82 includes a non-transitory computer-readable storage medium. The memory 82 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 82 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch instructions, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 82 may also be optionally at least one storage device located away from the aforementioned processor 81.

[0144] An embodiment of the present application also provides a storage medium, which can store multiple instructions. The instructions are suitable for being loaded by a processor and executing the method steps of the above-mentioned embodiments one to four. The specific execution process can be found in the specific descriptions of embodiments one to four, which will not be repeated here.

[0145] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0146] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0147] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraint algorithm of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0148] In the embodiments provided by the present invention, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0149] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0150] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0151] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc.

[0152] The present invention is not limited to the above-mentioned embodiments. If various changes or modifications to the present invention do not depart from the spirit and scope of the present invention, and if these changes and modifications fall within the scope of the claims and equivalent technologies of the present invention, the present invention is also intended to include these changes and modifications.

Claims

1. A method for detecting wakefulness and sleepiness based on physiological signals, characterized in that: The following steps are involved: Acquire a user's physiological signal, and extract a respiratory signal, a ballistocardiogram signal, and a body movement signal at a plurality of different time scales from the physiological signal according to a plurality of preset different time scales; Acquire feature vectors corresponding to the respiratory signal, the ballistocardiogram signal and the body motion signal at several different time scales, wherein the feature vectors include heart rate features, respiratory rate features, heart rate-respiratory rate correlation coefficients and body motion features; Inputting the feature vectors at the same time scale into a preset neural network model, performing forward propagation training and backward propagation training on the neural network model, updating the weights of the neural network model according to the results of the backward propagation training, and obtaining a trained neural network model; Inputting the feature vectors corresponding to the plurality of different time scales into the trained neural network model to obtain the wake-up and sleep-down detection sequences corresponding to the plurality of different time scales, wherein the wake-up and sleep-down detection sequences include a plurality of wake-up and sleep-down detection vectors; According to the value corresponding to each wake-up and sleep detection vector in the wake-up and sleep detection sequences corresponding to the several different time scales and the preset first wake-up and sleep detection threshold, the wake-up and sleep labels corresponding to each wake-up and sleep detection vector in the wake-up and sleep detection sequences corresponding to the several different time scales are obtained, wherein the wake-up and sleep labels include wakefulness labels and sleep labels; the first wake-up and sleep detection threshold is: In the formula, th pre is the first wake-sleep detection threshold, x max is the maximum value corresponding to the wake-sleep detection sequence, x min is the minimum value corresponding to the wake-up and sleep-down detection sequence; The number of awakening tags and the number of sleeping tags corresponding to each awakening and sleeping detection vector in the awakening and sleeping detection sequences corresponding to the several different time scales are obtained, and according to the number of awakening tags and the number of sleeping tags, when the number of awakening tags is greater than or equal to the number of sleeping tags, the awakening result is obtained, and when the number of awakening tags is less than the number of sleeping tags, the sleeping result is obtained.

2. The method for detecting wakefulness and sleepiness based on physiological signals according to claim 1, characterized in that: The method of extracting respiratory signals, ballistocardiogram signals and body motion signals at different time scales from the physiological signals according to the preset different time scales comprises the steps of: Resampling the physiological signals at the multiple different time scales to obtain the resampled physiological signals at the multiple different time scales; Acquiring respiratory signals at several different time scales according to the resampled physiological signals at several different time scales and a preset filter; According to the physiological signals of several different time scales after resampling and a preset first wavelet function, wherein the first wavelet function is an approximately symmetrical compact support orthogonal wavelet function, a first high-frequency detail coefficient group and a first low-frequency approximate coefficient group of the physiological signals of several different time scales after resampling corresponding to each decomposition layer number are obtained, the first low-frequency approximate coefficient group is set to zero, and according to the first high-frequency detail coefficient group, the physiological signals of several different time scales after resampling are reconstructed to obtain the reconstructed first physiological signals of several different time scales as the ballistocardiogram signals of the several different time scales; According to the physiological signals of several different time scales after resampling and a preset second wavelet function, wherein the second wavelet function is an approximately symmetrical compact support orthogonal wavelet function, a second high-frequency detail coefficient group and a second low-frequency approximate coefficient group of the physiological signals of several different time scales after resampling corresponding to each decomposition layer are obtained, the second high-frequency detail coefficient value and the second low-frequency approximate signal group corresponding to the last layer of the decomposition layer are set to zero, and according to the second high-frequency detail coefficient group and the second low-frequency approximate coefficient group, the physiological signals of several different time scales after resampling are reconstructed to obtain the reconstructed second physiological signals of several different time scales, and according to the second physiological signals of several different time scales and a preset body motion signal threshold, several body motion signals of different time scales are obtained.

3. The method for detecting wakefulness and sleepiness based on physiological signals according to claim 2, characterized in that: The step of acquiring body motion signals of several different time scales according to the second physiological signals of the several different time scales and the preset body motion signal threshold comprises the following steps: Obtain the mean value and the standard value of the second physiological signal, and obtain the second physiological signal after standardization according to the mean value, the standard value and the standardization formula of the second physiological signal, wherein the standardization formula is: Wherein, data is the value corresponding to each vector in the second physiological signal, mean_data is the mean value of the second physiological signal, and std_data is the standard value of the second physiological signal; According to the standardized second physiological signal and the preset unit time, a vector corresponding to the maximum value in the standardized second physiological signal within the unit time is obtained to construct a maximum value array; the maximum value and the mean of the maximum value array are obtained, and according to the maximum value, the mean and the first body motion signal detection value calculation formula of the maximum value array, the first body motion signal detection value corresponding to the standardized second physiological signal within the unit time is obtained, wherein the first body motion signal detection value calculation formula is: q = abs(max_df / mean_df) Wherein, q is the first body motion signal detection value, max_df is the maximum value of the maximum value array, and mean_df is the mean value of the maximum value array; According to the first body motion signal detection value and the preset body motion signal detection start threshold, respond to the body motion signal detection instruction, obtain the value of each vector in the maximum value array, according to the preset body motion signal threshold, obtain a number of target vectors from the maximum value array, construct a target vector set, according to the target vector set, obtain a number of vectors corresponding to the target vector from the second physiological signal, combine the several vectors corresponding to the target vector, and obtain the body motion signal.

4. The method for detecting wakefulness and sleepiness based on physiological signals according to claim 3, characterized in that: The step of obtaining the characteristic vectors corresponding to the respiratory signal, the ballistocardiogram signal and the body movement signal at a plurality of preset time scales comprises the steps of: Obtaining differential, square sum, and integral parameters corresponding to the respiratory signal and the ballistocardiogram signal, and obtaining peak point positioning results corresponding to the respiratory signal and the ballistocardiogram signal according to the differential, square sum, and integral parameters corresponding to the respiratory signal and the ballistocardiogram signal; According to the peak point positioning results corresponding to the respiratory signal and the ballistocardiogram signal, respectively obtain the peak point intervals corresponding to the respiratory signal and the ballistocardiogram signal, and according to the peak point intervals and the rate value calculation algorithm, obtain the respiratory rate data corresponding to the respiratory signal and the heart rate data corresponding to the ballistocardiogram signal; Acquire numerical parameters corresponding to the respiratory rate data and the heart rate data as the respiratory rate feature and the heart rate feature, wherein the numerical parameters include cumulative difference, mean, standard deviation, maximum value, minimum value, peak-to-valley difference and energy value; According to the respiratory rate data, the heart rate data and a preset mutual correlation coefficient calculation algorithm, obtaining the mutual correlation coefficient between the respiratory rate data and the heart rate data; The number of vectors of the second physiological signal after the standardization processing and the number of vectors of the body motion signal are obtained, and the body motion duty cycle is obtained as the body motion feature according to the number of vectors of the second physiological signal after the standardization processing and the number of vectors of the body motion signal.

5. The method for detecting wakefulness and sleepiness based on physiological signals according to claim 1, characterized in that: The neural network model includes an input layer, an intermediate layer and an output layer.

6. The method for detecting wakefulness and sleepiness based on physiological signals according to claim 5, characterized in that: The step of inputting the feature vectors at the same time scale into a preset neural network model, performing forward propagation training and backward propagation training on the neural network model, updating the weights of the neural network model according to the result of the backward propagation training, and obtaining the trained neural network model comprises the following steps: The feature vector at the same time scale is input as an input vector to the neural network model, and a predicted value output by the neural network model is obtained according to a forward propagation algorithm in the neural network model, wherein the forward propagation algorithm is: f2=A L =W L,L-1 A L-1 Wherein, f1 is the forward propagation algorithm of the input layer and output layer of the neural network model, f2 is the forward propagation algorithm of the output layer of the neural network model, f3 is the forward propagation algorithm based on the neural network model, and A l-1 is the input value of the l-1th layer of the neural network model, A l is the output value of the l-1th layer of the neural network model and serves as the input value of the lth layer. X represents the input vector of the neural network model. A L represents the output value of the output layer of the neural network model, A L-1 represents the input value of the output layer of the neural network model, W l,l-1 is the weight matrix from the l-1th layer to the lth layer of the neural network model, Y represents the predicted value of the neural network model, and o represents the Hadamard product; Obtain a true value corresponding to the predicted value, and obtain an error value of each layer of the neural network model according to the predicted value, the true value, and the error back propagation algorithm in the neural network model, wherein the error back propagation algorithm is: and l-1 =(W l,l-1 ) T dZ l In the formula, Z L is the error value of the output layer of the neural network model, dZ L is the partial derivative of the error value of the output layer, Z l is the error value of the middle layer of the neural network model, dZ l is the partial derivative of the error value of the intermediate layer, MSE is the error loss value of the neural network model; dA l-1 is the partial derivative of the input value of the l-1th layer, (W 1,1-1 ) T is the transpose of the weight matrix from the l-1th layer to the lth layer of the neural network model; According to the error value of each layer of the neural network model and the weight update algorithm in the neural network model, the weight matrix of each layer of the neural network model is updated to obtain the trained neural network model, wherein the weight update algorithm is: W l,l-1 (new)=W l,l-1 -αdW l,l-1 Where m is the number of input vectors of the neural network model for each training. l-1 ) T is the transpose of the input value of the l-1th layer, dW l,l-1 is the partial derivative of the weight matrix from the l-1th layer to the lth layer of the neural network model, α is the learning rate, W l,l-1(old) represents the weight matrix from the l-1th layer to the lth layer of the neural network model when it is not updated, W l,l-1 Represents the updated weight matrix from the l-1th layer to the lth layer of the neural network model.

7. The method for detecting wakefulness and sleepiness based on physiological signals according to claim 1, characterized in that: The step of obtaining the number of awakening labels and the number of sleeping labels corresponding to each awakening and sleeping detection vector in the awakening and sleeping detection sequences corresponding to the plurality of different time scales, and according to the number of awakening labels and the number of sleeping labels, further includes the following steps: The wake-up and sleep label corresponding to each wake-up and sleep detection vector in the wake-up and sleep detection sequences corresponding to the several different time scales is corrected to obtain the corrected wake-up and sleep label corresponding to each wake-up and sleep detection vector in the wake-up and sleep detection sequences corresponding to the several different time scales.

8. A wake-up and sleep-detection device based on physiological signals, characterized in that: include: A signal acquisition module, used to acquire the user's physiological signals, and extract a respiratory signal, a ballistocardiogram signal and a body movement signal at a plurality of different time scales from the physiological signals according to a plurality of preset different time scales; A feature vector acquisition module, used to acquire feature vectors corresponding to the respiratory signal, the ballistocardiogram signal and the body motion signal at several different time scales, wherein the feature vectors include heart rate features, respiratory rate features, heart rate-respiratory rate correlation coefficients and body motion features; A model training module, used to input the feature vectors at the same time scale into a preset neural network model, perform forward propagation training and backward propagation training on the neural network model, update the weight of the neural network model according to the result of the backward propagation training, and obtain a trained neural network model; A detection sequence acquisition module, used to input the feature vectors corresponding to the several different time scales into the trained neural network model to obtain the wake-sleep detection sequences corresponding to the several different time scales, wherein the wake-sleep detection sequence includes several wake-sleep detection vectors; The label acquisition module is used to acquire the wake-up and sleep labels corresponding to each wake-up and sleep detection vector in the wake-up and sleep detection sequences corresponding to the several different time scales according to the value corresponding to each wake-up and sleep detection vector in the wake-up and sleep detection sequences corresponding to the several different time scales and the preset first wake-up and sleep detection threshold, wherein the wake-up and sleep labels include wakefulness labels and sleep labels; the first wake-up and sleep detection threshold is: In the formula, th pre is the first wake-sleep detection threshold, x max is the maximum value corresponding to the wake-sleep detection sequence, x min is the minimum value corresponding to the wake-sleep detection sequence; The detection module is used to obtain the number of awakening labels and the number of sleeping labels corresponding to each awakening and sleeping detection vector in the awakening and sleeping detection sequences corresponding to the several different time scales, and according to the number of awakening labels and the number of sleeping labels, when the number of awakening labels is greater than or equal to the number of sleeping labels, the awakening result is obtained, and the number of awakening labels is less than the number of sleeping labels, the sleeping result is obtained.

9. A computer device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the method for waking or sleeping based on physiological signals as described in any one of claims 1 to 7 are implemented.

10. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the wake-up and sleep-awake detection method based on physiological signals as described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Automatic sleep staging method integrating heart rate, breathing and body movement

    CN108836269A

  • Determination method and device of sleep staging, computer equipment and storage medium

    CN109567748A

  • Sleep monitoring system

    CN110101366A

  • Classification of Sleep / Wakefulness using Nasal Pressure for Patients with Sleep-disordered Breathing

    KR1020180014417A

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

    KR102268804B1