A non-contact sleep staging method and device

Vital sign data is obtained through radar equipment and BiLSTM model and attention mechanism are constructed, which solves the problem of insufficient sleep signal recognition caused by one-sided features in the existing technology, and achieves high-precision sleep staging result generation.

CN120345870BActive Publication Date: 2025-09-02TIANJIN JIANJUN TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510838840.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-23
Publication Date
2025-09-02
Estimated Expiration
2045-06-23

AI Technical Summary

Technical Problem

The features extracted by the existing non-contact sleep monitoring methods are relatively one-sided, resulting in insufficient recognition of multi-stage sleep signals and the inability to accurately generate sleep staging results.

Method used

Vital sign data, including heart rate, respiratory rate, respiratory energy and reflex intensity, were obtained through radar equipment, and breathing frequency and heartbeat frequency were calculated using fast Fourier transform and Gauss Newton algorithm, and a sleep staging prediction model was constructed, and feature fusion was used for feature fusion to generate sleep staging results.

Benefits of technology

It significantly improves the recognition ability of multi-stage sleep signals, accurately generates sleep staging results, reduces noise interference, improves spectrum resolution, and realizes high-precision sleep monitoring in sensorless situations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120345870B_ABST
    Figure CN120345870B_ABST
Patent Text Reader

Abstract

The present invention discloses a contactless sleep staging method and device, comprising: placing a radar device at a designated location and powering on it; processing the echo signal of the radar device to obtain vital sign data; sending the vital sign data to a cloud server for storage; exporting and processing the vital sign data into time series features and frequency domain features; constructing a sleep staging prediction model, inputting the time series features and frequency domain features into the sleep staging prediction model, performing feature learning and outputting a sleep staging prediction value, wherein the sleep staging prediction model simultaneously models time series and frequency domain features through a dual-branch structure, utilizes BiLSTM to capture time series dependencies, and uses an attention mechanism to enhance the model's attention to time series information and frequency domain information in the sequence. The advantages of the present invention are: achieving complementary fusion of time and frequency information, significantly improving the recognition ability of multi-stage sleep signals and the generalization performance of the model, and generating sleep staging results more accurately.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of non-contact sleep monitoring, and in particular to a non-contact sleep staging method and device. Background Art

[0002] Sleep is crucial for maintaining the body's physical and mental health. The current gold standard for monitoring sleep quality is polysomnography (PSG), which can collect multiple physiological signals including electromyography, electroencephalography, electrocardiography, and electrooculography. Its advantage is high accuracy, but its disadvantage is high monitoring cost. During actual measurement, multiple wires are connected to the body, making long-term sleep monitoring impossible. Subsequently, a method emerged that used watch sensors to sense tiny movements of the human body and then monitor sleep. However, the data obtained by relying solely on acceleration sensors and heart rate sensors is limited, making it difficult to fully and accurately reflect the different stages of sleep. In addition, the watch still needs to be worn, which is not friendly to people with sensitive skin.

[0003] In recent years, millimeter-wave radar has emerged as a leader in non-contact sleep monitoring due to its unique advantages. Its non-contact measurement offers advantages such as comfort, privacy protection, and continuous monitoring. Artificial intelligence (AI) has demonstrated exceptional performance in many fields, particularly deep learning algorithms, which have revolutionized data processing and pattern recognition. The integration of millimeter-wave radar and deep learning has opened up a new path for non-contact sleep monitoring. When using millimeter-wave radar to collect vital sign data for sleep monitoring, changes in sleeping posture and body movements can lead to data fluctuations. Therefore, radar signal processing algorithms require targeted optimization to improve the accuracy of vital sign monitoring during sleep. Patent Publication No. CN118490182A discloses a radar-based sleep staging method and device. This method uses a CNN network and an attention mechanism to predict the radar signal's spectral energy signal to generate sleep staging results. However, the radar signal's spectral energy signal is obtained using bandpass filtering, which cannot eliminate the influence of random interference. Furthermore, the multiple convolutional layers, multi-scale feature extraction, and residual connections are required, resulting in high resource consumption and hardware requirements. Patent Publication No. CN119418952A discloses a non-contact sleep stage identification and structure analysis method and system. This method divides chest physiological motion signals into several sleep segments and uses a combined CRNN and NCRF model to predict sleep stages. However, the specific signal processing process for filtering out clutter interference when using radar to extract human chest physiological motion signals is unclear. Furthermore, the large model structure requires higher hardware requirements, and the large amount of data makes labeling difficult, requiring expertise and a significant amount of time. Patent Publication No. CN118806236A discloses a non-contact sleep staging method and device based on millimeter-wave radar. This method processes radar signals using digital signal technology to extract heart rate and heart rate features, which are then input into a deep learning model for sleep stage prediction. However, this method only extracts heart rate features, resulting in a single feature set, which reduces prediction accuracy and poor continuity.

[0004] Chinese patent publication number CN109480787A discloses a non-contact sleep monitoring device and sleep staging method based on ultra-wideband radar. The device has a simple structure and features data that includes respiratory rate, heart rate, and statistical parameters of respiratory rate and heart rate over a period of time. This addresses both the aforementioned resource cost issue and the aforementioned single data feature issue. However, the patent application utilizes a host computer to remove the DC component and perform a Fourier transform on the radar echo data, distinguishing body motion states through frequency domain waveform analysis. This process only processes frequency domain features, resulting in a relatively one-sided feature extraction. The machine learning process steps are unclear and the impact of random interference is not addressed, resulting in insufficient recognition of multi-stage sleep signals. Summary of the Invention

[0005] The technical problem to be solved by the present invention is that the features extracted by the non-contact sleep monitoring method in the prior art are relatively one-sided, resulting in insufficient recognition ability of multi-stage sleep signals and inability to accurately generate sleep staging results.

[0006] The present invention solves the above technical problems through the following technical means: a non-contact sleep staging method, comprising:

[0007] S1. Place the radar equipment at the designated location and power it on;

[0008] S2. Process the radar device's echo signal to obtain vital sign data; the vital sign data includes heart rate, respiratory rate, respiratory energy, reflection intensity, and the time corresponding to this data; obtain the phase signal containing the heartbeat and respiratory signals and the reflection intensity from the radar device's echo signal; separate the respiratory and heartbeat signals from the phase signal and calculate the respiratory energy; for the respiratory and heartbeat signals, use fast Fourier transform to convert the signals from the time domain to the frequency domain, then use the Gauss-Newton algorithm and centroid algorithm to find the respiratory frequency and heartbeat frequency, and then calculate the respiratory rate and heart rate;

[0009] S3, sending vital sign data to the cloud server for storage;

[0010] S4. Exporting and processing vital sign data into time series features and frequency domain features;

[0011] S5. Construct a sleep staging prediction model, input the time series features and frequency domain features into the sleep staging prediction model, and the sleep staging prediction model processes the time series features and frequency domain features with the same branch structure, splices the obtained results, and then inputs the spliced ​​results into the feedforward layer for processing to output the final sleep staging prediction results; wherein, the processing process of the branch structure is as follows: the features are input into the BiLSTM model and the first fully connected layer, and the output results of the two are residually connected and then layer normalization and regularization operations are performed to obtain the first layer residual results, wherein the regularization operation randomly discards a preset proportion of neurons; the first layer residual results are input into the attention mechanism and dimensionally expanded, the dimensionally expanded results are residually connected with the first layer residual results, matrix addition is performed, and layer normalization and regularization are performed to obtain the second layer residual results, and the second layer residual results are subjected to dimensionality reduction processing as the processing result of the branch structure.

[0012] Furthermore, S1 includes:

[0013] The subject lies flat on the bed, and the radar device is placed at a preset distance directly above the human head. The power is connected and turned on. The device is networked and the angle between it and the bed board is adjusted so that the front of the radar device is in a straight line with the person's chest.

[0014] Furthermore, S2 includes:

[0015] Set the respective thresholds of reflection intensity and breathing energy. When both the reflection intensity and breathing energy are greater than their respective thresholds, it is determined that the radar equipment has detected a human target, otherwise it is determined that there is no human target.

[0016] Furthermore, the step of obtaining a phase signal including heartbeat and breathing and a reflection intensity from an echo signal of a radar device includes:

[0017] The echo signal of the radar equipment is amplified, mixed, and analog-to-digital converted to form a coherent signal containing heartbeat and breathing. The coherent signal is subjected to maximum amplitude extraction. Maximum amplitude extraction is to extract the energy peak of a single frame signal from the coherent signal and directly use it as the reflection intensity; the phase of each frame of the coherent signal is extracted using the inverse tangent function, and the phase extracted from each frame is arranged in chronological order to form a phase signal.

[0018] Furthermore, separating the respiratory and heartbeat signals from the phase signal and calculating the respiratory energy includes:

[0019] Calculate the autocorrelation function based on the phase signal and perform Fourier transform on the autocorrelation function to obtain its autocorrelation spectrum , sort all the peak points within the autocorrelation spectrum by amplitude from large to small, set the autocorrelation threshold to one tenth of the maximum amplitude, identify the peak points that are greater than the autocorrelation threshold as valid peak points, and record the center frequency of the valid peak points; phase signal decomposition is based on the center frequency of the valid peak point and the bandwidth of the signal component corresponding to each center frequency to decompose the phase signal into signal components with the number of valid peak points; initially, a set of frequency influences is given, and the bandwidth of each signal component is adjusted using the frequency influence, the phase signal is decomposed, and the sum of the bandwidths of all signal components after the frequency influence is adjusted is calculated. The objective function is to make all signal components The sum of the bandwidths of the quantities after adjustment by the frequency influence is minimized, and the constraints of the decomposition process include that the sum of all frequency influences is equal to 1 and that the difference between the sum of the decomposed signal components and the phase signal is less than the decomposition threshold; the frequency influence is updated, and the next decomposition is continued. The sum of the bandwidths of all signal components after adjustment by the frequency influence is calculated, and the iteration is continued until the number of iterations is reached or the difference between the sum of the decomposed signal components and the phase signal is less than the decomposition threshold, then the update is stopped, and the frequency influence grouping situation when the objective function value is minimized is selected to adjust the bandwidth of the signal component and decompose the phase signal into signal components with the number of effective peak points;

[0020] Select the signal component with frequency within the respiratory signal frequency range from the decomposed signal components as the respiratory signal, and select the signal component with frequency within the heartbeat signal frequency range from the decomposed signal components as the heartbeat signal; if there are multiple signal components with frequencies within the respiratory signal frequency range or the heartbeat signal frequency range, calculate the energy proportion of the frequency of each signal component in the entire respiratory signal frequency range or the heartbeat signal frequency range in the autocorrelation spectrum of the phase signal, select the signal component with the highest energy proportion within the respiratory signal frequency range as the respiratory signal, and select the signal component with the highest energy proportion within the heartbeat signal frequency range as the heartbeat signal; perform weighted fusion on the current respiratory signal and the respiratory signal obtained from the last processing to obtain the respiratory energy; wherein, the method for calculating the energy proportion is based on the frequency of the signal component As the center, find the left frequency point where its amplitude drops to half of the peak value and right frequency point , then the frequency band width of the signal component is , within the frequency band width Integrate to obtain the frequency band energy of the signal component. The energy of the entire respiratory frequency range or heart rate range is calculated in the same way as above, thereby comparing the frequency band energy of the signal component with the energy of the respiratory frequency range to obtain the energy proportion of the frequency of each signal component in the entire respiratory signal frequency range; compare the frequency band energy of the signal component with the energy of the heart rate range to obtain the energy proportion of the frequency of each signal component in the entire heart rate signal frequency range.

[0021] Furthermore, the objective function is ; The expression of the constraint condition of the decomposition process is Where, is the number of effective peak points, Indicates the The center frequency of the effective peak point, , For the Frequency influence, is the signal component corresponding to the fth center frequency, m is the sampling point in the interval [0, M-1], M is the phase signal length, yes The analytical signal, , represents the Hilbert transform, j is the imaginary unit, is the first-order forward difference and , is the decomposition threshold, represents the square of L2 norm; is the phase signal, is the symbol of the constraint condition, For the The bandwidth of each signal component, is the difference between the sum of the decomposed signal components and the phase signal.

[0022] Furthermore, for the respiratory and heartbeat signals, the fast Fourier transform is used to convert the signals from the time domain to the frequency domain, and then the Gauss-Newton algorithm and the centroid algorithm are used to find the respiratory frequency and the heartbeat frequency, and then the respiratory rate and the heart rate are calculated, including:

[0023] The processing process of respiratory signals and heartbeat signals is the same. After performing fast Fourier transform on the signal, the periodogram method is used to estimate the power spectral density of the signal. The power spectral density is fitted using the Gauss-Newton algorithm. After obtaining the fitting curve, the two peak points with the largest and second largest amplitudes are found on the fitting curve as candidate peak points. The centroid of the neighborhood of each candidate peak point is calculated; the distance between each candidate peak point and its centroid position is calculated, and the candidate peak point with the smallest distance to the centroid position is selected as the final peak point; the peak frequency corresponding to the final peak point found by the power spectral density of the respiratory signal and the power spectral density of the heartbeat signal is multiplied by 60 to obtain the respiratory rate and heart rate.

[0024] Furthermore, S4 includes:

[0025] The time in the vital signs data is input into the circadian clock-like function to generate the corresponding circadian clock-like time features. A set of vital signs data values ​​is taken every second, and the vital signs data is read out. The vital signs data is windowed according to the preset step size. Each window contains the data of the n seconds before and after the current moment. Each column of the window is a different type of vital signs data, and each row is the time corresponding to each type of vital signs data. The mean and variance of each column feature of the window are directly calculated to generate time series features. After performing discrete Fourier transform on the data in the window, the mean and variance of each column feature of the window are calculated to generate frequency domain features. The formula of the circadian clock-like function is: , is the biological clock-like time characteristic, A is the amplitude, It's a cycle. is the number of minutes past the time of falling asleep, It's the phase.

[0026] Furthermore, the feedforward layer uses the second fully connected layer to integrate the information of the two branch structures, then uses the GELU activation function to perform nonlinear changes, then uses the regularization operation to discard a preset proportion of neurons, and finally maps the remaining neurons to the third fully connected layer to obtain the sleep stage prediction results.

[0027] Furthermore, the processing process of the attention mechanism is as follows:

[0028] S541: Generate query vector Q and key vector K

[0029]

[0030]

[0031] in, are the first weight matrix and the second weight matrix respectively, and H is the residual result of the first layer;

[0032] S542: Calculate the basic attention score based on the query vector Q and the key vector K

[0033]

[0034] Where D is the feature dimension, is the third weight matrix;

[0035] S543: Generate gate signal , and average the gated signal in the feature dimension to obtain the scalar gated signal

[0036]

[0037]

[0038] in, Indicates the feature dimensions, is the fourth weight matrix, is the bias vector, Represents the sigmoid activation function;

[0039] S544: Calculate attention weight

[0040]

[0041] in, represents dot product, Express The first dimension is done

[0042] S545: Weighted aggregation of the first layer residual results to obtain the results of the attention mechanism

[0043]

[0044] Among them, t represents time t, Represents the time step, that is, the window length for window processing of vital signs data.

[0045] Furthermore, the sleep stage prediction results correspond to five sleep states, namely awake, light sleep, deep sleep, eye movement, and no one.

[0046] Furthermore, the non-contact sleep staging method further includes: S6, displaying the five sleep states of awake, light sleep, deep sleep, eye movement, and no one on the mobile phone.

[0047] The present invention also provides a non-contact sleep staging device, comprising a processor and a memory, wherein the memory stores computer program instructions that can be executed by the processor, and when the processor executes the computer program instructions, the method steps described above are implemented.

[0048] The advantages of the present invention are:

[0049] (1) The present invention exports and processes vital sign data into time series features and frequency domain features, and inputs them into the two branch structures of the sleep staging prediction model respectively. The dual-branch structure simultaneously models the time series and frequency domain features, and uses BiLSTM to capture the time series dependency. The attention mechanism enhances the model's attention to the time series information and frequency domain information in the sequence, thereby achieving complementary fusion of time and frequency information, significantly improving the recognition ability of multi-stage sleep signals and the generalization performance of the model, and generating sleep staging results more accurately. In addition, the Gauss-Newton algorithm is used to effectively reduce noise interference and improve spectral resolution. The centroid algorithm is then used to more accurately identify the peaks in the spectrum, thereby accurately calculating the respiratory rate and heart rate, so that the collected vital sign data is more accurate, further improving the accuracy of the sleep staging results.

[0050] (2) The present invention performs non-contact monitoring of vital signs, reducing contact between people and equipment. It can obtain high-precision vital sign data such as heart rate, respiratory rate, respiratory energy, and reflex intensity without any sensation. On this basis, the vital sign data is preprocessed to generate time series features and frequency domain features. The sleep staging prediction model simultaneously models time series and frequency domain features through a dual-branch structure, uses BiLSTM to capture time series dependencies, and uses an attention mechanism to enhance the model's attention to key time series information or frequency domain information in the sequence. Residual connections and layer normalization ensure stable information transmission and efficient training. By integrating multi-dimensional information through feature fusion, the model's ability to distinguish sleep stages is improved. Sleep staging results can be generated quickly and accurately without contact, and can be viewed at any time on the mobile phone, which helps to understand the body's sleep status.

[0051] (3) The present invention sets a threshold for reflection intensity and a threshold for breathing energy, and compares the relationship between the monitoring data and the threshold. When the reflection intensity and breathing energy are both greater than the corresponding thresholds, the potential target is identified as a human target. Therefore, the above method can quickly and conveniently distinguish whether there is a human target, thereby improving the accuracy of non-contact detection.

[0052] (4) The time data in the vital signs data of the present invention is Beijing time, but what is needed in actual application is the sampling time. Therefore, the time data is processed by the biological clock-like function to obtain the biological clock-like time feature, which is convenient for subsequent use of window calculation to obtain the time series feature and frequency domain feature.

[0053] (5) The present invention inputs the time series features and frequency domain features into the first fully connected layer for feature mapping, and performs a residual connection with the output of the BiLSTM model to alleviate the gradient vanishing problem in deep models. Then, layer normalization and regularization are performed. The normalization operation is performed on individual samples in a batch. It calculates the mean and variance of the samples in the feature dimension to perform normalization, improve training stability, and accelerate convergence. Regularization is a technique to prevent overfitting. During the training process, a preset proportion of neurons are randomly discarded, which can increase the stability and generalization ability of the model.

[0054] (6) The feedforward layer of the present invention uses the second fully connected layer to integrate the information of the two feature channels and extract high-order features. Then, the GELU activation function is used to perform nonlinear changes to increase the model's expressiveness. Then, regularization processing is performed to discard a preset proportion of neurons to increase the model's stability and generalization ability, and finally the sleep staging results are obtained.

[0055] (7) In response to the problem that the existing feature extraction methods mentioned in the background technology have poor ability to cope with random interference, the present invention realizes dynamic signal separation by designing an adaptive iterative decomposition algorithm to suppress the random interference caused by turning over, and uses the autocorrelation function and Fourier transform to analyze the signal frequency characteristics to obtain the center frequency of the effective peak point in the spectrum. The frequency influence is adaptively modified according to the obtained center frequency to minimize the sum of the bandwidths of the frequency components of each effective peak point. After the iteration is completed, the phase signal is decomposed using the optimal frequency influence, and the respiratory signal and heartbeat signal are selected from the decomposed signal according to the typical frequency range of respiration and heartbeat. This method improves the ability to cope with random interference during sleep monitoring, ensures that the separated respiratory and heartbeat signals only contain the most important physiological information, and eliminates the influence of noise signals inside and outside the frequency band in the signal. The Gauss-Newton algorithm is used to fit the spectrum to effectively reduce noise interference and improve the spectrum resolution. The centroid algorithm is then used to calculate the centroid position of the peak point of the fitted spectrum. The final peak point is selected by comparing the distance between the candidate peak point and the centroid position, which can more accurately identify the peak in the spectrum, thereby accurately calculating the respiratory rate and heart rate.

[0056] (8) After the traditional filter sets the passband, the noise signal and spurious signal in the frequency band will be retained together with the physiological signal. If a high-order filter is used, the frequency of the noise signal with a large difference from the physiological signal frequency in the frequency band can be filtered out, but the frequency of the spurious signal around the physiological signal frequency cannot be filtered out. The adaptive iterative decomposition algorithm designed in the present invention identifies all significant frequency components (including the frequency components of noise signals, spurious signals and physiological signals) through autocorrelation spectrum analysis, decomposes them into independent signal components, and then removes the noise components and spurious components with small energy proportions through frequency band energy proportion screening, thereby separating the pure physiological signal. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 This is a structural diagram of a non-contact sleep monitoring device in a non-contact sleep staging method disclosed in Example 1 of the present invention;

[0058] Figure 2 This is a workflow diagram of a non-contact sleep staging method disclosed in Example 1 of the present invention;

[0059] Figure 3 This is a flowchart of radar signal processing in a non-contact sleep staging method disclosed in Example 1 of the present invention;

[0060] FIG4( a ) is a power spectral density fitting curve of a respiratory signal in a non-contact sleep staging method disclosed in Example 1 of the present invention; FIG4( b ) is a power spectral density fitting curve of a heartbeat signal in a non-contact sleep staging method disclosed in Example 1 of the present invention;

[0061] Figure 5 This is a structural diagram of the DualResAtt-BiLSTM model in a non-contact sleep staging method disclosed in Example 1 of the present invention;

[0062] Figure 6 Schematic diagram of the BiLSTM network structure in a non-contact sleep staging method disclosed in Example 1 of the present invention;

[0063] Figure 7 A confusion matrix diagram of prediction results in a non-contact sleep staging method disclosed in Example 1 of the present invention;

[0064] FIG8( a ) is a schematic diagram of true labels of sleep stages in a non-contact sleep staging method disclosed in Example 1 of the present invention; FIG8( b ) is a schematic diagram of prediction results of a non-contact sleep staging method disclosed in Example 1 of the present invention;

[0065] Figure 9 This is a diagram showing the mobile terminal effect of a non-contact sleep staging method disclosed in Example 1 of the present invention. DETAILED DESCRIPTION

[0066] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0067] Example 1

[0068] like Figure 1 As shown, Example 1 of the present invention provides a non-contact sleep staging method. A subject lies flat on a bed with a radar device positioned above their head. The radar device transmits a continuous wave (FMCW) signal and receives an echo signal, processing the echo signal to generate vital sign data. The radar device then sends this data to a cloud server via Wi-Fi for storage. The data is then displayed to the user on a mobile phone by calling an API.

[0069] like Figure 2 The figure shows a workflow diagram of a non-contact sleep staging method provided by the present invention, which specifically includes the following steps:

[0070] S1. The subject lies flat on the bed. Place the radar device 0.8 to 1 meter above the head. Connect the power cord and turn it on. Perform network configuration on the device and adjust the angle between the radar device and the bed so that the front of the radar device is in line with the subject's chest. This will help to more accurately obtain vital sign data.

[0071] S2. In this embodiment, the radar device is a millimeter wave radar. When the millimeter wave radar performs non-contact vital signs monitoring, the radar signal needs to be converted into vital signs data such as heart rate, respiration, and respiratory energy. The specific process is as follows: Figure 3 As shown, it includes the following sub-steps:

[0072] S21. Signal preprocessing involves amplifying the signal received by the millimeter-wave radar antenna using a low-noise amplifier to suppress noise while enhancing signal strength. The amplified signal is then mixed with the local oscillator signal through a mixer and then down-converted to an intermediate frequency (IF). The IF signal is then converted to an ADC to generate a coherent signal containing physiological information such as heartbeat and respiration. The coherent signal is then subjected to maximum amplitude extraction, which reflects the target reflection intensity (maxValue). Maximum amplitude extraction involves extracting the energy peak of a single frame from the coherent signal and directly using it as the reflection intensity. The inverse tangent function is used to extract the phase of multiple consecutive frames of coherent signals. The extracted phases of each frame are arranged in chronological order to form a phase signal.

[0073] S22. Calculate the autocorrelation function based on the phase signal, and perform Fourier transform on the autocorrelation function to obtain its autocorrelation spectrum. The spectrum contains the frequency distribution information of the signal. All peak points within the spectrum range of the autocorrelation spectrum are sorted from large to small by amplitude. The autocorrelation threshold is set to one-tenth of the maximum amplitude. Peak points greater than the autocorrelation threshold are identified as valid peak points, and the center frequency of the valid peak points is recorded. The periodicity of the autocorrelation function can reflect the frequency characteristics of the signal. The formula of the autocorrelation function is as follows:

[0074]

[0075] in, is the delay time, which represents the time interval between two sampling points. is the phase signal, m is the sampling point in the interval [0, M-1], and M is the length of the phase signal.

[0076] S23. The adaptive iterative decomposition algorithm adaptively modifies the frequency influence during each iteration based on the center frequencies of all valid peak points in the phase signal. The objective function is to minimize the sum of the bandwidths of the frequency components of each valid peak point. After the iteration is complete, the input phase signal is decomposed into multiple signal components with determined center frequencies using the optimal frequency influence. The specific steps of the adaptive iterative decomposition algorithm are as follows:

[0077] There are N effective peak points in total, corresponding to The center frequency of the effective peak point is (f=1, 2, ..., N), the The frequency influence is , the signal component corresponding to the fth center frequency is The expressions of the objective function and the constraints of the decomposition process are:

[0078]

[0079] In the formula, the formula in the first row is the objective function, and the formula in the second row is the two constraints. yes The analytical signal, , represents the Hilbert transform, j is the imaginary unit, is the first-order forward difference and , is the decomposition threshold, represents the square of L2 norm; is the symbol of the constraint condition, For the The bandwidth of each signal component, is the difference between the sum of the decomposed signal components and the phase signal.

[0080] When the maximum number of iterations is reached or the difference between the sum of the decomposed signal components and the phase signal is less than the decomposition threshold, the frequency influence factor that minimizes the sum of the bandwidths of all signal components adjusted for frequency influence is selected to decompose the phase signal. The resulting N signal components include the respiratory signal, the heartbeat signal, and the noise signal. Based on the respiratory signal frequency range (0.1-0.5Hz) and the heartbeat signal frequency range (0.8-2Hz), the N decomposed signal components are selected as the respiratory signal if they fall within the respiratory signal frequency range, and as the heartbeat signal if they fall within the heartbeat signal frequency range. If multiple signal components fall within the respiratory signal frequency range or the heartbeat signal frequency range, the energy contribution of each signal component within the entire respiratory signal frequency range or the heartbeat signal frequency range is calculated from the autocorrelation spectrum of the phase signal. The signal with the highest energy contribution within the respiratory signal frequency range is selected as the respiratory signal, and the signal with the highest energy contribution within the heartbeat signal frequency range is selected as the heartbeat signal. Among them, the second and third harmonics of the respiratory signal frequency appear in the heartbeat signal frequency range, so first select the respiratory signal and filter out the multiple harmonics of the respiratory signal frequency that exist in the heartbeat signal frequency range. For example, first find the frequency of the respiratory signal. If the respiratory signal frequency is 0.4 Hz, then the second respiratory harmonic is 0.8 Hz and the third respiratory harmonic is 1.2 Hz, both of which are within the heartbeat signal frequency range. Therefore, the signal frequencies of 0.8 Hz and 1.2 Hz are identified as respiratory harmonic signals and excluded when selecting the heartbeat signal.

[0081] The above method of calculating the energy ratio is based on the frequency of the signal component As the center, find the left frequency point where its amplitude drops to half of the peak value and right frequency point , then the frequency band width of the signal component is , within the frequency band width Integrate to get the frequency band energy of the signal component. The energy of the entire respiratory frequency range or heart rate range is calculated in the same way as above, that is, The energy in the respiratory frequency range is obtained by integration, and the energy in the heart rate range is The energy in the heartbeat frequency range is obtained by integration. Comparing the frequency band energy of the signal component with the energy in the respiratory frequency range yields the energy share of each signal component in the entire respiratory signal frequency range. Comparing the frequency band energy of the signal component with the energy in the heartbeat frequency range yields the energy share of each signal component in the entire heartbeat signal frequency range.

[0082] After obtaining the respiratory signal and heartbeat signal through the adaptive iterative decomposition method, the respiratory energy respiratory is calculated according to the respiratory signal. The formula is as follows:

[0083]

[0084] in, is the exponential smoothing coefficient, which is used to control the degree of trust in the latest respiratory waveform data. is the current respiratory signal waveform data, is the respiratory signal waveform data after the last exponential smoothing process.

[0085] S24. After obtaining the respiratory and heartbeat signals through the adaptive iterative decomposition method, the respiratory rate and heart rate are extracted using the same method: the separated signals are subjected to a fast Fourier transform and then the power spectral density of the signals is estimated using the periodogram method. The Gauss-Newton algorithm fits the power spectral density by superimposing multiple Gaussian functions. Through continuous iteration, the parameters are considered converged when the parameter change between two consecutive iterations is less than a preset threshold of 0.1. Fitting curves are obtained. Figure 4(a) shows the power spectral density fitting curve for the respiratory signal, and Figure 4(b) shows the power spectral density fitting curve for the heartbeat signal. After obtaining the fitting curves, the centroid algorithm is used to calculate the centroid position of the spectrum to determine the final peak point. The two peak points with the largest and second largest amplitudes on the fitting curve are found as candidate peak points. The centroid of the neighborhood of each candidate peak point is calculated. The distance between each candidate peak point and its centroid is calculated, and the candidate peak point with the smallest distance to the centroid is selected as the final peak point. The peak frequency corresponding to the final peak point found for the power spectral density of the respiratory and heartbeat signals is multiplied by 60 to obtain the respiratory rate and heart rate. The relevant formula process is as follows:

[0086] The power spectrum density of the signal is estimated using the periodogram method after fast Fourier transform of the separated signal. , is the frequency index. The spectrum obtained by the periodogram method may have problems with noise interference and insufficient resolution. Therefore, the Gauss-Newton algorithm is further used to fit the spectrum to improve the accuracy of respiratory and heart rate estimation. The Gauss-Newton algorithm constructs a nonlinear least squares model and uses the gradient information of the Gaussian objective function to gradually adjust the model parameters. The error between the fitted spectrum and the actual spectrum is continuously reduced, thereby improving the accuracy and reliability of spectrum analysis. The Gauss-Newton algorithm uses the superposition of multiple Gaussian functions to fit the spectrum:

[0087]

[0088] Where, is the frequency point of the spectrum obtained by the periodogram method, is the independent variable, and the frequency points of the spectrum obtained by the periodogram method are traversed during the iterative calculation process. is the amplitude of the g-th Gaussian function, is the center frequency of the g-th Gaussian function, is the standard deviation, is the number of Gaussian functions, are the parameters to be fitted.

[0089] The Gaussian objective function is the sum of squared errors between the fitted spectrum and the actual spectrum:

[0090]

[0091] Where, is the spectrum obtained by the periodogram method. frequency index, is the number of frequency indices, is the spectrum obtained by the periodogram method. frequency points.

[0092] The iterative formula of the Gauss-Newton algorithm is:

[0093]

[0094] Where, is obtained for the h+1th iteration , for The partial derivative, is the hth iteration , represents the transpose of the matrix, represents the inverse of the matrix, represents the fitted spectrum obtained at the hth iteration, is a simplified representation of the power spectral density, the Jacobian matrix is the Gaussian objective function parameter The partial derivative matrix of the frequency points of the spectrum obtained by the periodogram method is traversed, and the above process is executed and iterated continuously. When the parameter change between two adjacent iterations is less than the preset threshold value 0.1, the parameters are considered to converge and the fitted spectrum is obtained.

[0095] After obtaining the fitting curve through the Gauss-Newton algorithm, the centroid algorithm is used to determine the final peak point by calculating the centroid position of the spectrum, which can avoid the spectrum sidelobe interference caused by posture and improve the accuracy of frequency estimation. The two peak points with the largest and second largest amplitudes on the fitting curve are found as candidate peak points, and the neighborhood of each candidate peak point is calculated. Calculate the centroid using the following formula:

[0096]

[0097] in, is the rth candidate peak point, is the neighborhood frequency width. Calculate the distance between each candidate peak point and its centroid. Select the candidate peak point with the smallest distance from the centroid as the final peak point. Multiply the peak frequency corresponding to the final peak point found in the respiratory and heartbeat spectra by 60 to obtain the respiratory and heart rates.

[0098] The above process uses a preprocessing step to extract a phase signal containing physiological information such as heartbeat and respiration from the raw echo signal. An adaptive iterative decomposition algorithm is then designed to achieve dynamic signal separation and suppress noise interference caused by body movement. First, the signal frequency characteristics are analyzed using autocorrelation functions and Fourier transforms to determine the center frequencies of significant peaks in the spectrum. Based on the obtained center frequencies, the frequency influence is adaptively modified to minimize the sum of the bandwidths of the frequency components of each significant peak. After the iterations are complete, the phase signal is decomposed using the optimal frequency influence. The respiratory and cardiac signals are then selected from the decomposed signals based on their typical frequency ranges. This method improves signal separation accuracy, ensuring that the separated respiratory and cardiac signals contain only the most important physiological information and eliminating the influence of in-band and out-of-band noise. The Gauss-Newton algorithm is used to fit the spectrum. By constructing a nonlinear least-squares model and adjusting parameters using gradient information, noise interference is effectively reduced and spectral resolution is improved. A centroid algorithm is then used to calculate the centroid of the peaks in the fitted spectrum. The final peak is selected by comparing the distances between candidate peaks and the centroid. This allows for more accurate peak identification in the spectrum, leading to precise calculation of respiratory and heart rates.

[0099] In this embodiment, the reflection intensity is set The threshold of the respiratory energy is 50000000, and the threshold of the respiratory energy is 0.12. Comparing the relationship between the monitoring data and the threshold, when the reflection intensity When the respiratory rate and heart rate are both greater than the corresponding thresholds, the potential target is identified as a human target. Otherwise, it is determined that there is no human target within the radar monitoring range, and the respiratory rate and heart rate values ​​are set to 0.

[0100] S3 and the radar device use the emqx middleware to send vital sign data, including heart rate, respiratory rate, respiratory energy, reflection intensity, and the corresponding time (times, Beijing time, UTC+8), via WiFi to the cloud server's time series database for storage, rather than a relational database such as MySQL. Because time series data has different characteristics from relational data and the data stream is large, a time series database is required. Each person's vital sign data is stored separately by time node using database name, device code (unique device identifier), data name, corresponding time, etc., which is more convenient for future query and retrieval.

[0101] S4. Four testers will be selected, including two male testers and two female testers, with a male-to-female ratio of 1:1. The device will be placed 0.8 to 1 meter above the head of the bed to collect sleep data. At the same time, they will wear sleep monitoring equipment to label their sleep status at the same time. 20 days of data will be collected for model training, verification, and testing.

[0102] The sleep data stored in the cloud server was exported into a .CSV file using the corresponding device database name, device code, and timestamp to obtain the vital sign data of the person whose sleep was to be predicted. One .CSV file was saved for each person each day. Sleep data from situations such as insufficient sleep data, power outages or network outages, and sleep positions that resulted in relatively weak data signals were excluded. Each night's data was manually annotated, and the dataset was divided into a training set, a validation set, and a test set in a ratio of 4:1:1. An example of the annotated .CSV data is shown in Table 1.

[0103] Table 1 Example of sleep data collected by radar

[0104]

[0105] In Table 1, heartRate represents heart rate, breathRate represents respiratory rate, respiratory represents respiratory energy (determines breathing strength), maxValue represents reflection intensity (determines whether there is someone present), and label represents the value to be labeled: 0->Awake, 1->Light Sleep, 2->Deep Sleep, 3->Eye Movement, and 4->No One. Normal sleep stages only include the first four, but the radar is a fixed-point device, so the state 4->No One is included.

[0106] The Times column in Table 1 is processed by a biological clock-like function. The function is as follows:

[0107]

[0108] Among them, A is the amplitude, which represents the size of the cosine peak value, cos is the cosine function, and 2π represents a complete cycle change. Is the cycle, which means the time required for one cycle (unit: minute). Its value is the total number of minutes between the time of falling asleep and the time of getting up. In this way, the biological clock function of each person is different and adaptive. is the number of minutes past the time of falling asleep, Is the phase, indicating the offset, the initial value is 0. In actual application, the phase Can be set as needed.

[0109] Read the data set and convert it into a set of vital signs data per second, heartRate, breaRate, respiratory, maxValue, Window processing is performed. For example, if the window data at time t is equal to the data list [t-30s, t+30s], the corresponding label is the label at time t. This way, the input features contain both historical and future information, enabling more accurate prediction of sleep labels. The mean and variance of each column of the window features are calculated to generate time series features. The window data features are then subjected to a discrete Fourier transform (DFT). This more effectively captures the global dependencies and energy compression properties of time series data. Based on this, the mean and variance of each column of the window features are calculated to generate frequency domain features. Finally, the time series features and frequency domain features are used as input to the two branches of the sleep stage prediction model (hereafter referred to as DualResAtt-BiLSTM).

[0110] The above mean and variance incorporate the central tendency and distribution characteristics of the data into the feature set of the model prediction, which helps improve the accuracy of the prediction. The mathematical formulas for the mean and variance are as follows:

[0111]

[0112]

[0113] in, In the representative window The average value of the class feature, The value ranges from 0 to 4, corresponding to heartRate, breathRate, respiratory, maxValue, These five characteristics, Represents the number of data in the window. In this embodiment, the number of data in the window is 60, corresponding to the data of [t-30s, t+30s]. It is the window The sample variance of the class, that is, using As an unbiased estimate of the denominator. Indicates the first Class features The data value at a moment.

[0114] S5. The overall process structure of the model DualResAtt-BiLSTM is as follows Figure 5 As shown in the figure, it is mainly composed of a bidirectional long short-term memory network (BiLSTM), an attention mechanism (Attention), a full connection (Linear), a layer normalization (LayerNorm), a regularization (Dropout), and a feedforward layer (FeedForward). The time series features and frequency domain features obtained after processing are input into the DualResAtt-BiLSTM model, where the batch size parameter is 64, the learning rate parameter is 0.001, the dimension of the input data is 5, the number of categories in the classification task is 5, and the random drop ratio is 0.2.

[0115] S51, the time series features and frequency domain features are processed in the same way and the results are spliced, and then the spliced ​​results are input into the feedforward layer for processing, and the final result is output. The processing process of time series features and frequency domain features is the same, and the processing process of the two is described in detail below. Figure 6 , the time series features and frequency domain features are input into their corresponding BiLSTM models respectively, and the context information of sleep features is learned from the two directions of the sequence (forward and reverse). The BiLSTM model structure is as follows Figure 6 The data entered is shown Need to go through bidirectional LSTM to process the two results , calculate forward from time 1 to time t in the forward propagation layer, and save the output of the forward hidden layer at time t , Figure 6 middle It is represented as a forward LSTM layer, u is the activation function sigmoid, to Are all weight coefficients, the mathematical formula of this step is as follows:

[0116]

[0117] In the back propagation layer, the calculation is reversed from time t to time 1, and the output of the backward hidden layer at each moment is saved. represents the backward LSTM layer, is the output of the backward hidden layer at time t. The mathematical formula of this step is as follows:

[0118]

[0119] Finally, at each moment, the output of the forward layer and the reverse layer at the corresponding time are calculated to obtain the final result , the output combines the sequence information of the bidirectional input. The mathematical formula of this step is as follows:

[0120]

[0121] S52. Input the time series features and frequency domain features into the first fully connected layer for feature mapping, so that their output dimensions are consistent with the output of BiLSTM, and make a residual connection with the output of BiLSTM to alleviate the gradient disappearance problem in the deep model.

[0122] S53 performs layer normalization and regularization on the output of S52. This normalization is performed on individual samples within a batch. This normalization is performed by calculating the mean and variance of the samples along the feature dimension, improving training stability and accelerating convergence. Regularization is a technique used to prevent overfitting. During training, 20% of neurons are randomly dropped to increase model stability and generalization. Layer normalization and regularization do not change the output shape, resulting in the first-layer residual.

[0123] S54. Input the first-layer residual results into the attention mechanism, a method that mimics the human visual and cognitive system. It allows the neural network to focus on relevant parts when processing input data, performs weighted processing on the input data, and allows the model to automatically focus on the most relevant parts of the input sequence, thereby better understanding and processing the input sleep data. The attention mechanism of this invention uses a self-designed gated dynamic attention (GDA), and the calculation formula is as follows:

[0124] S541: Generate query vector Q and key vector K

[0125]

[0126]

[0127] in, are the first weight matrix and the second weight matrix respectively, and H is the residual result of the first layer;

[0128] S542: Calculate the basic attention score based on the query vector Q and the key vector K

[0129]

[0130] Where D is the feature dimension, is the third weight matrix;

[0131] S543: Generate gate signal , and average the gated signal in the feature dimension to obtain the scalar gated signal

[0132]

[0133]

[0134] in, is the fourth weight matrix, is the bias vector, Represents the sigmoid activation function;

[0135] S544: Calculate attention weight

[0136]

[0137] in, represents dot product, Express The first dimension is done

[0138] S545: Weighted aggregation of the first layer residual results to obtain the results of the attention mechanism

[0139]

[0140] in, Represents the time step, that is, the window length for window processing of vital signs data.

[0141] S55. Expand the dimension of the result of the attention mechanism and broadcast it along the time step to make the output dimension consistent with , and make a residual connection with the residual result of the first layer, add the matrix, and perform layer normalization and regularization. The proportion of regularized discarded neurons is still 20%, and the residual result of the second layer is obtained.

[0142] In step S56, the second-layer residuals obtained from the two branches are subjected to dimensionality reduction and concatenated. This is then fed into the feedforward layer. The second fully connected layer integrates the information from the two feature channels to extract high-order features. A GELU activation function is then used to perform nonlinear transformations to increase the model's expressiveness. Regularization is then performed by discarding 20% ​​of neurons. Finally, the third fully connected layer maps the data to the output space to obtain the sleep staging results. The five sleep staging states are: 0->Awake, 1->Light Sleep, 2->Deep Sleep, 3->Eye Movement, and 4->Absent. The mode of each time segment is determined as the sleep state for that time segment.

[0143] The loss function used by the model is the Cross-Entropy Loss function, and the optimizer uses the Adam (Adaptive Moment Estimation) optimization algorithm to optimize the parameters.

[0144] The cross-entropy loss function measures the difference between the probability distribution of the model predictions and the probability distribution of the true labels.

[0145]

[0146] in, represents the number of samples, C represents the number of categories, It is The samples belong to The true probability of the class, The model predicts The samples belong to The probability of the class.

[0147] Adam is an adaptive learning rate optimization algorithm that combines the advantages of the AdaGrad and RMSProp algorithms. The Adam optimizer maintains two moving averages for each parameter: the first-order moment estimate (mean) and the second-order moment estimate (uncentered variance), and adaptively adjusts the learning rate of each parameter based on these estimates.

[0148] like Figure 7 The confusion matrix of the prediction results is shown, where the horizontal axis is the predicted label and the vertical axis is the true label. Figure 7 The data shows that the accuracy of sleep stage prediction is 89.4%, including 97.63% for wakefulness, 92.48% for light sleep, 87.09% for deep sleep, 74.43% for eye movement, and 98.01% for absence. The sleep staging method based on radar signals and deep learning has high accuracy for awakeness and absence. Analysis suggests that the radar signal return value is higher when there is a person and constant movement, while the heart rate and respiration rates are zero when there is no one. These significant features facilitate model learning. However, the prediction accuracy for light sleep, deep sleep, and eye movement is relatively low. Analysis suggests that the accuracy is affected by a large number of objective variables, such as the height of the radar device from the person's head, the person's sleeping posture, the size of the bed, and the distance traveled during sleep, which all affect the accuracy of the prediction.

[0149] Figure 8 (a) is a schematic diagram of the real labels of sleep stages, and Figure 8 (b) is a schematic diagram of the prediction results of the present invention. There is only a slight difference in the trends of the two. It can be seen that the method proposed in the present invention has a good prediction effect for sleep stages. The horizontal axis is the sample number, and data is collected once per second, so the sample number also corresponds to the sampling time.

[0150] S6. Finally, the prediction results and the corresponding timestamp are returned to the front end for interface rendering and effect display. Figure 9 The following is a mobile phone display of the model's prediction results for 5 categories of sleep stages. Figure 9 It not only shows the states of wakefulness, light sleep, deep sleep, and eye movement, but also shows the state of no one, and calculates the proportion of each state and the number of body movements. Such an intuitive display helps people better understand their own sleep state.

[0151] Through the above technical solution, the present invention performs non-contact monitoring of vital signs, reduces the contact between people and equipment, and can obtain high-precision vital sign data such as heart rate, respiratory rate, respiratory energy, and reflex intensity without feeling. On this basis, the vital sign data is preprocessed to generate time series features and frequency domain features. The DualResAtt-BiLSTM model simultaneously models time series and frequency domain features through a dual-branch structure, uses BiLSTM to capture time series dependencies, and enhances the model's attention to key time series information or frequency domain information in the sequence through the attention mechanism. Residual connections and layer normalization ensure stable information transmission and efficient training. Feature fusion integrates multi-dimensional information to improve the model's ability to distinguish sleep stages. Sleep staging results can be generated quickly and accurately without contact and can be viewed at any time on the mobile phone, which helps to understand the body's sleep conditions.

[0152] Example 2

[0153] Embodiment 2 of the present invention further provides a non-contact sleep staging device, comprising a processor and a memory, wherein the memory stores computer program instructions that can be executed by the processor, and when the processor executes the computer program instructions, the method steps described in embodiment 1 are implemented.

[0154] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A non-contact sleep staging method, characterized in that: include: S1. Place the radar equipment at the designated location and power it on; S2. Processing the echo signal of the radar device to obtain vital sign data; the vital sign data includes heart rate, respiratory rate, respiratory energy, reflection intensity, and the time corresponding to this data; The phase signal and reflection intensity of the heartbeat and respiration signals are obtained from the radar device's echo signal. The respiration and heartbeat signals are separated from the phase signal, and the respiration energy is calculated. For the respiration and heartbeat signals, the fast Fourier transform is used to convert the signal from the time domain to the frequency domain. The Gauss-Newton algorithm and the centroid algorithm are then used to find the respiration frequency and heartbeat frequency, and then the respiration rate and heart rate are calculated. The processing process for respiratory and heartbeat signals is the same. After performing a fast Fourier transform on the signal, the power spectrum density of the signal is estimated using the periodogram method. The power spectrum density is then fitted using the Gauss-Newton algorithm. After obtaining the fitting curve, the two peak points with the largest and second largest amplitudes are found on the fitting curve as candidate peak points. The centroid of the neighborhood of each candidate peak point is calculated. Calculate the distance between each candidate peak point and its centroid position, and select the candidate peak point with the smallest distance to the centroid position as the final peak point; The peak frequency corresponding to the final peak point found by the power spectrum density of the respiratory signal and the power spectrum density of the heartbeat signal is multiplied by 60 to obtain the respiratory rate and heart rate; S3, sending vital sign data to the cloud server for storage; S4. Exporting and processing vital sign data into time series features and frequency domain features; S5. Construct a sleep staging prediction model, input the time series features and frequency domain features into the sleep staging prediction model, and the sleep staging prediction model processes the time series features and frequency domain features with the same branch structure, splices the obtained results, and then inputs the spliced ​​results into the feedforward layer for processing to output the final sleep staging prediction results; wherein, the processing process of the branch structure is as follows: the features are input into the BiLSTM model and the first fully connected layer, and the output results of the two are residually connected and then layer normalization and regularization operations are performed to obtain the first layer residual results, wherein the regularization operation randomly discards a preset proportion of neurons; the first layer residual results are input into the attention mechanism and dimensionally expanded, the dimensionally expanded results are residually connected with the first layer residual results, matrix addition is performed, and layer normalization and regularization are performed to obtain the second layer residual results, and the second layer residual results are subjected to dimensionality reduction processing as the processing result of the branch structure.

2. A non-contact sleep staging method according to claim 1, characterized in that: The step of obtaining a phase signal including heartbeat and breathing and a reflection intensity from an echo signal of a radar device includes: The echo signal of the radar equipment is amplified, mixed, and analog-to-digital converted to form a coherent signal containing heartbeat and breathing. The coherent signal is subjected to maximum amplitude extraction. Maximum amplitude extraction is to extract the energy peak of a single frame signal from the coherent signal and directly use it as the reflection intensity; the phase of each frame of the coherent signal is extracted using the inverse tangent function, and the phase extracted from each frame is arranged in chronological order to form a phase signal.

3. The non-contact sleep staging method according to claim 1, characterized in that: The step of separating the respiratory and heartbeat signals from the phase signal and calculating the respiratory energy includes: Calculate the autocorrelation function based on the phase signal and perform Fourier transform on the autocorrelation function to obtain its autocorrelation spectrum , sort all the peak points within the autocorrelation spectrum by amplitude from large to small, set the autocorrelation threshold to one tenth of the maximum amplitude, identify the peak points that are greater than the autocorrelation threshold as valid peak points, and record the center frequency of the valid peak points; phase signal decomposition is based on the center frequency of the valid peak point and the bandwidth of the signal component corresponding to each center frequency to decompose the phase signal into signal components with the number of valid peak points; initially, a set of frequency influences is given, and the bandwidth of each signal component is adjusted using the frequency influence, the phase signal is decomposed, and the sum of the bandwidths of all signal components after frequency influence adjustment is calculated. The objective function is to make all signals The sum of the bandwidths of the components after adjustment for frequency influence is minimized, and the constraints of the decomposition process include that the sum of all frequency influences is equal to 1 and that the difference between the sum of the decomposed signal components and the phase signal is less than a threshold; the frequency influence is updated, and the next decomposition is continued. The sum of the bandwidths of all signal components after adjustment for frequency influence is calculated for the next time, and the iteration is continued until the number of iterations is reached or the difference between the sum of the decomposed signal components and the phase signal is less than the decomposition threshold. The update is stopped, and the frequency influence grouping situation when the objective function value is minimized is selected to adjust the bandwidth of the signal component and decompose the phase signal into signal components with the number of effective peak points; Select the signal component with frequency within the respiratory signal frequency range from the decomposed signal components as the respiratory signal, and select the signal component with frequency within the heartbeat signal frequency range from the decomposed signal components as the heartbeat signal; if there are multiple signal components with frequencies within the respiratory signal frequency range or the heartbeat signal frequency range, calculate the energy proportion of the frequency of each signal component in the entire respiratory signal frequency range or the heartbeat signal frequency range in the autocorrelation spectrum of the phase signal, select the signal component with the highest energy proportion within the respiratory signal frequency range as the respiratory signal, and select the signal component with the highest energy proportion within the heartbeat signal frequency range as the heartbeat signal; perform weighted fusion on the current respiratory signal and the respiratory signal obtained from the last processing to obtain the respiratory energy; wherein, the method for calculating the energy proportion is based on the frequency of the signal component As the center, find the left frequency point where its amplitude drops to half of the peak value and right frequency point , then the frequency band width of the signal component is , within the frequency band width Integrate to obtain the frequency band energy of the signal component. The energy of the entire respiratory frequency range or heart rate range is calculated in the same way as above, thereby comparing the frequency band energy of the signal component with the energy of the respiratory frequency range to obtain the energy proportion of the frequency of each signal component in the entire respiratory signal frequency range; compare the frequency band energy of the signal component with the energy of the heart rate range to obtain the energy proportion of the frequency of each signal component in the entire heart rate signal frequency range.

4. A non-contact sleep staging method according to claim 3, characterized in that: The objective function is ; The constraint condition of the decomposition process is expressed as Where, is the number of effective peak points, Indicates the The center frequency of the effective peak point, , For the Frequency influence, is the signal component corresponding to the fth center frequency, m is the sampling point in the interval [0, M-1], M is the phase signal length, yes The analytical signal, , represents the Hilbert transform, j is the imaginary unit, is the first-order forward difference and , is the decomposition threshold, represents the square of L2 norm; is the phase signal, is the symbol of the constraint condition, For the The bandwidth of each signal component, is the difference between the sum of the decomposed signal components and the phase signal.

5. The non-contact sleep staging method according to claim 1, characterized in that: S4 includes: The time in the vital signs data is input into the circadian clock-like function to generate the corresponding circadian clock-like time features. A set of vital signs data values ​​is taken every second, and the vital signs data is read out. The vital signs data is windowed according to the preset step size. Each window contains the data of the n seconds before and after the current moment. Each column of the window is a different type of vital signs data, and each row is the time corresponding to each type of vital signs data. The mean and variance of each column feature of the window are directly calculated to generate time series features. After performing discrete Fourier transform on the data in the window, the mean and variance of each column feature of the window are calculated to generate frequency domain features. The formula of the circadian clock-like function is: , is the biological clock time characteristic, A is the amplitude, It's a cycle. is the number of minutes past the time of falling asleep, It's the phase.

6. The non-contact sleep staging method according to claim 1, characterized in that: The feedforward layer uses the second fully connected layer to integrate the information of the two branch structures, then uses the GELU activation function to perform nonlinear changes, then uses the regularization operation to discard a preset proportion of neurons, and finally maps the remaining neurons to the third fully connected layer to obtain the sleep stage prediction results.

7. The non-contact sleep staging method according to claim 1, characterized in that: The processing process of the attention mechanism is: S541: Generate query vector Q and key vector K in, are the first weight matrix and the second weight matrix respectively, and H is the residual result of the first layer; S542: Calculate the basic attention score based on the query vector Q and the key vector K Where D is the feature dimension, is the third weight matrix; S543: Generate gate signal , and average the gated signal in the feature dimension to obtain the scalar gated signal in, Indicates the feature dimensions, is the fourth weight matrix, is the bias vector, Represents the sigmoid activation function; S544: Calculate attention weight in, represents dot product, Express The first dimension is done S545: Weighted aggregation of the first layer residual results to obtain the results of the attention mechanism Among them, t represents time t, Represents the time step, that is, the window length for window processing of vital signs data.

8. A non-contact sleep staging device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer program instructions that can be executed by the processor, and when the processor executes the computer program instructions, the method steps described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Noncontact sleep monitoring device based no ultrawide-band radar and noncontact sleep staging method based on ultrawide-band radar

    CN109480787A

  • Sleep staging method and device based on radar signal

    CN118490182A

  • Non-contact sleep staging method and device based on millimeter wave radar

    CN118806236A

  • Non-contact sleep staging identification and structural analysis method and system

    CN119418952A

  • Method for determining large-plastic bending section profile curve of thin-walled pipe

    CN108332681A