Method and system for dynamically monitoring adverse events of medical equipment based on deep learning
By constructing a multi-task learning network and a transfer learning framework, the problems of data fusion and low-frequency event prediction in medical device adverse event monitoring were solved, achieving high-precision risk warning and early prevention and control, and improving the model's prediction performance in small sample scenarios.
Patent Information
- Application Number
- CN202511598579.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-04
- Publication Date
- 2026-03-03
AI Technical Summary
Existing methods for monitoring adverse events related to medical devices suffer from insufficient dynamic risk capture capabilities, difficulty in fusing multi-source heterogeneous data, and poor model performance in data-sparse scenarios. These limitations make it difficult to effectively handle high-dimensional, nonlinear time-series data and limit the predictive accuracy of low-frequency, high-risk events.
We employ a deep learning-based approach to construct a multi-task learning network. We combine the Transformer model for feature extraction and fusion, introduce a transfer learning framework, vectorize multi-source data, and perform predictions by sharing feature extraction and fusion modules and a shared MLP network. We utilize transfer learning strategies to improve the model's generalization ability in small sample scenarios.
It achieves high-precision dynamic early warning of adverse events of medical devices, can automatically capture complex nonlinear relationships and long-term dependencies in high-dimensional data, improves the ability to identify occasional and multi-factor coupled risks, and reduces the incidence of medical accidents.
Smart Images

Figure CN121601176A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical risk monitoring technology, and in particular to a method and system for dynamic monitoring of adverse events of medical devices based on deep learning. Background Technology
[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.
[0003] Currently, the monitoring and management of adverse events related to medical devices mainly rely on post-event, passive reporting mechanisms and traditional retrospective statistical analysis. This model has significant delays and limitations, making it difficult to address the increasingly complex, hidden, and dynamic risks associated with the use of medical devices. Specifically, this manifests in the following aspects: Traditional statistical models struggle to effectively process and analyze the high-dimensional, continuous time-series data generated during the operation of medical devices. They are unable to delve into the potential nonlinear correlations and long-term dependencies, resulting in poor ability to identify and predict occasional failures and risks associated with multi-factor coupling.
[0004] Most existing methods rely on single structured data for analysis, ignoring the deep correlations between different sources and types of data (such as equipment parameters, usage environment, etc.), resulting in incomplete risk profiles and limited prediction accuracy.
[0005] For serious adverse events that occur infrequently but are highly harmful, the relevant data sample size is extremely small. When using standard supervised learning methods for modeling, the model is prone to overfitting, its generalization ability is severely limited, and it is difficult to make accurate predictions.
[0006] In summary, existing methods for monitoring adverse events related to medical devices suffer from shortcomings such as insufficient dynamic risk capture capabilities, difficulty in fusing multi-source heterogeneous data, and poor model performance in data-sparse scenarios. Summary of the Invention
[0007] To address the shortcomings of existing technologies, the purpose of this invention is to provide a method and system for dynamic monitoring of adverse events of medical devices based on deep learning. This method enables efficient learning of multimodal data in small sample scenarios, thereby achieving high-precision dynamic early warning of adverse events of medical devices.
[0008] To achieve the above objectives, the present invention is implemented through the following technical solution: The first aspect of this invention provides a method for dynamic monitoring of adverse events in medical devices based on deep learning, comprising the following steps: Acquire adverse event data from multiple medical device products, preprocess the adverse event data, and obtain a product event dataset; The adverse event data in the product event dataset is vectorized and concatenated to obtain a feature sequence; Construct a multi-task learning network and train it; Pre-training and parameter fine-tuning of the trained multi-task learning network are performed based on a transfer learning strategy. A fine-tuned multi-task learning network is used to predict the risk of medical device data to be predicted.
[0009] Furthermore, the specific steps for preprocessing adverse event data are as follows: The adverse event data was filtered and cleaned. Identify and label adverse event data; The adverse event data is segmented.
[0010] Furthermore, the specific steps for vectorizing and concatenating the adverse event data in the product event dataset are as follows: The adverse event data is vectorized based on its characteristic form to obtain a processed vector with a preset embedding dimension. The processed vectors are concatenated along the sequence dimension to obtain the feature sequence.
[0011] Furthermore, the multi-task learning network includes a shared feature extraction and fusion module, a shared MLP network, and a prediction head. The shared feature extraction and fusion module is used to perform global correlation calculation on all feature vectors in the feature sequence using a self-attention mechanism. The shared MLP network is used to perform predictions for two independent tasks and obtain the prediction results through the prediction head.
[0012] Furthermore, the two independent tasks are the adverse event timing prediction task and the adverse event frequency prediction task.
[0013] Furthermore, the specific steps of pre-training are as follows: Design a combined loss function and calculate the loss through forward propagation; By using the backpropagation algorithm, the prediction performance of two independent tasks can be optimized simultaneously using a combined loss function.
[0014] Furthermore, the specific steps for pre-training and fine-tuning the parameters of the trained multi-task learning network based on the transfer learning strategy are as follows: The product event dataset is classified to construct a source domain for pre-training the multi-task learning network and a target domain for fine-tuning the multi-task learning network. The multi-task learning network is pre-trained using the source domain, and all parameters of the multi-task learning network are frozen after pre-training is completed. The target domain is used to fine-tune the parameters of the trained multi-task learning network.
[0015] A second aspect of this invention provides a deep learning-based dynamic monitoring system for adverse events in medical devices, comprising: The data acquisition module is configured to acquire adverse event data of multi-source medical device products, preprocess the adverse event data, and obtain a product event dataset. The feature concatenation module is configured to vectorize and concatenate the adverse event data in the product event dataset to obtain a feature sequence. The model training module is configured to build and train a multi-task learning network. The transfer learning module is configured to pre-train and fine-tune the parameters of the trained multi-task learning network based on a transfer learning strategy. The risk prediction module is configured to use a fine-tuned multi-task learning network to predict the risk of medical device data to be predicted.
[0016] A third aspect of the present invention provides a computer-readable storage medium storing a computer program adapted to be loaded by a processor and executed the steps of the deep learning-based dynamic monitoring method for adverse events of medical devices as described in the first aspect of the present invention.
[0017] A fourth aspect of the present invention provides a computer device comprising: A processor, adapted to execute computer programs; A computer-readable storage medium storing a computer program, which, when executed by the processor, implements the deep learning-based dynamic monitoring method for adverse events of medical devices as described in the first aspect of the present invention.
[0018] The above one or more technical solutions have the following beneficial effects: This invention discloses a method and system for dynamic monitoring of adverse events related to medical devices based on deep learning. It innovatively combines deep learning with survival analysis and counting regression theory to construct a multi-task learning framework, enabling simultaneous and accurate prediction of both the "occurrence time" and "occurrence frequency" of adverse events, providing a more comprehensive quantitative view of risk. By introducing a Transformer model for feature extraction and fusion, this invention automatically captures complex nonlinear relationships and long-term dependencies in high-dimensional data, effectively identifying dynamic risks caused by multi-factor coupling and improving prediction accuracy. Furthermore, this invention applies a transfer learning framework to transfer general risk patterns learned on large-scale data to specific device prediction tasks with sparse samples, significantly improving the model's generalization ability and predictive performance on low-frequency, high-risk events. This invention transforms risk management from a reactive, post-event response to a proactive, pre-event prediction and prevention approach, providing early and accurate warnings for regulatory agencies and medical institutions, thereby effectively reducing the incidence of medical accidents and ensuring patient safety.
[0019] To address the problem that traditional statistical models struggle to handle high-dimensional, nonlinear time-series data, resulting in poor predictive ability for incidental and multi-factor coupled risks, this invention employs a deep learning model to replace the traditional statistical model, effectively mining and learning potential complex correlations and long-term dependencies in the data.
[0020] To address the limitation of prediction accuracy caused by existing methods relying on single structured data and failing to comprehensively depict risk profiles, this invention proposes a multimodal feature extraction and fusion strategy based on the Transformer architecture. This strategy automatically learns and integrates data features from different sources and types to generate a comprehensive risk vector.
[0021] To address the problem that the generalization ability of standard supervised learning models is severely limited due to insufficient sample size in the face of serious adverse events that occur infrequently but have high impact, this invention proposes to introduce a transfer learning mode within a deep learning framework. This mode transfers general knowledge learned from large-scale data to small-sample prediction tasks, thereby significantly improving the prediction performance of the model in data-sparse scenarios.
[0022] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a flowchart of the deep learning-based dynamic monitoring method for adverse events in medical devices in Embodiment 1 of the present invention. Detailed Implementation
[0025] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0026] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof. The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0027] Example 1: Embodiment 1 of the present invention provides a method for dynamic monitoring of adverse events of medical devices based on deep learning, such as... Figure 1 As shown, it includes the following steps: Step 1: Obtain adverse event data for multi-source medical device products, preprocess the adverse event data, and obtain a product event dataset.
[0028] In one specific implementation, this embodiment obtains a raw dataset containing multiple adverse event reports. The data is cleaned, records lacking key information are removed, and the data is grouped by medical device product to construct a product event dataset. Specifically, this includes the following steps: Step 1.1: Obtain adverse event data for multi-source medical device products.
[0029] Medical device adverse events (MDAEs) refer to various harmful events that occur under normal use of marketed medical devices, causing or potentially causing harm to the human body. This includes any problems caused by the quality, design, labeling, packaging, or use of the medical device.
[0030] Specifically, this can manifest as any adverse or unexpected signs (including abnormal laboratory test results), symptoms, or illness. For example, when using a steam sterilizer to disinfect dental instruments, it may be found that the temperature is insufficient to complete the sterilization process.
[0031] First, obtain the raw dataset containing multiple adverse event reports. These reports contain a wealth of information, such as product-related "product name," "registration certificate number," and "production date," event-related "event occurrence date," "injury," and "injury manifestation," and use-related "device use date," "place of use," and the report code and "report date" of the report itself.
[0032] Step 1.2: The specific steps for preprocessing adverse event data are as follows: Step 1.2.1: Filter and clean the adverse event data.
[0033] Specifically, the next step is data cleaning. To ensure data quality, variables with insufficient or unreliable information will be processed first. Specifically, a 50% missing rate threshold will be set, and feature columns with a missing rate higher than the threshold will be removed.
[0034] After column filtering is completed, the sample rows are cleaned. This embodiment uses a listwise deletion strategy to remove any records that still contain missing values, and performs strict time logic verification on key dates to ensure that all records meet the following conditions: production date ≤ device usage date ≤ event occurrence date ≤ report date.
[0035] Step 1.2.2: Identify and label adverse event data.
[0036] Specifically, after the cleaning process is complete, the analysis units need to be transformed from "single event" to "single product" to build a product event dataset. This process involves grouping the data by the "product name" column and aggregating the event information for each product.
[0037] Simultaneously, the system identifies the record of the first adverse event for each product, i.e., the record with the smallest difference between the "event occurrence date" and the "production date". The "survival time" (i.e., the difference in days between the two dates) and the "event status" (specifically, according to the definition of the "injury" field, "serious injury" or "death" is encoded as 1, and "other" is encoded as 0) of this record are extracted as the true label for Task 1; secondly, the system counts the total number of adverse events occurring for each product in the dataset, which is used as the true label for Task 2.
[0038] Step 1.2.3: Divide the adverse event data.
[0039] Finally, to ensure the effectiveness of model training and the objectivity of evaluation, this embodiment adopts a fixed dataset partitioning strategy. The product event dataset is divided into three independent subsets according to the following proportions (70% training set, 15% validation set, and 15% test set). The training set is used for learning and fitting model parameters; the validation set is used to monitor model performance and perform hyperparameter tuning during training; and the test set does not participate in the training process at all, but is only used to evaluate the generalization ability and final performance of the model after training is completed.
[0040] Step 2: Vectorize and concatenate the adverse event data in the product event dataset to obtain the feature sequence.
[0041] In one specific implementation, the feature engineering stage of this embodiment focuses on transforming multi-source heterogeneous data into standardized vector sequences that can be processed by the multi-task learning network in step 3. The core of this stage is to uniformly map the different predicted features (excluding the true labels) in the dataset to a high-dimensional vector space. Specifically, it includes the following steps: Step 2.1: Vectorize the adverse event data according to its characteristic form to obtain the processed vector with the preset embedding dimension.
[0042] Specifically, the feature forms of adverse event data include numerical features, low-cardinality categorical variables, and high-cardinality descriptive text variables. For numerical features, standard scaling is used to ensure zero mean and unit variance, followed by projection onto a uniform embedding dimension through a linear mapping layer. For low-cardinality categorical variables such as "medical institution category," an entity embedding strategy is employed, mapping each independent category to a dense vector that can be trained on this dimension. For high-cardinality descriptive text variables such as "event cause analysis," they are first converted into word vector sequences using a tokenizer and word embedding, and then compressed into a single context representation vector through average pooling.
[0043] Low cardinality categorical variables refer to features with a limited number and fixed categories. In contrast, high cardinality descriptive text variables refer to unstructured features with free text content. Their high cardinality is reflected in the fact that these text descriptions have almost no fixed categories, and the number of unique values is extremely large.
[0044] More specifically, this embodiment uses an entity embedding strategy to process low-cardinality categorical variables. Taking "medical institution category" as an example, this type of variable only includes a few fixed options such as "Level 1 Hospital", "Level 2 Specialized Hospital", and "Level 3 Specialized Hospital".
[0045] First, the categories need to be encoded with integers. Create a "vocabulary" that maps each unique medical institution category (such as "Level 1 Hospital", "Level 2 Specialized Hospital", "Level 3 Specialized Hospital") to a fixed integer index (e.g., {"Level 1 Hospital": 0, "Level 2 Specialized Hospital": 1, "Level 3 Specialized Hospital": 2}).
[0046] Secondly, an embedding layer is defined when building the neural network model. This layer is functionally a trainable lookup table. During initialization, two key parameters are specified: Vocabulary size (num_embeddings): This is the total number of categories, which is 3 here, but there are actually more than 3 categories.
[0047] Embedding dimension (embedding_dim): This is the dimension of the "dense vector" to which we want to map. It is a hyperparameter, and in this invention it is set to 16 dimensions.
[0048] At this point, a parameter matrix of shape (3, 16) will be created inside the model and randomly initialized.
[0049] During model training, when input data is given with the "Medical Institution Category" being "Level II Specialized Hospital," the model first converts it into the corresponding integer index 1. Then, the model passes this index 1 to the embedding layer. The embedding layer directly "looks up" the row vector with index 1 (i.e., a 16-dimensional vector) from the parameter matrix. This extracted 16-dimensional vector is the "dense vector" representation of "Level II Specialized Hospital."
[0050] More specifically, this embodiment uses the BERT model from natural language processing to process high-cardinality descriptive text variables. First, it converts the variables into word vector sequences through a tokenizer and word embeddings, and then compresses them using average pooling. Let's take "event cause analysis" as an example.
[0051] The first stage is the tokenizer. Taking a piece of raw text data titled "Event Cause Analysis" as an example, such as "The patient was using a ventilator when the device suddenly lost power," the tokenizer's role is to break down the continuous free text string into the smallest units that the model can understand, called tokens.
[0052] When the above sentence is fed into the word segmenter, it will segment the sentence according to the dictionary and rules, output a word sequence, and add a Classification Token (CLS) at the beginning of each text sequence and a Separator Token (SEP) at the end, for example: "[CLS], patient, in, using, ventilator, when, ,, equipment, suddenly, power outage, [SEP]".
[0053] The next stage is word embedding. The goal is to convert the text word sequence obtained in the previous step into a numerical matrix, i.e., a sequence of word vectors. The model holds a word embedding matrix, which is essentially a large lookup table storing the high-dimensional mathematical vector corresponding to each word in the vocabulary (such as "patient," "ventilator," "power outage," etc.). The 11 words in the previous sequence are sequentially looked up in the word embedding matrix, and their corresponding vectors are returned. The final embedding dimension of the model is set to 768. For the 11 words, the output is a matrix of shape (11, 768), where each row is a 768-dimensional vector representing the semantics of the corresponding word.
[0054] Finally, there's the Average Pooling stage. The goal is to compress the variable-length word vector sequence (i.e., an 11x768 matrix) obtained in the previous step into a single context representation vector. This is because subsequent networks require a fixed-length vector to represent the overall meaning of the "event cause analysis." Average pooling calculates the average of this (11, 768) matrix along the sequence dimension (i.e., the 11th dimension), summing the 11 element-wise 768-dimensional vectors and then dividing by 11. Ultimately, the model obtains a single 768-dimensional vector that summarizes the overall meaning of the original sentence, "The patient was using a ventilator when the equipment suddenly lost power." This vector can be concatenated with other feature vectors and input into subsequent deep learning networks.
[0055] It is worth noting that for low-cardinality categorical variables such as "medical institution category," the entity embedding strategy employed in this embodiment is a "from scratch" training approach. This means that the model initializes a random vector for each independent category, such as "Level 1 Hospital" and "Level 2 Specialized Hospital," and optimizes the trainable parameters of these vectors using the backpropagation algorithm on the adverse event dataset in this embodiment. Therefore, the meaning encoded by these vectors is learned entirely for the current prediction task (the time and frequency of adverse events), and this single-layer network performing entity embedding naturally participates in the subsequent model training process, thereby updating the network parameters.
[0056] Conversely, using a pre-trained and frozen BERT model to process high-cardinality texts like "event cause analysis" is a typical application of transfer learning. The BERT model has already learned rich linguistic structure and deep contextual semantic knowledge on a large, general-purpose text corpus. When it is frozen, all its internal parameters are set to a non-trainable state for the task. In this case, the BERT model no longer learns linguistic knowledge from the current data, but rather acts as a fixed, high-performance feature extractor: it leverages its powerful, pre-existing language understanding capabilities to directly transform the input "event cause analysis" text into a high-quality semantic vector rich in contextual information.
[0057] Step 2.2: Concatenate the processed vectors along the sequence dimension to obtain the feature sequence.
[0058] Specifically, all processed vectors representing different feature sources and having the same embedding dimension are concatenated along the sequence dimension to construct a feature sequence. Each element in this sequence represents a vectorized representation of an original feature, and the entire sequence serves as the input to the next stage feature extraction and fusion module.
[0059] Step 3: Construct a multi-task learning network and train it.
[0060] Step 3.1: Construct a multi-task learning network.
[0061] In one specific implementation, the multi-task learning network of this embodiment includes a shared feature extraction and fusion module, a shared MLP network, and a prediction head. The shared feature extraction and fusion module is used to perform global correlation calculation on all feature vectors in the feature sequence using a self-attention mechanism. The shared MLP network is used to perform predictions for two independent tasks and obtain the prediction results through the prediction head.
[0062] Specifically, a multi-task learning (MTL) network is designed, which includes two parallel prediction tasks and shares an underlying feature extraction network. The two independent tasks are the prediction of adverse event timing and the prediction of adverse event frequency. Task 1: Adverse Event Time Prediction. Construct a survival analysis model based on a deep neural network, which takes the feature sequence generated in step 2 and predicts the time until the next adverse event occurs.
[0063] Task 2: Adverse Event Count Prediction. Construct a deep learning-based counting regression model, which, like the feature sequence generated in step 2, predicts the number of adverse events that will occur within a specific future time window.
[0064] This embodiment designs a multi-task learning (MTL) framework, which adopts a hard parameter sharing architecture and consists of three core parts: a shared low-level feature extraction and fusion module, a shared multi-layer perceptron (MLP) network, and two independent task-specific prediction heads.
[0065] The shared feature extraction and fusion module is used for feature extraction. It is a deep network based on the Transformer architecture, trained from scratch for this task. This module receives a feature sequence as input. Its core self-attention mechanism performs global correlation computation on all feature vectors in the sequence, enabling it to explicitly and end-to-end capture and learn complex high-order nonlinear interactions between different feature sources (e.g., numerical features and text features, or different text features).
[0066] The feature sequence is input into a Transformer-based deep learning model (shared feature extraction and fusion module). Utilizing the Transformer model's self-attention mechanism, it automatically learns the interaction relationships and importance weights between different features, generating a fused feature vector that comprehensively reflects risk information. After being processed by stacked multi-layer encoders, this module finally outputs a single, highly condensed fused feature vector. It comprehensively summarizes the deep correlation information of all input features, forming a unified "Shared Representation Layer".
[0067] A shared MLP network. The output of the shared representation layer is fed into this module in parallel. Its architecture is a configurable multi-layer feedforward neural network, and its specific structure and data processing flow are as follows.
[0068] Input Layer: The network's input layer. The feature vectors are shared by the output of the representation layer.
[0069] Hidden Layers: This deep learning network consists of multiple hidden layers (with [128, 64, 32 nodes]), batch normalization, and dropout layers. It is responsible for fusing feature vectors. Further nonlinear transformations are performed, ultimately outputting a high-order shared feature representation. .
[0070] Activation Function: To enhance the nonlinear modeling capability of the network, this embodiment employs the modern activation function, Rectified Linear Units (ReLU), to achieve efficient and stable training.
[0071] Output layer: This high-order shared feature is then fed in parallel into two independent, task-specific output layers: Survival analysis output layer: a linear, single-neuron layer that receives... As input, directly output the logarithmic risk function value. .
[0072] Counting regression output layer: a linear two-neuron layer that receives... As input, its two output values are then passed through the Softplus activation function to predict the mean of the negative binomial distribution. and divergence parameters .
[0073] Survival analysis prediction head: After model training is complete, based on the training set data, standard nonparametric methods in survival analysis, such as the Breslow estimator, are used to estimate the baseline cumulative hazard function. And then the baseline survival function is calculated. This function forms the basis for calculating individualized survival probabilities, corresponding to the survival curve of the benchmark product with a log-hazard function value of zero. Subsequently, the features of the medical device product data (test set) to be predicted are input into a pre-trained multi-task learning network to obtain the log-hazard function value of each test sample in the survival analysis output layer. and compare it with the baseline survival function obtained in the previous step. Combined, through formula This generates a full lifecycle survival probability curve for each product, enabling dynamic prediction of when adverse events will occur.
[0074] Counting Regression Prediction Head: Input the medical device product data (test set) to be predicted into the pre-trained multi-task learning network to obtain the mean in the counting regression output layer. and divergence parameters Extract the mean of these two parameters. The final prediction result is the model's expected total number of adverse events occurring for the medical device product within a specific future time window, thus providing decision support for early warning and proactive intervention.
[0075] Step 3.2: Train the multi-task learning network.
[0076] In one specific implementation, two independent tasks are integrated into a unified multi-task learning network and jointly trained through a shared representation layer (i.e., the fused features output by the Transformer model). A combined loss function is designed and calculated via forward propagation; this function is a weighted sum of the time prediction task loss function and the epoch prediction task loss function. The prediction performance of both tasks is simultaneously optimized using a backpropagation algorithm.
[0077] This invention employs an end-to-end approach to jointly train the "Transformer-Shared MLP-Dual Output Layer" multi-task model defined in step three. The core of the training lies in defining a combined loss function and simultaneously optimizing both tasks through a single backpropagation path. The specific steps are as follows: Step 3.2.1: Design the combined loss function and calculate the loss through forward propagation.
[0078] Regarding the survival analysis loss function for Task 1 The Cox negative partial log-likelihood loss is employed. This loss function aims to maximize the likelihood of observed events occurring. Individuals at the time of the event Compared to all others that were still at risk at the same point in time individual The relative risk of (i.e., the risk set). Assume the model applies to individuals. The output log-risk value is Then the loss function Defined as the average negative log-partial likelihood over all samples of events that occur in a batch: .
[0079] Among them Event indicator, For individuals The risk set.
[0080] Regarding the count regression loss function for Task 2 The negative log-likelihood (NLL) loss, calculated using Deep Negative Binomial Regression (DNBR), is defined as the number of observed true events. The average negative log probability under the negative binomial distribution predicted by the model: .
[0081] in For batch size, The output layer for step three is for each individual The predicted negative binomial distribution parameter pair, It is the probability mass function (PMF) of the negative binomial distribution, and its parameters are calculated stably by the network.
[0082] Combined loss function: total loss It is a weighted sum of the survival analysis loss function and the count regression loss function, calculated using preset hyperparameter weights. and (Set all values to 1.0) Balance the values: .
[0083] Next, the hyperparameter configuration is initialized. The complete MTL model is loaded, the AdamW optimizer is selected, and the global learning rate is set to [value missing]. Batch Size is .
[0084] A forward pass is performed. Each batch of data passes through a shared Transformer and a shared MLP, and finally through two independent output layers in parallel to obtain the logarithmic risk value corresponding to that batch. and negative binomial distribution parameters .
[0085] Loss calculation: based on the actual label of this batch. And the model output, calculate separately and and combine to obtain .
[0086] Step 3.2.2: Optimize the prediction performance of the two independent tasks simultaneously using the backpropagation algorithm and the combined loss function.
[0087] Specifically, a backpropagation process is performed. The calculation... The gradient relative to all trainable parameters of the model. These trainable parameters include the low-cardinality categorical variable single-layer embedding network in step 2.1, and the parameters of the Transformer, shared MLP, and two output layers in step 3.1.
[0088] The optimizer updates all parameters based on the gradient.
[0089] The batch training process is repeated, iterating and validating across the entire training set (called an Epoch). After each Epoch, the combined loss is calculated on an independent validation set. .
[0090] An early stopping strategy is used as regularization to determine the convergence state. In this embodiment, the "patience" is set to 50 epochs, meaning that if within 50 consecutive epochs, the validation set... If a new low is not reached, training will automatically terminate. The model parameters with the lowest loss on the validation set will be saved as the final model used for prediction.
[0091] Step 4: Pre-train and fine-tune the parameters of the trained multi-task learning network based on the transfer learning strategy.
[0092] In one specific implementation, to address the challenge of training specific types of medical devices due to the scarcity of adverse event samples, a transfer learning framework is introduced. First, the multi-task learning network is pre-trained on a large-scale dataset with ample data and including various medical devices, enabling it to learn general knowledge and feature representations about adverse events. Then, the pre-trained model parameters are used as initial values for fine-tuning on a sparse target medical device dataset, thereby transferring general knowledge to specific tasks and significantly improving the model's predictive performance and generalization ability on small sample data.
[0093] Step 4.1: Classify the product event dataset to construct the source domain for pre-training the multi-task learning network and the target domain for fine-tuning the multi-task learning network.
[0094] Specifically, to minimize the risk of domain shift in transfer learning, this embodiment first classifies the product event dataset obtained in step 1.2.2 into different sets, such as: "therapeutic and surgical equipment", "imaging equipment", "monitoring and diagnostic equipment", "disposable consumables", "general hospital equipment" and "other".
[0095] Subsequently, within each product category (e.g., "Therapeutic and Surgical Equipment"), a secondary partitioning is performed to construct a source domain for model pre-training and a target domain for model fine-tuning. This secondary partitioning process uses "Market Authorization Holder Name" as the basic unit. The specific steps are as follows: First, sum the total number of adverse events for each "listing permit holder name" under this category; then, calculate the 80th percentile of these total number of events and set this value as the dividing threshold; finally, divide all product records corresponding to holders whose total number of events is greater than or equal to the threshold (i.e., the top 20% in terms of the number of events) in this category into the source domain dataset; divide all product records corresponding to holders whose total number of events is less than the threshold (i.e., the bottom 80% in terms of the number of events) into the target domain dataset.
[0096] In this way, the source domain with ample data can be used for thorough pre-training of the model, while the relatively sparse target domain is used for efficient parameter fine-tuning. This process ensures that the source and target domains maintain a high degree of consistency in product categories, thereby effectively reducing the risk of domain shift due to differences in data structure. Finally, the same training, validation, and test set partitioning strategy (70%, 15%, 15%) is applied to both the source and target domains. Step 4.2: Pre-train the trained multi-task learning network using the source domain, and freeze all parameters of the multi-task learning network after pre-training.
[0097] Specifically, after pre-training in the source domain, all parameters of the multi-task learning network (including the shared Transformer, the shared MLP head, and the two task-specific output layers) are set to an untrainable (Frozen) state.
[0098] Step 4.3: Fine-tune the parameters of the trained multi-task learning network using the target domain.
[0099] To address the challenge of training specific types of medical devices due to the scarcity of adverse event samples, this embodiment introduces a transfer learning framework. This framework first pre-trains a multi-task learning network on a large-scale dataset with ample data, encompassing various medical devices, enabling it to learn general knowledge and feature representations about adverse events.
[0100] However, if a multi-task learning network is "fully fine-tuned" (i.e., trained with all parameters) directly on a sparse target dataset, it is very easy to cause the "catastrophic forgetting" problem: in order to fit the sparse data, the model will lose the general knowledge learned in the pre-training stage, resulting in a performance degradation.
[0101] This embodiment proposes an efficient parameter fine-tuning strategy based on multi-task adapters for sparse target datasets. This strategy freezes all parameters of the multi-task learning network during the fine-tuning phase, introducing only a small number of trainable "adapter modules." This allows for efficient model adaptation to specific instrument tasks without compromising general knowledge. The specific steps are as follows: Step 4.3.1: Import the corresponding adapter modules for the two independent tasks respectively.
[0102] Specifically, this embodiment designs independent, lightweight adapter modules for two separate tasks (survival analysis and count regression). Each adapter module is itself a small neural network, employing a bottleneck MLP with a "dimensionality reduction-activation-dimensionality increase" structure (number of nodes [32>16>32]), and its parameter count is much smaller than the base model. These two adapter modules are inserted in parallel between the shared MLP head and the original task output layer.
[0103] Step 4.3.2: Based on the adapter module and transfer learning strategy, fine-tune the multi-task learning network using feature sequences.
[0104] Specifically, when fine-tuning a sparse target medical device dataset (target domain), the data flow and training process are as follows: Forward propagation: Data first passes through a frozen shared Transformer and a frozen shared MLP header to generate a higher-order shared feature representation. It is sent to two paths at the same time: For the survival analysis task (path one), the 32-dimensional shared feature (because the last layer dimension of the shared MLP defined in step 3.1 is 32-dimensional) is fed into a trainable survival analysis adapter (Adapter_surv_trainable). This adapter adopts the [32>16>32] bottleneck structure described in this invention, outputting a 32-dimensional residual adjusted feature. Through residual connections, this residual adjusted feature is element-wise added to the input higher-order shared feature representation to form a 32-dimensional fused feature one. Finally, this fused feature one is fed into the frozen survival analysis output layer to obtain the logarithmic risk prediction for each product.
[0105] For the counting regression task (path two), the 32-dimensional shared feature is fed into a trainable counting regression adapter (Adapter_count_trainable). This adapter also adopts the aforementioned [32>16>32] bottleneck structure, outputting a 32-dimensional residual adjusted feature. Through residual connections, this residual adjusted feature is element-wise added to the input higher-order shared feature representation to form a 32-dimensional fused feature two. Finally, this fused feature two is fed into the frozen counting regression output layer to obtain the negative binomial distribution parameters (mean and divergence) predictions for each product.
[0106] Backpropagation and parameter update: In the fine-tuning phase, the combined loss function is calculated. Since the base model is frozen, gradient backpropagation only updates the parameters of the two lightweight adapter modules (Adapter_surv_trainable and Adapter_count_trainable) until the model converges.
[0107] Step 5: Use the fine-tuned multi-task learning network to perform risk prediction on the medical device data to be predicted.
[0108] In this embodiment, the data of the medical device to be predicted is input into the fine-tuned model. Based on the survival analysis prediction head and the count regression prediction head, the model outputs the risk time and expected number of adverse events of the device in the future, providing decision support for early warning and proactive intervention.
[0109] Example 2: Embodiment 2 of the present invention provides a dynamic monitoring system for adverse events of medical devices based on deep learning, comprising: The data acquisition module is configured to acquire adverse event data of multi-source medical device products, preprocess the adverse event data, and obtain a product event dataset. The feature concatenation module is configured to vectorize and concatenate the adverse event data in the product event dataset to obtain a feature sequence. The model training module is configured to build and train a multi-task learning network. The transfer learning module is configured to pre-train and fine-tune the parameters of the trained multi-task learning network based on a transfer learning strategy. The risk prediction module is configured to use a fine-tuned multi-task learning network to predict the risk of medical device data to be predicted.
[0110] Example 3: Embodiment 3 of the present invention provides a computer-readable storage medium storing a computer program adapted for loading by a processor and executing the steps of the deep learning-based dynamic monitoring method for adverse events of medical devices as described in Embodiment 1 of the present invention.
[0111] Example 4: Embodiment 4 of the present invention provides a computer device, the device comprising: A processor, adapted to execute computer programs; A computer-readable storage medium storing a computer program, which, when executed by the processor, implements the steps of the deep learning-based dynamic monitoring method for adverse events in medical devices as described in Embodiment 1 of the present invention.
[0112] The steps and methods involved in Examples 2, 3 and 4 above correspond to those in Example 1. For specific implementation details, please refer to the relevant description section of Example 1.
[0113] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application. In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in or transmitted through a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium can be any available medium that a computer can access or a data processing device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium, an optical medium, or a semiconductor medium, etc. The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for dynamic monitoring of adverse events related to medical devices based on deep learning, characterized in that, Includes the following steps: Acquire adverse event data from multiple medical device products, preprocess the adverse event data, and obtain a product event dataset; The adverse event data in the product event dataset is vectorized and concatenated to obtain a feature sequence; Construct a multi-task learning network and train it; Pre-training and parameter fine-tuning of the trained multi-task learning network are performed based on a transfer learning strategy. A fine-tuned multi-task learning network is used to predict the risk of medical device data to be predicted.
2. The method for dynamic monitoring of adverse events in medical devices based on deep learning as described in claim 1, characterized in that, The specific steps for preprocessing adverse event data are as follows: The adverse event data was filtered and cleaned. Identify and label adverse event data; The adverse event data is segmented.
3. The method for dynamic monitoring of adverse events in medical devices based on deep learning as described in claim 1, characterized in that, The specific steps for vectorizing and concatenating the adverse event data in the product event dataset are as follows: The adverse event data is vectorized based on its characteristic form to obtain a processed vector with a preset embedding dimension. The processed vectors are concatenated along the sequence dimension to obtain the feature sequence.
4. The method for dynamic monitoring of adverse events in medical devices based on deep learning as described in claim 1, characterized in that, The multi-task learning network includes a shared feature extraction and fusion module, a shared MLP network, and a prediction head. The shared feature extraction and fusion module is used to perform global correlation calculation on all feature vectors in the feature sequence using a self-attention mechanism. The shared MLP network is used to perform predictions for two independent tasks and obtain the prediction results through the prediction head.
5. The method for dynamic monitoring of adverse events in medical devices based on deep learning as described in claim 4, characterized in that, The two independent tasks are the adverse event timing prediction task and the adverse event frequency prediction task.
6. The method for dynamic monitoring of adverse events in medical devices based on deep learning as described in claim 4, characterized in that, The specific steps of pre-training are as follows: Design a combined loss function and calculate the loss through forward propagation; By using the backpropagation algorithm, the prediction performance of two independent tasks can be optimized simultaneously using a combined loss function.
7. The method for dynamic monitoring of adverse events in medical devices based on deep learning as described in claim 1, characterized in that, The specific steps for pre-training and fine-tuning parameters of a multi-task learning network based on a transfer learning strategy are as follows: The product event dataset is classified to construct a source domain for pre-training the multi-task learning network and a target domain for fine-tuning the multi-task learning network. The multi-task learning network is pre-trained using the source domain, and all parameters of the multi-task learning network are frozen after pre-training is completed. The target domain is used to fine-tune the parameters of the trained multi-task learning network.
8. A deep learning-based dynamic monitoring system for adverse events in medical devices, characterized in that, include: The data acquisition module is configured to acquire adverse event data from multiple sources of medical device products, preprocess the adverse event data, and obtain a product event dataset. The feature concatenation module is configured to vectorize and concatenate the adverse event data in the product event dataset to obtain a feature sequence. The model training module is configured to build and train a multi-task learning network. The transfer learning module is configured to pre-train and fine-tune the parameters of the trained multi-task learning network based on a transfer learning strategy. The risk prediction module is configured to use a fine-tuned multi-task learning network to predict the risk of medical device data to be predicted.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted to be loaded by a processor and executed as described in any one of claims 1-7: a deep learning-based method for dynamic monitoring of adverse events in medical devices.
10. A computer device, characterized in that, include: A processor, adapted to execute computer programs; A computer-readable storage medium storing a computer program, which, when executed by the processor, implements the deep learning-based dynamic monitoring method for adverse events of medical devices as described in any one of claims 1-7.