Infusion state real-time monitoring and abnormity early warning method based on attention mechanism
By combining the attention mechanism and the imperial competition algorithm, real-time monitoring and early warning of multiple types of anomalies in infusion status are achieved, which solves the shortcomings of the existing system in recognition ability and response speed. It is suitable for resource-constrained edge terminals and improves infusion safety and system convenience.
Patent Information
- Application Number
- CN202510777843.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2025-09-26
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing infusion monitoring systems have limitations in identifying abnormal types and providing risk warnings, making it difficult to achieve accurate identification and timely response in diverse scenarios. Reliance on centralized processing leads to delays, and existing deep learning models are difficult to deploy on resource-limited edge terminals.
A real-time monitoring method for infusion status based on the attention mechanism is adopted, combined with the Imperial competition algorithm to optimize the model structure, perform multimodal data processing and edge deployment, and achieve high-precision identification and rapid response to infusion abnormalities.
It achieves efficient, real-time monitoring and early warning of multiple types of abnormalities during the infusion process, improves detection accuracy and response speed, reduces false alarm rate, supports fine-grained intelligent early warning with multiple labels and multiple risk levels, and is suitable for medical institutions of different sizes.
Smart Images

Figure CN120708890A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical monitoring technology, and in particular to a method for real-time monitoring of infusion status and abnormality early warning based on an attention mechanism. Background Art
[0002] With the advancement of medical information technology and intelligentization, hospitals and various medical institutions have placed higher demands on the safety and real-time monitoring of patient infusion processes. Traditional infusion monitoring relies heavily on manual inspections and empirical judgment by medical staff. This is plagued by high workload, limited inspection frequency, and untimely responses to abnormalities. This can easily lead to infusion anomalies not being discovered and addressed in a timely manner, impacting patient medication safety. To this end, automated infusion monitoring systems based on electronic and sensor technologies have been gradually applied clinically in recent years. Such systems typically collect infusion process parameters through pressure, flow, and liquid level sensors, and upload them to a central monitoring platform via wired or wireless means, enabling centralized monitoring and abnormality alerts for multiple beds and patients.
[0003] Some infusion monitoring systems have adopted simple rule-based judgments or traditional machine learning algorithms to issue early warnings for common anomalies such as excessive dripping rate, excessive dripping rate, pipe blockage, and fluid depletion by setting thresholds and using methods based on historical data statistics. These methods have improved the level of automation to a certain extent, but the model's expressiveness and generalization capabilities are limited, making false positives and missed negatives prone to occur. Faced with diverse infusion scenarios and interference, fixed rules or static models are difficult to adapt to actual changes, and some anomaly types are difficult to accurately identify. In addition, most traditional systems rely on centralized processing, and all data must be uploaded to the back-end server. Limited by network bandwidth and latency, it is difficult to respond to abnormal events in a timely manner, affecting the timeliness of clinical decision-making.
[0004] Artificial intelligence technology has advanced medical monitoring, with some research attempting to improve anomaly detection accuracy using deep learning models. Attention-based models offer advantages in feature extraction and pattern recognition, but existing deep learning models often rely on high-performance servers, making them difficult to deploy directly on resource-constrained edge devices. Consequently, they lack efficient local inference and real-time warning in real-world scenarios. While some lightweight models reduce resource consumption, they often sacrifice detection accuracy, making it difficult to achieve both real-time performance and accuracy.
[0005] Existing infusion anomaly monitoring systems also have limitations in identifying anomaly types and providing risk warnings. The systems' ability to distinguish complex anomaly types is limited, and insufficient labeling makes it difficult to support fine-grained warnings. Most systems only output simple alarms or static risk levels, lacking dynamic intelligent warnings based on risk scores and labels, making it difficult to provide medical staff with more valuable identification results.
[0006] Therefore, how to provide a real-time monitoring and abnormal warning method of infusion status based on attention mechanism is an urgent problem that technicians in this field need to solve. Summary of the Invention
[0007] One objective of the present invention is to propose a method for real-time monitoring of infusion status and anomaly warning based on an attention mechanism. This method leverages the efficient global optimization capabilities of the Imperial Competition Algorithm for anomaly detection parameter optimization and adaptive adjustment of model weights, and combines it with a deep learning attention mechanism to extract and fuse features from multi-source infusion monitoring data, achieving high-precision discrimination of multiple types of infusion anomalies, including blockages, leaks, abnormal drip rates, fluid depletion, bubbles, and needle detachment. The system performs real-time data analysis and intelligent risk warnings on edge devices, offering high detection accuracy, rich anomaly identification, fast response, low false alarm rate, and flexible deployment, significantly enhancing the intelligence and safety of clinical infusion monitoring.
[0008] According to an embodiment of the present invention, a method for real-time monitoring of infusion status and abnormality early warning based on an attention mechanism includes the following steps:
[0009] S1. Collecting multimodal infusion state data during the infusion process and performing normalization processing to obtain a multimodal standardized infusion state vector set;
[0010] S2. Input the multimodal standardized infusion state vector set into the attention mechanism model and output the infusion abnormality warning result set;
[0011] S3. Construct a joint fitness function based on the classification accuracy index in the infusion abnormality warning result set and the resource consumption index of the attention mechanism model during operation;
[0012] S4. Use the imperial competition algorithm to optimize the structural parameters of the attention mechanism model to form a set of structural candidate countries. In the process of colony evolution, a resource-aware mechanism is introduced to integrate edge deployment constraints to obtain a set of structural candidate solutions.
[0013] S5. Based on the joint fitness function, the adaptability of each candidate structure solution in the candidate structure solution set is evaluated to obtain the optimal structure configuration;
[0014] S6. Apply the optimal structural configuration to the attention mechanism model to build a deployable real-time infusion monitoring model. The real-time infusion monitoring model is deployed to edge terminal devices, and a set of infusion abnormality warning results is output after deployment.
[0015] S7. Perform infusion abnormality type identification and warning triggering operations based on the risk score value and warning type label in the infusion abnormality warning result set after deployment.
[0016] Optionally, the multimodal standardized infusion state vector set includes image modality standardized data and numerical modality standardized data; the image modality standardized data includes standardized image data reflecting the liquid level state of the infusion bottle, and the numerical modality standardized data includes infusion flow rate standardized data, infusion pressure standardized data, infusion temperature standardized data and infusion conductivity standardized data.
[0017] Optionally, the S2 specifically includes:
[0018] S21, inputting the multimodal standardized infusion state vector set into an attention mechanism model, wherein the attention mechanism model includes an image modality feature extraction network, a numerical modality state encoding network, a cross-modality attention fusion module, and a classification network;
[0019] S22, inputting each vector in the multimodal standardized infusion state vector set into an image modality feature extraction network to obtain an image modality feature vector;
[0020] S23, inputting each vector in the multimodal standardized infusion state vector set into a numerical modal state encoding network to obtain a numerical modal feature vector;
[0021] S24, inputting the image modality feature vector and the numerical modality feature vector into the cross-modality attention fusion module, performing feature weight assignment and fusion on the two through the attention mechanism, and obtaining a fused feature vector;
[0022] S25. Input all fused feature vectors into the classification network, perform discrimination processing on the fused feature vectors, and output a set of abnormal infusion warning results.
[0023] Optionally, the S25 specifically includes:
[0024] S251. Input the time series fusion feature vectors into a classification network in sequence, where the classification network includes at least one fully connected layer and an output layer;
[0025] S252: Input the fused feature vector at each moment into the fully connected layer, perform a linear transformation on the fused feature vector and the weight matrix, and add a bias vector to obtain the corresponding output vector;
[0026] S253, performing activation function processing on the output vector at each moment, and obtaining an abnormal warning probability vector at the corresponding moment by applying the activation function to the output vector;
[0027] S254: Perform threshold determination on the abnormal warning probability vector at each moment. When the abnormal warning probability is greater than or equal to the preset threshold, it is determined to be abnormal; otherwise, it is determined to be normal, and an infusion abnormality warning result for the corresponding moment is generated.
[0028] S255. Summarize the abnormal infusion warning results at all times and output an abnormal infusion warning result set.
[0029] Optionally, the S3 specifically includes:
[0030] S31, comparing the infusion abnormality warning result set with the real label, and counting the number of true positive examples TP, the number of true negative examples TN, the number of false positive examples FP, and the number of false negative examples FN;
[0031] S32, using the sum of the number of true positive examples TP and the number of true negative examples TN as the numerator, and the sum of the number of true positive examples TP, the number of true negative examples TN, the number of false positive examples FP, and the number of false negative examples FN as the denominator, to calculate the classification accuracy index Acc;
[0032] S33. Obtain a resource consumption index R of the attention mechanism model during operation, where the resource consumption index includes computing resource consumption and storage resource consumption of the attention mechanism model;
[0033] S34. Construct a joint fitness function, and perform a weighted combination of the classification accuracy index and the resource consumption index, wherein the numerical value of the classification accuracy index is multiplied by the first weight coefficient α, the number of floating-point operations required for forward reasoning of the attention mechanism model and the total number of model parameters are normalized, and multiplied by the second weight coefficient β1 and the third weight coefficient β1 respectively. Finally, the weighted results of the two are subtracted from the weighted accuracy to obtain the joint fitness function Fit.
[0034] Optionally, the S4 specifically includes:
[0035] S41. Using the structural parameters of the current attention mechanism model as the initial empire, construct a set of candidate structural countries C = {C1, C2, ..., C i ,…,C n}, where C i represents the i-th structural candidate country, and n is the number of structural candidate countries;
[0036] S42. For each structure candidate country in the structure candidate country set C, calculate the joint fitness of the structure candidate country using the joint fitness function;
[0037] S43. Based on joint fitness, the set of structural candidate countries is divided into empires and assigned to them, forming several empires. Each empire contains a sovereign country and several colonies. In each empire, the structural candidate country with the highest joint fitness is called the sovereign country, and other structural candidate countries belonging to a certain empire and with a lower joint fitness than the sovereign country are called colonies.
[0038] S44. For each colony within the empire, the structural parameters of the colony are iteratively updated by simulating the "attraction-repulsion" process. In each iteration, a resource-aware mechanism is introduced, using the normalized values of FLOPs and Params as edge deployment constraints to limit the direction and magnitude of structural parameter adjustments.
[0039] S45, repeat steps S42 to S44 until the number of evolution iterations reaches the preset maximum number of iterations T max Or the number of empires is reduced to the minimum number of empires N min , forming a set of candidate structural solutions S = {S1, S2, ..., S m}, where each structural candidate solution consists of a set of structural parameters of the attention mechanism model and the joint fitness corresponding to the structural parameters.
[0040] Optionally, the S44 specifically includes:
[0041] S441. For each colony within the empire, adjust the current structural parameters in the direction of the current structural parameters of the mother country. Specifically, at each iteration, multiply the difference between the mother country's structural parameters and the colony's structural parameters by the step size factor γ and the random weight rand, and then add it to the colony's current structural parameters.
[0042] S442. After each update of the colony structure parameters, the updated structure parameters are tested using the resource-aware constraint mechanism. The resource-aware constraint mechanism calculates the computational load and parameter load of the updated model and performs normalization processing, requiring that the normalized computational load does not exceed the preset maximum normalized computational load threshold η. FLOPs , the normalized parameter value does not exceed the preset maximum normalized parameter value threshold η Params ;
[0043] S443. If the updated colony structure parameters fail to meet the resource-aware constraints, the structure parameters are adjusted accordingly based on the deployment requirements of the edge devices;
[0044] S444. Repeat steps S441 to S443 until the structural parameters of all colonies have completed this round of update.
[0045] Optionally, the optimal structural configuration refers to a structural candidate solution that satisfies the resource-aware constraint mechanism and has the largest joint fitness in the set of structural candidate solutions.
[0046] Optionally, the S6 specifically includes:
[0047] S61. According to the optimal structural configuration, set the structural parameters of each layer of the attention mechanism model, including the number of layers, the number of channels per layer, the number of attention heads, and the number of hidden units, to build a real-time infusion monitoring model;
[0048] S62: Export the constructed real-time infusion monitoring model in the form of a model file, and transmit the real-time infusion monitoring model file to the edge terminal device via wired or wireless means;
[0049] S63. Load a real-time infusion monitoring model on the edge terminal device, collect and preprocess infusion status data in real time, and obtain a preprocessed infusion state vector;
[0050] S64. Input the pre-processed infusion state vector into the real-time infusion monitoring model, and output a set of post-deployment infusion abnormality warning results.
[0051] Optionally, the S7 specifically includes:
[0052] S71. Analyze the abnormal infusion warning result set output after deployment to obtain the abnormal risk score value S of each monitored object at each moment. i And the corresponding warning type label L i ;
[0053] S72. For each monitored object, according to the risk score S i and the preset risk threshold θ risk After comparison, if the risk score is greater than or equal to the preset risk threshold, it is determined to be an abnormal risk event;
[0054] S73, according to the corresponding warning type label L i , identify the specific types of infusion abnormalities, including blockage, leakage, abnormal drip rate, liquid depletion, bubbles, needle detachment, hanging abnormality, drip bucket abnormality, tube detachment, illegal operation and equipment failure, and record the identification results as Type i ;
[0055] S74, for all abnormal risk events, according to Type i Determine the type of anomaly, trigger the corresponding warning operation, and generate warning information, which includes the monitoring object number, risk score value, anomaly type and occurrence time;
[0056] S75. Output the generated warning information through the display interface, sound alarm and wireless communication of the edge terminal device.
[0057] The beneficial effects of the present invention are:
[0058] The present invention achieves efficient, real-time monitoring and early warning of multiple types of abnormalities during the infusion process by introducing a combination of the Imperial competition algorithm and the deep learning attention mechanism. In response to the problems in the existing technology of reliance on rule judgment, poor model generalization ability, high false alarm and omission rate, limited recognition of abnormal types, and response lag caused by centralized processing architecture, the present invention has made systematic improvements in system architecture and algorithm optimization. The Imperial competition algorithm is used to globally optimize the model parameters and feature selection process, thereby improving the model's ability to adapt to multiple types of abnormal signals in complex and dynamic clinical environments, and effectively enhancing the system's accuracy in distinguishing different infusion abnormalities. The attention mechanism further improves the ability to extract key data features, making the detection of abnormal events more robust and accurate.
[0059] The solution of the present invention supports the completion of data processing and anomaly identification locally on the edge intelligent terminal, avoiding the delay and bandwidth pressure caused by uploading all data to the remote server, and significantly improving the warning response speed. Through the fusion analysis of multi-dimensional data such as drip rate, pressure, liquid level, bubbles, etc., it can identify various complex infusion anomalies such as air leakage, blockage, liquid depletion, needle detachment, drip bucket abnormalities, etc., and realize fine-grained intelligent warning with multiple labels and multiple risk levels. The risk labels and warning information output by the system provide medical staff with a more valuable reference basis for decision-making, which helps to deal with infusion anomalies in a timely and scientific manner and ensure the safety of patients' medication.
[0060] Furthermore, the algorithm structure of the present invention has been lightweight and optimized to adapt to a variety of edge computing hardware resource conditions. It has good scalability and deployment flexibility, and is suitable for medical institutions of different sizes and types. Overall, the present invention improves the accuracy and real-time performance of infusion anomaly detection, enriches the ability to identify anomaly types, reduces false positives and false negatives, and significantly enhances the system's ease of use and practical clinical value, providing strong technical support for improving infusion safety. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0062] Figure 1 This is a flow chart of a method for real-time monitoring of infusion status and abnormality early warning based on an attention mechanism proposed by the present invention;
[0063] Figure 2 This is a schematic diagram of the process of adaptively optimizing model parameters using the Imperial competition algorithm in a method for real-time monitoring of infusion status and abnormal warning based on an attention mechanism proposed in the present invention;
[0064] Figure 3This is a processing flow chart for multi-type infusion anomaly identification and risk warning of a real-time infusion status monitoring and abnormality warning method based on an attention mechanism proposed by the present invention. DETAILED DESCRIPTION
[0065] The present invention will now be described in further detail with reference to the accompanying drawings, which are simplified schematic diagrams that illustrate the basic structure of the present invention in a schematic manner.
[0066] refer to Figure 1-3 , a method for real-time monitoring of infusion status and abnormal warning based on attention mechanism, comprising the following steps:
[0067] S1. Collecting multimodal infusion state data during the infusion process and performing normalization processing to obtain a multimodal standardized infusion state vector set;
[0068] S2. Input the multimodal standardized infusion state vector set into the attention mechanism model and output the infusion abnormality warning result set;
[0069] S3. Construct a joint fitness function based on the classification accuracy index in the infusion abnormality warning result set and the resource consumption index of the attention mechanism model during operation;
[0070] S4. Use the imperial competition algorithm to optimize the structural parameters of the attention mechanism model to form a set of structural candidate countries. In the process of colony evolution, a resource-aware mechanism is introduced to integrate edge deployment constraints to obtain a set of structural candidate solutions.
[0071] S5. Based on the joint fitness function, the adaptability of each candidate structure solution in the candidate structure solution set is evaluated to obtain the optimal structure configuration;
[0072] S6. Apply the optimal structural configuration to the attention mechanism model to build a deployable real-time infusion monitoring model. The real-time infusion monitoring model is deployed to edge terminal devices, and a set of infusion abnormality warning results is output after deployment.
[0073] S7. Perform infusion abnormality type identification and warning triggering operations based on the risk score value and warning type label in the infusion abnormality warning result set after deployment.
[0074] The present invention proposes a method for real-time monitoring of infusion status and abnormal warning based on the attention mechanism. In terms of model reasoning, by standardizing the multimodal infusion status data and introducing the attention mechanism model, high-precision identification of abnormal states is achieved. In terms of model optimization, a joint fitness function based on classification accuracy and resource consumption is constructed, and the imperial competition algorithm and edge deployment constraints are combined to search and select the optimal model structure configuration. During the deployment process, the optimized model is embedded in the edge terminal device to achieve efficient local early warning response and ensure infusion safety. Test results show that this method effectively controls the computational complexity of the model while improving accuracy. It has the advantages of strong real-time performance, high deployability and fast early warning response, and is suitable for resource-constrained clinical environments.
[0075] In this embodiment, the multimodal standardized infusion state vector set includes image modality standardized data and numerical modality standardized data; the image modality standardized data includes standardized image data reflecting the liquid level state of the infusion bottle, and the numerical modality standardized data includes infusion flow rate standardized data, infusion pressure standardized data, infusion temperature standardized data and infusion conductivity standardized data.
[0076] This invention achieves multidimensional state modeling and anomaly detection for the infusion process by fusing standardized infusion status data from image and numerical modalities. Image data reflects changes in the liquid level, while numerical data covers flow rate, pressure, temperature, and conductivity, enhancing the model's ability to identify complex anomalies and providing early warning accuracy.
[0077] In this embodiment, S2 specifically includes:
[0078] S21, inputting the multimodal standardized infusion state vector set into an attention mechanism model, wherein the attention mechanism model includes an image modality feature extraction network, a numerical modality state encoding network, a cross-modality attention fusion module, and a classification network;
[0079] S22. Input each vector in the multimodal standardized infusion state vector set into an image modality feature extraction network to obtain an image modality feature vector. The image modality feature extraction network is used to extract a deep feature representation of the image modality standardized data reflecting the liquid level state of the infusion bottle;
[0080] S23. Inputting each vector in the multimodal standardized infusion state vector set into a numerical modal state encoding network to obtain a numerical modal feature vector, wherein the numerical modal state encoding network is used to encode feature representations of the standardized infusion flow rate data, the standardized infusion pressure data, the standardized infusion temperature data, and the standardized infusion conductivity data;
[0081] S24. Inputting the image modality feature vector and the numerical modality feature vector into a cross-modality attention fusion module, performing feature weight assignment and fusion on the two through an attention mechanism, and obtaining a fused feature vector. The cross-modality attention fusion module is used to jointly model the correlation between the image modality features and the numerical modality features.
[0082] S25. Input all fused feature vectors into the classification network, perform discrimination processing on the fused feature vectors, and output a set of abnormal infusion warning results.
[0083] This invention achieves deep feature extraction and efficient fusion of multimodal infusion status data by constructing an attention mechanism model that includes an image modality feature extraction network, a numerical modality state encoding network, a cross-modal attention fusion module, and a classification network. The method extracts the characteristics of the liquid level change in the infusion bottle in the image modality, encodes the state information of flow rate, pressure, temperature, and conductivity in the numerical modality, and strengthens the correlation modeling between different modalities through a cross-modal attention mechanism, improving the model's ability to identify complex abnormal patterns. The classification network outputs warning results based on the fused feature vector, effectively improving the accuracy and response efficiency of infusion anomaly detection.
[0084] In this embodiment, the S25 specifically includes:
[0085] S251. Input the time series fusion feature vectors into a classification network in sequence, where the classification network includes at least one fully connected layer and an output layer;
[0086] S252: Input the fused feature vector at each moment into the fully connected layer, perform a linear transformation on the fused feature vector and the weight matrix, and add a bias vector to obtain the corresponding output vector;
[0087] S253, performing activation function processing on the output vector at each moment, and obtaining an abnormal warning probability vector at the corresponding moment by applying the activation function to the output vector;
[0088] S254: Perform threshold determination on the abnormal warning probability vector at each moment. When the abnormal warning probability is greater than or equal to the preset threshold, it is determined to be abnormal; otherwise, it is determined to be normal, and an infusion abnormality warning result for the corresponding moment is generated.
[0089] S255. Summarize the abnormal infusion warning results at all times and output an abnormal infusion warning result set.
[0090] The present invention introduces a time-series fusion feature vector discrimination mechanism into the classification network to achieve moment-by-moment anomaly detection of the continuous state of the infusion process. The fused feature vector is linearly transformed and weighted biased through the fully connected layer, and an abnormal probability vector is generated in combination with the activation function. Then, classification judgment is performed based on the set threshold, and the abnormal warning result at each moment is output. This method can accurately identify abnormal time points in the infusion process and generate a complete set of abnormal warning results in real time, effectively improving the monitoring accuracy and real-time response of the system in dynamic scenarios, and meeting the needs of clinical continuous monitoring.
[0091] In this embodiment, S3 specifically includes:
[0092] S31, comparing the infusion abnormality warning result set with the real label, and counting the number of true positive examples TP, the number of true negative examples TN, the number of false positive examples FP, and the number of false negative examples FN;
[0093] S32. The sum of the number of true positive examples TP and the number of true negative examples TN is used as the numerator, and the sum of the number of true positive examples TP, the number of true negative examples TN, the number of false positive examples FP, and the number of false negative examples FN is used as the denominator to calculate the classification accuracy index Acc:
[0094]
[0095] Among them, Acc is the classification accuracy index, TP is the number of true positive examples, TN is the number of true negative examples, FP is the number of false positive examples, and FN is the number of false negative examples;
[0096] S33. Obtain a resource consumption index R of the attention mechanism model during operation, where the resource consumption index includes computing resource consumption and storage resource consumption of the attention mechanism model. The computing resource consumption is measured by the number of floating-point operations required during the forward reasoning process of the model, and the storage resource consumption is measured by the total number of model parameters.
[0097] S34. Construct a joint fitness function, and perform a weighted combination of the classification accuracy index and the resource consumption index. The classification accuracy index is multiplied by the first weight coefficient α, and the number of floating-point operations and the total number of model parameters required for the forward reasoning of the attention mechanism model are normalized and multiplied by the second weight coefficient β1 and the third weight coefficient β1 respectively. Finally, the weighted results of the two are subtracted from the weighted accuracy to obtain the joint fitness function Fit:
[0098] Fit=α×Acc-β1×Normalize(FLOPs)-β2×Normalize(Params);
[0099] Among them, Fit is the joint fitness function, α is the classification accuracy weight coefficient, β1 is the computing resource consumption weight coefficient, Normalize(·) is the normalization processing operation, FLOPs is the number of floating-point operations required in the forward reasoning process of the attention mechanism model, β2 is the storage resource consumption weight coefficient, and Params is the total number of attention mechanism model parameters.
[0100] The present invention realizes a comprehensive evaluation of the infusion abnormality warning model between classification accuracy and resource consumption by constructing a joint fitness function. In terms of accuracy, the warning results output by the model are first compared with the true labels, and the number of samples that are actually abnormal and predicted to be abnormal, the number of samples that are actually normal and predicted to be normal, the number of samples that are actually normal but predicted to be abnormal, and the number of samples that are actually abnormal but predicted to be normal are counted, and then the classification accuracy index is calculated to measure the recognition accuracy of the model. In terms of resource consumption, the computing resource consumption and storage resource consumption of the collection model during operation are expressed as the amount of calculation and the number of parameters, respectively, to reflect the resource load of the model during the reasoning process. Subsequently, the classification accuracy and resource indicators are normalized separately, and the weight coefficient is introduced for weighted fusion to construct a comprehensive fitness score, which is used to evaluate the overall performance of different model structures under accuracy and resource constraints. This scoring mechanism provides a unified standard for subsequent structural optimization and edge deployment, effectively improving the practicality and deployment efficiency of the model.
[0101] In this embodiment, the S4 specifically includes:
[0102] S41. Taking the structural parameters of the pre-attention mechanism model used for real-time monitoring of infusion status and abnormal warning as the initial empire, construct the set of candidate structural countries C = {C1, C2, ..., C i ,…,C n}, where C i represents the i-th structural candidate country, and n is the number of structural candidate countries;
[0103] S42. For each structure candidate country in the structure candidate country set C, calculate the joint fitness of the structure candidate country using the joint fitness function;
[0104] S43. Based on joint fitness, the set of structural candidate countries is divided into empires and assigned to them, forming several empires. Each empire contains a sovereign country and several colonies. In each empire, the structural candidate country with the highest joint fitness is called the sovereign country. The sovereign country represents the optimal structural parameter configuration within the current empire, that is, the structural parameters of the attention mechanism model with the best comprehensive classification accuracy and resource consumption performance in the current empire. Other structural candidate countries belonging to a certain empire and with a lower joint fitness than the sovereign country are called colonies.
[0105] S44. For each colony within the empire, the structural parameters of the colony are iteratively updated by simulating the "attraction-repulsion" process. A resource-aware mechanism is introduced in each iteration, using the normalized values of FLOPs and Params as edge deployment constraints to limit the direction and magnitude of structural parameter adjustments. This ensures that the optimization model can meet the real-time and low-power requirements of the infusion monitoring terminal.
[0106] S45, repeat steps S42 to S44 until the number of evolution iterations reaches the preset maximum number of iterations T max Or the number of empires is reduced to the minimum number of empires N min , forming a set of candidate structural solutions S = {S1, S2, ..., S m}, where each structural candidate solution consists of a set of structural parameters of the attention mechanism model and the joint fitness corresponding to the structural parameters.
[0107] This paper introduces an imperial competition algorithm to optimize the structural parameters of the attention mechanism model. By establishing a set of candidate structural countries and evaluating their joint fitness values, it simulates the process of imperial expansion and colonial evolution, and dynamically selects the optimal structural parameter combination. In each round of evolution, the system selects the country with the highest joint fitness value as the sovereign, and the other structural parameters gradually converge to it, and the colonial structure is updated under an "attraction-repulsion" mechanism. A resource-aware mechanism is introduced during the evolution process, using the normalized values of computational complexity and parameter quantities as selection and update constraints to ensure that the model structure strikes a balance between accuracy and resource consumption. The final output structural configuration has excellent recognition performance and deployment adaptability, suitable for the real-time monitoring of infusion anomalies in edge environments.
[0108] In this embodiment, the S44 specifically includes:
[0109] S441. For each colony within the empire, adjust the current structural parameters in the direction of the current structural parameters of the mother country. Specifically, at each iteration, multiply the difference between the mother country's structural parameters and the colony's structural parameters by the step size factor γ and the random weight rand, and then add it to the colony's current structural parameters, so that the colony's structural parameters move closer to the mother country's structural parameters, thus achieving iterative updating of the structural parameters.
[0110] S442. After each update of the colony structure parameters, the updated structure parameters are tested using the resource-aware constraint mechanism. The resource-aware constraint mechanism calculates the computational load and parameter load of the updated model and performs normalization processing, requiring that the normalized computational load does not exceed the preset maximum normalized computational load threshold η. FLOPs , the normalized parameter value does not exceed the preset maximum normalized parameter value threshold η ParamsTo ensure that the updated structural parameters can meet the deployment requirements of edge devices;
[0111] S443. If the updated colony structure parameters fail to meet the resource-aware constraints, the structure parameters are adjusted accordingly based on the deployment requirements of the edge device. Specifically, the portion of the computational load or parameter quantity that exceeds the preset normalization threshold is corrected so that the normalized computational load and parameter quantity do not exceed the corresponding maximum threshold, thereby ensuring that the structure parameters meet the resource constraints of the edge device.
[0112] S444. Repeat steps S441 to S443 until the structural parameters of all colonies have completed this round of update.
[0113] This invention introduces structural parameter adjustment and resource-aware constraint mechanisms into the colonial evolution process of the imperial competition algorithm. By simulating the convergence of colonies toward the sovereign structure, the model's structural parameters are gradually optimized. In each iteration, the structural parameters are dynamically adjusted based on the difference between the sovereign and colony structures, and step size and randomness are introduced to enhance search diversity. The updated structural parameters must meet the normalized resource constraints of computational and parameter quantities, ensuring that the model structure adapts to edge device deployment constraints. If the constraints are not met, targeted corrections are implemented, ultimately ensuring that the optimization results achieve an optimal, deployable balance between performance and resources.
[0114] In this embodiment, the optimal structural configuration refers to a structural candidate solution that satisfies the resource-aware constraint mechanism and has the largest joint fitness in the set of structural candidate solutions.
[0115] The present invention screens the structural configuration with the maximum joint fitness and satisfies the resource-aware constraints from the set of structural candidate solutions, ensuring that the selected model has the best recognition performance while meeting the limitations of edge devices on computing resources and storage resources, thereby improving the actual deployment efficiency and application stability of the model.
[0116] In this embodiment, S6 specifically includes:
[0117] S61. According to the optimal structural configuration, set the structural parameters of each layer of the attention mechanism model, including the number of layers, the number of channels per layer, the number of attention heads, and the number of hidden units, to build a real-time infusion monitoring model;
[0118] S62: Export the constructed real-time infusion monitoring model in the form of a model file, and transmit the real-time infusion monitoring model file to the edge terminal device via wired or wireless means to complete the local deployment of the model;
[0119] S63. Load a real-time infusion monitoring model on the edge terminal device, collect and preprocess infusion status data in real time, and obtain a preprocessed infusion state vector;
[0120] S64. Input the pre-processed infusion state vector into the real-time infusion monitoring model, and output a set of post-deployment infusion abnormality warning results.
[0121] This invention constructs a real-time infusion monitoring model based on an optimal structural configuration and deploys it to edge terminal devices, enabling real-time analysis of infusion status and abnormality warnings. The model has been meticulously optimized in terms of structural parameters, balancing recognition performance and resource adaptability, and can efficiently process multimodal infusion data from edge devices. After deployment, the model can be inferred directly on the local terminal without relying on a remote server, significantly improving warning response speed and system independence, making it suitable for real-time monitoring needs in clinical scenarios.
[0122] In this embodiment, the S7 specifically includes:
[0123] S71. Analyze the abnormal infusion warning result set output after deployment to obtain the abnormal risk score value S of each monitored object at each moment. i And the corresponding warning type label L i ;
[0124] S72. For each monitored object, according to the risk score S i and the preset risk threshold θ risk After comparison, if the risk score is greater than or equal to the preset risk threshold, it is determined to be an abnormal risk event;
[0125] S73, according to the corresponding warning type label L i , identify the specific types of infusion abnormalities, including blockage, leakage, abnormal drip rate, liquid depletion, bubbles, needle detachment, hanging abnormality, drip bucket abnormality, tube detachment, illegal operation and equipment failure, and record the identification results as Type i ;
[0126] S74, for all abnormal risk events, according to Type i Determine the type of anomaly, trigger the corresponding warning operation, and generate warning information, which includes the monitoring object number, risk score value, anomaly type and occurrence time;
[0127] S75. The generated warning information is outputted through the display interface, sound alarm and wireless communication of the edge terminal device, so as to realize automatic identification of the abnormal type of infusion and trigger real-time warning.
[0128] The present invention analyzes the infusion anomaly warning results output by the deployed model, extracts the anomaly risk score and warning type label, and achieves precise identification and classification of various types of anomalies during the infusion process. The system makes anomaly determinations based on the risk score and set thresholds, and identifies specific anomaly types such as blockage, air leakage, and fluid depletion, thereby triggering an early warning response containing detailed information. The early warning information is output through edge terminal devices in the form of interface prompts, audio and visual signals, and wireless communication, achieving multi-channel real-time early warning, improving the accuracy and response efficiency of infusion anomaly identification, and enhancing the intelligence level of the clinical monitoring system.
[0129] Example 1:
[0130] To verify the feasibility of this invention, we applied it to the intelligent infusion management system in the surgical ward of a general hospital. This ward has 60 beds, with an average of 45 patients receiving infusions daily. The infusion scenarios are complex, and common anomalies include infusion blockages, fluid leakage, and abnormal infusion rates. Traditional manual inspections are subject to missed detections, delayed responses, and misjudgments. Therefore, an efficient, intelligent, and automated solution for identifying and warning of infusion anomalies is urgently needed.
[0131] In actual application, all infusion terminals in the ward are equipped with multimodal sensors that can collect multi-dimensional infusion process data including drip rate, liquid level, pressure, temperature, etc. The data collected by all sensors are first standardized to form a set of multimodal standardized infusion state vectors. Subsequently, these data are input into a deep learning model based on the attention mechanism. The model can automatically focus on the most discriminative features and accurately identify various types of infusion anomalies. Based on the resource consumption of the model on different edge devices and the actual deployment environment, the model structure parameters are adaptively optimized through the imperial competition algorithm, and new structural candidate solutions are continuously formed. In the evolutionary process, a resource-aware mechanism is introduced to fully consider the memory and computing power constraints of edge devices. Finally, the system automatically evaluates the comprehensive fitness of all candidate solutions and selects the structure with the highest score for actual deployment.
[0132] During 30 consecutive days of actual operation, the system monitored a total of 1,350 infusion cases in the ward and recorded a total of 98 abnormal events, including 45 cases of blockage, 22 cases of leakage, and 31 cases of speed abnormalities. Comparing traditional manual inspections with the intelligent monitoring method of the present invention, the average response time for traditional inspections to detect abnormalities is 12.5 minutes, while the average response time of the system of the present invention is 2.3 minutes, which greatly improves the timeliness of abnormal handling. The anomaly detection accuracy of the intelligent system reaches 96.8%, and the false alarm rate is only 1.0%, which is significantly better than the 86.4% and 7.5% of traditional methods. In addition, the attention mechanism model optimized by the imperial competition algorithm has an average running memory usage of 87MB on the edge terminal, and the average delay in processing a single piece of data is 0.65 seconds, which can meet the requirements of real-time and resource constraints.
[0133] This application effectively addresses the issues of traditional infusion anomaly monitoring, which relies on manual labor, is inefficient, and has a high rate of false alarms and missed alerts. It enables real-time, accurate identification and automatic early warning of multiple types of infusion anomalies. Since the system's implementation, the proactive and timely response of medical staff to anomalies has been significantly improved, the safety risks of infusions for patients have been significantly reduced, and the overall quality of medical services in wards has been improved.
[0134] The following table shows a comparison of key performances in actual operation of the ward before and after the implementation of the present invention:
[0135] Table 1 Performance comparison between the intelligent infusion abnormality monitoring system and the traditional patrol method
[0136]
[0137]
[0138] As can be seen from the above table, the infusion anomaly monitoring and early warning method based on the imperial competition algorithm and attention mechanism proposed in the present invention has achieved significant improvements in multiple core performance indicators in actual clinical infusion scenarios compared to traditional patrol methods. First, in terms of anomaly detection accuracy, the system of the present invention achieved 96.8%, far higher than the 86.4% of traditional manual patrols. This improvement fully demonstrates that through the fusion of multimodal data and the feature focus of the attention mechanism, the present invention can more comprehensively and sensitively capture multiple types of abnormal signals in the infusion process, effectively reducing the risk of missed detection and misjudgment.
[0139] Secondly, in terms of the timeliness of responding to abnormal events, the system's average response time is only 2.3 minutes, which is more than 80% shorter than the 12.5 minutes required for manual inspections, significantly improving the efficiency of medical staff in handling infusion anomalies. Rapid response not only helps reduce patient risks, but also significantly reduces the workload of medical staff. At the same time, the system's abnormal omission rate and false alarm rate are 1.0% and 2.2% respectively, both significantly better than the data from traditional methods, indicating that the present invention can achieve a higher level of abnormal event coverage with lower false alarm interference, thereby improving the credibility and practicality of the alarm.
[0140] In terms of system resource consumption, the attention mechanism model optimized using the Imperial Competition algorithm consumes only 87MB of average memory on edge devices, and the average processing latency for a single piece of data is 0.65 seconds, fully meeting the dual requirements of computing resources and real-time performance for edge deployment. This result reflects that this invention not only pursues accurate recognition but also takes into account the practical constraints of limited device resources in practical application environments.
[0141] Furthermore, the system of the present invention scored 4.8 out of 5 in terms of medical staff satisfaction, significantly higher than the 3.7 of traditional inspections, indicating that the intelligent and automated monitoring and early warning functions have greatly improved the actual experience of medical staff and strengthened their trust and reliance on new technologies. Overall, the present invention has achieved breakthroughs in multimodal data collection, intelligent identification, efficient resource utilization, and user experience, demonstrating a broad prospect for the application of intelligent medical care.
[0142] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with the technical field, within the technical scope disclosed by the present invention, who makes equivalent replacements or changes based on the technical solution and inventive concept of the present invention, should be covered by the scope of protection of the present invention.
Claims
1. A method for real-time monitoring of infusion status and abnormal warning based on attention mechanism, characterized in that: The steps include: S1. Collecting multimodal infusion state data during the infusion process and performing normalization processing to obtain a multimodal standardized infusion state vector set; S2. Input the multimodal standardized infusion state vector set into the attention mechanism model and output the infusion abnormality warning result set; S3. Construct a joint fitness function based on the classification accuracy index in the infusion abnormality warning result set and the resource consumption index of the attention mechanism model during operation; S4. Use the imperial competition algorithm to optimize the structural parameters of the attention mechanism model to form a set of structural candidate countries. In the process of colony evolution, a resource-aware mechanism is introduced to integrate edge deployment constraints to obtain a set of structural candidate solutions. S5. Based on the joint fitness function, the adaptability of each candidate structure solution in the candidate structure solution set is evaluated to obtain the optimal structure configuration; S6. Apply the optimal structural configuration to the attention mechanism model to build a deployable real-time infusion monitoring model. The real-time infusion monitoring model is deployed to edge terminal devices, and a set of infusion abnormality warning results is output after deployment. S7. Perform infusion abnormality type identification and warning triggering operations based on the risk score value and warning type label in the infusion abnormality warning result set after deployment.
2. The method for real-time monitoring and abnormal warning of infusion status based on attention mechanism according to claim 1 is characterized in that: The multimodal standardized infusion state vector set includes image modality standardized data and numerical modality standardized data; the image modality standardized data includes standardized image data reflecting the liquid level state of the infusion bottle, and the numerical modality standardized data includes infusion flow rate standardized data, infusion pressure standardized data, infusion temperature standardized data and infusion conductivity standardized data.
3. The method for real-time monitoring and abnormal warning of infusion status based on attention mechanism according to claim 1 is characterized in that: The S2 specifically includes: S21, inputting the multimodal standardized infusion state vector set into an attention mechanism model, wherein the attention mechanism model includes an image modality feature extraction network, a numerical modality state encoding network, a cross-modality attention fusion module, and a classification network; S22, inputting each vector in the multimodal standardized infusion state vector set into an image modality feature extraction network to obtain an image modality feature vector; S23, inputting each vector in the multimodal standardized infusion state vector set into a numerical modal state encoding network to obtain a numerical modal feature vector; S24, inputting the image modality feature vector and the numerical modality feature vector into the cross-modality attention fusion module, performing feature weight assignment and fusion on the two through the attention mechanism, and obtaining a fused feature vector; S25. Input all fused feature vectors into the classification network, perform discrimination processing on the fused feature vectors, and output a set of abnormal infusion warning results.
4. The method for real-time monitoring and abnormal warning of infusion status based on attention mechanism according to claim 3 is characterized in that: The S25 specifically includes: S251. Input the time series fusion feature vectors into a classification network in sequence, where the classification network includes at least one fully connected layer and an output layer; S252, input the fused feature vector at each moment into the fully connected layer, perform a linear transformation on the fused feature vector and the weight matrix, and add a bias vector to obtain the corresponding output vector; S253, performing activation function processing on the output vector at each moment, and obtaining an abnormal warning probability vector at the corresponding moment by applying the activation function to the output vector; S254: Perform threshold determination on the abnormal warning probability vector at each moment. When the abnormal warning probability is greater than or equal to the preset threshold, it is determined to be abnormal; otherwise, it is determined to be normal, and an infusion abnormality warning result for the corresponding moment is generated. S255. Summarize the abnormal infusion warning results at all times and output an abnormal infusion warning result set.
5. The method for real-time monitoring and abnormal warning of infusion status based on attention mechanism according to claim 1 is characterized in that: The S3 specifically includes: S31, comparing the infusion abnormality warning result set with the real label, and counting the number of true positive examples TP, the number of true negative examples TN, the number of false positive examples FP, and the number of false negative examples FN; S32, using the sum of the number of true positive examples TP and the number of true negative examples TN as the numerator, and the sum of the number of true positive examples TP, the number of true negative examples TN, the number of false positive examples FP, and the number of false negative examples FN as the denominator, to calculate the classification accuracy index Acc; S33. Obtain a resource consumption index R of the attention mechanism model during operation, where the resource consumption index includes computing resource consumption and storage resource consumption of the attention mechanism model; S34. Construct a joint fitness function, and perform a weighted combination of the classification accuracy index and the resource consumption index, wherein the numerical value of the classification accuracy index is multiplied by the first weight coefficient α, the number of floating-point operations required for forward reasoning of the attention mechanism model and the total number of model parameters are normalized, and multiplied by the second weight coefficient β1 and the third weight coefficient β1 respectively. Finally, the weighted results of the two are subtracted from the weighted accuracy to obtain the joint fitness function Fit.
6. The method for real-time monitoring and abnormal warning of infusion status based on attention mechanism according to claim 1 is characterized in that: The S4 specifically includes: S41. Using the structural parameters of the current attention mechanism model as the initial empire, construct a set of candidate structural countries C = {C1, C2, ..., C i ,…,C n }, where C i represents the i-th structural candidate country, and n is the number of structural candidate countries; S42. For each structure candidate country in the structure candidate country set C, calculate the joint fitness of the structure candidate country using the joint fitness function; S43. Based on joint fitness, the set of structural candidate countries is divided into empires and assigned to them, forming several empires. Each empire contains a sovereign country and several colonies. In each empire, the structural candidate country with the highest joint fitness is called the sovereign country, and other structural candidate countries belonging to a certain empire and with a lower joint fitness than the sovereign country are called colonies. S44. For each colony within the empire, the structural parameters of the colony are iteratively updated by simulating the "attraction-repulsion" process. A resource-aware mechanism is introduced in each iteration, using the normalized values of FLOPs and Params as edge deployment constraints to limit the direction and magnitude of structural parameter adjustments. S45, repeat steps S42 to S44 until the number of evolution iterations reaches the preset maximum number of iterations T max Or the number of empires is reduced to the minimum number of empires N min , forming a set of candidate structural solutions S = {S1, S2, ..., S m }, where each structural candidate solution consists of a set of structural parameters of the attention mechanism model and the joint fitness corresponding to the structural parameters.
7. The method for real-time monitoring of infusion status and abnormal warning based on attention mechanism according to claim 6 is characterized in that: The S44 specifically includes: S441. For each colony within the empire, adjust the current structural parameters in the direction of the current structural parameters of the mother country. Specifically, at each iteration, multiply the difference between the mother country's structural parameters and the colony's structural parameters by the step size factor γ and the random weight rand, and then add it to the colony's current structural parameters. S442. After each update of the colony structure parameters, the updated structure parameters are tested using the resource-aware constraint mechanism. The resource-aware constraint mechanism calculates the computational load and parameter load of the updated model and performs normalization processing, requiring that the normalized computational load does not exceed the preset maximum normalized computational load threshold η. FLOPs , the normalized parameter value does not exceed the preset maximum normalized parameter value threshold η Params ; S443. If the updated colony structure parameters fail to meet the resource awareness constraints, the structure parameters are adjusted accordingly based on the deployment requirements of the edge devices; S444. Repeat steps S441 to S443 until the structural parameters of all colonies have completed this round of update.
8. The method for real-time monitoring of infusion status and abnormality early warning based on attention mechanism according to claim 1 is characterized in that: The optimal structural configuration refers to a structural candidate solution that satisfies the resource-aware constraint mechanism and has the largest joint fitness in the set of structural candidate solutions.
9. The method for real-time monitoring and abnormal warning of infusion status based on attention mechanism according to claim 1, characterized in that: The S6 specifically includes: S61. According to the optimal structural configuration, set the structural parameters of each layer of the attention mechanism model, including the number of layers, the number of channels per layer, the number of attention heads, and the number of hidden units, to build a real-time infusion monitoring model; S62: Export the constructed real-time infusion monitoring model in the form of a model file, and transmit the real-time infusion monitoring model file to the edge terminal device via wired or wireless means; S63. Load a real-time infusion monitoring model on the edge terminal device, collect and preprocess infusion status data in real time, and obtain a preprocessed infusion state vector; S64. Input the pre-processed infusion state vector into the real-time infusion monitoring model, and output a set of post-deployment infusion abnormality warning results.
10. The method for real-time monitoring and abnormal warning of infusion status based on attention mechanism according to claim 1, characterized in that: The S7 specifically includes: S71. Analyze the abnormal infusion warning result set output after deployment to obtain the abnormal risk score value S of each monitored object at each moment. i And the corresponding warning type label L i ; S72. For each monitored object, according to the risk score S i and the preset risk threshold θ risk After comparison, if the risk score is greater than or equal to the preset risk threshold, it is determined to be an abnormal risk event; S73, according to the corresponding warning type label L i , identify the specific types of infusion abnormalities, including blockage, leakage, abnormal drip rate, liquid depletion, bubbles, needle detachment, hanging abnormality, drip bucket abnormality, tube detachment, illegal operation and equipment failure, and record the identification results as Type i ; S74, for all abnormal risk events, according to Type i Determine the type of anomaly, trigger the corresponding warning operation, and generate warning information, which includes the monitoring object number, risk score value, anomaly type and occurrence time; S75. Output the generated warning information through the display interface, sound alarm and wireless communication of the edge terminal device.