In-bed detection method and device based on flexible thin film resistive pressure sensor
Through the bed-leaving detection method based on flexible thin-film resistive pressure sensors, the bed-leaving status of the elderly or patients is monitored in real time, solving the problems of monitoring and preventing falling from bed, not turning over, and potential escape, and achieving safe and timely intervention and personalized services. .
Patent Information
- Application Number
- CN202111640867.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2041-12-30
AI Technical Summary
Existing technology is difficult to effectively monitor and prevent the elderly or patients who may fall out of bed and do not stand up for a long time, especially in environments where they live alone or are recuperating in bed, and cannot effectively prevent potential escape behaviors. .
Using a bed-leaving detection method based on a flexible thin-film resistive pressure sensor, through real-time data collection, filtering processing, extreme point marking, signal matching and extension, envelope fitting and IMF component analysis, it can determine whether the user is in bed, sideways, or out of bed status, and issue corresponding alarms to ensure timely monitoring and early warning.
It realizes the safety monitoring of the elderly and patients, promptly prevents bed falling accidents and long-term failure to stand up, ensures timely intervention by nursing staff, prevents escape behaviors in a strictly supervised environment, and provides personalized services and effective supervision support.
Smart Images

Figure CN114366083B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of bed leaving state monitoring, and in particular to a bed leaving detection method and device based on a flexible thin film resistive pressure sensor. Background Art
[0002] As people pay more attention to and focus on sleep status, research on bed leaving status monitoring is gradually emerging.
[0003] At present, the elderly (especially those living alone or bedridden for a long time) have an increasingly prominent demand for life services, medical care, etc. Due to the decline of various physiological functions, the elderly have a high proportion of bed rest under daily circumstances. Therefore, the focus of elderly care is mostly on the care of bedridden patients. In hospitals, rehabilitation centers or ordinary residents' homes, the most common medical care problems for bedridden patients represented by the elderly include accidental falls from bed and pressure sores. For the elderly and patients, how to use technological means to prevent the elderly or patients from falling from the bed without anyone knowing and the elderly or patients from not turning over for a long time without anyone knowing, and to ensure the safety of the elderly and patients, is urgent.
[0004] In addition, for some special supervision places, there may be situations where heavy objects are placed on the bed while people leave. It is urgent to use technological means to prevent relevant personnel from escaping based on pressure monitoring sensors during bed leaving status monitoring.
[0005] In order to solve the above problems, people have been seeking an ideal technical solution. Summary of the invention
[0006] The object of the present invention is to address the deficiencies of the prior art and thus provide a method and device for detecting leaving bed based on a flexible thin film resistive pressure sensor.
[0007] In order to achieve the above object, the technical solution adopted by the present invention is:
[0008] A first aspect of the present invention provides a method for detecting leaving bed based on a flexible thin film resistive pressure sensor, the method comprising the following steps:
[0009] Step 1, reading the original bed-in-out data x(t) collected in real time, and filtering the original bed-in-out data using an IIR data filter;
[0010] Step 2, determine the left endpoint SL and the right endpoint SR of the filtered original bed leaving data x(t), mark all the maximum points of the filtered original bed leaving data x(t) from left to right, and obtain the maximum point set GM, and mark all the minimum points of the filtered original bed leaving data x(t) from left to right, and obtain the minimum point set GN;
[0011] Among them, the maximum point set GM={M max ǀM0,M1,…,M k},M max Represents the maximum value among all maxima, M0 represents the first maximum point, M k represents the last maximum point; the minimum point set GN = {N min ǀN0,N1,…,N k’},N min represents the minimum value among all the minimum values, N0 represents the first minimum point, N k’ Indicates the last minimum point;
[0012] Step 3, determine whether the first maximum point M0 of the original bed leaving data x(t) after filtering is before the first minimum point N0:
[0013] If so, the signal segment between the left endpoint SL and the first minimum point N0 in the filtered original bed leaving data x(t) is used as the signal segment to be matched ω ML , taking the first maximum point M0 as the matching center, the signal segment to be matched is matched from left to right in the order of the maximum points. ML Move rightward in sequence to obtain a set of signal segments ω to be matched ML Target signal segments of the same length ω MLi ; Calculate each target signal segment ω respectively MLi and the signal segment to be matched ω ML The nearest similarity distance P MLi , the nearest similarity distance P MLi The target signal segment ω corresponding to the minimum value of MLj As the best matching signal segment ω LB ;
[0014] Otherwise, the signal segment between the left endpoint SL and the first maximum point M0 in the filtered original bed leaving data x(t) is used as the signal segment to be matched NL , taking the first minimum point N0 as the matching center, the signal segment to be matched is matched from left to right in the order of the minimum points. NL Move rightward in sequence to obtain a set of signal segments ω to be matched NL Target signal segments of the same length ωNLi ; Calculate each target signal segment ω respectively NLi and the signal segment to be matched ω NL The nearest similarity distance P NLi , the nearest similarity distance P NLi The target signal segment ω corresponding to the minimum value of NLj As the best matching signal segment ω LB ;
[0015] Determine the last maximum point M of the original bed leaving data x(t) after filtering k Is it at the last minimum point N k’ Before:
[0016] If so, the last maximum point M in the original bed leaving data x(t) after filtering is k The signal segment between the right endpoint SR is the signal segment to be matched ω NR , with the last minimum point N k’ The signal segment ω to be matched is divided into the matching center according to the minimum point from right to left. NR Move left in sequence to obtain a set of signal segments to be matched ω NR Target signal segments of the same length ω NRi ; Calculate each target signal segment ω respectively NRi and the signal segment to be matched ω NR The nearest similarity distance P NRi , the nearest similarity distance P NRi The target signal segment ω corresponding to the minimum value of NRj As the best matching signal segment ω RB ;
[0017] Otherwise, the last minimum point N in the original bed leaving data x(t) after filtering is k’ The signal segment between the right endpoint SR is the signal segment to be matched ω MR , with the last maximum point M k The signal segment to be matched is ω, which is the matching center, and is sequentially divided from right to left according to the maximum value point. MR Move left in sequence to obtain a set of signal segments to be matched ω MR Target signal segments of the same length ω MRi ; Calculate each target signal segment ω respectively MRi and the signal segment to be matched ω MR The nearest similarity distance P MRi , the nearest similarity distance P MRi The target signal segment ω corresponding to the minimum value of MRj As the best matching signal segment ω RB ;
[0018] Step 4, based on the best matching signal segment ω LB The filtered original bed leaving data x(t) is extended to the left, and based on the best matching signal segment ω RB The original bed leaving data x(t) after filtering is extended to the right to obtain new bed leaving data x'(t);
[0019] Step 5: Fit the new bed leaving data x'(t) using a cubic spline curve to obtain the upper envelope e max (t) and the lower envelope e min (t), and calculate the envelope mean value m(t);
[0020] The target bed leaving data h(t) is obtained by subtracting the envelope average value m(t) from the new bed leaving data x'(t); the target bed leaving data h(t) includes a set of first target bed leaving data h i (t), the first target is in the bed leaving data h i (t) is the target bed leaving data in the i-th time interval;
[0021] Step 6, determining each of the first targets in the bed leaving data h i (t) Whether it is an IMF component, if so, the first target will be corresponding to the bed leaving data h i (t) As the second target, the bed leaving data c i (t); otherwise, the new bed leaving data x'(t) = the first target bed leaving data h i (t), re-execute step 5 until the IMF conditions are met;
[0022] Among them, the second target is in the bed leaving data c i (t) is the IMF component of the i-th time interval;
[0023] Step 7, remove the second target in the bed leaving data c i (t) in the extended part, the third target is obtained in the bed leaving data c i '(t);
[0024] The original bed leaving data x(t) after filtering is subtracted from the third target bed leaving data c i '(t), get the fourth target in the bed leaving data r i (t);
[0025] Step 8, based on the third target, the bed leaving data c i '(t) and the fourth target in the bed leaving data r i (t) Perform bed leaving status detection:
[0026] If the first threshold ≤ the third target in the bed leaving data c i '(t), and the second threshold ≤ the fourth target in the bed leaving data r i If the maximum value of (t) is less than the third threshold, it is determined that the person to be tested is in bed and lying flat during the i-th time interval;
[0027] If the first threshold ≤ the third target in the bed leaving data c i '(t), and the third threshold ≤ the fourth target in the bed leaving data r i (t) is the maximum value, then it is determined that the person to be tested is in bed and lying sideways during the i-th time interval;
[0028] If the third target is in the bed leaving data c i The maximum value of '(t) < the first threshold value, and the second threshold value ≤ the fourth target in the bed leaving data r i If the maximum value of (t) is less than the third threshold, it is determined that the person to be tested is out of bed and there is a heavy object on the bed during the i-th time interval;
[0029] If the third target is in the bed leaving data c i '(t) is less than the first threshold value, and the fourth target is in the bed leaving data r i If the maximum value of (t) is less than the second threshold, it is determined that the person to be tested is out of bed during the i-th time interval;
[0030] The first threshold value is less than the second threshold value and less than the third threshold value.
[0031] A second aspect of the present invention provides a bed leaving detection device based on a flexible thin film resistive pressure sensor, comprising a memory, a processor, and a bed leaving detection program based on a flexible thin film resistive pressure sensor stored in the memory and executable on the processor. When the bed leaving detection program based on the flexible thin film resistive pressure sensor is executed by the processor, the steps of the bed leaving detection method based on the flexible thin film resistive pressure sensor as described above are implemented.
[0032] A third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the above-mentioned method for detecting leaving bed based on a flexible thin film resistive pressure sensor are implemented.
[0033] The beneficial effects of the present invention are:
[0034] 1) The present invention proposes a bed leaving detection method based on a flexible thin film resistive pressure sensor, which analyzes and processes the original bed leaving data x(t) collected in real time to obtain the third target bed leaving data c in different time intervals.i '(t) and the fourth target in the bed leaving data r i (t); Based on the third target, the bed leaving data c i '(t) and the fourth target in the bed leaving data r i (t) Performing in-bed and out-of-bed status detection to determine whether the person under test is in the i-th time interval in a lying state, in the bed and lying on his side, out of bed with a heavy object in bed, or out of bed, so as to provide personalized services for different users;
[0035] 2) When the time for the person to be tested to leave the bed exceeds the first preset time threshold, the first bed leaving alarm is issued; for the elderly and patients, nurses or accompanying personnel can obtain the bed leaving information at the first time, so as to provide timely assistance, and can effectively monitor the time and duration of their bed leaving at night, so as to prevent the elderly or patients from falling from the bed without anyone knowing, thereby avoiding the occurrence of accidents;
[0036] 3) For users who need strict supervision, it can effectively monitor their time and duration of leaving bed at night, which is convenient for management personnel to carry out inspections; at the same time, when the user who needs strict supervision is in the state of leaving bed and there is a heavy object in the bed, the second leaving bed alarm can be issued in time to prevent cheating;
[0037] 4) For users who are bedridden for a long time and cannot turn over on their own, the system can record the number of times they turn over. If the number of times they turn over does not exceed the threshold within the preset turning over detection interval, an alarm will be issued in time to prevent the situation where the elderly or patients do not turn over for a long time without anyone knowing.
[0038] 5) For users who must stay in bed to rest, when it is detected that they are leaving the bed, the third bed leaving alarm will be issued immediately to avoid the phenomenon of leaving the bed without authorization and being supervised. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 It is a flow chart of the bed leaving detection method based on the flexible thin film resistive pressure sensor of the present invention;
[0040] Figure 2 The best matching signal segment ω obtained by the present invention LB Flowchart of
[0041] Figure 3 This is the process of the bed leaving monitoring part of the present invention Figure 1 ;
[0042] Figure 4 This is the process of the bed leaving monitoring part of the present invention Figure 2 ;
[0043] Figure 5The fourth object of the present invention is to obtain bed leaving data r i (t) is a schematic diagram of a specific embodiment;
[0044] Figure 6 The third object of the present invention is to obtain the bed leaving data c i '(t) is a schematic diagram of a specific embodiment;
[0045] Figure 7 It is a structural schematic diagram of an in-bed detection device based on a flexible thin film resistive pressure sensor. DETAILED DESCRIPTION
[0046] The technical solution of the present invention is further described in detail below through specific implementation methods.
[0047] Example 1
[0048] Attached Figure 1 and attached Figure 2 A flow chart of a method for detecting leaving the bed based on a flexible thin film resistive pressure sensor is shown, and the method for detecting leaving the bed comprises the following steps:
[0049] Step 1, according to a preset detection period T, read the original bed leaving data x(t) collected in real time, and use an IIR data filter to filter the original bed leaving data;
[0050] Step 2, determine the left endpoint SL and the right endpoint SR of the filtered original bed leaving data x(t), mark all the maximum points of the filtered original bed leaving data x(t) from left to right, and obtain the maximum point set GM, and mark all the minimum points of the filtered original bed leaving data x(t) from left to right, and obtain the minimum point set GN;
[0051] Among them, the maximum point set GM={M max ǀM0,M1,…,M k}, the maximum point set is arranged in ascending order according to the horizontal coordinate of the maximum point, M max Represents the maximum value among all maxima, M0 represents the first maximum point, M k represents the last maximum point; the minimum point set GN = {N min ǀN0,N1,…,N k’}, the minimum point set is arranged in ascending order according to the horizontal coordinate of the minimum point, N min represents the minimum value among all the minimum values, N0 represents the first minimum point, N k’ Indicates the last minimum point;
[0052] Step 3, determine whether the first maximum point M0 of the original bed leaving data x(t) after filtering is before the first minimum point N0:
[0053] If (the abscissa of the first maximum point M0 is less than the abscissa of the first minimum point N0), the signal segment between the left endpoint SL and the first minimum point N0 in the filtered original bed leaving data x(t) is used as the signal segment to be matched ω ML , taking the first maximum point M0 as the matching center, the signal segment to be matched is matched from left to right in the order of the maximum points. ML Move rightward in sequence to obtain a set of signal segments ω to be matched ML Target signal segments of the same length ω MLi ; Calculate each target signal segment ω respectively MLi and the signal segment to be matched ω ML The nearest similarity distance P MLi , the nearest similarity distance P MLi The target signal segment ω corresponding to the minimum value of MLj As the best matching signal segment ω LB ;
[0054] Otherwise (the abscissa of the first maximum point M0 is greater than the abscissa of the first minimum point N0), the signal segment between the left endpoint SL and the first maximum point M0 in the filtered original bed leaving data x(t) is used as the signal segment to be matched ω NL , taking the first minimum point N0 as the matching center, the signal segment to be matched is matched from left to right in the order of the minimum points. NL Move rightward in sequence to obtain a set of signal segments ω to be matched NL Target signal segments of the same length ω NLi ; Calculate each target signal segment ω respectively NLi and the signal segment to be matched ω NL The nearest similarity distance P NLi , the nearest similarity distance P NLi The target signal segment ω corresponding to the minimum value of NLj As the best matching signal segment ω LB ;
[0055] Determine the last maximum point M of the original bed leaving data x(t) after filtering k Is it at the last minimum point N k’ Before:
[0056] If (the last maximum point M k The horizontal coordinate is less than the last minimum point N k’The horizontal coordinate of the filtered original bed leaving data x(t) is the last maximum point M k The signal segment between the right endpoint SR is the signal segment to be matched ω NR , with the last minimum point N k’ The signal segment ω to be matched is divided into the matching center according to the minimum point from right to left. NR Move left in sequence to obtain a set of signal segments to be matched ω NR Target signal segments of the same length ω NRi ; Calculate each target signal segment ω respectively NRi and the signal segment to be matched ω NR The nearest similarity distance P NRi , the nearest similarity distance P NRi The target signal segment ω corresponding to the minimum value of NRj As the best matching signal segment ω RB ;
[0057] Otherwise (the last maximum point M k The horizontal coordinate is greater than the last minimum point N k’ The horizontal axis of the filtered original bed leaving data x(t) is the last minimum point N k’ The signal segment between the right endpoint SR is the signal segment to be matched ω MR , with the last maximum point M k As the matching center, the signal segment to be matched is divided into MR Move left in sequence to obtain a set of signal segments to be matched ω MR Target signal segments of the same length ω MRi ; Calculate each target signal segment ω respectively MRi and the signal segment to be matched ω MR The nearest similarity distance P MRi , the nearest similarity distance P MRi The target signal segment ω corresponding to the minimum value of MRj As the best matching signal segment ω RB ;
[0058] Step 4, based on the best matching signal segment ω LB The filtered original bed leaving data x(t) is extended to the left, and based on the best matching signal segment ω RB The original bed leaving data x(t) after filtering is extended to the right to obtain new bed leaving data x'(t);
[0059] Step 5: Fit the new bed leaving data x'(t) using a cubic spline curve to obtain the upper envelope e max (t) and the lower envelope emin (t), and calculate the envelope average value m(t), the formula is as follows:
[0060] m(t)=(e max (t)+e min (t) ÷ 2
[0061] The target bed leaving data h(t) is obtained by subtracting the envelope average value m(t) from the new bed leaving data x'(t). The formula is as follows:
[0062] h(t)=x'(t)-m(t)
[0063] The target bed leaving data h(t) comprises a set of first target bed leaving data h i (t), the first target is in the bed leaving data h i (t) is the target bed leaving data in the i-th time interval, and the i-th time interval is a part of the preset detection period T;
[0064] Step 6, determining each of the first targets in the bed leaving data h i (t) Whether it is an IMF component, if so, the first target will be corresponding to the bed leaving data h i (t) As the second target, the bed leaving data c i (t); otherwise, the new bed leaving data x'(t) = the first target bed leaving data h i (t), re-execute step 5 until the IMF conditions are met;
[0065] Among them, the second target is in the bed leaving data c i (t) is the IMF component of the i-th time interval;
[0066] Step 7, remove the second target in the bed leaving data c i (t) in the extended part, the third target is obtained in the bed leaving data c i '(t); wherein the third target is in the bed leaving data c i '(t) contains the highest frequency component in the original signal;
[0067] The original bed leaving data x(t) after filtering is subtracted from the third target bed leaving data c i '(t), get the fourth target in the bed leaving data r i (t), the formula is as follows:
[0068] r i (t)=x(t)-c i '(t)
[0069] Step 8, based on the third target, the bed leaving data c i'(t) and the fourth target in the bed leaving data r i (t) Perform bed leaving status detection:
[0070] If the first threshold ≤ the third target in the bed leaving data c i '(t), and the second threshold ≤ the fourth target in the bed leaving data r i If the maximum value of (t) is less than the third threshold, it is determined that the person to be tested is in bed and lying flat during the i-th time interval;
[0071] If the first threshold ≤ the third target in the bed leaving data c i '(t), and the third threshold ≤ the fourth target in the bed leaving data r i (t) is the maximum value, then it is determined that the person to be tested is in bed and lying sideways during the i-th time interval;
[0072] If the third target is in the bed leaving data c i The maximum value of '(t) < the first threshold value, and the second threshold value ≤ the fourth target in the bed leaving data r i If the maximum value of (t) is less than the third threshold, it is determined that the person to be tested is out of bed and there is a heavy object on the bed during the i-th time interval;
[0073] If the third target is in the bed leaving data c i '(t) is less than the first threshold value, and the fourth target is in the bed leaving data r i If the maximum value of (t) is less than the second threshold, it is determined that the person to be tested is out of bed during the i-th time interval;
[0074] The first threshold value is less than the second threshold value and less than the third threshold value.
[0075] Specifically, in step 3, the signal segment to be matched is sequentially divided into ML Move rightward in sequence to obtain a set of signal segments ω to be matched ML Target signal segments of the same length ω MLi When , the target signal segment of this group is ω ML1 ,ω ML2 ,…,ω ML(k-1) ; Among them, the target signal segment ω ML1 is the signal segment to be matched ω ML The first maximum point M0 moves rightward to the second maximum point M1 to obtain the signal segment, the target signal segment ω ML2 is the signal segment to be matched ω ML The first maximum point M0 moves rightward to the third maximum point M2 to obtain the signal segment, and so on, to obtain a set of target signal segments ω ML1 ,ωML2 ,…,ω ML(k-1) In other cases, the target signal segment is generated in a similar manner and will not be described in detail here.
[0076] Wherein, in step 3, each target signal segment ω is calculated respectively. MLi and the signal segment to be matched ω ML The nearest similarity distance P MLi When , the following formula is used:
[0077]
[0078] Among them, D i Represents the target signal segment ω MLi and the signal segment to be matched ω ML The matching distance between them, ρ represents the target signal segment ω MLi and the signal segment to be matched ω ML The waveform similarity coefficient between them, ε is a very small positive number to prevent the denominator from being zero when ρ is equal to zero.
[0079] It should be noted that the target signal segment ω MLi and the signal segment to be matched ω ML The larger the waveform similarity coefficient ρ between the target signal segment ω MLi and the signal segment to be matched ω ML The more similar they are, the greater the difference; the matching distance D i The target signal segment ω is quantitatively given MLi and the signal segment to be matched ω ML The overall difference in amplitude between the two: The waveform similarity coefficient ρ qualitatively emphasizes the target signal segment ω MLi and the signal segment to be matched ω ML Each criterion is one-sided and cannot fully measure the target signal segment ω. MLi and the signal segment to be matched ω ML The similarity between them, this embodiment takes into account the two factors of amplitude and shape, and gives the target signal segment ω MLi and the signal segment to be matched ω ML The closest similarity distance P between MLi The definition of is as shown above; the nearest similarity distance P NLi , the nearest similarity distance P NRi , the nearest similarity distance P MRi The formula is similar to the above formula and will not be repeated here.
[0080] It can be understood that the matching distance D iIf the smaller the value, the closer the amplitudes of the two signals are; if the larger the waveform similarity coefficient ρ, the closer the target signal segment ω is. MLi and the signal segment to be matched ω ML The more similar the waveforms are; it can be seen that when the nearest similarity distance P is smaller, it indicates that the target signal segment ω MLi and the signal segment to be matched ω ML The closer they are, the bigger the gap is.
[0081] Specifically, in step 4, based on the best matching signal segment ω LB When the filtered original bed leaving data x(t) is extended to the left: the best matching signal segment ω is obtained LB The horizontal coordinate X corresponding to the first maximum point M0 in the Central Plains LB , X LB -L gets the horizontal coordinate X p , where L is the distance between the left endpoint SL of the signal segment to be matched and the first maximum point M0 (the first maximum point M0 of the original bed leaving data x(t) is before the first minimum point N0) or the first minimum point N0 (the first maximum point M0 of the original bed leaving data x(t) is after the first minimum point N0);
[0082] From the horizontal coordinate X p Starting from the previous point of data, the filtered original bed leaving data x(t) is extended to the left to the left end point SL. In order to meet the requirements of the cubic spline interpolation at the extreme values at both ends of the signal, the filtered original bed leaving data x(t) is extended to a certain extreme value position M i Dot or N i Click here M i Dot or N i The subscript i<abscissa X p The subscript p.
[0083] It can be understood that based on the best matching signal segment ω RB The way of extending the filtered original bed leaving data x(t) to the right is similar to that of extending it to the left, which will not be described in detail here.
[0084] It should be noted that in step 5, when the cubic spline curve is used to fit the upper and lower envelopes to obtain the local average value, this fitting is based on the extreme points of the signal. In general, the algorithm cannot automatically determine whether the endpoint is an extreme point, so it is always impossible to accurately fit the envelope near the signal endpoint, resulting in the upper envelope e max (t) and the lower envelope e min(t) distortion, affecting EMD decomposition, and even the first component decomposed is not real, resulting in distortion of the subsequent decomposition results. To solve this problem, this embodiment adopts the nearest similar waveform extension method to solve the endpoint problem. The key to endpoint extension is to determine the change trend of the original signal at the endpoint. Through step 3, a sub-wave that is very similar to the change trend at the endpoint is found inside the signal, and the front and back data of this sub-wave are used to extend the waveform at the endpoint of the signal. This extension method protects the change characteristics of the original signal to the greatest extent, thereby effectively suppressing the generation of the endpoint effect.
[0085] As attached Figure 4 As shown, in step 6, it is determined that each of the first targets has a bed leaving data h i (t) is an IMF component. The IMF component must satisfy two IMF conditions: 1. The number of extreme points and the number of zero crossing points are the same or differ by at most one, 2. The upper and lower envelopes are locally symmetric about the time axis. If the above two conditions are met, then h i (t) is an IMF component.
[0086] Specifically, in step 7, the second target is removed from the bed leaving data c i (t), retain the original filtered bed leaving data x(t) corresponding to the second target bed leaving data c i (t), remove the second target outside the time interval of the original bed leaving data x(t) after filtering. i Section (t).
[0087] It can be understood that various body movements are inevitable events during sleep. These include slight body movements and larger movements, such as turning over. When slight body movements occur, the duration of such movements is short, and the signal amplitude does not fluctuate greatly. However, for larger body movements such as turning sideways, turning over, and stretching legs at night, the duration of the event is generally more than 5 seconds, and the waveform will show obvious amplitude changes. Therefore, in this embodiment, when detecting whether the person to be tested is in bed and lying flat, in bed and sideways, out of bed with heavy objects on the bed, or out of bed in the i-th time interval, it is only necessary to judge the peak value of the signal peak.
[0088] It should be noted that the human chest cavity will rise and fall periodically during the breathing process, and the weak force generated is captured by the flexible thin film resistive pressure sensor and converted into an electrical signal; the original signal is easily interfered by various factors during the collection, amplification and analog-to-digital conversion process, causing the signal to be submerged in strong background noise. In order to correctly analyze and diagnose the original signal, it is necessary to preprocess it to remove the influence of noise; this embodiment uses an IIR data filter to process the original signal to remove baseline drift.
[0089] It can be understood that the fourth goal is to i The schematic diagram of (t) is shown in the attached Figure 5 As shown in Figure 1, the actions of getting into bed, turning over, and leaving bed can be clearly monitored; when the person to be tested breathes normally in the i-th time interval, the third target is in the leaving bed data c i '(t) tends to be consistent; when the person under test breathes abnormally ((body movement, etc.)) in the i-th time interval, the third target is in the bed leaving data c i The magnitude of '(t) will be prominent, as shown in the following Figure 6 As shown in the attached Figure 5 and 6 As shown in FIG. 1 , the object has no regular movements when it is on the bed, and the pressure curve has significant characteristics, while the body movement of the person can be well detected; this embodiment monitors the fourth target in the bed leaving data r i When the (t) value changes and is less than the set minimum threshold, an exit-from-bed alarm will be issued, and an alarm signal will be sent to the PC and mobile phone for an alarm prompt.
[0090] Specifically, the first threshold is 1800, the second threshold is 3000, and the third threshold is 50000; it can be understood that step 8 specifically includes:
[0091] If 1800 ≤ the third target in the bed leaving data c i '(t) maximum value, and 3000≤the fourth target in the bed leaving data r i If the maximum value of (t) is less than 50000, it is determined that the person to be tested is in bed and lying flat during the i-th time interval;
[0092] If 1800 ≤ the third target in the bed leaving data c i '(t) maximum value, and 50000≤the fourth target in the bed leaving data r i (t) is the maximum value, then it is determined that the person to be tested is in bed and lying sideways during the i-th time interval;
[0093] If the third target is in the bed leaving data c i '(t) maximum value <1800, and 3000 ≤ the fourth target in the bed leaving data ri If the maximum value of (t) is less than 50000, it is determined that the person under test is out of bed and there is a heavy object on the bed during the i-th time interval;
[0094] If the third target is in the bed leaving data c i '(t) has a maximum value < 1800, and the fourth target is in the bed leaving data r i If the maximum value of (t) is less than 3000, it is determined that the person to be tested is out of bed during the i-th time interval.
[0095] It should be noted that if the third target is in the bed leaving data c i '(t) has a maximum value < 1800, and 50000 ≤ the fourth target in the bed leaving data r i (t) is the maximum value, then it is determined that the person to be tested is out of bed and there is a heavy object on the bed during the i-th time interval, or it is marked as invalid data; in addition, it is generally not the case that: 1800≤the third target is out of bed data c i '(t) is the maximum value and the fourth target is in the bed leaving data r i The maximum value of (t) is less than 3000.
[0096] Furthermore, after step 8, the following is further performed: when the person to be tested is in an out-of-bed state in the i-th time interval and in the in-bed state in the i-1-th time interval, marking the i-th time interval as the start time of this out-of-bed state;
[0097] If, starting from the i-th time interval, the first preset time threshold is exceeded and the person to be tested is still detected to be out of bed, a first bed leaving alarm is issued; when the person to be tested is a first user object, the first preset time threshold is T1, when the person to be tested is a second user object, the first preset time threshold is T2, and when the person to be tested is a third user object, the first preset time threshold is T3; wherein, T1<T2<T3.
[0098] Specifically, during sleep, the person to be tested may need to leave the bed for a short time due to reasons such as getting up at night. In order to avoid false alarms for the above situations, a first preset time threshold is set, and a first bed leaving alarm is issued when the person to be tested leaves the bed for more than the first preset time threshold, otherwise there is no need to initiate an alarm; the first user object can be a first type of user object that requires strict supervision (such as prisoners), the second user object can be a second type of user object that requires strict supervision (such as soldiers or students), and the third user object can be an elderly person or a patient; therefore, this embodiment can effectively monitor whether different user objects are out of bed at night, making it convenient for management personnel to carry out inspections.
[0099] It can be understood that the bed leaving detection method based on the flexible thin film resistive pressure sensor proposed in the present invention monitors the occupancy of the user's bed, which can not only distinguish whether the bed is occupied, but also distinguish between people and objects, and will not affect the normal rest of the personnel; based on the third target bed leaving data c i '(t) and the fourth target in the bed leaving data r i (t) The system detects the results of bed leaving status and uploads the changes in bed occupancy in real time. It also provides a bed monitoring software platform, which allows patrol personnel to check the occupancy of the beds currently managed and give priority to abnormal situations (the first bed leaving alarm).
[0100] Example 2
[0101] The difference between this embodiment and embodiment 1 is that:
[0102] After step 8, the following is further performed: when it is determined that the person to be tested is out of bed and there is a heavy object on the bed within the i-th time interval, and the person to be tested is the first user object, a second out-of-bed alarm is issued.
[0103] It can be understood that since the bed leaving detection method is based on a flexible thin film resistive pressure sensor, when a person leaves the bed and places a heavy object on the bed, the Figure 3 As shown, only the pressure value of the flexible thin film resistive pressure sensor is considered, and there may be a misjudgment phenomenon, that is, the person to be tested is in the out-of-bed state and there is a heavy object on the bed, which is misjudged as the person to be tested is in the bed state; in view of this phenomenon, this embodiment monitors whether: the third target is in the out-of-bed data c i The maximum value of '(t) < the first threshold value and the second threshold value ≤ the fourth target in the bed leaving data r i The maximum value of (t) is less than the third threshold, thereby reducing the misjudgment rate.
[0104] Furthermore, after step 8, the following is also performed: when it is determined that the person to be tested is in bed and lying on its side in the i-th time interval, and the person to be tested is the fourth user object, the number of times the person to be tested turns over is increased by 1; within a preset turning over detection interval (for example, one day), it is determined whether the number of times the fourth user object turns over exceeds a threshold value, and if it does not exceed the threshold value, a turning over alarm is issued.
[0105] Specifically, the fourth user object is a user object who has been bedridden for a long time and cannot turn over independently. These user objects need to rely on caregivers or family members to turn over; this embodiment can record the number of times the fourth user object turns over within a preset turning over detection interval, and issue a turning over alarm in time to avoid the situation where the elderly or patients do not turn over for a long time without anyone knowing.
[0106] Furthermore, after step 8, the following is further performed: when it is determined that the person to be tested is out of bed during the i-th time interval and the person to be tested is a fifth user object, a third out of bed alarm is issued.
[0107] Specifically, the fifth user object is a user object that must rest in bed or a paralyzed person; in real life, whether a user object that must rest in bed stays in bed for a preset time often depends on the consciousness of the fifth user object and cannot be effectively supervised; this embodiment immediately issues a third bed leaving alarm when it detects that such user objects are in a bed leaving state, so as to avoid the phenomenon of leaving the bed without authorization and being supervised; for paralyzed persons, once their bed leaving behavior is discovered, a bed falling accident may occur, and an alarm should be issued immediately at this time to assist medical and accompanying personnel in the inspection and care of patients and the elderly to avoid accidents.
[0108] Furthermore, after step 8, the following is also performed: when the person to be tested is out of bed in the i-th time interval and is in bed in the i-1-th time interval, the i-th time interval is marked as the start time of this out-of-bed; if the person to be tested is detected to be in bed again starting from the i-th time interval, the corresponding time interval is used as the end time of this out-of-bed; based on the start time of this out-of-bed and the end time of this out-of-bed, the out-of-bed time of the person to be tested is estimated, and the out-of-bed time of the person to be tested corresponding to different user objects is recorded, so as to facilitate the estimation of sleep quality according to the out-of-bed time of the person to be tested corresponding to the user object.
[0109] For example, when the time for a person to be tested to leave bed corresponding to a certain type of user object is greater than a preset threshold for the time of leaving bed, and the number of times of leaving bed is greater than a preset threshold for the number of times of leaving bed, it is determined that the sleep quality of the user object of this type is unqualified.
[0110] Example 3
[0111] The present embodiment provides a bed leaving detection device based on a flexible thin film resistive pressure sensor, wherein the bed leaving detection device based on the flexible thin film resistive pressure sensor comprises a memory, a processor, and a bed leaving detection program based on the flexible thin film resistive pressure sensor stored in the memory and executable on the processor, wherein the bed leaving detection program based on the flexible thin film resistive pressure sensor implements the steps of the bed leaving detection method based on the flexible thin film resistive pressure sensor in Embodiment 1 or 2 when executed by the processor.
[0112] As attached Figure 7As shown, the bed leaving detection device based on the flexible thin film resistive pressure sensor also includes a flexible thin film resistive pressure sensor, a signal conditioning module, an alarm module, a power module and a wireless transmission module, wherein the flexible thin film resistive pressure sensor adopts flexible pressure sensing technology to print pressure-sensitive flexible nano-functional materials on a flexible and light substrate material, has good flexibility and ductility, and can even be freely bent or folded, and has flexible and diverse structural forms, and can be arbitrarily arranged according to the requirements of the measurement conditions. Through a specific pressure-resistance relationship, the non-electrical pressure change is converted into a resistance change by using the piezoresistive effect, and then converted into a voltage signal output by the back-end signal conditioning module; the signal conditioning module shapes and amplifies the voltage signal output by the sensor, so that the signal size can fall within the sampling voltage range of the ADC, which is convenient for the subsequent ADC to perform data sampling and conversion; therefore, the processor obtains a voltage signal (AD sampling value) that changes with time t.
[0113] Specifically, the wireless transmission module exchanges data with the platform software through the Lora wireless communication method, and can synchronously transmit the pressure change data, breathing status data, and alarm signal of the person to be tested to the monitoring platform or mobile phone.
[0114] Example 4
[0115] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the bed exit detection method based on a flexible thin film resistive pressure sensor as in Embodiment 1 or 2 are implemented.
[0116] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0117] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0118] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the above modules is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0119] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0120] If the above-mentioned integrated module is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The above-mentioned computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the above-mentioned computer program includes computer program code, and the above-mentioned computer program code can be in source code form, object code form, executable file or some intermediate form, etc.
[0121] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, ordinary technicians in the field should understand that the specific implementation methods of the present invention can still be modified or some technical features can be replaced by equivalents without departing from the spirit of the technical solution of the present invention, which should be included in the scope of the technical solution for protection of the present invention.
Claims
1. A method for detecting leaving bed based on a flexible thin film resistive pressure sensor, characterized in that: The following steps are involved: Step 1, reading the original bed-out data x(t) collected in real time, and filtering the original bed-out data using an IIR data filter; Step 2, determine the left endpoint SL and the right endpoint SR of the filtered original bed leaving data x(t), mark all the maximum points of the filtered original bed leaving data x(t) from left to right, and obtain the maximum point set GM, and mark all the minimum points of the filtered original bed leaving data x(t) from left to right, and obtain the minimum point set GN; Among them, the maximum point set GM={M max ǀM0,M1,…,M k },M max Represents the maximum value among all maxima, M0 represents the first maximum point, M k represents the last maximum point; the minimum point set GN = {N min ǀN0,N1,…,N k’ },N min Represents the minimum value among all minimum values, N0 represents the first minimum point, N k’ Indicates the last minimum point; Step 3, determine whether the first maximum point M0 of the original bed leaving data x(t) after filtering is before the first minimum point N0: If so, the signal segment between the left endpoint SL and the first minimum point N0 in the filtered original bed leaving data x(t) is used as the signal segment to be matched ω ML , taking the first maximum point M0 as the matching center, the signal segment to be matched is matched from left to right in the order of the maximum points. ML Move rightward in sequence to obtain a set of signal segments ω to be matched ML Target signal segments of the same length ω MLi ; Calculate each target signal segment ω respectively MLi and the signal segment to be matched ω ML The nearest similarity distance P MLi , the nearest similarity distance P MLi The target signal segment ω corresponding to the minimum value of MLj As the best matching signal segment ω LB ; Otherwise, the signal segment between the left endpoint SL and the first maximum point M0 in the filtered original bed leaving data x(t) is used as the signal segment to be matched NL , taking the first minimum point N0 as the matching center, the signal segment to be matched is matched from left to right in the order of the minimum points. NL Move rightward in sequence to obtain a set of signal segments ω to be matched NL Target signal segments of the same length ω NLi ; Calculate each target signal segment ω respectively NLi and the signal segment to be matched ω NL The nearest similarity distance P NLi , the nearest similarity distance P NLi The target signal segment ω corresponding to the minimum value of NLj As the best matching signal segment ω LB ; Determine the last maximum point M of the original bed leaving data x(t) after filtering k Is it at the last minimum point N k’ Before: If so, the last maximum point M in the original bed leaving data x(t) after filtering is k The signal segment between the right endpoint SR is the signal segment to be matched ω NR , with the last minimum point N k’ The signal segment ω to be matched is divided into the matching center according to the minimum point from right to left. NR Move left in sequence to obtain a set of signal segments to be matched ω NR Target signal segments of the same length ω NRi ; Calculate each target signal segment ω respectively NRi and the signal segment to be matched ω NR The nearest similarity distance P NRi , the nearest similarity distance P NRi The target signal segment ω corresponding to the minimum value of NRj As the best matching signal segment ω RB ; Otherwise, the last minimum point N in the original bed leaving data x(t) after filtering is k’ The signal segment between the right endpoint SR is the signal segment to be matched ω MR , with the last maximum point M k As the matching center, the signal segment to be matched is divided into MR Move left in sequence to obtain a set of signal segments to be matched ω MR Target signal segments of the same length ω MRi ; Calculate each target signal segment ω respectively MRi and the signal segment to be matched ω MR The nearest similarity distance P MRi , the nearest similarity distance P MRi The target signal segment ω corresponding to the minimum value of MRj As the best matching signal segment ω RB ; Step 4, based on the best matching signal segment ω LB The filtered original bed leaving data x(t) is extended to the left, and based on the best matching signal segment ω RB The original bed leaving data x(t) after filtering is extended to the right to obtain new bed leaving data x'(t); Step 5: Fit the new bed leaving data x'(t) using a cubic spline curve to obtain the upper envelope e max (t) and the lower envelope e min (t), and calculate the envelope mean value m(t); The target bed leaving data h(t) is obtained by subtracting the envelope average value m(t) from the new bed leaving data x'(t); the target bed leaving data h(t) includes a set of first target bed leaving data h i (t), the first target is in the bed leaving data h i (t) is the target bed leaving data in the i-th time interval; Step 6, determining each of the first targets in the bed leaving data h i (t) Whether it is an IMF component, if so, the first target will be corresponding to the bed leaving data h i (t) As the second target, the bed leaving data c i (t); otherwise, the new bed leaving data x'(t) = the first target bed leaving data h i (t), re-execute step 5 until the IMF conditions are met; Among them, the second target is in the bed leaving data c i (t) is the IMF component of the i-th time interval; Step 7, remove the second target in the bed leaving data c i (t) in the extended part, the third target is obtained in the bed leaving data c i '(t); The original bed leaving data x(t) after filtering is subtracted from the third target bed leaving data c i '(t), get the fourth target in the bed leaving data r i (t); Step 8, based on the third target, the bed leaving data c i '(t) and the fourth target in the bed leaving data r i (t) Perform bed leaving status detection: If the first threshold ≤ the third target in the bed leaving data c i '(t), and the second threshold ≤ the fourth target in the bed leaving data r i If the maximum value of (t) is less than the third threshold, it is determined that the person to be tested is in bed and lying flat during the i-th time interval; If the first threshold ≤ the third target in the bed leaving data c i '(t), and the third threshold ≤ the fourth target in the bed leaving data r i (t) is the maximum value, then it is determined that the person to be tested is in bed and lying sideways during the i-th time interval; If the third target is in the bed leaving data c i The maximum value of '(t) < the first threshold value, and the second threshold value ≤ the fourth target in the bed leaving data r i If the maximum value of (t) is less than the third threshold, it is determined that the person to be tested is out of bed and there is a heavy object on the bed during the i-th time interval; If the third target is in the bed leaving data c i '(t) is less than the first threshold value, and the fourth target is in the bed leaving data r i If the maximum value of (t) is less than the second threshold, it is determined that the person to be tested is out of bed during the i-th time interval; The first threshold value is less than the second threshold value and less than the third threshold value.
2. The method for detecting leaving bed based on a flexible thin film resistive pressure sensor according to claim 1, characterized in that: The step 8 specifically includes: If 1800 ≤ the third target in the bed leaving data c i '(t) maximum value, and 3000≤the fourth target in the bed leaving data r i If the maximum value of (t) is less than 50000, it is determined that the person to be tested is in bed and lying flat during the i-th time interval; If 1800 ≤ the third target in the bed leaving data c i '(t) maximum value, and 50000≤the fourth target in the bed leaving data r i (t) is the maximum value, then it is determined that the person to be tested is in bed and lying sideways during the i-th time interval; If the third target is in the bed leaving data c i '(t) maximum value <1800, and 3000 ≤ the fourth target in the bed leaving data r i If the maximum value of (t) is less than 50000, it is determined that the person under test is out of bed and there is a heavy object on the bed during the i-th time interval; If the third target is in the bed leaving data c i '(t) has a maximum value < 1800, and the fourth target is in the bed leaving data r i If the maximum value of (t) is less than 3000, it is determined that the person to be tested is out of bed during the i-th time interval.
3. The method for detecting leaving bed based on a flexible thin film resistive pressure sensor according to claim 1, characterized in that: After step 8, also execute: When the person to be tested is out of bed in the i-th time interval and in bed in the i-1-th time interval, mark the i-th time interval as the start time of this out of bed; If, starting from the i-th time interval, the first preset time threshold is exceeded and the person under test is still detected to be out of bed, a first out-of-bed alarm is issued; When the person to be tested is a first user object, the first preset time threshold is T1, when the person to be tested is a second user object, the first preset time threshold is T2, and when the person to be tested is a third user object, the first preset time threshold is T3; wherein, T1<T2<T3.
4. The method for detecting leaving bed based on a flexible thin film resistive pressure sensor according to claim 1, characterized in that: After step 8, also execute: When it is determined that the person to be tested is out of bed and there is a heavy object on the bed within the i-th time interval, and the person to be tested is a first user object, a second out-of-bed alarm is issued.
5. The method for detecting leaving bed based on a flexible thin film resistive pressure sensor according to claim 1, characterized in that: After step 8, also execute: When it is determined that the person to be tested is in bed and lying on his side during the i-th time interval, and the person to be tested is a fourth user object, the number of times the person to be tested turns over is increased by 1; In the preset turning-over detection interval, it is determined whether the turning-over times of the fourth user object exceeds a threshold value, and if it does not exceed the threshold value, a turning-over alarm is issued.
6. The method for detecting leaving bed based on a flexible thin film resistive pressure sensor according to claim 1, characterized in that: After step 8, also execute: When it is determined that the person to be tested is out of bed during the i-th time interval and the person to be tested is a fifth user object, a third out-of-bed alarm is issued.
7. The method for detecting leaving bed based on a flexible thin film resistive pressure sensor according to claim 1, characterized in that: After step 8, also execute: When the person to be tested is out of bed in the i-th time interval and in bed in the i-1-th time interval, mark the i-th time interval as the start time of this out-of-bed; if the person to be tested is detected to be in bed again starting from the i-th time interval, take the corresponding time interval as the end time of this out-of-bed; based on the start time of this out-of-bed and the end time of this out-of-bed, estimate the out-of-bed time of the person to be tested, and record the out-of-bed time of the person to be tested corresponding to different user objects.
8. A bed leaving detection device based on a flexible thin film resistive pressure sensor, characterized in that: The invention comprises a memory, a processor and a bed leaving detection program based on a flexible thin film resistive pressure sensor which is stored in the memory and can be run on the processor. When the bed leaving detection program based on the flexible thin film resistive pressure sensor is executed by the processor, the steps of the bed leaving detection method based on the flexible thin film resistive pressure sensor as described in any one of claims 1 to 7 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the bed leaving detection method based on a flexible thin film resistive pressure sensor as described in any one of claims 1 to 7 are implemented.
