Model adaptive updating method and device for medical data, equipment and medium

By using pre-trained models to generate pseudo-labels and calculate losses for updates, the problem of high labeling costs and low accuracy when deep learning models are transferred between different environments is solved, and high accuracy model updates are achieved at low labeling costs.

CN119650079APending Publication Date: 2025-03-18PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411737464.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

In medical data processing, deep learning models need a large amount of labeled data to be retrained when migrating between different environments, resulting in high labeling costs and lack of effective supervision when model updates, resulting in poor accuracy.

Method used

By obtaining the pretrained target model, traversing real-time medical data, using the pretrained model to predict the probability that the data belongs to the preset category, determining the category corresponding to the maximum probability is a pseudo-label, calculating the classification loss and information entropy loss of the pseudo-label, and updating the model to improve the accuracy.

Benefits of technology

It realizes that the accuracy of the model after adaptive updates is improved without labeling data at all while ensuring low labeling costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119650079A_ABST
    Figure CN119650079A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of artificial intelligence, in particular to a model adaptive updating method and device for medical data, equipment and a medium. The method uses a pre-trained target model to predict classification probabilities that real-time medical data respectively belong to N preset categories, determines the preset category corresponding to the maximum value of the classification probabilities as a false label, and determines the classification probability of the real-time medical data through a classification loss function and an information entropy function according to all the false labels and the corresponding classification probabilities. According to the method, classification loss and information entropy loss are obtained through calculation, a pre-trained target model is updated according to the classification loss and the information entropy loss, an updated target model is obtained, the classification loss is calculated by adopting a pseudo label, and the balance of a feature space corresponding to a preset category is supervised in combination with the information entropy loss. Therefore, self-adaptive model updating completely without label data can be realized, the model updating effect is ensured, and the accuracy of the model after self-adaptive updating is improved on the premise of ensuring that the labeling cost is relatively low.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method, device, equipment and medium for adaptively updating a model of medical data. Background Art

[0002] At present, with the development of artificial intelligence technology, deep learning models have been widely used in various application scenarios, such as medical scenarios, traffic scenarios, security scenarios, etc. However, in different environments under the same application scenario, there are differences in data form, data quality, data distribution, etc., which requires a large amount of labeled data to be re-trained when deep learning models migrate between different environments to adapt to the new environment. The data annotation cost is relatively high. Existing methods usually use a combination of labeled data and unlabeled data for adaptive updates to reduce the annotation cost.

[0003] However, when the model processes private data, such as medical data in medical scenarios, in order to ensure the privacy and security of the data, the model receiver often finds it difficult to obtain the labeled training data of the model migration party. If the model receiver directly uses unlabeled data to update the model while ensuring the low labeling cost, it will lead to a lack of effective supervision during the model update, resulting in poor accuracy of the model after the adaptive update. Therefore, how to improve the accuracy of the model after the adaptive update while ensuring the low labeling cost has become an urgent problem to be solved. Summary of the invention

[0004] In view of this, embodiments of the present invention provide a method, apparatus, device and medium for adaptively updating a model for medical data to solve the problem of poor accuracy of the adaptively updated model while ensuring low annotation costs.

[0005] In a first aspect, an embodiment of the present invention provides a model adaptive updating method for medical data, the model adaptive updating method comprising: Obtaining a pre-trained target model, where the pre-trained target model is trained based on labeled historical medical data; Traversing the M real-time medical data obtained, using the pre-trained target model to predict the probability that the real-time medical data belongs to N preset categories respectively, obtaining the classification probability corresponding to the preset category, determining the preset category corresponding to the maximum value of the classification probability as a pseudo label, and obtaining the pseudo label corresponding to the real-time medical data, where M and N are both positive integers; According to all pseudo labels and their corresponding classification probabilities, the classification loss corresponding to the classification loss function and the information entropy loss corresponding to the information entropy function are calculated through the classification loss function and the information entropy loss respectively; The pre-trained target model is updated according to the classification loss and the information entropy loss to obtain an updated target model.

[0006] In a second aspect, an embodiment of the present invention provides a model adaptive updating device for medical data, the model adaptive updating device comprising: A model acquisition module, used to acquire a pre-trained target model, wherein the pre-trained target model is trained based on labeled historical medical data; A pseudo-label determination module is used to traverse the M real-time medical data obtained, use the pre-trained target model to predict the probability that the real-time medical data belongs to N preset categories respectively, obtain the classification probability corresponding to the preset category, determine the preset category corresponding to the maximum value of the classification probability as a pseudo-label, and obtain the pseudo-label corresponding to the real-time medical data, where M and N are both positive integers; A loss calculation module is used to calculate the classification loss of the corresponding classification loss function and the information entropy loss of the corresponding information entropy function through the classification loss function and the information entropy function according to all pseudo labels and their corresponding classification probabilities; The model updating module is used to update the pre-trained target model according to the classification loss and the information entropy loss to obtain an updated target model.

[0007] In a third aspect, an embodiment of the present invention provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the model adaptive update method as described in the first aspect when executing the computer program.

[0008] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the model adaptive updating method as described in the first aspect is implemented.

[0009] Compared with the prior art, the embodiments of the present invention have the following beneficial effects: A pre-trained target model is obtained, the M real-time medical data obtained are traversed, and the pre-trained target model is used to predict the probability that the real-time medical data belongs to N preset categories respectively, and the classification probability corresponding to the preset category is obtained. The preset category corresponding to the maximum value of the classification probability is determined as a pseudo label, and the pseudo label corresponding to the real-time medical data is obtained. According to all pseudo labels and their corresponding classification probabilities, the classification loss of the corresponding classification loss function and the information entropy loss of the corresponding information entropy function are calculated respectively through the classification loss function and the information entropy loss. According to the classification loss and the information entropy loss, the pre-trained target model is updated to obtain an updated target model, and the classification loss is calculated using the pseudo label, and the information entropy loss is combined to supervise the balance of the feature space corresponding to the preset category, so that the adaptive model update without the need for labeled data can be realized and the model update effect can be guaranteed, that is, the accuracy of the adaptive updated model is improved under the premise of ensuring low labeling cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0011] Figure 1 This is a schematic diagram of an application environment of a method for adaptively updating a model for medical data provided by the first embodiment of the present invention; Figure 2 It is a flowchart of a method for adaptively updating a model for medical data provided in Embodiment 1 of the present invention; Figure 3 is a structural diagram of a model adaptive updating device for medical data provided by Embodiment 2 of the present invention; Figure 4 It is a structural diagram of a computer device provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION

[0012] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.

[0013] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0014] It should also be understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0015] As used in the present specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]", depending on the context.

[0016] In addition, in the description of the present specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0017] References to "one embodiment" or "some embodiments" etc. described in the present specification mean that one or more embodiments of the present invention include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0018] The embodiments of the present invention can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0019] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0020] It should be understood that the order of execution of the steps in the following embodiments does not imply a precedence of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0021] In order to illustrate the technical solution of the present invention, specific embodiments are provided below for illustration.

[0022] A method for adaptively updating a model for medical data provided by the first embodiment of the present invention can be applied in the following aspects: Figure 1 In the application environment, the local client communicates with the server. The local client includes but is not limited to PDAs, desktop computers, laptops, ultra-mobile personal computers (UMPCs), netbooks, cloud terminal devices, personal digital assistants (PDAs) and other computer devices. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0023] The server can be deployed in a medical scenario. The medical scenario usually includes multiple local terminals. The local terminals can be deployed in hospitals, medical institutions, etc. Each local terminal corresponds to a server. There can be a communication connection between the local terminals to transmit non-privacy data. In the model update task, non-privacy data can refer to the weight parameters of the model, training configuration parameters, etc., while privacy data usually does not interact between local terminals. Privacy data usually refers to medical records information, medical data, and other data involving patient privacy information that can be used as training data sets. It should be noted that the local terminal can also belong to a local terminal cluster, such as a local terminal cluster under federated learning. The local terminal cluster under federated learning includes at least two local terminals and a central terminal. The central terminal can be a designated local terminal or a pre-architected central server. The central terminal communicates with the local terminal cluster to distribute non-privacy data, that is, the central terminal usually does not transmit privacy data.

[0024] See also Figure 2 , is a flow chart of a method for adaptively updating a model for medical data provided by the first embodiment of the present invention. The method for adaptively updating a model can be applied to Figure 1 The server in the server, the computer device corresponding to the server is connected to the local client to obtain real-time medical data and pre-trained target models from the local client. The real-time medical data can be unlabeled medical data collected locally by the local client, and the pre-trained target model can be a model with pre-trained parameters configured and transmitted to the local client by other clients. Figure 2 As shown, the model adaptive updating method may include the following steps: Step S201, obtaining a pre-trained target model.

[0025] Among them, the pre-trained target model is trained based on labeled historical medical data. The historical medical data may refer to medical data collected by the local client within a historical time period as a training data set, or medical data collected by other clients within a historical time period as a training data set. Medical data may refer to medical record data, medical image data, medical record data, patient information data, etc. The label may refer to the annotated data of the historical medical data corresponding to the downstream task, which is manually annotated by the client locally.

[0026] Specifically, the target model, historical medical data and their labels can all be determined according to the downstream task. For example, if the downstream task is a medical image classification task, the medical data collected in the historical time period is a medical image, the label is the classification category corresponding to the medical image, and the target model is a classification model; The pre-trained target model can be obtained by pre-training the local client based on the medical data collected within the historical time period as the training data set. At this time, the pre-trained target model is deployed in the local client by default, and the server can directly access the local client to obtain the pre-trained target model. This situation is applicable to the situation where the newly collected medical data is not labeled.

[0027] In one embodiment, the pre-trained target model is obtained by pre-training other clients based on medical data collected within a historical time period as a training data set. At this time, it is necessary to wait for other clients to send the pre-trained target model to the local client, and the server then obtains the pre-trained target model from the local client. This situation is applicable to the situation where the local client migrates the model from other clients.

[0028] Optionally, the model adaptive updating method further includes: Obtain K historical medical data and their corresponding labels, and use the target model to classify each historical medical data to obtain the sample category of the corresponding historical medical data; According to K groups of sample categories and labels that have corresponding relationships, the target model is trained to obtain a pre-trained target model.

[0029] Wherein, K is an integer greater than zero. In this embodiment, the target model may be a classification model, and the target model is used to classify the input medical data. The sample category may refer to the prediction category corresponding to the historical medical data.

[0030] Specifically, after using the target model to classify the historical medical data, the classification prediction values ​​of the historical medical data for several preset categories are obtained, the classification prediction values ​​under the preset categories corresponding to the labels are determined, the negative logarithm of the classification prediction values ​​is taken, and the negative logarithm calculation result is used as the loss of the corresponding historical medical data, the losses of K historical medical data are added, and the addition result is determined to be the pre-training loss. Based on the pre-training loss, the parameters of the target model are pre-trained using the gradient descent method until the pre-training loss converges to obtain the pre-trained target model.

[0031] In this embodiment, labeled historical medical data is used to pre-train the target model so that the target model can learn the knowledge of historical medical data. This facilitates the subsequent update of the target model and the target model can process data based on the learned knowledge, effectively improving the reliability of subsequent model updates.

[0032] The above steps of obtaining a pre-trained target model can obtain a pre-trained target model capable of performing downstream tasks, which is convenient for subsequent model updates of the target model based on unlabeled data. In scenarios such as model migration, the target model can retain historically learned knowledge, thereby improving the generalization ability of the model after migration.

[0033] Step S202, traverse the M real-time medical data obtained, use the pre-trained target model to predict the probability that the real-time medical data belongs to N preset categories, obtain the classification probability corresponding to the preset category, determine the preset category corresponding to the maximum value of the classification probability as a pseudo label, and obtain the pseudo label corresponding to the real-time medical data.

[0034] Among them, M and N are both positive integers, real-time medical data may refer to medical data collected locally by the local client within the real-time time period, the preset category may refer to several classification categories corresponding to the downstream classification task, the classification probability may represent the possibility that the real-time medical data belongs to the corresponding preset category, and the pseudo label may be used as label data for the real-time medical data.

[0035] Specifically, each real-time medical data corresponds to N classification probabilities, and the preset category corresponding to the maximum classification probability is determined as the pseudo label corresponding to the real-time medical data.

[0036] Optionally, the M real-time medical data obtained are traversed, and the pre-trained target model is used to predict the probability that the real-time medical data belongs to N preset categories respectively, to obtain the classification probability of the corresponding preset category, including: Traverse M real-time medical data, use the pre-trained target model to predict the predicted values ​​of the real-time medical data corresponding to N preset categories, and obtain the predicted values ​​corresponding to the preset categories; According to the normalized exponential function, all predicted values ​​are normalized to obtain a normalized result corresponding to a preset category, and the normalized result corresponding to the preset category is determined as the classification probability of the corresponding preset category.

[0037] The predicted value may represent the possibility that the real-time medical data belongs to the corresponding preset category, and the result obtained by adding the normalized results of all preset categories is one.

[0038] Specifically, an exponential function is used to map each predicted value to obtain a mapping result, and all the mapping results are added together to obtain a total mapping result. For any predicted value, the mapping result corresponding to the predicted value is compared with the total mapping result, and the comparison result is used as the normalized result of the corresponding predicted value to obtain the normalized result of each predicted value, that is, the normalized result corresponding to the preset category.

[0039] In this embodiment, probability characterization is performed by normalization, which makes the subsequent loss function calculation process more convenient and accurate, avoids the situation where the loss function is abnormal due to excessive differences in predicted values, and thus improves the accuracy of model updating.

[0040] The above traversal obtains the M real-time medical data, uses the pre-trained target model to predict the probability that the real-time medical data belongs to N preset categories, obtains the classification probability corresponding to the preset category, determines the preset category corresponding to the maximum classification probability as a pseudo label, and obtains the pseudo label corresponding to the real-time medical data. By setting the pseudo label, the model update can be updated based on the unlabeled real-time medical data, which greatly reduces the labeling cost of the updated data while ensuring the accuracy of the model update.

[0041] Step S203, according to all pseudo labels and their corresponding classification probabilities, respectively, the classification loss corresponding to the classification loss function and the information entropy loss corresponding to the information entropy function are calculated through the classification loss function and the information entropy function.

[0042] Among them, the classification loss function can adopt the cross entropy loss function, the information entropy function can refer to the information entropy calculation formula, the classification loss can be used to supervise the accuracy of target model classification, and the information entropy loss can be used to supervise the distribution balance of the target model classification results in the feature space.

[0043] Optionally, the classification loss is calculated by a classification loss function based on all pseudo labels and their corresponding classification probabilities, including: For any preset category, the classification probability corresponding to each pseudo label belonging to the preset category is mapped to a logarithmic value through a preset logarithmic function; Add up all the logarithmic values ​​to get the sum, use the negative value of the sum as the classification sub-loss, traverse all the preset categories, get the classification sub-loss corresponding to the preset category, and determine the sum of all classification sub-losses as the classification loss.

[0044] Among them, the logarithmic function may refer to a logarithmic function with a preset value as the base, the preset value may be 10, the logarithmic value may refer to the result of mapping the classification probability through the logarithmic function, the classification sub-loss may refer to the loss corresponding to a single preset category, and the classification loss may refer to the loss corresponding to all preset categories.

[0045] Specifically, suppose that for the i-th preset category, pseudo-label belongs to the i-th preset category, then the classification sub-loss can be expressed as ,in, Can indicate the The classification probability corresponding to the pseudo labels.

[0046] Correspondingly, the classification loss It can be expressed as , where I is the number of preset categories.

[0047] It should be noted that the default reference value in this embodiment is 1, that is, the classification loss is essentially , Can represent reference values. In one embodiment, the classification probability can also be used as a reference value. In this case, the reference value for , that is, the classification probability, so that the larger the classification probability, the larger the reference value corresponding to the real-time medical data, that is, the greater the impact on the classification loss, thereby further improving the accuracy of updating the target model based on pseudo-labels.

[0048] In this embodiment, classification loss is used to supervise the update of the target model to ensure that the differences between different real-time medical data can be accurately determined when the target model is updated, thereby reducing the possibility of the model outputting uncertain results. For example, the probability that the output real-time medical data belongs to two preset categories is large and the two probabilities are close, thereby improving the classification performance of the model.

[0049] Optionally, the information entropy loss is calculated by an information entropy function based on all pseudo labels and their corresponding classification probabilities, including: For any preset category, the classification probabilities corresponding to all pseudo labels belonging to the preset category are averaged to obtain the reference probability of the preset category; The result obtained by mapping the reference probability through a preset logarithmic function is determined as a reference value, and the product of the reference value and the reference probability is used as the information entropy sub-loss of the preset category; All preset categories are traversed to obtain information entropy sub-losses corresponding to the preset categories, and the sum of all information entropy sub-losses is determined as the information entropy loss.

[0050] Among them, the reference probability can refer to the mean of the classification probabilities of all pseudo-labels under the corresponding preset category. The logarithmic function can still use a logarithmic function with base 10. The information entropy sub-loss can characterize the balance of the feature space distribution under the preset category. The more concentrated the feature space distribution under the preset category, the greater the information entropy sub-loss, that is, the closer to 0; the more dispersed the feature space distribution under the preset category, the smaller the information entropy sub-loss, that is, the farther away from 0.

[0051] Specifically, the information entropy loss It can be expressed as: Wherein, i may represent the i-th preset category, I may represent the total number of preset categories, It can represent the reference probability corresponding to the i-th preset category.

[0052] In this embodiment, information entropy loss is used to supervise the update of the target model to ensure that the feature distribution between all real-time medical data is balanced and dispersed when the target model is updated, avoiding overfitting of the target model due to the supervision of pseudo-labels. For example, all medical data are classified into the same preset category. At this time, it is premised on the prior condition that the real-time medical data meets the balanced distribution, thereby improving the classification performance of the target model after the model is updated under unsupervised conditions.

[0053] The above steps calculate the classification loss corresponding to the classification loss function and the information entropy loss corresponding to the information entropy function through the classification loss function and the information entropy function respectively according to all pseudo-labels and their corresponding classification probabilities, and supervise the subsequent model update through the classification loss and the information entropy loss, so as to ensure that the features corresponding to the real-time medical data in the feature space are evenly distributed and dispersed while ensuring the classification accuracy, and use the idea of ​​maximizing information entropy to realize the adaptation of the target model to the unlabeled real-time medical data, thereby improving the accuracy of the model after adaptive update.

[0054] Step S204: updating the pre-trained target model according to the classification loss and the information entropy loss to obtain an updated target model.

[0055] The updated target model may refer to a target model trained jointly by classification loss and information entropy loss.

[0056] Specifically, the classification loss and the information entropy loss are added to obtain the update loss. Based on the update loss, the parameters of the pre-trained target model are updated using the gradient descent method until the update loss converges to obtain an updated target model. The gradient descent method can use stochastic gradient descent, batch gradient descent, etc.

[0057] Optionally, the pre-trained target model is updated according to the classification loss and the information entropy loss to obtain an updated target model, including: The classification loss is multiplied by a preset first weight to obtain a first multiplication result, and the information entropy loss is multiplied by a preset second weight to obtain a second multiplication result; The sum of the first multiplication result and the second multiplication result is taken as the update loss, and the pre-trained target model is updated according to the update loss to obtain an updated target model.

[0058] Among them, the first weight can be used to control the influence of classification loss on update loss, the second weight can be used to control the influence of information entropy loss on update loss, the first multiplication result can refer to the weighted result of classification loss using the first weight, the first multiplication result can refer to the weighted result of information entropy loss using the second weight, and the update loss can refer to the loss used to guide the update of the pre-trained target model.

[0059] Specifically, in this embodiment, the first weight is set to 0.6 and the second weight is set to 0.4. The implementer can flexibly adjust the values ​​of the first weight and the second weight according to actual needs. For example, if the local client knows a priori that the medical data between the local client and the client providing the pre-trained target model are relatively close, the value of the first weight can be appropriately increased, such as setting the first weight to 0.8 and the second weight to 0.2; or if the local client knows a priori that the type distribution of real-time medical data is relatively dispersed, the value of the second weight can be appropriately increased, such as setting the first weight to 0.2 and the second weight to 0.8. It should be noted that in this embodiment, the sum of the first weight and the second weight is 1 to avoid excessive differences in the degree of influence of classification loss and information entropy loss on update loss.

[0060] In this embodiment, the classification loss and the information entropy loss are combined by weighted addition to obtain the update loss, so that the update loss can meet the actual needs of the implementer when guiding the update of the pre-trained target model, thereby improving the adaptive ability of the model update.

[0061] Optionally, the model adaptive updating method further includes: Perform clustering processing on M real-time medical data to obtain at least two cluster sets; Count the amount of real-time medical data in each cluster set, obtain the statistical value of the corresponding cluster set, calculate the variance of all statistical values, use a preset mapping function to map the variance to a second weight, and use the difference between the preset value and the second weight as the first weight. The mapping function includes a mapping relationship between the variance and the second weight.

[0062] Among them, the cluster set may include at least one real-time medical data, the statistical value may represent the number of real-time medical data in the corresponding cluster set, the variance may characterize the degree of fluctuation of the number of real-time medical data in each cluster set, and the preset mapping function includes a mapping relationship between the variance and the second weight. The preset value can be set to 1 in this embodiment.

[0063] Specifically, clustering processing can adopt density-based clustering algorithms, such as the DBSCAN clustering algorithm. This type of clustering algorithm does not require a preset number of cluster sets, and can be effectively applied to clustering tasks of unlabeled real-time medical data. Clustering processing requires measuring the distance between each two real-time medical data. The distance can be measured by distance metrics such as Euclidean distance and cosine similarity.

[0064] In one embodiment, feature extraction can be performed on each real-time medical data through a pre-trained target model to obtain the real-time features of the corresponding real-time medical data, and then the distance between the real-time features corresponding to each two real-time medical data can be measured for clustering processing, which can more effectively determine the low-level correlation of the real-time medical data in the feature space.

[0065] In this embodiment, the correlation between real-time medical data is roughly determined by clustering processing, and then the initial weights corresponding to the classification loss and information entropy loss are determined, which makes it convenient for implementers to adjust the weights with more reliable initial values, reduces the workload of weight adjustment, and thus improves the efficiency of the overall model update.

[0066] The above steps of updating the pre-trained target model according to the classification loss and the information entropy loss to obtain the updated target model realize the adaptive model update without any labeled data and ensure the model update effect, thereby improving the accuracy of the model after the adaptive update.

[0067] In this embodiment, pseudo labels are used to calculate the classification loss, and the information entropy loss is combined to supervise the balance of the feature space corresponding to the preset category, so that the adaptive model update can be achieved without the need for labeled data and the model update effect can be guaranteed. That is, while ensuring the low labeling cost, the accuracy of the model after adaptive update is improved.

[0068] Corresponding to the model adaptive updating method for medical data in the above embodiment, Figure 3 The structural block diagram of the model adaptive updating device for medical data provided by the second embodiment of the present invention is shown. The above-mentioned model adaptive updating device is applied to the server. The computer device corresponding to the server is connected to the local client to obtain real-time medical data and pre-trained target models from the local client. The real-time medical data can be unlabeled medical data collected locally by the local client, and the pre-trained target model can be a model with pre-trained parameters configured and transmitted to the local client by other clients. For the convenience of explanation, only the part related to the embodiment of the present invention is shown.

[0069] See also Figure 3 , the model adaptive updating device includes: A model acquisition module 31 is used to acquire a pre-trained target model, where the pre-trained target model is trained based on labeled historical medical data; The pseudo-label determination module 32 is used to traverse the M real-time medical data obtained, use the pre-trained target model to predict the probability that the real-time medical data belongs to N preset categories respectively, obtain the classification probability corresponding to the preset category, determine the preset category corresponding to the maximum classification probability as the pseudo-label, and obtain the pseudo-label corresponding to the real-time medical data, where M and N are both positive integers; A loss calculation module 33 is used to calculate the classification loss corresponding to the classification loss function and the information entropy loss corresponding to the information entropy function through the classification loss function and the information entropy function according to all pseudo labels and their corresponding classification probabilities; The model updating module 34 is used to update the pre-trained target model according to the classification loss and the information entropy loss to obtain an updated target model.

[0070] Optionally, the loss calculation module 33 includes: A logarithmic mapping unit, for mapping the classification probability corresponding to each pseudo label belonging to a preset category into a logarithmic value by a preset logarithmic function for any preset category; The first loss determination unit is used to add all logarithmic values ​​to obtain an addition result, use the negative value of the addition result as the classification sub-loss, traverse all preset categories, obtain the classification sub-loss corresponding to the preset category, and determine the sum of all classification sub-losses as the classification loss.

[0071] Optionally, the loss calculation module 33 includes: A mean calculation unit, for calculating the mean of the classification probabilities corresponding to all pseudo labels belonging to any preset category, to obtain a reference probability of the preset category; A sub-loss determination unit, used to determine a result obtained by mapping the reference probability through a preset logarithmic function as a reference value, and to use the product of the reference value and the reference probability as an information entropy sub-loss of a preset category; The second loss determination unit is used to traverse all preset categories, obtain information entropy sub-losses corresponding to the preset categories, and determine the sum of all information entropy sub-losses as the information entropy loss.

[0072] Optionally, the pseudo-label determination module 32 includes: A model prediction unit, used to traverse M real-time medical data, use the pre-trained target model to predict the prediction values ​​of the real-time medical data corresponding to N preset categories, and obtain the prediction values ​​corresponding to the preset categories; The normalization unit is used to normalize all predicted values ​​according to a normalized exponential function to obtain a normalized result corresponding to a preset category, and determine the normalized result corresponding to the preset category as the classification probability of the corresponding preset category.

[0073] Optionally, the model updating module 34 includes: A weighting unit, used for multiplying the classification loss by a preset first weight to obtain a first multiplication result, and multiplying the information entropy loss by a preset second weight to obtain a second multiplication result; The update loss determination unit is used to use the sum of the first multiplication result and the second multiplication result as the update loss, and update the pre-trained target model according to the update loss to obtain an updated target model.

[0074] Optionally, the model updating module 34 further includes: A cluster processing unit, used for performing cluster processing on the M real-time medical data to obtain at least two cluster sets; A weight mapping unit is used to count the amount of real-time medical data in each cluster set, obtain the statistical value of the corresponding cluster set, calculate the variance of all statistical values, use a preset mapping function to map the variance to a second weight, and use the difference between the preset value and the second weight as the first weight. The mapping function includes a mapping relationship between the variance and the second weight.

[0075] Optionally, the above-mentioned model adaptive updating device further includes: The sample classification module is used to obtain K historical medical data and their corresponding labels, and use the target model to classify each historical medical data to obtain the sample category of the corresponding historical medical data; The model pre-training module is used to train the target model according to K groups of sample categories and labels that have corresponding relationships, and obtain a pre-trained target model.

[0076] It should be noted that the information interaction, execution process and other contents between the above-mentioned modules and units are based on the same concept as the embodiment of the method of the present invention. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0077] Figure 4 This is a schematic diagram of the structure of a computer device provided in Embodiment 3 of the present invention. Figure 4 As shown, the computer device of this embodiment includes: at least one processor ( Figure 4 Only one is shown in the figure), a memory, and a computer program stored in the memory and executable on at least one processor, wherein when the processor executes the computer program, the steps in any of the above-mentioned embodiments of the model adaptive updating method are implemented.

[0078] The computer device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that Figure 4This is merely an example of a computer device and does not constitute a limitation on the computer device. The computer device may include more or fewer components than those shown in the figure, or a combination of certain components, or different components. For example, it may also include a network interface, a display screen, and an input device.

[0079] The processor may be a CPU, or other general-purpose processors, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0080] The memory includes a readable storage medium, an internal memory, etc., wherein the internal memory may be the memory of a computer device, and the internal memory provides an environment for the operation of the operating system and computer-readable instructions in the readable storage medium. The readable storage medium may be a hard disk of a computer device, and in other embodiments, it may also be an external storage device of the computer device, for example, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device. Further, the memory may also include both an internal storage unit of the computer device and an external storage device. The memory is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of a computer program, etc. The memory may also be used to temporarily store data that has been output or is to be output.

[0081] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention. The specific working process of the units and modules in the above-mentioned device can refer to the corresponding process in the above-mentioned method embodiment, which will not be repeated here. If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned method embodiment can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device capable of carrying computer program code, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0082] The present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by a computer program product. When the computer program product runs on a computer device, the computer device can implement the steps in the above-mentioned method embodiment when executing.

[0083] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0084] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0085] In the embodiments provided by the present invention, it should be understood that the disclosed devices / computer equipment and methods can be implemented in other ways. For example, the device / computer equipment embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0086] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0087] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such 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 invention, and should be included in the protection scope of the present invention.

Claims

1. A model adaptive updating method for medical data, characterized in that: The model adaptive updating method comprises: Obtaining a pre-trained target model, where the pre-trained target model is trained based on labeled historical medical data; Traversing the M real-time medical data obtained, using the pre-trained target model to predict the probability that the real-time medical data belongs to N preset categories respectively, obtaining the classification probability corresponding to the preset category, determining the preset category corresponding to the maximum value of the classification probability as a pseudo label, and obtaining the pseudo label corresponding to the real-time medical data, where M and N are both positive integers; According to all pseudo labels and their corresponding classification probabilities, the classification loss corresponding to the classification loss function and the information entropy loss corresponding to the information entropy function are calculated through the classification loss function and the information entropy loss respectively; The pre-trained target model is updated according to the classification loss and the information entropy loss to obtain an updated target model.

2. The model adaptive updating method according to claim 1, characterized in that: According to all pseudo labels and their corresponding classification probabilities, the classification loss is calculated by the classification loss function, including: For any preset category, the classification probability corresponding to each pseudo label belonging to the preset category is mapped into a logarithmic value by a preset logarithmic function; All logarithmic values ​​are added to obtain an addition result, and the negative value of the addition result is used as the classification sub-loss. All preset categories are traversed to obtain the classification sub-loss corresponding to the preset category, and the sum of all classification sub-losses is determined as the classification loss.

3. The model adaptive updating method according to claim 1, characterized in that: According to all pseudo labels and their corresponding classification probabilities, the information entropy loss is calculated by the information entropy function, including: For any preset category, the classification probabilities corresponding to all pseudo labels belonging to the preset category are averaged to obtain a reference probability of the preset category; Determine a result obtained by mapping the reference probability through a preset logarithmic function as a reference value, and use the product of the reference value and the reference probability as the information entropy sub-loss of the preset category; All preset categories are traversed to obtain information entropy sub-losses corresponding to the preset categories, and the sum of all information entropy sub-losses is determined as the information entropy loss.

4. The model adaptive updating method according to claim 1, characterized in that: The traversing of the M real-time medical data obtained, using the pre-trained target model to predict the probability that the real-time medical data belongs to N preset categories respectively, and obtaining the classification probability of the corresponding preset category, includes: Traversing the M real-time medical data, using the pre-trained target model to predict predicted values ​​of the real-time medical data corresponding to N preset categories, to obtain predicted values ​​corresponding to the preset categories; According to the normalized exponential function, all predicted values ​​are normalized to obtain a normalized result corresponding to a preset category, and the normalized result corresponding to the preset category is determined as the classification probability of the corresponding preset category.

5. The model adaptive updating method according to claim 1, characterized in that: The step of updating the pre-trained target model according to the classification loss and the information entropy loss to obtain an updated target model includes: Multiplying the classification loss by a preset first weight to obtain a first multiplication result, and multiplying the information entropy loss by a preset second weight to obtain a second multiplication result; The sum of the first multiplication result and the second multiplication result is used as the update loss, and the pre-trained target model is updated according to the update loss to obtain the updated target model.

6. The model adaptive updating method according to claim 5, characterized in that: The model adaptive updating method also includes: Performing clustering processing on the M real-time medical data to obtain at least two cluster sets; Count the amount of real-time medical data in each cluster set to obtain the statistical value of the corresponding cluster set, calculate the variance of all statistical values, use a preset mapping function to map the variance to the second weight, and use the difference between the preset value and the second weight as the first weight, and the mapping function includes a mapping relationship between the variance and the second weight.

7. The model adaptive updating method according to any one of claims 1 to 6, characterized in that: The model adaptive updating method also includes: Obtain K pieces of the historical medical data and their corresponding labels, and classify each piece of the historical medical data using the target model to obtain a sample category of the corresponding historical medical data; The target model is trained according to K groups of sample categories and labels that have corresponding relationships to obtain the pre-trained target model.

8. A model adaptive updating device for medical data, characterized in that: The model adaptive updating device comprises: A model acquisition module, used to acquire a pre-trained target model, wherein the pre-trained target model is trained based on labeled historical medical data; A pseudo-label determination module is used to traverse the M real-time medical data obtained, use the pre-trained target model to predict the probability that the real-time medical data belongs to N preset categories respectively, obtain the classification probability corresponding to the preset category, determine the preset category corresponding to the maximum value of the classification probability as a pseudo-label, and obtain the pseudo-label corresponding to the real-time medical data, where M and N are both positive integers; A loss calculation module is used to calculate the classification loss of the corresponding classification loss function and the information entropy loss of the corresponding information entropy function through the classification loss function and the information entropy function according to all pseudo labels and their corresponding classification probabilities; The model updating module is used to update the pre-trained target model according to the classification loss and the information entropy loss to obtain an updated target model.

9. A computer device, characterized in that: The computer device includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the model adaptive updating method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the model adaptive updating method according to any one of claims 1 to 7 is implemented.