Methods, apparatus, storage media and electronic devices for determining the model
By building a decentralized model determination system using blockchain technology, the problem of data silos between medical institutions is solved, enabling joint training of cross-centralized cohort data and trusted sharing of model parameters, thereby improving the accuracy and security of the model.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-28
- Publication Date
- 2026-03-06
AI Technical Summary
Because each medical institution stores its clinical data independently, the amount of local queue data is insufficient to train a reliable classifier. Furthermore, existing federated learning techniques carry the risk of model parameter backpropagation, which reduces the model's fault tolerance.
A decentralized model determination system based on blockchain technology is adopted. The system is constructed by pre-setting a blockchain and multiple medical data processing terminals. The attention mechanism layer and the linear layer are used for parameter fusion to achieve reliable transmission and sharing of model parameters.
While ensuring data security and privacy, joint training of cross-center cohort data was achieved, improving the accuracy and fault tolerance of the model and solving the data sharing problem in cross-center collaborative medical research.
Smart Images

Figure CN115982580B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and more specifically, to a method, apparatus, storage medium, and electronic device for determining a model. Background Technology
[0002] Large-scale cohort studies are an effective method for addressing major medical and health issues, such as the Framingham Heart Study and the Nurses' Health Study, providing valuable scientific evidence for revealing the causes, prevention, control, and prediction of various diseases, especially chronic diseases. However, cohort data is typically processed and stored independently in private data centers by each hospital or medical center for its own research purposes, taking into account privacy and data security concerns. In the field of medical artificial intelligence, the amount of local cohort data available to medical institutions is usually insufficient to train a reliable classifier; models built from local cohort data can only solve local problems. Summary of the Invention
[0003] The purpose of this disclosure is to provide a method, apparatus, storage medium, and electronic device for determining a model.
[0004] In a first aspect, this disclosure provides a method for determining a model, applied to a model determination system, the system comprising a preset blockchain and multiple medical data processing terminals communicating with the preset blockchain, each of the medical data processing terminals deploying a preset medical classification model to be trained, and different medical data processing terminals being used to process different medical data; the method includes:
[0005] For each of the medical data processing terminals, the first model parameters of the preset medical classification model deployed on the medical data processing terminal are determined based on the target medical data corresponding to the medical data processing terminal.
[0006] Based on the first model parameters calculated by each of the medical data processing terminals, the second model parameters of the preset medical classification model deployed on the medical data processing terminal are determined through the preset blockchain.
[0007] The target medical classification model corresponding to the medical data processing terminal is determined based on the target medical data and the second model parameters.
[0008] Optionally, the preset blockchain is deployed with a parameter calculation network, which includes an attention mechanism layer. The step of determining the second model parameters of the preset medical classification model deployed on each medical data processing terminal using the preset blockchain, based on the first model parameters calculated for each of the medical data processing terminals, includes:
[0009] Based on the first model parameters calculated by each of the medical data processing terminals, the attention mechanism layer updates the first model parameters calculated by the medical data processing terminal to obtain the second model parameters of the preset medical classification model deployed on the medical data processing terminal.
[0010] Optionally, updating the first model parameters calculated by each of the medical data processing terminals through the attention mechanism layer includes:
[0011] Calculate the correlation between each of the first model parameters and the first model parameters calculated by the medical data processing terminal. The correlation represents the degree of influence of the first model parameters calculated by the target processing terminal on the model parameters corresponding to the medical data processing terminal. The target processing terminal is any of the medical data processing terminals.
[0012] The second model parameters are obtained by updating the first model parameters calculated by the medical data processing terminal based on the relevance and the first model parameters calculated by each of the medical data processing terminals.
[0013] Optionally, the parameter calculation network further includes a linear layer connected to the attention mechanism layer. Before updating the first model parameters calculated by each of the medical data processing terminals through the attention mechanism layer, the method further includes:
[0014] The first model parameters calculated by each of the medical data processing terminals are processed by the linear layer to extract the target parameter features.
[0015] The step of updating the first model parameters calculated by each of the medical data processing terminals through the attention mechanism layer includes:
[0016] Based on the target parameter features corresponding to each of the first model parameters, the attention mechanism layer updates the first model parameters calculated by the medical data processing terminal.
[0017] Optionally, the linear layer includes a feedforward neural network, and the feature extraction of the first model parameters calculated by each of the medical data processing terminals through the linear layer to obtain the target parameter features includes:
[0018] For each of the medical data processing terminals, the first model parameters calculated by the medical data processing terminal are input into the feedforward neural network to obtain the target parameter features output by the feedforward neural network.
[0019] Optionally, the parameter calculation network further includes a normalization layer, and before determining the target medical classification model corresponding to the medical data processing terminal based on the target medical data and the second model parameters, the method further includes:
[0020] The second model parameters are standardized using the standardization layer to obtain the third model parameters;
[0021] The step of determining the target medical classification model corresponding to the medical data processing terminal based on the target medical data and the second model parameters includes:
[0022] The target medical classification model corresponding to the medical data processing terminal is determined based on the target medical data and the third model parameters.
[0023] Optionally, the parameter calculation network further includes a location encoding layer, and before determining the second model parameters of the preset medical classification model deployed on the medical data processing terminal through the preset blockchain, the method further includes:
[0024] The first model parameters are encoded by the location encoding layer according to a preset encoding algorithm to obtain the node identifier corresponding to the first model parameters. The node identifier is the node identifier of the medical data processing terminal that calculates the first model parameters.
[0025] The second model parameters for determining the preset medical classification model deployed on the medical data processing terminal via the preset blockchain include:
[0026] Based on the first model parameters calculated by each of the medical data processing terminals and the node identifier corresponding to each first model parameter, the second model parameters of the preset medical classification model deployed on the medical data processing terminal are determined through the preset blockchain.
[0027] Optionally, determining the target medical classification model corresponding to the medical data processing terminal based on the target medical data and the second model parameters includes:
[0028] After updating the model parameters of the preset medical classification model to the second model parameters, a medical classification model to be determined is obtained.
[0029] If the undetermined medical classification model is determined to meet the preset model convergence conditions, the undetermined medical classification model is taken as the target medical classification model.
[0030] Optionally, the method further includes:
[0031] If it is determined that the undetermined medical classification model does not meet the preset model convergence condition, the model determination step is executed repeatedly until the undetermined medical classification model meets the preset model convergence condition.
[0032] The model determination steps include:
[0033] After training the undetermined medical classification model based on the target medical data, the fourth model parameters are obtained;
[0034] After updating the fourth model parameters calculated by the medical data processing terminal through the preset blockchain, the fifth model parameters corresponding to the medical data processing terminal are obtained.
[0035] After updating the model parameters of the pending medical classification model on the medical data processing terminal to the fifth model parameter, a new pending medical classification model is obtained, and the new pending medical classification model is used as the updated pending medical classification model.
[0036] Optionally, the method further includes:
[0037] Obtain the medical input data corresponding to the target medical classification task;
[0038] The medical input data is classified medically using the target medical classification model deployed on the medical data processing terminal to obtain the target type corresponding to the medical input data.
[0039] Secondly, this disclosure provides an apparatus for determining a model, applied to a model determination system. The system includes a preset blockchain and multiple medical data processing terminals communicating with the preset blockchain. Each medical data processing terminal is equipped with a preset medical classification model to be trained, and different medical data processing terminals are used to process different medical data. The apparatus includes:
[0040] The first determining module is used to determine, for each of the medical data processing terminals, the first model parameters of the preset medical classification model deployed on the medical data processing terminal based on the target medical data corresponding to the medical data processing terminal.
[0041] The second determining module is used to determine the second model parameters of the preset medical classification model deployed on the medical data processing terminal through the preset blockchain based on the first model parameters calculated by each of the medical data processing terminals.
[0042] The third determining module is used to determine the target medical classification model corresponding to the medical data processing terminal based on the target medical data and the second model parameters.
[0043] Thirdly, this disclosure provides a non-transitory computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps of the method described in the first aspect of this disclosure.
[0044] Fourthly, this disclosure provides an electronic device, comprising:
[0045] A memory having a computer program stored thereon; a processor for executing the computer program in the memory to implement the steps of the method described in the first aspect of this disclosure.
[0046] Through the above technical solution, for each medical data processing terminal, the first model parameters of the preset medical classification model deployed on the medical data processing terminal are determined based on the target medical data corresponding to the medical data processing terminal; based on the first model parameters calculated by each medical data processing terminal, the second model parameters of the preset medical classification model deployed on the medical data processing terminal are determined through the preset blockchain; based on the target medical data and the second model parameters, the target medical classification model corresponding to the medical data processing terminal is determined. In this way, based on the principle of group learning, a decentralized model determination system is constructed through the preset blockchain. This model determination system not only ensures the security and reliability of local cohort data of each medical institution, but also realizes the reliable transmission and sharing of model parameters corresponding to each medical data processing terminal, thereby solving the problem of joint training of medical classification models in cross-center cohort data research.
[0047] Other features and advantages of this disclosure will be described in detail in the following detailed description section. Attached Figure Description
[0048] The accompanying drawings are provided to further illustrate the present disclosure and form part of the specification. They are used together with the following detailed description to explain the present disclosure, but do not constitute a limitation thereof. In the drawings:
[0049] Figure 1 This is a flowchart illustrating a method for determining a model according to an exemplary embodiment;
[0050] Figure 2 This is a schematic diagram of a system framework for a deterministic model system according to an exemplary embodiment;
[0051] Figure 3 It is based on Figure 1 The illustrated embodiment presents a flowchart of a method for determining a model;
[0052] Figure 4 It is based on Figure 3 The illustrated embodiment presents a flowchart of a method for determining a model;
[0053] Figure 5 This is a block diagram illustrating an apparatus for determining a model according to an exemplary embodiment;
[0054] Figure 6 It is based on Figure 5 The illustrated embodiment shows a block diagram of an apparatus for determining a model;
[0055] Figure 7 This is a structural block diagram of an electronic device according to an exemplary embodiment. Detailed Implementation
[0056] The specific embodiments of this disclosure will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit this disclosure.
[0057] It should be noted that all actions involving the acquisition of signals, information, or data in this disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the location is situated, and with authorization from the owner of the relevant device.
[0058] This disclosure is primarily applied to scenarios where medical classification models are built based on locally stored medical data from various medical institutions. Considering privacy and data security issues, each medical institution processes its own clinical data and stores it independently in its own private data center. In this case, each medical institution can only build its own medical classification model based on its local cohort data, and this model can only solve internal medical problems within each institution. To train a stable and accurate classification model, the local cohort data could be centrally processed, but this presents unavoidable data traffic problems, as well as issues related to data ownership, confidentiality, privacy, security, and data monopoly. The related technology uses federated learning in a distributed environment to achieve joint training of medical classification models on cross-center cohort data. The model to be trained is located on the central server of the federated learning. During training, the model is distributed to the local terminals of various medical institutions. After the medical institutions train the model based on their local medical data, they upload the model parameters from each local terminal to the central server for integration. However, there are risks in the process of sending the model parameters back to the central server, and the central server itself is also at risk. Therefore, although this star-shaped model solves the reliability problem in the cohort dataset, it has the reliability problem in the model parameter set, which leads to a reduction in the model's fault tolerance.
[0059] To address this technical problem, this disclosure provides a method, apparatus, storage medium, and electronic device for determining a model. The specific embodiments of this disclosure will be described in detail below with reference to the accompanying drawings.
[0060] Figure 1 This is a flowchart illustrating a method for determining a model according to an exemplary embodiment. Figure 2 This is a schematic diagram illustrating a model-based system framework for determining a system, based on an exemplary embodiment. Figure 1 The method shown can be applied to Figure 2 The model shown determines the system, such as Figure 2 As shown, the system includes a pre-defined blockchain and multiple medical data processing terminals (nodes A, B, C, and D) communicating with the pre-defined blockchain. Each medical data processing terminal is a local terminal for its respective medical institution, storing clinical medical data generated by that institution. Each terminal is equipped with a pre-defined medical classification model to be trained, and different terminals process different types of medical data. Furthermore, the pre-defined blockchain is a private, multi-center collaborative blockchain built on blockchain technology. This pre-defined blockchain can be used for cross-cohort medical research sharing in multi-center collaborative scenarios. Since the blockchain itself is decentralized and the data is tamper-proof, the overall architecture can be decentralized, and model parameters can be reliably transmitted and shared.
[0061] like Figure 1 As shown, the method includes the following steps:
[0062] In step S101, for each of the medical data processing terminals, the first model parameters of the preset medical classification model deployed on the medical data processing terminal are determined based on the target medical data corresponding to the medical data processing terminal.
[0063] The medical data processing terminal can be understood as a local terminal of a medical institution, where data analysis, model training, and other data processing operations can be performed on locally stored medical data. In this disclosure, the medical data processing terminal can serve as an edge computing node in a multi-party trusted federated computing framework (i.e., the model determination system) based on the principle of swarm learning. It is responsible for executing the computation task of a preset medical classification model based on the target medical data of the corresponding medical institution and uploading the calculated model parameters to a preset blockchain. In this disclosure, each edge computing node is designed as an Ethereum Virtual Machine. By packaging the local model into a program node based on smart contracts, distributed computation is achieved on the local target medical data of the medical data processing terminal. Based on the characteristic that smart contracts are executed and verified on each Ethereum node, the edge computing results are considered trustworthy.
[0064] The target medical data may include clinical medical data, medical imaging data, etc., stored and accessed locally by the medical data processing terminal. This target medical data is the private medical data of the current medical institution, and external physical access and sharing of this data are prohibited, thus ensuring the security and privacy requirements of the queue data.
[0065] The preset medical classification model may include a disease prediction model (or disease classification model), a health classification model for medical staff, etc. Each medical data processing terminal can store its own preset medical classification model to be trained locally. The preset medical classification model can be a deep learning model to be trained. The first model parameter is the model parameter learned by the terminal based on the target medical data, such as weights, biases, etc.
[0066] In this step, for each medical data processing terminal, the terminal can train its locally stored preset medical classification model based on the target medical data stored locally, and then use the model parameters obtained from each update during the iterative training process as the first model parameters. In addition, the specific training process of the model can refer to the training steps of machine learning models described in related technologies, and is not specifically limited here.
[0067] In step S102, based on the first model parameters calculated by each of the medical data processing terminals, the second model parameters of the preset medical classification model deployed on the medical data processing terminal are determined through the preset blockchain.
[0068] The second model parameter is a model parameter obtained by the preset blockchain after performing parameter fusion calculation on the first model parameter uploaded by the medical data processing terminal and the first model parameter sent by other medical data processing terminals. After determining the second model parameter, the preset blockchain can transmit the second model parameter to the medical data processing terminal so that the medical data processing terminal can determine the target medical classification model based on the second model parameter.
[0069] It should be noted that, in one possible implementation of this disclosure, a bidirectional communication interface can be designed based on the underlying private blockchain framework, using a peer-to-peer communication method. This interface includes a message sending interface and a message return interface. The message sending interface is responsible for sending the first model parameters of the local model trained by the medical data processing terminal (i.e., the edge computing node) to the parameter calculation network on the preset blockchain. The message return interface is responsible for sending the second model parameters dynamically generated by the parameter calculation network to the edge computing node. Furthermore, to reduce blocking issues during message transmission, these two message interfaces can be designed using an asynchronous publish-subscribe pattern.
[0070] In step S103, the target medical classification model corresponding to the medical data processing terminal is determined based on the target medical data and the second model parameters.
[0071] In this step, the medical data processing terminal can receive the second model parameters transmitted by the preset blockchain, and then update the model parameters of the preset medical classification model to the second model parameters to obtain the pending medical classification model. After that, it can be determined whether the pending medical classification model meets the preset model convergence condition. If it is determined that the pending medical classification model meets the preset model convergence condition, the pending medical classification model can be used as the target medical classification model.
[0072] The preset model convergence condition may include the model's loss function value being less than or equal to a preset loss threshold, or the model's number of iterations exceeding a preset number of training iterations.
[0073] Furthermore, if it is determined that the pending medical classification model does not meet the preset model convergence condition, the model can continue to be trained based on the target medical data. That is, the following model determination steps are executed iteratively until the pending medical classification model meets the preset model convergence condition. The model determination steps include:
[0074] S1: After training the undetermined medical classification model based on the target medical data, the fourth model parameters are obtained.
[0075] The fourth model parameter here can be understood as the new first model parameter obtained in each training iteration of the medical classification model to be determined based on the target medical data.
[0076] S2: After updating the fourth model parameters calculated by the medical data processing terminal through the preset blockchain, the fifth model parameters corresponding to the medical data processing terminal are obtained.
[0077] After obtaining the fourth model parameter, the medical data processing terminal can upload the fourth model parameter to a preset blockchain. The preset blockchain can then perform fusion calculations on the fourth model parameter and other model parameters uploaded by the medical data processing terminal to obtain the fifth model parameter.
[0078] S3: After updating the model parameters of the pending medical classification model on the medical data processing terminal to the fifth model parameters, a new pending medical classification model is obtained, and the new pending medical classification model is used as the updated pending medical classification model.
[0079] After obtaining the updated pending medical classification model, it can be determined whether the updated pending medical classification model meets the preset model convergence conditions. If it is determined that the updated pending medical classification model meets the preset model convergence conditions, the updated pending medical classification model can be used as the target medical classification model. If it is determined that the updated pending medical classification model does not meet the preset model convergence conditions, the model determination step is repeated until the updated pending medical classification model meets the preset model convergence conditions.
[0080] Furthermore, after determining the target medical classification model, each medical data processing terminal can complete a specific target medical classification task based on the target medical classification model according to actual needs. The target medical classification task may be different for different medical data processing terminals. Therefore, in this disclosure, the method further includes: obtaining medical input data corresponding to the target medical classification task; and performing medical classification on the medical input data through the target medical classification model deployed on the medical data processing terminal to obtain the target type corresponding to the medical input data.
[0081] For example, the target medical classification task could be a disease prediction task, a health classification task for medical staff, etc., and the corresponding medical input data could include medical imaging data, clinical medical data, etc. to be classified.
[0082] Using the above method, based on the principle of group learning, a decentralized model determination system is constructed through a pre-set blockchain. This model determination system not only ensures the security and reliability of local cohort data in each medical institution, but also enables the reliable transmission and sharing of model parameters corresponding to each medical data processing terminal. This solves the problem of joint training of medical classification models in cross-center cohort data research. Under the strong constraints of data "not leaving the hospital" and model "not leaving the hospital", it provides an implementation framework for cross-center collaborative medical research.
[0083] Figure 3 It is based on Figure 1 The illustrated embodiment shows a flowchart of a method for determining a model, as shown in the figure. Figure 2 As shown, the pre-defined blockchain is equipped with a parameter calculation network. This network is responsible for fusing and calculating the first model parameters obtained from multiple medical data processing terminals using an autonomous and dynamic learning method. This ensures the accuracy of joint training of the pre-defined medical classification model using cross-queue medical data in scenarios with multiple medical data processing terminals. The parameter calculation network includes an attention mechanism layer, which is responsible for calculating the correlation between the first model parameters sent by each medical data processing terminal and generating dynamically updated second model parameters.
[0084] like Figure 3As shown, step S102 includes the following sub-steps:
[0085] In step S1021, the first model parameters calculated by each of the medical data processing terminals are updated by the attention mechanism layer to obtain the second model parameters of the preset medical classification model deployed on the medical data processing terminal.
[0086] In this step, the correlation between each of the first model parameters and the first model parameters calculated by the medical data processing terminal can be calculated. The correlation represents the degree of influence of the first model parameters calculated by the target processing terminal on the model parameters corresponding to the medical data processing terminal. The target processing terminal is any of the medical data processing terminals. After updating the first model parameters calculated by the medical data processing terminal according to the correlation and the first model parameters calculated by each of the medical data processing terminals, the second model parameters are obtained.
[0087] For example, such as Figure 2 As shown, the first model parameters calculated from nodes A, B, C, and D are respectively represented as x1, x2, x3, and x4. For the first model parameter x1 calculated from node A, the correlation between x1 and the four parameters x1, x2, x3, and x4 can be calculated using the following formula:
[0088]
[0089] Where xi (i = 1, 2, 3, 4) represents any one of the four first model parameters x1, x2, x3, and x4, and a represents a pre-set learnable parameter (usually set to an empirical value). This represents the parametric features of the first model parameter xi. This indicates the correlation between the first model parameter x1 and the first model parameter xi. This means performing a concatenation operation between the vector representation corresponding to the first model parameter x1 and the vector representation corresponding to the first model parameter xi.
[0090] Next, the correlation between the first model parameter and each other can be standardized using softmax, and then element-wise multiplied with all edge node parameters to obtain the vector representation of the updated second model parameter. The calculation formula is as follows:
[0091]
[0092] Among them, H x1This represents the second model parameter corresponding to node A after dynamic updating.
[0093] Based on the methods corresponding to formulas (1) and (2), the second model parameters corresponding to nodes B, C, and D can be calculated respectively. Thus, taking node A as an example, the second model parameter H calculated by formula (2) can be obtained. x1 The data is then transmitted back to the medical data processing terminal corresponding to node A, so that the medical data processing terminal can process the data according to the second model parameter H. x1 After updating the model parameters of the local model, the target medical classification model is obtained. The above example is merely illustrative and is not intended to limit the scope of this disclosure.
[0094] Figure 4 It is based on Figure 3 The illustrated embodiment shows a flowchart of a method for determining a model, as shown in the figure. Figure 2 As shown, the parameter calculation network also includes a linear layer connected to the attention mechanism layer. This linear layer is responsible for linearizing the model parameters trained on the edge computing nodes and then extracting their latent parameter features, such as... Figure 4 As shown, before performing step S1021, the method further includes the following steps:
[0095] In step S1022, feature extraction is performed on the first model parameters calculated by each of the medical data processing terminals through the linear layer to obtain target parameter features.
[0096] The linear layer may include a feedforward neural network, and the target parameter features are the parameter features extracted after linearizing the parameters of the first model.
[0097] In this step, for each of the medical data processing terminals, the first model parameters calculated by the medical data processing terminal can be input into the feedforward neural network to obtain the target parameter features output by the feedforward neural network.
[0098] For example, suppose Nx is the parameter feature of the first model parameter x calculated by any medical data processing terminal. The feedforward neural network includes two neural network layers. Based on the feedforward neural network, the parameter feature Nx of the first model parameter x can be linearized in the following way:
[0099]
[0100] in, W represents the target parameter features after linearization. 0 W represents the weights of the first layer of the feedforward neural network. 1 This represents the weights of the second layer of the feedforward neural network.
[0101] The above examples are merely illustrative and are not intended to limit the scope of this disclosure.
[0102] Thus, during the execution of step S1021, the first model parameters calculated by the medical data processing terminal can be updated according to the target parameter features corresponding to each first model parameter through the attention mechanism layer. Specifically, the parameter updates can be performed according to the embodiments corresponding to formulas (1) and (2).
[0103] To accelerate model training and prevent gradient explosion or vanishing phenomena, such as Figure 2 As shown, the parameter calculation network may also include a normalization layer. In one possible implementation, the normalization layer may use layer normalization to normalize the second model parameters calculated by the attention mechanism layer in a layered manner.
[0104] like Figure 4 As shown, the method also includes the following steps:
[0105] In step S1023, the second model parameters are standardized through the standardization layer to obtain the third model parameters.
[0106] In this way, the medical data processing terminal can determine the target medical classification model corresponding to the medical data processing terminal based on the target medical data and the parameters of the third model, thereby accelerating the training of the model and preventing gradient explosion or gradient vanishing phenomena.
[0107] Furthermore, in this disclosure, to accurately identify the first model parameters transmitted by different nodes, the pre-defined blockchain can add node identifiers to the first model parameters transmitted by each node through a location encoding layer, such as... Figure 2 As shown, the parameter calculation network also includes a position encoding layer, such as... Figure 4 As shown, the method also includes the following steps:
[0108] In step S1024, the first model parameters are encoded by the location encoding layer according to a preset encoding algorithm to obtain the node identifier corresponding to the first model parameters. The node identifier is the node identifier of the medical data processing terminal of the first model parameters calculated.
[0109] The preset encoding algorithm can, for example, use a periodic trigonometric function as the position encoding function, and its calculation formula is as follows:
[0110]
[0111] Where pe represents the encoding result, pos represents the number of the edge computing node, j represents the element dimension index of the vector representation of the corresponding first model parameter, and dim represents the vector dimension of the first model parameter.
[0112] During the execution of step S1021, the second model parameters of the preset medical classification model deployed on the medical data processing terminal can be determined by the preset blockchain based on the first model parameters calculated by each medical data processing terminal and the node identifier corresponding to each first model parameter. In this way, the node identifier can identify which medical data processing terminal provided the first model parameters currently being calculated. That is, the node identifier can integrate the characteristics of each medical data processing terminal into the parameter fusion process, thereby enabling better control of parameter weight allocation.
[0113] Using the above method, based on the principle of group learning, a decentralized model determination system is constructed through a pre-set blockchain. This system not only ensures the security and reliability of local cohort data from various medical institutions, but also achieves reliable transmission and sharing of model parameters from multiple medical data processing terminals by merging the first model parameters calculated separately as much as possible. This enables joint training of medical classification models on cross-center cohort data research, ensuring the accuracy of medical classification models trained using cross-cohort medical data. Furthermore, it provides a framework for cross-center collaborative medical research under the strong constraints of data and models remaining within the hospital. In addition, the model determination system provided in this disclosure can shift the model computation load from the central node to the edge node, solving the problem of central node computational resource bottlenecks and avoiding high bandwidth consumption during data transmission.
[0114] Figure 5 This is a block diagram illustrating an apparatus for determining a model according to an exemplary embodiment. The apparatus can be applied to a model determination system, which includes a preset blockchain and multiple medical data processing terminals communicating with the preset blockchain. Each medical data processing terminal is equipped with a preset medical classification model to be trained, and different medical data processing terminals are used to process different medical data. Figure 5 As shown, the device includes:
[0115] The first determining module 501 is used to determine, for each of the medical data processing terminals, the first model parameters of the preset medical classification model deployed on the medical data processing terminal based on the target medical data corresponding to the medical data processing terminal.
[0116] The second determining module 502 is used to determine the second model parameters of the preset medical classification model deployed on the medical data processing terminal through the preset blockchain based on the first model parameters calculated by each of the medical data processing terminals.
[0117] The third determining module 503 is used to determine the target medical classification model corresponding to the medical data processing terminal based on the target medical data and the second model parameters.
[0118] Optionally, the preset blockchain is deployed with a parameter calculation network, which includes an attention mechanism layer. The second determining module 502 is used to update the first model parameters of the preset medical classification model deployed on the medical data processing terminal by updating the first model parameters calculated by each medical data processing terminal through the attention mechanism layer, based on the first model parameters calculated by each medical data processing terminal respectively.
[0119] Optionally, the second determining module 502 is used to calculate the correlation between each of the first model parameters and the first model parameters calculated by the medical data processing terminal, wherein the correlation characterizes the degree of influence of the first model parameters calculated by the target processing terminal on the model parameters corresponding to the medical data processing terminal, and the target processing terminal is any of the medical data processing terminals; after updating the first model parameters calculated by the medical data processing terminal according to the correlation and the first model parameters calculated by each of the medical data processing terminals, the second model parameters are obtained.
[0120] Optionally, the parameter calculation network further includes a linear layer connected to the attention mechanism layer. The second determining module 502 is further configured to extract features from the first model parameters calculated by each of the medical data processing terminals through the linear layer to obtain target parameter features; and update the first model parameters calculated by the medical data processing terminal through the attention mechanism layer based on the target parameter features corresponding to each of the first model parameters.
[0121] Optionally, the linear layer includes a feedforward neural network, and the second determining module 502 is used to input the first model parameters calculated by the medical data processing terminal into the feedforward neural network for each medical data processing terminal, so as to obtain the target parameter features output by the feedforward neural network.
[0122] Optionally, the parameter calculation network further includes a standardization layer, and the second determining module 502 is further configured to standardize the second model parameters through the standardization layer to obtain the third model parameters;
[0123] The third determining module 503 is used to determine the target medical classification model corresponding to the medical data processing terminal based on the target medical data and the third model parameters.
[0124] Optionally, the parameter calculation network further includes a location encoding layer. The second determining module 502 is further configured to encode the first model parameters through the location encoding layer according to a preset encoding algorithm to obtain the node identifier corresponding to the first model parameters. The node identifier is the node identifier of the medical data processing terminal that calculated the first model parameters. Based on the first model parameters calculated by each medical data processing terminal and the node identifier corresponding to each first model parameter, the second model parameters of the preset medical classification model deployed on the medical data processing terminal are determined through the preset blockchain.
[0125] Optionally, the third determining module 503 is used to update the model parameters of the preset medical classification model to the second model parameters to obtain a pending medical classification model; and if it is determined that the pending medical classification model meets the preset model convergence condition, the pending medical classification model is used as the target medical classification model.
[0126] Optionally, the third determining module 503 is used to repeatedly execute the model determining steps until the undetermined medical classification model satisfies the preset model convergence condition when it is determined that the undetermined medical classification model does not meet the preset model convergence condition.
[0127] The model determination steps include:
[0128] After training the undetermined medical classification model based on the target medical data, the fourth model parameters are obtained;
[0129] After updating the fourth model parameters calculated by the medical data processing terminal through the preset blockchain, the fifth model parameters corresponding to the medical data processing terminal are obtained.
[0130] After updating the model parameters of the pending medical classification model on the medical data processing terminal to the fifth model parameter, a new pending medical classification model is obtained, and the new pending medical classification model is used as the updated pending medical classification model.
[0131] Optionally, Figure 6 It is based on Figure 5 The illustrated embodiment shows a block diagram of an apparatus for determining a model, as shown in the figure. Figure 6 As shown, the device also includes:
[0132] The model application module 504 is used to acquire medical input data corresponding to the target medical classification task; and to perform medical classification on the medical input data through the target medical classification model deployed on the medical data processing terminal to obtain the target type corresponding to the medical input data.
[0133] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0134] Using the aforementioned device, based on the principle of group learning, a decentralized model determination system is constructed through a pre-set blockchain. This model determination system not only ensures the security and reliability of local cohort data in each medical institution, but also enables the reliable transmission and sharing of model parameters corresponding to each medical data processing terminal, thereby solving the problem of joint training of medical classification models in cross-center cohort data research.
[0135] Figure 7 This is a block diagram illustrating an electronic device 700 according to an exemplary embodiment. Figure 7 As shown, the electronic device 700 may include a processor 701 and a memory 702. The electronic device 700 may also include one or more of a multimedia component 703, an input / output (I / O) interface 704, and a communication component 705.
[0136] The processor 701 controls the overall operation of the electronic device 700 to complete all or part of the steps in the method for determining the model described above. The memory 702 stores various types of data to support the operation of the electronic device 700. This data may include, for example, instructions for any application or method operating on the electronic device 700, and application-related data such as contact data, sent and received messages, pictures, audio, video, etc. The memory 702 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. Multimedia component 703 may include a screen and an audio component. The screen may be, for example, a touchscreen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may be further stored in memory 702 or transmitted via communication component 705. The audio component also includes at least one speaker for outputting audio signals. I / O interface 704 provides an interface between processor 701 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual or physical buttons. Communication component 705 is used for wired or wireless communication between the electronic device 700 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IoT, eMTC, or other 5G technologies, or combinations thereof, is not limited here. Therefore, the corresponding communication component 705 may include: a Wi-Fi module, a Bluetooth module, an NFC module, etc.
[0137] In an exemplary embodiment, the electronic device 700 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the method of determining the model described above.
[0138] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, which, when executed by a processor, implement the steps of the method for determining the model described above. For example, the computer-readable storage medium may be the memory 702 including program instructions described above, which may be executed by the processor 701 of the electronic device 700 to complete the method for determining the model described above.
[0139] In another exemplary embodiment, a computer program product is also provided, the computer program product comprising a computer program executable by a programmable device, the computer program having a code portion for performing the method of determining the model described above when executed by the programmable device.
[0140] The preferred embodiments of this disclosure have been described in detail above with reference to the accompanying drawings. However, this disclosure is not limited to the specific details of the above embodiments. Within the scope of the technical concept of this disclosure, various simple modifications can be made to the technical solutions of this disclosure, and these simple modifications all fall within the protection scope of this disclosure.
[0141] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, this disclosure will not describe the various possible combinations separately.
[0142] Furthermore, various different embodiments of this disclosure can be combined in any way, as long as they do not violate the spirit of this disclosure, they should also be regarded as the content disclosed in this disclosure.
Claims
1. A method of determining a model, characterized by, The application is applied to a model determination system, the system comprises a preset blockchain and a plurality of medical data processing terminals in communication with the preset blockchain, each of the medical data processing terminals is deployed with a preset medical classification model to be trained, and different medical data processing terminals are used for processing different medical data; the method comprises: For each medical data processing terminal, determining a first model parameter of the preset medical classification model deployed on the medical data processing terminal according to target medical data corresponding to the medical data processing terminal; According to the first model parameter calculated by each medical data processing terminal, determining a second model parameter of the preset medical classification model deployed on the medical data processing terminal through the preset blockchain; According to the target medical data and the second model parameter, determining a target medical classification model corresponding to the medical data processing terminal; The preset blockchain is deployed with a parameter calculation network, the parameter calculation network comprises an attention mechanism layer, and the second model parameter of the preset medical classification model deployed on the medical data processing terminal is determined through the preset blockchain according to the first model parameter calculated by each medical data processing terminal, which comprises: Calculating the correlation between each first model parameter and the first model parameter calculated by the medical data processing terminal, the correlation representing the influence degree of the first model parameter calculated by the target processing terminal on the model parameter corresponding to the medical data processing terminal, and the target processing terminal being any medical data processing terminal; According to the correlation and the first model parameter calculated by each medical data processing terminal, the first model parameter calculated by the medical data processing terminal is updated through the attention mechanism layer to obtain the second model parameter.
2. The method of claim 1, wherein, The parameter calculation network further comprises a linear layer connected with the attention mechanism layer, and before the first model parameter calculated by each medical data processing terminal is updated through the attention mechanism layer, the method further comprises: Extracting features of the first model parameter calculated by each medical data processing terminal through the linear layer to obtain target parameter features; According to the correlation and the first model parameter calculated by each medical data processing terminal, the first model parameter calculated by the medical data processing terminal is updated through the attention mechanism layer to obtain the second model parameter. The linear layer comprises a feedforward neural network, and the feature extraction of the first model parameter calculated by each medical data processing terminal through the linear layer to obtain target parameter features comprises:
3. The method of claim 2, wherein, For each of the medical data processing terminals, the first model parameter calculated by the medical data processing terminal is input into the feedforward neural network, and the target parameter feature output by the feedforward neural network is obtained.
4. The method of claim 1, wherein, The parameter calculation network further comprises a standardization layer, and before the target medical classification model corresponding to the medical data processing terminal is determined according to the target medical data and the second model parameter, the method further comprises: The second model parameter is standardized by the standardization layer to obtain a third model parameter; The target medical classification model corresponding to the medical data processing terminal is determined according to the target medical data and the third model parameter. The parameter calculation network further comprises a position encoding layer, and before the second model parameter of the preset medical classification model deployed on the medical data processing terminal is determined by the preset blockchain, the method further comprises:
5. The method of claim 1, wherein, The first model parameter is encoded according to a preset encoding algorithm by the position encoding layer to obtain a node identifier corresponding to the first model parameter, and the node identifier is a node identifier of the medical data processing terminal that calculates the first model parameter; The second model parameter of the preset medical classification model deployed on the medical data processing terminal is determined by the preset blockchain according to the first model parameter calculated by each of the medical data processing terminals, and the node identifier corresponding to each first model parameter. The target medical classification model corresponding to the medical data processing terminal is determined according to the target medical data and the second model parameter, which comprises: After the model parameter of the preset medical classification model is updated to the second model parameter, a to-be-determined medical classification model is obtained; 6. The method according to any one of claims 1 to 5, characterized in that, In a case where it is determined that the to-be-determined medical classification model satisfies a preset model convergence condition, the to-be-determined medical classification model is taken as the target medical classification model. The method further comprises: In a case where it is determined that the to-be-determined medical classification model does not satisfy the preset model convergence condition, the model determination step is cyclically executed until the to-be-determined medical classification model satisfies the preset model convergence condition; 7. The method of claim 6, wherein, The model determination step comprises: After the to-be-determined medical classification model is trained according to the target medical data, a fourth model parameter is obtained; After the fourth model parameter calculated by the medical data processing terminal is updated by the preset blockchain, a fifth model parameter corresponding to the medical data processing terminal is obtained; After the model parameter of the to-be-determined medical classification model on the medical data processing terminal is updated to the fifth model parameter, a new to-be-determined medical classification model is obtained, and the new to-be-determined medical classification model is taken as the updated to-be-determined medical classification model. The method further comprises: Obtaining medical input data corresponding to a target medical classification task; 8. The method according to any one of claims 1 to 5, characterized in that, The medical input data is classified by the target medical classification model deployed on the medical data processing terminal to obtain a target type corresponding to the medical input data.
9. An apparatus for determining a model, the apparatus comprising: The application is applied to a model determination system, the system comprising a preset blockchain and a plurality of medical data processing terminals in communication with the preset blockchain, each of the medical data processing terminals deploying a preset medical classification model to be trained, and different medical data processing terminals being used to process different medical data; the device comprises: A first determination module is configured to determine, for each medical data processing terminal, a first model parameter of the preset medical classification model deployed on the medical data processing terminal according to target medical data corresponding to the medical data processing terminal; A second determination module is configured to determine, through the preset blockchain, a second model parameter of the preset medical classification model deployed on each medical data processing terminal according to the first model parameter calculated by the medical data processing terminal; A third determination module is configured to determine a target medical classification model corresponding to the medical data processing terminal according to the target medical data and the second model parameter; The preset blockchain deploys a parameter calculation network, and the parameter calculation network comprises an attention mechanism layer; the second determination module is configured to calculate a correlation degree between each first model parameter and the first model parameter calculated by the medical data processing terminal, the correlation degree representing an influence degree of the first model parameter calculated by a target processing terminal on the model parameter corresponding to the medical data processing terminal, and the target processing terminal being any medical data processing terminal; and the second determination module is configured to obtain the second model parameter by performing parameter updating on the first model parameter calculated by the medical data processing terminal through the attention mechanism layer according to the correlation degree and the first model parameter calculated by each medical data processing terminal.
10. A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the steps of the method of any one of claims 1-8.
11. An electronic device, comprising: The device comprises: A memory having a computer program stored thereon; A processor configured to execute the computer program in the memory to implement the steps of the method of any one of claims 1-8.
Citation Information
Patent Citations
Medical model training method and device based on alliance chain and alliance chain
CN114186204A