Drainage fluid continuous metering and hierarchical early warning method and device based on state recognition

CN122998491APending Publication Date: 2026-10-30JIAXING NO 1 HOSPITAL +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611363989.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-04
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

现有方案对可信状态、护理操作事件和正常计量状态之间的转换关系考虑不足,难以在同一连续监测过程中同时兼顾抗扰动、跨袋累计和及时预警

Benefits of technology

[0036]1、本发明在流速估计和预警之前先进行可信区间判定,通过摆动幅度、差分抖动强度和趋势一致性共同判断当前重量数据是否稳定可信,并在稳定度介于进入可信阈值与退出可信阈值之间时保持上一采样周期的可信状态,能够有效减少袋体摆动、床体移动、管路牵拉等床旁干扰造成的虚假流速尖峰,从而降低误报警。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122998491A_ABST
    Figure CN122998491A_ABST
Patent Text Reader

Abstract

The application discloses a drainage liquid continuous metering and hierarchical early warning method and device based on state recognition, which comprises the following steps: judging whether the data is stable and reliable based on the latest short window, and determining the reliable state by adopting a double-threshold hysteresis strategy; pre-checking significant negative jumps based on the negative jump threshold reserved in the latest reliable period, updating the normal fluctuation baseline and the adaptive threshold when there is no significant negative jump and the data is reliable, and discriminating the replacement bag, emptying and dumping or disturbance events; obtaining the cumulative drainage liquid volume according to the segmented starting point and the current smooth weight, sealing the segmented end value at the latest reliable and stable moment before the significant negative jump occurs when the bag is replaced or emptied, and setting a new segmented starting point after the weight is re-stabilized; estimating the drainage liquid flow rate only in the reliable and stable metering state, and triggering the hierarchical early warning according to the flow rate amplitude and the duration. The application can realize continuous metering, cross-bag accumulation, flow rate estimation and hierarchical early warning under the conditions of bedside disturbance and nursing operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of medical and nursing monitoring technology, specifically relating to a method and device for continuous metering and graded early warning of drainage fluid based on state recognition, used for bedside continuous metering, state recognition and early warning of drainage fluid drawn from the human body. Background Technology

[0002] Postoperative drainage monitoring is a common task in surgical nursing. Nurses typically need to continuously monitor the cumulative volume of drainage fluid, the flow rate per unit time, and its short-term trends. The cumulative drainage volume reflects the overall scale of blood loss or exudation over a period of time, while changes in flow rate help identify situations such as active bleeding, a sudden increase in exudation, or a sudden recovery after drainage obstruction. For some postoperative patients, if the drainage fluid increases significantly within a short period, and the bedside record does not reflect the changes in a timely manner, it may delay further observation and treatment.

[0003] In current clinical practice, the most common method is still for nurses to periodically check the drainage bags, monitoring them by reading the markings on the bags and manually filling in nursing records. While this method is simple, it has significant shortcomings. First, manual checks are usually intermittent, resulting in only a few discrete recording points and failing to continuously reflect changes in drainage fluid. Second, the readings of the drainage bags are greatly affected by bag folds, fluid level tilt, fluid adhesion, observation angle, and lighting conditions, making reading errors difficult to avoid. Third, nursing procedures such as changing the bag, emptying and re-hanging it usually rely on manual recording, lacking automatic timestamps and process evidence, making it difficult to determine whether changes in drainage volume are caused by actual changes in the patient's condition or by nursing procedures during subsequent review.

[0004] To improve continuous monitoring capabilities, existing solutions have attempted to install weighing sensors at the suspension point of the drainage bag, calculating the drainage volume based on weight changes and triggering alarms based on cumulative volume or flow rate thresholds. However, the real bedside environment is not stable. Factors such as patient turning, bed movement, tubing traction, and friction at the suspension point can cause the drainage bag to swing, resulting in short-term oscillations in the weight signal. If the flow rate is calculated directly based on the difference between adjacent weights, mechanical oscillations may be misinterpreted as a sudden increase in drainage velocity, leading to frequent false alarms. On the other hand, nursing procedures such as changing the bag or emptying it can cause sudden drops in weight, even briefly approaching a no-load state. If these events are not identified, the cumulative volume may reset to zero, experience gaps, or be counted repeatedly, still requiring manual data entry and correction by nursing staff. Therefore, simple weighing or simple threshold alarms are insufficient to meet the actual needs of continuous bedside monitoring.

[0005] Current weighing monitoring schemes often use fixed thresholds or single filters to handle weight fluctuations. Overly strong filtering may cause response lag and mask true surges in drainage, while underlying filtering fails to suppress bedside swaying. Fixed thresholds also struggle to accommodate normal fluctuations caused by different bed positions, attachment points, bag sizes, and installation conditions. Therefore, it is necessary to determine the data reliability before measurement and early warning, prioritizing the identification of nursing events such as bag replacement and emptying / tipping, and then selecting different processing methods such as normal measurement, freezing, or segmented settlement based on the current status. Existing schemes do not adequately consider the conversion relationship between reliable status, nursing operation events, and normal measurement status, making it difficult to simultaneously address disturbance resistance, cross-bag accumulation, and timely early warning during the same continuous monitoring process. Summary of the Invention

[0006] To address the problems of existing technologies, this invention provides a method and device for continuous metering and graded early warning of drainage fluid based on state recognition. Designed for postoperative bedside drainage scenarios, it continuously meters, calculates, estimates flow rate, and provides graded early warnings for drainage fluid in situations involving disturbances or nursing operations such as bag swinging, bed movement, tubing pulling, bag replacement, and emptying / discarding. A traceable event and early warning log is generated. After determining a reliable state, this invention employs a method that prioritizes significant negative jump pre-detection over ordinary disturbance rejection, and performs nursing event discrimination, disturbance freezing, segmented calculation, or flow rate early warning processing according to different states.

[0007] To achieve the above objectives, the present invention provides the following solution:

[0008] A method for continuous metering and graded early warning of drainage fluid based on state recognition, comprising:

[0009] Step S1: Initialize the metering segment and load the operating parameters; After obtaining a stable and reliable weight signal through steps S2 and S3, record the current smoothed weight as the starting smoothed weight of this segment, and record the start time of this segment at the same time.

[0010] Step S2: Continuously collect the original weight of the drainage bag according to the sampling period, and update the original weight to a smoothed weight;

[0011] Step S3: Calculate the swing amplitude, differential jitter intensity and trend consistency based on the most recent short window, fuse them to obtain the stability, and combine the entry confidence threshold, exit confidence threshold and the confidence state of the previous sampling period to determine the current confidence state, and maintain the confidence state of the previous sampling period when the stability is between the exit confidence threshold and the entry confidence threshold.

[0012] Step S4: Perform a significant negative jump pre-detection on the current data based on the negative jump threshold retained in the most recent trusted period or the preset initial negative jump threshold; when the current trusted state is trusted and no significant negative jump is detected according to the negative jump threshold retained in the most recent trusted period or the preset initial negative jump threshold, update the normal fluctuation baseline, and generate the swing threshold, differential jitter threshold and negative jump threshold according to the normal fluctuation baseline.

[0013] Step S5: When a significant negative jump is detected in step S4 or the event discrimination window is in an effective state, continue to discriminate nursing events and save the smoothed weight, current segment cumulative volume, and corresponding sampling time at the most recent credible stable moment before the significant negative jump occurs. Based on the lowest smoothed weight, event duration, smoothed weight after recovery, and the trend of smoothed weight change within the event window, determine the current state as bag replacement state, emptying and dumping state, or disturbance state. When no significant negative jump is detected and the event discrimination window is not in an effective state, combine the current credible state, swing threshold, and differential jitter threshold to determine the current state as disturbance state or stable measurement state. Among these, only when the bag replacement state or emptying and dumping state is determined, the smoothed weight after recovery is used as a candidate value for the starting point of the new segment.

[0014] Step S6: Obtain the cumulative volume of the current segment based on the starting smooth weight and the current smooth weight of the current segment, and add the historical sealed segments to the current segment to obtain the total cumulative volume; when it is determined to be a bag replacement event or an emptying and dumping event, use the current segment cumulative volume at the most recent credible stable moment before the significant negative jump that was saved in step S5 as the segment final value for settlement and sealing, and set a new segment starting point after the weight reaches the stable condition again;

[0015] Step S7: Only when the current trusted state is trusted and the current state is a stable measurement state, estimate the drainage fluid flow rate based on the cumulative volume sequence;

[0016] Step S8: Accumulate the time when the flow rate of the drainage fluid continuously exceeds the corresponding flow rate threshold, and trigger the corresponding level of warning when the flow rate amplitude condition and duration condition are met at the same time, and record the status, event and warning log.

[0017] Steps S3 to S8 select different processing paths based on the current trusted state and the current state type, thus forming a state-driven continuous measurement and early warning mechanism.

[0018] Preferably, the smoothed weight is obtained by updating the current original weight and the smoothed weight of the previous sampling period in an exponential smoothing manner.

[0019] Preferably, the swing amplitude is the difference between the maximum and minimum values ​​of the smoothed weight within the most recent short window, the differential jitter intensity is the standard deviation of the differences between adjacent smoothed weights, and the trend consistency is determined based on the quantitative relationship between positive and negative differences in the differences and the median and median absolute deviation of the absolute values ​​of the differences.

[0020] Preferably, when the stability is greater than or equal to the entry trust threshold, the current trust state is set to trustworthy; when the stability is less than or equal to the exit trust threshold, the current trust state is set to untrustworthy; when the stability is between the exit trust threshold and the entry trust threshold, the trust state of the previous sampling period is maintained.

[0021] Preferably, the swing amplitude baseline and differential jitter baseline are updated only when the current trusted state is trusted and no significant negative jump is detected according to the negative jump threshold retained according to the most recent trusted period or the preset initial negative jump threshold. The swing threshold, differential jitter threshold and negative jump threshold are generated from the baseline, the corresponding amplification factor and the lower threshold.

[0022] Preferably, significant negative jump detection takes precedence over perturbation rejection based on the current trusted state; a negative jump threshold retained by the most recent trusted period or a preset initial negative jump threshold is used. When the decrease in adjacent smooth weight exceeds the negative jump threshold, the event discrimination window is entered, or event discrimination continues while the event discrimination window is in a valid state; when the minimum smooth weight is lower than the unloading threshold and the event duration is not greater than the fast recovery time threshold, it is determined to be a bag replacement event; when the bag replacement event conditions are not met, and the event duration is not less than the emptying event duration threshold, and the smooth weight in the event window generally shows a downward trend, it is determined to be an emptying and dumping event; other cases are determined to be a perturbation state; when it is determined to be a bag replacement event or an emptying and dumping event, the event is confirmed to end with the smooth weight after it has recovered to a stable state, and a new segment starting point is determined after the weight reaches a stable state again.

[0023] Preferably, the current segment cumulative volume is obtained by dividing the difference between the current smoothed weight and the smoothed weight at the segment starting point by the drainage fluid density, and the total cumulative volume is the sum of the final values ​​of each sealed segment and the current segment cumulative volume. When a significant negative jump is detected, the current segment cumulative volume at the most recent reliable stable moment before the negative jump occurs is saved, and when it is determined to be a bag replacement event or an emptying and dumping event, the saved current segment cumulative volume is sealed as the segment final value. After bag replacement or emptying, the segment starting point is reset and the total cumulative volume is kept continuous.

[0024] Preferably, the flow rate of the drainage fluid is obtained by dividing the volume change of the cumulative volume sequence within a preset differential step by the corresponding time, and the median of the multiple flow rate calculation values ​​within the most recent short window is taken.

[0025] As a preferred approach, each level of warning corresponds to a flow velocity threshold and a duration threshold, respectively. The flow velocity amplitude condition and duration condition for the same level of warning are logically ANDed. When multiple levels of triggering conditions are met at the same time, the highest warning level that meets the conditions is output.

[0026] The present invention also provides a continuous metering and graded early warning device for drainage fluid based on status recognition, comprising: a weighing acquisition module, a processing module, and an alarm output module; the weighing acquisition module is used to acquire the original weight of the drainage bag, the processing module includes the following first to eighth processing modules, and the alarm output module is used to output the current cumulative amount, status information, early warning result, and event log;

[0027] The first processing module is used to initialize the measurement segment and load the operating parameters. After obtaining a stable and reliable weight signal, it records the current smoothed weight as the starting smoothed weight of this segment and records the start time of the segment.

[0028] The second processing module is used to receive the original weight of the drainage bag output by the weighing acquisition module, and update the original weight to a smoothed weight according to the sampling period.

[0029] The third processing module is used to determine whether the current data is stable and reliable based on the most recent short window, and to determine the current reliability status by using a dual-threshold hysteresis strategy formed by the entry reliability threshold and the exit reliability threshold.

[0030] The fourth processing module is used to perform a significant negative jump pre-detection on the current data based on the negative jump threshold retained in the most recent trusted period or a preset initial negative jump threshold; when the current trusted state is trusted and no significant negative jump is detected according to the negative jump threshold retained in the most recent trusted period or the preset initial negative jump threshold, the normal fluctuation baseline is updated, and an oscillation threshold, a differential jitter threshold, and a negative jump threshold are generated based on the normal fluctuation baseline;

[0031] The fifth processing module is used to continue nursing event discrimination when the fourth processing module detects a significant negative jump or the event discrimination window is in an effective state. It saves the smoothed weight, the current segment cumulative volume, and the corresponding sampling time at the most recent credible stable moment before the significant negative jump occurred, and determines the bag replacement state, emptying and dumping state, or disturbance state by combining the lowest smoothed weight, event duration, smoothed weight after recovery of stability, and the trend of smoothed weight change within the event window. It is also used to determine the disturbance state or stable measurement state by combining the current credible state, swing threshold, and differential jitter threshold when no significant negative jump is detected and the event discrimination window is not in an effective state. Among these, only when the bag replacement state or emptying and dumping state is determined, the smoothed weight after recovery of stability is used as a candidate value for the starting point of the new segment.

[0032] The sixth processing module is used to obtain the cumulative volume of the current segment based on the smoothed weight of the starting point of the segment and the current smoothed weight, and to add the historical sealed segments to the current segment to obtain the total cumulative volume; when it is determined to be a bag replacement event or an emptying and dumping event, the current cumulative volume of the segment saved at the most recent reliable stable moment before the significant negative jump occurs is used as the final value of the segment for settlement and sealing, and a new segment starting point is set after the weight is re-stabilized;

[0033] The seventh processing module is used to estimate the flow rate of the drainage fluid when the data is deemed reliable and no bag replacement, emptying, or disturbance event is detected.

[0034] The eighth processing module is used to accumulate the estimated drainage fluid flow rate over time and issue graded warnings. When the flow rate amplitude condition and the duration condition are met simultaneously, the corresponding level of warning is triggered, and the status, events and warning logs are recorded.

[0035] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0036] 1. Before estimating and warning the flow rate, this invention first determines the confidence interval. It uses the swing amplitude, differential jitter intensity and trend consistency to jointly determine whether the current weight data is stable and reliable. When the stability is between the entry confidence threshold and the exit confidence threshold, it maintains the confidence state of the previous sampling period. This can effectively reduce false flow rate spikes caused by bedside interference such as bag swing, bed movement and pipeline pulling, thereby reducing false alarms.

[0037] 2. This invention distinguishes between bag replacement, emptying / pouring, and disturbances through a negative transition triggering and event discrimination mechanism that prioritizes negative transitions over ordinary disturbance rejection. Even if a negative transition temporarily renders the current data unreliable, event discrimination can still be completed, thereby preventing nursing operations from being prematurely filtered as ordinary disturbances and reducing interference from nursing operations on measurement and early warning results.

[0038] 3. This invention employs a segmented accumulation and settlement sealing mechanism. When a significant negative jump is detected, the effective segmented accumulation at the most recent reliable stable moment before the negative jump is saved. After identifying a bag replacement or emptying event, this effective accumulation is sealed as the segment final value. Then, when the weight stabilizes again after a new bag or emptying, a new segment starting point is updated, thereby avoiding the loss of segmented accumulation caused by a sudden drop in weight after nursing operations and ensuring that the total accumulation is continuous throughout the process.

[0039] 4. This invention employs a tiered early warning system triggered by both flow rate thresholds and duration. An alert of the corresponding level is only triggered when the flow rate exceeds the corresponding threshold and persists for a set time, thereby avoiding alarms caused by occasional short-term spikes and improving the clinical usability of the early warning results.

[0040] 5. This invention logs trusted status, disturbance status, nursing events, cumulative volume, flow rate, early warning level, and triggering basis to form a traceable chain of evidence with timestamps, which facilitates nursing review, quality control, and hospital information integration. Attached Figure Description

[0041] To more clearly illustrate the technical solution of the present invention, the drawings used in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0042] Figure 1 This is a flowchart of the continuous metering and graded early warning method for drainage fluid based on state recognition, according to an embodiment of the present invention.

[0043] Figure 2 This is a schematic diagram of the continuous metering and graded early warning device for drainage fluid based on state recognition in an embodiment of the present invention. Detailed Implementation

[0044] 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.

[0045] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0046] Example 1

[0047] like Figure 1 As shown, this invention provides a method for continuous metering and graded early warning of drainage fluid based on state recognition, comprising:

[0048] Step 1: Initialize metering segments and determine the starting point

[0049] Upon initial startup or completion of the previous segment, the new metering segment is initialized and its operating parameters are loaded. The system then continuously samples and updates the smoothed weight according to step two, and then determines the stability and reliability of the weight signal according to step three. Only after obtaining a stable and reliable weight signal is the current smoothed weight recorded as the starting smoothed weight of this segment. Record the start time of each segment. Subsequent cumulative amounts within this segment will be recorded using... Based on this, when bag replacement or emptying occurs again, first seal the final value of the previous segment, and then establish the next segment after the weight has stabilized again.

[0050] This step also requires loading the parameters needed for operation, including the sampling period. Liquid density Smoothing coefficient Window length Differential step size , enter the trusted threshold Exit Trust Threshold Baseline update coefficients Stability weighting coefficient , Logistic S-shaped mapping kurtosis parameter Trend consistency reference threshold Minimal positive numbers used to avoid zero denominators and to stabilize near-zero difference calculations. Swing threshold amplification factor Jitter threshold amplification factor Negative jump threshold amplification factor Swing threshold lower limit lower limit of jitter threshold Negative jump threshold lower limit Preset initial negative transition threshold And the flow velocity thresholds corresponding to Level I, Level II, and Level III warnings. , , and duration threshold , , .

[0051] In addition, nursing event discrimination parameters are pre-set, including unloading thresholds. , rapid recovery time threshold for bag replacement and the threshold for the duration of the clear event The above parameters are pre-entered during system initialization, departmental parameter configuration, or bedside terminal settings, or can be configured by default based on the weight of the empty drainage bag, the weight of the suspension structure, routine nursing operation time, and hospital management requirements. When the system has not yet formed a recent reliable cycle, the preset initial negative jump threshold is used. Perform significant negative transition pre-detection; the preset initial negative transition threshold The lower limit of the negative transition threshold can be taken. Alternatively, it can be determined based on the initial stable window.

[0052] This step outputs the smoothed weight of the starting point of the current segment. The segment start time and operating parameters provide a benchmark for subsequent weight smoothing, status judgment and cumulative volume conversion.

[0053] Step 2: Continuously sample and update the original weight with a smoothed weight.

[0054] After initializing the metering segments and loading the operating parameters, the original weight of the drainage bag is continuously collected according to the sampling cycle. Because bedside weighing signals are affected by electrical noise, mechanical micro-vibrations, and slight swaying, directly using the raw weight for stability or fluctuation assessments can easily misinterpret minor noise as events. Therefore, the raw weight should first be updated to a smoothed weight. :

[0055]

[0056] in, For the first The original weight obtained from the second sampling; For the first The smoothed weight corresponding to the next sample; The smoothed weight of the previous sampling period; The smoothing coefficient satisfies The smoothed weight sequence serves as a unified input for the next step's window decision, event detection, and cumulative volume calculation.

[0057] Step 3: Determine whether the current data is stable and reliable based on the most recent short window.

[0058] With a smoothed weight, before calculating flow rate and triggering alerts, it's crucial to determine if the current data is suitable for use. Bedside false alarms often arise from short-term oscillations caused by bag movement or tubing tension. If these unstable intervals aren't filtered out first, false spikes can easily occur when calculating flow rate using differential methods.

[0059] With the current sampling point Take the nearest value from the end. A sliding window is formed by sampling points. This window is used to observe whether the weight change has been stable over a recent period of time.

[0060]

[0061] in, For the first The set of sliding window indices corresponding to each sampling; The window length is the number of sampling points contained within the window.

[0062] Within this window, the stability of the weight data is judged from three aspects: first, the amplitude of the vertical fluctuation within the window; second, whether adjacent changes jump randomly; and third, whether the direction of weight change is relatively consistent.

[0063] First, calculate the swing amplitude within the window:

[0064]

[0065] in, The swing amplitude within the window; For the first in the window The smooth weight corresponding to each sampling point; max(·) and min(·) represent the maximum and minimum values ​​within the window, respectively. The larger the value, the more pronounced the weight fluctuations within the window.

[0066] Next, calculate the weight change between adjacent sampling points:

[0067]

[0068] in, For the first The amount of smooth weight change between the next sample and the previous sample.

[0069] Then calculate the mean and standard deviation of the differences within the window:

[0070]

[0071] in, The mean of the differences within the window; This represents the standard deviation of the differences within the window; the summation sign indicates summing over W−1 adjacent differences within the window. If adjacent changes alternate between positive and negative and the magnitudes are large, then... It will increase.

[0072] To avoid mistaking steady growth for disturbances, and to make the trend consistency index explicitly distinguish between unidirectional changes and alternating positive and negative changes, the trend consistency index is further calculated as follows:

[0073]

[0074] in, and These are the W-1 adjacent smooth weight differences within the current window. The number of differences between values ​​greater than 0 and values ​​less than 0; The median of the absolute values ​​of the differences within the window; The median absolute deviation of the absolute values ​​of the differences within the window; The smallest positive number is used to avoid the denominator being zero and to stabilize near-zero difference calculations. The first factor in equation (6) is used to characterize the consistency of the direction of change, where the numerator and denominator are both added by 1 as a fixed counting correction term to avoid 0 / 0 when there are no positive or negative differences, and to make the direction of the all-zero difference window consistent with 1; the second factor is used to characterize the consistency of the difference amplitude. The product of the two satisfies If most of the differences within the window are in the same direction and similar in size, then Approaching 1; if the difference alternates between positive and negative, then and As the median values ​​approach each other, the first factor decreases; if the difference magnitudes are discrete, the median absolute deviation increases, and the second factor decreases, thus... Decrease.

[0075] Subsequently, the swing amplitude, differential jitter intensity, and trend consistency are fused into a stability Sk:

[0076]

[0077] in, For stability; The weighting coefficient corresponding to the swing amplitude; These are the weighting coefficients corresponding to the differential jitter intensity; The steepness parameter for the Logistic S-shaped mapping; This serves as a reference threshold for trend consistency. The greater the swing, the stronger the tremor. The smaller the value, the more consistent the trend. The larger it is. In the formula, exp represents an exponential function with the natural constant e as its base. Furthermore, Used to control trend consistency indicators When mapping using the Logistic S-shaped mapping function on the right side of equation (7) at the reference threshold The steepness of the nearby changes, The larger the value, the better the Logistic S-shaped mapping function becomes. The steeper the slope nearby; when When, the S-shaped mapping function is about The derivative is ; This is used to characterize the consistency in the direction and magnitude of change between adjacent smoothed weight differences within the current sliding window, and its value range is: The stability is adjusted by the Logistic S-shaped mapping function on the right side of equation (7). To make the exponent term dimensionless, and The dimensions of all are As a set of feasible example parameters, this embodiment may take... , , , The above values ​​can be adjusted based on the weighing sensor's range, sampling noise level, and statistical results of the normal stability window. , and All are dimensionless quantities.

[0078] To avoid instability Slight fluctuations around the threshold cause frequent switching of the trusted state; therefore, a threshold entry method is used. and exit trust threshold Perform hysteresis judgment:

[0079] Enter Trusted: ≥ ;Exit Trusted: ≤ .

[0080] in, The threshold for entering a trusted state; The threshold for exiting a trusted state, and .

[0081] for In this case, the state is not changed immediately, but rather maintained as it was in the previous sampling period. Define a reliable state variable. :

[0082]

[0083] in, For the first The reliability state at the time of the next sampling This indicates credibility. This indicates that the information is unreliable. This is the trusted state from the previous sampling period. The initial trusted state is set upon system startup. Set to 0; remain untrusted until the first complete sliding window is formed.

[0084] This step outputs the current confidence status. The confidence status determines whether the normal fluctuation baseline is allowed to be updated and whether flow rate estimation and warning duration accumulation are allowed, but does not block the detection of significant negative jumps. If a significant negative jump is detected in step four, or the event discrimination window has been activated, the process continues to step five to complete the nursing event discrimination, regardless of whether the current confidence status has changed. If no significant negative jump is detected and the current confidence status is unconfidential, the process enters a perturbation state and freezes the corresponding updates. If the current confidence status is credible, the process proceeds to step four, and the normal fluctuation baseline and adaptive threshold are updated if no significant negative jump is detected.

[0085] Step 4: Pre-detect significant negative jumps, and update the normal fluctuation baseline and adaptive threshold when there are no significant negative jumps and the detection is reliable.

[0086] After determining the current confidence level in Step 3, the negative jump threshold retained from the most recent confidence period or the preset initial negative jump threshold is first invoked to pre-check the decrease in the current smoothed weight compared to the smoothed weight of the previous sampling period. If the decrease exceeds the negative jump threshold, or if the event discrimination window is already in a valid state, the normal fluctuation baseline is not updated in this sampling period, and the process proceeds directly to Step 5 to continue nursing event discrimination. If the current confidence level is reliable and no significant negative jump is detected, the normal fluctuation baseline is updated to adapt to the normal fluctuation level corresponding to the current bed position, attachment point, drainage bag specifications, and installation status.

[0087]

[0088] in, and These are the swing amplitude baseline and differential jitter baseline for the current sampling period, respectively; and These are the corresponding baselines for the previous sampling period; These are the baseline update coefficients. When a normal fluctuation baseline has not yet been formed, the swing amplitude and differential jitter intensity of the first stable and reliable window are used as the initial values ​​for the corresponding baselines, respectively. Furthermore, The differential jitter intensity is calculated according to equation (5) for the kth sampling period, which is the standard deviation of the adjacent smooth weight difference within the current sliding window; The differential jitter baseline for the k-th sampling period has a different meaning. The differential jitter baseline is not an independent preset value, but rather a value determined by the current... The differential jitter baseline from the previous sampling period is recursively updated according to equation (9). The differential jitter baseline is used to characterize the normal differential jitter level under stable and reliable conditions.

[0089] Generate adaptive thresholds from baseline:

[0090]

[0091] in, For swing threshold; This is the differential jitter threshold; This is the swing threshold amplification factor; This is the jitter threshold amplification factor; This is the lower limit of the swing threshold; This is the lower limit of the jitter threshold.

[0092] This step outputs a significant negative jump pre-detection result, as well as updated swing thresholds and differential jitter thresholds; the updated swing amplitude baseline is also used to form the negative jump thresholds for subsequent sampling cycles as described in step five. If a significant negative jump is detected or the event discrimination window is in a valid state, the process proceeds to the nursing event discrimination branch in step five; otherwise, it proceeds to the disturbance verification or stable measurement branch based on the current confidence level and fluctuation threshold.

[0093] Step 5: Based on the pre-screening results, continue to identify nursing events and review the disturbance status.

[0094] Step four involves detecting a significant negative jump or when the event discrimination window is already in a valid state, and then continuing with the nursing event discrimination process. When a significant negative jump is triggered, the smoothed weight, current segment cumulative volume, and corresponding sampling time of the most recent reliable stable moment before the negative jump are simultaneously saved, and the process is then entered into the event discrimination window. Even if a significant negative jump causes the current reliable state to temporarily become unreliable, the already initiated event discrimination process will not be terminated.

[0095] Replacing the bag or emptying / pouring both usually cause a decrease in weight, but they behave differently: replacing the bag is more likely to result in a short period of near-no-load followed by a faster return to stability, while emptying / pouring is more likely to result in a continuous decrease. Therefore, the negative jump threshold is generated according to the following formula:

[0096]

[0097] in, For negative transition thresholds; It is the negative jump threshold amplification factor; This serves as the baseline for the current swing amplitude. It is the lower limit of the negative transition threshold.

[0098] If a significant decrease occurs between adjacent samples, an event detection is triggered:

[0099]

[0100] in, - It represents the change in adjacent smooth weights; when it is less than the negative number of the negative jump threshold, it indicates a significant negative jump.

[0101] When a significant negative transition is triggered, the smoothed weight, current segment cumulative volume, and corresponding sampling time of the most recent reliable stable moment before the negative transition are simultaneously saved, and the event is entered into the event discrimination window. The lowest smoothed weight is then calculated within the window. Smooth weight after recovery of stability And the duration of the event from the triggering of the negative transition to the re-stabilization. Unload threshold Fast recovery time threshold and the threshold for the duration of the clear event All steps are preset in step one. The smoothed weight after stabilization is used to confirm that the nursing event has ended and serves as a candidate value for the new segment starting point after bag replacement or emptying; a new segment starting point is locked only after the weight reaches a stable condition again. The smoothed weight within the event window generally shows a downward trend and can be determined based on the difference between the starting and ending smoothed weights of the event window and the proportion of negative differences within the window.

[0102] If satisfied and If the conditions for a bag replacement event are not met, it is determined to be a bag replacement event; if the conditions for a bag replacement event are not met, and ≥ If the smooth weight within the event window generally shows a downward trend, it is determined to be an emptying and dumping event.

[0103] When no significant negative jump is detected and the event discrimination window is not in a valid state, a disturbance verification is performed by combining the current confidence state, swing amplitude and swing threshold, and differential jitter intensity and differential jitter threshold. If the current confidence state is unreliable, or the swing amplitude exceeds the swing threshold, or the differential jitter intensity exceeds the differential jitter threshold, it is determined to be a disturbance state, and the flow velocity estimation, warning duration accumulation, and current segment accumulation update are frozen. If the current confidence state is reliable and none of the above fluctuation indicators exceed the corresponding thresholds, it is determined to be a stable measurement state. The above state determination results determine whether to proceed to segmented settlement, direct output, or flow velocity estimation branch.

[0104] Step Six: Calculate the cumulative volume and settle and seal the contents when changing bags or emptying the container.

[0105] After completing the status assessment, the weight change is converted into drainage fluid volume. The current segment's cumulative volume is then smoothed out using the segment start point locked in step one. Based on:

[0106]

[0107] in, The cumulative volume of the current segment; The current smooth weight; Smooth the weight at the current segment starting point; The density of the liquid; This is to prevent slight noise from causing the cumulative volume to become negative.

[0108] The total accumulated volume is composed of the historical archived segments and the current segment:

[0109]

[0110] Among them, Vsum V represents the total cumulative volume; U represents the number of sealed segments; V represents the total cumulative volume. seg,end (u) V represents the cumulative volume of the segment at the end of the u-th sealed segment; seg,k This represents the cumulative volume of the current segment.

[0111] When step five determines that the event is either a bag replacement event or an emptying and dumping event, the current segment cumulative volume at the most recent reliable stable moment saved before the significant negative jump is used as the final value of this segment. The bags are sealed and added to the total cumulative count; subsequently, once the new bags are loaded or emptied and the weight stabilizes again, the new segment start point is updated. Thus, the cumulative total within a segment restarts from a new starting point, while the total cumulative total V... sum Maintain continuous operation to avoid sudden drops in weight after nursing procedures, which could cause the cumulative weight of each segment to drop to zero, result in gaps in the weight, or lead to repeated statistics.

[0112] Step 7: Estimate the flow rate under stable, reliable, and non-event-based conditions.

[0113] Only when step three is determined Flow velocity estimation is only performed after step five confirms a stable metering state. Flow velocity is highly sensitive to noise, therefore it must be performed after reliable gating and event identification. Flow velocity is calculated based on the cumulative volume sequence, and a windowed middle value is used to reduce the impact of individual outliers.

[0114]

[0115] in, For the first The flow velocity estimated during the second sampling; For the first The cumulative volume corresponding to each sampling point; Forward interval The cumulative volume of each sampling point; The difference step size; The sampling period; This indicates median operations.

[0116] The output flow rate of this step It is the direct input for the step eight graded early warning.

[0117] Step 8: Accumulate the duration of flow velocity and issue graded early warnings.

[0118] To reduce false alarms caused by short-term spikes, warnings are not based on a single sampling point exceeding the threshold, but rather require the flow rate to exceed the corresponding threshold and remain there for a set time. For a given flow rate threshold... The duration is updated using the following formula:

[0119] The system sets independent duration variables for each warning level and updates them according to the flow rate threshold corresponding to each level.

[0120]

[0121] in, For the first The cumulative duration of consecutively exceeding the threshold during each sampling; This represents the cumulative duration of the previous sampling period; The sampling period; Current flow rate; This represents the flow velocity threshold for the corresponding level. The duration variables for each warning level are independent of each other, recording the time for which the corresponding level's flow velocity threshold is continuously exceeded.

[0122] The triggering conditions for a tiered early warning are:

[0123]

[0124] in, , , These are the flow velocity thresholds for Level I, Level II, and Level III warnings, respectively. , , These represent the duration thresholds for the corresponding levels; the logical symbol "∧" represents logical AND, meaning that both the flow velocity amplitude condition and the duration condition must be satisfied simultaneously. , , The first The cumulative time of continuous exceeding the threshold corresponding to Level I, Level II, and Level III warnings during the next sampling.

[0125] If multiple trigger conditions are met simultaneously, the highest warning level that meets the conditions will be output first. For example, if Level I and Level II conditions are met simultaneously, Level II will be output; if Level I, Level II, and Level III conditions are met simultaneously, Level III will be output. After a warning is triggered, the trigger time, warning level, flow rate at trigger time, cumulative duration, threshold parameters, and current status information will be recorded, and the next sampling period will begin.

[0126] Example 1: Normal traffic generation, stable metering, no alerts triggered.

[0127] Set sampling period =1 s, window length =10, Liquid density =1.0 g / mL, differential step size =10. Segmented starting point smoothing weight =200.0 g, Class I flow velocity threshold =5 mL / min, Level I duration threshold =120 s. The most recent 10 smoothed weights are 205.12, 205.20, 205.29, 205.37, 205.45, 205.54, 205.62, 205.71, 205.79 and 205.87 g.

[0128] Based on window data, swing amplitude =205.87-205.12=0.75 g; the adjacent differences are mainly 0.08 g or 0.09 g, the standard deviation of the difference is about 0.005 g, and the trend consistency is high. Therefore, the stability has reached the confidence threshold, and the current confidence state is... .

[0129] Furthermore, in this example, take , enter the trusted threshold Exit Trust Threshold and using the aforementioned example parameters. , , , From the above 9 adjacent differences, we can obtain , The median absolute value is 0.08 g, and the median absolute deviation is 0. Therefore, according to equation (6), we get ;Will , Substituting the above parameters into equation (7), we obtain .because Therefore, the current trusted state As a contrast, if the nine difference magnitudes are the same and approximately alternate between positive and negative, with five being positive and four being negative, then the first factor of equation (6) is... When the amplitude is consistent This is significantly lower than 1.0 when changing in the same direction, thus enabling the distinction between alternating positive and negative values ​​and steady growth in the same direction. If this window is used as the first stable and reliable window, then... As the initial value of the differential jitter baseline, it is subsequently updated recursively according to Equation (9).

[0130] When smooth weight When the weight is 206.0 g, the current segment's cumulative volume is (206.0 - 200.0) / 1.0 = 6.0 mL. After 10 seconds, the smoothed weight is 206.8 g, corresponding to a cumulative volume of 6.8 mL. The average flow rate is (6.8 - 6.0) / 10 = 0.08 mL / s, or 4.8 mL / min. Since 4.8 mL / min is below the Level I flow rate threshold... The duration is reset to zero, and no warning is triggered.

[0131] Example 2: Bag replacement event, total cumulative event without interruption.

[0132] Let the liquid density be... =1.0 g / mL, smoothed weight at the starting point of the current segment =200.0 g, the smooth weight before bag replacement was 350.0 g, then the current segmented cumulative volume is (350.0-200.0) / 1.0=150.0 mL. Assume the baseline for the swing amplitude. =1.2 g, negative jump threshold amplification factor =8. Negative jump threshold lower limit =10 g, then the negative jump threshold =8×1.2+10=19.6 g.

[0133] After the nurse removes the old bag, the smoothed weight at the next sampling point drops to 35.0 g. The adjacent change is 35.0 - 350.0 = -315.0 g, which is less than -19.6 g, triggering an event detection. If the lowest smoothed weight within the event window... =35.0 g, after 8 s a new bag was loaded and stabilized at 205.0 g, and the unloading threshold was reached. =60 g, rapid recovery time threshold =20 s, then and This was determined to be an event involving the replacement of the bag.

[0134] When a negative transition is triggered, the system saves the segmented cumulative volume of 150.0 mL at the most recent reliable stable moment before the negative transition. After the bag replacement event is confirmed, this value is sealed as the final value of this segment and included in the total cumulative volume. After the weight of the new bag stabilizes, 205.0 g is set as the new segment starting point. The cumulative total within each new segment restarts from 0, but the total cumulative total retains the 150.0 mL already sealed; flow rate is not calculated during bag replacement, nor is the warning duration accumulated.

[0135] Example 3: The rate of traffic diversion continues to increase, triggering a Level II warning.

[0136] Set sampling period =1 s, difference step size =10, Liquid density =1.0 g / mL, Level II flow rate threshold =10 mL / min, Level II duration threshold =60 s, the current confidence state is confidence and the current state is stable measurement. If the smoothed weight continues to increase at 0.20 g / s, the volume will increase by 2.0 mL within 10 s, and the estimated flow rate is 2.0 / 10 = 0.20 mL / s, or 12.0 mL / min.

[0137] Since 12.0 mL / min is higher than the Class II flow rate threshold Level II duration increases per sampling period =1 s; if it remains above this threshold for 60 consecutive s, then achieve =60 s, simultaneously satisfying the flow velocity amplitude condition and duration condition, triggering a Level II warning, and recording the trigger time, flow velocity, duration, warning level and current status.

[0138] Example 2

[0139] The present invention also provides a continuous metering and graded early warning device for drainage fluid based on status recognition, comprising: a weighing acquisition module, a processing module, and an alarm output module; the weighing acquisition module is used to acquire the original weight of the drainage bag, the processing module includes the following first to eighth processing modules, and the alarm output module is used to output the current cumulative amount, status information, early warning result, and event log;

[0140] The first processing module is used to initialize the measurement segment and load the operating parameters. After obtaining a stable and reliable weight signal, it records the current smoothed weight as the starting smoothed weight of this segment and records the start time of the segment.

[0141] The second processing module is used to receive the original weight of the drainage bag output by the weighing acquisition module, and update the original weight to a smoothed weight according to the sampling period.

[0142] The third processing module is used to determine whether the current data is stable and reliable based on the most recent short window, and to determine the current reliability status by using a dual-threshold hysteresis strategy formed by the entry reliability threshold and the exit reliability threshold.

[0143] The fourth processing module is used to perform a significant negative jump pre-detection on the current data based on the negative jump threshold retained in the most recent trusted period or a preset initial negative jump threshold; when the current trusted state is trusted and no significant negative jump is detected according to the negative jump threshold retained in the most recent trusted period or the preset initial negative jump threshold, the normal fluctuation baseline is updated, and an oscillation threshold, a differential jitter threshold, and a negative jump threshold are generated based on the normal fluctuation baseline;

[0144] The fifth processing module is used to continue nursing event discrimination when the fourth processing module detects a significant negative jump or the event discrimination window is in an effective state. It saves the smoothed weight, the current segment cumulative volume, and the corresponding sampling time at the most recent credible stable moment before the significant negative jump occurred, and determines the bag replacement state, emptying and dumping state, or disturbance state by combining the lowest smoothed weight, event duration, smoothed weight after recovery of stability, and the trend of smoothed weight change within the event window. It is also used to determine the disturbance state or stable measurement state by combining the current credible state, swing threshold, and differential jitter threshold when no significant negative jump is detected and the event discrimination window is not in an effective state. Among these, only when the bag replacement state or emptying and dumping state is determined, the smoothed weight after recovery of stability is used as a candidate value for the starting point of the new segment.

[0145] The sixth processing module is used to obtain the cumulative volume of the current segment based on the smoothed weight of the starting point of the segment and the current smoothed weight, and to add the historical sealed segments to the current segment to obtain the total cumulative volume; when it is determined to be a bag replacement event or an emptying and dumping event, the current cumulative volume of the segment saved at the most recent reliable stable moment before the significant negative jump occurs is used as the final value of the segment for settlement and sealing, and a new segment starting point is set after the weight is re-stabilized;

[0146] The seventh processing module is used to estimate the flow rate of the drainage fluid when the data is deemed reliable and no bag replacement, emptying, or disturbance event is detected.

[0147] The eighth processing module is used to accumulate the estimated drainage fluid flow rate over time and issue graded warnings. When the flow rate amplitude condition and the duration condition are met simultaneously, the corresponding level of warning is triggered, and the status, events and warning logs are recorded.

[0148] like Figure 2 As shown, the continuous metering and graded early warning device for drainage fluid based on state recognition in this embodiment of the invention further includes: a charging interface 1, an operation button 2, a display screen 3, a mounting bracket 4, a housing 5, a drainage bag hanging hook 6, and a back plate 7. The mounting bracket 4 is located on the upper part of the housing 5 and is used to suspend or fix the device to a hospital bed, bracket, or other fixed position; the drainage bag hanging hook 6 is located on the lower part of the device and is used to suspend the drainage bag to be monitored; the operation button 2 and the display screen 3 are located on the housing 5. The operation button 2 is used to perform tare, metering, parameter setting, or data query operations, and the display screen 3 is used to display the current weight, cumulative drainage fluid volume, drainage fluid flow rate, operating status, and early warning information; the back plate 7 is located on the rear side of the housing 5 and is used to form the main support structure of the device; the charging interface 1 is used to connect to an external power source to power or charge the device.

[0149] In this embodiment, the weighing acquisition module includes a suspended force-bearing structure, a weighing sensor, and an analog-to-digital converter. The drainage bag hanging hook 6 is connected to the suspended force-bearing structure, allowing the load generated by the drainage bag and its drainage fluid to be transferred to the weighing sensor. The weighing sensor converts the load into an electrical signal, and the analog-to-digital converter converts the electrical signal output by the weighing sensor into digital weight sampling data and transmits it to the processing module. The alarm output module includes a display screen 3 and an audible and visual alarm unit. The device can also be equipped with a communication interface for transmitting monitoring data to the nurse station or hospital information system.

[0150] When the device is in operation, the drainage bag is suspended on the drainage bag hanging hook 6. The load generated by the drainage bag and the drainage fluid inside acts on the weighing sensor through the suspended force structure. The electrical signal output by the weighing sensor is converted by an analog-to-digital converter and then input into the processing module. The processing module processes the continuous weight data according to the aforementioned method, and selects stable measurement, disturbance freezing, or segmented settlement processing after bag replacement and emptying based on the current status. The obtained cumulative amount, flow rate, status information, and early warning results are output through the display screen 3 and the alarm output module.

[0151] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made to the technical solutions of the present invention by those skilled in the art without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.

Claims

1. A method for continuous metering and graded early warning of drainage fluid based on state recognition, characterized in that, include: Step S1: Initialize the metering segment and load the operating parameters; After obtaining a stable and reliable weight signal through steps S2 and S3, the current smoothed weight is recorded as the starting smoothed weight of this segment, and the start time of this segment is also recorded. Step S2: Continuously collect the original weight of the drainage bag according to the sampling period, and update the original weight to a smoothed weight; Step S3: Calculate the swing amplitude, differential jitter intensity and trend consistency based on the most recent short window, fuse them to obtain the stability, and combine the entry confidence threshold, exit confidence threshold and the confidence state of the previous sampling period to determine the current confidence state, and maintain the confidence state of the previous sampling period when the stability is between the exit confidence threshold and the entry confidence threshold. Step S4: Perform a significant negative jump pre-detection on the current data based on the negative jump threshold retained in the most recent trusted period or the preset initial negative jump threshold; when the current trusted state is trusted and no significant negative jump is detected according to the negative jump threshold retained in the most recent trusted period or the preset initial negative jump threshold, update the normal fluctuation baseline, and generate the swing threshold, differential jitter threshold and negative jump threshold according to the normal fluctuation baseline. Step S5: When a significant negative jump is detected in step S4 or the event discrimination window is in an effective state, continue to discriminate nursing events and save the smoothed weight, current segment cumulative volume and corresponding sampling time at the most recent credible stable moment before the significant negative jump occurs; based on the lowest smoothed weight, event duration, smoothed weight after recovery and the trend of smoothed weight change within the event window, determine the current state as bag replacement state, emptying and dumping state, or disturbance state; When no significant negative jump is detected and the event discrimination window is not in a valid state, the current state is determined to be a disturbed state or a stable measurement state by combining the current credible state, swing threshold and differential jitter threshold; among them, only when it is determined to be a bag replacement state or an emptying and dumping state, the smooth weight after the recovery of stability is used as a candidate value for the starting point of the new segment. Step S6: Obtain the cumulative volume of the current segment based on the starting smooth weight and the current smooth weight of the current segment, and add the historical sealed segments to the current segment to obtain the total cumulative volume; when it is determined to be a bag replacement event or an emptying and dumping event, use the current segment cumulative volume at the most recent credible stable moment before the significant negative jump that was saved in step S5 as the segment final value for settlement and sealing, and set a new segment starting point after the weight reaches the stable condition again; Step S7: Only when the current trusted state is trusted and the current state is a stable measurement state, estimate the drainage fluid flow rate based on the cumulative volume sequence; Step S8: Accumulate the time when the flow rate of the drainage fluid continuously exceeds the corresponding flow rate threshold, and trigger the corresponding level of warning when the flow rate amplitude condition and duration condition are met at the same time, and record the status, event and warning log. Steps S3 to S8 select different processing paths based on the current trusted state and the current state type, thus forming a state-driven continuous measurement and early warning mechanism.

2. The method for continuous metering and graded early warning of drainage fluid based on state recognition according to claim 1, characterized in that, The smoothed weight is obtained by updating the current original weight and the smoothed weight of the previous sampling period in an exponential smoothing manner.

3. The method for continuous metering and graded early warning of drainage fluid based on state recognition according to claim 1, characterized in that, The swing amplitude is the difference between the maximum and minimum values ​​of the smoothed weight within the most recent short window, the differential jitter intensity is the standard deviation of the differences between adjacent smoothed weights, and the trend consistency is determined based on the quantitative relationship between positive and negative differences in the differences, as well as the median and median absolute deviation of the absolute values ​​of the differences.

4. The method for continuous metering and graded early warning of drainage fluid based on state recognition according to claim 1, characterized in that, When the stability is greater than or equal to the entry trust threshold, the current trust state is set to trustworthy; when the stability is less than or equal to the exit trust threshold, the current trust state is set to untrustworthy. When the stability is between the exit confidence threshold and the entry confidence threshold, the confidence state of the previous sampling period is maintained.

5. The method for continuous metering and graded early warning of drainage fluid based on state recognition according to claim 1, characterized in that, The oscillation amplitude baseline and differential jitter baseline are updated only when the current trusted state is trusted and no significant negative jump is detected according to the negative jump threshold retained according to the most recent trusted period or the preset initial negative jump threshold. The oscillation threshold, differential jitter threshold and negative jump threshold are generated from the baseline, the corresponding amplification factor and the lower threshold.

6. The method for continuous metering and graded early warning of drainage fluid based on state recognition according to claim 1, characterized in that, Significant negative transition detection takes precedence over perturbation rejection based on the current trusted state; Using the negative jump threshold retained by the most recent reliable period or a preset initial negative jump threshold, when the decrease in adjacent smooth weight exceeds the negative jump threshold, the event discrimination window is entered, or the event discrimination continues while the event discrimination window is in a valid state. When the lowest smooth weight is lower than the unloading threshold and the event duration is not greater than the fast recovery time threshold, it is determined to be a bag replacement event. When the bag replacement event conditions are not met, and the event duration is not less than the emptying event duration threshold, and the smooth weight in the event window generally shows a downward trend, it is determined to be an emptying and dumping event. Other cases are determined to be a disturbance state. When a bag replacement event or an emptying and dumping event is determined, the event ends with the smooth weight after it has recovered to a stable state, and a new segment starting point is determined after the weight reaches a stable state again.

7. The method for continuous metering and graded early warning of drainage fluid based on state recognition according to claim 1, characterized in that, The current cumulative volume of a segment is obtained by dividing the difference between the current smooth weight and the smooth weight at the starting point of the segment by the density of the drainage fluid. The total cumulative volume is the sum of the final value of each sealed segment and the current cumulative volume of the segment. When a significant negative jump is detected, the current segment cumulative volume at the most recent reliable stable moment before the negative jump occurs is saved. When it is determined to be a bag replacement event or an emptying and dumping event, the saved current segment cumulative volume is sealed as the segment final value. After bag replacement or emptying, the segment starting point is reset and the total cumulative volume is kept continuous.

8. The method for continuous metering and graded early warning of drainage fluid based on state recognition according to claim 1, characterized in that, The flow rate of the drainage fluid is obtained by dividing the volume change of the cumulative volume sequence within a preset differential step by the corresponding time, and the median of the multiple flow rate calculation values ​​within the most recent short window is taken.

9. The method for continuous metering and graded early warning of drainage fluid based on state recognition according to claim 1, characterized in that, Each warning level corresponds to a flow velocity threshold and a duration threshold, respectively. The flow velocity amplitude condition and duration condition for the same warning level are logically ANDed. When multiple warning levels are triggered at the same time, the highest warning level that meets the conditions is output.

10. A continuous metering and graded early warning device for drainage fluid based on state recognition, characterized in that, include: The system includes a weighing acquisition module, a processing module, and an alarm output module. The weighing acquisition module is used to acquire the original weight of the drainage bag. The processing module includes the following first to eighth processing modules. The alarm output module is used to output the current cumulative amount, status information, warning results, and event logs. The first processing module is used to initialize the measurement segment and load the operating parameters. After obtaining a stable and reliable weight signal, it records the current smoothed weight as the starting smoothed weight of this segment and records the start time of the segment. The second processing module is used to receive the original weight of the drainage bag output by the weighing acquisition module, and update the original weight to a smoothed weight according to the sampling period. The third processing module is used to determine whether the current data is stable and reliable based on the most recent short window, and to determine the current reliability status by using a dual-threshold hysteresis strategy formed by the entry reliability threshold and the exit reliability threshold. The fourth processing module is used to perform a significant negative jump pre-detection on the current data based on the negative jump threshold retained in the most recent trusted period or a preset initial negative jump threshold; when the current trusted state is trusted and no significant negative jump is detected according to the negative jump threshold retained in the most recent trusted period or the preset initial negative jump threshold, the normal fluctuation baseline is updated, and an oscillation threshold, a differential jitter threshold, and a negative jump threshold are generated based on the normal fluctuation baseline; The fifth processing module is used to continue nursing event discrimination when the fourth processing module detects a significant negative jump or the event discrimination window is in an effective state. It saves the smoothed weight, the current segment cumulative volume, and the corresponding sampling time at the most recent credible stable moment before the significant negative jump occurred, and determines the bag replacement state, emptying and dumping state, or disturbance state by combining the lowest smoothed weight, event duration, smoothed weight after recovery of stability, and the trend of smoothed weight change within the event window. It is also used to determine the disturbance state or stable measurement state by combining the current credible state, swing threshold, and differential jitter threshold when no significant negative jump is detected and the event discrimination window is not in an effective state. Among these, only when the bag replacement state or emptying and dumping state is determined, the smoothed weight after recovery of stability is used as a candidate value for the starting point of the new segment. The sixth processing module is used to obtain the cumulative volume of the current segment based on the smoothed weight of the starting point of the segment and the current smoothed weight, and to add the historical sealed segments to the current segment to obtain the total cumulative volume; when it is determined to be a bag replacement event or an emptying and dumping event, the current cumulative volume of the segment saved at the most recent reliable stable moment before the significant negative jump occurs is used as the final value of the segment for settlement and sealing, and a new segment starting point is set after the weight is re-stabilized; The seventh processing module is used to estimate the drainage fluid flow rate when the data is deemed reliable and no bag replacement, emptying, or disturbance events are detected. The eighth processing module is used to accumulate the estimated drainage fluid flow rate over time and issue graded warnings. When the flow rate amplitude condition and the duration condition are met simultaneously, the corresponding level of warning is triggered, and the status, events and warning logs are recorded.