Medical data processing method and device based on transfer learning, equipment and medium
Through a transfer learning-based method, pre-trained language models and transfer learning technology are used to process medical data, the problem of insufficient precision in the prior art traditional Chinese medicine data enhancement is solved, and more efficient semantic data processing is achieved.
Patent Information
- Application Number
- CN202411374928.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-02-18
AI Technical Summary
The existing medical data augmentation technology is not accurate enough in medical semantics, and conventional methods cannot be separated from manual annotation, resulting in medical data being inaccurate enough and semantic data processing is inefficient.
Using a transfer learning method, the pre-processed medical data is trained through the pre-trained language model, and the first language model is generated, and then the target medical data set is input for transfer learning processing, to obtain the data set to be enhanced with transfer characteristics, and finally use pre- The data enhancement algorithm is used to process it.
It improves the accuracy of medical data in medical semantics, reduces dependence on manual annotation, and improves the efficiency of semantic data processing.
Smart Images

Figure CN119480138A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of medical data processing technology, and in particular to a medical data processing method, apparatus, device and storage medium based on transfer learning. Background Art
[0002] Medical data augmentation is one of the key technologies to improve the performance of medical image analysis algorithms, especially when faced with the problem of scarcity of high-quality annotated data. The following are some medical data augmentation techniques and methods based on search results:
[0003] Pathological descriptors: This is a lightweight method that can automatically encode a small number of key neurons related to disease diagnosis to describe many different types of lesions. In this way, pathological descriptors related to disease classification can be extracted from classification neural networks, which is also a weakly supervised learning strategy. This method can be used for medical data enhancement, and real lesion images can be quickly synthesized through generative networks such as Patho-GAN to enhance mutual understanding between doctors and AI.
[0004] Learning Image Transformations: The MIT team proposed an automatic data augmentation method that synthesizes additional labeled examples for training by learning a transformation model. This method performs well in one-shot magnetic resonance imaging (MRI) brain segmentation, synthesizing complex effects such as changes in anatomy and image acquisition procedures through spatial deformation fields and intensity changes.
[0005] Deep learning methods: Deep learning has become a popular tool for medical image analysis, but the limited availability of training data remains a challenge. To address this issue, researchers have proposed the use of deep generative models to generate more realistic and diverse data. These models include variational autoencoders, generative adversarial networks, and diffusion models, which have potential applications in different downstream tasks in medical imaging, such as classification, segmentation, and cross-modal translation.
[0006] Currently available medical data enhancement technologies are not accurate enough in medical semantics except for image processing, and conventional methods rely on manual labeling, which leads to technical problems such as inaccurate medical data and inefficient semantic data processing. Summary of the invention
[0007] The present application provides a medical data processing method, apparatus, device and storage medium based on transfer learning. The pre-processed medical data is first trained by a pre-trained language model to generate a first language model, and then a target medical data set is input into the first language model for transfer learning processing to obtain a target medical data set to be enhanced with transfer features. Finally, a preset data enhancement algorithm is used to process the target medical data set to be enhanced to obtain a corresponding enhanced target medical data set, which solves the technical problem that the existing medical data enhancement technology is not accurate enough in medical semantics except for image processing, and conventionally cannot do without manual annotation, resulting in inaccurate medical data and low efficiency in semantic data processing.
[0008] In view of this, the first aspect of the present application provides a medical data processing method based on transfer learning, the method comprising:
[0009] Training the preprocessed medical data through a pre-trained language model to generate a first language model;
[0010] Inputting the target medical data set into the first language model for transfer learning processing to obtain the target medical data set to be enhanced with transfer features;
[0011] The target medical data set to be enhanced is processed using a preset data enhancement algorithm to obtain a corresponding enhanced target medical data set.
[0012] Optionally, the step of training the preprocessed medical data by a pre-trained language model to generate a first language model specifically includes:
[0013] Obtaining a self-supervised learning task corresponding to the preprocessed medical data;
[0014] Determine a corresponding optimization algorithm and hyperparameter combination according to the self-supervised learning task, and generate the corresponding pre-trained language model;
[0015] The preprocessed medical data is input into the pretrained language model for pretraining to generate a first language model.
[0016] Optionally, the step of inputting the target medical data set into the first language model for transfer learning processing to obtain the target medical data set to be enhanced with transfer features specifically includes:
[0017] Acquire a migration strategy corresponding to the target medical data set;
[0018] Optimizing and processing the first language model according to the migration strategy to generate a second language model;
[0019] The target medical dataset is input into the second language model for transfer learning processing to obtain the target medical dataset to be enhanced with transfer features.
[0020] Optionally, the step of optimizing the first language model according to the migration strategy to generate a second language model specifically includes:
[0021] Performing feature extraction optimization processing on the first language model according to the migration strategy;
[0022] According to the migration strategy, the first language model is subjected to freezing and optimization processing of parameters of corresponding layers;
[0023] The second language model is generated after the first language model is optimized.
[0024] Optionally, the step of using a preset data enhancement algorithm to process the target medical dataset to be enhanced to obtain a corresponding enhanced target medical dataset specifically includes:
[0025] Acquire an enhancement strategy combination corresponding to the target medical data set to be enhanced, and determine a corresponding data enhancement algorithm;
[0026] The target medical data set to be enhanced is processed by the data enhancement algorithm to obtain a corresponding enhanced target medical data set.
[0027] Optionally, the step of obtaining an enhancement strategy combination corresponding to the target medical data set to be enhanced and determining a corresponding data enhancement algorithm specifically includes:
[0028] Parsing the acquired enhancement strategy combination of the target medical data set data to be enhanced;
[0029] The corresponding data enhancement algorithm is determined by the combination of the enhancement strategies as a data expansion algorithm, a sample generation algorithm, and a noise injection algorithm.
[0030] Optionally, the preprocessed medical data is trained by a pre-trained language model to generate a first language model, and the method also includes:
[0031] Get raw medical datasets;
[0032] The original medical data set is cleaned to obtain pre-processed medical data.
[0033] A second aspect of the present application provides a medical data processing device based on transfer learning, the device comprising:
[0034] A medical data preprocessing unit, used for pre-training the extracted pre-processed medical data through a pre-trained language model to generate a first language model;
[0035] A medical data transfer learning unit, used for training the preprocessed medical data through a pre-trained language model to generate a first language model;
[0036] A medical data transfer learning unit, used for inputting a target medical data set into the first language model for transfer learning processing, and obtaining a target medical data set to be enhanced with transfer features;
[0037] The medical data enhancement unit is used to process the target medical data set to be enhanced by using a preset data enhancement algorithm to obtain a corresponding enhanced target medical data set.
[0038] Optionally, the medical data preprocessing unit specifically includes:
[0039] An acquisition subunit, used for acquiring a self-supervised learning task corresponding to the preprocessed medical data;
[0040] A pre-trained language model generation subunit, used to determine a corresponding optimization algorithm and hyperparameter combination according to the self-supervised learning task, and generate the corresponding pre-trained language model;
[0041] The first language model generating subunit is used to input the preprocessed medical data into the pre-trained language model for pre-training to generate a first language model.
[0042] Optionally, the medical data transfer learning unit specifically includes:
[0043] A migration strategy subunit, used for obtaining a migration strategy corresponding to the target medical data set;
[0044] A second language model generating subunit, configured to optimize and process the first language model according to the migration strategy to generate a second language model;
[0045] The transfer learning processing subunit is used to input the target medical data set into the second language model for transfer learning processing, and obtain the target medical data set to be enhanced with transfer features.
[0046] Optionally, the second language model generating subunit is specifically used to perform feature extraction optimization processing on the first language model according to the migration strategy, freeze corresponding layer parameter optimization processing on the first language model according to the migration strategy, and obtain the second language model after the first language model is optimized.
[0047] Optionally, the medical data enhancement unit specifically includes:
[0048] A data enhancement algorithm subunit, used to obtain an enhancement strategy combination corresponding to the target medical data set to be enhanced, and determine a corresponding data enhancement algorithm;
[0049] The data enhancement subunit is used to process the target medical data set to be enhanced by using the data enhancement algorithm to obtain a corresponding enhanced target medical data set.
[0050] Optionally, the data enhancement algorithm subunit is specifically used to parse the enhancement strategy combination of the acquired target medical data set data to be enhanced, and determine the corresponding data enhancement algorithm as a data expansion algorithm, a sample generation algorithm, and a noise injection algorithm through the enhancement strategy combination.
[0051] Optionally, it also includes:
[0052] An acquisition unit, used for acquiring original medical data sets;
[0053] The preprocessing unit is used to perform data cleaning processing on the original medical data set to obtain preprocessed medical data.
[0054] The third aspect of the present application provides a medical data processing device based on transfer learning.
[0055] The device comprises at least one processor; and,
[0056] a memory communicatively connected to the at least one processor; wherein,
[0057] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps of the method for medical data processing based on transfer learning as described in the first aspect above.
[0058] A fourth aspect of the present application provides a non-volatile computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are executed by one or more processors, the one or more processors can execute the method of the first aspect above.
[0059] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0060] In the present application, a medical data processing method, apparatus, device and storage medium based on transfer learning are provided. The pre-processed medical data are first trained by a pre-trained language model to generate a first language model, and then a target medical data set is input into the first language model for transfer learning processing to obtain a target medical data set to be enhanced with transfer features. Finally, a preset data enhancement algorithm is used to process the target medical data set to be enhanced to obtain a corresponding enhanced target medical data set, which solves the technical problem that the existing medical data enhancement technology is not accurate enough in medical semantics except for image processing, and conventionally cannot do without manual annotation, resulting in inaccurate medical data and low efficiency in semantic data processing.
[0061] At the same time, in this application, fine-tuning training is performed on the target data set, inputting data and calculating output through forward propagation, calculating loss based on output and actual label, and then back-propagating to calculate gradient, and finally using optimizer to update parameters. During the training process, the validation set is used to evaluate the model performance, monitor the loss and evaluation indicators (such as accuracy, AUC, etc.), and adjust the model parameters and hyperparameters as needed to avoid overfitting, which can effectively utilize the powerful feature representation ability of the pre-trained model and provide efficient solutions for specific tasks in the medical field. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 A method flow chart of a medical data processing method based on transfer learning in an embodiment of the present application;
[0063] Figure 2 Schematic diagram of the structure of a medical data processing device based on transfer learning in an embodiment of the present application;
[0064] Figure 3 This is a schematic diagram of the structure of a medical data processing device based on transfer learning in an embodiment of the present application. DETAILED DESCRIPTION
[0065] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0066] The present application designs a medical data processing method based on transfer learning, which first trains the preprocessed medical data through a pretrained language model to generate a first language model, then inputs the target medical data set into the first language model for transfer learning processing, obtains the target medical data set to be enhanced with transfer features, and finally uses a preset data enhancement algorithm to process the target medical data set to be enhanced to obtain the corresponding enhanced target medical data set, which solves the technical problems that the existing medical data enhancement technology is not accurate enough in medical semantics except for image processing, and conventionally cannot do without manual annotation, resulting in inaccurate medical data and low efficiency in semantic data processing.
[0067] For easier understanding, see Figure 1 , Figure 1 is a method flow chart of a medical data processing method based on transfer learning in an embodiment of the present application, such as Figure 1 As shown, specifically:
[0068] S101, training the preprocessed medical data through a pre-trained language model to generate a first language model;
[0069] When medical data enhancement based on transfer learning is required, the preprocessed medical data is first trained through a pre-trained language model to generate a first language model.
[0070] It can be understood that training the preprocessed medical data by the pre-trained language model to generate the first language model specifically includes:
[0071] Obtaining a self-supervised learning task corresponding to the preprocessed medical data;
[0072] Determine a corresponding optimization algorithm and hyperparameter combination according to the self-supervised learning task, and generate the corresponding pre-trained language model;
[0073] Input the preprocessed medical data into the pretrained language model for pretraining to generate a first language model
[0074] The aforementioned self-supervised learning task corresponding to the pre-processed medical data is obtained, and the corresponding optimization algorithm and hyperparameter combination are determined according to the self-supervised learning task to generate the corresponding pre-trained language model, which may specifically be:
[0075] It should be further explained that a large language model is used for pre-training. Select an appropriate large language model, such as the GPT series model, to pre-train the original medical data set in step 101 to learn the semantic information and feature representation in the medical data. Specifically: (1) Select an appropriate large language model: For the purpose of medical data enhancement, it is necessary to select a large language model that is pre-trained on large-scale text data. At present, the GPT (Generative Pre-trained Transformer) series of models are representatives, including GPT, GPT-2, GPT-3, etc., which have performed well in various natural language processing tasks. Select GPT-3 as the large model for training.
[0076] Among them, the GPT (Generative Pretrained Transformer) model is a generative model based on the Transformer architecture developed by the artificial intelligence research laboratory OpenAI.
[0077] Features of the GPT model: Pre-training: The GPT model learns a general representation of language by pre-training on a large-scale text dataset. This enables the model to capture the complex structure and patterns of language. Generation ability: The GPT model is able to generate coherent and relevant text, which makes it widely used in text generation, dialogue systems, content creation and other fields. Transformer architecture: The GPT model uses the Transformer architecture, which is a model based on the self-attention mechanism that can process sequence data and capture long-distance dependencies. Multi-layer decoder: The GPT model consists of multiple decoder layers, each of which contains a self-attention mechanism and a feedforward neural network. Autoregressive properties: The GPT model is autoregressive, which means that when it generates text, each word is predicted based on the context of all previous words.
[0078] Versions of the GPT model: GPT: The original GPT model, with 117 million parameters. GPT-2: Expanded on GPT, with more parameters (1.5 billion parameters), and pre-trained on more data, improving the quality and diversity of generated text. GPT-3: One of the largest versions, with 175 billion parameters, it has achieved groundbreaking results in multiple language tasks, including text generation, translation, question answering, etc.
[0079] Applications of GPT models: Text generation: Automatically write articles, stories, poems, etc. Dialogue systems: Build chatbots and virtual assistants. Content creation assistance: Assist authors in content creation and provide writing suggestions. Data enhancement: Generate pseudo-parallel corpus in the absence of labeled data. Text summarization: Automatically generate summaries of documents or articles. Language translation: Translate text from one language to another.
[0080] (2) Data preparation: Before pre-training, a medical text dataset of sufficient size needs to be prepared. This data can include medical literature, medical records, medical books, etc., covering different medical fields and expertise.
[0081] (3) Model architecture and parameter settings: Set the corresponding model architecture and parameters based on the selected large language model. Typically, these models contain billions to tens of billions of parameters and have a multi-layer Transformer structure to process text sequences of different lengths and complexities.
[0082] (4) Pre-training tasks: During the pre-training phase, some self-supervised learning tasks are usually selected as the training targets of the model, such as language modeling, masked language modeling, etc. Through these tasks, the model can learn the semantic information and representation of the text sequence. (5) Optimization algorithm and hyperparameter adjustment: During the pre-training process, it is necessary to select a suitable optimization algorithm and adjust the hyperparameters to achieve the best model performance. Commonly used optimization algorithms include Adam, SGD, etc., and hyperparameters include learning rate, batch size, number of training steps, etc.
[0083] Among them, optimization algorithm refers to the algorithm used to minimize or maximize the objective function (such as loss function) in machine learning. Common optimization algorithms include gradient descent (and its variants such as stochastic gradient descent, batch gradient descent, Adam, RMSprop, etc.), Newton's method, conjugate gradient method, etc. The optimization algorithm determines the strategy and efficiency of model parameter update.
[0084] Hyperparameters are parameters that are set before model training, and they are usually not learned through gradient descent during model training. Examples of hyperparameters include learning rate, batch size, tree depth (in decision trees), regularization parameters, etc. Hyperparameters are used to control the learning ability of the model and prevent overfitting.
[0085] In this embodiment, different optimization algorithms may have different sensitivities to the selection of hyperparameters. For example, the Adam optimization algorithm has its own learning rate adjustment mechanism, so it is not as sensitive to the setting of the initial learning rate as gradient descent. Adjusting hyperparameters: The setting of hyperparameters will affect the convergence speed and final performance of the optimization algorithm. By adjusting the hyperparameters, the performance of the algorithm can be optimized so that it converges to the optimal solution or suboptimal solution faster. Hyperparameter optimization: Hyperparameter optimization is a key step in machine learning, which involves using various methods (such as grid search, random search, Bayesian optimization, etc.) to find the best hyperparameter combination to improve the performance of the model. Certain hyperparameters may work better with specific optimization algorithms. For example, the learning rate decay strategy may be more effective in some optimization algorithms. The combination of optimization algorithm and hyperparameters directly affects the training effect and final performance of the model. Improper selection may cause the model to fail to converge or overfit. In practical applications, it is usually necessary to determine the best optimization algorithm and hyperparameter combination through experiments and tuning. (6) Model training and evaluation: After completing parameter setting and task selection, the model pre-training process begins, and the model performance is monitored based on certain evaluation indicators. Generally, indicators such as perplexity and text generation quality can be used to evaluate the performance of the model in the pre-training stage. Perplexity is one of the indicators used to measure the performance of language models in natural language processing (NLP). It is mainly used to evaluate how well a language model predicts text sequences. The lower the perplexity, the more accurate the model's prediction of the data.
[0086] (7) Model preservation and subsequent application: After pre-training is completed, the obtained model parameters are saved for subsequent transfer learning and application. These pre-trained model parameters will serve as the starting point for transfer learning and will be used for subsequent feature extraction and data enhancement of the target medical dataset.
[0087] It is understandable that, before pre-training the extracted pre-processed medical data to generate the first language model through the pre-trained language model, the following steps are also included:
[0088] Get raw medical datasets;
[0089] The original medical data set is cleaned to obtain pre-processed medical data.
[0090] It can be further understood that the original medical data set is selected and preprocessed. The original medical data set includes various types of medical data, such as medical images, medical records, etc. The original medical data is preprocessed, including data cleaning, denoising, etc., to improve the data quality.
[0091] S102, inputting the target medical data set into the first language model for transfer learning processing, and obtaining the target medical data set to be enhanced with transfer features;
[0092] Specifically,
[0093] Acquire a migration strategy corresponding to the target medical data set;
[0094] Optimizing and processing the first language model according to the migration strategy to generate a second language model;
[0095] The target medical dataset is input into the second language model for transfer learning processing to obtain the target medical dataset to be enhanced with transfer features.
[0096] The step of optimizing the first language model according to the migration strategy to generate a second language model specifically includes:
[0097] Performing feature extraction optimization processing on the first language model according to the migration strategy;
[0098] According to the migration strategy, the first language model is subjected to freezing and optimization processing of parameters of corresponding layers;
[0099] The second language model is generated after the first language model is optimized.
[0100] It can be understood that transfer learning is to apply the pre-trained language model to the target medical dataset, and use transfer learning technology to transfer the learned feature representation to the target dataset. This can effectively utilize the information of the original dataset, add new samples and features to the target dataset, and achieve data enhancement. Specifically:
[0101] (1) Select the target medical dataset: First, we need to determine the target medical dataset, which is the target field of transfer learning. The target dataset may include medical images, medical records, and other data that require data enhancement.
[0102] (2) Model fine-tuning: Model fine-tuning is a key step in transfer learning to adapt a large pre-trained language model to a specific medical task. First, prepare the medical dataset required for the target task and divide it into a training set and a validation set. Next, load the models pre-trained on a large-scale general dataset, which have learned rich language features and semantic information. In order to adapt to specific medical tasks, it is necessary to add relevant layers to the pre-trained model. For example, for classification tasks, a fully connected layer can be added to the top of the model as a classifier. Subsequently, decide which layers need to be fine-tuned. Usually, the parameters of the model close to the input layer are frozen, and only the parameters close to the output layer are fine-tuned to retain the general features learned by the pre-trained model.
[0103] Fine-tune training is performed on the target dataset, input data and calculate output through forward propagation, calculate loss based on output and actual label, then perform back propagation to calculate gradient, and finally use optimizer to update parameters. During the training process, the validation set is used to evaluate the model performance, monitor the loss and evaluation indicators (such as accuracy, AUC, etc.), and adjust the model parameters and hyperparameters as needed to avoid overfitting. Among them, AUC (Area Under the Curve), that is, the area under the curve, is an indicator for evaluating the performance of classification models, especially in binary classification problems. AUC is often used together with the Receiver Operating Characteristic curve (ROC curve). The ROC curve is a graph used to show the relationship between the true positive rate (TPR) and the false positive rate (FPR) of the model under all possible classification thresholds. Among them: the true positive rate (TPR), also known as sensitivity or recall, is the proportion of positive samples correctly predicted by the model as positive. The false positive rate (FPR) is the proportion of negative samples incorrectly predicted by the model as positive.
[0104] Calculation of AUC: AUC is the area under the ROC curve, which quantifies the model's ability to distinguish between two categories under all possible classification thresholds. The value of AUC ranges from 0 to 1: AUC = 0.5: indicates that the model has no distinguishing ability, which is equivalent to random guessing. AUC = 1: indicates that the model has perfect distinguishing ability. AUC < 0.5: indicates that the performance of the model is poor, even worse than random guessing (this situation is rare in practice, probably because of the wrong category label).
[0105] AUC provides a performance measure that is independent of the choice of classification threshold. Even if the ratio of positive and negative samples in the dataset is extremely unbalanced, AUC can still provide a meaningful performance measure. The higher the AUC value, the better the classification performance of the model, which makes it very intuitive in interpreting model performance.
[0106] In practical applications, AUC is an important model evaluation metric to understand the overall performance of the model, especially before choosing the best classification threshold. However, it should be used together with other metrics (such as precision, recall, F1 score, etc.) to get a comprehensive understanding of the model performance.
[0107] After fine-tuning is completed, the trained model parameters are saved for deployment and use in practical applications. Through model fine-tuning, the powerful feature representation capabilities of the pre-trained model can be effectively utilized to provide efficient solutions for specific tasks in the medical field.
[0108] (3) Select a migration strategy: Select an appropriate migration learning strategy based on the size and characteristics of the target medical dataset. Common migration strategies include feature extraction, model fine-tuning, and specific layer freezing. Select the most suitable strategy based on the actual situation.
[0109] (4) Freezing some layer parameters: In the process of fine-tuning the model of transfer learning, freezing some layer parameters is one of the key steps to optimize the pre-trained model to adapt to specific tasks. Pre-trained models are usually extensively trained on large-scale general datasets and have learned rich language features and semantic information. This information is universal in many cases, so in the process of transfer learning, these universal features can be retained by freezing the parameters of some layers, thereby accelerating model convergence and reducing the risk of overfitting.
[0110] Specifically, freezing layer parameters means that the parameters of these layers will not be updated during fine-tuning. Usually, the parameters close to the input layer are more general and applicable to various tasks, so the parameters of these layers can be frozen. The parameters close to the output layer are more dependent on the specific task, so they need to be fine-tuned. For example, for a medical image classification task, the first few layers of the pre-trained model may have learned to identify general features such as edges and textures, which are useful in various image processing tasks, so these layers can be frozen. The last few layers need to be fine-tuned according to the specific medical image features to adapt to specific disease classification tasks.
[0111] When implementing frozen layer parameters, you can specify which layer parameters need to be frozen through the API of the framework (such as TensorFlow or PyTorch). For example, in PyTorch, this can be achieved by setting the `requires_grad` attribute of the layer that needs to be frozen to `False`. This will ensure that the parameters of these layers will not calculate gradients and updates during backpropagation.
[0112] Freezing some layer parameters has several significant advantages. First, it reduces the number of training parameters, thereby speeding up the training process. Second, it prevents the model from overfitting because the common features in the pre-trained model are retained, avoiding the risk of overfitting when training on a small dataset. Finally, it makes the model more stable because most of the parameters have been optimized on a large-scale dataset, and only a small number of parameters need to be fine-tuned to adapt to new tasks.
[0113] (5) Select an appropriate loss function: Select an appropriate loss function based on the nature of the target task and the characteristics of the dataset. The choice of loss function should be able to effectively measure the performance of the model on the target task and guide the model to learn the characteristics of the target dataset.
[0114] (6) Model training and validation: After completing the fine-tuning parameter settings, start model training on the target dataset. During the training process, use the validation set to monitor and adjust the model performance in real time to ensure the model performs well on the target task.
[0115] (7) Evaluate model performance: After training, use the test set to evaluate the model’s performance and assess its generalization and accuracy on the target task. Based on the evaluation results, adjust and optimize the model to further improve its performance.
[0116] (8) Save the model: After model training and evaluation are completed, save the trained model parameters for subsequent data enhancement and model application.
[0117] S103: Using a preset data enhancement algorithm to process the target medical data set to be enhanced to obtain a corresponding enhanced target medical data set.
[0118] Understandably,
[0119] An enhancement strategy combination corresponding to the target medical data set to be enhanced is obtained, a corresponding data enhancement algorithm is determined, and the target medical data set to be enhanced is processed by the data enhancement algorithm to obtain a corresponding enhanced target medical data set.
[0120] Wherein, obtaining an enhancement strategy combination corresponding to the target medical data set to be enhanced and determining the corresponding data enhancement algorithm specifically includes:
[0121] Parsing the acquired enhancement strategy combination of the target medical data set data to be enhanced;
[0122] The corresponding data enhancement algorithms determined by the combination of the enhancement strategies are data expansion algorithm, sample generation algorithm and noise injection algorithm.
[0123] It should be noted that data enhancement is to enhance the target data set according to the needs by using different data enhancement techniques, such as data expansion, sample generation, etc. At the same time, the semantic consistency of the data after data enhancement is maintained by combining the feature representation obtained by transfer learning in step 102. Specifically:
[0124] (1) Select appropriate data augmentation technology: Select appropriate data augmentation technology based on the characteristics of the target medical dataset and task requirements. Commonly used data augmentation technologies include data expansion, sample generation, noise injection, etc.
[0125] (2) Data augmentation: Data augmentation refers to generating new samples by performing a series of transformation operations on the original data. For medical image datasets, operations such as image rotation, flipping, scaling, and cropping can be used to augment the dataset. For medical text datasets, operations such as synonym replacement, sentence reorganization, and word addition and deletion can be performed to generate new text samples.
[0126] (3) Sample generation: Sample generation refers to the use of generative models or other machine learning methods to generate new samples. For medical image datasets, methods such as generative adversarial networks (GANs) can be used to generate new medical image samples to increase data diversity. For medical text datasets, language models can be used to generate new medical record texts.
[0127] (4) Noise injection: Noise injection refers to adding a certain degree of random noise to the original data to generate new samples. For medical imaging datasets, Gaussian noise, salt and pepper noise, etc. can be added to the image to increase the diversity of the data. For medical text datasets, random noise can be inserted into the text, word order can be disrupted, etc. to generate new text samples.
[0128] (5) Maintaining data semantic consistency: When performing data augmentation, it is necessary to ensure that the generated new samples maintain the semantic consistency of the original data. This means that the generated new samples should still have the same or similar features and information as the original data to ensure that the data after data augmentation is still suitable for the target task and model training.
[0129] (6) Data balancing: When performing data augmentation, attention should be paid to balancing the data set to ensure that the number of samples in each category is balanced. This can be achieved by adjusting the data augmentation strategy and parameters to avoid bias in model training due to data imbalance.
[0130] (7) Real-time data enhancement: For large-scale datasets or datasets that need to be dynamically updated, real-time data enhancement methods can be used. This means that in each training iteration, the data is enhanced so that the model can dynamically adapt to changes in the data.
[0131] In this embodiment, a medical data processing method based on transfer learning is provided. The pre-processed medical data is first trained by a pre-trained language model to generate a first language model, and then a target medical data set is input into the first language model for transfer learning processing to obtain a target medical data set to be enhanced with transfer features. Finally, a preset data enhancement algorithm is used to process the target medical data set to be enhanced to obtain a corresponding enhanced target medical data set, which solves the technical problem that the existing medical data enhancement technology is not accurate enough in medical semantics except for image processing, and conventionally cannot do without manual annotation, resulting in insufficient accuracy of medical data and low efficiency in semantic data processing.
[0132] At the same time, in this embodiment, fine-tuning training is performed on the target data set, input data and calculate output through forward propagation, calculate loss based on output and actual label, and then perform back propagation to calculate gradient, and finally use optimizer to update parameters. During the training process, the validation set is used to evaluate the model performance, monitor the loss and evaluation indicators (such as accuracy, AUC, etc.), and adjust the model parameters and hyperparameters as needed to avoid overfitting, which can effectively utilize the powerful feature representation ability of the pre-trained model and provide efficient solutions for specific tasks in the medical field.
[0133] In this embodiment, the transfer learning ability of a large language model is used to enhance medical data to improve the quality and quantity of medical data for training medical models. The method first uses a large language model to learn existing medical data and extract feature information therein. Then, using transfer learning technology, the learned features are applied to the target medical data set to achieve data enhancement. Through this method, the information of existing data can be effectively utilized to improve the diversity and richness of medical data, thereby improving the performance and generalization ability of medical models. The information of existing medical data can be effectively utilized to improve the diversity and richness of medical data, thereby improving the performance and generalization ability of medical models. Compared with traditional data enhancement methods, the method of the present invention can better retain the semantic information of data, improve the quality of data, and reduce the cost of manually annotating data, and has high practical value and broad application prospects.
[0134] See also Figure 2 , Figure 2 Schematic diagram of the structure of a medical data processing device based on transfer learning in an embodiment of the present application. Figure 2As shown, specifically:
[0135] A medical data preprocessing unit 201, configured to train the preprocessed medical data using a pretrained language model to generate a first language model;
[0136] A medical data transfer learning unit 202 is used to input a target medical data set into the first language model for transfer learning processing, and obtain a target medical data set to be enhanced with transfer features;
[0137] The medical data enhancement unit 203 is used to process the target medical data set to be enhanced by using a preset data enhancement algorithm to obtain a corresponding enhanced target medical data set.
[0138] In this embodiment, a medical data processing device based on transfer learning is provided. The pre-processed medical data is first trained by a pre-trained language model to generate a first language model, and then a target medical data set is input into the first language model for transfer learning processing to obtain a target medical data set to be enhanced with transfer features. Finally, a preset data enhancement algorithm is used to process the target medical data set to be enhanced to obtain a corresponding enhanced target medical data set, which solves the technical problem that the existing medical data enhancement technology is not accurate enough in medical semantics except for image processing, and conventionally cannot do without manual annotation, resulting in insufficient accuracy of medical data and low efficiency in semantic data processing.
[0139] At the same time, in this embodiment, fine-tuning training is performed on the target data set, input data and calculate output through forward propagation, calculate loss based on output and actual label, and then perform back propagation to calculate gradient, and finally use optimizer to update parameters. During the training process, the validation set is used to evaluate the model performance, monitor the loss and evaluation indicators (such as accuracy, AUC, etc.), and adjust the model parameters and hyperparameters as needed to avoid overfitting, which can effectively utilize the powerful feature representation ability of the pre-trained model and provide efficient solutions for specific tasks in the medical field.
[0140] In this embodiment, the transfer learning ability of a large language model is used to enhance medical data to improve the quality and quantity of medical data for training medical models. The method first uses a large language model to learn existing medical data and extract feature information therein. Then, using transfer learning technology, the learned features are applied to the target medical data set to achieve data enhancement. Through this method, the information of existing data can be effectively utilized to improve the diversity and richness of medical data, thereby improving the performance and generalization ability of medical models. The information of existing medical data can be effectively utilized to improve the diversity and richness of medical data, thereby improving the performance and generalization ability of medical models. Compared with traditional data enhancement methods, the method of the present invention can better retain the semantic information of data, improve the quality of data, and reduce the cost of manually annotating data, and has high practical value and broad application prospects.
[0141] Another embodiment of the present invention provides a physical asset data online processing device, such as Figure 3 As shown, the device 10 includes:
[0142] One or more processors 110 and memory 120, Figure 3 A processor 110 is used as an example for description. The processor 110 and the memory 120 may be connected via a bus or other means. Figure 3 The example of connecting through bus is taken in the following.
[0143] The processor 110 is used to complete various control logics of the device 10, and it can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), a single-chip microcomputer, an ARM (Acorn RISCMachine) or other programmable logic device, a discrete gate or transistor logic, a discrete hardware component, or any combination of these components. In addition, the processor 110 can also be any traditional processor, microprocessor or state machine. The processor 110 can also be implemented as a combination of computing devices, for example, a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors combined with a DSP and / or any other such configuration.
[0144] The memory 120 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions corresponding to the online processing method for physical asset data in the embodiment of the present invention. The processor 110 executes various functional applications and data processing of the device 10 by running the non-volatile software programs, instructions and units stored in the memory 120, that is, implements the online processing method for physical asset data in the above method embodiment.
[0145] The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and applications required for at least one function; the data storage area may store data created according to the use of the device 10, etc. In addition, the memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 120 may optionally include a memory remotely arranged relative to the processor 110, and these remote memories may be connected to the device 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0146] One or more units are stored in the memory 120, and when executed by one or more processors 110, the following steps are implemented:
[0147] Training the preprocessed medical data through a pre-trained language model to generate a first language model;
[0148] Inputting the target medical data set into the first language model for transfer learning processing to obtain the target medical data set to be enhanced with transfer features;
[0149] The target medical data set to be enhanced is processed using a preset data enhancement algorithm to obtain a corresponding enhanced target medical data set.
[0150] In this embodiment, the preprocessed medical data is first trained with a pre-trained language model to generate a first language model, and then the target medical data set is input into the first language model for transfer learning processing to obtain a target medical data set to be enhanced with transfer features, and finally a preset data enhancement algorithm is used to process the target medical data set to be enhanced to obtain a corresponding enhanced target medical data set, thereby solving the technical problem that the existing medical data enhancement technology is not accurate enough in medical semantics except for image processing, and conventional manual labeling is indispensable, resulting in insufficient accuracy of medical data and low efficiency in semantic data processing.
[0151] At the same time, in this embodiment, fine-tuning training is performed on the target data set, input data and calculate output through forward propagation, calculate loss based on output and actual label, and then perform back propagation to calculate gradient, and finally use optimizer to update parameters. During the training process, the validation set is used to evaluate the model performance, monitor the loss and evaluation indicators (such as accuracy, AUC, etc.), and adjust the model parameters and hyperparameters as needed to avoid overfitting, which can effectively utilize the powerful feature representation ability of the pre-trained model and provide efficient solutions for specific tasks in the medical field.
[0152] In this embodiment, the transfer learning ability of a large language model is used to enhance medical data to improve the quality and quantity of medical data for training medical models. The method first uses a large language model to learn existing medical data and extract feature information therein. Then, using transfer learning technology, the learned features are applied to the target medical data set to achieve data enhancement. Through this method, the information of existing data can be effectively utilized to improve the diversity and richness of medical data, thereby improving the performance and generalization ability of medical models. The information of existing medical data can be effectively utilized to improve the diversity and richness of medical data, thereby improving the performance and generalization ability of medical models. Compared with traditional data enhancement methods, the method of the present invention can better retain the semantic information of data, improve the quality of data, and reduce the cost of manually annotating data, and has high practical value and broad application prospects.
[0153] An embodiment of the present invention provides a non-volatile computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are executed by one or more processors, the above steps S101 to S103 are implemented.
[0154] As an example, non-volatile storage media can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) as external cache memory. By way of illustration and not limitation, RAM can be obtained in many forms such as synchronous RAM (SRAM), dynamic RAM, (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and direct Rambus RAM (DRRAM). The disclosed memory components or memories of the operating environment described herein are intended to include one or more of these and / or any other suitable types of memory.
[0155] Of course, those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware (such as a processor, a controller, etc.) through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium, and the computer program can include the processes of the above-mentioned method embodiments when executed. The storage medium can be a memory, a disk, a floppy disk, a flash memory, an optical storage device, etc.
[0156] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0157] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
[0158] It should be noted that if software tools or components other than those of our company appear in the embodiments of the present application, they are only used for illustrative purposes and do not represent actual use.
Claims
1. A medical data processing method based on transfer learning, characterized in that: include: Training the preprocessed medical data through a pre-trained language model to generate a first language model; Inputting the target medical data set into the first language model for transfer learning processing to obtain the target medical data set to be enhanced with transfer features; The target medical data set to be enhanced is processed using a preset data enhancement algorithm to obtain a corresponding enhanced target medical data set.
2. The medical data processing method based on transfer learning according to claim 1, characterized in that: The step of training the preprocessed medical data by using the pretrained language model to generate a first language model specifically includes: Obtaining a self-supervised learning task corresponding to the preprocessed medical data; Determine a corresponding optimization algorithm and hyperparameter combination according to the self-supervised learning task, and generate the corresponding pre-trained language model; The preprocessed medical data is input into the pretrained language model for pretraining to generate a first language model.
3. The medical data processing method based on transfer learning according to claim 1, characterized in that: The step of inputting the target medical data set into the first language model for transfer learning processing to obtain the target medical data set to be enhanced with transfer features specifically includes: Acquire a migration strategy corresponding to the target medical data set; Optimizing and processing the first language model according to the migration strategy to generate a second language model; The target medical dataset is input into the second language model for transfer learning processing to obtain the target medical dataset to be enhanced with transfer features.
4. The medical data processing method based on transfer learning according to claim 3, characterized in that: The step of optimizing and processing the first language model according to the migration strategy to generate a second language model specifically includes: Performing feature extraction optimization processing on the first language model according to the migration strategy; According to the migration strategy, the first language model is subjected to freezing and optimization processing of parameters of corresponding layers; The second language model is generated after the first language model is optimized.
5. The medical data processing method based on transfer learning according to claim 1, characterized in that: The step of using a preset data enhancement algorithm to process the target medical data set to be enhanced to obtain a corresponding enhanced target medical data set specifically includes: Acquire an enhancement strategy combination corresponding to the target medical data set to be enhanced, and determine a corresponding data enhancement algorithm; The target medical data set to be enhanced is processed by the data enhancement algorithm to obtain a corresponding enhanced target medical data set.
6. The medical data processing method based on transfer learning according to claim 5, characterized in that: The steps of obtaining an enhancement strategy combination corresponding to the target medical data set to be enhanced and determining a corresponding data enhancement algorithm specifically include: Parsing the acquired enhancement strategy combination of the target medical data set data to be enhanced; The corresponding data enhancement algorithms determined by the combination of the enhancement strategies are data expansion algorithm, sample generation algorithm and noise injection algorithm.
7. The medical data processing method based on transfer learning according to claim 1, characterized in that: The pre-processed medical data is trained by the pre-trained language model to generate the first language model, which also includes: Obtaining raw medical datasets; The original medical data set is cleaned to obtain pre-processed medical data.
8. A medical data processing device based on transfer learning, characterized in that: include: A medical data preprocessing unit, used for training the preprocessed medical data through a pretrained language model to generate a first language model; A medical data transfer learning unit, used for inputting a target medical data set into the first language model for transfer learning processing, and obtaining a target medical data set to be enhanced with transfer features; The medical data enhancement unit is used to process the target medical data set to be enhanced by using a preset data enhancement algorithm to obtain a corresponding enhanced target medical data set.
9. A medical data processing device based on transfer learning, characterized in that: The device comprises at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the medical data processing method based on transfer learning according to any one of claims 1 to 7.
10. A non-volatile computer-readable storage medium, characterized in that: The non-volatile computer-readable storage medium stores computer-executable instructions, which, when executed by one or more processors, enable the one or more processors to execute the medical data processing method based on transfer learning as described in any one of claims 1-7.
Citation Information
Patent Citations
Medical data processing method and device based on transfer learning, equipment and medium
CN112016702A
Semi-supervised conditional transfer learning method for medical feature generation model
CN116628489A
Deep learning language model fine tuning method for clinical medicine decision assistance
CN117198505A
Medical image data enhancement method and device, electronic equipment and storage medium
CN117745567A
Multi-modal pre-training model migration method based on self-supervised learning
CN118097685A