Sleep state analysis method and system and electronic equipment

Through the matrix feature analysis method, adaptive filtering and norm analysis of the sleep feature matrix are used to solve the problem of low accuracy of sleep state analysis in the existing technology, achieving higher analysis accuracy and lower equipment cost.

CN118787309APending Publication Date: 2024-10-18CHINA MOBILEHANGZHOUINFORMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311484571.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-08
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

The existing method of using millimeter waves to monitor sleep status is greatly affected by data fluctuations, resulting in low accuracy of sleep status analysis.

Method used

The matrix feature analysis method is used to receive detection target feature data uploaded by millimeter wave radar equipment, perform adaptive filtering, construct a sleep feature matrix, and calculate the norm of the matrix in adjacent periods to analyze the sleep state.

Benefits of technology

It improves the accuracy of sleep state analysis, reduces resource consumption on the millimeter wave radar equipment side, reduces equipment costs, enhances data security, reduces environmental noise interference, and improves the stability of analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118787309A_ABST
    Figure CN118787309A_ABST
Patent Text Reader

Abstract

The invention provides a sleep state analysis method, a sleep state analysis system and electronic equipment. The sleep state analysis method comprises the following steps: receiving detection target characteristic data uploaded by millimeter wave radar equipment at each moment; performing adaptive filtering on the detection target feature data to obtain a filtered detection target feature matrix of each time period; extracting sleep statistical feature values in the detection target feature matrix of each time period, and constructing a sleep feature matrix of each time period; calculating a norm of the first matrix; the first matrix is a matrix obtained by subtracting sleep feature matrixes of adjacent time periods; and analyzing the sleep state of the detection target according to the norm of the first matrix. According to the invention, the cloud server performs data calculation and analysis, so that resource consumption of the equipment side can be reduced; by carrying out adaptive filtering on the feature data, personalized interference removal of environmental noise can be realized for environments in which different users are located; the corresponding matching analysis of the sleep features and the sleep states is performed based on the matrix feature analysis method, so that the analysis accuracy can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a sleep state analysis method, system and electronic equipment. Background Art

[0002] At present, there are two main methods for monitoring sleep and analyzing sleep status based on millimeter wave technology:

[0003] The first type is based on human body data features, mainly modeling and monitoring human body posture, using millimeter wave radar to scan the posture changes of the body and head, identify the body posture and head position of the person, and then determine whether the person is sleeping. When the human body enters the sleeping state, the posture changes will become slower or almost unchanged, so it is possible to determine whether the person is sleeping by detecting the changes in the human posture.

[0004] The second category is based on data statistics and feature monitoring, mainly monitoring human movements and vital signs (including breathing and heart rate), monitoring the target's activity status, distance and signal strength, classifying and recording the target's motion characteristics based on target detection information, and statistically analyzing long-term motion feature information from a time dimension, and analyzing the sleep state.

[0005] Therefore, the existing schemes for using millimeter waves to monitor sleep and analyze sleep status mainly focus on the time dimension of the user's body movement information, heart rate information, and breathing information, and design detection methods based on the actual monitored data. However, this type of method is greatly affected by data fluctuations and is not sufficient to provide sufficient information to complete accurate monitoring of sleep status, thus affecting the accuracy of sleep status analysis. Summary of the invention

[0006] The present invention provides a sleep state analysis method, system and electronic device to solve the defects in the prior art that the system is greatly affected by data fluctuations and is insufficient to provide sufficient information to complete accurate monitoring of the sleep state. The system performs corresponding matching analysis between sleep characteristics and sleep states based on a matrix feature analysis method to improve the accuracy of sleep state analysis.

[0007] The present invention provides a sleep state analysis method, which is applied to a cloud server, and the method comprises:

[0008] Receive the detection target feature data at each moment uploaded by the millimeter wave radar device;

[0009] Adaptively filtering the detection target feature data to obtain a detection target feature matrix for each time period after filtering;

[0010] Extract the sleep statistical feature values ​​in the detection target feature matrix of each time period, and construct the sleep feature matrix of each time period;

[0011] Calculating the norm of a first matrix; the first matrix is ​​a matrix obtained by subtracting sleep feature matrices of adjacent time periods;

[0012] The sleeping state of the detection target is analyzed according to the norm of the first matrix.

[0013] According to a sleep state analysis method provided by the present invention, the detection target feature data includes heart rate data, breathing data and phase data; the detection target feature data is adaptively filtered to obtain the detection target feature matrix of each time period after filtering, including:

[0014] For each time period, the heart rate data, breathing data and phase data of the current time period are selected to construct the heart rate vector, breathing vector and phase vector respectively;

[0015] constructing an input matrix based on the heart rate vector, the breathing vector and the phase vector;

[0016] Get preset matrix and preset filter parameters;

[0017] Iteratively calculating filtering parameters based on the input matrix until a preset iteration termination condition is met;

[0018] According to the iteration termination result, the preset matrix and the preset filtering parameters are updated to determine the detection target feature matrix of the current time period after filtering.

[0019] According to a sleep state analysis method provided by the present invention, the iterative calculation of the filter parameters based on the input matrix until a preset iteration termination condition is met includes:

[0020] Get the initialization filter parameters;

[0021] Performing a dot multiplication operation on the initialization filter parameter and the input matrix to obtain a second matrix;

[0022] Calculating the difference between the preset matrix and the second matrix to obtain a third matrix;

[0023] Set the step size parameters;

[0024] The filtering parameters are iteratively calculated according to the initialization filtering parameters, the step size parameters, the third matrix and the input matrix until a mean square error of the third matrix is ​​less than a preset error.

[0025] According to a sleep state analysis method provided by the present invention, the updating of the preset matrix and the preset filtering parameters according to the iteration termination result, and determining the detection target feature matrix of the current time period after filtering, includes:

[0026] After the iteration is terminated, a target third matrix whose mean square error is less than a preset error is obtained;

[0027] Determining a target second matrix and target filtering parameters corresponding to the target third matrix;

[0028] Using the target second matrix as an updated preset matrix, using the target filtering parameters as updated preset filtering parameters, and saving the updated preset matrix and the updated preset filtering parameters;

[0029] The target second matrix is ​​output as the detected target feature matrix of the current time period after filtering.

[0030] According to a sleep state analysis method provided by the present invention, the step of extracting sleep statistical feature values ​​in a detection target feature matrix of each time period and constructing a sleep feature matrix of each time period includes:

[0031] For the detection target feature matrix of each time period, select the median, maximum value and minimum value in each row of feature data of the detection target feature matrix;

[0032] Calculate the mean and standard deviation of each row of feature data;

[0033] Construct a sleep feature matrix based on the median, mean, standard deviation, maximum and minimum values ​​of each row of feature data.

[0034] According to a sleep state analysis method provided by the present invention, analyzing the sleep state of the detection target according to the norm of the first matrix includes:

[0035] If the norm of the first matrix is ​​within a first preset range, determining that the detection target is in a deep sleep state;

[0036] If the norm of the first matrix is ​​within a second preset range, it is determined that the detection target is in a light sleep state;

[0037] If the norm of the first matrix is ​​within a third preset range, it is determined that the detection target is in a sober state;

[0038] If the norm of the first matrix is ​​greater than a preset threshold, it is determined that the feature data is abnormal.

[0039] The present invention also provides a sleep state analysis method, which is applied to millimeter wave radar equipment, and the method comprises:

[0040] Obtaining detection target feature data at each moment;

[0041] The detection target feature data at each moment is uploaded to the cloud server, so that the cloud server performs adaptive filtering on the detection target feature data to obtain the detection target feature matrix of each time period after filtering; the sleep statistical feature values ​​in the detection target feature matrix of each time period are extracted to construct the sleep feature matrix of each time period; the norm of the first matrix is ​​calculated; the first matrix is ​​a matrix obtained by subtracting the sleep feature matrices of adjacent time periods; and the sleep state of the detection target is analyzed according to the norm of the first matrix.

[0042] According to a sleep state analysis method provided by the present invention, the step of obtaining the detection target feature data at each moment includes:

[0043] Acquire initial feature data for the detection target through a bandpass filter;

[0044] The average value of the initial characteristic data within two power frequency interference cycles is calculated to obtain the detection target characteristic data at the current moment.

[0045] The present invention also provides a sleep state analysis system, the system comprising a millimeter wave radar device and a cloud server, the millimeter wave radar device and the cloud server are connected based on WebSocket communication;

[0046] The millimeter wave radar device is used to obtain the detection target feature data at each moment; and upload the detection target feature data at each moment to the cloud server;

[0047] The cloud server is used to receive the detection target feature data; adaptively filter the detection target feature data to obtain the detection target feature matrix of each time period after filtering; extract the sleep statistical feature value in the detection target feature matrix of each time period to construct the sleep feature matrix of each time period; calculate the norm of the first matrix; the first matrix is ​​a matrix obtained by subtracting the sleep feature matrices of adjacent time periods; and analyze the sleep state of the detection target according to the norm of the first matrix.

[0048] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the sleep state analysis method as described in any one of the above when executing the program.

[0049] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the sleep state analysis method as described in any one of the above items are implemented.

[0050] The sleep state analysis method, system and electronic device provided by the present invention realize sleep state analysis by performing data calculation based on the detection target feature data by a cloud server, which can effectively reduce the resource consumption on the millimeter wave radar device side, reduce the equipment cost and improve the data security; by adaptively filtering the human body feature data to obtain the filtered human body feature matrix, personalized interference removal of environmental noise can be achieved for different user environments, avoiding the influence of human body feature data caused by human actions and environmental errors, and improving the accuracy of sleep state analysis; by extracting the sleep statistical eigenvalues ​​in the detection target feature matrix to construct a sleep feature matrix, calculating the norm of the first matrix obtained by subtracting the sleep feature matrices of adjacent time periods, thereby analyzing the sleep state of the detection target based on the norm, the matrix feature data is more accurate and more stable, and the corresponding matching analysis of sleep features and sleep states is performed based on the matrix feature analysis method, which can improve the accuracy of sleep state analysis. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0052] Figure 1 This is one of the flowcharts of the sleep state analysis method provided by an embodiment of the present invention;

[0053] Figure 2 This is the second flow chart of the sleep state analysis method provided by the embodiment of the present invention;

[0054] Figure 3 is a structural schematic diagram of a sleep state analysis system provided by an embodiment of the present invention;

[0055] Figure 4 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0056] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0057] Figure 1 FIG. 1 is a flow chart of a sleep state analysis method provided by an embodiment of the present invention. Figure 1 The embodiment of the present invention provides a sleep state analysis method, which may specifically include the following steps:

[0058] Step 101, receiving the detection target feature data at each moment uploaded by the millimeter wave radar device.

[0059] Millimeter-wave radar is a radar system that uses electromagnetic waves in the millimeter-wave frequency band (30GHz to 300GHz) for detection and ranging. Its working principle is to transmit millimeter-wave signals, use receivers to receive echo signals, and determine the target's distance, speed, azimuth and other information by processing the echo signals.

[0060] Millimeter-wave radar has the following characteristics: (1) High precision: Millimeter-wave radar can achieve high-precision distance measurement, and can also measure the target's speed, azimuth and other information more accurately. (2) Multi-target detection: Millimeter-wave radar can detect multiple targets at the same time, and can detect and identify both stationary and moving targets. (3) Good anti-interference ability: Compared with radars in other frequency bands, millimeter-wave radar is more anti-interference in engineering and can adapt to work requirements in various environments.

[0061] 60GHz radar is a radar system that uses electromagnetic waves in the 60GHz frequency band for detection and ranging. Compared with millimeter-wave radar, 60GHz radar has the characteristics of wider bandwidth in the spectrum, higher resolution and lower power consumption.

[0062] In the existing schemes for using millimeter waves to monitor sleep and analyze sleep status, sleep status analysis is usually implemented locally on the millimeter wave radar device. However, the sleep status analysis is usually implemented locally on the millimeter wave radar device, which has the following disadvantages: (1) Since millimeter wave radar devices are usually small in size and low in power consumption, and have limited hardware resources, storing a large amount of algorithm models and data in the millimeter wave radar device when analyzing the sleep status will lead to a decrease in device performance and increase in device cost. (2) Since millimeter wave radar devices need to connect to the Internet to obtain updated algorithm models or data, local implementation on the device side may have security issues, such as being attacked by hackers or invaded by viruses, resulting in risks such as user data leakage or device control. (3) Local implementation on the device side needs to be adapted to different types of devices and scenarios, and the development and maintenance costs are high. (4) Device upgrades and updates may require manual operations by users, resulting in poor user experience. (5) When the algorithm models and data implemented locally on the smart device cannot meet current needs, they need to be updated and expanded. However, the algorithm models and data implemented locally on the device side need to be optimized according to the physical characteristics of the device, which makes it difficult to quickly expand and upgrade.

[0063] In the sleep state analysis method provided in the embodiment of the present invention, the millimeter wave radar device can upload the detection target feature data at each moment to the cloud server, and the cloud server performs data calculation based on the detection target feature data to realize sleep state analysis, thereby effectively reducing the resource consumption on the millimeter wave radar device side, reducing equipment costs, improving data security, and facilitating large-scale promotion.

[0064] The detection target may refer to a target for which sleep state analysis is required. For example, the detection target may be a human body, or other animals, etc. The following embodiments of the present invention are described with the detection target being a human body.

[0065] The WebSocket protocol is a network protocol based on TCP (Transmission Control Protocol) that allows two-way communication between the client and the server to achieve real-time data transmission. Compared with the HTTP (Hypertext Transfer Protocol) protocol, the WebSocket protocol has lower latency and higher performance, and is suitable for real-time communication, online games, stock trading and other scenarios.

[0066] The WebSocket protocol system mainly consists of the following three parts:

[0067] (1) Handshake process: Before establishing a WebSocket connection, the client can send an HTTP request to the server. The request header contains some special fields, such as Upgrade, Connection, Sec-WebSocket-Key, etc. After receiving the request, the server can verify the validity of the request header, generate the corresponding response header, and return it to the client. After the connection is established between the server and the client, two-way data transmission can be carried out.

[0068] (2) Data frame format: WebSocket data transmission is carried out in the form of frames. Each frame contains a frame header and a data part. The frame header contains some control bits, data length, payload type and other information to determine the type and content of the frame. The data part is the actual data content, which can be text or binary data.

[0069] (3) Data transmission control: After the WebSocket connection is established, the client and server can transmit data by sending data frames. Both the client and the server can send data frames and control the connection status through control frames. For example, the PING frame is used to test whether the connection is alive, and the PONG frame is used to respond to the PING frame. In addition, the WebSocket protocol also defines some status codes and error codes to describe the connection status and error information.

[0070] The WebSocket protocol system establishes a new two-way communication method, which can achieve efficient, low-latency real-time data transmission through mechanisms such as handshake process, data frame format and data transmission control, providing more flexible and powerful functions for Web applications.

[0071] In an embodiment of the present invention, the millimeter-wave radar device and the cloud server can be connected to each other through communication based on the WebSocket protocol, thereby realizing real-time communication, calculation and storage between the millimeter-wave radar device and the cloud server based on the WebSocket protocol, effectively reducing resource consumption on the device side, reducing equipment costs, and facilitating large-scale promotion.

[0072] Specifically, in the millimeter wave radar code, a WebSocket object can be used to establish a WebSocket connection with the cloud server. The device side and the server side can be connected through a specified URL (uniform resource locator) and port. The embodiment of the present invention designs a websocket-based end-to-cloud real-time communication computing solution, including two parts: device-side design and platform-side design. The device-side design is mainly a physical model design, and the platform-side design may include functional modules such as real-time communication services, user identity authentication, adaptive filtering and storage, sleep feature extraction and matching, etc., based on real-time analysis and matching of the information uploaded by the device, the sleep state of the detection target can be judged based on the user's breathing data and heart rate data.

[0073] Step 102, adaptively filter the detection target feature data to obtain a detection target feature matrix for each time period after filtering.

[0074] Specifically, the detection target feature data at all times within a certain period of time may be adaptively filtered to obtain a detection target feature matrix of the period of time after filtering, thereby obtaining a detection target feature matrix of each period of time.

[0075] In the existing millimeter-wave radar sleep state analysis scheme, the sleep state is monitored through human body data characteristics, which requires the millimeter-wave radar to scan the human skin through high-frequency electromagnetic waves. Since its transmission effect is greatly affected by physical obstacles, and the human body will change its sleeping posture at will during sleep, it will affect the accuracy and stability of the detection data. At the same time, the use of millimeter-wave radar electromagnetic waves to perform high-frequency scanning of the human body will make the energy consumption of the equipment relatively high, and the equipment cost will increase, which is not suitable for long-term continuous use.

[0076] In an embodiment of the present invention, the cloud server adaptively filters the human feature data to obtain a filtered human feature matrix, thereby realizing personalized interference removal of environmental noise according to the environments in which different users are located, avoiding the influence of human motion and environmental errors on the human feature data, and improving the accuracy of sleep state analysis.

[0077] Step 103 , extracting the sleep statistical feature values ​​in the detection target feature matrix of each time period, and constructing the sleep feature matrix of each time period.

[0078] Specifically, the cloud server can perform statistical analysis on each row of feature data in the detection target feature matrix for a certain period of time, obtain multiple sleep statistical feature values ​​corresponding to each row of feature data, and construct a sleep feature matrix for the period of time based on the multiple sleep statistical feature values ​​corresponding to each row.

[0079] In an embodiment of the present invention, sleep statistical feature values ​​in the detection target feature matrix are extracted, and a sleep feature matrix is ​​constructed to perform sleep state analysis. The matrix feature data is more accurate and stable. By extracting frequency domain and time domain features and analyzing them through matrix feature statistical methods, the accuracy of sleep state analysis can be improved.

[0080] Step 104, calculating the norm of a first matrix; the first matrix is ​​a matrix obtained by subtracting sleep feature matrices of adjacent time periods.

[0081] Specifically, the sleep feature matrix of the next period may be subtracted from the sleep feature matrix of the current period to obtain a first matrix, and the one-dimensional norm Out of the first matrix may be calculated.

[0082] Step 105: Analyze the sleep state of the detection target according to the norm of the first matrix.

[0083] Specifically, after calculating the norm of the first matrix, the sleep state may be analyzed based on the value of the calculated norm, thereby correspondingly matching the sleep state and improving the accuracy of the sleep state analysis.

[0084] In the embodiment of the present invention, a cloud server performs data calculation based on the detection target feature data to realize sleep state analysis, which can effectively reduce the resource consumption on the millimeter wave radar device side, reduce the equipment cost, and improve data security; by adaptively filtering the human body feature data to obtain the filtered human body feature matrix, personalized interference removal of environmental noise can be achieved for different user environments, avoiding the influence of human body feature data caused by human movements and environmental errors, and improving the accuracy of sleep state analysis; a sleep feature matrix is ​​constructed by extracting sleep statistical eigenvalues ​​in the detection target feature matrix, and the norm of the first matrix obtained by subtracting the sleep feature matrices of adjacent time periods is calculated, so that the sleep state of the detection target is analyzed based on the norm, and the matrix feature data is more accurate and stable. The corresponding matching analysis of sleep features and sleep states is performed based on the matrix feature analysis method, which can improve the accuracy of sleep state analysis.

[0085] In an optional embodiment, the detection target feature data includes heart rate data, breathing data and phase data; the detection target feature data is adaptively filtered to obtain the detection target feature matrix of each time period after filtering, including: for each time period, selecting the heart rate data, breathing data and phase data of the current time period, and constructing a heart rate vector, a breathing vector and a phase vector respectively; constructing an input matrix based on the heart rate vector, the breathing vector and the phase vector; obtaining a preset matrix and preset filtering parameters; based on the input matrix, iteratively calculating the filtering parameters until a preset iteration termination condition is met; according to the iteration termination result, updating the preset matrix and the preset filtering parameters, and determining the detection target feature matrix of the current time period after filtering.

[0086] Specifically, the current moment can be represented as moment t1, the next moment as moment t2, and a certain moment after that as moment t n The heart rate data at time t can be expressed as h t , and the breathing data is represented as b t , and the phase data is represented as d t .

[0087] For example, assuming that time t1 is the starting time and time t 10 The time is the end time, which is the current period T; t 11 The starting time is t 20 The time is the end time, which is the next time period T+1 adjacent to the current time period T. After receiving the detection target feature data uploaded by the millimeter wave radar device, the cloud server can select t1~t 10 Heart rate data at the moment h1~h 10 , breathing data b1~b 10 , phase data d1~d 10, respectively construct the heart rate vector H T =[h1, h2, ..., h 10 ], breathing vector B T =[b1, b2, ..., b 10 ], the phase vector D T =[b1, b2, ..., b 10 ]; you can select the next period T+1 t 11 ~t 20 Heart rate data at the moment 11 ~h 20 , breathing data b 11 ~b 20 , phase data d 11 ~d 20 , respectively construct the heart rate vector H T+1 =[h 11 ,h 12 ,……,h 20 ], breathing vector B T+1 =[b 11 , b 12 , ..., b 20 ], the phase vector D T+1 =[b 11 , b 12 , ..., b 20 ].

[0088] The heart rate vector H T , breathing vector B T and the phase vector D T Composing the input vector matrix The vector matrix is ​​a 3×10 matrix.

[0089] Get the preset matrix D X3×10 , preset filter parameter W X3×10 , and stored on the platform, that is, the cloud server. Based on the matrix X T , iteratively calculate the filter parameter W 3×10 , until the preset iteration termination condition is met; according to the iteration termination result, the preset matrix D can be updated X3×10 and preset filter parameters W X3×10 , determine the detection target feature matrix Y of the current period output after filtering T3×10 .

[0090] Similarly, the detected target feature matrix Y for the next period of time can be obtained after filtering output (T+1)3×10 , the present invention will not be described in detail here.

[0091] In the embodiment of the present invention, the matrix feature data is more accurate and more stable, and the accuracy of the sleep state analysis can be improved by analyzing it using a matrix feature statistical method.

[0092] In an optional embodiment, the filtering parameters are iteratively calculated based on the input matrix until a preset iteration termination condition is met, including: obtaining initialization filtering parameters to obtain initialization filtering parameters; performing a point multiplication operation on the initialization filtering parameters and the input matrix to obtain a second matrix; calculating the difference between the preset matrix and the second matrix to obtain a third matrix; setting a step size parameter; iteratively calculating the filtering parameters according to the initialization filtering parameters, the step size parameter, the third matrix and the input matrix until the mean square error of the third matrix is ​​less than a preset error.

[0093] Specifically, the filter parameter W can be initialized 3×10 = [0]. Set the second matrix to be the dot product of the initialization filter parameters and the input vector matrix, i.e. Y T3×10 =W 3×10 ·X T3×10 , set the third matrix to be the difference between the preset matrix and the second matrix, that is, E T3×10 =D T3×10 -Y T3×10 .

[0094] You can set the step size parameter Specifically, according to the initialization filter parameters, step size parameters, the third matrix and the input matrix, the filter parameters W can be iteratively calculated. 3×10 =

[0095] W 3×10 +α 3×1 ·E T3×10 ·X T3×10 , until the third matrix E T3×10 The mean square error is less than the preset error

[0096] In an optional embodiment, the preset matrix and the preset filtering parameters are updated according to the iteration termination result to determine the detection target feature matrix of the current time period after filtering, including: after the iteration termination, obtaining a target third matrix whose mean square error is less than a preset error; determining a target second matrix and target filtering parameters corresponding to the target third matrix; using the target second matrix as the updated preset matrix, using the target filtering parameters as the updated preset filtering parameters, and saving the updated preset matrix and the updated preset filtering parameters; and outputting the target second matrix as the detection target feature matrix of the current time period after filtering.

[0097] Specifically, the following steps can be repeated: Initialize the filter parameter W 3×10=[0]; Set Y T3×10 =W 3×10 ·X T3×10 , E T3×10 =D T3×10 -Y T3×10 ; Set the step size parameter Iteratively calculate the filter parameter W 3×10 =W 3×10 +α 3×1 ·E T3×10 ·X T3×10 , until E T3×10 The mean square error is less than the preset error

[0098] After the iteration is terminated, the preset matrix D can be X3×10 Equal to the target second matrix Y after the iteration is terminated T3×10 , let the preset filter parameter W X3×10 Equal to the target filter parameter W after the iteration is terminated 3×10 , the updated D X3×10 and W X3×10 Save. After saving, you can get the filtered output matrix Y T3×10 .

[0099] In the embodiment of the present invention, a terminal-cloud linkage bandpass filtering + adaptive filtering solution can be adopted, by storing personalized parameters D in the cloud. X3×10 and W X3×10 , personalized filtering can be achieved according to the user's usage environment, thereby realizing personalized interference removal of environmental noise and greatly improving detection accuracy.

[0100] In an optional embodiment, the extracting of sleep statistical feature values ​​in the detection target feature matrix of each time period and constructing the sleep feature matrix of each time period includes: for the detection target feature matrix of each time period, selecting the median, maximum value and minimum value in each row of feature data of the detection target feature matrix; calculating the mean value and standard deviation of each row of feature data; and constructing the sleep feature matrix according to the median, mean value, standard deviation, maximum value and minimum value of each row of feature data.

[0101] Specifically, we can target Y T3×10 The three rows of data are selected, the median, maximum value and minimum value features in each row of data are selected as basis vectors, and the mean value and standard deviation features of each row of data are calculated as basis vectors. According to the median, mean value, standard deviation, maximum value and minimum value features of each row of feature data, the sleep feature matrix C of the current period is constructed. T3×5 , an example is as follows:

[0102]

[0103] Similarly, the sleep feature matrix C for the next period can also be constructed (T+1)3×5 , the present invention will not be described in detail here.

[0104] In the embodiment of the present invention, when calculating the norm of the first matrix, specifically calculating ||C T+1 -C T ||'s one-dimensional norm Out.

[0105] In an embodiment of the present invention, the matrix feature data is more accurate and more stable. For respiratory data, heart rate data and phase data, the accuracy of sleep state analysis can be improved by extracting frequency domain and time domain features and performing analysis based on matrix feature statistical methods.

[0106] In an optional embodiment, the sleep state of the detection target is analyzed according to the norm of the first matrix, including: if the norm of the first matrix is ​​within a first preset range, determining that the detection target is in a deep sleep state; if the norm of the first matrix is ​​within a second preset range, determining that the detection target is in a light sleep state; if the norm of the first matrix is ​​within a third preset range, determining that the detection target is in an awake state; if the norm of the first matrix is ​​greater than a preset threshold, determining that the feature data is abnormal.

[0107] Exemplarily, the first preset range can be [0~0.03), the second preset range can be [0.03~0.06), the third preset range can be [0.06~0.1], and the preset threshold can be 0.1. 1) When the Out value is in [0~0.03), it can be determined that the detection target is in deep sleep; when the Out value is in [0.03~0.06), it can be determined that the detection target is in light sleep; when the Out value is in [0.06~0.1], it can be determined that the detection target is awake; when the Out value is greater than 0.1, it can be determined as data abnormality.

[0108] It should be noted that the above data range is only an example of the present invention. In practical applications, those skilled in the art can set other data ranges to determine the corresponding sleep state based on practical experience, and the present invention is not limited thereto.

[0109] In the embodiment of the present invention, a technical solution of end-to-cloud real-time communication calculation based on websocket is adopted, and the parameters are reasonably designed, which can effectively reduce the resource consumption on the end side, greatly reduce the equipment cost, and is conducive to large-scale promotion; an end-to-cloud linkage bandpass filtering + adaptive filtering solution is adopted, and personalized filtering can be achieved according to the user's usage environment by storing personalized parameters, thereby greatly improving the detection accuracy; a matrix feature analysis with a mixture of multiple features can be used to match sleep features with sleep states, realize sleep prediction more accurately, and improve the accuracy of sleep state analysis.

[0110] Figure 2 This is the second flow chart of the sleep state analysis method provided by the embodiment of the present invention. Figure 2 The embodiment of the present invention provides a sleep state analysis method, which may specifically include the following steps:

[0111] Step 201, obtaining detection target feature data at each moment.

[0112] Step 202, uploading the detection target feature data at each moment to the cloud server, so that the cloud server performs adaptive filtering on the detection target feature data to obtain the detection target feature matrix of each time period after filtering; extracting the sleep statistical feature values ​​in the detection target feature matrix of each time period, and constructing the sleep feature matrix of each time period; calculating the norm of the first matrix; the first matrix is ​​a matrix obtained by subtracting the sleep feature matrices of adjacent time periods; and analyzing the sleep state of the detection target according to the norm of the first matrix.

[0113] In an embodiment of the present invention, the millimeter wave radar device can obtain detection target feature data, which may include heart rate data, breathing data and phase data, and upload these data to a cloud server. The cloud server performs data calculation based on the detection target feature data to realize sleep state analysis, thereby effectively reducing resource consumption on the millimeter wave radar device side, reducing equipment costs, improving data security, and facilitating large-scale promotion.

[0114] Specifically, the data can be uploaded to the cloud server using the JSON (JavaScript Object Notation) data transmission format and defining specific protocol fields. Specific parameter design and upload cycle can be shown in Table 1 below.

[0115] Human breathing and heartbeat will produce motion amplitude. Millimeter wave radar is based on the capture of weak amplitude to generate signal phase changes. The detection amplitude and data format corresponding to specific breathing and heart rate can be shown in Table 1:

[0116]

[0117] Table 1

[0118] At time point t, the breathing characteristic value b can be detected. t , and the heartbeat characteristic value h t , target eigenvalue d t The forward amplitude can refer to the electrical signal strength of the millimeter wave emitted by the radar and then reflected by the target and returned to the radar antenna and detected. The backward amplitude can refer to the electrical signal strength after the radar receives the reflection from the target.

[0119] In an optional embodiment, the acquisition of detection target characteristic data at each moment includes: acquiring initial characteristic data for the detection target through a bandpass filter; calculating the average value of the initial characteristic data within two power frequency interference cycles to obtain the detection target characteristic data at the current moment.

[0120] Specifically, the millimeter-wave radar device can obtain the heart rate and breathing radar waveforms through a bandpass filter. The millimeter-wave radar frequency band used can be 60GHz, the bandpass filter sampling frequency band can be set to 56GHz-64GHz, and the update frequency is 250Hz. Since the millimeter-wave radar device is powered by AC, the 250Hz sampling frequency is an integer multiple of the power frequency (50Hz) in the AC system. Therefore, before updating the heart rate and breathing signals, the sampling data within two power frequency interference cycles can be taken, that is, 10 adjacent data, and the average value is obtained as the heart rate data and breathing data at the current moment, so that the power frequency interference can be effectively suppressed, and general random interference noise can also be filtered out.

[0121] In the embodiments of the present invention, the device cost can be reduced and the conditions for large-scale promotion can be achieved through end-to-cloud real-time communication calculation based on the websocket protocol; the breathing and heart rate waveforms can be obtained through bandpass filters and adaptive filtering methods, and personalized parameters can be confirmed for different user environments and saved in the cloud to achieve personalized interference removal of environmental noise, thereby reducing the impact of environmental factors on the signal and achieving more stable and accurate detection; for breathing and heart rate, frequency domain and time domain features can be extracted, and the matrix feature method can be used to achieve classification and recognition of feature matching with sleep state, thereby achieving sleep state prediction. Compared with the human body posture method, the data is more accurate and stable.

[0122] Figure 3 Schematic diagram of the structure of the sleep state analysis system provided by the embodiment of the present invention. Figure 3 , an embodiment of the present invention provides a sleep state analysis system, the system includes a millimeter wave radar device 301 and a cloud server 302, the millimeter wave radar device 301 and the cloud server 302 are connected based on WebSocket communication;

[0123] The millimeter wave radar device 301 is used to obtain the detection target feature data at each moment; upload the detection target feature data at each moment to the cloud server;

[0124] The cloud server 302 is used to receive the detection target feature data; adaptively filter the detection target feature data to obtain the detection target feature matrix of each time period after filtering; extract the sleep statistical feature values ​​in the detection target feature matrix of each time period to construct the sleep feature matrix of each time period; calculate the norm of the first matrix; the first matrix is ​​a matrix obtained by subtracting the sleep feature matrices of adjacent time periods; and analyze the sleep state of the detection target according to the norm of the first matrix.

[0125] In the embodiment of the present invention, a cloud server performs data calculation based on the detection target feature data to realize sleep state analysis, which can effectively reduce the resource consumption on the millimeter wave radar device side, reduce the equipment cost, and improve data security; by adaptively filtering the human body feature data to obtain the filtered human body feature matrix, personalized interference removal of environmental noise can be achieved for different user environments, avoiding the influence of human body feature data caused by human movements and environmental errors, and improving the accuracy of sleep state analysis; a sleep feature matrix is ​​constructed by extracting sleep statistical eigenvalues ​​in the detection target feature matrix, and the norm of the first matrix obtained by subtracting the sleep feature matrices of adjacent time periods is calculated, so that the sleep state of the detection target is analyzed based on the norm, and the matrix feature data is more accurate and stable. The corresponding matching analysis of sleep features and sleep states is performed based on the matrix feature analysis method, which can improve the accuracy of sleep state analysis.

[0126] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the sleep state analysis method, and the method includes:

[0127] Receive the detection target feature data at each moment uploaded by the millimeter wave radar device;

[0128] Adaptively filtering the detection target feature data to obtain a detection target feature matrix for each time period after filtering;

[0129] Extract the sleep statistical feature values ​​in the detection target feature matrix of each time period, and construct the sleep feature matrix of each time period;

[0130] Calculating the norm of a first matrix; the first matrix is ​​a matrix obtained by subtracting sleep feature matrices of adjacent time periods;

[0131] The sleeping state of the detection target is analyzed according to the norm of the first matrix.

[0132] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0133] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the sleep state analysis method provided by the above methods, the method comprising:

[0134] Receive the detection target feature data at each moment uploaded by the millimeter wave radar device;

[0135] Adaptively filtering the detection target feature data to obtain a detection target feature matrix for each time period after filtering;

[0136] Extract the sleep statistical feature values ​​in the detection target feature matrix of each time period, and construct the sleep feature matrix of each time period;

[0137] Calculating the norm of a first matrix; the first matrix is ​​a matrix obtained by subtracting sleep feature matrices of adjacent time periods;

[0138] The sleeping state of the detection target is analyzed according to the norm of the first matrix.

[0139] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0140] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0141] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. 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 embodiments of the present invention.

Claims

1. A method for analyzing sleep state, It is characterized in that Applied to a cloud server, the method includes: Receive the detection target feature data at each moment uploaded by the millimeter wave radar device; Adaptively filtering the detection target feature data to obtain a detection target feature matrix for each time period after filtering; Extract the sleep statistical feature values ​​in the detection target feature matrix of each time period, and construct the sleep feature matrix of each time period; Calculating the norm of a first matrix; the first matrix is ​​a matrix obtained by subtracting sleep feature matrices of adjacent time periods; The sleeping state of the detection target is analyzed according to the norm of the first matrix.

2. The method according to claim 1, It is characterized in that The detection target feature data includes heart rate data, breathing data and phase data; the detection target feature data is adaptively filtered to obtain the detection target feature matrix of each time period after filtering, including: For each time period, the heart rate data, breathing data and phase data of the current time period are selected to construct the heart rate vector, breathing vector and phase vector respectively; constructing an input matrix based on the heart rate vector, the breathing vector and the phase vector; Get preset matrix and preset filter parameters; Iteratively calculating filtering parameters based on the input matrix until a preset iteration termination condition is met; According to the iteration termination result, the preset matrix and the preset filtering parameters are updated to determine the detection target feature matrix of the current time period after filtering.

3. The method according to claim 2, It is characterized in that The iterative calculation of the filter parameters based on the input matrix until a preset iteration termination condition is met includes: Get the initialization filter parameters; Performing a dot multiplication operation on the initialization filter parameter and the input matrix to obtain a second matrix; Calculating the difference between the preset matrix and the second matrix to obtain a third matrix; Set the step size parameters; The filtering parameters are iteratively calculated according to the initialization filtering parameters, the step size parameters, the third matrix and the input matrix until a mean square error of the third matrix is ​​less than a preset error.

4. The method according to claim 3, It is characterized in that The step of updating the preset matrix and the preset filtering parameters according to the iteration termination result to determine the detected target feature matrix of the current time period after filtering includes: After the iteration is terminated, a target third matrix whose mean square error is less than a preset error is obtained; Determining a target second matrix and target filtering parameters corresponding to the target third matrix; Using the target second matrix as an updated preset matrix, using the target filtering parameters as updated preset filtering parameters, and saving the updated preset matrix and the updated preset filtering parameters; The target second matrix is ​​output as the detected target feature matrix of the current time period after filtering.

5. The method according to claim 1, It is characterized in that The step of extracting the sleep statistical feature values ​​in the detection target feature matrix of each time period and constructing the sleep feature matrix of each time period includes: For the detection target feature matrix of each time period, select the median, maximum value and minimum value in each row of feature data of the detection target feature matrix; Calculate the mean and standard deviation of each row of feature data; Construct a sleep feature matrix based on the median, mean, standard deviation, maximum and minimum values ​​of each row of feature data.

6. The method according to claim 1, It is characterized in that The step of analyzing the sleep state of the detection target according to the norm of the first matrix includes: If the norm of the first matrix is ​​within a first preset range, determining that the detection target is in a deep sleep state; If the norm of the first matrix is ​​within a second preset range, it is determined that the detection target is in a light sleep state; If the norm of the first matrix is ​​within a third preset range, it is determined that the detection target is in a sober state; If the norm of the first matrix is ​​greater than a preset threshold, it is determined that the feature data is abnormal.

7. A method for analyzing sleep state, It is characterized in that Applied to millimeter wave radar equipment, the method comprises: Obtaining detection target feature data at each moment; The detection target feature data at each moment is uploaded to the cloud server, so that the cloud server performs adaptive filtering on the detection target feature data to obtain the detection target feature matrix of each time period after filtering; the sleep statistical feature values ​​in the detection target feature matrix of each time period are extracted to construct the sleep feature matrix of each time period; the norm of the first matrix is ​​calculated; the first matrix is ​​a matrix obtained by subtracting the sleep feature matrices of adjacent time periods; and the sleep state of the detection target is analyzed according to the norm of the first matrix.

8. The method according to claim 7, It is characterized in that The step of obtaining the detection target feature data at each moment includes: Acquire initial feature data for the detection target through a bandpass filter; The average value of the initial characteristic data within two power frequency interference cycles is calculated to obtain the detection target characteristic data at the current moment.

9. A sleep state analysis system, It is characterized in that The system includes a millimeter wave radar device and a cloud server, and the millimeter wave radar device and the cloud server are connected based on WebSocket communication; The millimeter wave radar device is used to obtain the detection target feature data at each moment; Upload the detection target feature data at each moment to the cloud server; The cloud server is used to receive the detection target feature data; Adaptively filtering the detection target feature data to obtain a detection target feature matrix for each time period after filtering; extracting sleep statistical feature values ​​from the detection target feature matrix for each time period to construct a sleep feature matrix for each time period; Calculate the norm of a first matrix; the first matrix is ​​a matrix obtained by subtracting sleep feature matrices of adjacent time periods; and analyze the sleep state of the detection target according to the norm of the first matrix.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the sleep state analysis method according to any one of claims 1 to 8 is implemented.