Medicine cabinet operation state abnormity early warning method based on deep learning
The method for monitoring the operating status of medicine cabinets using deep learning and dynamic graph convolutional neural networks solves the problem of difficult identification of hidden anomalies in the monitoring of medicine cabinet operating status. It realizes real-time, accurate and fine-grained anomaly early warning of medicine cabinet operating status, and improves the operation and maintenance efficiency and safety of medicine cabinets.
Patent Information
- Application Number
- CN202511871471.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-11
- Publication Date
- 2026-03-03
AI Technical Summary
Existing methods for monitoring the operational status of medicine cabinets rely on manual experience or static rules, making it difficult to capture hidden anomalies under complex operating conditions in a timely manner. They also cannot perform joint analysis of multi-source operational data, leading to frequent false alarms and missed alarms, and lack fine-grained anomaly category determination.
A deep learning-based approach is adopted, utilizing multi-source operational data fusion modeling and dynamic graph convolutional neural networks. By improving the EvolveGCN model, features are extracted and anomaly scores and category labels are generated to achieve real-time detection and hierarchical early warning. The model is updated through incremental training to adapt to long-term operation.
It significantly improves the accuracy of identifying abnormal operating status of medicine cabinets and the timeliness of early warning, reduces the false alarm and missed alarm rates, and can distinguish environmental, structural action and safety abnormalities in a fine-grained manner, thereby improving the pertinence and safety of medicine cabinet operation and maintenance.
Smart Images

Figure CN121601188A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent medicine cabinet operation monitoring and fault early warning, and in particular to a method for early warning of abnormal operation status of medicine cabinets based on deep learning. Background Technology
[0002] With the continuous improvement of the intelligence level of medical scenarios such as hospitals and pharmacies, medicine cabinets have gradually evolved from traditional mechanical structures into intelligent medicine cabinets that integrate sensor monitoring, automatic opening and closing, identity recognition, and network management. Intelligent medicine cabinets play a crucial role in drug storage safety, compliance of medication procedures, and refined inventory management. The stability and security of their operation directly affect drug quality and clinical medication safety. Therefore, how to monitor the operating status of medicine cabinets in real time and provide reliable early warnings before anomalies occur has become a key focus in the current technological field.
[0003] In existing technologies, the monitoring methods for the operating status of medicine cabinets mainly fall into two categories: one relies primarily on manual inspection and experience-based judgment, where staff periodically check the cabinet's operation, record alarm information, and inspect the storage status of medicines to detect anomalies; the other is based on simple threshold alarms or rule engines using a limited number of sensor signals, such as setting fixed thresholds for single or a few indicators like temperature, humidity, motor current, and door lock status, triggering an alarm when the monitored value exceeds the threshold. These methods are simple to implement and low-cost, but they have significant limitations: first, they rely on manual experience or static rules, making it difficult to promptly capture hidden anomalies under complex operating conditions; second, they cannot perform joint analysis of multi-source operating data, easily leading to false alarms and missed alarms; and third, they lack detailed classification of anomaly categories, typically only providing a coarse-grained conclusion of "fault" or "alarm," failing to provide targeted basis for subsequent maintenance and safety management. Summary of the Invention
[0004] One objective of this invention is to propose a deep learning-based method for early warning of abnormal operating status of medicine cabinets. This invention fully utilizes multi-source operating data fusion modeling technology and dynamic graph convolutional neural network method. By improving the EvolveGCN model, it extracts features and fuses time series data on the dynamic correlation of multi-source data during the operation of the medicine cabinet, constructs an operating status representation vector, calculates the degree of state deviation, and generates anomaly scores and anomaly category identifiers. This enables real-time detection and hierarchical early warning of anomalies in the medicine cabinet environment, structural actions, and safety. It has the advantages of high anomaly identification accuracy, strong early warning timeliness, low false alarm and false negative rates, and continuous incremental model updates to adapt to long-term operation.
[0005] The method for early warning of abnormal operation status of medicine cabinet based on deep learning according to an embodiment of the present invention includes the following steps: Collect and preprocess multi-source operational data during the operation of the medicine cabinet; Feature encoding is performed on the preprocessed multi-source running data to generate feature sequences; By inputting the feature sequence into the improved EvolveGCN model and introducing a heterogeneous node evolution mechanism, a fused feature representation is obtained. A state representation vector of the medicine cabinet's operating status is generated based on the fusion feature representation, and the state representation vector is compared with a benchmark representation vector of the preset normal state to obtain the degree of deviation. The degree of deviation is segmented and mapped to intervals to generate an anomaly score for the current moment; A set of threshold values for judging anomaly categories is preset, and anomaly scores are judged to generate corresponding anomaly category identifiers; Based on anomaly category identifiers, early warning information is generated through anomaly category and early warning level mapping rules, forming an anomaly dataset; Incremental training of the improved EvolveGCN model was performed based on anomalous datasets and real-time running data, and the parameters of the improved EvolveGCN model were updated.
[0006] Optionally, the multi-source operational data includes environmental data, structural motion data, load data, and image data, and the preprocessing includes time alignment, format unification, outlier removal, and noise suppression.
[0007] Optionally, the generation of the feature sequence specifically includes: The environmental data in the preprocessed multi-source operational data is normalized and encoded to generate corresponding environmental feature vectors. The normalization encoding is to perform linear standardization processing on the temperature data in the environmental data according to the preset temperature mean and temperature standard deviation, and to perform linear standardization processing on the humidity data in the environmental data according to the preset humidity mean and humidity standard deviation. The preprocessed multi-source runtime data is combined into a structure action time sequence vector according to the time order. Trend encoding is performed on the load data in the preprocessed multi-source running data. The difference between the load data at the current time step and the load data at the previous time step is calculated. The difference is combined with the load data at the current time step to generate a load feature vector. The image data in the preprocessed multi-source running data is converted into a pixel matrix according to a fixed image width and image height. The pixel matrix is then normalized, and the normalized pixel matrix is flattened into an image feature vector in a preset order. The environmental feature vector, structural action time sequence vector, load feature vector, and image feature vector are combined according to a preset feature splicing rule to generate feature vectors for the corresponding time steps. The feature vectors of each time step are then arranged in chronological order to form a feature sequence.
[0008] Optionally, obtaining the fused feature representation specifically includes: The feature sequence is input into the improved EvolveGCN model, which includes a graph construction module, a dynamic graph structure adaptive evolution module, a temporal graph convolutional feature extraction module, and an anomaly representation and multi-channel scoring module. The graph construction module obtains a graph node set based on the feature sequence to form a graph structure sequence. The dynamic graph structure adaptive evolution module introduces a heterogeneous node evolution mechanism to obtain an updated graph structure sequence and updated graph convolutional weights. The temporal graph convolutional feature extraction module forms a graph-level feature representation sequence based on the updated graph structure sequence and updated graph convolutional weights. The anomaly representation and multi-channel scoring module aggregates and processes the graph-level temporal features to generate a fused feature representation. In the graph construction module, a set of graph nodes is obtained based on the sensors, actuators and cabinet components corresponding to each category of features in the feature sequence, and an edge set corresponding to each time step is constructed based on the relationship between multi-source operation data, forming a graph structure sequence arranged by time step. The construction process combines the physical connection relationship of the medicine cabinet with the dynamic correlation of multi-source operation data, and updates the connection relationship between nodes at each time step. In the dynamic graph structure adaptive evolution module, a heterogeneous node evolution mechanism is introduced. Based on the type of each node and the state information of the current time step, the edge set in the graph structure sequence is dynamically evolved. The dynamic evolution process calculates the association strength between each node and its neighboring nodes through the heterogeneous feature differences between nodes, and updates the edge weights by weighting. Based on the role change of each node in different time steps, the graph convolution weights associated with each node are adjusted to obtain the updated graph structure sequence and the updated graph convolution weights. In the temporal graph convolution feature extraction module, graph convolution operation is performed on the graph structure of each time step in the updated graph structure sequence. Based on the corresponding graph convolution weights, the node-level features of the time step are calculated, and the corresponding node-level features are processed in time order to form a graph-level feature representation sequence arranged in time steps. In the anomaly representation and multi-channel scoring module, the graph-level feature representation sequence is subjected to temporal aggregation processing to generate an aggregated feature vector. The aggregated feature vector is then subjected to feature transformation and channel mapping processing to combine the features output by the channels to form a fused feature representation.
[0009] Optionally, the determination of the degree of deviation specifically includes: The fused feature representation is vectorized to obtain the state representation vector of the current operating state of the medicine cabinet. The state representation vector refers to the feature vector obtained by vector mapping from the fused feature representation. Obtain the benchmark representation vector corresponding to the normal operating state of the medicine cabinet from the benchmark representation vector set of the preset normal operating state; The state representation vector is compared with the reference representation vector, and the deviation vector is obtained by calculating the difference vector between the state representation vector and the reference representation vector. The degree of deviation is calculated based on the vector norm of the deviation vector. The calculation process involves summing the squares of the deviation values of each dimension of the deviation vector and then taking the square root to obtain the degree of deviation.
[0010] Optionally, the generation of the anomaly score at the current moment specifically includes: The deviation degree is processed by segmented interval mapping, wherein the segmented interval mapping is based on a preset deviation degree interval, and the interval where the deviation degree is located is mapped to the intermediate abnormal score value. The intermediate anomaly score values of the time step are progressively compressed. The progressive compression process is to compress the score level of the intermediate anomaly score value to the target range according to the preset score level threshold, and to progressively adjust the compressed intermediate anomaly score value according to the order of the score level to obtain the normalized anomaly score value of the time step. An adaptive interval back-smoothing process is applied to the normalized anomaly score value at each time step. This process integrates the normalized anomaly score value with the normalized anomaly score value from the previous time step within the corresponding interval to obtain the anomaly score at the current time.
[0011] Optionally, the generation of the corresponding anomaly category identifier specifically includes: A set of pre-defined thresholds for determining anomaly categories, the set of thresholds including environmental anomaly thresholds, structural action anomaly thresholds, and safety anomaly thresholds; The anomaly scores at the current moment are compared step by step in descending order of threshold values to obtain anomaly category identifiers. The comparison process is as follows: when the anomaly score is greater than the safety anomaly boundary threshold, the anomaly category is identified as the safety anomaly category identifier; when the anomaly score is less than the safety anomaly boundary threshold but greater than the structural action anomaly boundary threshold, the anomaly category is identified as the structural action anomaly category identifier; when the anomaly score is less than the structural action anomaly boundary threshold but greater than the environmental anomaly boundary threshold, the anomaly category is identified as the environmental anomaly category identifier; and when the anomaly score is less than the environmental anomaly boundary threshold, the anomaly category is identified as the non-anomaly category identifier.
[0012] Optionally, the formation of the abnormal dataset specifically includes: Based on the anomaly category identifier, the warning level at the current moment is obtained according to the anomaly category and warning level mapping rule, and the warning level result corresponding one-to-one with the anomaly category identifier is obtained. The anomaly category and warning level mapping rule refers to assigning a warning level to each anomaly category. The equipment identifier, anomaly category identifier, warning level result, anomaly score, and status representation vector of the medicine cabinet are assembled into warning information according to the field structure. The warning information includes equipment field, anomaly category field, warning level field, anomaly score field, and status representation field. The warning message, the multi-source operational data corresponding to the current moment, the state representation vector, the anomaly score, and the anomaly category identifier are merged according to the sample structure to generate an anomaly sample dataset.
[0013] Optionally, the parameter update of the improved EvolveGCN model specifically includes: Acquire real-time multi-source operation data at the current moment, perform feature encoding processing on the real-time multi-source operation data, and obtain the feature sequence at the current moment; Extract historical feature sequences corresponding to abnormal samples from the abnormal dataset, and concatenate the historical feature sequences with the feature sequences at the current moment to form an incremental training input sequence. The incremental training input sequence is input into the improved EvolveGCN model for forward computation to obtain the fusion feature representation at the current time step, and anomaly category labels for incremental training samples are generated based on the fusion feature representation at the current time step. Annotated anomaly categories are extracted from the anomaly dataset as supervisory labels. The supervisory labels are paired with anomaly category identifiers for each sample, and the classification loss for each incremental training sample is calculated. The calculation process involves the improved EvolveGCN model outputting the anomaly category prediction result for each incremental training sample. Based on the supervisory labels, the prediction results are compared with the true labels according to the classification error measurement rules. All classification losses are accumulated to obtain the total incremental training loss, and the parameters of the improved EvolveGCN model are updated.
[0014] The beneficial effects of this invention are: This invention improves the EvolveGCN model by uniformly collecting, preprocessing, and feature-encoding multi-source operational data during the operation of a medicine cabinet. This data is then used to construct a feature sequence that evolves over time. The improved model can adaptively learn the dynamic relationships between various components, the environment, and operational behaviors of the medicine cabinet over time, thus obtaining a fusion feature representation with temporal consistency and global dependency characterization capabilities. Compared to existing solutions that rely on single indicator thresholds or static models, this invention can more comprehensively characterize the overall operational status of the medicine cabinet, significantly improve the ability to detect hidden anomalies under complex operating conditions, and reduce false alarms and missed alarms caused by isolated or correlated changes in data.
[0015] In terms of anomaly detection, this invention generates a state representation vector based on fused feature representation, compares it with a normal baseline representation vector to obtain the degree of deviation, then performs segmented interval mapping on the deviation degree to generate an anomaly score, and combines it with anomaly category judgment thresholds to achieve fine-grained differentiation between environmental anomalies, structural action anomalies, and safety anomalies. This improves the early warning result from a coarse-grained output of "whether it is abnormal" to a structured output of "anomaly degree + anomaly type". This not only improves the accuracy and interpretability of anomaly detection, but also enables the management terminal to take corresponding handling strategies according to different categories and degrees of anomalies, improving the pertinence and efficiency of medicine cabinet operation and maintenance and medication safety management.
[0016] Furthermore, this invention constructs and continuously updates an anomaly dataset while issuing early warnings. It then uses this dataset, along with real-time operational data, to incrementally train the improved EvolveGCN model. This allows model parameters to iteratively update as the operating environment, usage patterns, and fault types change, avoiding the performance degradation problem after model deployment in existing technologies. Through this closed-loop mechanism of "detection—early warning—sample accumulation—incremental learning," this invention possesses the adaptability for long-term stable operation and continuously improving early warning capabilities, comprehensively enhancing the reliability, real-time performance, and engineering feasibility of early warnings for abnormal operation status of medicine cabinets. Attached Figure Description
[0017] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is an overall flowchart of the deep learning-based early warning method for abnormal operation status of medicine cabinets proposed in this invention; Figure 2 This is a schematic diagram illustrating the construction of feature sequences for the deep learning-based early warning method for abnormal operation status of medicine cabinets proposed in this invention. Figure 3 This is a schematic diagram of the improved EvolveGCN model, which is based on deep learning for early warning of abnormal operation status of medicine cabinets, as proposed in this invention. Detailed Implementation
[0018] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0019] refer to Figures 1-3 A deep learning-based early warning method for abnormal operation status of medicine cabinets includes the following steps: Collect and preprocess multi-source operational data during the operation of the medicine cabinet; Feature encoding is performed on the preprocessed multi-source running data to generate feature sequences; By inputting the feature sequence into the improved EvolveGCN model and introducing a heterogeneous node evolution mechanism, a fused feature representation is obtained. A state representation vector of the medicine cabinet's operating status is generated based on the fusion feature representation, and the state representation vector is compared with a benchmark representation vector of the preset normal state to obtain the degree of deviation. The degree of deviation is segmented and mapped to intervals to generate an anomaly score for the current moment; A set of threshold values for judging anomaly categories is preset, and anomaly scores are judged to generate corresponding anomaly category identifiers; Based on anomaly category identifiers, early warning information is generated through anomaly category and early warning level mapping rules, forming an anomaly dataset; Incremental training of the improved EvolveGCN model was performed based on anomalous datasets and real-time running data, and the parameters of the improved EvolveGCN model were updated.
[0020] In this embodiment, the multi-source operational data includes environmental data, structural motion data, load data, and image data, and the preprocessing includes time alignment, format unification, outlier removal, and noise suppression.
[0021] In this embodiment, the generation of the feature sequence specifically includes: The environmental data in the preprocessed multi-source operational data is normalized and encoded to generate corresponding environmental feature vectors. The normalization encoding is to perform linear standardization processing on the temperature data in the environmental data according to the preset temperature mean and temperature standard deviation, and to perform linear standardization processing on the humidity data in the environmental data according to the preset humidity mean and humidity standard deviation. The preprocessed multi-source runtime data is combined into a structure action time sequence vector according to the time order. Trend encoding is performed on the load data in the preprocessed multi-source running data. The difference between the load data at the current time step and the load data at the previous time step is calculated. The difference is combined with the load data at the current time step to generate a load feature vector. The image data in the preprocessed multi-source running data is converted into a pixel matrix according to a fixed image width and image height. The pixel matrix is then normalized, and the normalized pixel matrix is flattened into an image feature vector in a preset order. The environmental feature vector, structural action time sequence vector, load feature vector, and image feature vector are combined according to a preset feature splicing rule to generate feature vectors for the corresponding time steps. The feature vectors of each time step are then arranged in chronological order to form a feature sequence.
[0022] In this embodiment, obtaining the fusion feature representation specifically includes: The feature sequence is input into the improved EvolveGCN model, which includes a graph construction module, a dynamic graph structure adaptive evolution module, a temporal graph convolutional feature extraction module, and an anomaly representation and multi-channel scoring module. The graph construction module obtains a graph node set based on the feature sequence to form a graph structure sequence. The dynamic graph structure adaptive evolution module introduces a heterogeneous node evolution mechanism to obtain an updated graph structure sequence and updated graph convolutional weights. The temporal graph convolutional feature extraction module forms a graph-level feature representation sequence based on the updated graph structure sequence and updated graph convolutional weights. The anomaly representation and multi-channel scoring module aggregates and processes the graph-level temporal features to generate a fused feature representation. In the graph construction module, a set of graph nodes is obtained based on the sensors, actuators and cabinet components corresponding to each category of features in the feature sequence, and an edge set corresponding to each time step is constructed based on the relationship between multi-source operation data, forming a graph structure sequence arranged by time step. The construction process combines the physical connection relationship of the medicine cabinet with the dynamic correlation of multi-source operation data, and updates the connection relationship between nodes at each time step. In the dynamic graph structure adaptive evolution module, a heterogeneous node evolution mechanism is introduced. Based on the type of each node and the state information of the current time step, the edge set in the graph structure sequence is dynamically evolved. The dynamic evolution process calculates the association strength between each node and its neighboring nodes through the heterogeneous feature differences between nodes, and updates the edge weights by weighting. Based on the role change of each node in different time steps, the graph convolution weights associated with each node are adjusted to obtain the updated graph structure sequence and the updated graph convolution weights. In the temporal graph convolution feature extraction module, graph convolution operation is performed on the graph structure of each time step in the updated graph structure sequence. Based on the corresponding graph convolution weights, the node-level features of the time step are calculated, and the corresponding node-level features are processed in time order to form a graph-level feature representation sequence arranged in time steps. In the anomaly representation and multi-channel scoring module, the graph-level feature representation sequence is subjected to temporal aggregation processing to generate an aggregated feature vector. The aggregated feature vector is then subjected to feature transformation and channel mapping processing to combine the features output by the channels to form a fused feature representation.
[0023] In this embodiment, obtaining the degree of deviation specifically includes: The fused feature representation is vectorized to obtain the state representation vector of the current operating state of the medicine cabinet. The state representation vector refers to the feature vector obtained by vector mapping from the fused feature representation. Obtain the benchmark representation vector corresponding to the normal operating state of the medicine cabinet from the benchmark representation vector set of the preset normal operating state; The state representation vector is compared with the reference representation vector, and the deviation vector is obtained by calculating the difference vector between the state representation vector and the reference representation vector. The degree of deviation is calculated based on the vector norm of the deviation vector. The calculation process involves summing the squares of the deviation values of each dimension of the deviation vector and then taking the square root to obtain the degree of deviation.
[0024] In this embodiment, the generation of the anomaly score at the current moment specifically includes: The deviation degree is processed by segmented interval mapping, wherein the segmented interval mapping is based on a preset deviation degree interval, and the interval where the deviation degree is located is mapped to the intermediate abnormal score value. The intermediate anomaly score values of the time step are progressively compressed. The progressive compression process is to compress the score level of the intermediate anomaly score value to the target range according to the preset score level threshold, and to progressively adjust the compressed intermediate anomaly score value according to the order of the score level to obtain the normalized anomaly score value of the time step. An adaptive interval back-smoothing process is applied to the normalized anomaly score value at each time step. This process integrates the normalized anomaly score value with the normalized anomaly score value from the previous time step within the corresponding interval to obtain the anomaly score at the current time.
[0025] In this embodiment, the generation of the corresponding anomaly category identifier specifically includes: A set of pre-defined thresholds for determining anomaly categories, the set of thresholds including environmental anomaly thresholds, structural action anomaly thresholds, and safety anomaly thresholds; The anomaly scores at the current moment are compared step by step in descending order of threshold values to obtain anomaly category identifiers. The comparison process is as follows: when the anomaly score is greater than the safety anomaly boundary threshold, the anomaly category is identified as the safety anomaly category identifier; when the anomaly score is less than the safety anomaly boundary threshold but greater than the structural action anomaly boundary threshold, the anomaly category is identified as the structural action anomaly category identifier; when the anomaly score is less than the structural action anomaly boundary threshold but greater than the environmental anomaly boundary threshold, the anomaly category is identified as the environmental anomaly category identifier; and when the anomaly score is less than the environmental anomaly boundary threshold, the anomaly category is identified as the non-anomaly category identifier.
[0026] In this embodiment, the formation of the abnormal dataset specifically includes: Based on the anomaly category identifier, the warning level at the current moment is obtained according to the anomaly category and warning level mapping rule, and the warning level result corresponding one-to-one with the anomaly category identifier is obtained. The anomaly category and warning level mapping rule refers to assigning a warning level to each anomaly category. The equipment identifier, anomaly category identifier, warning level result, anomaly score, and status representation vector of the medicine cabinet are assembled into warning information according to the field structure. The warning information includes equipment field, anomaly category field, warning level field, anomaly score field, and status representation field. The warning message, the multi-source operational data corresponding to the current moment, the state representation vector, the anomaly score, and the anomaly category identifier are merged according to the sample structure to generate an anomaly sample dataset.
[0027] In this embodiment, the updating of parameters in the improved EvolveGCN model specifically includes: Acquire real-time multi-source operation data at the current moment, perform feature encoding processing on the real-time multi-source operation data, and obtain the feature sequence at the current moment; Extract historical feature sequences corresponding to abnormal samples from the abnormal dataset, and concatenate the historical feature sequences with the feature sequences at the current moment to form an incremental training input sequence. The incremental training input sequence is input into the improved EvolveGCN model for forward computation to obtain the fusion feature representation at the current time step, and anomaly category labels for incremental training samples are generated based on the fusion feature representation at the current time step. Annotated anomaly categories are extracted from the anomaly dataset as supervisory labels. The supervisory labels are paired with anomaly category identifiers for each sample, and the classification loss for each incremental training sample is calculated. The calculation process involves the improved EvolveGCN model outputting the anomaly category prediction result for each incremental training sample. Based on the supervisory labels, the prediction results are compared with the true labels according to the classification error measurement rules. All classification losses are accumulated to obtain the total incremental training loss, and the parameters of the improved EvolveGCN model are updated.
[0028] Example 1: In a smart medicine cabinet operation scenario in the inpatient pharmacy of a top-tier hospital, multiple networked smart medicine cabinets are installed for the zoned storage and automatic dispensing of high-value drugs, psychotropic drugs, and routine oral medications. The cabinets feature constant temperature and humidity control, door lock motor drive, drawer / layer positioning, identification, inventory weighing, camera recording, and operation log recording. During frequent medication retrieval, replenishment, and inventory checks, the cabinets continuously generate multi-source operational data, including environmental data, structural motion data, and safety and behavioral data. The usage time by pharmacists and nurses spans day and night shifts and holidays; due to significant variations in usage intensity and environment, the cabinet operation exhibits strong temporality and strong coupling.
[0029] In this scenario, the hospital's existing medicine cabinet alarm methods are mainly based on single sensor thresholds and fixed rules, such as triggering alarms when temperature and humidity exceed fixed thresholds, door locks are left open for an extended period, or motor current exceeds limits. However, in actual operation, there have been numerous instances of "hidden anomalies being missed or frequently false alarms," such as continuous cabinet opening during peak ward periods leading to slight motor aging, intermittent incomplete door closing caused by door lock rebound, slow local humidity drift caused by switching air conditioning modes at night, and abnormal cabinet opening procedures caused by human error. These anomalies are often not sudden changes in a single indicator, but rather a gradual deviation in the relationship between multiple data sources over time, making it difficult for the original static rules to detect them in a timely manner, resulting in maintenance delays or frequent false alarms that affect normal medication use.
[0030] After the method of this invention is deployed on the pharmacy cabinet, the cabinet controller and management terminal collect the aforementioned multi-source operational data at a preset frequency. The collected data undergoes time synchronization, outlier removal, missing value completion, and normalization preprocessing. The preprocessed data is converted into a feature sequence that can be input into the model through a feature encoding module. For example, the door lock opening and closing status, drawer displacement sequence, and motor current waveform are windowed and encoded; slow variables such as temperature and humidity are aligned according to time steps; and identity / authority and log events are encoded as discrete features and concatenated with continuous features. Subsequently, the feature sequence is input into the improved EvolveGCN model. The model uses cabinet components and sensing objects as nodes, and the dependencies between components and environment, components and components, and behavior and components as edges. It updates node relationships and model weights in the time dimension through a dynamic graph structure adaptive evolution mechanism to obtain a fused feature representation at each time step. Based on this fused feature representation, an operational state representation vector is generated and compared with the corresponding normal baseline representation vector to obtain the degree of deviation. The deviation degree is mapped to an anomaly score through segmented intervals. The anomaly score is then judged based on anomaly category boundary thresholds, outputting an environmental anomaly, structural action anomaly, safety anomaly, or non-anomaly category identifier. The system generates early warning information based on the anomaly category identifier and pushes it to the management terminal, while simultaneously writing the corresponding data at the current moment into the anomaly dataset. The management terminal displays, records, and traces the early warnings, allowing maintenance personnel to pinpoint the source of the anomaly. The continuously accumulated anomaly dataset, along with real-time operational data, is used for incremental training of the improved EvolveGCN model, updating model parameters and enabling the model to gradually adapt to cabinet wear, environmental changes, and adjustments in usage habits.
[0031] To verify the beneficial effects of this invention, it was continuously operated in the pharmacy for three months. The first month used the existing threshold / rule-based alarm method as a control; the second and third months adopted the method of this invention, with incremental training performed weekly based on newly added abnormal data. The hospital's equipment department and information technology department jointly labeled and verified real abnormal events in the medicine cabinets, including three types of anomalies: environmental anomalies, structural motion anomalies, and safety anomalies. Statistical results showed that this invention significantly outperformed the control method in multi-source temporal correlation modeling and fine-grained early warning, especially in the early detection of hidden anomalies and the control of false alarms.
[0032] Table 1. Comparison of Early Warning Effects for Medicine Cabinets
[0033] As can be seen from the data in Table 1, the detection and early warning capabilities of this invention in real-world scenarios are significantly superior to the control method. Firstly, regarding anomaly coverage and false negatives, the control method identified 142 actual anomalies in the first month through manual review, but only 96 were detected, resulting in a false negative rate of approximately one-third. In contrast, the invention identified a total of 301 actual anomalies in the second and third months, detecting 279, with only 22 false negatives. The number of false negatives decreased from 46 to 22, a reduction of 52.2%. Correspondingly, the recall rate increased from 67.6% to 92.7%, an improvement of 25.1 percentage points, indicating that this invention can significantly reduce the number of undetected anomalies.
[0034] Secondly, regarding false alarm control, the control method resulted in 71 false alarms, leading to an average of 88 manual reviews per month. The false alarms from this invention decreased to 29, a reduction of 59.2%, and the number of manual reviews also decreased to 31 per month, a reduction of 64.8%. This also significantly improved the detection accuracy, with Precision increasing from 57.5% to 90.6%, an increase of 33.1 percentage points. This means that most of the warnings triggered by this invention can be confirmed as genuine anomalies.
[0035] The comprehensive performance indicators further prove this point: the control method F1 has a success rate of only 62.1%, while the present invention reaches 91.6%, an increase of 29.5 percentage points. This shows that the present invention not only "finds more" but also "finds more accurately," and does not lead to an increase in false alarms while improving sensitivity.
[0036] At the anomaly type level, this invention significantly improves the recall rate for all three types of anomalies. The recall rate for environmental anomalies increased from 61.2% to 91.3%, an improvement of 30.1 percentage points; the recall rate for structural action anomalies increased from 69.8% to 93.5%, an improvement of 23.7 percentage points; and the recall rate for safety anomalies increased from 72.5% to 94.1%, an improvement of 21.6 percentage points. This demonstrates that this invention possesses stable identification capabilities for slowly changing environmental anomalies, gradual structural changes, and safety behavior anomalies, rather than being effective only for one type of anomaly.
[0037] Finally, regarding the value of early warning and operational benefits, the average early warning lead time of this invention increased from 3.8 minutes to 18.5 minutes, an improvement of 14.7 minutes. This allows the equipment department to intervene before anomalies develop into significant faults, directly reflected in a reduction of the average monthly maintenance response time from 6.4 hours / item to 3.1 hours / item, a reduction of 51.6%. In other words, this invention not only improves detection indicators but also transforms early warning into quantifiable improvements in operational efficiency and risk reduction. Overall results demonstrate that this invention achieves comprehensive benefits in real-world hospital pharmacy cabinet scenarios, including "fewer missed reports, lower false alarms, more accurate classification, earlier early warnings, and faster maintenance."
Claims
1. A method for early warning of abnormal operating status of medicine cabinets based on deep learning, characterized in that, Includes the following steps: Collect and preprocess multi-source operational data during the operation of the medicine cabinet; Feature encoding is performed on the preprocessed multi-source running data to generate feature sequences; By inputting the feature sequence into the improved EvolveGCN model and introducing a heterogeneous node evolution mechanism, a fused feature representation is obtained. A state representation vector of the medicine cabinet's operating status is generated based on the fusion feature representation, and the state representation vector is compared with a benchmark representation vector of the preset normal state to obtain the degree of deviation. The degree of deviation is segmented and mapped to intervals to generate an anomaly score for the current moment; A set of threshold values for judging anomaly categories is preset, and anomaly scores are judged to generate corresponding anomaly category identifiers; Based on anomaly category identifiers, early warning information is generated through anomaly category and early warning level mapping rules, forming an anomaly dataset; Incremental training of the improved EvolveGCN model was performed based on anomalous datasets and real-time running data, and the parameters of the improved EvolveGCN model were updated.
2. The method for early warning of abnormal operation status of medicine cabinet based on deep learning according to claim 1, characterized in that, The multi-source operational data includes environmental data, structural motion data, load data, and image data. The preprocessing includes time alignment, format unification, outlier removal, and noise suppression.
3. The method for early warning of abnormal operation status of medicine cabinet based on deep learning according to claim 1, characterized in that, The generation of the feature sequence specifically includes: The environmental data in the preprocessed multi-source operational data is normalized and encoded to generate corresponding environmental feature vectors. The normalization encoding is to perform linear standardization processing on the temperature data in the environmental data according to the preset temperature mean and temperature standard deviation, and to perform linear standardization processing on the humidity data in the environmental data according to the preset humidity mean and humidity standard deviation. The preprocessed multi-source runtime data is combined into a structure-action time-series vector according to the time order of the structure-action data. Trend encoding is performed on the load data in the preprocessed multi-source running data. The difference between the load data at the current time step and the load data at the previous time step is calculated. The difference is combined with the load data at the current time step to generate a load feature vector. The image data in the preprocessed multi-source running data is converted into a pixel matrix according to a fixed image width and image height. The pixel matrix is then normalized, and the normalized pixel matrix is flattened into an image feature vector in a preset order. The environmental feature vector, structural action time sequence vector, load feature vector, and image feature vector are combined according to a preset feature splicing rule to generate feature vectors for the corresponding time steps. The feature vectors of each time step are then arranged in chronological order to form a feature sequence.
4. The method for early warning of abnormal operation status of medicine cabinet based on deep learning according to claim 1, characterized in that, The fusion feature representation is obtained specifically by: The feature sequence is input into the improved EvolveGCN model, which includes a graph construction module, a dynamic graph structure adaptive evolution module, a temporal graph convolutional feature extraction module, and an anomaly representation and multi-channel scoring module. The graph construction module obtains a graph node set based on the feature sequence to form a graph structure sequence. The dynamic graph structure adaptive evolution module introduces a heterogeneous node evolution mechanism to obtain an updated graph structure sequence and updated graph convolutional weights. The temporal graph convolutional feature extraction module forms a graph-level feature representation sequence based on the updated graph structure sequence and updated graph convolutional weights. The anomaly representation and multi-channel scoring module aggregates and processes the graph-level temporal features to generate a fused feature representation. In the graph construction module, a set of graph nodes is obtained based on the sensors, actuators and cabinet components corresponding to each category of features in the feature sequence, and an edge set corresponding to each time step is constructed based on the relationship between multi-source operation data, forming a graph structure sequence arranged by time step. The construction process combines the physical connection relationship of the medicine cabinet with the dynamic correlation of multi-source operation data, and updates the connection relationship between nodes at each time step. In the dynamic graph structure adaptive evolution module, a heterogeneous node evolution mechanism is introduced. Based on the type of each node and the state information of the current time step, the edge set in the graph structure sequence is dynamically evolved. The dynamic evolution process calculates the association strength between each node and its neighboring nodes through the heterogeneous feature differences between nodes, and updates the edge weights by weighting. Based on the role change of each node in different time steps, the graph convolution weights associated with each node are adjusted to obtain the updated graph structure sequence and the updated graph convolution weights. In the temporal graph convolution feature extraction module, graph convolution operation is performed on the graph structure of each time step in the updated graph structure sequence. Based on the corresponding graph convolution weights, the node-level features of the time step are calculated, and the corresponding node-level features are processed in time order to form a graph-level feature representation sequence arranged in time steps. In the anomaly representation and multi-channel scoring module, the graph-level feature representation sequence is subjected to temporal aggregation processing to generate an aggregated feature vector. The aggregated feature vector is then subjected to feature transformation and channel mapping processing to combine the features output by the channels to form a fused feature representation.
5. The method for early warning of abnormal operation status of medicine cabinet based on deep learning according to claim 1, characterized in that, The degree of deviation is specifically obtained by: The fused feature representation is vectorized to obtain the state representation vector of the current operating state of the medicine cabinet. The state representation vector refers to the feature vector obtained by vector mapping from the fused feature representation. Obtain the benchmark representation vector corresponding to the normal operating state of the medicine cabinet from the benchmark representation vector set of the preset normal operating state; The state representation vector is compared with the reference representation vector, and the deviation vector is obtained by calculating the difference vector between the state representation vector and the reference representation vector. The degree of deviation is calculated based on the vector norm of the deviation vector. The calculation process involves summing the squares of the deviation values of each dimension of the deviation vector and then taking the square root to obtain the degree of deviation.
6. The method for early warning of abnormal operation status of medicine cabinet based on deep learning according to claim 1, characterized in that, The generation of the anomaly score at the current moment specifically includes: The deviation degree is processed by segmented interval mapping, wherein the segmented interval mapping is based on a preset deviation degree interval, and the interval where the deviation degree is located is mapped to the intermediate abnormal score value. The intermediate anomaly score values of the time step are progressively compressed. The progressive compression process is to compress the score level of the intermediate anomaly score value to the target range according to the preset score level threshold, and to progressively adjust the compressed intermediate anomaly score value according to the order of the score level to obtain the normalized anomaly score value of the time step. An adaptive interval back-smoothing process is applied to the normalized anomaly score value at each time step. This process integrates the normalized anomaly score value with the normalized anomaly score value from the previous time step within the corresponding interval to obtain the anomaly score at the current time.
7. The method for early warning of abnormal operation status of medicine cabinet based on deep learning according to claim 1, characterized in that, The generation of the corresponding anomaly category identifier specifically includes: A set of pre-defined thresholds for determining anomaly categories, the set of thresholds including environmental anomaly thresholds, structural action anomaly thresholds, and safety anomaly thresholds; The anomaly scores at the current moment are compared step by step in descending order of threshold values to obtain anomaly category identifiers. The comparison process is as follows: when the anomaly score is greater than the safety anomaly boundary threshold, the anomaly category is identified as the safety anomaly category identifier; when the anomaly score is less than the safety anomaly boundary threshold but greater than the structural action anomaly boundary threshold, the anomaly category is identified as the structural action anomaly category identifier; when the anomaly score is less than the structural action anomaly boundary threshold but greater than the environmental anomaly boundary threshold, the anomaly category is identified as the environmental anomaly category identifier; and when the anomaly score is less than the environmental anomaly boundary threshold, the anomaly category is identified as the non-anomaly category identifier.
8. The method for early warning of abnormal operation status of medicine cabinet based on deep learning according to claim 1, characterized in that, The formation of the abnormal dataset specifically includes: Based on the anomaly category identifier, the warning level at the current moment is obtained according to the anomaly category and warning level mapping rule, and the warning level result corresponding one-to-one with the anomaly category identifier is obtained. The anomaly category and warning level mapping rule refers to assigning a warning level to each anomaly category. The equipment identifier, anomaly category identifier, warning level result, anomaly score, and status representation vector of the medicine cabinet are assembled into warning information according to the field structure. The warning information includes equipment field, anomaly category field, warning level field, anomaly score field, and status representation field. The warning message, the multi-source operational data corresponding to the current moment, the state representation vector, the anomaly score, and the anomaly category identifier are merged according to the sample structure to generate an anomaly sample dataset.