Medical device pump knob adjustment method, system, device, and storage medium
By employing a multi-level judgment and data accumulation mechanism, the problems of insufficient judgment of rotation points and lack of anti-interference in the adjustment method of medical equipment pump knobs are solved, achieving efficient and accurate acquisition and processing of knob operation, and improving the accuracy of knob adjustment and the reliability of the system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-30
- Publication Date
- 2026-03-17
AI Technical Summary
Existing methods for adjusting pump knobs in medical devices are inadequate in terms of determining the number of rotation points and resisting interference. This results in low adjustment accuracy and a tendency to be falsely triggered due to shaking or vibration, making it difficult to meet the high precision and high reliability requirements in medical settings.
Through a multi-level judgment and data accumulation mechanism, the knob rotation data is acquired periodically, the timestamp is recorded and stored in the event, and the judgment of direction consistency and time difference is combined to achieve accurate response and data integration of knob operation, filter out small rotations and noise, and ensure efficient and accurate acquisition and processing of knob rotation operation.
It improves the precision and anti-interference of knob adjustment, ensures the accuracy of knob operation and the reliability of the system, reduces the possibility of false triggering, and meets the low latency and high reliability requirements of medical devices in embedded resource-constrained environments.
Smart Images

Figure CN121429595B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of medical equipment and adjustment technology, specifically to a method, system, device and storage medium for adjusting a pump knob in a medical device. Background Technology
[0002] In the interactive control of pumps in medical devices, knobs are key input devices for adjusting parameters. Due to the extremely high requirements for precision and safety in medical operations, the system must be able to accurately identify the rotation intentions of medical personnel, avoiding false triggers caused by operational jitter or intermittent input. At the same time, it needs to achieve low-latency, high-reliability event processing in an embedded resource-constrained environment to ensure the real-time and continuous adjustment of parameters, meeting the stringent human-computer interaction requirements of medical scenarios.
[0003] ECMO (Extracorporeal Membrane Oxygenation) devices are high-risk medical equipment used for extracorporeal life support. The pump is the core component of ECMO, and a knob is commonly used to adjust the pump's speed. Because the pump speed is high and the adjustment range is wide, the knob generally has minimal jerkiness when turned, facilitating quick adjustments during startup, such as rapidly adjusting to 3000 rpm. During stable operation, small-angle adjustments are made in 50 rpm increments. However, during transport in aircraft or ambulances, the knob is frequently subjected to impacts, rotations, or vibrations, causing it to vibrate and leading to incorrect adjustments to a lower pump speed. Since doctors also use fine-tuning, it is crucial to determine whether the knob adjustment is correct and to improve the precision of the knob adjustment.
[0004] Existing architecture-based methods for adjusting pump knobs in medical devices have shortcomings in several aspects, primarily in the following areas:
[0005] 1) Because the result of the number of rotation points / the number of rotation points corresponding to each step value is rounded to the nearest integer, when the number of rotation points reported by the drive is less than half of the number of rotation points corresponding to a step value, these reported values will be filtered out. In actual clinical operation, doctors will make slow fine adjustments to the knob. When fine-tuning, small knob values will be filtered out, resulting in the knob becoming insensitive.
[0006] 2) When the number of rotation points reported by the drive is greater than half of the number of rotation points corresponding to a step value but less than the number of rotation points corresponding to a step value, these reported values will cause the pump to adjust by one step. When the vibration is large, it may cause the knob to jitter within this range, thus leading to incorrect adjustment of the pump speed. Summary of the Invention
[0007] Therefore, embodiments of the present invention provide a method, system, device, and storage medium for adjusting a pump knob in a medical device, in order to solve the problem of balancing adjustment accuracy and anti-interference capability in medical devices.
[0008] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:
[0009] According to a first aspect of the present invention, this application provides a method for adjusting a pump knob in a medical device, the method comprising:
[0010] Data is collected by rotating the knob according to a preset cycle;
[0011] Determine whether the number of rotations of the knob is less than a first preset threshold;
[0012] If the number of rotations of the knob is greater than or equal to the first preset threshold, the data acquisition time is used as the first timestamp to store the knob rotation data in the input knob event.
[0013] Set both the first-report flag and the send knob flag to false;
[0014] Determine whether the input rotation value is greater than or equal to a second preset threshold;
[0015] If the input rotation value is less than the second preset threshold, the time difference between the first timestamp and the second timestamp of the cached knob event is directly calculated.
[0016] Determine whether the time difference value is less than or equal to a third preset threshold;
[0017] If the time difference is less than or equal to a third preset threshold, then determine whether the direction indicator values in the input knob event and the buffer knob event are the same;
[0018] If the direction identifier values in the input knob event and the buffer knob event are the same, then the sum of the buffer rotation value in the buffer knob event and the input rotation value in the input knob event is calculated to obtain the rotation accumulation value, and the input rotation value is updated using the rotation accumulation value;
[0019] Determine whether the updated input rotation value is greater than or equal to the second preset threshold;
[0020] If the updated input rotation value is less than the second preset threshold, then the current cached rotation value is updated using the updated input rotation value;
[0021] Determine whether the send knob flag is true;
[0022] If the send knob flag is false, then acquire the knob rotation data for the next preset cycle.
[0023] Furthermore, before storing the data collected by rotating the knob into the input knob event, the method further includes:
[0024] Initialize the input knob event and buffer knob event, including:
[0025] Clear the input data in the input knob event and the cached data in the cache knob event;
[0026] Set the first timestamp in the input knob event and the second timestamp in the cache knob event to zero.
[0027] Furthermore, the method also includes:
[0028] If the number of rotations of the knob is less than a first preset threshold, the data collected by the knob rotation is discarded.
[0029] Furthermore, the method also includes:
[0030] If the updated input rotation value is greater than or equal to the second preset threshold, then determine whether the first reporting flag is true;
[0031] If the first reporting flag is true, then determine whether the updated input rotation value is greater than or equal to the fourth preset threshold.
[0032] If the first reporting flag is false, or the updated input rotation value is greater than or equal to the fourth preset threshold, then the send knob flag is set to true.
[0033] Furthermore, the method also includes:
[0034] If the direction indicator values in the input knob event and the buffer knob event are different, the current buffer rotation value is updated using the input rotation value;
[0035] If the updated input rotation value is less than the fourth preset threshold, then the current cached rotation value is updated using the updated input rotation value;
[0036] If the time difference is greater than the third preset threshold, the first reporting flag is set to true, and the current cached rotation value is updated using the input rotation value.
[0037] Furthermore, the method also includes:
[0038] If the input rotation value is greater than or equal to the second preset threshold, then the send knob flag is set to true;
[0039] Calculate the time difference between the first timestamp and the second timestamp of the cached knob event;
[0040] Determine whether the time difference value is less than or equal to a third preset threshold;
[0041] If the time difference is less than or equal to a third preset threshold, then determine whether the direction indicator values in the input knob event and the buffer knob event are the same;
[0042] If the direction identifier values in the input knob event and the buffer knob event are the same, then the sum of the buffer rotation value in the buffer knob event and the input rotation value in the input knob event is calculated to obtain the rotation accumulation value, and the input rotation value and the buffer rotation value are updated using the rotation accumulation value;
[0043] If the time difference is greater than a third preset threshold, or if the direction identifier values in the input knob event and the cache knob event are different, then the current cached data in the cache knob event is updated using the input data in the input knob event.
[0044] Furthermore, the method also includes:
[0045] If the send knob flag is true, the current input data in the input knob event will be sent to the pump speed setting interface or the pump speed setting function;
[0046] Update the direction identifier value of the cached knob event to the direction identifier value of the input knob event, reset and initialize the cached data of the cached knob event, and set the first reporting flag to false.
[0047] According to a second aspect of the present invention, this application provides a medical device pump knob adjustment system, the system comprising:
[0048] The receiving module is used to acquire data collected by the knob rotation according to a preset cycle;
[0049] The filtering module is used to determine whether the number of rotations of the knob is less than a first preset threshold.
[0050] The analysis module is used to perform the following steps:
[0051] If the number of rotations of the knob is greater than or equal to the first preset threshold, the data acquisition time is used as the first timestamp to store the knob rotation data in the input knob event.
[0052] Set both the first-report flag and the send knob flag to false;
[0053] Determine whether the input rotation value is greater than or equal to a second preset threshold;
[0054] If the input rotation value is less than the second preset threshold, then the time difference between the first timestamp and the second timestamp of the cached knob event is directly calculated.
[0055] Determine whether the time difference value is less than or equal to a third preset threshold;
[0056] If the time difference is less than or equal to a third preset threshold, then determine whether the direction indicator values in the input knob event and the buffer knob event are the same;
[0057] If the direction identifier values in the input knob event and the buffer knob event are the same, then the sum of the buffer rotation value in the buffer knob event and the input rotation value in the input knob event is calculated to obtain the rotation accumulation value, and the input rotation value is updated using the rotation accumulation value;
[0058] Determine whether the updated input rotation value is greater than or equal to the second preset threshold;
[0059] If the updated input rotation value is less than the second preset threshold, then the current cached rotation value is updated using the updated input rotation value; and
[0060] The forwarding module is used to determine whether the sending knob flag is true; if the sending knob flag is false, the knob rotation data of the next preset period is acquired.
[0061] According to a third aspect of the present invention, a medical device pump knob adjustment device is provided, the device comprising: a processor and a memory;
[0062] The memory is used to store one or more program instructions;
[0063] The processor is configured to run one or more program instructions to perform the steps of a software reliability assessment method as described in any of the preceding claims.
[0064] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, wherein a computer program is stored on the computer-readable storage medium, and the computer program, when executed by a processor, implements the steps of a medical device pump knob adjustment method as described in any of the preceding claims.
[0065] Compared with existing technologies, the present application provides a method, system, device, and storage medium for adjusting a medical device pump knob. By acquiring knob data periodically, if the rotation count reaches a first preset threshold, a timestamp is recorded and the event is stored, while the reporting and sending flags are reset. Then, it determines whether the input rotation value reaches a second preset threshold. If not, it calculates the time difference between the current value and the cached event. If the time difference is within the allowable range and the two events are in the same direction, the rotation value is accumulated and updated, and the second preset threshold is re-determined. If it still does not reach the threshold, the cached value is updated. Finally, the sending flag is checked; if it is false, the next data acquisition cycle begins. This application achieves precise response and data integration for knob operations through multiple judgments and accumulation processes. By combining multi-level judgment and data accumulation mechanisms, it achieves efficient and accurate acquisition and processing of knob rotation operations. Attached Figure Description
[0066] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely exemplary, and those skilled in the art can derive other embodiments based on the provided drawings without creative effort.
[0067] The structures, proportions, sizes, etc. illustrated in this specification are only for the purpose of assisting those skilled in the art in understanding and reading the content disclosed herein, and are not intended to limit the conditions under which the present invention can be implemented. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportions, or adjustments to the size, without affecting the effects and objectives that the present invention can produce, should still fall within the scope of the technical content disclosed in the present invention.
[0068] Figure 1 A schematic diagram of the logic structure of a medical device pump knob adjustment system provided in this application embodiment;
[0069] Figure 2 A flowchart illustrating a method for adjusting a medical device pump knob, as provided in one embodiment of this application;
[0070] Figure 3 A flowchart illustrating a method for adjusting a medical device pump knob, as provided in another embodiment of this application;
[0071] Figure 4 A flowchart for initializing input knob events and buffer knob events provided in this application embodiment;
[0072] Figure 5A flowchart illustrating a method for adjusting a medical device pump knob according to an embodiment of this application, under the condition that the updated input rotation value is greater than or equal to a second preset threshold.
[0073] Figure 6 This is a flowchart illustrating a method for adjusting a medical device pump knob in an embodiment of this application when the input rotation value is greater than or equal to a second preset threshold. Detailed Implementation
[0074] The following specific embodiments illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. 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.
[0075] To solve the above technical problems, such as Figure 1 As shown in the figure, this application provides a medical device pump knob adjustment system. The system is applied to the adjustment of the medical device pump knob and achieves efficient and accurate acquisition and processing of knob rotation operation through a multi-level judgment and data accumulation mechanism.
[0076] Specifically, the software reliability assessment system provided in this application includes: a receiving module 1, a filtering module 2, an analysis module 3, and a forwarding module 4.
[0077] Furthermore, the receiving module 1 is used to acquire knob rotation data according to a preset cycle; its function is to periodically read the original rotation pulses or counting data generated by the knob from the hardware driver layer to provide a continuous data stream for subsequent processing.
[0078] The filtering module 2 is used to determine whether the number of knob rotation points is less than the first preset threshold. Its function is to perform preliminary screening on the received raw knob data, filter out invalid rotation signals with too small an amplitude caused by slight shaking or noise, and ensure that the subsequent processing is of valid operation intention.
[0079] Analysis module 3 is used to execute a series of conditional judgments and data integration steps. Its function is the core processing unit, which intelligently analyzes the filtered valid events through the following process: First, it timestamps the valid events and initializes the reporting control flag; second, it determines whether to report immediately or enter the cache comparison process by judging the magnitude of the input rotation value; then, it determines whether the two operations belong to the same continuous adjustment intention by calculating the time difference and direction consistency between the current event and the previous cached event; if so, it accumulates the two rotation values and updates the cache. This module intelligently integrates fragmented fine-tuning operations into complete adjustment instructions through timing and logical association, thereby realizing a more accurate and user-intent-compliant logical judgment layer above the hardware level.
[0080] Forwarding module 4 is used to determine whether the send knob flag is true; if the send knob flag is false, it obtains the knob rotation data collection for the next preset cycle; its function is to determine whether to immediately report the current event to the upper layer application or continue to collect data for the next cycle for subsequent accumulation and judgment based on the control flag set by the analysis module, thereby controlling the final timing of instruction reporting.
[0081] Compared with existing technologies, the medical device pump knob adjustment system provided in this application acquires knob data periodically. If the number of rotation points reaches a first preset threshold, a timestamp is recorded and stored as an event, while the reporting and sending flags are reset. Then, it determines whether the input rotation value reaches a second preset threshold. If not, it calculates the time difference between the current value and the cached event. If the time difference is within the allowable range and the two events are in the same direction, the rotation value is accumulated and updated, and the second preset threshold is re-determined. If it still does not reach the threshold, the cached value is updated. Finally, the sending flag is checked; if it is false, the next data acquisition cycle begins. This application achieves precise response and data integration for knob operations through multiple judgments and accumulation processes. By combining a multi-level judgment and data accumulation mechanism, it achieves efficient and accurate acquisition and processing of knob rotation operations.
[0082] Corresponding to the aforementioned disclosure of a medical device pump knob adjustment method, this invention also discloses a medical device pump knob adjustment method. The following details a medical device pump knob adjustment method disclosed in this invention, based on the aforementioned medical device pump knob adjustment system, to address the problem of balancing adjustment accuracy and anti-interference capabilities in existing medical device pump knob technologies.
[0083] like Figure 2 As shown below, the specific steps of a medical device pump knob adjustment method provided in the embodiments of this application will be described in detail below.
[0084] The receiving module 1 acquires data collected by the knob rotation according to a preset cycle.
[0085] The preset period refers to the time interval at which the receiving module periodically collects knob rotation data. This includes a fixed period set based on the system clock or timer, used to periodically acquire changes in the knob's state. Specifically, the preset period can be set to be greater than or equal to 100ms and less than or equal to 500ms.
[0086] In this embodiment of the application, the knob rotation acquisition data refers to the knob rotation related information acquired by the sensor or encoder, including the knob rotation direction and the number of rotation points, which is used to reflect the real-time operating status of the knob.
[0087] The filter module 2 determines whether the number of knob rotations is less than the first preset threshold.
[0088] In this embodiment, the first preset threshold can be greater than or equal to 4 and less than or equal to 7. The number of knob rotations is compared with the first preset threshold to determine whether the number of knob rotations is less than the first preset threshold, thereby deciding whether to trigger subsequent event processing.
[0089] Specifically, if the number of knob rotations is less than the first preset threshold, the filtering module 2 will discard the data collected by the knob rotation.
[0090] In this embodiment, knob rotation data is collected by a knob encoder and the knob rotation points are parsed. The knob rotation points are compared with a first preset threshold in real time. When the knob rotation points are less than the first preset threshold, the knob rotation data of the current batch is directly discarded and the knob rotation data is completely removed from the processing flow without any further analysis or storage.
[0091] By performing the above steps, this embodiment of the application filters out minute rotation data through a threshold comparison mechanism, avoiding the occupation of system resources by invalid operations, improving the accuracy and efficiency of knob event processing, and reducing the possibility of false triggering.
[0092] If the number of rotations of the knob is greater than or equal to the first preset threshold, the analysis module 3 uses the data acquisition time as the first timestamp to store the knob rotation data in the input knob event.
[0093] In this embodiment, the application monitors knob events. When a knob event is received, the function to handle knob input is executed. An `evtRotaryInput` of type `struct input_event` is defined as the input knob event. `struct input_event` is a standard Linux input event structure, whose member variables include `time` (first timestamp), `code` (direction identifier value), and `value` (input rotation value). The value reported by the knob driver to the operating system includes the direction bit and rotation point value. First, the value reported by the knob driver is parsed. When `(0x10000000 & evtRotaryInput.value) = 0x10000000` is true, `evtRotaryInput.code = 1`, representing that the knob input rotation direction is counterclockwise. When `(0x10000000 & evtRotaryInput.value) = 0x10000000` is false, `evtRotaryInput.code = 0`, representing that the knob input rotation direction is clockwise. Additionally, store the rotation point value as the input rotation value.
[0094] refer to Figure 3 Before storing the collected data from the knob rotation into the input knob event, the medical device pump knob adjustment method disclosed in this application further includes: initializing the input knob event and the buffer knob event.
[0095] refer to Figure 4 In this embodiment of the application, the above steps specifically include: clearing the input data in the input knob event and the cached data in the cache knob event; setting the first timestamp in the input knob event and the second timestamp in the cache knob event to zero.
[0096] Input data refers to real-time rotation information obtained from input knob events, including input rotation values, direction indicator values, etc., reflecting the current user operation and used for subsequent processing and analysis. Cache data refers to historical rotation information temporarily stored in cached knob events, including previous accumulated rotation values and timestamps, used for merging or comparing with the current event.
[0097] In this embodiment, firstly, the data structure of the input knob event is accessed to locate the input data portion. Secondly, the input data is completely removed by calling a data clearing function or by directly assigning a null value. Subsequently, the system also accesses the data structure of the cached knob event to extract the cached data portion. Finally, the same clearing operation is used to completely delete the cached data, ensuring that both the input data and cached data are in a data-free state. The first timestamp field is obtained from the input knob event. In addition, the value of the first timestamp is set to zero using the timestamp reset function. Subsequently, the second timestamp field is extracted from the cached knob event. Finally, the same zeroing operation is used to reset the value of the second timestamp to zero, thereby completing the timestamp initialization.
[0098] Here's a specific example: After the knob event processing flow ends, the input data in the input knob event, such as the input rotation value and direction indicator value, is cleared. Simultaneously, the cached data in the cached knob event, such as historical rotation values, is cleared. Next, the first timestamp in the input knob event is set to zero. Then, it enters a waiting state, ready to receive new knob operations. Finally, the clearing and zeroing operations ensure that the starting point of the next data collection cycle is consistent, avoiding interference from residual data in subsequent event processing.
[0099] By performing the above steps, this embodiment of the application achieves the reset of the knob event state by clearing the input data and cached data and setting it to zero, effectively preventing old data from interfering with subsequent processing, ensuring that new event collection starts from a clean state, and improving the accuracy of the data and the reliability of the system.
[0100] The analysis module 3 sets both the first reporting flag and the send knob flag to false.
[0101] In this embodiment, the first reporting flag is a Boolean flag, denoted as emitFirst, used to indicate whether it is the first reporting of a minor rotation. Setting it to false indicates that it is not the first reporting of a minor rotation, and setting it to true indicates that it is the first reporting of a minor rotation. It is updated based on the event reporting status. The send knob flag is a Boolean flag, denoted as emitRotary, used to indicate whether the knob event has been sent, including the logic for controlling data transmission, and is set based on the processing flow.
[0102] The analysis module 3 determines whether the input rotation value is greater than or equal to the second preset threshold.
[0103] The input rotation value refers to the rotation point value in the input knob event. The second preset threshold is a pre-set critical value for the input rotation value, used to determine whether the current input knob event is a small rotation; that is, the second preset threshold is a small rotation limit value, set based on the application scenario. Specifically, the second preset threshold is a constant parameter reportLimitValue, and its value is one rotation point increment. For example, the second preset threshold can be set to 33.
[0104] refer to Figure 2 or Figure 3 The following describes the specific steps of a medical device pump knob adjustment method when the input rotation value is less than a second preset threshold.
[0105] If the input rotation value is less than the second preset threshold, the analysis module 3 calculates the time difference between the first timestamp and the second timestamp of the cached knob event.
[0106] Cached knob events refer to previously stored knob event data, including the input rotation value, the direction identifier representing the knob's rotation direction, and a second timestamp. The second timestamp refers to the data acquisition time corresponding to the cached data in the cached knob event.
[0107] The analysis module 3 determines whether the time difference is less than or equal to the third preset threshold.
[0108] In this embodiment, the third preset threshold refers to a pre-defined critical value for the time difference. The third preset threshold is a time limit value, including a time window used to define the continuity of events, configured based on user experience. Specifically, the third preset threshold or time limit value is a constant parameter `reportLimitTime`. Setting `reportLimitTime=500000` represents a third preset threshold or time limit value of 500ms, a value considered to be slightly larger than the interval of the driver's timed reporting. If the time difference is less than or equal to the third preset threshold, the analysis module 3 determines whether the direction indicator values in the input knob event and the cached knob event are the same.
[0109] In this embodiment, as described above, the direction identifier value refers to an identifier representing the rotation direction of the knob, including clockwise or counterclockwise encoded values, used to ensure consistent rotation directions. When the time difference value is determined to be less than or equal to a third preset threshold, the direction identifier value is extracted from the input knob event. Next, the direction identifier value is extracted from the cached knob event. Subsequently, the two direction identifier values are compared to determine if they are the same, thereby confirming whether the user's continuous rotation operations are consistent in direction.
[0110] If the direction indicator values in the input knob event and the buffer knob event are the same, the analysis module 3 calculates the sum of the buffer rotation value in the buffer knob event and the input rotation value in the input knob event to obtain the rotation accumulation value, and uses the rotation accumulation value to update the input rotation value.
[0111] When the direction indicator values in the input knob event and the buffer knob event are determined to be the same, the buffered rotation value is retrieved from the buffer knob event. Next, the input rotation value is retrieved from the input knob event. Then, the buffered rotation value and the input rotation value are added together to obtain the accumulated rotation value. Finally, this accumulated rotation value replaces the original input rotation value in the input knob event, completing the update of the input rotation value.
[0112] The analysis module 3 determines whether the updated input rotation value is greater than or equal to the second preset threshold.
[0113] If the updated input rotation value is less than the second preset threshold, the analysis module 3 will use the updated input rotation value to update the current cached rotation value.
[0114] When the updated input rotation value is less than the second preset threshold, the system retrieves the current cached rotation value. Next, it replaces the current cached rotation value with the updated input rotation value. Finally, it updates the cached rotation value to reflect the cumulative rotation.
[0115] refer to Figure 6 The following describes the specific steps of a medical device pump knob adjustment method when the input rotation value is greater than or equal to a second preset threshold.
[0116] If the input rotation value is greater than or equal to the second preset threshold, the analysis module 3 sets the send knob flag to true. The analysis module 3 calculates the time difference between the first timestamp and the second timestamp of the cached knob event. The analysis module 3 then determines whether the time difference is less than or equal to the third preset threshold.
[0117] If the time difference is less than or equal to the third preset threshold, the analysis module 3 will determine whether the direction indicator values in the input knob event and the buffer knob event are the same.
[0118] If the direction indicator values in the input knob event and the cached knob event are the same, the analysis module 3 calculates the sum of the cached rotation value in the cached knob event and the input rotation value in the input knob event to obtain the rotation accumulation value, and uses the rotation accumulation value to update the input rotation value and the cached knob value.
[0119] When the direction indicator values in the input knob event and the buffer knob event are determined to be the same, the buffered rotation value is retrieved from the buffer knob event. Next, the input rotation value is retrieved from the input knob event. Then, the buffered rotation value and the input rotation value are added together to obtain a cumulative rotation value. Finally, this cumulative rotation value is used to replace the original input rotation value in the input knob event and the buffer knob value in the buffer knob event, completing the update of the input rotation value and the buffer knob value.
[0120] refer to Figure 2 or Figure 3 The following describes the specific steps of a medical device pump knob adjustment method when the time difference is greater than a third preset threshold.
[0121] If the time difference exceeds the third preset threshold, the analysis module 3 sets the first reporting flag to true and updates the current cached rotation value using the input rotation value. When the time difference exceeds the third preset threshold, it indicates that the interval between the two events is long and represents a discontinuous operation. In this case, the input rotation value is obtained from the input knob event. Next, the cached data in the cached knob event is updated using the obtained input rotation value. Subsequently, this update operation ensures that the cached data reflects the correct cumulative state during discontinuous operations or changes in operation direction.
[0122] Here's a specific example: First, upon detecting that the input rotation value exceeds the second preset threshold, the send knob flag is immediately set to true in preparation for reporting. Second, the time difference between the current event and the cached event is calculated, and it is determined that this value does not exceed the third preset threshold. Subsequently, after further comparing the direction identifier values of the two events to confirm they are consistent, the cached rotation value and the input rotation value are added together to obtain a new rotation value, and the input data and cached rotation value are updated. Finally, if the time difference exceeds the limit or the directions are different, the input data is used to update the cached data to reset the accumulated state, completing the entire event processing flow.
[0123] By performing the above steps, this application embodiment achieves refined management of the knob event accumulation and reporting mechanism through a combination of direction consistency judgment and time interval judgment logic control. It effectively handles scenarios with direction changes or long operation intervals, ensuring accurate accumulation of continuous operations in the same direction and ensuring that non-continuous operations can independently trigger state updates, thereby improving the system's accuracy in recognizing user operation intentions and the rationality of response.
[0124] refer to Figure 2 or Figure 3 The following describes the specific steps of a medical device pump knob adjustment method when the direction indicator values in the input knob event and the buffer knob event are different.
[0125] If the direction indicator values in the input knob event and the cached knob event are different, the analysis module 3 will directly update the current cached rotation value using the input rotation value.
[0126] By performing the above steps, this embodiment of the application realizes an intelligent accumulation and conditional reporting mechanism for knob events by comprehensively judging the rotation threshold, time continuity and direction consistency. It effectively distinguishes between valid operations and noise, ensures accurate accumulation of continuous same-direction operations, and can correctly reset the accumulation logic when the operation is interrupted or the direction is changed, thereby improving the accuracy of interaction and system efficiency.
[0127] refer to Figure 5 The following describes the specific steps of a medical device pump knob adjustment method when the updated input rotation value is greater than or equal to a second preset threshold.
[0128] If the updated input rotation value is greater than or equal to the second preset threshold, the analysis module 3 determines whether the first reporting flag is true.
[0129] If the first reporting flag is true, then the analysis module 3 will determine whether the updated input rotation value is greater than or equal to the fourth preset threshold.
[0130] In this embodiment, the fourth preset threshold refers to a pre-set critical point for the input rotation value that is higher than the second preset threshold. It includes a threshold value used to determine whether the accumulated rotation amount has reached a level of importance, and is set based on the need to balance the need to avoid frequent reporting with the need to ensure timely response to important operations. Specifically, the fourth preset threshold is another constant parameter, reportLimitValue2, which represents the first limit value for minute rotations. The fourth preset threshold can be set to 100.
[0131] If the updated input rotation value is less than the fourth preset threshold, the current cached rotation value is updated using the updated input rotation value.
[0132] If the first reporting flag is false, or the updated input rotation value is greater than or equal to the fourth preset threshold, then the analysis module 3 will set the send knob flag to true.
[0133] In this embodiment, the updated input rotation value obtained after cumulative calculation is acquired, and the updated input rotation value is compared with a second preset threshold to determine whether it has reached the threshold. Subsequently, if the determination result is yes, the current state of the first reporting flag is checked, and its Boolean value is read to determine whether to perform the first reporting.
[0134] In this embodiment, the direction identifier value stored in the input knob event and the direction identifier value stored in the cached knob event are extracted simultaneously, and a consistency comparison is performed on these two direction identifier values. Subsequently, the updated input rotation value is compared with a fourth preset threshold. If the system determines that the two direction identifier values are different, the system replaces the current cached rotation value with the input rotation value. If the system determines that the updated input rotation value is less than the fourth preset threshold, the system replaces the current cached rotation value with the updated input rotation value.
[0135] When the first reporting flag is true, it indicates that this is the first report of a minor rotation. Next, the updated input rotation value is retrieved and compared to a higher fourth preset threshold. This comparison then determines whether the accumulated rotation has reached a level requiring mandatory reporting. If the first reporting flag is false, or the updated input rotation value is greater than or equal to the fourth preset threshold, the send knob flag is set to true.
[0136] The setting operation is triggered under two conditions: one is when the first reporting flag is detected as false, indicating that this is not the first report of a minor rotation; the other is when the updated input rotation value is determined to be greater than or equal to the fourth preset threshold, indicating that the rotation amount has reached a significant level. Next, after either condition is met, the value of the send knob flag is changed to true. Subsequently, this flag change sends an explicit instruction to the pump speed setting interface or pump speed setting function to prepare to send the current knob event.
[0137] Here's a specific example: After accumulating the rotation and obtaining the updated input rotation value, it's confirmed that it has exceeded the second preset threshold. Next, the status of the first reporting flag is checked. If the flag is true, the updated input rotation value is further compared with the fourth preset threshold. Subsequently, if the system detects that this is not the first report of a minor rotation (i.e., the first reporting flag is false), or if the currently accumulated rotation has already reached a high fourth preset threshold, the send knob flag is immediately set to true. Finally, based on the instruction to send the knob flag as true, the knob event reporting process is executed, thus completing a full operation response.
[0138] By performing the above steps, this embodiment of the application achieves fine control over the knob reporting logic by introducing the state judgment of the first reporting flag and a higher fourth preset threshold. This ensures enhanced filtering of the first small rotation operation and avoids frequent reporting due to continuous small accumulation over a relatively long period of time, thereby optimizing the use of system communication resources and improving the consistency of the interactive experience.
[0139] refer to Figure 1 or Figure 2 The forwarding module 4 determines whether the send knob flag is true.
[0140] If the sending knob flag is false, the receiving module 1 will acquire the knob rotation data for the next preset cycle.
[0141] When the transmit knob flag is false, the next preset cycle begins, and the receiving module 1 acquires new knob rotation data according to the preset cycle. Finally, the above process is repeated to achieve continuous monitoring.
[0142] Here is a specific example: First, receiving module 1 acquires knob rotation data from the knob encoder according to a preset period, including the number of knob rotation points. Second, it determines whether the number of knob rotation points is less than a first preset threshold. If it is greater than or equal to the threshold, the data acquisition time is recorded as the first timestamp and stored in the input knob event. Then, the first reporting flag and the send knob flag are set to false. Next, it determines whether the input rotation value is less than a second preset threshold. If it is, the time difference between the first timestamp and the second timestamp of the cached knob event is calculated. Then, it determines whether the time difference is less than or equal to a third preset threshold. If it is, the direction identifier values in the input knob event and the cached knob event are compared. If the directions are the same, the sum of the cached rotation value and the input rotation value is calculated as the rotation accumulation value, and the input rotation value is updated. Afterward, the system determines whether the updated input rotation value reaches the second preset threshold. If it does not, the current cached rotation value is updated. Finally, when the send knob flag is false, the system acquires the knob rotation data for the next preset period and repeats the above processing flow.
[0143] By performing the above steps, this embodiment of the application collects knob data at a preset period and, based on multiple threshold judgments and event merging mechanisms, achieves intelligent processing of knob rotation operations, effectively filtering noise and minor rotations, ensuring that only valid rotation events are reported, thereby improving the system's response accuracy and user experience, while reducing unnecessary communication overhead.
[0144] If the send knob flag is true, the forwarding module 4 will send the current input data in the input knob event to the pump speed setting interface or the pump speed setting function.
[0145] The system monitors the status of the send knob flag. When the send knob flag is detected as true, it extracts the current input data from the input knob event data structure. This extracted current input data is then passed as a parameter to the pump speed setting interface or function by calling a communication protocol or function interface. Finally, the data transmission command is completed, thus transforming the user's knob operation intention into an actual control signal for the pump speed.
[0146] The forwarding module 4 updates the direction identifier value of the cached knob event to the direction identifier value of the input knob event, resets and initializes the cached data of the cached knob event, and sets the first reporting flag to false.
[0147] Compared with existing technologies, this application's embodiment acquires knob data periodically. If the number of rotation points reaches a preset threshold, a timestamp is recorded and the event is stored, while the reporting and sending flags are reset. Then, it determines whether the input rotation value has reached another threshold. If not, it calculates the time difference between the current value and the cached event. If the time difference is within the allowable range and the two events are in the same direction, the rotation value is accumulated and updated, and the threshold is re-evaluated. If the threshold is still not reached, the cached value is updated. Finally, the sending flag is checked; if it is false, the next data acquisition cycle begins. Through multiple judgments and accumulation processes, accurate response and data integration for knob operations are achieved. This application's embodiment combines multi-level judgment and data accumulation mechanisms to achieve efficient and accurate acquisition and processing of knob rotation operations.
[0148] In addition, embodiments of the present invention also provide a medical device pump knob adjustment device, the device comprising: a processor and a memory; the memory for storing one or more program instructions; the processor for executing one or more program instructions to perform the steps of a software reliability assessment method as described in any of the preceding embodiments.
[0149] In addition, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of a software reliability assessment method as described in any of the preceding claims.
[0150] In this embodiment of the invention, the processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0151] The various methods, steps, and logic diagrams disclosed in the embodiments of this invention can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The processor reads information from the storage medium and, in conjunction with its hardware, completes the steps of the above methods.
[0152] The storage medium can be memory, such as volatile memory or non-volatile memory, or may include both volatile and non-volatile memory.
[0153] Among them, non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory.
[0154] Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (Synchlink DRAM, SLDRAM), and direct memory bus RAM (DRRAM).
[0155] The storage media described in the embodiments of the present invention are intended to include, but are not limited to, these and any other suitable types of memory.
[0156] Those skilled in the art will recognize that, in one or more of the examples above, the functions described in this invention can be implemented using a combination of hardware and software. When applied as software, the corresponding functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transmission of computer programs from one place to another. Storage media can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0157] In this application, the logical values "true" and "false," and the numerical values "1" and "0," are equivalent representations of Boolean logic states, essentially used to characterize two mutually exclusive states in binary logic. Those skilled in the art should understand that the above representations of logical values are merely illustrative, and their specific symbols or numerical forms do not constitute a limitation on the technical solution. In actual implementation, "true" can be equivalently represented by "1" or a "positive number," while "false" can be equivalently represented by "0" or a "negative number," and vice versa. This correspondence is a well-known and common technical practice in the field, widely applied in digital circuit design, computer program logic, state judgment, and data processing. Therefore, any technical features in this application that use "true / false" or "1 / 0" for logical expression, and their equivalent substitutions, should be considered to fall within the scope of this application's disclosure and technical teaching.
[0158] Although the present invention has been described in detail above with general descriptions and specific embodiments, modifications or improvements can be made to it, which will be obvious to those skilled in the art. Therefore, all such modifications or improvements made without departing from the spirit of the present invention fall within the scope of protection claimed by the present invention.
Claims
1. A medical device pump knob adjustment method, comprising: The method comprises: acquiring knob rotation collection data according to a preset period; judging whether the knob rotation point number is less than a first preset threshold value; if the knob rotation point number is greater than or equal to the first preset threshold value, using the data collection time as a first time stamp, and storing the knob rotation collection data into an input knob event; setting both a first report flag and a sending knob flag to false; judging whether the input rotation value is greater than or equal to a second preset threshold value; if the input rotation value is less than the second preset threshold value, directly calculating a time difference value of the first time stamp minus a second time stamp of a cached knob event; judging whether the time difference value is less than or equal to a third preset threshold value; if the time difference value is less than or equal to the third preset threshold value, judging whether the direction identification value in the input knob event and the direction identification value in the cached knob event are the same; if the direction identification value in the input knob event and the direction identification value in the cached knob event are the same, calculating a sum of the cached rotation value in the cached knob event and the input rotation value in the input knob event to obtain a rotation accumulation value, and updating the input rotation value by using the rotation accumulation value; judging whether the updated input rotation value is greater than or equal to the second preset threshold value; if the updated input rotation value is less than the second preset threshold value, updating the current cached rotation value by using the updated input rotation value; judging whether the sending knob flag is true; if the sending knob flag is false, acquiring knob rotation collection data of a next preset period.
2. A medical device pump knob adjustment method as in claim 1, wherein, Before storing the knob rotation collection data into the input knob event, the method further comprises: initializing the input knob event and the cached knob event, which comprises: emptying the input data in the input knob event and the cached data in the cached knob event; setting the first time stamp in the input knob event and the second time stamp in the cached knob event to zero.
3. A medical device pump knob adjustment method as in claim 2, wherein, The method further comprises: if the knob rotation point number is less than the first preset threshold value, discarding the knob rotation collection data.
4. A medical device pump knob adjustment method as in claim 3, wherein, The method further comprises: if the updated input rotation value is greater than or equal to the second preset threshold value, judging whether the first report flag is true; if the first report flag is true, judging whether the updated input rotation value is greater than or equal to a fourth preset threshold value; if the first report flag is false or the updated input rotation value is greater than or equal to the fourth preset threshold value, setting the sending knob flag to true.
5. A medical device pump knob adjustment method as defined in claim 4, wherein, The method further comprises: if the direction identification value in the input knob event and the direction identification value in the cached knob event are not the same, updating the current cached rotation value by using the input rotation value; if the updated input rotation value is less than the fourth preset threshold value, updating the current cached rotation value by using the updated input rotation value; if the time difference value is greater than the third preset threshold value, setting the first report flag to true and updating the current cached rotation value by using the input rotation value.
6. A medical device pump knob adjustment method as in claim 5, wherein, The method further comprises: if the input rotation value is greater than or equal to a second preset threshold value, setting the sending knob flag as true; calculating a time difference value of the first timestamp minus a second timestamp of the cache knob event; judging whether the time difference value is less than or equal to a third preset threshold value; if the time difference value is less than or equal to the third preset threshold value, judging whether direction identification values in the input knob event and the cache knob event are same; if the direction identification values in the input knob event and the cache knob event are same, calculating a sum of a cache rotation value in the cache knob event and an input rotation value in the input knob event to obtain a rotation accumulation value, and updating the input rotation value and the cache rotation value by using the rotation accumulation value; if the time difference value is greater than the third preset threshold value, or the direction identification values in the input knob event and the cache knob event are not same, updating current cache data of the cache knob event by using input data in the input knob event.
7. A medical device pump knob adjustment method as in claim 6, wherein, The method further comprises: if the sending knob flag is true, sending current input data in the input knob event to a pump rotating speed setting interface or a pump rotating speed setting function; updating a direction identification value of the cache knob event as a direction identification value of the input knob event, resetting and initializing cache data of the cache knob event, and setting a first reporting flag as false.
8. A medical device pump knob adjustment system, comprising: The system is used for executing the method according to any one of claims 1 to 7, and the system comprises: a receiving module, configured to acquire knob rotation collection data according to a preset period; a filtering module, configured to judge whether the knob rotation point number is less than a first preset threshold value; an analysis module, configured to execute the following steps: if the knob rotation point number is greater than or equal to the first preset threshold value, storing the knob rotation collection data into an input knob event by using a data collection time as a first timestamp; setting a first reporting flag and a sending knob flag as false; judging whether an input rotation value is greater than or equal to a second preset threshold value; if the input rotation value is less than the second preset threshold value, directly calculating a time difference value of the first timestamp minus a second timestamp of a cache knob event; judging whether the time difference value is less than or equal to a third preset threshold value; if the time difference value is less than or equal to the third preset threshold value, judging whether direction identification values in the input knob event and the cache knob event are same; if the direction identification values in the input knob event and the cache knob event are same, calculating a sum of a cache rotation value in the cache knob event and an input rotation value in the input knob event to obtain a rotation accumulation value, and updating the input rotation value by using the rotation accumulation value; judging whether the updated input rotation value is greater than or equal to the second preset threshold value; if the updated input rotation value is less than the second preset threshold value, updating a current cache rotation value by using the updated input rotation value; and The forwarding module is configured to determine whether the sending knob flag is true; and if the sending knob flag is false, acquire knob rotation collection data of a next preset period.
9. A medical device pump knob adjustment apparatus, characterized by, The device comprises a processor and a memory; The memory is configured to store one or more program instructions; The processor is configured to execute the one or more program instructions to perform the steps of the medical device pump knob adjustment method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer program is stored on the computer readable storage medium and is executed by the processor to implement the steps of the medical device pump knob adjustment method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Oscilloscope knob acceleration method, oscilloscope control adjustment method and digital oscilloscope
CN110967538A
Intelligent knob adjusting device and adjusting method thereof
CN111694296A