A dialysis blood return control method and system based on patient subjective anticipation dynamic compensation
Patent Information
- Application Number
- CN202611067901.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-17
- Publication Date
- 2026-09-29
AI Technical Summary
[0003]针对现有技术中透析回血操作采用固定停泵阈值导致无法适应不同患者个体化回血量需求,且操作人员手动干预缺乏标准化和安全保障的不足,本申请提供了一种基于患者主观预期动态补偿的透析回血控制方法及系统
[0013]本申请的有益效果在于:通过将安全检测层与回血量调节层进行正交解耦,以传感器检测确定的基准零点作为安全锚定,在该基准零点之上叠加由患者个体化偏好参数驱动的补偿容积,使得底层传感器的安全检测功能在任何工况下均不被旁路或屏蔽。正向补偿时在基准零点后执行额外推送以满足回血充分性需求,负向补偿时在基准零点前提前停泵以减少液体摄入量,从而在维持安全检测完整性的同时实现对不同患者回血量需求的差异化响应。操作人员的微调输入作为反馈信号驱动补偿修正量的自适应更新,使补偿容积随透析次数的增加逐步趋近该患者的实际需求。
Smart Images

Figure CN122842967A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of hemodialysis equipment control technology, and in particular to a method and system for controlling dialysis blood return based on dynamic compensation of patient subjective expectations. Background Technology
[0002] At the end of hemodialysis treatment, a blood return procedure is required, which involves using a blood pump to return blood from the tubing and dialyzer to the patient using saline solution. Current dialysis machines generally use a standardized, fixed pump stop threshold: the system immediately stops the pump when an air detector or optical sensor detects that the blood-saline interface in the tubing has reached a preset position. This approach applies the same stop criterion to all patients, failing to consider individual differences in blood return volume requirements. Some patients perceive insufficient return and excessive blood residue in the tubing, while others with volume sensitivity perceive excessive return volume, leading to additional fluid intake. This discrepancy forces operators to use non-standardized, manual intervention methods in clinical practice. These methods rely on personal experience and cannot generate reusable data accumulation, posing safety risks. Summary of the Invention
[0003] To address the shortcomings of existing dialysis blood return control technologies, which rely on fixed pump stop thresholds and fail to meet the individualized blood return volume requirements of different patients, and which lack standardization and safety guarantees due to manual intervention by operators, this application provides a dialysis blood return control method and system based on dynamic compensation according to the patient's subjective expectations. This method achieves personalized adjustment of blood return volume by superimposing a compensation volume based on the patient's individual preferences above the sensor's reference zero point, without bypassing the underlying safety detection function. Specifically, this application provides the following technical solutions: In a first aspect, this application provides a dialysis blood return control method based on dynamic compensation according to the patient's subjective expectations, comprising: loading the individualized profile of the patient to be dialyzed, and obtaining the patient's blood return preference parameters and tubing parameters; determining the target value of the compensation volume and the compensation direction according to the blood return preference parameters through a preference mapping rule; driving the blood pump to perform blood return operation, accumulating the pumped volume in real time, and determining a reference zero point by detecting changes in the medium in the tubing through a sensor; when the compensation direction is positive, continuing to drive the blood pump to push an additional volume corresponding to the target compensation volume after the reference zero point and then stopping the pump; when the compensation direction is negative, stopping the pump in advance before reaching the reference zero point; and if the sensor detects the presence of an abnormal medium in the tubing during the compensation push, forcibly stopping the pump.
[0004] Optionally, the preference mapping rule includes mapping the multi-level preference labels in the recovery preference parameters to the corresponding basic compensation volume values.
[0005] Optionally, the target compensation volume value is further subjected to a safety limiting process, restricting the target compensation volume value to a preset safety upper limit range.
[0006] Optionally, it also includes: receiving fine-tuning input from the operator regarding the amount of blood return within a preset time window after the pump is stopped, and updating the patient's compensation correction amount based on the fine-tuning input.
[0007] Optionally, updating the patient's compensation correction amount includes: smoothing the fine-tuning input using a weighted moving average algorithm to obtain a new compensation correction amount, and determining the convergence state of the compensation correction amount based on whether the fine-tuning input is lower than a preset threshold multiple times consecutively.
[0008] Optionally, during the process of pushing the additional volume, when the pushed volume approaches the target value of the compensation volume, the blood pump speed is reduced to improve the accuracy of stopping the pump.
[0009] Optionally, it also includes: issuing differentiated prompts to the operator based on the type of blood return completion event after the pump is stopped, and activating the manual fine-tuning entry within the preset time window for the operator to make fine adjustments.
[0010] Optionally, the real-time cumulative pumping volume is obtained by multiplying the number of revolutions of the blood pump encoder by the single-turn pumping volume of the pipeline parameters.
[0011] Secondly, this application provides a dialysis blood return control system based on dynamic compensation of patient subjective expectations, comprising: The patient record management module is used to load the individualized records of patients to be dialyzed to obtain the patient's blood return preference parameters and tubing parameters; A preference labeling engine is used to determine the target value of the compensation volume and the compensation direction based on the blood recovery preference parameters and preference mapping rules. The blood return execution and sensor monitoring module is used to drive the blood pump to perform blood return operation and accumulate the pumping volume in real time. It uses sensors to detect changes in the medium in the pipeline to determine the reference zero point, and if the sensor detects an abnormal medium in the pipeline during the compensation push, it will force the pump to stop. The compensation volume push module is used to continue driving the blood pump to push an additional volume corresponding to the compensation volume target value after the reference zero point and then stop the pump, or to stop the pump in advance before reaching the reference zero point.
[0012] Optionally, it also includes: a learning and correction module, used to receive fine-tuning input from the operator on the amount of blood return after the pump is stopped and to update the compensation correction amount for the patient based on the fine-tuning input; and a pump stop interaction module, used to issue differentiated prompts to the operator based on the type of blood return completion event and to activate the manual fine-tuning entry.
[0013] The beneficial effects of this application are as follows: By orthogonally decoupling the safety detection layer and the blood return volume adjustment layer, and using the baseline zero point determined by sensor detection as the safety anchor, a compensation volume driven by individualized patient preference parameters is superimposed on this baseline zero point. This ensures that the safety detection function of the underlying sensor is not bypassed or blocked under any operating condition. During positive compensation, an additional push is performed after the baseline zero point to meet the requirement of adequate blood return; during negative compensation, the pump is stopped before the baseline zero point to reduce fluid intake. This maintains the integrity of safety detection while achieving a differentiated response to the blood return volume requirements of different patients. The operator's fine-tuning input serves as a feedback signal to drive the adaptive update of the compensation correction amount, allowing the compensation volume to gradually approach the patient's actual needs with the increase of dialysis sessions. Attached Figure Description
[0014] Figure 1 This is a schematic diagram of the overall process of the dialysis blood return control method provided in the embodiments of this application.
[0015] Figure 2 This is a schematic diagram of the blood return execution and baseline zero-point detection sub-process provided in the embodiments of this application.
[0016] Figure 3 This is a schematic diagram of the compensation volume push control sub-process provided in an embodiment of this application.
[0017] Figure 4 This is a schematic diagram of the learning correction and convergence determination sub-process provided in the embodiments of this application.
[0018] Figure 5 The learning convergence process data curve provided in the embodiments of this application.
[0019] Figure 6 This is a schematic diagram comparing the blood return volume of patients with different preference types, provided in the embodiments of this application.
[0020] Figure 7 This is a schematic diagram of the patient record data structure provided in an embodiment of this application.
[0021] Figure 8 This is a schematic diagram of the dialysis blood return control system module architecture provided in an embodiment of this application. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with the accompanying drawings and specific embodiments. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0023] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0024] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0025] This embodiment provides a dialysis blood return control method based on dynamic compensation according to the patient's subjective expectations. In a specific implementation, this method superimposes a compensation volume based on the patient's individualized blood return preference parameters on top of a baseline zero point determined by the underlying sensors. This allows for differentiated responses to the blood return volume requirements of different patients without bypassing the underlying safety detection function. This method solves the technical problem in existing technologies where a uniform fixed pump stop threshold is used for all patients, making it impossible to adapt to individualized needs. It achieves the beneficial effect of personalized adjustment of blood return volume while maintaining the integrity of sensor safety detection.
[0026] like Figure 1 As shown, this method includes the following steps: S000, load the individualized profile of the patient to be dialyzed, and obtain the patient's blood return preference parameters and tubing parameters. For example... Figure 7 As shown, this stage completes three tasks: patient identification, file loading, and system self-check.
[0027] S010, obtain the patient's unique identifier through patient identification information and retrieve the patient's individualized file.
[0028] When dialysis treatment ends and the patient is ready to return blood, the operator places the patient's IC card in the dialysis machine's card reader area or manually enters the patient's number via the touchscreen display. The system reads the unique identifier stored in the card through the communication interface with the IC card reader. The This is an alphanumeric string of 8 to 16 characters in length. (Get...) Subsequently, the patient record management module stores the data in local non-volatile memory using the aforementioned... Perform a file search operation for the search key.
[0029] The non-volatile memory stores a patient blood return expectation preference database, which is organized using an array structure of fixed-length records. Each patient record... Includes the following fields: expected return preference label The label is an unsigned integer ranging from 0 to 4, corresponding to five preference categories: extremely blood-saving, blood-saving, standard, water-controlling, and strictly water-controlling; machine learning correction amount. Stored as signed integers with a precision of 0.1 ml; the compensation volume actually used last time. The historical sequence of fine-tuning doses from the last 20 dialysis sessions. Valid historical record count ; and convergence status flags For example, the raw data of a single record occupies 68 bytes, plus a 4-byte record header, totaling 72 bytes. The record header includes a CRC16 cyclic redundancy check code and a record status flag; the former is used to detect data corruption caused by abnormal memory writes. Based on the typical patient size managed by a blood purification center, a database of 500 patients would require approximately 36,000 bytes of storage space, which can be accommodated by the on-chip memory of at least 512KB in the dialysis machine's main controller.
[0030] When a matching record is found, the system loads all fields from it for subsequent steps. When no matching record is found, the system automatically creates a default record for the patient. Set to 2, i.e., standard type. Set to 0, Set as an empty sequence, Set to 0, Set to 0. After creation, the display prompts the operator to confirm or modify the expected return preference label.
[0031] For example, after an operator swipes a patient's IC card, the system reads... The record for PATIENT_0037 was found in the archive database. This indicates a preference for certain blood types. The stored value is 8, which corresponds to a correction amount of 0.8 ml. The stored value is 158, which corresponds to 15.8 ml. The archive contains data from the last 12 fine-tuning iterations. This archive was fully loaded into system memory.
[0032] For new patients visiting for the first time, after confirming the default standard label, operators can also directly select a more suitable preference label based on clinical assessment. The selection is completed via five preference type buttons on the touchscreen display. Each button simultaneously displays the label name and the corresponding basic compensation volume direction prompt (e.g., blood-saving type: more blood return and water-control type: less blood return), helping operators make a selection that meets the patient's needs even without knowing the specific numerical values. After the operator selects a label, the system immediately updates the patient's file. The field is then written back to memory. If the operator does not make a selection within 30 seconds, the system retains the default standard label and automatically closes the selection interface.
[0033] Furthermore, the system supports multiple methods for acquiring patient identification information to adapt to the hardware configurations of different dialysis centers: in addition to IC card reading, it is also compatible with barcode scanner input (connected via a Universal Serial Bus interface) and manual input of patient numbers by operators on a touchscreen keypad. All three input methods are ultimately converted into a unified format. The string is used for subsequent processing. The system will automatically truncate inputs exceeding 16 characters or pad with zeros before inputs less than 8 characters to meet the format requirements.
[0034] S020, Obtain pipeline parameters based on pipeline model.
[0035] While the patient's file is being loaded, the operator selects the currently used blood tubing type from the dialysis machine's tubing type list. This tubing type information can also be automatically read from the RFID tag on the tubing packaging. Based on the selected tubing type, the system reads two key parameters from a pre-set tubing parameter table: the tubing's single-turn pump volume. and nominal blood return volume of the pipeline The aforementioned This represents the pumping volume generated by the blood pump per revolution of the tubing, with a value ranging from 0.8 to... This depends on the inner diameter of the pipeline and the geometric parameters of the pump head rollers. This indicates the nominal total return volume of this type of tubing, with a value ranging from 150 to... It depends on the total length and inner diameter of the arterial and venous segments of the tubing.
[0036] For example, a standard blood tubing with an inner diameter of 3.2 mm is used with a standard pump head. , For pediatric use, small-diameter tubing (2.5mm inner diameter) is recommended. , The piping parameter table is pre-installed in the system configuration area by the equipment manufacturer at the factory, with a set of parameters corresponding to each piping model. The calibration method is as follows: Under standard temperature and standard pump head pressure conditions, drive the blood pump to rotate 100 times with pure water as the medium, weigh the mass of the discharged liquid and divide it by 100 to obtain the volume per revolution. The calibration method is as follows: completely fill the pipeline with liquid, then drain it, and weigh the total mass of the drained liquid. The calibration accuracy of both parameters is better than [previous value]. .
[0037] S030, Perform a system self-test to confirm the working status of the sensors and actuators.
[0038] After the pipeline parameters are loaded, the system automatically initiates a self-test process, sequentially verifying the functionality of each hardware component upon which the blood return control depends. The air detector's self-test is performed by clamping the pipeline to expose the detector to an air environment; in this state, its output level should be higher than [a certain value]. The threshold. The self-test of the optical sensor is a zero-calibration operation, reading the transmittance reference value under empty pipeline conditions. The The acceptable range is 0.85 to 1.0. The self-test of the blood pump encoder is completed by manually rotating the pump head one revolution and counting the number of pulses generated by the encoder. A pass is achieved if the deviation of the pulse count from the encoder's rated resolution does not exceed one pulse. The self-test of the non-volatile memory is completed by reading the feature word of the preset verification area and matching it with the expected value.
[0039] When all four self-tests pass, the system will display a ready flag. Set to 1 to allow the health regeneration operation to begin. If any self-check fails, Setting it to 0 triggers an alarm and prevents the system from initiating a recovery cycle. For example, in the PATIENT_0037 scenario described above, the air detector outputs... Higher than Threshold, optical sensor zeroing value Within acceptable limits, the blood pump encoder pulse count is 200, consistent with the rated resolution of 200; the memory feature word matching is successful; and all four self-tests are passed. .
[0040] The self-test process is specifically designed with the following execution order: the air detector is executed before the optical sensor because the air detector's self-test requires the tubing to be in a closed state (with air inside), while the optical sensor's zeroing requires the tubing to be in an open, empty state. The blood pump encoder's self-test is scheduled last because it requires manual rotation of the pump head by the operator. The entire self-test process takes approximately 8 to 12 seconds, with the air detector's response waiting time being approximately... The optical sensor collected stable readings for approximately (Sampling 30 times consecutively and averaging to eliminate noise), the encoder is manually rotated approximately... Memory verification approximately The self-test results are stored in the system status register in bitmap form, with each bit corresponding to the pass or fail status of a self-test item, which facilitates quick location of the failed item during fault diagnosis.
[0041] As a supplement to the self-test procedure, after the dialysis machine is first powered on or after maintenance, the system performs an extended self-test procedure, which includes two additional items: a torque test of the blood pump motor and a tubing clamping force test. The torque test indirectly assesses the mechanical condition of the motor and transmission mechanism by driving the motor to rotate under no-load conditions and measuring the current value. A current value exceeding the nominal range will trigger an assessment. This is considered unacceptable. The tubing clamping force test assesses the adequacy of the pump head rollers' compression of the tubing by rotating the blood pump several times under sealed tubing conditions and monitoring the changes in the downstream pressure sensor readings. A pressure change rate below a preset threshold is considered insufficient clamping force. The extended self-test is not performed before each blood return to avoid extending the preparation time for daily operations.
[0042] The zeroing operation of the optical sensor uses the arithmetic mean of 30 consecutive samples to eliminate noise. The calculation formula is: ,in For the first Raw transmittance readings from the first sampling. 30 samplings at... Completed within the time window, with a sampling interval of If the standard deviation of 30 samples exceeds 0.02, the system determines that the optical sensor is in an unstable state and prompts the operator to reinstall the pipeline and perform zeroing again.
[0043] S100, based on the blood return preference parameters, determine the target value of the compensation volume and the compensation direction through preference mapping rules.
[0044] like Figure 6 As shown, this stage transforms discretized patient preference labels into continuous compensation volume values.
[0045] S110 converts the expected return preference label into the basic compensation volume value through the label-volume mapping table.
[0046] The system loads patient records from S000. Extracting the expected preference label for blood return The core of the preference mapping rule is a label-volume mapping table pre-set by the medical team. This table establishes five discrete preference levels and their corresponding basic compensation volume values. The mapping table shows the correspondence between them. The value is used as an index for direct addressing and is stored in the system configuration area as a constant array of 5 elements. Its internal storage uses signed integers with a precision of 0.1 ml.
[0047] The mapping relationship is as follows: when That is, when one is extremely blood-conserving, The clinical basis for this value is that the total volume of the blood tubing is usually in the range of 150 to 200 ml, and the additional 25 ml of saline can ensure that residual blood in the arterial end of the tubing is fully flushed and reinfused; when When blood type is scarce, Extend the flushing process appropriately to reduce visible residual blood in the tubing; when That is, in the standard form, Consistent with the traditional fixed threshold pump shutdown method, no compensation is added; when In the case of water control type, By stopping the pump earlier, fluid intake is reduced by approximately 10 ml, making it suitable for volume-sensitive patients; when That is, when strictly controlling water, Minimize fluid intake to the greatest extent possible within safe limits.
[0048] The values in the mapping table are set by the medical director of the hospital's hemodialysis center based on evidence-based medicine and stored in the system configuration area, not the patient file area. Modification requires password verification from the medical administrator. The reason for using a 5-level discrete label system instead of continuous numerical values is that the label system is more intuitive, and operators are less likely to make mistakes when selecting their preferred type, while the continuous numerical input method has higher operational complexity and risk of misinput.
[0049] The volume values of the five-level labels are not evenly distributed. The spacing on the positive compensation side (blood loss direction) is... (From +15 to +25), the spacing on the negative compensation side (water control direction) is also the same. (From -10 to -20), while the standard type is at zero. This symmetrical distribution design centered on zero provides an intuitive sense of direction for label selection: a larger value indicates a greater tendency for more blood return, and a smaller value indicates a greater tendency for less blood return. In clinical practice, doctors typically base their initial label preferences on the following criteria: the patient's dry weight target, the rate of weight gain between dialysis sessions, whether there is a history of heart failure or pulmonary edema, and the patient's subjective acceptance of residual blood in the tubing. Once set, the labels usually remain stable, and are only reassessed and adjusted by the doctor when the patient's condition changes significantly.
[0050] S120 superimposes the base compensation volume value with the machine learning correction amount and performs a safety limit.
[0051] Get Then, the system further retrieves machine learning correction values from the patient records. The aforementioned The weighted moving average algorithm in subsequent S500 steps calculates and writes back to the patient's file. For patients visiting for the first time or whose files are newly created, the initial value is 0. The system will... and The values are superimposed to obtain the final target compensation volume. The overlay process also includes safety limiting:
[0052] The limiting function is defined as follows: , This is a safety hard limit preset for the device manufacturer. The basis for this limit is that pushing more than 30ml of additional saline may cause acute volume overload symptoms in volume-sensitive patients, while stopping the pump before 30ml is reached will result in the amount of blood remaining in the tubing exceeding the clinically acceptable range. Its own value range is independently restricted to to In between, to ensure that even if the learning algorithm experiences abnormal fluctuations, the superposition... After It is still within a safe range.
[0053] S130, determine the compensation direction based on the target value of the compensation volume.
[0054] After completing the overlay and limiting calculations, the system... The sign determines the direction of compensation. :when hour This indicates positive compensation, meaning that additional volume pushes need to be performed after the baseline zero point; when hour This indicates no compensation, equivalent to the traditional fixed threshold pump stop behavior; when hour This indicates negative compensation, meaning the pump needs to be stopped before reaching the reference zero point. It will serve as the control input for steps S200 and S300, determining the working mode of the blood return execution.
[0055] For example, for the aforementioned PATIENT_0037 blood-thinning patient, Found , , superimposed Amplitude limit check: No amplitude limiting required. Direction determination: , The patient's blood return procedure will continue to be pushed after the baseline zero point. Additional saline solution.
[0056] After the compensation volume and direction are determined, step S100 also performs an input / output integrity check: the calculated... and Substitute back into the original formula to verify. Is the value the same as the value after the limit? Consistency or explanation (in cases of amplitude truncation), and Are the symbols related to The symbols correspond. If a discrepancy is found during verification, the system logs this exception in the error log but does not prevent the blood return process from continuing, because the discrepancy usually stems from precision deviations in floating-point operations rather than logical errors. The log records include patient identifiers, timestamps, and , Before and after the limit This value is provided for technicians to review during routine maintenance.
[0057] All computations in step S100 are completed in deterministic time: mapping table lookups take constant time. The operations, addition, and limit operations are arithmetic instructions with fixed cycles. The execution time of the entire S100 step does not exceed [a certain value]. The delay is imperceptible to the operator.
[0058] Let's take another patient with strict water control as an example. Found , , superimposed . No bandwidth limit required. The patient will be before the nominal return volume. The pump was stopped in advance.
[0059] As a counterexample, consider the case of long-term positive fine-tuning in patients with extreme blood-hoarding tendencies: correspond , , superimposed Exceeded safety limit. Width limited. , The system displays a message indicating that the compensation amount has reached the safety limit, informing the operator that the current compensation volume is subject to safety constraints.
[0060] The S200 drives the blood pump to perform blood return operation, accumulates the pumped volume in real time, and uses sensors to detect changes in the medium in the pipeline to determine the reference zero point.
[0061] like Figure 2 As shown, this stage involves activating the blood pump to perform blood return and continuously monitoring sensor signals to capture baseline zero-point events.
[0062] S210 drives the blood pump to start blood return and accumulates the pumped volume in real time by setting the rotation speed.
[0063] The system receives the blood pump return speed set by the operator. The The value range is 80 to This is the standard operating range for the blood return phase. After receiving this speed setpoint, the blood pump motor drive circuit controls the brushless DC motor to operate in a closed-loop speed regulation mode via a pulse width modulation signal. An incremental photoelectric encoder mounted on the blood pump shaft rotates synchronously with the shaft, generating a number of pulse signals equal to the encoder's rated resolution for each rotation. The system accumulates and counts the encoder pulses via hardware interrupts to obtain the cumulative number of revolutions up to the current moment. .
[0064] The real-time calculation of pumping volume is based on the following relationship:
[0065] in Deadline The cumulative pumping volume, in ml; Deadline The cumulative revolutions of the encoder are dimensionless integers; The unit is the single-turn pumping volume of the pipeline obtained from the pipeline parameter table in step S000. The pumping volume of a peristaltic blood pump is directly proportional to the number of times the rollers compress the tubing; the volume resolution of the encoder revolution method is approximately... Far superior to system requirements Precision.
[0066] The errors in the volume calculation method mainly come from three aspects: First, the actual pumping volume per cycle due to pipeline elastic deformation differs from the nominal value. The deviation between the two is relatively small, and this deviation increases slowly with the increase of pipeline usage time. The deviation of new pipelines is usually smaller than that of other pipelines. Second, the slippage between the blood pump rollers and the tubing, under normal operating pressure, is less than [a certain percentage]. Third, the quantization error of the encoder pulse count is... Each pulse corresponds to The volume error, of which This represents the number of pulses per encoder revolution. , For example, the quantization error is The combined effect of the three errors is approximately [missing information] at the 200ml blood return level. Right now This meets the system's accuracy requirements.
[0067] The working principle of a peristaltic blood pump is as follows: multiple rollers sequentially compress an elastic tubing along the circumference, propelling the liquid within the compressed section forward. Upon release, the tubing's elasticity recovers, creating negative pressure that draws in liquid from the rear. An inherent characteristic of this pumping method is that volume is strictly proportional to the number of revolutions, and it is not significantly affected by liquid viscosity or tubing back pressure. Therefore, the encoder revolution method can provide reliable volume measurement.
[0068] It should be noted that the above The calculations are updated in real time within the encoder interrupt service routine of the main controller, and the interrupt trigger frequency is equal to the encoder pulse frequency. and For example, the interrupt frequency is The operations performed by each interrupt service routine include: setting the global counter. Increment by 1, The calculation results are written into the shared volume variable. To avoid the main loop reading... In the event of a data race, the shared variable employs a double-buffering mechanism: the interrupt service routine writes to the backup buffer, and the main loop reads from the foreground buffer; both are buffered in each main loop cycle. At the end, an atomic exchange is performed.
[0069] For example, for , With this configuration, the blood pump completes 2 revolutions per second after starting, and each revolution pumps... Salt water. time, change, .exist time, change, .
[0070] S220 uses sensors to detect changes in the medium within the pipeline to determine the reference zero point.
[0071] During blood pump operation, air detectors and optical sensors continuously monitor the state of the medium within the tubing. During blood return, the tubing sequentially passes through a blood section, a blood-saline mixing transition section, and a pure saline section. The transmittance of the optical sensor gradually changes from a low value in the blood section to a high value in the saline section, while the air detector maintains a liquid state output during the liquid section.
[0072] The system employs a dual confirmation mechanism to determine the baseline zero-point event. Triggering conditions:
[0073] in This represents the transmittance reading of the optical sensor at the current moment. The zero-transmittance of the empty pipeline obtained during the S000 self-test phase. When the optical threshold, i.e., the transmittance recovers to more than 60% of the empty pipeline reference value, is reached, the brine front is considered to have reached the detection window. This indicates the current status of the air detector. The dual-verification design ensures that the reference zero point is triggered only when brine arrives and the tubing is indeed liquid, preventing misidentification of an air section as a brine section. The sensor monitoring sub-component... The analog voltage of the optical sensor is sampled periodically, and the digital level status of the air detector is read.
[0074] When the dual confirmation condition is met, the system marks the reference zero point event. Since this has been triggered, record the cumulative volume at this moment. And timestamp. The aforementioned This is the standard blood return volume detected by the sensor, which serves as a reference for subsequent compensation volume calculations.
[0075] For example, during the blood return process in patients with blood-retention syndrome, Transmittance ratio of time-of-flight optical sensors The value is greater than the threshold of 0.6, and the air detector status is LIQUID, thus satisfying the double confirmation condition. trigger, .
[0076] The dual confirmation mechanism is designed to eliminate potential misjudgments from a single sensor. While optical sensors can detect changes in the optical properties of the medium within the pipeline, they are susceptible to the following misjudgments: air bubbles adhering to the pipeline wall may cause a localized increase in transmittance, leading to a misinterpretation as the arrival of saline solution; light path deflection at pipeline bends may produce abnormal readings. Air detectors, operating based on ultrasonic propagation characteristics, can reliably distinguish between liquids and gases, but cannot differentiate between blood and saline solution. By performing a logical AND operation on the judgment results of the two sensors, the aforementioned misjudgment scenarios can be eliminated: the optical sensor confirms a change in the optical properties of the medium (blood → saline solution), and the air detector confirms that the pipeline contains liquid (not air); only when both conditions are met is it confirmed that the saline solution front has truly reached the detection location.
[0077] The threshold selection is based on the following considerations: the transmittance ratio of the pure blood segment. Typically, the ratio in the pure saline segment is close to 1.0, ranging from 0.1 to 0.3, while the ratio in the blood-saline mixing transition segment gradually changes between 0.3 and 0.8. Choosing 0.6 as the threshold means that when the saline concentration exceeds approximately... The brine front is considered to have been reached at that time, and this selection achieves a balance between sensitivity and anti-interference.
[0078] S230, when the compensation direction is negative, the pump will stop before reaching the reference zero point.
[0079] When S100 determines the compensation direction In this case, the system does not wait for the triggering of the reference zero-point event, but actively stops the pump when the pumping volume reaches the early stop threshold. The early stop threshold is calculated as follows:
[0080] in The nominal blood return volume of the pipeline is obtained for step S000. The system updates this value during each encoder interruption. Then, combine it with Comparison. When At that time, the system generated an early pump stop event. And immediately stop the blood pump. At this point, some blood in the tubing has not been completely flushed out by the saline solution; the amount of residual blood is approximately equal to This aligns with the expectation that patients with fluid restriction would rather accept a small amount of residual blood in the tubing than reduce their fluid intake.
[0081] In the early pump stop mode, the system does not enter step S300, but directly jumps to step S400 to execute the interactive process after pump stop.
[0082] For example, for patients with strict water control... , Configuration, .when Accumulated to Time (corresponding) Turn, because (The condition is met for the first time after rounding) Triggered, blood pump stops. Approximately [amount missing] in the tubing. The blood segments were not rinsed.
[0083] In negative compensation mode, early pump discontinuation means the patient voluntarily forgoes some residual blood in the tubing in exchange for less fluid intake. This mode is suitable for the following clinical scenarios: end-stage renal disease patients with strict fluid restriction, whose allowable weight gain between dialysis sessions is extremely limited; patients with congestive heart failure, where additional fluid intake may increase cardiac preload; and patients who will undergo weight assessment after dialysis, requiring precise control of fluid balance. (Residual blood in the tubing) The corresponding blood loss is approximately ,in The patient's hematocrit. , For example, the actual loss of red blood cells is approximately Within the clinically acceptable range.
[0084] S240: If the sensor detects an abnormal medium in the pipeline during the blood return process, the pump will be forcibly stopped.
[0085] Regardless of whether the system is in positive or negative compensation mode, the air detector remains operational throughout the entire blood return process. When the air detector's output changes from LIQUID to AIR, it indicates the presence of air in the tubing. Air can occur due to premature depletion of the saline bag or a loose tubing connection. If air is pumped into the patient, it can cause a serious safety hazard such as air embolism.
[0086] The emergency pump stop function of the air detector is implemented by a separate hardware interrupt circuit, with a response time of less than [time value missing]. This hardware interrupt is independent of the main controller's software polling cycle. It has higher priority than all software logic, ensuring that the safety detection functions of the underlying sensors are not bypassed or disabled under any operating condition. A safety interrupt event is generated after an emergency pump stop is triggered. An emergency alarm was issued.
[0087] It is important to note that if the optical sensor detects high transmittance during normal blood return, and the air detector simultaneously reports an AIR status, it indicates that air, not saline solution, has reached the detection window. In this case, the dual confirmation condition for the reference zero point is not met, and the system will not trigger incorrectly. Instead of triggering an emergency pump stop, a hardware interrupt is used to directly execute the emergency pump stop. This mechanism reflects the orthogonal decoupling design of the safety detection layer and the health regeneration adjustment layer: the judgment logic of the safety layer is independent of the calculation and execution logic of the compensation volume, and the two do not interfere with each other.
[0088] From a system architecture perspective, the implementation mechanism of the orthogonal decoupling is further explained: the hardware interrupt circuit of the safety detection layer is completely bound to the hardware level from the air detector to the stop signal path of the blood pump motor drive, without going through the software task scheduler of the main controller. Even if the main controller software experiences abnormal states such as infinite loops, task stack overflows, or watchdog timeouts, the hardware interrupt circuit can still independently complete the entire process from air detection to pump shutdown. This hardware independence is achieved through the following circuit topology: the digital output of the air detector is directly connected to the input of a hardware latch, and the output of the latch is logically ANDed with the enable signal of the blood pump motor drive circuit. When the air detector outputs the AIR state, the latch flips to a low level, the enable signal is pulled low, and the motor drive circuit immediately cuts off the power supply to the blood pump motor. The latch needs to be reset by the operator pressing a physical reset button; this design prevents the latch from being automatically reset due to software misoperation.
[0089] After detecting a hardware interrupt, the main controller's software is responsible for performing non-safety-critical tasks such as alarms, logging, and interface updates. Software-level response latency (typically within...) (Within) does not affect the timeliness of the pump shutdown action, because the pump shutdown is completed independently by the hardware.
[0090] S300, when the compensation direction is positive, after the reference zero point, the blood pump continues to push an additional volume corresponding to the target compensation volume and then stops.
[0091] like Figure 3 As shown, this stage only occurs in It is executed in real time, precisely controlling the amount of additional brine pushed after the baseline zero point.
[0092] S310 continues to drive the blood pump and accumulates compensation volume in real time after the reference zero point.
[0093] Reference Zero Event Upon triggering, the system records the cumulative encoder revolutions at that moment. The blood pump then continued operating, and the system began independently calculating the cumulative value of the compensation volume:
[0094] This is calculated by multiplying the increase in revolutions from the baseline zero point by the pumping volume per revolution in the pipeline. The system also calculates the target revolutions increment required to reach the target compensation volume. Rounding up is used to ensure that the actual push volume is not lower than the target value. At that time, the system issued a pump stop command.
[0095] Throughout the compensation push process, the system starts a 60-second timeout watchdog timer. If within 60 seconds... Not yet reached The target value indicates a possible abnormal situation such as tubing blockage or blood pump mechanical failure, which could force the system to stop the pump and generate a timeout shutdown event. The buzzer emits an intermittent warning tone, different from the one indicating a safety interruption. ring, (The loop stops), and the display shows a compensation push timeout message.
[0096] The 60-second timeout limit is set based on the following: at the lowest pump speed and maximum compensation volume Under extreme combinations, the theoretical time required to complete the push is A 60-second timeout period is reserved on top of this. The safety margin is designed to accommodate transients during pump speed build-up and brief delays during deceleration. If the target volume is not reached within 45 seconds, it strongly suggests a mechanical fault such as tubing blockage (e.g., blood clot blockage), pump head roller detachment, or encoder signal loss.
[0097] S320 reduces the blood pump speed to improve pump shutdown accuracy when the pushed volume is close to the target value of the compensation volume.
[0098] To avoid volume overshoot due to motor inertia when stopping the pump directly at the target speed, the system employs a final-stage deceleration strategy. The width of the deceleration zone is defined. and low speed after deceleration The speed switching logic is as follows:
[0099] when Entering the distance from the target value During the deceleration range, the blood pump speed drops from the set blood return value to... .exist Time per revolution of the blood pump The main controller has ample time to respond to the pump stop command when the target speed is reached. The braking time of the motor from receiving the stop command to actually stopping is approximately... ,exist The corresponding overshoot volume is approximately Much smaller than the system requirements Precision.
[0100] The control principle of the final deceleration strategy is based on a combination of open-loop velocity planning and closed-loop position feedback. Before the deceleration interval, the system pushes at full speed at the set rotational speed. The control objective during this stage is to quickly approach the target value to shorten the total time of compensation push. After entering the deceleration interval, the control objective switches to precise stopping, and the low rotational speed ensures that the displacement increment of the blood pump is sufficiently small within the response cycle of encoder interruption. The selection of the deceleration range width takes into account the following factors: This value must be greater than the transition distance of the motor from full-speed braking to low speed (approximately...). At the same time, it should not be too large to avoid unnecessarily prolonging the push time. The low-speed selection ensures that, in the worst-case scenario (main controller interrupt response delay), The overshoot volume does not exceed .
[0101] From the perspective of system reliability, the final deceleration strategy also provides an additional safety margin: if the encoder experiences occasional pulse loss during the full-speed push phase (the probability is extremely low but not zero), the system has the opportunity to compensate for possible accumulated errors by accurately counting during low-speed operation after entering the deceleration range.
[0102] S330: If the sensor detects an abnormal medium in the pipeline during the compensation push, the pump will be forcibly stopped.
[0103] The safety protection mechanism during the compensation push phase is completely consistent with the mechanism described in S240. The air detector operates continuously during the compensation push phase; if it detects an air segment in the pipeline, it immediately forces the pump to stop via a hardware interrupt, generating a safety interrupt event. The safety layer has a higher priority than the target achievement logic of the compensation volume, reflecting the orthogonal decoupling design principle that the safety detection layer is always independent of the health recovery adjustment layer.
[0104] The state machine for the compensation push phase includes three states: PUSHING_FAST (full-speed push), PUSHING_SLOW (decelerated push), and COMPLETED (push complete). State transitions are handled by... Real-time value driven: Maintain the PUSHING_FAST state at all times; and It enters the PUSHING_SLOW state at that time; The system enters COMPLETED state and stops pumping. (Safety interruption event) It can be triggered in any state. After being triggered, the state machine directly jumps to an independent EMERGENCY_STOP state. The difference between this state and the COMPLETED state is that the prompting mode and log content in the subsequent steps are different.
[0105] The encoder interrupt processing time in each state of the state machine does not exceed [a certain value]. This includes reading encoder counts and updating... The process involves three steps: determining the execution status. At the highest pump speed, the encoder generates approximately [amount missing] per second. The total CPU utilization for interrupt handling is approximately [number] pulses. It will not affect the normal operation of other tasks of the main controller.
[0106] For example, the process for PATIENT_0037 blood type patients continues: When triggered change, , , Target revolutions increment Turn. The deceleration entry point is... , corresponding to the Redirect. Execution process: Redirects 1 to 10... Full-speed push, From 0 to It takes about ; at the 11th turn Deceleration is triggered, and the pump speed switches to [a specific speed]. Turns 11 to 16 Push notifications, every repost Total time When the 16th turn is completed Pump stopped. Actual compensation volume. , accuracy deviation Compensation push total time This is far less than the 60-second timeout limit. The system generates a compensation completion event. .
[0107] The accuracy of the above example was analyzed and verified. The target compensation volume was set as... Actual push volume ,deviation Derived from discrete-to-quantized encoder: This means the minimum adjustment step size of the volume is Rounding up resulted in The positive deviation. The worst-case scenario for this deviation is... (when Exactly When multiples of integers plus a small margin), far away Within the system accuracy requirements. For For small-diameter pipelines, the minimum step size is reduced to The accuracy has been further improved.
[0108] As an example of another parameter combination, consider (Safety upper limit) , Configuration. Turn. Deceleration entry point Corresponding to the 26th revolution. Time taken from revolutions 1 to 25 at full speed. The deceleration phase, from 26th to 30th revolution, takes [time]. Total time spent This is far below the 60-second timeout limit.
[0109] From the perspectives of energy consumption and patient comfort, the terminal deceleration strategy reduces the pump speed to a minimum during the final stage of compensating for the puncture. At this time, the flow velocity in the pipeline is approximately ( The flow rate is significantly lower than that at full speed. This lower flow rate reduces pressure fluctuations within the tubing and pulsating noise from the blood pump, and reduces the impact stress on the seal of tubing connections. For patients undergoing dialysis, sudden changes in flow rate can cause discomfort at the puncture site; the terminal deceleration strategy alleviates this problem by gradually reducing the flow rate.
[0110] When the system receives a safety interrupt event in the PUSHING_FAST state, the braking distance for the blood pump to stop directly from full speed is approximately... .by For example, the braking overshoot volume is approximately The overflush volume represents the amount of fluid that is still pumped downstream of the tubing after a safety interruption is triggered. Since there may be air in the tubing at this time, this small amount of fluid does not pose a risk to the patient.
[0111] The S400 provides differentiated prompts to operators based on the type of blood return completion event after the pump stops, and offers a manual fine-tuning option within a preset time window.
[0112] This phase handles operator interaction after pump shutdown, including differentiated prompts and manual fine-tuning functions.
[0113] S410 issues differentiated prompts to operators based on the type of health recovery completion event.
[0114] After the system stops the blood pump, it selects the corresponding prompt mode based on the type of event received. When a compensation completion event is received... When the positive compensation push has ended normally, the buzzer will emit two short beeps, each lasting [duration missing]. The status indicator on the touchscreen turns green and displays the message "Recovery complete." This occurs when an early pump stop event is received. When this occurs, it indicates that the negative compensation for patients with water control is being performed normally, and the buzzer sounds once. A short warning beep is emitted, the display switches to blue and shows the message "Premature pump stop". This occurs when a safety interruption event is received. When the air detector triggers an emergency pump stop, a continuous buzzer sounds. A long tone, while the red indicator light... The screen flashes intermittently, then switches to red and displays a safety interruption warning. The differences in sound and light between the three warning modes allow operators to determine the completion status of the blood recharge through hearing without having to look at the display screen.
[0115] The design of the differentiated prompts follows the guidelines for alarm signal classification in the International Electrotechnical Commission (IEC) standard 60601-1, General Safety Standard for Medical Electrical Equipment. Normal completion event ( and The alert tone for a security interruption event is an information-level signal and uses a short, low-priority tone pattern; The alert signal ( ) is a high-priority alarm signal, using a combination of a continuous audible sound and a red visual indicator. The volume of a high-priority alarm is set to no less than [a certain value]. To ensure that the information prompts can still be clearly heard by operators despite the ambient noise in the dialysis room. The volume of the information-level prompts is set to [redacted]. to This attracts attention without causing unnecessary tension. The buzzer's driving frequency is fixed at... This frequency is within the range of frequencies that the human ear is most sensitive to.
[0116] The S420 displays a summary of the current cashback information on its screen.
[0117] After the pump stops, the system renders a blood return summary interface on the touch screen, which displays the following information: patient identifier. Expected return preference tag name, standard return volume Or stop the pump volume in advance Compensation volume And the current total health restored. Total health restored Calculate separately according to the compensation direction: For positive compensation When negative compensation Standard type without compensation .
[0118] For example, continuing the workflow for patient PATIENT_0037 (blood-retention type), the display shows: Patient PATIENT_0037, blood-retention type, standard blood return volume. Compensation amount Current total .
[0119] S430 activates the manual fine-tuning entry within a preset time window for operators to make fine adjustments.
[0120] While displaying the summarized information, the system activates the manual fine-tuning touch button on the screen and starts a 120-second countdown window. The operator can press the fine-tuning button within this time window and then set an additional push amount by rotating the encoder knob. The step resolution of the knob is... , The value range is constrained by hardware limiting to 0 to Fine-tuning is only permitted in the positive direction (additional push direction), and negative aspiration is not allowed because once the fluid is pumped into the patient's body, it is physically irreversible.
[0121] After the operator confirms the fine-tuning amount, the system... The low-speed drive of the blood pump performs the additional push. During the fine-tuning push, the air detector remains active to provide safety. After the fine-tuning push is complete, the blood pump stops again, and the system displays the fine-tuning flag. Set to 1 and update the final total health regeneration. :
[0122] If the operator does not press the fine-tuning button within 120 seconds, the system will automatically lock the fine-tuning entry after the countdown ends. , , The 120-second timeout is based on clinical observation: operators typically complete a visual inspection of the residual blood in the tubing and make a decision on whether to make minor adjustments within 30 to 60 seconds after stopping the pump. The 120-second window provides ample leeway for operation while preventing the window from being too long, which could lead to operators forgetting or delaying the treatment of the next patient.
[0123] The ergonomic design of the fine-tuning knob follows these principles: The step resolution allows operators to set precise fine-tuning in an intuitive way, and the tactile feedback (ratchet feel) corresponding to each rotation provides clear operational confirmation. The upper limit constraint is achieved through mechanical limiting; the knob is physically locked when rotated to its limit position to prevent excessive push due to accidental operation. The design constraint that only allows forward fine-tuning is based on the principle of physical irreversibility: fluid that has been pumped into the patient's body cannot be aspirated back through the blood pump (aspiration operation may cause damage to the vascular endothelium and hemolysis), therefore, the system prohibits reverse rotation at the hardware level.
[0124] During the fine-tuning process, the display screen updates the pushed fine-tuning volume value in real time. The operator can interrupt the fine-tuning at any time by pressing the stop button. The actual fine-tuning amount after interruption is based on the encoder's accumulated value, not the knob setting value. This design allows the operator to dynamically adjust the fine-tuning amount based on real-time changes in the residual blood in the tubing during the pushing process.
[0125] The data display on the summary interface also includes the timeline information for this blood return: blood return start time, baseline zero-point trigger time, compensation push completion time (or early pump stop time), and fine-tuning execution time. The timeline is presented as a graphical timeline, with each event node arranged chronologically and labeled with its volume value. This visualization helps operators intuitively understand the entire blood return process, especially in the event of a safety interruption, allowing for quick location of the interruption and the pumped volume at that time. The timeline data is also stored in a structured text format in the system log, with one log record generated for each blood return. The log file uses a first-in, first-out (FIFO) strategy to retain the most recent 500 records. The medical team can periodically export the log data for statistical analysis to assess the distribution patterns of compensation volumes among patient groups with different preference labels and the characteristics of operator fine-tuning behavior.
[0126] For example, in scenario A, the operator did not perform fine-tuning: , , In scenario B, the operator observed a small amount of residual blood in the tubing and made minor adjustments. : , , .
[0127] S500: Receives fine-tuning input from the operator regarding the blood return volume, and updates the patient's compensation correction amount based on the fine-tuning input.
[0128] like Figure 4 and Figure 5 As shown, this stage utilizes the operator's fine-tuning data as a feedback signal to drive adaptive learning of the compensation correction amount.
[0129] S510, add the data record of this blood return to the patient's history sequence.
[0130] The system will append the complete data record of this blood return to the historical fine-tuning sequence in the patient's file. The data record includes: the compensation volume used in this instance. Operator fine-tuning amount Final total health recovery And the current timestamp. A circular buffer structure is used, with a maximum capacity of 20 records. When the buffer is full, the newest record overwrites the oldest. The 20-record capacity is designed to cover approximately one month of treatment history at a dialysis frequency of 3 times per week, a time span sufficient to support subsequent convergence determination.
[0131] The S520 uses a weighted moving average algorithm to smooth the fine-tuning input to obtain a new compensation correction amount.
[0132] The system uses an exponentially weighted moving average algorithm to process the operator's fine-tuning adjustments in order to update the patient's compensation correction. The mathematical form of the algorithm is:
[0133] in The learning rate is also known as the smoothing factor. For this operation, fine-tuning of the quantity. This represents the amount of correction stored in the patient's file before the update. This is the updated correction amount. The learning rate... The value range is from 0.1 to 0.4, and the default value is 0.3. The corresponding equivalent window width is approximately This means that historical data from approximately six dialysis sessions has a significant impact on the current correction amount. This value strikes a balance between response speed and stability. An excessively large value can cause the correction amount to become overly sensitive to single abnormal fine-tuning, resulting in fluctuations. If the value is too small, the convergence speed will be too slow. The healthcare administrator can adjust the value within the specified range. Setting: Higher settings can be set for newly enrolled patients. To accelerate initial convergence, a lower value can be set for patients who have already stabilized. Values are set to reduce volatility.
[0134] The numerical implementation of the exponentially weighted moving average algorithm requires attention to the impact of limited precision. The results are stored in the patient's record as signed 16-bit integers with a precision of 0.1 ml. Floating-point operations are used during update calculations to maintain the precision of intermediate results, and the final result is rounded to an integer and stored back in memory. The maximum quantization error introduced by rounding is [missing value]. The algorithm does not lead to systematic biases under the cumulative effect of multiple consecutive updates. The algorithm implementation is deterministic code, free from dynamic memory allocation, recursive calls, or floating-point exception traps that could cause runtime uncertainties, making it suitable for execution in the real-time operating system environment of medical devices.
[0135] when When the operator fails to perform fine-tuning, the update formula degenerates into... That is, the correction amount is The rate of decay towards zero. This characteristic means that even without active operator input, the system will slowly pull the correction back to near zero. This decay behavior is clinically reasonable: if the operator does not make fine adjustments multiple times consecutively, it indicates that the current... This is sufficient to meet the needs of patients, and no further machine learning correction is required.
[0136] Updated It also needs to undergo independent limiting processing:
[0137] The The limiting ensures that the correction amount is itself constrained within a reasonable range. This limiting is related to step S100. The overall safety limit forms a dual protection: even Reaching the limit , superimposed After The absolute value is the largest. It will still be truncated by the overall limit of S100. .
[0138] Operator's fine-tuning amount The physical meaning of the deviation signal is: if the operator frequently makes positive fine adjustments, it indicates that the current... The current level is too low and needs to be increased. If the operator does not make minor adjustments, it indicates that the current level is too low. It's appropriate. Through the iterative updates of the above exponentially weighted moving average, It will gradually approach a steady-state value that eliminates the need for operators to make fine adjustments.
[0139] S530 determines the convergence status of the compensation correction amount based on whether the fine-tuning inputs are lower than the preset threshold after multiple consecutive adjustments.
[0140] The system updates every time Then, a convergence status determination is performed. The convergence condition is:
[0141] in The threshold for determining convergence, To ensure continuous success, the absolute value of the operator's fine-tuning amount is less than [a certain value] in three consecutive dialysis sessions. At that time, the system determined that the patient's compensation volume had converged to the optimal value. Set to 1, and the display will show a converged icon. Pick The meaning is: the fine-tuning amount is less than This is considered to indicate that the operator is basically satisfied with the current amount of health restored, and there is no significant deviation.
[0142] If convergence occurs during a subsequent dialysis session ,but The reset value is 0, and the continuous count is reset to zero. This reset mechanism handles preference drift scenarios caused by changes in the patient's physical condition, such as dry weight adjustment or vascular access change.
[0143] From a cybernetics perspective, the learning correction mechanism is equivalent to a first-order discrete low-pass filter, whose cutoff frequency is determined by the learning rate. Decide. The corresponding cutoff frequency is approximately Second-rate (Sampling period is based on the number of dialysis sessions), meaning that occasional fluctuations occurring more than once every 20 dialysis sessions will be effectively filtered out, while long-term systematic deviation trends will be accurately tracked. Convergence threshold The setting corresponds to an operation amount of 6 increments on the fine-tuning knob. In human factors engineering, this is the dividing line between what operators consider unnecessary to pay attention to and what requires adjustment.
[0144] consecutive times The selection is based on probability analysis: it is assumed that the probability of sporadic fine-tuning (random adjustments unrelated to compensation bias) occurring is... Then continuous The probability that all of these are sporadic fine-tunings is .by This is an estimated value. The probability of misjudgment is ,and The probability of misjudgment is Too high. The probability of misjudgment has been further reduced. However, the response delay for the convergence determination increases by one dialysis session (approximately 2 to 3 days). Considering that this determination is only used to display status indicators and does not affect the actual behavior of the algorithm, It represents a reasonable trade-off between response speed and judgment reliability.
[0145] For example, the learning process is illustrated using data from five consecutive dialysis sessions of a patient with hemophobia. Initial state: , , .
[0146] First dialysis session: Operator fine-tuning . . The continuous count returns to zero.
[0147] Second dialysis session: Fine-tuning . . The consecutive count is 1.
[0148] Third dialysis session: Fine-tuning . . The consecutive count is 2.
[0149] 4th dialysis session: Fine-tuning . . The consecutive count is 3, reaching the target. , The system indicates that convergence has been achieved.
[0150] After the 4th dialysis session Next time The correction amount is from the initial... After 4 iterations, it converged to... Fine-tuning amount from Gradually down to This verified the system's ability to automatically converge to the patient's optimal compensation level within 3 to 5 dialysis sessions.
[0151] As a counterexample to preference drift, suppose that during the 5th dialysis session, the patient's dry weight adjustment leads to significant fine-tuning by the operator. . . , Reset to 0. Next time The system automatically reduces the compensation amount to adapt to the patient's new physical condition.
[0152] The And the updated , The patient records are written back to non-volatile memory. The write-back operation employs an atomic update strategy: the updated record is first written to the backup sector, and the pointer is switched to make the backup sector a valid sector after verifying the CRC16 checksum. This strategy prevents data corruption due to power outages during the write process. Specifically, two physical sectors (sector A and sector B) are allocated to each patient in the non-volatile memory, and the system maintains a global pointer table indicating the currently valid sector number for each patient. During an update, the new data is first written to the invalid sector. After writing, the CRC16 checksum is calculated and verified. If the verification passes, the global pointer table is modified to make the new sector a valid sector. If a power outage occurs during the write process, the global pointer still points to the old sector, and the old data is completely preserved. The storage overhead of this dual-sector alternating write mechanism is an additional 72 bytes per patient (one backup sector), totaling approximately 36KB for 500 patients, which is acceptable within the memory capacity budget.
[0153] The CRC16 checksum uses the CRC-CCITT polynomial. The system performs a CRC16 check on the 68 bytes of valid data recorded in the file. It verifies the CRC16 check every time the file is read; if the check fails, it attempts to recover data from a backup sector. If both sectors fail the CRC16 check, the system marks the patient file as corrupted and creates a default file, while also recording the corruption event in the maintenance log for technicians to investigate.
[0154] System Implementation Examples like Figure 8 As shown, this application also provides a dialysis blood return control system based on dynamic compensation of patient subjective expectations. The system runs on the main controller of the dialysis machine and includes the following functional modules: The patient record management module, running on the main controller, uses independent sectors of on-chip non-volatile memory to store the patient record database. This module connects to an IC card reader via a serial communication interface to perform patient identification information reading and record retrieval operations. Before the system starts up and returns blood, it drives all sensors into self-test mode to confirm the system's readiness.
[0155] The preference label engine runs as a pure software module in the main controller. This module uses the expected recovery preference label as an index to query the constant array of the label-volume mapping table stored in the system configuration area, obtains the basic compensation volume value, and then superimposes it with the machine learning correction amount and performs safety limiting processing to output the final compensation volume target value and compensation direction flag.
[0156] The blood return execution and sensor monitoring module is connected to the blood pump motor drive circuit, incremental photoelectric encoder, air detector, and optical sensor. This module drives the blood pump motor through pulse width modulation signals and accumulates the revolutions via encoder interrupts to calculate the pumping volume in real time. Simultaneously, it samples sensor signals at fixed intervals and performs dual verification of the reference zero point. The emergency pump stop function of the air detector is implemented through a separate hardware interrupt circuit.
[0157] The compensation volume push module reuses the blood pump driver and sensor hardware from the blood return execution and sensor monitoring modules, operating as an independent control state at the software level. This module accumulates and calculates the compensation volume after the reference zero point, executes the terminal deceleration strategy, and issues a pump stop command when the target value is reached.
[0158] The learning and correction module runs as a pure software module within the main controller. This module appends the operator's fine-tuning adjustments to the circular buffer of the patient's historical sequences, performs exponentially weighted moving average calculations to update the compensation correction, and scans the historical sequences to determine the convergence status. The updated data is then stored back into non-volatile memory using an atomic write strategy.
[0159] The pump stop interaction module connects to a buzzer, touchscreen display, tri-color indicator lights, and fine-tuning rotary encoder. This module generates differentiated audio-visual prompts based on the type of recovery completion event, renders a recovery summary interface on the display screen, and manages the activation of the fine-tuning button, the reading of the knob input, and the execution of additional pushes within a preset time window.
[0160] The modules mentioned above exchange data through a shared state structure in the main controller's memory. The patient record management module outputs patient record data and tubing parameters, which are then passed to the preference labeling engine. The preference labeling engine outputs the compensation volume target value and direction flag, which are then passed to the blood return execution and sensor monitoring module and the compensation volume push module. The fine-tuning amount output by the pump stop interaction module is passed to the learning and correction module. The compensation correction amount updated by the learning and correction module is read by the preference labeling engine during the next blood return, forming a complete feedback loop.
[0161] The collaboration process of each module is described from a temporal perspective: In a complete blood return control process, the patient file management module first completes file loading and system self-check when the operator triggers the blood return operation, which takes about 10 to 15 seconds; the preference tag engine executes immediately after the self-check passes, taking no more than [time missing]. The blood return execution and sensor monitoring module drives the blood pump and continuously monitors the sensors. The duration depends on the tubing volume and pump speed settings, typically 100 to 200 seconds. The compensation volume push module executes in positive compensation mode, with the duration depending on the compensation volume and pump speed, typically 5 to 45 seconds. The pump stop interaction module is activated after the blood pump stops, waiting for operator decisions for up to 120 seconds. The learning and correction module executes after the operator completes or abandons fine-tuning, taking no more than [time not specified]. The entire recovery process takes approximately 3 to 6 minutes, which is comparable to the recovery time of traditional fixed threshold schemes.
[0162] The system's scalable design allows for the addition of new preference label levels without modifying the core control logic: simply add a new label-volume mapping entry to the piping parameter table and update the label selection interface on the touchscreen. This expansion is accomplished via remote firmware updates from the equipment manufacturer or local configuration modifications by field technicians.
[0163] The above embodiments are merely preferred embodiments of this application and are not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application should be included within the scope of protection of this application.
[0164] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit described above can be implemented in hardware.
[0165] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for controlling dialysis blood return based on dynamic compensation of patient subjective expectations, characterized in that, include: Load the individualized profile of the patient to be dialyzed, and obtain the patient's blood return preference parameters and tubing parameters; Based on the blood return preference parameters, the target value of the compensation volume and the compensation direction are determined through preference mapping rules; The blood pump is driven to perform blood return operation, the pumped volume is accumulated in real time, and the change of medium in the pipeline is detected by the sensor to determine the reference zero point. When the compensation direction is positive, the blood pump continues to be driven after the reference zero point to push an additional volume corresponding to the target compensation volume value, and then the pump is stopped. When the compensation direction is negative, the pump should be stopped before reaching the reference zero point; If the sensor detects an abnormal medium in the pipeline during the compensation push, the pump will be forcibly stopped.
2. The method according to claim 1, characterized in that, The preference mapping rule includes mapping the multi-level preference labels in the recovery preference parameters to the corresponding basic compensation volume values.
3. The method according to claim 2, characterized in that, The target compensation volume value is also subject to safety limiting processing, which restricts the target compensation volume value to a preset safety upper limit range.
4. The method according to claim 1, characterized in that, Also includes: Within a preset time window after the pump is stopped, the system receives fine-tuning inputs from the operator regarding the amount of blood returned, and updates the patient's compensation correction amount based on these fine-tuning inputs.
5. The method according to claim 4, characterized in that, The process of updating the patient's compensation correction amount includes: smoothing the fine-tuning input using a weighted moving average algorithm to obtain a new compensation correction amount, and determining the convergence state of the compensation correction amount based on whether the fine-tuning input is lower than a preset threshold multiple times.
6. The method according to claim 1, characterized in that, During the process of pushing the additional volume, when the pushed volume approaches the target value of the compensation volume, the blood pump speed is reduced to improve the accuracy of stopping the pump.
7. The method according to claim 1, characterized in that, Also includes: After the pump stops, a differentiated prompt is issued to the operator based on the type of blood return completion event, and a manual fine-tuning entry is activated within the preset time window for the operator to make fine adjustments.
8. The method according to claim 1, characterized in that, The real-time cumulative pumping volume is obtained by multiplying the number of revolutions of the blood pump encoder by the single-turn pumping volume of the pipeline parameters.
9. A dialysis blood return control system based on dynamic compensation of patient subjective expectations, characterized in that, include: The patient record management module is used to load the individualized records of patients to be dialyzed to obtain the patient's blood return preference parameters and tubing parameters; A preference labeling engine is used to determine the target value of the compensation volume and the compensation direction based on the blood recovery preference parameters and preference mapping rules. The blood return execution and sensor monitoring module is used to drive the blood pump to perform blood return operation and accumulate the pumping volume in real time. It uses sensors to detect changes in the medium in the pipeline to determine the reference zero point, and if the sensor detects an abnormal medium in the pipeline during the compensation push, it will force the pump to stop. The compensation volume push module is used to continue driving the blood pump to push an additional volume corresponding to the compensation volume target value after the reference zero point and then stop the pump, or to stop the pump in advance before reaching the reference zero point.
10. The system according to claim 9, characterized in that, Also includes: The learning and correction module is used to receive the operator's fine-tuning input on the blood return volume after the pump is stopped and update the patient's compensation correction amount based on the fine-tuning input; the pump stop interaction module is used to issue differentiated prompts to the operator according to the type of blood return completion event and activate the manual fine-tuning entry.