Bed exit detection method and system based on radar and ai
By using millimeter-wave radar and AI technology, and utilizing frequency domain feature data and deep neural network models, combined with hidden Markov models, the problems of discomfort, high false alarm rate and environmental dependence of traditional bed exit detection have been solved, achieving high-precision bed exit action recognition and anti-interference capabilities.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-10
- Publication Date
- 2026-06-23
AI Technical Summary
Existing contact sensors and computer vision-based bed-leaving detection technologies suffer from discomfort, wear and tear, high false alarm rates, strong dependence on ambient light, and privacy concerns, making it difficult to accurately identify bed-leaving actions in complex and dynamic environments.
The system uses millimeter-wave radar to collect time-domain echo signals, generates frequency-domain feature data through range-Doppler two-dimensional transformation, performs feature extraction and semantic segmentation using a pre-trained deep neural network model, uses a hidden Markov model for temporal reasoning to determine bed-leaking actions, and establishes the spatial topological relationship between the human body's center of mass and the bed boundary to suppress false triggering due to environmental interference.
It achieves precise perception of subtle human movements, improves the accuracy and anti-interference ability of bed exit detection, reduces false alarm rate, and enhances system reliability.
Smart Images

Figure CN122250981A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to AI technology, and more particularly to a method and system for detecting bed malfunctions based on radar and AI. Background Technology
[0002] In fields such as medical monitoring, elderly care, and home security, real-time and accurate detection of bedridden individuals, especially elderly or post-operative patients, getting out of bed is a crucial safety requirement. Traditional bed-getting detection technologies primarily rely on contact sensors and computer vision-based monitoring solutions. Contact sensors typically take the form of pressure pads or wearable devices, placed under the mattress or worn on the body, detecting changes in pressure or posture to determine whether someone has gotten out of bed. Computer vision-based solutions utilize indoor cameras to capture video images, analyzing changes in the body's position and contour within the frame to identify bed-getting behavior.
[0003] While contact sensors are simple in principle, they require direct or indirect contact with the monitored object, causing discomfort to the user. Furthermore, long-term use can lead to sensor wear and displacement, resulting in decreased reliability. They are also prone to false alarms in agitated patients or unexpected body movements. Vision-based solutions are severely limited by ambient lighting conditions, with performance deteriorating sharply at night or in dimly lit environments. Continuous video surveillance also raises widespread concerns about privacy breaches. In addition, both methods struggle to reliably distinguish between genuine bed-leaning movements and irrelevant activities in complex dynamic environments, such as when sheets are wrinkled, blankets are lifted, or caregivers briefly approach. The accuracy and robustness of these detection methods need improvement. Summary of the Invention
[0004] The embodiments of the present invention provide a method and system for detecting bed closures based on radar and AI, which can solve the problems in the prior art.
[0005] A first aspect of the present invention provides a method for detecting bed exit based on radar and AI, comprising: The time-domain echo signal in the target area is acquired by millimeter-wave radar, and the time-domain echo signal is subjected to range-Doppler two-dimensional transformation to obtain frequency domain characteristic data reflecting the target's motion state. The frequency domain feature data is input into a pre-trained deep neural network model for feature extraction and semantic segmentation to obtain motion feature vectors containing human posture change trajectories and spatial position distributions. Based on the motion feature vector and the preset bed boundary constraints, a spatial topological relationship between the human body's center of mass and the bed boundary is established, and the real-time offset of the human body's center of mass relative to the bed boundary is calculated. Based on the real-time offset and historical offset sequence, a hidden Markov model is used to perform temporal reasoning to determine whether the human body has completed the step-out action at the current moment. The hidden Markov model suppresses false triggering caused by environmental interference or non-step-out body movement by setting a multi-state buffer. In response to the determination that the bed-leaving action has been completed, a bed-leaving event identifier is generated and a preset response process is triggered.
[0006] By acquiring time-domain echo signals within the target area using millimeter-wave radar and performing range-Doppler two-dimensional transform on these signals, frequency-domain characteristic data reflecting the target's motion state are obtained, including: The time-domain echo signal is framed according to the pulse repetition period, and the continuous time-domain echo signal is divided into multiple frequency-modulated pulse sequences, each of which contains a complete frequency-modulated period signal. Each frequency-modulated pulse in the frequency-modulated pulse sequence is transformed along the fast time axis to obtain a range spectrum reflecting different range units, and the range spectrum is arranged in chronological order to form a two-dimensional range-time data matrix; The time series corresponding to each distance unit in the distance-time two-dimensional data matrix is subjected to Doppler transformation along the slow time axis to extract the velocity information of the target within each distance unit and generate frequency domain feature data.
[0007] Each frequency-modulated pulse in the frequency-modulated pulse sequence is subjected to a range transformation along the fast time axis to obtain a range spectrum reflecting different range units. The range spectra are then arranged in chronological order to form a two-dimensional range-time data matrix, including: Each frequency-modulated pulse in the frequency-modulated pulse sequence is demodulated to extract the baseband signal of the frequency-modulated pulse sequence, and the baseband signal is transformed along the fast time axis to obtain a range spectrum containing target echo amplitude and phase information. The amplitude information of each distance unit in the range spectrum is dynamically compressed to suppress the masking effect of strong near-range reflection on weak far-range reflection, thus obtaining the amplitude-corrected range spectrum. The amplitude-corrected range spectrum is arranged sequentially according to the transmission order of the frequency-modulated pulse sequence on the time axis to construct a two-dimensional range-time data matrix with range cells as row indices and pulse numbers as column indices.
[0008] The frequency domain feature data is input into a pre-trained deep neural network model for feature extraction and semantic segmentation, resulting in motion feature vectors containing human posture change trajectories and spatial position distributions, including: The frequency domain feature data is input into the encoder layer of the deep neural network model. The encoder layer performs multi-scale convolution operations on the frequency domain feature data to extract multi-level abstract features that reflect human movement patterns, thereby obtaining an encoded feature map. The encoded feature map is input into the attention layer of the deep neural network model. The attention layer calculates weight coefficients for the temporal and spatial features in the encoded feature map, and the encoded feature map is weighted and fused according to the weight coefficients to generate a fused feature map. The fused feature map is input into the decoder layer of the deep neural network model. The decoder layer performs semantic segmentation on the fused feature map, identifies and labels regions in the fused feature map that belong to different parts of the human body, obtains semantic labeling results, and extracts feature information reflecting the trajectory of human posture changes and spatial position distribution based on the semantic labeling results to generate motion feature vectors.
[0009] Based on the motion feature vector and preset bed boundary constraints, a spatial topological relationship is established between the human body's center of mass and the bed boundary, and the real-time offset of the human body's center of mass relative to the bed boundary is calculated, including: The positional components reflecting the spatial distribution of the human body are extracted from the motion feature vector, and the positional components are weighted and summed to obtain the three-dimensional spatial coordinates of the human body's center of mass. The geometric representation of the bed boundary is constructed based on the preset bed boundary constraints. The geometric representation includes the boundary contour and normal vector information of the bed in space. The three-dimensional spatial coordinates are spatially mapped to the geometric representation of the bed boundary. The internal and external relationship and distance relationship of the human body's center of mass relative to the boundary contour are determined, and spatial topological relationship is established. The Euclidean distance between the three-dimensional spatial coordinates and the nearest point on the boundary contour is calculated based on the spatial topological relationship to obtain the real-time offset.
[0010] Based on the real-time offset and historical offset sequence, a hidden Markov model is used for temporal inference to determine whether the human body has completed the action of getting out of bed at the current moment, including: The real-time offset and the historical offset sequence are combined in chronological order to form an offset observation sequence. The offset observation sequence is then input into a hidden Markov model. The probability of being in bed and the probability of being out of bed corresponding to each offset value in the offset observation sequence are calculated through the observation probability distribution of the hidden Markov model. Based on the in-bed state probability and the out-of-bed state probability, combined with the state transition probability of the hidden Markov model, the state transition path corresponding to the offset observation sequence is calculated to obtain the state determination result at the current moment. If the current state determination result is an out-of-bed state, the number of consecutive times that are determined to be an out-of-bed state in the offset observation sequence is counted, and the number of times is compared with a preset multi-state buffer threshold. When the number of times reaches the multi-state buffer threshold, it is determined that the human body has completed the out-of-bed action at the current time. When the number of times does not reach the multi-state buffer threshold, it is determined that the human body has not completed the out-of-bed action at the current time.
[0011] A second aspect of the present invention provides a bed-off detection system based on radar and AI, comprising: The signal acquisition unit is used to acquire time-domain echo signals in the target area through millimeter-wave radar, and to perform range-Doppler two-dimensional transformation on the time-domain echo signals to obtain frequency-domain characteristic data reflecting the target's motion state. The feature extraction unit is used to input the frequency domain feature data into a pre-trained deep neural network model for feature extraction and semantic segmentation, so as to obtain a motion feature vector containing the trajectory of human posture change and spatial position distribution. The spatial relationship unit is used to establish the spatial topological relationship between the human body's center of mass position and the bed boundary based on the motion feature vector and the preset bed boundary constraints, and to calculate the real-time offset of the human body's center of mass position relative to the bed boundary. The temporal reasoning unit is used to perform temporal reasoning based on the real-time offset and the historical offset sequence using a hidden Markov model to determine whether the human body has completed the action of getting out of bed at the current moment. The hidden Markov model suppresses false triggering caused by environmental interference or non-bed-leaving body movement by setting a multi-state buffer. The event response unit is used to respond to the judgment result that the bed-leaving action has been completed, generate a bed-leaving event identifier and trigger a preset response process.
[0012] A third aspect of the present invention provides an electronic device, comprising: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.
[0013] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.
[0014] The beneficial effects of this application are as follows: By performing range-Doppler two-dimensional transformation on the time-domain echo signal acquired by millimeter-wave radar, frequency domain feature data is obtained, enabling the system to effectively extract feature information of the target's motion state and enhancing the ability to perceive subtle human movements.
[0015] By using a pre-trained deep neural network model to process frequency domain feature data, the accurate extraction of human posture change trajectory and spatial position distribution is achieved, breaking through the technical bottleneck of traditional methods that are difficult to distinguish between different types of body movements.
[0016] The system innovatively establishes a spatial topological relationship between the human body's center of mass and the bed's boundary, and calculates the offset in real time, enabling the system to accurately identify changes in the human body's spatial position relative to the bed and improving the accuracy of recognizing bodily movements.
[0017] By introducing a Hidden Markov Model for temporal reasoning and using a multi-state buffering mechanism, false triggers caused by environmental disturbances or non-bed-movement are effectively suppressed, significantly reducing the false alarm rate and improving the system's anti-interference capability and reliability. Attached Figure Description
[0018] Figure 1 This is a schematic flowchart of the off-bed detection method based on radar and AI according to an embodiment of the present invention. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0020] The technical solution of the present invention will be described in detail below with reference to specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0021] Figure 1 This is a schematic flowchart of the bed-off detection method based on radar and AI according to an embodiment of the present invention, as shown below. Figure 1 As shown, the method includes: The time-domain echo signal in the target area is acquired by millimeter-wave radar, and the time-domain echo signal is subjected to range-Doppler two-dimensional transformation to obtain frequency domain characteristic data reflecting the target's motion state. The frequency domain feature data is input into a pre-trained deep neural network model for feature extraction and semantic segmentation to obtain motion feature vectors containing human posture change trajectories and spatial position distributions. Based on the motion feature vector and the preset bed boundary constraints, a spatial topological relationship between the human body's center of mass and the bed boundary is established, and the real-time offset of the human body's center of mass relative to the bed boundary is calculated. Based on the real-time offset and historical offset sequence, a hidden Markov model is used to perform temporal reasoning to determine whether the human body has completed the step-out action at the current moment. The hidden Markov model suppresses false triggering caused by environmental interference or non-step-out body movement by setting a multi-state buffer. In response to the determination that the bed-leaving action has been completed, a bed-leaving event identifier is generated and a preset response process is triggered.
[0022] In one optional implementation, time-domain echo signals within the target area are acquired using millimeter-wave radar, and range-Doppler two-dimensional transform is performed on the time-domain echo signals to obtain frequency-domain feature data reflecting the target's motion state, including: The time-domain echo signal is framed according to the pulse repetition period, and the continuous time-domain echo signal is divided into multiple frequency-modulated pulse sequences, each of which contains a complete frequency-modulated period signal. Each frequency-modulated pulse in the frequency-modulated pulse sequence is transformed along the fast time axis to obtain a range spectrum reflecting different range units, and the range spectrum is arranged in chronological order to form a two-dimensional range-time data matrix; The time series corresponding to each distance unit in the distance-time two-dimensional data matrix is subjected to Doppler transformation along the slow time axis to extract the velocity information of the target within each distance unit and generate frequency domain feature data.
[0023] Millimeter-wave radar transmits frequency-modulated continuous wave signals, which generate reflected echoes after illuminating a target. These echoes contain information about the target's motion, such as distance and velocity. The time-domain echo signal acquired by the receiving antenna is a continuous analog signal, which needs to be sampled and quantized by an analog-to-digital converter to be converted into a digital signal for subsequent processing. The sampling frequency must satisfy the Nyquist sampling theorem and is typically set to at least twice the signal bandwidth to ensure the integrity of the signal information.
[0024] Millimeter-wave radar operates according to a fixed pulse repetition period. Frequency-modulated pulses are transmitted, with a period typically between 0.1 milliseconds and 10 milliseconds, depending on the detection range and velocity resolution requirements. Continuous time-domain echo signals are then processed according to… The data is segmented, with each time segment corresponding to a complete frequency modulation cycle. For example, if the radar transmits 1000 pulses per second, the pulse repetition period is 1 millisecond, and the continuously acquired data stream is divided into data frames with 1-millisecond units. Each frame of data constitutes a frequency modulation pulse sequence, containing a complete frequency scan from the start frequency to the end frequency. In practical applications, to avoid inter-frame interference, a guard interval is usually set between each frequency modulation cycle. This interval accounts for approximately 5% to 10% of the cycle, allowing time for the multipath echo of the previous pulse to completely attenuate.
[0025] Each frequency-modulated pulse sequence after framing is processed along the fast time axis. The fast time axis corresponds to the time evolution within a single frequency-modulated pulse, reflecting the target's radial distance distribution characteristics. Performing a range transform on a single frequency-modulated pulse signal essentially converts the time-domain signal to the frequency domain and extracts the difference frequency information. In specific implementation, a Fast Fourier Transform algorithm is used to process the sampled data of each pulse. Assume the number of sampling points for a single frequency-modulated pulse is... Through this Perform FFT operation on each sampling point to obtain There are 10 frequency components. Each frequency component corresponds to a specific distance unit, and the relationship between distance and frequency is determined by the frequency modulation slope. Let the frequency modulation bandwidth be B and the frequency modulation period be 1 / 2. The frequency modulation slope is The relationship between the target distance R and the difference frequency f_b is as follows: , where c represents the speed of light. This transformation maps the time-domain echo signal to a range spectrum, where the amplitude peaks of the range spectrum correspond to the distance position of the target.
[0026] To improve distance resolution, zero-padding is typically performed on the sampled data. Point expansion to Adding more points increases the frequency resolution of the FFT. Simultaneously, window functions are applied to suppress spectral leakage; commonly used window functions include the Hanning window, Hamming window, or Blackman window. The choice of window function requires a trade-off between main lobe width and side lobe suppression. For scenarios requiring high range resolution, a window function with a narrower main lobe is chosen; for complex environments with both strong and weak targets, a window function with good side lobe suppression performance is preferred.
[0027] After performing a range transformation on a single pulse, a one-dimensional range spectrum is obtained. The range spectra of multiple consecutive pulses are then arranged chronologically to construct a two-dimensional range-time data matrix. In this matrix, rows correspond to different range cells, and columns correspond to different pulse times. The matrix dimension is... ,in This indicates the number of pulses involved in the coherent processing. The choice of λ affects the velocity resolution and measurement range; it is typically chosen as an integer power of 2 between 32 and 256 to ensure efficient subsequent FFT calculations. Each element in the matrix is a complex value containing amplitude and phase information; the phase information carries the Doppler frequency shift characteristics caused by the target's motion.
[0028] For each row of the range-time two-dimensional data matrix, i.e., the time series corresponding to each range cell, a Doppler transform is performed along the slow time axis. The slow time axis corresponds to the time series of different pulse emissions, reflecting the phase changes caused by the target velocity. For a length of... Performing an FFT operation on the time series yields the Doppler spectrum. The relationship between the Doppler frequency f_d and the target radial velocity v is as follows: ,in This indicates the radar's operating wavelength. The peak position of the Doppler spectrum corresponds to the target's radial velocity; a positive frequency indicates the target is approaching the radar, while a negative frequency indicates the target is moving away from the radar.
[0029] Before performing Doppler transformation, the time series is typically preprocessed for moving target detection to eliminate the influence of static background clutter. Common methods include cancellation filters or high-pass filters, which suppress the response of stationary targets near zero frequency by subtracting data between adjacent pulses. For low-speed moving targets, a multi-stage cancellation structure can be used to enhance the clutter suppression depth. Simultaneously, a slow-time window function is applied to reduce the sidelobe level of the Doppler spectrum, improving the detection capability of small targets.
[0030] After completing the Doppler transformation of all range units, range-Doppler two-dimensional frequency domain feature data is obtained. This data is represented in the form of a two-dimensional matrix, with the horizontal axis representing the range dimension and the vertical axis representing the Doppler dimension. The amplitude values of the matrix elements reflect the echo intensity of the target at the corresponding range and velocity. By setting a constant false alarm rate (CFAR) threshold, pixels exceeding the threshold in the matrix are identified, and the range-velocity two-dimensional coordinates of the target are extracted. For multi-target scenarios, different targets occupy different positions on the two-dimensional plane, achieving effective separation between targets. The frequency domain feature data provides structured input information for subsequent high-level processing such as target classification and trajectory tracking, and its quality directly affects the detection performance of the entire system. The entire transformation process requires strict control of the numerical accuracy of each stage of signal processing to avoid quantization errors and phase noise accumulation, ensuring that weak target signals are not drowned out by processing noise.
[0031] In one optional implementation, each frequency-modulated pulse in the frequency-modulated pulse sequence undergoes a range transformation along the fast time axis to obtain a range spectrum reflecting different range units, and the range spectra are arranged in chronological order to form a range-time two-dimensional data matrix, including: Each frequency-modulated pulse in the frequency-modulated pulse sequence is demodulated to extract the baseband signal of the frequency-modulated pulse sequence, and the baseband signal is transformed along the fast time axis to obtain a range spectrum containing target echo amplitude and phase information. The amplitude information of each distance unit in the range spectrum is dynamically compressed to suppress the masking effect of strong near-range reflection on weak far-range reflection, thus obtaining the amplitude-corrected range spectrum. The amplitude-corrected range spectrum is arranged sequentially according to the transmission order of the frequency-modulated pulse sequence on the time axis to construct a two-dimensional range-time data matrix with range cells as row indices and pulse numbers as column indices.
[0032] In radar signal processing, after receiving a frequency-modulated pulse sequence, each pulse needs to undergo systematic range-direction processing to extract the target's position information. This process involves key steps such as demodulation, range-direction transformation, and dynamic range correction, ultimately constructing a two-dimensional data structure suitable for subsequent Doppler analysis.
[0033] For the received frequency-modulated pulse sequence, demodulation processing is first performed to extract the baseband signal. Since the frequency-modulated pulses transmitted by the radar typically operate in the radio frequency band, directly processing the radio frequency signal would face the problems of high sampling rate requirements and large data volume. Therefore, a quadrature demodulation method is adopted, which mixes the radio frequency echo signal with the local oscillator signal to obtain in-phase and quadrature components, respectively. Specifically, each received frequency-modulated pulse is multiplied by a copy of the transmitted signal using a complex number. The multiplied signal is then filtered by a low-pass filter to remove high-frequency components, retaining the low-frequency components containing target information, thereby obtaining the complex form of the baseband signal. The real and imaginary parts of this baseband signal correspond to the in-phase and quadrature components of the target echo, respectively, and contain complete information such as the target's range, velocity, and reflection characteristics.
[0034] After obtaining the baseband signal, a range transform is performed along the fast time axis, which corresponds to the duration of a single pulse. Different sampling points on this time axis reflect the echo delay of the target at different distances. The range transform is typically implemented using a Fast Fourier Transform (FFT), converting the time-domain baseband signal to the frequency domain to obtain the range spectrum. For linear frequency modulated (LFM) signals, target echoes at different distances manifest as different frequency components in the baseband signal. The FFT can separate these frequency components into different frequency units. The transformed range spectrum is a complex array, where each element corresponds to a range unit. The amplitude of the element reflects the reflection intensity of the target at that range unit, while the phase contains the target's precise distance and motion information. There is a linear mapping between the actual physical distance of a range unit and the frequency unit; the frequency axis can be converted to a range axis using a range resolution parameter.
[0035] In practical applications, the dynamic range of radar echoes is often very large, with the echo amplitude of strong scatterers at close range exceeding that of weak targets at long range by tens of dB or even more. If the raw range spectrum is used directly, the strong reflections at close range will dominate in display and subsequent processing, causing weak targets at long range to be obscured and unable to be effectively detected. To solve this problem, it is necessary to compress the dynamic range of the amplitude information of each range cell in the range spectrum. An effective method is to perform a logarithmic transformation on the amplitude values, mapping the linear amplitude range to the compressed dynamic range.
[0036] For example, calculating the base-10 logarithm of the amplitude value for each range cell, or using the natural logarithm, can convert the order-of-magnitude difference into an additive difference, significantly reducing the amplitude gap between strong and weak echoes. Another approach is to use square root compression or other nonlinear mapping functions, selecting an appropriate compression strategy based on the specific application scenario. After dynamic range compression, the relative visibility of weak targets at long ranges is improved, but it is crucial to maintain the integrity of phase information, as it plays a key role in subsequent Doppler processing and coherent accumulation. Therefore, compression operations typically only target the amplitude component, keeping the phase component unchanged, or using amplitude normalization methods from complex signal processing to adjust the complex signal amplitude of each range cell to a reasonable range while preserving the original phase.
[0037] After amplitude correction, a series of processed range spectra are obtained, each corresponding to a pulse in the frequency-modulated pulse sequence. These range spectra are then arranged according to the pulse transmission time to construct a range-time two-dimensional data matrix. The row indices of this matrix correspond to range cells, representing different distances from the radar to the target; the column indices correspond to pulse numbers, representing different slow-time sampling points. Specifically, the range spectrum of the first pulse is used as the first column of the matrix, the range spectrum of the second pulse as the second column, and so on, until the range spectra of all pulses are filled into the matrix. Assuming each range spectrum contains N_r range cells and the frequency-modulated pulse sequence contains N_p pulses, the dimension of the constructed two-dimensional matrix is... Each element in the matrix is a complex number, whose amplitude reflects the echo intensity of the corresponding range cell at the pulse moment, and whose phase reflects the relative motion state of the target.
[0038] This two-dimensional data matrix lays the foundation for subsequent Doppler analysis. Each row of the matrix represents the time series of a fixed range cell over all pulse periods. If a moving target exists in that range cell, the time series will exhibit phase changes caused by the Doppler effect. By performing a fast time-axis Fourier transform on each row, the target's velocity information can be extracted, achieving range-Doppler two-dimensional imaging. Simultaneously, the two-dimensional matrix structure facilitates the implementation of various clutter suppression and target detection algorithms, such as moving target indication and constant false alarm rate (CFAR) detection. The matrix's data organization also benefits parallel processing and hardware acceleration, improving real-time processing capabilities.
[0039] In practical implementation, several engineering details need to be considered. For example, during range transformation, zero-padding can increase frequency resolution and improve the precision of the range spectrum. The specific parameters of dynamic range compression need to be adjusted based on the application scenario and target characteristics to achieve a balance between suppressing strong reflections and preserving weak targets. The storage format of the two-dimensional matrix should be optimized according to the access patterns of subsequent processing algorithms, such as using row-major or column-major storage to improve cache hit rate and computational efficiency. Through these refined processing steps, high-quality range-time two-dimensional data can be obtained, providing a reliable data foundation for accurate target detection and parameter estimation.
[0040] In one optional implementation, the frequency domain feature data is input into a pre-trained deep neural network model for feature extraction and semantic segmentation to obtain a motion feature vector containing the trajectory of human posture changes and spatial position distribution, including: The frequency domain feature data is input into the encoder layer of the deep neural network model. The encoder layer performs multi-scale convolution operations on the frequency domain feature data to extract multi-level abstract features that reflect human movement patterns, thereby obtaining an encoded feature map. The encoded feature map is input into the attention layer of the deep neural network model. The attention layer calculates weight coefficients for the temporal and spatial features in the encoded feature map, and the encoded feature map is weighted and fused according to the weight coefficients to generate a fused feature map. The fused feature map is input into the decoder layer of the deep neural network model. The decoder layer performs semantic segmentation on the fused feature map, identifies and labels regions in the fused feature map that belong to different parts of the human body, obtains semantic labeling results, and extracts feature information reflecting the trajectory of human posture changes and spatial position distribution based on the semantic labeling results to generate motion feature vectors.
[0041] After acquiring the frequency domain feature data, it is necessary to perform in-depth feature extraction and semantic segmentation to accurately identify the posture change trajectory and spatial position distribution of the human body during movement. This processing is implemented through a pre-trained deep neural network model, which adopts a three-layer architecture of encoder-attention-decoder, and can gradually complete the transformation from raw frequency domain data to high-level semantic features.
[0042] After the frequency domain feature data is input into the encoder layer of the deep neural network model, the encoder layer performs multi-scale convolution operations on the input data. This encoder layer typically contains three to five convolutional modules, each with a different kernel size. For example, the first layer uses a 7×7 kernel to capture macroscopic motion features, the second layer uses a 5×5 kernel to extract medium-scale motion patterns, and subsequent layers gradually shrink to 3×3 kernels to obtain fine-grained local motion details. Within each convolutional module, batch normalization and activation function operations follow the convolution operation. The activation function can be a modified linear unit function to introduce non-linear characteristics and accelerate network convergence.
[0043] Through multi-scale convolution operations, the encoder layer can extract multi-level abstract features reflecting human movement patterns from frequency domain feature data. Features extracted from shallow layers are closer to the original data, containing rich texture and edge information, and can reflect the basic contours of human limbs in space. Features extracted from deeper layers are more abstract, capable of representing complex movement patterns, such as gait cycles, arm swing patterns, and other high-level semantic information. The features extracted from each layer together constitute the encoded feature map, which contains feature representations at different levels of abstraction in the channel dimension and preserves the relative positional relationships of different parts of the human body in the spatial dimension.
[0044] After obtaining the encoded feature map, it is input into the attention layer of the deep neural network model for further processing. The core function of the attention layer is to assign differentiated importance weights to features of different dimensions in the encoded feature map, thereby highlighting the feature components most relevant to changes in human posture. This attention layer calculates weights for both temporal and spatial features. For the temporal dimension, the attention mechanism analyzes the changing patterns of frequency domain feature data over time, identifying key moments in the movement process, such as the moment of landing in gait and the highest point of a jump. Features corresponding to these key moments are assigned higher weight coefficients.
[0045] In the temporal dimension weight calculation, a scalar weight value is calculated for each time segment of the encoded feature map on the time axis. This weight value is obtained by performing global average pooling on the feature vector of that time segment, followed by two fully connected layers. The output of the fully connected network is normalized using a softmax function to ensure that the sum of the weights of all time segments is 1. For the spatial dimension, the attention mechanism focuses on the spatial distribution of different body parts, assigning higher weights to regions containing significant motion information. For example, in walking, the leg region has a higher feature weight, while the torso region has a relatively lower weight; in waving, the arm region receives the highest weight. The spatial dimension weight calculation generates a weight coefficient for each spatial location of the encoded feature map. This coefficient is obtained by performing convolution operations and a sigmoid activation function on the features of that location and its neighborhood.
[0046] After calculating the time and spatial weight coefficients, the attention layer performs a weighted fusion operation on the encoded feature map. The weighted fusion process includes two steps: the first is temporal weighting, which multiplies the time-dimension weight coefficients element-wise with the corresponding features on the time axis of the encoded feature map, amplifying features at critical moments and suppressing features at non-critical moments; the second is spatial weighting, which multiplies the spatial-dimension weight coefficients element-wise with the time-weighted feature map at spatial locations, highlighting the feature representations of important body parts. After this double weighting, a fused feature map is generated. This fused feature map, while retaining the multi-scale information of the original encoded feature map, further enhances the spatiotemporal features directly related to changes in human posture and suppresses interference from background noise and irrelevant information.
[0047] After the fused feature map is fed into the decoder layer of the deep neural network model, the decoder layer performs semantic segmentation. The decoder layer employs an architecture combining upsampling and convolution to progressively restore the spatial resolution of the feature map. The decoder layer typically contains multiple decoding modules symmetrical to the encoder layer. Each decoding module first performs bilinear interpolation or transposed convolution on the input feature map to achieve upsampling, increasing the size of the feature map. Then, it refines the feature representation through convolution operations. During the upsampling process, the decoder layer uses skip connections to concatenate the feature map of the corresponding level in the encoder layer with the feature map of the current decoding layer. This connection method allows the decoding process to utilize high-level semantic information while preserving low-level spatial details, effectively avoiding the loss of spatial information during upsampling. After multi-layer decoding, the spatial resolution of the feature map is restored to the same size as the input frequency domain feature data.
[0048] After the feature map resolution is restored, the decoder layer performs pixel-level classification to identify the semantic category of each pixel in the feature map. This classification operation is achieved by adding a convolutional layer to the last layer of the decoder. The number of output channels of this convolutional layer is equal to the number of body part categories to be identified. For example, if the human body can be divided into six regions—head, torso, left arm, right arm, left leg, and right leg—then the number of output channels is set to six. For each pixel location, the convolutional layer outputs a six-dimensional vector, where each component represents the probability that the pixel belongs to the corresponding body part. The final category of the pixel is determined by comparing the magnitudes of the components. After classifying all pixels, the semantic annotation result is obtained, which is presented in the form of a label map, where the value of each pixel represents the body part category to which that point belongs.
[0049] Based on semantic annotation results, feature information reflecting the trajectory and spatial distribution of human posture changes is extracted. The posture change trajectory is obtained by tracking the movement path of the centroid of each body part over time. For example, the centroid coordinates of the right hand region at each time point are extracted, and the curve formed by connecting these coordinate points is the movement trajectory of the right hand.
[0050] Based on the motion feature vector and preset bed boundary constraints, a spatial topological relationship is established between the human body's center of mass and the bed boundary, and the real-time offset of the human body's center of mass relative to the bed boundary is calculated, including: The positional components reflecting the spatial distribution of the human body are extracted from the motion feature vector, and the positional components are weighted and summed to obtain the three-dimensional spatial coordinates of the human body's center of mass. The geometric representation of the bed boundary is constructed based on the preset bed boundary constraints. The geometric representation includes the boundary contour and normal vector information of the bed in space. The three-dimensional spatial coordinates are spatially mapped to the geometric representation of the bed boundary. The internal and external relationship and distance relationship of the human body's center of mass relative to the boundary contour are determined, and spatial topological relationship is established. The Euclidean distance between the three-dimensional spatial coordinates and the nearest point on the boundary contour is calculated based on the spatial topological relationship to obtain the real-time offset.
[0051] After the monitoring system collects human motion data and generates motion feature vectors, deep analysis of these feature vectors is required to determine the precise position of the human body within the bed space. Positional components reflecting the spatial distribution of the human body are extracted from the motion feature vectors. These components typically include the spatial coordinates of key body parts such as the center point of the torso, the midpoint of the shoulders, and the midpoint of the hips. Since different body parts contribute differently to the overall center of mass, a weighted summation method is more reasonable. Specifically, a higher weighting coefficient (e.g., 0.5 to 0.6) is assigned to the torso, as its mass accounts for a large proportion of the total body mass; a medium weighting coefficient (e.g., 0.15 to 0.25) is assigned to the shoulders and hips; and a lower weighting coefficient (e.g., 0.05 to 0.1) is assigned to the extremities. By summing the products of each positional component and its corresponding weighting coefficient, a comprehensive three-dimensional spatial coordinate system is obtained. This coordinate system is established with a fixed corner of the bed as the origin, representing displacement along the length and width of the bed in the horizontal direction, and height above the bed surface in the vertical direction.
[0052] To achieve precise monitoring of human body position, it is necessary to pre-define boundary constraints for the bed and construct its geometric representation based on these constraints. These constraints include the actual dimensions of the bed; for example, a standard single bed is typically 1.9 to 2 meters long, 0.9 to 1.2 meters wide, and 0.4 to 0.5 meters high. Based on these parameters, the geometry of the bed's boundaries is defined in three-dimensional space. The bed is usually simplified to a cuboid model, with its boundary outline defined by six planes: the surface, the bottom, and the four sides. For each boundary plane, its normal vector in space is calculated. The normal vector is a unit vector perpendicular to the plane and pointing outwards from the bed. For example, the normal vector of the front side of the bed points towards the front, and the normal vector of the right side points towards the right side. This normal vector information plays a crucial role in subsequently determining the relationship between the human body position and the boundaries.
[0053] Establishing spatial topological relationships requires spatial mapping analysis between the calculated three-dimensional spatial coordinates of the human body's center of mass and the geometric representation of the bed's boundaries. By comparing the center of mass coordinates with the positions of each boundary plane, it is determined whether the center of mass is located within the safe zone inside the bed. Specifically, the center of mass coordinates are substituted into the plane equation of each boundary plane, which can be expressed as the dot product of a point and a normal vector. If the directed distance from the center of mass to a boundary plane is positive, the center of mass is located on the outer side of that plane; if it is negative, it is located on the inner side. Only when the directed distances from the center of mass to all boundary planes satisfy the inner side condition can it be determined that the center of mass is inside the bed. This method establishes the inner-outer relationship between the center of mass position and the bed boundaries. Simultaneously, distance relationships also need to be established, i.e., calculating the perpendicular distances from the center of mass to each boundary plane. Distance relationships quantify the degree to which the center of mass approaches the boundary; as the center of mass gradually moves towards a boundary, the corresponding distance value continuously decreases, providing continuous monitoring data for the early warning system.
[0054] After establishing the spatial topology, the real-time offset is further calculated for refined monitoring. The real-time offset is defined as the Euclidean distance between the human body's centroid in 3D space and the nearest point on the bed's boundary contour. The process of finding the nearest point involves traversing all boundary planes on the bed's boundary contour. For each boundary plane, the projection point of the centroid onto that plane is calculated. If the projection point falls within the actual range of the boundary plane, it is the closest point to the centroid on that plane. If the projection point exceeds the plane's range, the edge segments and vertices of the boundary plane need to be further examined to find the closest point to the centroid among these geometric elements. After obtaining all candidate closest points from the centroid to each boundary plane, the Euclidean distance between the centroid and each candidate point is calculated. The Euclidean distance is obtained by taking the square root of the sum of the squares of the differences between the coordinates of two points in 3D space. The minimum value among all distance values is selected as the real-time offset.
[0055] The dynamic changes in real-time offset directly reflect the movement trend of a person on the bed. When the user is in the central area of the bed, the offset value is relatively large, usually within the range of 0.3 to 0.5 meters, indicating that the user has a sufficient safe distance from any boundary. When the user rolls over or moves to one side, the offset begins to decrease. If the offset drops below 0.2 meters, it indicates that the user is approaching the boundary, and the system can issue a low-level warning. When the offset further decreases to below 0.1 meters, it indicates that the user is very close to the edge of the bed, posing a high risk of falling. The system should issue a high-level alarm and trigger protective measures such as raising the guardrails. Through continuous monitoring of the offset and threshold judgment, it is possible to achieve all-weather real-time monitoring of the user's position, allowing for timely intervention before a fall occurs, significantly improving the safety of bed use, especially suitable for the elderly, patients, and other groups requiring intensive care. The entire calculation process has high real-time performance, completing a complete position update and offset calculation within tens of milliseconds, meeting the timeliness requirements of dynamic monitoring.
[0056] In one optional implementation, determining whether the human body has completed the step of getting out of bed at the current moment by performing temporal reasoning using a hidden Markov model based on the real-time offset and the historical offset sequence includes: The real-time offset and the historical offset sequence are combined in chronological order to form an offset observation sequence. The offset observation sequence is then input into a hidden Markov model. The probability of being in bed and the probability of being out of bed corresponding to each offset value in the offset observation sequence are calculated through the observation probability distribution of the hidden Markov model. Based on the in-bed state probability and the out-of-bed state probability, combined with the state transition probability of the hidden Markov model, the state transition path corresponding to the offset observation sequence is calculated to obtain the state determination result at the current moment. If the current state determination result is an out-of-bed state, the number of consecutive times that are determined to be an out-of-bed state in the offset observation sequence is counted, and the number of times is compared with a preset multi-state buffer threshold. When the number of times reaches the multi-state buffer threshold, it is determined that the human body has completed the out-of-bed action at the current time. When the number of times does not reach the multi-state buffer threshold, it is determined that the human body has not completed the out-of-bed action at the current time.
[0057] After acquiring the real-time and historical offset sequences, these offset values are combined in chronological order of data generation to form a complete offset observation sequence. This offset observation sequence reflects the trend of bed pressure distribution over time, where each offset value represents the degree of deviation of the bed pressure distribution from the baseline pressure template at a specific moment. This offset observation sequence is then input into a Hidden Markov Model (HMM) for processing. As a statistical model, the HMM describes the process of generating an unobservable sequence of states randomly from an implicit Markov chain, and then generating an observation value from each state to produce the observation sequence. In the bed-off monitoring scenario, the hidden states of the HMM include both bed-state and bed-off-state, while the observable values are the offset values in the offset observation sequence.
[0058] The observation probability distribution of a Hidden Markov Model (HMM) describes the probability of an observation occurring in a specific hidden state. For bed-out monitoring applications, this probability distribution is typically modeled using a Gaussian distribution or a Gaussian mixture distribution. In the bed-in state, because the pressure distribution is close to the baseline template due to the person lying down, the observation probability distribution in this state is concentrated around smaller offset values. In the bed-out state, because the pressure distribution deviates significantly from the baseline template, the observation probability distribution in this state is concentrated around larger offset values. Using the observation probability distribution, the probability of each offset value in the offset observation sequence occurring in the bed-in state and the probability of it occurring in the bed-out state can be calculated. For example, when the offset value at a certain moment is 0.15, the probability distribution shows that the offset value has a probability of 0.85 in the bed-in state and a probability of 0.15 in the bed-out state, indicating that the person is in the bed-in state at that moment.
[0059] After obtaining the in-bed state probability and out-of-bed state probability corresponding to the offset values at each time point, it is necessary to combine the state transition probabilities of the Hidden Markov Model to determine the state path of the entire observation sequence. The state transition probability describes the probability of transitioning from one hidden state to another, including the probability of transitioning from in-bed state to in-bed state, from in-bed state to out-of-bed state, from out-of-bed state to in-bed state, and from out-of-bed state to out-of-bed state. These state transition probabilities are obtained statistically from a large amount of sample data and reflect the temporal characteristics of out-of-bed behavior. Generally, in-bed and out-of-bed states have a strong self-transition tendency, meaning the probability of transitioning from in-bed state to in-bed state is high, and the probability of transitioning from out-of-bed state to out-of-bed state is also high, while the transition probability between in-bed and out-of-bed states is relatively low.
[0060] The Viterbi algorithm is used to calculate the state transition path corresponding to the offset observation sequence. The Viterbi algorithm is a dynamic programming algorithm that finds the hidden state sequence that generated the observation sequence. Starting from the first time step of the offset observation sequence, the algorithm calculates the probability of being in each hidden state at that time step based on the initial state probability and the observation probability. Then, it progresses forward time step by time. For each state at each time step, it calculates the path probability of transitioning from each state at the previous time step to that state and retains the path with the highest probability. In this way, after traversing the entire offset observation sequence, the Viterbi algorithm can backtrack to obtain the optimal state transition path, thus obtaining the state determination result for the current time step. For example, if the state transition path calculated by the Viterbi algorithm is "in bed - in bed - in bed - out of bed - out of bed", then the state determination result for the current time step is "out of bed".
[0061] When the state determination result obtained through Hidden Markov Model inference at the current moment is "out of bed," it is not immediately determined that the person has completed the action of getting out of bed. This is because, in practical applications, pressure sensor data may be affected by noise interference, or violent turning movements of the person in bed may cause a short-term increase in the offset value, leading to a misjudgment as an out-of-bed state. To avoid such misjudgments, a multi-state buffer mechanism is introduced to further confirm the out-of-bed action. Specifically, the state determination results at each moment in the offset observation sequence are statistically analyzed, and the number of consecutive moments determined as an out-of-bed state starting from a certain moment is calculated. This number of moments reflects the duration of the out-of-bed state.
[0062] The number of consecutive moments identified as being in an "out-of-bed" state is compared to a preset multi-state buffer threshold. This threshold is set according to actual application needs and is typically between 3 and 5 moments. When the number of consecutive moments identified as being in an "out-of-bed" state reaches or exceeds the multi-state buffer threshold, it indicates that the "out-of-bed" state has lasted long enough to confirm that the person has truly completed the action of getting out of bed. At this time, an "out-of-bed" alarm signal is output to remind caregivers to pay attention to the safety of the monitored person. Conversely, if the number of consecutive moments identified as being in an "out-of-bed" state does not reach the multi-state buffer threshold, it is determined that the person has not yet completed the action of getting out of bed, and monitoring continues until further observation data is collected.
[0063] By employing Hidden Markov Models (HMMs) for temporal inference and combining them with a multi-state buffering mechanism, the temporal information contained in historical observation data can be fully utilized to improve the accuracy and robustness of bed-leaning behavior detection. HMMs can capture the dynamic characteristics of bed-leaning behavior, effectively distinguishing genuine bed-leaning actions from disruptive actions such as turning over in bed. The multi-state buffering mechanism further reduces the false alarm rate by requiring the bed-leaning state to persist for a certain duration before confirming the bed-leaning action, ensuring the reliability of the monitoring system in practical applications.
[0064] A second aspect of the present invention provides a bed-off detection system based on radar and AI, comprising: The signal acquisition unit is used to acquire time-domain echo signals in the target area through millimeter-wave radar, and to perform range-Doppler two-dimensional transformation on the time-domain echo signals to obtain frequency-domain characteristic data reflecting the target's motion state. The feature extraction unit is used to input the frequency domain feature data into a pre-trained deep neural network model for feature extraction and semantic segmentation, so as to obtain a motion feature vector containing the trajectory of human posture change and spatial position distribution. The spatial relationship unit is used to establish the spatial topological relationship between the human body's center of mass position and the bed boundary based on the motion feature vector and the preset bed boundary constraints, and to calculate the real-time offset of the human body's center of mass position relative to the bed boundary. The temporal reasoning unit is used to perform temporal reasoning based on the real-time offset and the historical offset sequence using a hidden Markov model to determine whether the human body has completed the action of getting out of bed at the current moment. The hidden Markov model suppresses false triggering caused by environmental interference or non-bed-leaving body movement by setting a multi-state buffer. The event response unit is used to respond to the judgment result that the bed-leaving action has been completed, generate a bed-leaving event identifier and trigger a preset response process.
[0065] A third aspect of the present invention provides an electronic device, comprising: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.
[0066] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.
[0067] This invention can be a method, apparatus, system, and / or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of the invention.
[0068] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for detecting bed closures based on radar and AI, characterized in that, include: The time-domain echo signal in the target area is acquired by millimeter-wave radar, and the time-domain echo signal is subjected to range-Doppler two-dimensional transformation to obtain frequency domain characteristic data reflecting the target's motion state. The frequency domain feature data is input into a pre-trained deep neural network model for feature extraction and semantic segmentation to obtain motion feature vectors containing human posture change trajectories and spatial position distributions. Based on the motion feature vector and the preset bed boundary constraints, a spatial topological relationship between the human body's center of mass and the bed boundary is established, and the real-time offset of the human body's center of mass relative to the bed boundary is calculated. Based on the real-time offset and historical offset sequence, a hidden Markov model is used to perform temporal reasoning to determine whether the human body has completed the step-out action at the current moment. The hidden Markov model suppresses false triggering caused by environmental interference or non-step-out body movement by setting a multi-state buffer. In response to the determination that the bed-leaving action has been completed, a bed-leaving event identifier is generated and a preset response process is triggered.
2. The method according to claim 1, characterized in that, By acquiring time-domain echo signals within the target area using millimeter-wave radar and performing range-Doppler two-dimensional transform on these signals, frequency-domain characteristic data reflecting the target's motion state are obtained, including: The time-domain echo signal is framed according to the pulse repetition period, and the continuous time-domain echo signal is divided into multiple frequency-modulated pulse sequences, each of which contains a complete frequency-modulated period signal. Each frequency-modulated pulse in the frequency-modulated pulse sequence is transformed along the fast time axis to obtain a range spectrum reflecting different range units, and the range spectrum is arranged in chronological order to form a two-dimensional range-time data matrix; The time series corresponding to each distance unit in the distance-time two-dimensional data matrix is subjected to Doppler transformation along the slow time axis to extract the velocity information of the target within each distance unit and generate frequency domain feature data.
3. The method according to claim 2, characterized in that, Each frequency-modulated pulse in the frequency-modulated pulse sequence is subjected to a range transformation along the fast time axis to obtain a range spectrum reflecting different range units. The range spectra are then arranged in chronological order to form a two-dimensional range-time data matrix, including: Each frequency-modulated pulse in the frequency-modulated pulse sequence is demodulated to extract the baseband signal of the frequency-modulated pulse sequence, and the baseband signal is transformed along the fast time axis to obtain a range spectrum containing target echo amplitude and phase information. The amplitude information of each distance unit in the range spectrum is dynamically compressed to suppress the masking effect of strong near-range reflection on weak far-range reflection, thus obtaining the amplitude-corrected range spectrum. The amplitude-corrected range spectrum is arranged sequentially according to the transmission order of the frequency-modulated pulse sequence on the time axis to construct a two-dimensional range-time data matrix with range cells as row indices and pulse numbers as column indices.
4. The method according to claim 1, characterized in that, The frequency domain feature data is input into a pre-trained deep neural network model for feature extraction and semantic segmentation, resulting in motion feature vectors containing human posture change trajectories and spatial position distributions, including: The frequency domain feature data is input into the encoder layer of the deep neural network model. The encoder layer performs multi-scale convolution operations on the frequency domain feature data to extract multi-level abstract features that reflect human movement patterns, thereby obtaining an encoded feature map. The encoded feature map is input into the attention layer of the deep neural network model. The attention layer calculates weight coefficients for the temporal and spatial features in the encoded feature map, and the encoded feature map is weighted and fused according to the weight coefficients to generate a fused feature map. The fused feature map is input into the decoder layer of the deep neural network model. The decoder layer performs semantic segmentation on the fused feature map, identifies and labels regions in the fused feature map that belong to different parts of the human body, obtains semantic labeling results, and extracts feature information reflecting the trajectory of human posture changes and spatial position distribution based on the semantic labeling results to generate motion feature vectors.
5. The method according to claim 1, characterized in that, Based on the motion feature vector and preset bed boundary constraints, a spatial topological relationship is established between the human body's center of mass and the bed boundary, and the real-time offset of the human body's center of mass relative to the bed boundary is calculated, including: The positional components reflecting the spatial distribution of the human body are extracted from the motion feature vector, and the positional components are weighted and summed to obtain the three-dimensional spatial coordinates of the human body's center of mass. The geometric representation of the bed boundary is constructed based on the preset bed boundary constraints. The geometric representation includes the boundary contour and normal vector information of the bed in space. The three-dimensional spatial coordinates are spatially mapped to the geometric representation of the bed boundary. The internal and external relationship and distance relationship of the human body's center of mass relative to the boundary contour are determined, and spatial topological relationship is established. The Euclidean distance between the three-dimensional spatial coordinates and the nearest point on the boundary contour is calculated based on the spatial topological relationship to obtain the real-time offset.
6. The method according to claim 1, characterized in that, Based on the real-time offset and historical offset sequence, a hidden Markov model is used for temporal inference to determine whether the human body has completed the action of getting out of bed at the current moment, including: The real-time offset and the historical offset sequence are combined in chronological order to form an offset observation sequence. The offset observation sequence is then input into a hidden Markov model. The probability of being in bed and the probability of being out of bed corresponding to each offset value in the offset observation sequence are calculated through the observation probability distribution of the hidden Markov model. Based on the in-bed state probability and the out-of-bed state probability, combined with the state transition probability of the hidden Markov model, the state transition path corresponding to the offset observation sequence is calculated to obtain the state determination result at the current moment. If the current state determination result is an out-of-bed state, the number of consecutive times that are determined to be an out-of-bed state in the offset observation sequence is counted, and the number of times is compared with a preset multi-state buffer threshold. When the number of times reaches the multi-state buffer threshold, it is determined that the human body has completed the out-of-bed action at the current time. When the number of times does not reach the multi-state buffer threshold, it is determined that the human body has not completed the out-of-bed action at the current time.
7. A radar and AI-based bed-off detection system for implementing the method described in any one of claims 1-6, characterized in that, include: The signal acquisition unit is used to acquire time-domain echo signals in the target area through millimeter-wave radar, and to perform range-Doppler two-dimensional transformation on the time-domain echo signals to obtain frequency-domain characteristic data reflecting the target's motion state. The feature extraction unit is used to input the frequency domain feature data into a pre-trained deep neural network model for feature extraction and semantic segmentation, so as to obtain a motion feature vector containing the trajectory of human posture change and spatial position distribution. The spatial relationship unit is used to establish the spatial topological relationship between the human body's center of mass position and the bed boundary based on the motion feature vector and the preset bed boundary constraints, and to calculate the real-time offset of the human body's center of mass position relative to the bed boundary. The temporal reasoning unit is used to perform temporal reasoning based on the real-time offset and the historical offset sequence using a hidden Markov model to determine whether the human body has completed the action of getting out of bed at the current moment. The hidden Markov model suppresses false triggering caused by environmental interference or non-bed-leaving body movement by setting a multi-state buffer. The event response unit is used to respond to the judgment result that the bed-leaving action has been completed, generate a bed-leaving event identifier and trigger a preset response process.
8. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1 to 6.