Medical data processing method and system
By adopting weighted average aggregation and personalized aggregation processing methods in the medical field, the deviation problem of traditional federated learning algorithms under non-independent and homogeneous data is solved, and efficient, precise processing of medical data and the improvement of personalized models is achieved, and more accurate medical information is provided.
Patent Information
- Application Number
- CN202411823582.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2044-12-12
AI Technical Summary
When traditional federated learning algorithms process non-independent and homogeneous medical data, the prediction results of the model are prone to huge deviations, and the personalized model performs poorly on sensitivity and specificity indicators.
A medical data processing method is proposed. By training local models based on local data by local hospitals, cloud servers perform weighted average aggregation and personalized aggregation processing, forming a target model with specified functions for classification and prediction of medical information.
It realizes efficient and high-precision processing of medical data, improves the response effect of different functional requirements, provides more convenient and more appropriate medical information, and provides medical personnel and patients with more accurate diagnosis and prediction results.
Smart Images

Figure CN119296813B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer technology, and in particular relates to a medical data processing method and system. Background Art
[0002] With the development of artificial intelligence, deep learning models are gaining more and more attention in the medical field. Deep learning is very suitable for efficiently processing large amounts of high-quality medical data generated by hospitals. The bridge between deep learning and multi-center medical data is federated learning, which allows machines to learn common and private features of data from different hospitals in a privacy-preserving way. However, traditional federated learning algorithms do not work well when encountering non-independent and identically distributed data, such as FedAvg. These algorithms aggregate a unified model, and once the data distribution of the input data when making decisions is very different from the data distribution when they were trained, it is easy to cause huge deviations in the model's prediction results. For example, the amount of opioids and non-opioid drugs needs to be adjusted according to different ethnic groups. Even if clinicians follow the same clinical operating guidelines, it is inappropriate to use the same treatment plan for different ethnic groups and ignore ethnic differences. This phenomenon may be caused by the different demographic distributions caused by the different geographical environments of hospitals.
[0003] People in different fields have been looking for solutions to these problems and have achieved relatively good results in terms of the accuracy of aggregate models. Among them, personalized methods are the most common solution to overcome the problems caused by non-independent and homogeneous data. There are many personalized scenarios in medicine similar to those mentioned above, so when hospitals participate in federated learning, they should conduct personalized aggregate models. This personalized model adapts to the local data distribution and has better accuracy. However, the medical community does not fully recognize the accuracy of aggregate models because other balance indicators, such as sensitivity and specificity, are also very valuable. Although the accuracy of personalized models is higher than that of traditional aggregate models, many personalized models are at a disadvantage when comparing sensitivity and specificity indicators. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a medical data processing method and system, which are applied to the medical field model to achieve efficient and high-precision processing of medical data and improve the response effect of different functional requirements in the medical field.
[0005] The present invention provides a method for processing medical data, comprising:
[0006] The local hospital trains a local model based on local medical data to obtain first encoder parameters, wherein the local model is composed of a plurality of sub-encoders and a decoder, and each of the sub-encoders focuses on a different type of data;
[0007] The cloud server obtains the first encoder parameters sent by each of the local hospitals, and performs weighted average aggregation processing on the first encoder parameters to obtain aggregated encoder parameters;
[0008] The local hospital obtains the aggregated encoder parameters sent by the cloud server, and trains the local local model based on the aggregated encoder parameters to obtain first decoder parameters;
[0009] The cloud server obtains the first decoder parameters sent by each of the local hospitals, and performs personalized aggregation processing on the first decoder parameters based on the calculated personalized aggregation degree to obtain a plurality of different aggregated decoder parameters;
[0010] The cloud server sends aggregate decoder parameters matching the local models to the corresponding local hospitals based on the features of the local models trained by each of the local hospitals;
[0011] The local hospital updates the local partial model based on the obtained aggregate decoder parameters to obtain a target model with specified functions, wherein the specified functions include classification and prediction of medical information;
[0012] Input the data to be processed into the target model to obtain the processing results.
[0013] In some embodiments, the loss function of the sub-encoder is for:
[0014]
[0015] in, represents the divergence, Indicates Sub-encoders, Representative The parameters of the sub-encoder , represents the number of categories, Represents the input data, Indicates a label.
[0016] In some embodiments, when the task performed by the local model is a classification task, the divergence is expressed as:
[0017]
[0018] in, Indicates that The sub-encoder extracts Features, Depend on scalar labels, represents the real number space, , , represents the number of features extracted by a sub-encoder, represents the standard deviation function, is a coefficient, and the task is related to the specified function.
[0019] In some embodiments, when the task performed by the local model is a segmentation task, the divergence is expressed as:
[0020]
[0021] in, Indicates The sub-encoder The features output by each module are Indicates The final depth of the sub-encoder is Indicates The average pooling of the inputs is The characteristics are consistent, the tasks described are related to the specified functions, is the coefficient.
[0022] In some embodiments, the loss function of the local model is formed by a risk loss function and a loss function of a sub-encoder, and the risk loss function is a cross entropy loss function.
[0023] In some embodiments, the method further comprises:
[0024] The cloud server determines data distribution difference information about each of the local models based on one or more of the training data sent by each of the local hospitals, the task requirements of the local model, and the training process data;
[0025] The personalized aggregation degree is determined based on the data distribution difference information and task requirements.
[0026] In some embodiments, performing personalized aggregation processing on the first decoder parameter based on the calculated personalized aggregation degree includes:
[0027] Determining a selection function based on the calculated personalized aggregation degree;
[0028] The first decoder parameters are personalized and aggregated based on the selection function and the following formula:
[0029]
[0030] in, represents the aggregate encoder parameters, which are After rounds of aggregation iterations, it is sent to the local hospital, and its location in the model in the cloud server is the same as the The local hospitals are located in the same position in the local model. Indicated by After the first iteration The first decoder parameters returned by the local model, represents the average value of all first decoder parameters, represents a vector consisting of the model parameters of all local models at the same location, represents the parameter divergence consisting of the aggregated decoder parameters at the same position in different local models, is a scalar, Represents the selection function corresponding to the divergence of the parameters.
[0031] In some embodiments, performing weighted average aggregation processing on the first encoder parameter includes:
[0032] The first encoder parameter is subjected to weighted average aggregation processing based on the following formula:
[0033]
[0034] in, Represents the aggregated parameters in the sub-encoder, Indicates The first local hospital The number of categories, and Indicates The total number of samples in each category, Indicates that after local iteration, The first local hospital The parameters of the sub-encoder.
[0035] In some embodiments, the specified functions include classification and prediction based on the patient's clinical data;
[0036] The step of inputting the data to be processed into the target model to obtain the processing result includes:
[0037] Obtaining diagnostic information and examination results of a target patient, wherein the diagnostic information includes information on the predicted disease type;
[0038] The diagnostic information and examination results are input into the target model to obtain a prediction result that characterizes the degree of matching between the physical condition of the target patient and the predicted disease type.
[0039] Another embodiment of the present invention also provides a medical data processing system, including a cloud server and a data system of multiple local hospitals, wherein:
[0040] The local hospital trains a local model based on local medical data to obtain first encoder parameters, wherein the local model is composed of a plurality of sub-encoders and a decoder, and each sub-encoder focuses on a different type of data;
[0041] The cloud server obtains the first encoder parameters sent by each of the local hospitals, and performs weighted average aggregation processing on the first encoder parameters to obtain aggregated encoder parameters;
[0042] The local hospital obtains the aggregated encoder parameters sent by the cloud server, and trains the local local model based on the aggregated encoder parameters to obtain first decoder parameters;
[0043] The cloud server obtains the first decoder parameters sent by each of the local hospitals, and performs personalized aggregation processing on the first decoder parameters based on the calculated personalized aggregation degree to obtain a plurality of different aggregated decoder parameters;
[0044] The cloud server sends aggregate decoder parameters matching the local models to the corresponding local hospitals based on the features of the local models trained by each of the local hospitals;
[0045] The local hospital updates the local partial model based on the obtained aggregate decoder parameters to obtain a target model with specified functions, wherein the specified functions include classification and prediction of medical information;
[0046] Input the data to be processed into the target model to obtain the processing results.
[0047] The beneficial effect of the present invention lies in that by proposing a shared learning architecture for medical data in various local hospitals, the local models used to perform different functional tasks in various local hospitals can obtain more accurate parameters, so that the target model formed by training can process the input data efficiently and accurately based on the parameters, and obtain results with greater reference value, including analysis and identification of patients' medical data, prediction of disease types, prediction of disease levels, prediction of recovery levels, etc., providing medical staff and patients with more convenient and more actual medical information.
[0048] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings.
[0049] The technical solution of the present application is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0051] Figure 1 Schematic diagram of the process of medical data processing in an embodiment of the present invention.
[0052] Figure 2 FIG. 4 is a flow chart of a medical data processing method in another embodiment of the present invention.
[0053] Figure 3 FIG. 4 is a flow chart of a medical data processing method in another embodiment of the present invention.
[0054] Figure 4 1 is a structural diagram of a medical data processing system in an embodiment of the present invention. DETAILED DESCRIPTION
[0055] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings, but are not intended to limit the present invention.
[0056] It should be understood that various modifications may be made to the embodiments disclosed herein. Therefore, the following description should not be considered as limiting, but merely as an example of an embodiment. Other modifications within the scope of the present disclosure will occur to those skilled in the art.
[0057] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the general description of the present disclosure given above and the detailed description of the embodiments given below, serve to explain the principles of the present disclosure.
[0058] These and other characteristics of the invention will become apparent from the following description of a preferred form of embodiment given as a non-limiting example, with reference to the accompanying drawings.
[0059] It should also be understood that, although the invention has been described with reference to some specific examples, those skilled in the art will be able to realize many other equivalent forms of the invention that have the characteristics recited in the claims and are therefore within the scope of protection defined thereby.
[0060] The above and other aspects, features and advantages of the present disclosure will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings.
[0061] Specific embodiments of the present disclosure are described hereinafter with reference to the accompanying drawings; however, it should be understood that the disclosed embodiments are merely examples of the present disclosure, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid obscuring the present disclosure with unnecessary or redundant details. Therefore, the specific structural and functional details disclosed herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present disclosure in a variety of ways with substantially any suitable detailed structure.
[0062] This specification may use the phrases "in one embodiment," "in another embodiment," "in a further embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present disclosure.
[0063] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0064] like Figure 1 As shown, the present invention provides a medical data processing method, comprising:
[0065] S1: The local hospital trains a local model based on local medical data to obtain first encoder parameters, wherein the local model is composed of a plurality of sub-encoders and a decoder, and each sub-encoder focuses on a different type of data;
[0066] S2: The cloud server obtains the first encoder parameters sent by each of the local hospitals, and performs weighted average aggregation processing on the first encoder parameters to obtain aggregated encoder parameters;
[0067] S3: The local hospital obtains the aggregated encoder parameters sent by the cloud server, and trains the local local model based on the aggregated encoder parameters to obtain first decoder parameters;
[0068] S4: the cloud server obtains the first decoder parameters sent by each of the local hospitals, and performs personalized aggregation processing on the first decoder parameters based on the calculated personalized aggregation degree to obtain a plurality of different aggregated decoder parameters;
[0069] S5: the cloud server sends the aggregated decoder parameters matching the local models to the corresponding local hospitals based on the features of the local models trained by each of the local hospitals;
[0070] S6: The local hospital updates the local partial model based on the obtained aggregate decoder parameters to obtain a target model with a specified function, wherein the specified function includes classification screening of medical information;
[0071] S7: Input the data to be processed into the target model to obtain the processing result.
[0072] The above-mentioned local models are composed of multiple sub-encoders and a decoder, and each local model is used to train to become a target model that can perform specified tasks and has specified functions. The specified task and the specified function match, for example, can be but not limited to the analysis and identification of the patient's medical data, prediction of the type of disease, prediction of the disease level, prediction of the degree of recovery, etc. The scheme described in this embodiment proposes a shared learning architecture for medical data in various local hospitals, so that the local models used to perform different functional tasks in various local hospitals can obtain more accurate parameters, so that the target model formed by training can process the input data efficiently and accurately based on the parameters, and obtain more reference-worthy results, providing medical staff and patients with more convenient and more practical medical information.
[0073] Specifically, in this embodiment, the encoder of the local model is divided into several sub-encoders with fewer parameters. At the same time, a new loss function matching this structure is designed for the encoder to extract more representative features. According to the difference in parameters, the personalized method proposed in this embodiment divides the parameters into universal parameters and personalized parameters. The difference between the parameters in all local hospitals indicates how much global information the parameter contains. Universal parameters generally have global information, and their performance differences on different local models are small, while personalized parameters have local information of different local models, and the local parameters of different local models differ greatly. The sub-encoders formed by dividing the encoder in each local model are conducive to extracting more universal features. Moreover, the separated sub-encoders can be more stable and are not easily disturbed by large sample data to change parameters. In addition, the scheme of this embodiment also proposes a loss function for the sub-encoder, and uses the loss function to focus the attention of the sub-encoder on different categories of data respectively. The loss function forces the sub-encoder to extract representative features from the corresponding data category. That is, the ability of the sub-encoder to extract representative features is enhanced by the above loss function. At the same time, the interference of large sample data on the encoder is weakened, and the ability of the encoder to extract features of small sample data is enhanced. This processing on the encoder described in this embodiment not only maintains the sensitivity and specificity of the aggregated model, but also enhances their generalization ability. In terms of the personalized method, the cloud server aggregates the decoder in a personalized way. Unlike the encoder, the prediction probability generated by the decoder is more susceptible to the distribution of data. Due to the imbalanced data distribution, some representative features mainly exist in certain local data, which leads to significant differences in the decoders of different local models. In order to adapt the aggregated model to the local data distribution, this embodiment aggregates the decoder in a personalized way. The parameters of the decoder are divided into two parts, including personalized and universal parts, which can be distinguished by the degree of parameter difference between the models. When the parameter differences in the local decoders are small, they contain more global information, making the universal parameters more generalized, and when the differences are large, the parameters tend to be personalized aggregation, so that they can still maintain their local information in different local models, improving the accuracy of the local model.
[0074] Furthermore, in this embodiment, when the parameters involved in the local model are divided into global parameters and personalized parameters, the divergence is used as an indicator to judge the global parameters or personalized parameters. Global parameters mainly contain global information that is stable in different clients. On the contrary, personalized parameters have local information that varies with different local hospitals and different local models. For example, the part trained by local data is regarded as personalized, while the other part aggregated by the cloud server is regarded as global. The method proposed in this embodiment can be implemented based on relatively simple calculations and fewer computing resources, and has strong scalability, and its computing load only increases linearly with the increase of participating local models.
[0075] Specifically, the loss function of the sub-encoder in this embodiment is for:
[0076]
[0077] in, represents the divergence, Indicates Sub-encoders, Representative The parameters of the sub-encoder , represents the number of categories, Represents the input data, Indicates a label.
[0078] By introducing divergence into the loss function, the relationship between the local model learning ability and the number of samples can be weakened, and the generalization ability of the local extracted features can be enhanced. When the generated target model can more easily distinguish the minority group and maintain its classification ability for the majority group, its performance in terms of sensitivity and specificity will be effectively improved.
[0079] In deep learning, different training data make the local model's learning tasks different, including classification tasks and segmentation tasks. In the classification task, the sub-encoder generates features belonging to one type of data, but in the segmentation task, the features of all targets may exist in one output. When the local model performs the classification task, the divergence is expressed as:
[0080]
[0081] in, Indicates that The sub-encoder extracts Features, Y Depend on scalar labels, , , R represents the real number space, Nrepresents the number of features extracted by a sub-encoder, represents the standard deviation function, is a coefficient, and the task is related to the specified function.
[0082] The standard deviation function is expressed as: ;
[0083] In the classification task, each category can be extracted as N unique features. If their differences are small, then in new data, the change in the feature should be small, and the feature may be more representative. In order to draw the attention of the sub-encoder to the degree of feature divergence, the coefficient is defined as : ,in, For personalized aggregation, Represents a unit pulse sequence, specifically: In medical scenarios, disease screening requires models with higher accuracy, which is reflected in the formula The value is higher, and the diagnosis of diseases requires the model to have higher specificity, which is reflected in the formula as At the same time, for data with large distribution differences, the model requires a higher degree of personalization, which is reflected in the formula: The value is higher, otherwise Lower value.
[0084] The segmentation task is different from the classification task because all the features of the target are present in one output. When the local model performs the segmentation task, the divergence is expressed as:
[0085]
[0086] in, , Indicates The sub-encoder The features output by each module are Indicates The final depth of the sub-encoder is Indicates The average pooling of the inputs is The features are consistent and the tasks are related to the specified functions.
[0087] The reason for using average pooling in this embodiment is that the relative position of the target is unchanged in the output of the sub-encoder, which is a tensor with different scales. Using a large coefficient to normalize the background and a small focusing coefficient to attract the attention of the sub-encoder to the representative features can effectively improve the learning effect of the local model. For the target and background existing in a tensor, the divergence of the features extracted by the background will be smaller under the influence of the large difference between the target and background coefficients. Therefore, the coefficients are designed in this embodiment. for: .in, represents a hyperparameter that determines how different the coefficients are between the target and background, represents the input, in matrix form, This difference is magnified. Standard deviation function Similar to the previous formula, but attention should be paid to the input of the function , with the characteristics The same size. In this embodiment, Represents input The average value of .
[0088] Since the local model is composed of a sub-encoder and a decoder, the loss function of the local model is formed by the risk loss function and the loss function of the sub-encoder. The risk loss function is a cross entropy loss function, which is specifically expressed as:
[0089]
[0090] in, Denotes the risk loss function, which usually uses the cross entropy loss function. The risk loss function mainly attracts the sub-encoder to pay attention to the separable features. Denotes the divergence loss function. When the sub-encoder only uses the cross entropy loss function, the features it captures may not be generalized because it only focuses on the separability of features in the training data. Therefore, in order to avoid loss, the present embodiment adds a divergence loss, that is, the above-mentioned loss function containing divergence, to re-attract the sub-encoder's attention to feature generalization.
[0091] Further, such as Figure 2 As shown, the method also includes:
[0092] S8: The cloud server determines data distribution difference information about each of the local models based on one or more of the training data sent by each of the local hospitals, the task requirements of the local model, and the training process data;
[0093] S9: Determine the personalized aggregation degree based on the data distribution difference information and task requirements.
[0094] Although the feature divergence extracted by the sub-encoder is small, the distribution of the features will not change due to the unchanged category distribution. Since the decoder after the sub-encoder only uses the entropy cross loss function, it will be seriously affected by the feature distribution. Therefore, this embodiment proposes personalized aggregation of decoder parameters to adapt to the distribution of these features, and the personalized aggregation processing of the first decoder parameters based on the calculated personalized aggregation degree includes:
[0095] S10: determining a selection function based on the calculated personalized aggregation degree;
[0096] S11: Performing personalized aggregation processing on the first decoder parameters based on the selection function and the following formula:
[0097]
[0098] in, represents the aggregate encoder parameters, which are After rounds of aggregation iterations, it is sent to the local hospital, and its location in the model in the cloud server is the same as the The local hospitals are located in the same position in the local model. Indicated by After the first iteration The first decoder parameters returned by the local model, represents the average value of all first decoder parameters, represents a vector consisting of the model parameters of all local models at the same location, represents the parameter divergence consisting of the aggregated decoder parameters at the same position in different local models, is a scalar, Represents the selection function corresponding to the divergence of the parameters.
[0099] The selection function is expressed as: if , then in g = 1, which means averaging the local parameters when the deviation is small. , indicating that the local parameters are linearly guided by the mean. g = 0, which means that when the deviation is large, the local parameter is a personalized value. In this embodiment, it is preferred to set , is a hyperparameter. When we think bit personalization parameter, and when hour, is a global parameter. As the aggregation proceeds, the divergence of the parameter will become more significant. At the end of the aggregation, it will produce more personalized parameters. This phenomenon is beneficial to aggregation because at the beginning of the aggregation, the model is not well trained and more global parameters are needed to guide the model's learning of local data.
[0100] The performing weighted average aggregation processing on the first encoder parameter includes:
[0101] S12: Perform weighted average aggregation processing on the first encoder parameter based on the following formula:
[0102]
[0103] in, Represents the aggregated parameters in the sub-encoder, Indicates The first local hospital The number of categories, and Indicates The total number of samples in each category, Indicates that after local iteration, The first local hospital The parameters of the sub-encoder.
[0104] In actual application, each central hospital obtains the aggregate encoder parameters and aggregate decoder parameters, and then updates the local model formed as the aggregate model of the current learning. When applied, the learning process of the above parameters needs to be iterated multiple times to finally obtain a personalized aggregate model, that is, the target model.
[0105] The designated functions in this embodiment include identification and classification of diseases based on the patient's clinical data, and may also be other types of tasks, the specifics of which are uncertain;
[0106] like Figure 3 As shown, the data to be processed is input into the target model to obtain the processing result, including:
[0107] S13: Obtaining diagnostic information and examination results of the target patient, wherein the diagnostic information includes information on predicted disease types;
[0108] S14: Input the diagnostic information and examination results into the target model to obtain a prediction result that characterizes the degree of matching between the target patient's physical condition and the predicted disease type.
[0109] For example, the patient's symptom information recorded by the doctor during the medical consultation, the diagnosis information made by the doctor, and the various examinations done by the patient, including blood, urine, CT images, etc., are input into the target model. The target model analyzes and processes the input data to determine the diseases the patient may have, the extent of the current disease, and other prediction results.
[0110] like Figure 4 As shown, another embodiment of the present invention also provides a medical data processing system, a cloud server and a data system of multiple local hospitals, wherein:
[0111] The local hospital trains a local model based on local medical data to obtain first encoder parameters, wherein the local model is composed of a plurality of sub-encoders and a decoder, and each sub-encoder focuses on a different type of data;
[0112] The cloud server obtains the first encoder parameters sent by each of the local hospitals, and performs weighted average aggregation processing on the first encoder parameters to obtain aggregated encoder parameters;
[0113] The local hospital obtains the aggregated encoder parameters sent by the cloud server, and trains the local local model based on the aggregated encoder parameters to obtain first decoder parameters;
[0114] The cloud server obtains the first decoder parameters sent by each of the local hospitals, and performs personalized aggregation processing on the first decoder parameters based on the calculated personalized aggregation degree to obtain a plurality of different aggregated decoder parameters;
[0115] The cloud server sends aggregate decoder parameters matching the local models to the corresponding local hospitals based on the features of the local models trained by each of the local hospitals;
[0116] The local hospital updates the local partial model based on the obtained aggregate decoder parameters to obtain a target model with specified functions, wherein the specified functions include classification and prediction of medical information;
[0117] Input the data to be processed into the target model to obtain the processing results.
[0118] In some embodiments, the loss function of the sub-encoder is for:
[0119]
[0120] in, represents the divergence, Indicates Sub-encoders, Representative The parameters of the sub-encoder , represents the number of categories, Represents the input data, Indicates a label.
[0121] In some embodiments, when the task performed by the local model is a classification task, the divergence is expressed as:
[0122]
[0123] in, Indicates that The sub-encoder extracts Features, Depend on scalar labels, , , R represents the real number space, N represents the number of features extracted by a sub-encoder, represents the standard deviation function, is a coefficient, and the task is related to the specified function.
[0124] In some embodiments, when the task performed by the local model is a segmentation task, the divergence is expressed as:
[0125]
[0126] in, Indicates The sub-encoder The features output by each module are Indicates The final depth of the sub-encoder is Indicates The average pooling of the inputs is The characteristics are consistent, the tasks described are related to the specified functions, β (·) is the coefficient.
[0127] In some embodiments, the loss function of the local model is formed by a risk loss function and a loss function of a sub-encoder, and the risk loss function is a cross entropy loss function.
[0128] In some embodiments, the cloud server determines data distribution difference information about each of the local models based on one or more of the training data sent by each of the local hospitals, the task requirements of the local model, and the training process data;
[0129] The personalized aggregation degree is determined based on the data distribution difference information and task requirements.
[0130] In some embodiments, performing personalized aggregation processing on the first decoder parameter based on the calculated personalized aggregation degree includes:
[0131] Determining a selection function based on the calculated personalized aggregation degree;
[0132] The first decoder parameters are personalized and aggregated based on the selection function and the following formula:
[0133]
[0134] in, represents the aggregate encoder parameters, which are After rounds of aggregation iterations, it is sent to the local hospital, and its location in the model in the cloud server is the same as the The local hospitals are located in the same position in the local model. Indicated by After the first iteration The first decoder parameters returned by the local model, represents the average value of all first decoder parameters, represents a vector consisting of the model parameters of all local models at the same location, represents the parameter divergence consisting of the aggregated decoder parameters at the same position in different local models, is a scalar, Represents the selection function corresponding to the divergence of the parameters.
[0135] In some embodiments, performing weighted average aggregation processing on the first encoder parameter includes:
[0136] The first encoder parameter is subjected to weighted average aggregation processing based on the following formula:
[0137]
[0138] in, Represents the aggregated parameters in the sub-encoder, Indicates The first local hospital The number of categories, and Indicates The total number of samples in each category, Indicates that after local iteration, The first local hospital The parameters of the sub-encoder.
[0139] In some embodiments, the specified functions include classification and prediction based on the patient's clinical data;
[0140] The step of inputting the data to be processed into the target model to obtain the processing result includes:
[0141] Obtaining diagnostic information and examination results of a target patient, wherein the diagnostic information includes information on the predicted disease type;
[0142] The diagnostic information and examination results are input into the target model to obtain a prediction result that characterizes the degree of matching between the physical condition of the target patient and the predicted disease type.
[0143] In addition, it should be understood by those skilled in the art that the embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program codes.
[0144] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A system that specifies the functions of a box or multiple boxes.
[0145] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction system, which is implemented in the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0146] A person skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of protection of the present application is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of different aspects of one or more embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.
Claims
1. A medical data processing method, characterized in that: include: The local hospital trains a local model based on local medical data to obtain first encoder parameters, wherein the local model is composed of a plurality of sub-encoders and a decoder, and each of the sub-encoders focuses on a different type of data; The cloud server obtains the first encoder parameters sent by each of the local hospitals, and performs weighted average aggregation processing on the first encoder parameters to obtain aggregated encoder parameters; The local hospital obtains the aggregated encoder parameters sent by the cloud server, and trains the local local model based on the aggregated encoder parameters to obtain first decoder parameters; The cloud server obtains the first decoder parameters sent by each of the local hospitals, and performs personalized aggregation processing on the first decoder parameters based on the calculated personalized aggregation degree to obtain a plurality of different aggregated decoder parameters; The cloud server sends target aggregate decoder parameters matching the local models to the corresponding local hospitals based on the features of the local models trained by each of the local hospitals; The local hospital updates the local partial model based on the obtained target aggregate decoder parameters to obtain a target model with a specified function, wherein the specified function includes classification screening of medical information; Input the data to be processed into the target model to obtain the processing results; The performing personalized aggregation processing on the first decoder parameter based on the calculated personalized aggregation degree includes: Determining a selection function based on the calculated personalized aggregation degree; The first decoder parameters are personalized and aggregated based on the selection function and the following formula: in, represents the aggregate encoder parameters, which are After rounds of aggregation iterations, it is sent to the local hospital, and its location in the model in the cloud server is the same as the The local hospitals are located in the same position in the local model. Indicated by After the first iteration The first decoder parameters returned by the local model, represents the average value of all first decoder parameters, represents the vector consisting of the model parameters of all local models at the same location, represents the parameter divergence consisting of the aggregated decoder parameters at the same position in different local models, is a scalar, Represents the selection function corresponding to the divergence of the parameters.
2. The medical data processing method according to claim 1, characterized in that: The loss function of the sub-encoder is for: in, represents the divergence, Indicates Sub-encoders, Representative The parameters of the sub-encoder , represents the number of categories, Represents the input data, Indicates a label.
3. The medical data processing method according to claim 2, characterized in that: When the local model performs a classification task, the divergence is expressed as: in, Indicates that The sub-encoder extracts Features, Y Depend on B scalar labels, , , R represents the real number space, represents the number of features extracted by a sub-encoder, represents the standard deviation function, is the coefficient.
4. The medical data processing method according to claim 2, characterized in that: When the local model performs the segmentation task, the divergence is expressed as: in, Indicates The sub-encoder The features output by each module are Indicates The final depth of the sub-encoder is Indicates The average pooling of the inputs is The characteristics are consistent, is the coefficient.
5. The medical data processing method according to claim 2, characterized in that: The loss function of the local model is formed by a risk loss function and a loss function of a sub-encoder, and the risk loss function is a cross entropy loss function.
6. The medical data processing method according to claim 1, characterized in that: The method further comprises: The cloud server determines data distribution difference information about each of the local models based on one or more of the training data sent by each of the local hospitals, the task requirements of the local model, and the training process data; The personalized aggregation degree is determined based on the data distribution difference information and task requirements.
7. The medical data processing method according to claim 1, characterized in that: The performing weighted average aggregation processing on the first encoder parameter includes: The first encoder parameter is subjected to weighted average aggregation processing based on the following formula: in, Represents the aggregated parameters in the sub-encoder, Indicates of clients The number of categories, and Indicates The total number of samples in each category, Indicates that after local iteration, The first local hospital The parameters of the sub-encoder.
8. The medical data processing method according to claim 1, characterized in that: The designated functions include identifying and classifying diseases based on the patient's clinical data; The step of inputting the data to be processed into the target model to obtain the processing result includes: Obtain diagnostic information and test results of target patients; The diagnostic information and examination results are input into the target model to obtain the classification prediction results of the disease suffered by the target patient.
9. A medical data processing system, characterized in that: Cloud servers and data systems of multiple local hospitals, including: The local hospital trains a local model based on local medical data to obtain first encoder parameters, wherein the local model is composed of a plurality of sub-encoders and a decoder, and each sub-encoder focuses on a different type of data; The cloud server obtains the first encoder parameters sent by each of the local hospitals, and performs weighted average aggregation processing on the first encoder parameters to obtain aggregated encoder parameters; The local hospital obtains the aggregated encoder parameters sent by the cloud server, and trains the local local model based on the aggregated encoder parameters to obtain first decoder parameters; The cloud server obtains the first decoder parameters sent by each of the local hospitals, and performs personalized aggregation processing on the first decoder parameters based on the calculated personalized aggregation degree to obtain a plurality of different aggregated decoder parameters; The cloud server sends aggregate decoder parameters matching the local models to the corresponding local hospitals based on the features of the local models trained by each of the local hospitals; The local hospital updates the local partial model based on the obtained aggregate decoder parameters to obtain a target model with a specified function, wherein the specified function includes classification screening of medical information; Input the data to be processed into the target model to obtain the processing results; The performing personalized aggregation processing on the first decoder parameter based on the calculated personalized aggregation degree includes: Determining a selection function based on the calculated personalized aggregation degree; The first decoder parameters are personalized and aggregated based on the selection function and the following formula: in, represents the aggregate encoder parameters, which are After rounds of aggregation iterations, it is sent to the local hospital, and its location in the model in the cloud server is the same as the The local hospitals are located in the same position in the local model. Indicated by After the first iteration The first decoder parameters returned by the local model, represents the average value of all first decoder parameters, represents the vector consisting of the model parameters of all local models at the same location, represents the parameter divergence consisting of the aggregated decoder parameters at the same position in different local models, is a scalar, Represents the selection function corresponding to the divergence of the parameters.
Citation Information
Patent Citations
Federal learning-based privacy protection system for realizing medical data
CN115563650A
Medical image segmentation method based on federal learning and attention mechanism
CN116245886A