Medical model cooperative training method and device on block chain, equipment and medium

By introducing the Shapley value incentive algorithm with adaptive thresholds and the reputation algorithm with real-time contribution value updates on the blockchain, the privacy protection and incentive mechanism issues of federated learning in collaborative training of medical data are solved, efficient, transparent and reliable medical model training is achieved, and collaborative efficiency and trust level are improved.

CN120748596APending Publication Date: 2025-10-03GUANGDONG UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510812311.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-18
Publication Date
2025-10-03

AI Technical Summary

Technical Problem

Existing federated learning has problems such as single point failure risks, insufficient privacy protection, lack of incentive mechanism and weak trust mechanism in collaborative training of medical data. Traditional solutions are difficult to meet actual needs in terms of privacy protection and computing efficiency, credibility of incentive mechanism, objectivity of reputation system and system scalability.

Method used

A blockchain-based collaborative training method for medical models is adopted. Through the on-chain Shapley value incentive algorithm with adaptive thresholds and the reputation algorithm with real-time contribution value updates, combined with smart contracts, automatic on-chain execution is achieved to ensure the transparency and traceability of the training process, accurately quantify node contributions, and provide reasonable incentives and reputation updates to isolate malicious nodes.

Benefits of technology

It achieves efficient, transparent and trustworthy medical model training, improves the collaborative efficiency and trust level among medical institutions, solves the problems of insufficient privacy protection and lack of incentive mechanism in traditional solutions, and builds a decentralized, auditable and sustainable medical model collaborative training ecosystem.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120748596A_ABST
    Figure CN120748596A_ABST
Patent Text Reader

Abstract

The invention relates to a cooperative training method and device for medical models on a block chain, equipment and a medium, and the method comprises the steps: calling an on-chain Shapley value excitation algorithm based on an adaptive threshold value, and updating an adaptive accuracy threshold value; updating the global model of the last training round by adopting the gradient value corresponding to each verified client subset in the verified client set to determine the accuracy rate of the reconstruction model corresponding to the verified client subset so as to calculate and determine the current contribution value of each verified client in the current training round; calling a reputation algorithm updated based on a real-time contribution value to determine a current reputation value of each verified client in the verified client set, and determining a selected client set of the next training round according to the current reputation value; and circularly executing the above steps to complete training of the target medical model and record the final contribution value of each participating client in all training rounds. According to the invention, the cooperation efficiency and the trust level between medical institutions can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence, and in particular to a method for collaborative training of medical models on a blockchain, corresponding devices, electronic devices, and computer-readable storage media. Background Art

[0002] As the process of medical informatization accelerates, medical institutions have accumulated massive amounts of heterogeneous medical data (such as imaging, pathology, and genomics). However, due to data privacy regulations (such as HIPAA and GDPR) and the phenomenon of hospital information system silos, the amount of data from a single institution is difficult to meet the needs of deep learning model training. Traditional centralized machine learning requires data to be centralized on cloud servers, which has three core flaws: privacy leakage, data silos, and waste of computing resources. To address these problems, federated learning (FL) technology has emerged. It achieves multi-party collaboration without leaving the domain through distributed model training. However, traditional federated learning still faces technical bottlenecks such as single point failure risks, insufficient privacy protection, lack of incentive mechanisms, and weak trust mechanisms.

[0003] Existing technical solutions attempt to overcome these limitations by integrating blockchain and federated learning architectures. Mainstream solutions can be divided into three categories: centralized architectures (such as FL-HMChain) achieve secure parameter transmission through blockchain, but they do not address the single point of trust issue; semi-decentralized architectures (such as IoMT-Fed) introduce edge nodes to share aggregation tasks but still rely on centralized cloud servers; and decentralized architectures (such as BLADE-FL) achieve full decentralization but suffer from flaws such as a lack of incentive mechanisms, delayed reputation updates, and weak resistance to poisoning attacks. These solutions share common issues in privacy protection and computational efficiency, the credibility of incentive mechanisms, the objectivity of reputation systems, and system scalability, making them difficult to meet the actual needs of collaborative medical data training.

[0004] To sum up, traditional federated learning in existing technologies still faces technical bottlenecks such as single point failure risks, insufficient privacy protection, lack of incentive mechanism and weak trust mechanism, as well as decentralized architecture with problems such as lack of incentive mechanism, delayed reputation update and weak ability to resist poisoning attacks. The applicant has made corresponding explorations in order to solve these problems. Summary of the Invention

[0005] The purpose of this application is to solve the above problems and provide a method for collaborative training of medical models on a blockchain, corresponding devices, electronic devices and computer-readable storage media.

[0006] In order to meet the various objectives of this application, this application adopts the following technical solutions:

[0007] A method for collaborative training of medical models on a blockchain, proposed to meet one of the purposes of this application, includes:

[0008] The blockchain obtains an initial global model and a selected client set corresponding to a target medical model of a model demander, wherein the selected client set includes a plurality of selected client subsets, and the selected client subsets include a plurality of medical clients;

[0009] Invoking an on-chain Shapley value incentive algorithm based on an adaptive threshold to send the global model of the previous training round to each selected client in the set of selected clients, so that each selected client uses its local medical data to train the global model of the previous training round to generate a sub-model corresponding to each selected client in the current training round, and using the sub-model to update the initial global model. If the first accuracy corresponding to the sub-model is greater than the adaptive accuracy threshold of the current training round, then adding the selected client to the set of verified clients;

[0010] determining a global model for a current training round according to a gradient value of each verified client in the set of verified clients, and updating the adaptive accuracy threshold if a second accuracy corresponding to the global model for the current training round is greater than a sum of the adaptive accuracy threshold and a buffer;

[0011] updating the global model of the previous training round using the gradient value corresponding to each subset of verified clients in the set of verified clients to determine a reconstructed model corresponding to the subset of verified clients, and calculating and determining a current contribution value of each verified client in the current training round based on a third accuracy rate corresponding to the reconstructed model;

[0012] Call a reputation algorithm based on real-time contribution value updates, calculate and determine the current contribution value of each verified client in the current training round according to the third accuracy rate corresponding to the reconstructed model, so as to determine the current reputation value of each verified client in the verified client set, and determine the selected client set for the next training round according to the current reputation value; loop through the above steps, use the selected client set to train the initial global model to a preset number of training times until the target medical model meets the training task requirements, so as to complete the training of the target medical model and record the final contribution value of each participating client in all training rounds.

[0013] Optionally, calling an on-chain Shapley value incentive algorithm based on an adaptive threshold to send the global model of the previous training round to each selected client in the set of selected clients, so that each selected client uses its local medical data to train the global model of the previous training round to generate a sub-model corresponding to each selected client in the current training round, includes:

[0014] In each round of training, the blockchain will verify the client set N (t) Initialize to empty and use the global model M of the previous training round (t-1) Send to each selected client for model update, and receive the updated sub-model of the current training round from the selected client

[0015] Optionally, the step of using the sub-model to update the initial global model, and if the first accuracy corresponding to the sub-model is greater than the adaptive accuracy threshold of the current training round, adding the selected client to the verified client set includes:

[0016] Using the sub-model Update the initial global model M (0) , and use the standard test set T for gradient verification to determine the sub-model The corresponding first accuracy, if the sub-model The corresponding first accuracy Greater than the adaptive accuracy threshold of the current training round Then add the selected client i to the verified client set N (t) The selected client i is determined as a verified client and participates in the model aggregation of the current training round;

[0017] If the sub-model The corresponding first accuracy Less than or equal to the adaptive accuracy threshold of the current training round The selected client i does not participate in the model aggregation of the current training round, and the contribution value of the selected client i in the current training round is is 0.

[0018] Optionally, determining a global model for a current training round based on the gradient value of each verified client in the set of verified clients, and if a second accuracy corresponding to the global model for the current training round is greater than the sum of the adaptive accuracy threshold and the buffer, updating the adaptive accuracy threshold includes:

[0019] Calculate the verified client set N (t) The gradient value of each authenticated client in And the gradient value A weighted average calculation is performed based on the size of the local medical dataset of the verified client to determine the global model M for the current training round. (t) , and use it as the initial global model for the next training round;

[0020] The global model M is tested using the standard test set T. (t) Perform gradient verification to determine the global model M (t) The corresponding second accuracy γ (t) ;

[0021] If the second accuracy γ (t) Greater than the adaptive accuracy threshold of the current training round and the sum of αβ between buffers, then update the adaptive accuracy threshold The adaptive accuracy threshold represents the product of the threshold buffer value and the buffer factor, α represents the threshold buffer value, and β represents the buffer factor, which decreases as the number of consecutive training rounds in which the adaptive accuracy threshold is not updated increases, thereby reducing the difficulty of updating the adaptive accuracy threshold.

[0022] Optionally, the step of updating the global model of the previous training round using the gradient value corresponding to each verified client subset in the verified client set to determine the reconstructed model corresponding to the verified client subset includes:

[0023] For each verified client subset S in the verified client set, a weighted average calculation is performed based on the size of the local medical data set of each verified client in the verified client subset to determine the gradient value corresponding to each verified client subset, where: Each set of authenticated clients N (t) including a plurality of verified client subsets S, each verified client subset S including a plurality of verified clients;

[0024] Use the gradient value corresponding to each verified client subset to update the global model M of the previous training round (t-1) , to obtain the reconstruction model corresponding to each verified client subset S of the current training round And build a set of reconstruction models

[0025] Optionally, the step of calculating and determining a current contribution value of each verified client in the current training round according to the third accuracy rate corresponding to the reconstructed model includes:

[0026] For the verified client subset S, the standard test set T is used to test the reconstruction model corresponding to each verified client subset S. To obtain the reconstruction model corresponding to each authenticated client subset S The third accuracy rate is used as the utility function value

[0027] According to the utility function value Calculates and determines the current contribution value of each verified client in the current training round.

[0028] Optionally, calling a reputation algorithm based on real-time contribution value updates, calculating and determining a current contribution value of each verified client in the current training round based on the third accuracy rate corresponding to the reconstructed model, thereby determining a current reputation value of each verified client in the set of verified clients, and determining a set of selected clients for the next training round based on the current reputation value, includes:

[0029] Determine the current reputation value of each verified client in the set of verified clients using a reputation algorithm based on real-time contribution value updates according to the historical contribution value and current contribution value corresponding to the verified client;

[0030] Detecting whether the current reputation value is greater than a preset reputation threshold; if the current reputation value is less than the preset reputation threshold, adding the verified client to a low-reputation node group; if the current reputation value is greater than the preset reputation threshold, adding the verified client to a high-reputation node group, wherein the low-reputation node group includes new client nodes and client nodes below the reputation threshold;

[0031] Clients are randomly selected from the low reputation node group and the high reputation node group according to a preset ratio to construct a selected client set to participate in the training of the target medical model. In each round of training, the participating clients first submit their corresponding sub-models for training and perform standardized verification on their results. In the verification set, if the contribution of client i meets the accuracy Above the adaptive threshold Then it participates in the aggregation of the global model and calculates the contribution value of the current training round

[0032] Otherwise, the contribution value of the client i is directly set to 0, and it will not be included in the model update in the current training round. Model training continues until the preset training round R is met. The system calculates the corresponding final contribution value λ for all clients. i ;

[0033] For clients with positive contribution values, their reputation values ​​are updated according to the reward mechanism. The greater the contribution, the faster the reputation value grows. For clients with negative contribution values ​​or those that do not meet the requirements, their reputation values ​​will be penalized to a certain extent, reducing the fixed reputation value and increasing the isolation time δ accordingly. i and the number of violations η i , to limit low-quality client nodes and malicious client nodes.

[0034] A medical model collaborative training device on a blockchain is provided to meet another purpose of the present application, including:

[0035] An initial model acquisition module is configured to acquire, through the blockchain, an initial global model corresponding to a target medical model of a model demander and a selected client set, wherein the selected client set includes a plurality of selected client subsets, and the selected client subsets include a plurality of medical clients;

[0036] a global model update module configured to invoke an on-chain Shapley value incentive algorithm based on an adaptive threshold, send the global model of the previous training round to each selected client in the set of selected clients, so that each selected client uses its local medical data to train the global model of the previous training round to generate a sub-model corresponding to each selected client in the current training round, use the sub-model to update the initial global model, and if the first accuracy corresponding to the sub-model is greater than the adaptive accuracy threshold of the current training round, add the selected client to the set of verified clients;

[0037] a threshold updating module, configured to determine a global model of a current training round based on a gradient value of each verified client in the set of verified clients, and update the adaptive accuracy threshold if a second accuracy corresponding to the global model of the current training round is greater than a sum of the adaptive accuracy threshold and a buffer;

[0038] a contribution value calculation module, configured to update the global model of the previous training round using the gradient value corresponding to each subset of verified clients in the set of verified clients to determine a reconstructed model corresponding to the subset of verified clients, and determine a current contribution value of each verified client in the current training round based on a third accuracy rate corresponding to the reconstructed model;

[0039] The target model training module is configured to call a reputation algorithm based on real-time contribution value updates, and determine the current contribution value of each verified client in the current training round according to the third accuracy calculation corresponding to the reconstructed model, so as to determine the current reputation value of each verified client in the verified client set, and determine the selected client set for the next training round according to the current reputation value; the above steps are executed in a loop, and the initial global model is trained to a preset number of training times using the selected client set until the target medical model meets the training task requirements, so as to complete the training of the target medical model and record the final contribution value of each participating client in all training rounds.

[0040] An electronic device provided to adapt to another purpose of the present application includes a central processing unit and a memory, wherein the central processing unit is used to call and run a computer program stored in the memory to execute the steps of the medical model collaborative training method on the blockchain described in the present application.

[0041] A computer-readable storage medium is provided to meet another purpose of the present application, which stores a computer program implemented according to the medical model collaborative training method on the blockchain in the form of computer-readable instructions. When the computer program is called and executed by a computer, the steps included in the corresponding method are executed.

[0042] Compared with the existing technology, this application addresses the technical bottlenecks faced by traditional federated learning in the existing technology, such as single point failure risks, insufficient privacy protection, lack of incentive mechanism and weak trust mechanism, as well as the problems of decentralized architecture such as lack of incentive mechanism, delayed reputation update and weak resistance to poisoning attacks. This application includes but is not limited to the following beneficial effects:

[0043] First, this application constructs an incentive-based blockchain-based collaborative training system for medical models, achieving efficient medical model training while ensuring transparency and traceability of the training process. To address the problems existing in the collaborative training process of existing medical models, including a lack of trust due to opaque training processes, the risk of poisoning attacks caused by improper customer selection, and the lack of an effective contribution measurement mechanism, this application proposes an incentive-based blockchain-based collaborative training framework for medical models. By embedding aggregation, incentive, and reputation algorithms into smart contracts to achieve automatic on-chain execution, the entire process is ensured to be open, transparent, and auditable, thereby improving the collaborative efficiency and trust level between medical institutions.

[0044] Secondly, this application designs an on-chain Shapley value incentive algorithm based on an adaptive threshold. This algorithm addresses the issues of unreasonable node contribution evaluation, unfair reward distribution, and interference from low-quality data. By setting an adaptive threshold to eliminate low-quality gradients and combining the Shapley value to accurately quantify the contribution of each node, effective reward distribution and model performance improvement are achieved, stimulating the enthusiasm of medical institutions to share high-quality data.

[0045] Third, this application constructs a reputation algorithm based on real-time contribution value updates. This algorithm addresses issues such as malicious node poisoning, unfair node selection, and reputation monopoly. By updating reputation based on a node's actual contribution performance, combined with a campaign randomization factor and reputation decay strategy, it achieves reasonable client selection and malicious node isolation, creating a sustainable model collaborative training environment.

[0046] Furthermore, this application proposes a medical model collaborative training system on the blockchain based on an incentive mechanism, which builds a complete multi-party collaborative training system. By embedding aggregation, incentive and reputation algorithms into smart contracts to achieve automatic execution on the chain, it ensures that the entire collaborative training process is open, transparent and auditable, thereby improving the collaborative efficiency and trust level among medical institutions; an adaptive threshold Shapley incentive algorithm is proposed, which optimizes the Shapley value algorithm logic through adaptive thresholds to effectively filter low-quality gradient updates and achieve accurate measurement of node contributions in different malicious environments; finally, a reputation algorithm based on real-time contribution value updates is constructed, and reputation is updated according to the actual contribution performance of the node, and combined with the election random factor and reputation decay strategy to achieve reasonable client selection and malicious node isolation; this application targets the three core needs of the medical artificial intelligence field: separation of data ownership and usage rights, trusted cross-institutional collaborative training environment and fair value distribution system. Through the deep integration of blockchain technology and federated learning, a decentralized, auditable and sustainable medical model collaborative training ecosystem is constructed. Its technological breakthrough not only solves the inherent defects of traditional solutions in privacy protection, incentive mechanism and system scalability, but also provides key technical support for the market-oriented allocation of medical data elements, and promotes the development of medical artificial intelligence towards universalization and trustworthiness. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0048] Figure 1 This is an exemplary network architecture adopted by the blockchain-based medical model collaborative training system based on the incentive mechanism in the embodiments of this application;

[0049] Figure 2This is a flowchart of the collaborative training method of medical models on the blockchain in an embodiment of the present application;

[0050] Figure 3 This is a flowchart of an algorithm for a reputation algorithm based on real-time contribution value updates in an embodiment of the present application;

[0051] Figure 4 This is a principle block diagram of the medical model collaborative training device on the blockchain in an embodiment of the present application;

[0052] Figure 5 Schematic diagram of the structure of the computer device in the embodiment of the present application. DETAILED DESCRIPTION

[0053] The following describes in detail embodiments of the present application, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and are not to be construed as limiting the present application.

[0054] Those skilled in the art will appreciate that, unless expressly stated otherwise, the singular forms "a", "an", "said" and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of this application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when this application refers to an element being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, "connected" or "coupled" as used herein may include wireless connections or wireless couplings. The term "and / or" used herein includes all or any one of the units and all combinations of one or more associated listed items.

[0055] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in common dictionaries should be understood to have meanings consistent with their meanings in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless specifically defined as herein.

[0056] It will be understood by those skilled in the art that the terms "client," "terminal," and "terminal device" as used herein include both devices that are wireless signal receivers, i.e., devices that only have wireless signal receivers without transmission capabilities, and devices that have receiving and transmitting hardware capable of two-way communication over a two-way communication link. Such devices may include: cellular or other communication devices such as personal computers and tablet computers, which have single-line displays, multi-line displays, or cellular or other communication devices without multi-line displays; PCS (Personal Communications Service), which may combine voice, data processing, fax, and / or data communication capabilities; PDA (Personal Digital Assistant), which may include a radio frequency receiver, a pager, Internet / Intranet access, a web browser, a notepad, a calendar, and / or a GPS (Global Positioning System) receiver; and conventional laptop and / or palmtop computers or other devices, which have and / or include a radio frequency receiver. As used herein, the terms "client," "terminal," or "terminal device" may be portable, transportable, or installed in a vehicle (air, sea, and / or land), or may be adapted and / or configured to operate locally and / or in a distributed manner at any other location on Earth and / or in space. As used herein, the terms "client," "terminal," or "terminal device" may also refer to a communication terminal, an Internet terminal, or a music / video playback terminal, such as a PDA, an MID (Mobile Internet Device), and / or a mobile phone with music / video playback capabilities, or may include a smart TV, a set-top box, or other device.

[0057] The hardware referred to by names such as "server", "client", and "service node" in this application is essentially an electronic device with capabilities equivalent to those of a personal computer. It is a hardware device that has the necessary components revealed by the von Neumann principle, such as a central processing unit (including an arithmetic unit and a controller), a memory, an input device, and an output device. Computer programs are stored in its memory, and the central processing unit loads the program stored in the external memory into the internal memory for execution, executes the instructions in the program, and interacts with the input and output devices to complete specific functions.

[0058] It should be noted that the concept of "server" referred to in this application can also be extended to server clusters. Based on the network deployment principles understood by those skilled in the art, the servers described should be logically divided. In physical space, these servers can be independent of each other but callable through interfaces, or integrated into a single physical computer or a computer cluster. Those skilled in the art should understand this flexibility and should not use it to constrain the implementation of the network deployment method of this application.

[0059] Unless expressly specified, one or more technical features of the present application can be deployed on a server for implementation and accessed by a client through a remote call to obtain an online service interface provided by the server, or can be directly deployed and run on a client for implementation.

[0060] Unless expressly specified otherwise, the neural network models referenced or may be referenced in this application may be deployed on a remote server and remotely called on the client, or may be deployed and directly called on a client with sufficient device capabilities. In some embodiments, when it runs on the client, its corresponding intelligence may be obtained through transfer learning to reduce the requirements for the client's hardware operating resources and avoid excessive occupation of the client's hardware operating resources.

[0061] Unless explicitly specified, the various data involved in this application can be stored remotely on a server or on a local terminal device, as long as they are suitable for being called by the technical solution of this application.

[0062] Those skilled in the art should be aware that although the various methods of this application are described based on the same concept and thus exhibit commonality, unless otherwise specified, these methods can be independently executed. Similarly, the various embodiments disclosed in this application are all based on the same inventive concept. Therefore, concepts with the same expression, as well as concepts that are appropriately transformed for convenience despite different expression, should be understood as equivalent.

[0063] Unless expressly stated to be mutually exclusive, the various embodiments disclosed in this application may be cross-combined with the relevant technical features of the various embodiments to flexibly construct new embodiments, as long as such combination does not deviate from the creative spirit of this application and can meet the needs of the prior art or resolve certain deficiencies in the prior art. Those skilled in the art should be aware of such flexibility.

[0064] See also Figure 1, the blockchain-based medical model collaborative training method of this application can be implemented on a blockchain-based medical model collaborative training system based on an incentive mechanism. This application is based on blockchain, IPFS and a trusted execution platform, and realizes full-process automatic mobilization and task execution through smart contracts. The blockchain is responsible for the trusted storage and interaction records of data to ensure the transparency and trustworthiness of the system. IPFS combines the content identifier (CID) mechanism to achieve efficient storage and distribution of model gradients and training parameters. The trusted execution platform undertakes high-computing tasks to further ensure the security and accuracy of data processing. The system involves multiple modules such as data providers, model demanders, blockchain, IPFS and trusted execution platforms. Each module collaborates to complete the entire process of tasks such as task release, node screening, data processing, model training, contribution measurement, feedback verification and reward distribution. The medical model collaborative training system on the blockchain based on the incentive mechanism includes blockchain, IPFS and a trusted execution platform to build a full-process automated collaboration system. Its core training framework is divided into five stages, which include:

[0065] 1) During the task release and node election phase, model users publish training tasks containing performance objectives, test sets, and parameter requirements through the blockchain. After the intended nodes complete registration, the system verifies their isolation status and historical performance through the reputation algorithm on the blockchain. Combined with random number factors, the system dynamically selects nodes that meet the reputation threshold, forms a list of candidate nodes, and broadcasts it to the entire network to ensure fairness and anti-monopoly of node selection.

[0066] 2) During the local model training phase, selected client nodes retrieve the encrypted global model CID from IPFS, decrypt it, and train the model based on local medical data to generate gradient parameters. Once training is complete, the gradient is encrypted and uploaded to IPFS, where it receives a unique CID and is synchronized to the blockchain for storage, enabling distributed data storage and traceability.

[0067] 3) In the gradient aggregation and quality verification phase, the trusted execution platform receives the encrypted CID array on the chain, decrypts it, obtains all node gradients from IPFS, performs high-load model aggregation calculations, verifies the gradient quality through a standard test set, and synchronizes the results to the blockchain to trigger the contribution measurement algorithm in the smart contract to ensure the accuracy and security of the model update.

[0068] 4) During the contribution value calculation and incentive distribution phase, the smart contract calculates the node's contribution value based on the gradient verification results and an adaptive accuracy threshold, updating its on-chain reputation record. Ultimately, incentives are automatically distributed based on contribution value. Rewards are distributed to medical clients via the blockchain, while training results are fed back to those who use the model, achieving an automated incentive mechanism for the entire process.

[0069] 5) During the global model update and closed-loop iteration phase, the trusted execution platform uploads the aggregated global model CID to the chain. Nodes obtain the new model parameters through the CID and start the next round of local training.

[0070] Through dynamic reputation evaluation, random screening mechanism and on-chain incentive strategy, the system forms a closed-loop management of "task release-node screening-training-evaluation-incentive", continuously optimizing model performance and system efficiency.

[0071] In some embodiments, IPFS is a distributed file storage system used to store and manage data; CIDs identify global models and gradient files. Using CIDs, nodes can retrieve the required global models from IPFS or upload their own gradients, ensuring that each file has a unique and reliable identity in the distributed environment.

[0072] Based on the above example scenario, please refer to Figure 2 In one embodiment, the blockchain-based collaborative training method for medical models of the present application includes:

[0073] Step S10: The blockchain obtains an initial global model and a selected client set corresponding to the target medical model of the model demander, wherein the selected client set includes multiple selected client subsets, and the selected client subsets include multiple medical clients;

[0074] The blockchain acquires the initial global model and selected client set corresponding to the target medical model of the model requester. Blockchain technology is used to manage and record various medical data during the training process, ensuring the security, transparency, and traceability of medical data. The model requester represents the entity that requires the medical model, typically the user or requestor of the target medical model, including hospitals, medical research institutions, etc., who require an initial global model to begin model training or optimization. The target medical model refers to the final medical model desired by the model requester, which may be based on a specific goal such as disease diagnosis or treatment plan. The initial global model represents the initial version at the beginning of collaborative training. It may be an already trained model with certain pre-trained parameters, which is then used by individual medical clients for further training. The selected client set refers to the group of clients selected by the system to participate in the model training process. These clients are selected from the pool of interested clients based on their reputation or quarantine status data, where quarantine status data includes the number of quarantines or the duration of quarantine. These clients may be distributed across different geographic locations or medical institutions, and their task is to train and update the global model based on their local medical data. The selected client subset includes multiple medical clients: these are the clients that actually participate in the medical model training process. Each medical client typically represents a medical institution, clinic, or hospital, which has local medical data and uses this data to train the model. These clients train the model based on their own medical data (e.g., patient health records, diagnostic data, etc.) and submit the calculated gradient parameters to the global model for aggregation.

[0075] Step S20: Invoke an on-chain Shapley value incentive algorithm based on an adaptive threshold to send the global model of the previous training round to each selected client in the set of selected clients, so that each selected client uses its local medical data to train the global model of the previous training round to generate a sub-model corresponding to each selected client in the current training round. The sub-model is used to update the initial global model. If the first accuracy corresponding to the sub-model is greater than the adaptive accuracy threshold of the current training round, the selected client is added to the set of verified clients.

[0076] After obtaining the initial global model corresponding to the target medical model of the model demander and the selected client set, the blockchain calls the on-chain Shapley value incentive algorithm based on the adaptive threshold to send the global model of the previous training round to each selected client in the selected client set, so that each selected client uses its local medical data to train the global model of the previous training round to generate a sub-model corresponding to each selected client in the current training round. The sub-model is used to update the initial global model. If the first accuracy corresponding to the sub-model is greater than the adaptive accuracy threshold of the current training round, the selected client is added to the verified client set;

[0077] In the collaborative training of multi-party medical models, evaluating and quantifying the contributions of individual medical institutions is a key challenge. On the one hand, the quality and scale of data provided by different hospitals vary. Some may significantly improve model performance, while others contribute little. Without a fair contribution assessment and incentive distribution mechanism, some institutions may selfishly provide low-quality or malicious data to reap the benefits of model updates. This misconduct not only compromises overall model training but also discourages other honest participants. On the other hand, if the incentive mechanism is poorly designed, high-quality medical clients will not receive the appropriate rewards. This will, in the long run, dampen the enthusiasm of data contributors and affect the efficiency and reliability of the collaborative training system.

[0078] To address these issues, this application introduces an on-chain Shapley value incentive algorithm based on adaptive thresholds in a blockchain environment. By incorporating adaptive accuracy thresholds, this algorithm effectively eliminates the interference of low-quality sample sets on overall model training, ensuring the stability and efficiency of model aggregation. Furthermore, the algorithm implements logical execution through smart contracts and deploys a Shapley value-based contribution measurement method on the blockchain, ensuring the fairness, transparency, and auditability of the incentive process. It also accurately assesses the quality of the models provided by participants and quantifies their actual contribution value.

[0079] In some embodiments, the steps of calling an on-chain Shapley value incentive algorithm based on an adaptive threshold to send the global model of the previous training round to each selected client in the set of selected clients, so that each selected client uses its local medical data to train the global model of the previous training round to generate a sub-model corresponding to each selected client in the current training round, include:

[0080] In each round of training, the blockchain will verify the client set N (t) Initialize to empty and use the global model M of the previous training round (t-1) Send to each selected client for model update, and receive the updated sub-model of the current training round from the selected client

[0081] In a further embodiment, the step of using the sub-model to update the initial global model, and if the first accuracy corresponding to the sub-model is greater than the adaptive accuracy threshold of the current training round, then adding the selected client to the verified client set includes:

[0082] Step S201: Use the sub-model Update the initial global model M (0) , and use the standard test set T for gradient verification to determine the sub-model The corresponding first accuracy, if the sub-model The corresponding first accuracy Greater than the adaptive accuracy threshold of the current training round Then add the selected client i to the verified client set N (t) The selected client i is determined as a verified client and participates in the model aggregation of the current training round;

[0083] Step S202: If the sub-model The corresponding first accuracy Less than or equal to the adaptive accuracy threshold of the current training round The selected client i does not participate in the model aggregation of the current training round, and the contribution value of the selected client i in the current training round is is 0.

[0084] Specifically, this application utilizes gradient information in the global model training process to approximately reconstruct the model trained on different data subsets, thus avoiding the frequent model retraining overhead. On this basis, the performance of these reconstructed models on the standard test set T can be evaluated and used as the utility function value of the contribution measurement. Indicates that the contribution value of different medical clients can be accurately measured, including:

[0085] Initialize the initial global model M corresponding to the target medical model of the model demander (0) and training parameters. After the model demander publishes the training task information and the intended client completes the election, the selected client set N is generated, and the adaptive threshold buffer value α and buffer factor β are sent to the smart contract on the blockchain.

[0086] The smart contract on the blockchain starts the training instruction, performs a full combination of the selected clients to generate a subset S of selected clients, and initializes the adaptive accuracy threshold and the initial global model M (0) , and initialize different non-empty subsets using the same model Reconstructed model set represented by

[0087] In the gradient verification step, the blockchain sends the global model of the previous training round to each selected client in the selected client set, so that each selected client uses its local medical data to train the global model of the previous training round to generate a sub-model corresponding to each selected client in the current training round. Each medical client uses its local medical data to train and then transmits the updated sub-model back. The system then verifies the gradient value uploaded by the client, and finally returns the updated sub-model and the verified client set that has passed the verification.

[0088] In each round of training, the blockchain first stores the set of verified clients N that have passed gradient verification. (t) Initialized to empty; then, the global model M of the previous training round (t-1) Send to each selected client for model update, and receive the updated sub-model of the current training round from the selected client ; and adopt the sub-model Update the initial global model M (0) , and use the standard test set T for gradient verification to determine the sub-model The corresponding first accuracy, if the sub-model The corresponding first accuracy Greater than the adaptive accuracy threshold of the current training round Then add the selected client i to the verified client set N (t) If the selected client i is determined to be a verified client, the selected client i will participate in the model aggregation of the current training round; otherwise, if the sub-model The corresponding first accuracy Less than or equal to the adaptive accuracy threshold of the current training round The selected client i does not participate in the model aggregation of the current training round, and the contribution value of the selected client i in the current training round is is 0. Finally, the updated sub-model set And the set of authenticated clients N that have passed authentication (t) Return. The steps of the gradient verification algorithm are specifically expressed as follows:

[0089]

[0090] In the client update part, each client will receive the global model M of the previous training round sent by the blockchain each time. (t-1), and trains the local model using the classic gradient descent algorithm based on its own local medical data. When the consensus frequency F is reached, the updated local model M is returned to the blockchain. In this process, E is the local training round, η is the learning rate, and batch_count is the number of training batches. The client local model update algorithm is expressed as follows:

[0091]

[0092] Step S30: determining a global model for a current training round based on the gradient value of each verified client in the set of verified clients, and updating the adaptive accuracy threshold if the second accuracy corresponding to the global model for the current training round is greater than the sum of the adaptive accuracy threshold and the buffer;

[0093] Invoke an adaptive threshold-based on-chain Shapley value incentive algorithm, send the global model of the previous training round to each selected client in the selected client set, so that each selected client uses its local medical data to train the global model of the previous training round to generate a sub-model corresponding to each selected client in the current training round, and use the sub-model to update the initial global model. If the first accuracy corresponding to the sub-model is greater than the adaptive accuracy threshold of the current training round, add the selected client to the verified client set, and determine the global model of the current training round based on the gradient value of each verified client in the verified client set. If the second accuracy corresponding to the global model of the current training round is greater than the sum of the adaptive accuracy threshold and the buffer, update the adaptive accuracy threshold.

[0094] In some embodiments, determining a global model for a current training round based on a gradient value of each verified client in the set of verified clients, and if a second accuracy corresponding to the global model for the current training round is greater than a sum of the adaptive accuracy threshold and a buffer, updating the adaptive accuracy threshold comprises:

[0095] Step S301: Calculate the verified client set N (t) The gradient value of each authenticated client in And the gradient value A weighted average calculation is performed based on the size of the local medical dataset of the verified client to determine the global model M for the current training round. (t) , and use it as the initial global model for the next training round;

[0096] Step S302: Use the standard test set T to test the global model M. (t)Perform gradient verification to determine the global model M (t) The corresponding second accuracy γ (t) ;

[0097] Step S303: If the second accuracy rate γ (t) Greater than the adaptive accuracy threshold of the current training round and the sum of αβ between buffers, then update the adaptive accuracy threshold The adaptive accuracy threshold represents the product of the threshold buffer value and the buffer factor, α represents the threshold buffer value, and β represents the buffer factor, which decreases as the number of consecutive training rounds in which the adaptive accuracy threshold is not updated increases, thereby reducing the difficulty of updating the adaptive accuracy threshold.

[0098] Specifically, in step 301 to step S303, the global model and the adaptive accuracy threshold are updated, and the gradient of the reconstructed model is calculated and returned. The specific process is shown as follows:

[0099]

[0100] Calculate the verified client set N (t) The gradient value of each authenticated client in And the gradient value A weighted average calculation is performed based on the size of the local medical dataset of the verified client to determine the global model M for the current training round. (t) , and use it as the initial global model for the next training round;

[0101] Next, an adaptive threshold update will be performed to update the global model M generated by the current training round. (t) , verified with the standard set T to obtain the global model M (t) The corresponding second accuracy γ (t) , if γ (t) Greater than the adaptive accuracy threshold of the current training round and the sum of αβ between buffers, then update the adaptive accuracy threshold Among them, α is the threshold buffer value, which needs to be determined before training begins and should be based on the initial adaptive accuracy threshold The parameter value is determined by the quality of the initial standard test set T; β is a buffer factor that decreases as the number of consecutive rounds without updating the adaptive accuracy threshold increases, thereby reducing the difficulty of updating the adaptive accuracy threshold. If the adaptive accuracy threshold is too high, resulting in the majority of clients failing to participate in model aggregation for multiple consecutive rounds, the smart contract will lower the adaptive threshold.

[0102] Step S40: using the gradient value corresponding to each subset of verified clients in the set of verified clients to update the global model of the previous training round to determine a reconstructed model corresponding to the subset of verified clients, and calculating and determining a current contribution value of each verified client in the current training round based on the third accuracy corresponding to the reconstructed model;

[0103] determining a global model for a current training round based on the gradient value of each verified client in the set of verified clients; if a second accuracy rate corresponding to the global model for the current training round is greater than the sum of the adaptive accuracy rate threshold and the buffer, updating the adaptive accuracy rate threshold, using the gradient value corresponding to each subset of verified clients in the set of verified clients to update the global model for the previous training round to determine a reconstructed model corresponding to the subset of verified clients; and calculating and determining a current contribution value of each verified client in the current training round based on a third accuracy rate corresponding to the reconstructed model;

[0104] In some embodiments, the step of updating the global model of the previous training round using the gradient value corresponding to each verified client subset in the verified client set to determine the reconstructed model corresponding to the verified client subset includes:

[0105] Step S401: For each verified client subset S in the verified client set, a weighted average calculation is performed based on the size of the local medical data set of each verified client in the verified client subset to determine the gradient value corresponding to each verified client subset, wherein: Each set of authenticated clients N (t) including a plurality of verified client subsets S, each verified client subset S including a plurality of verified clients;

[0106] Assume that multiple medical clients have been verified through the blockchain system. These clients have trained a global model in their local environments and uploaded their gradients to IPFS. All verified clients are divided into multiple subsets based on their historical performance, referred to as "verified client subsets." The size of each verified client's local medical dataset varies, meaning some clients have more training data than others. To ensure that the gradient aggregation accounts for this difference in data size, this application performs a weighted average of the gradients based on the size of each client's local dataset.

[0107] Specifically, for each client in the verified client subset, the size of each client's local medical dataset is obtained. Based on the size of the local dataset, a weight is assigned to the client's gradient value: weight = local dataset size / sum of all client dataset sizes. The gradient value for this client subset is calculated using the weighted average formula: weighted gradient value = ∑(client gradient value × weight). The gradient value for each verified client subset is its corresponding weighted average gradient. This process is repeated until the weighted average gradients for all verified client subsets have been calculated.

[0108] Step S402: Use the gradient value corresponding to each verified client subset to update the global model M of the previous training round. (t-1) , to obtain the reconstruction model corresponding to each verified client subset S of the current training round And build a set of reconstruction models

[0109] The global model is updated using the weighted average gradient value of each verified client subset. Using the weighted average gradient value of each verified client subset as input, a standard gradient descent algorithm (or other optimization algorithm) is used to update the global model. The updated global model becomes the "current global model" for the current training round. After updating the global model based on the weighted gradient values ​​of each verified client subset, each verified client subset receives a corresponding "reconstructed model." Each reconstructed model is a new model trained on the current global model and its local dataset. This reconstructed model differs slightly from the global model because it is adjusted based on the client data. All updated reconstructed models are collected into a "reconstructed model collection," which represents the local adjustments for all clients in the current training round. The updated global model and its corresponding reconstructed model are uploaded to IPFS and stored on the blockchain. Each client obtains the latest global model CID from the blockchain for the next round of training. Simultaneously, the model update results are fed back to model users (such as hospitals or research institutions) so they can make decisions based on the latest model or conduct further analysis.

[0110] In a further embodiment, the step of calculating and determining the current contribution value of each verified client in the current training round according to the third accuracy rate corresponding to the reconstructed model includes:

[0111] Step S4001: For the verified client subset S, use the standard test set T to test the reconstruction model corresponding to each verified client subset S. To obtain the reconstruction model corresponding to each authenticated client subset S The third accuracy rate is used as the utility function value

[0112] Step S4002: Based on the utility function value Calculates and determines the current contribution value of each verified client in the current training round.

[0113] Specifically, the contribution values ​​of different medical clients (data providers) are calculated based on the Shapley value lemma. For the verified client subset S, the standard test set T is used to test the reconstruction model corresponding to each verified client subset S. To obtain the reconstruction model corresponding to each authenticated client subset S The third accuracy rate is used as the utility function value , according to the utility function value Calculate and determine the current contribution value of each verified client in the current training round It is expressed as:.

[0114]

[0115] Among them, λ i (t) Indicates the verified contribution of client i to the global model in the current training round;

[0116] Reconstructed model corresponding to each authenticated client subset S The accuracy of the reconstructed model The utility function value on the standard test set T; N (t) is the verified client set, which represents all verified clients participating in this round of training; S represents the verified client set N (t) Any subset of authenticated clients in ; Indicates that S is a set of authenticated clients N (t) The subset after removing the verified client i; Represents the updated reconstruction model after adding the verified client i to the verified client subset S The utility function value on the standard test set T.

[0117] Step S50, calling the reputation algorithm based on real-time contribution value update, determining the current contribution value of each verified client in the current training round according to the third accuracy calculation corresponding to the reconstructed model, so as to determine the current reputation value of each verified client in the verified client set, and determining the selected client set for the next training round according to the current reputation value; looping through the above steps, using the selected client set to train the initial global model to a preset number of training times until the target medical model meets the training task requirements, so as to complete the training of the target medical model and record the final contribution value of each participating client in all training rounds.

[0118] The global model of the previous training round is updated using the gradient value corresponding to each verified client subset in the verified client set to determine the reconstruction model corresponding to the verified client subset. After determining the current contribution value of each verified client in the current training round according to the third accuracy rate corresponding to the reconstruction model, the reputation algorithm based on real-time contribution value update is called to determine the current contribution value of each verified client in the current training round according to the third accuracy rate corresponding to the reconstruction model to determine the current reputation value of each verified client in the verified client set, and the selected client set for the next training round is determined according to the current reputation value; the above steps are executed in a loop, and the initial global model is trained to a preset number of training times using the selected client set until the target medical model meets the training task requirements, so as to complete the training of the target medical model and record the final contribution value of each participating client in all training rounds.

[0119] In the blockchain-based collaborative medical model training system, medical institutions participate as independent nodes in the shared model update process. Given the significant heterogeneity among nodes in terms of resource reserves, data characteristics, and potential interests, some institutions, driven by self-interest, may engage in malicious interference, negatively impacting model performance. Currently, reputation-based node selection strategies have exposed a series of issues in practical applications, such as reputation monopoly, subjective evaluation bias, and high barriers to entry for new nodes. These issues have severely constrained the sustainable development of collaborative training.

[0120] See also Figure 3, this application proposes a reputation algorithm based on real-time contribution value updates. The algorithm uses the Shapley value theory to quantitatively evaluate the contribution of nodes in the process of improving model performance, and by integrating historical contributions with current contributions, it realizes dynamic and fair updates of node reputations, effectively overcoming the inherent drawbacks of traditional mechanisms. In response to reputation monopoly and the difficulties of integrating new nodes, this algorithm introduces a random number factor and a reputation decay mechanism, aiming to weaken the cumulative effect of the advantages of high-reputation nodes, while providing new nodes with fair competition opportunities, ensuring that the node selection process is objective, fair and transparent, thereby incentivizing each node to actively contribute high-quality model resources.

[0121] In some embodiments, the steps of calling a reputation algorithm based on real-time contribution value updates, calculating and determining a current contribution value of each verified client in a current training round based on a third accuracy rate corresponding to the reconstructed model, thereby determining a current reputation value of each verified client in the set of verified clients, and determining a set of selected clients for the next training round based on the current reputation value include:

[0122] Step S501: using a reputation algorithm based on real-time contribution value updates to determine the current reputation value of each verified client in the verified client set according to the historical contribution value and current contribution value corresponding to the verified client;

[0123] Step S502: Detect whether the current reputation value is greater than a preset reputation threshold. If the current reputation value is less than the preset reputation threshold, add the verified client to a low-reputation node group. If the current reputation value is greater than the preset reputation threshold, add the verified client to a high-reputation node group, where the low-reputation node group includes new client nodes and client nodes with a reputation value below the reputation threshold.

[0124] Step S503: Randomly select clients from the low reputation node group and the high reputation node group according to a preset ratio to construct a selected client set to participate in the training of the target medical model. In each round of training, the participating clients first submit their corresponding sub-models for training and perform standardized verification on their results. In the verification set, if the contribution of client i meets the accuracy Above the adaptive threshold Then it participates in the aggregation of the global model and calculates the contribution value of the current training round

[0125] Step S504: Otherwise, the contribution value of the client i is directly set to 0, and it will not be included in the model update in the current training round. The model training continues until the preset training round R is met. The system calculates the corresponding final contribution value λ for all clients. i ;

[0126] Step S505: For clients with positive contribution values, their reputation values ​​are updated according to the reward mechanism. The greater the contribution, the faster the reputation value increases. For clients with negative contribution values ​​or those that do not meet the requirements, their reputation values ​​will be penalized to a certain extent, with a fixed reputation value reduced and the isolation time δ increased accordingly. i and the number of violations η i , to limit low-quality client nodes and malicious client nodes.

[0127] Specifically, when the above reputation algorithm is released on the chain, the preset reputation threshold is first defined. A series of key parameters are introduced, including reputation decay factor κ, new node random number factor σ, and contribution value ratio factor α. At the beginning of the campaign, if the isolation time δ of a potential client i is i If it is greater than 0, the node will be directly prohibited from participating in the current training round until the isolation time of the intended client i returns to zero.

[0128] The reputation value of each potential client i participating in the election is Φ i Indicates that the nodes that meet the conditions are divided into two groups according to the user's reputation level: the low reputation node group consisting of new nodes and client nodes below the reputation threshold and a group of high-reputation nodes above the preset reputation threshold

[0129] In order to ensure the fairness of the model and the participation opportunities of new nodes, the system selects nodes with low reputation according to the preset ratio. and high reputation node groups Users are randomly selected from The proportion of the selected client set participating in the training in, The probability of each node being selected is positively correlated with the random number factor σ; this design not only increases the possibility of election for new nodes, but also inhibits the excessive participation of nodes with high reputation and prevents reputation monopoly.

[0130] In each round of training, the participating clients first submit their corresponding sub-models for training and perform standardized verification on their results. In the verification set, if the contribution of client i meets the accuracy Above the adaptive threshold Then it participates in the aggregation of the global model and calculates the contribution value of the current training round

[0131] Otherwise, the contribution value of the client i is directly set to 0, and it will not be included in the model update in the current training round. Model training continues until the preset training round R is met. The system calculates the corresponding final contribution value λ for all clients.i ;

[0132] For clients with positive contribution values, their reputation values ​​are updated according to the reward mechanism. The greater the contribution, the faster the reputation value grows. For clients with negative contribution values ​​or those that do not meet the requirements, their reputation values ​​will be penalized to a certain extent, reducing the fixed reputation value and increasing the isolation time δ accordingly. i and the number of violations η i , to limit low-quality client nodes and malicious client nodes, and ensure the algorithm's ability to limit low-quality client nodes and malicious client nodes.

[0133] In this design, the rate of reputation growth is not only positively correlated with contribution value but also modulated by reputation level. Nodes with higher reputations have their growth rate reduced by a decay factor, κ, ensuring that high-reputation nodes do not indefinitely widen the gap with other nodes. Nodes with lower reputations, on the other hand, can gradually improve their reputations by providing high-quality models, thereby incentivizing nodes to provide high-quality updated models. The algorithm also incorporates a dynamic isolation mechanism into the reputation evaluation process. For client nodes whose reputation falls below a preset reputation threshold, the isolation time increases exponentially with the number of violations. This effectively prevents the frequent participation of malicious nodes and ensures the overall fairness and dynamic balance of the system.

[0134] In some embodiments, after all rounds of training are completed, the final contribution value of this training is calculated based on the following formula, which is expressed as:

[0135]

[0136] Among them, R represents the preset training round; K (t) represents the attenuation factor; Indicates the contribution of the verified client subset S to the global model in the current training round; N (t) is the set of verified clients, which represents all verified clients participating in this round of training; i Indicates the verified contribution of client i to the global model in all training rounds.

[0137] From the above expression, we can see that as the number of iterative training rounds increases, the global model is increasingly affected by the common influence of all data sets. Therefore, this application introduces the attenuation factor K (t) , with later rounds receiving a lower weight. Furthermore, by weighting the client's contribution value in each round by the total contribution value for that round and summing them across all rounds, we calculated the final contribution value for each medical client. This concludes the contribution value of each participating medical client in training the target medical model and the final target medical model.

[0138] As can be seen from the above embodiments, compared with the existing technology, this application addresses the technical bottlenecks of traditional federated learning in the existing technology, such as single point failure risks, insufficient privacy protection, lack of incentive mechanisms, and weak trust mechanisms, as well as the problems of decentralized architecture such as lack of incentive mechanisms, delayed reputation updates, and weak resistance to poisoning attacks. This application includes but is not limited to the following beneficial effects:

[0139] First, this application constructs an incentive-based blockchain-based collaborative training system for medical models, achieving efficient medical model training while ensuring transparency and traceability of the training process. To address the problems existing in the collaborative training process of existing medical models, including a lack of trust due to opaque training processes, the risk of poisoning attacks caused by improper customer selection, and the lack of an effective contribution measurement mechanism, this application proposes an incentive-based blockchain-based collaborative training framework for medical models. By embedding aggregation, incentive, and reputation algorithms into smart contracts to achieve automatic on-chain execution, the entire process is ensured to be open, transparent, and auditable, thereby improving the collaborative efficiency and trust level between medical institutions.

[0140] Secondly, this application designs an on-chain Shapley value incentive algorithm based on an adaptive threshold. This algorithm addresses the issues of unreasonable node contribution evaluation, unfair reward distribution, and interference from low-quality data. By setting an adaptive threshold to eliminate low-quality gradients and combining the Shapley value to accurately quantify the contribution of each node, effective reward distribution and model performance improvement are achieved, stimulating the enthusiasm of medical institutions to share high-quality data.

[0141] Third, this application constructs a reputation algorithm based on real-time contribution value updates. This algorithm addresses issues such as malicious node poisoning, unfair node selection, and reputation monopoly. By updating reputation based on a node's actual contribution performance, combined with a campaign randomization factor and reputation decay strategy, it achieves reasonable client selection and malicious node isolation, creating a sustainable model collaborative training environment.

[0142] Furthermore, this application proposes a medical model collaborative training system on the blockchain based on an incentive mechanism, which builds a complete multi-party collaborative training system. By embedding aggregation, incentive and reputation algorithms into smart contracts to achieve automatic execution on the chain, it ensures that the entire collaborative training process is open, transparent and auditable, thereby improving the collaborative efficiency and trust level among medical institutions; a Shapley incentive algorithm based on adaptive thresholds is proposed, which optimizes the Shapley value algorithm logic through adaptive thresholds to effectively filter low-quality gradient updates and achieve accurate measurement of node contributions in different malicious environments; finally, a reputation algorithm based on real-time contribution value updates is constructed, which updates the reputation according to the node's actual contribution performance, and combines the election random factor and reputation decay strategy to achieve reasonable client selection and malicious node isolation; this application targets the three core needs of the medical artificial intelligence field: separation of data ownership and usage rights, trusted cross-institutional collaborative training environment, and fair value distribution system. Through the deep integration of blockchain technology and federated learning, a decentralized, auditable and sustainable medical model collaborative training ecosystem is constructed. Its technological breakthrough not only solves the inherent defects of traditional solutions in privacy protection, incentive mechanism and system scalability, but also provides key technical support for the market-oriented allocation of medical data elements, and promotes the development of medical artificial intelligence towards universalization and trustworthiness.

[0143] See also Figure 4A medical model collaborative training device on a blockchain is provided to meet one of the purposes of this application, including an initial model acquisition module 1100, a global model update module 1200, a threshold update module 1300, a contribution value calculation module 1400 and a target model training module 1500. Among them, the initial model acquisition module 1100 is configured to obtain the initial global model and the selected client set corresponding to the target medical model of the model demander through the blockchain, wherein the selected client set includes multiple selected client subsets, and the selected client subsets include multiple medical clients; the global model update module 1200 is configured to call the on-chain Shapley value incentive algorithm based on the adaptive threshold, and send the global model of the previous training round to each selected client in the selected client set, so that each selected client uses its local medical data to train the global model of the previous training round to generate a sub-model corresponding to each selected client in the current training round, and use the sub-model to update the initial global model. If the first accuracy corresponding to the sub-model is greater than the adaptive accuracy threshold of the current training round, the selected client is added to the verified client set; the threshold update module 1300 is configured to determine the global model of the current training round according to the gradient value of each verified client in the verified client set. If the second accuracy corresponding to the global model of the current training round is greater than the adaptive accuracy threshold of the current training round, the selected client is added to the verified client set. The adaptive accuracy threshold is updated if the sum of the adaptive accuracy threshold and the buffer is greater than the sum of the adaptive accuracy threshold and the buffer; the contribution value calculation module 1400 is configured to use the gradient value corresponding to each verified client subset in the verified client set to update the global model of the previous training round to determine the reconstruction model corresponding to the verified client subset, and determine the current contribution value of each verified client in the current training round according to the third accuracy calculation corresponding to the reconstruction model; the target model training module 1500 is configured to call the reputation algorithm based on real-time contribution value update, and determine the current contribution value of each verified client in the current training round according to the third accuracy calculation corresponding to the reconstruction model to determine the current reputation value of each verified client in the verified client set, and determine the selected client set for the next training round according to the current reputation value; the above steps are executed in a loop, and the initial global model is trained to a preset number of training times using the selected client set until the target medical model meets the training task requirements, so as to complete the training of the target medical model and record the final contribution value of each participating client in all training rounds.

[0144] Based on any embodiment of this application, please refer to Figure 5 Another embodiment of the present application further provides an electronic device, which can be implemented by a computer device, such as Figure 5As shown, a schematic diagram of the internal structure of a computer device. The computer device includes a processor, a computer-readable storage medium, a memory, and a network interface connected via a system bus. Among them, the computer-readable storage medium of the computer device stores an operating system, a database, and computer-readable instructions. The database may store a control information sequence. When the computer-readable instructions are executed by the processor, the processor may implement a method for collaborative training of medical models on a blockchain. The processor of the computer device is used to provide computing and control capabilities to support the operation of the entire computer device. The memory of the computer device may store computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor may execute the method for collaborative training of medical models on a blockchain of the present application. The network interface of the computer device is used to connect and communicate with a terminal. Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0145] In this embodiment, the processor is used to execute Figure 4 The memory stores the program code and various data required to execute the specific functions of each module in the blockchain-based medical model collaborative training device. The network interface is used to transmit data between user terminals or servers. The memory in this embodiment stores the program code and data required to execute all modules in the blockchain-based medical model collaborative training device of this application. The server can call the server's program code and data to execute the functions of all modules.

[0146] The present application also provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the medical model collaborative training method on the blockchain described in any embodiment of the present application.

[0147] The present application also provides a computer program product, including a computer program / instruction, which, when executed by one or more processors, implements the steps of the method for collaborative training of medical models on the blockchain described in any embodiment of the present application.

[0148] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments of the present application can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above-mentioned embodiments of the method. The aforementioned storage medium can be a computer-readable storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0149] The above description is only part of the implementation methods of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A collaborative training method for medical models on blockchain, characterized by: include: The blockchain obtains an initial global model and a selected client set corresponding to a target medical model of a model demander, wherein the selected client set includes a plurality of selected client subsets, and the selected client subsets include a plurality of medical clients; Invoking an on-chain Shapley value incentive algorithm based on an adaptive threshold to send the global model of the previous training round to each selected client in the set of selected clients, so that each selected client uses its local medical data to train the global model of the previous training round to generate a sub-model corresponding to each selected client in the current training round, and using the sub-model to update the initial global model. If the first accuracy corresponding to the sub-model is greater than the adaptive accuracy threshold of the current training round, then adding the selected client to the set of verified clients; determining a global model for a current training round according to a gradient value of each verified client in the set of verified clients, and updating the adaptive accuracy threshold if a second accuracy corresponding to the global model for the current training round is greater than a sum of the adaptive accuracy threshold and a buffer; updating the global model of the previous training round using the gradient value corresponding to each subset of verified clients in the set of verified clients to determine a reconstructed model corresponding to the subset of verified clients, and calculating and determining a current contribution value of each verified client in the current training round based on a third accuracy rate corresponding to the reconstructed model; Call a reputation algorithm based on real-time contribution value updates, calculate and determine the current contribution value of each verified client in the current training round according to the third accuracy rate corresponding to the reconstructed model, so as to determine the current reputation value of each verified client in the verified client set, and determine the selected client set for the next training round according to the current reputation value; loop through the above steps, use the selected client set to train the initial global model to a preset number of training times until the target medical model meets the training task requirements, so as to complete the training of the target medical model and record the final contribution value of each participating client in all training rounds.

2. The method for collaborative training of medical models on blockchain according to claim 1, characterized in that: The steps of calling an on-chain Shapley value incentive algorithm based on an adaptive threshold to send the global model of the previous training round to each selected client in the set of selected clients, so that each selected client uses its local medical data to train the global model of the previous training round to generate a sub-model corresponding to each selected client in the current training round, include: In each round of training, the blockchain will verify the client set N (t) Initialize to empty and use the global model M of the previous training round (t-1) Send to each selected client for model update, and receive the updated sub-model of the current training round from the selected client 3. The method for collaborative training of medical models on blockchain according to claim 2, characterized in that: The step of updating the initial global model using the sub-model and adding the selected client to the verified client set if the first accuracy corresponding to the sub-model is greater than the adaptive accuracy threshold of the current training round includes: Using the sub-model Update the initial global model M (0) , and use the standard test set T for gradient verification to determine the sub-model The corresponding first accuracy, if the sub-model The corresponding first accuracy Greater than the adaptive accuracy threshold of the current training round Then add the selected client i to the verified client set N (t) The selected client i is determined as a verified client and participates in the model aggregation of the current training round; If the sub-model The corresponding first accuracy Less than or equal to the adaptive accuracy threshold of the current training round The selected client i does not participate in the model aggregation of the current training round, and the contribution value of the selected client i in the current training round is is 0.

4. The method for collaborative training of medical models on blockchain according to claim 2, characterized in that: The step of determining a global model of a current training round according to a gradient value of each verified client in the set of verified clients, and updating the adaptive accuracy threshold if a second accuracy corresponding to the global model of the current training round is greater than a sum of the adaptive accuracy threshold and a buffer, comprises: Calculate the verified client set N (t) The gradient value of each authenticated client in And the gradient value A weighted average calculation is performed based on the size of the local medical dataset of the verified client to determine the global model M for the current training round. (t) , and use it as the initial global model for the next training round; The global model M is tested using the standard test set T. (t) Perform gradient verification to determine the global model M (t) The corresponding second accuracy γ (t) ; If the second accuracy γ (t) Greater than the adaptive accuracy threshold of the current training round and the sum of αβ between buffers, then update the adaptive accuracy threshold The adaptive accuracy threshold represents the product of the threshold buffer value and the buffer factor, α represents the threshold buffer value, and β represents the buffer factor, which decreases as the number of consecutive training rounds in which the adaptive accuracy threshold is not updated increases, thereby reducing the difficulty of updating the adaptive accuracy threshold.

5. The method for collaborative training of medical models on blockchain according to claim 3, characterized in that: The step of updating the global model of the previous training round using the gradient value corresponding to each verified client subset in the verified client set to determine the reconstructed model corresponding to the verified client subset includes: For each verified client subset S in the verified client set, a weighted average calculation is performed based on the size of the local medical data set of each verified client in the verified client subset to determine the gradient value corresponding to each verified client subset, where: Each set of authenticated clients N (t) including a plurality of verified client subsets S, each verified client subset S including a plurality of verified clients; Use the gradient value corresponding to each verified client subset to update the global model M of the previous training round (t-1) , to obtain the reconstruction model corresponding to each verified client subset S of the current training round And build a set of reconstruction models 6. The method for collaborative training of medical models on blockchain according to claim 5, characterized in that: The step of calculating and determining a current contribution value of each verified client in a current training round according to a third accuracy rate corresponding to the reconstructed model includes: For the verified client subset S, the standard test set T is used to test the reconstruction model corresponding to each verified client subset S. To obtain the reconstruction model corresponding to each authenticated client subset S The third accuracy rate is used as the utility function value According to the utility function value Calculates and determines the current contribution value of each verified client in the current training round.

7. The method for collaborative training of medical models on a blockchain according to any one of claims 1 to 6, characterized in that: The steps of calling a reputation algorithm based on real-time contribution value updates, calculating and determining a current contribution value of each verified client in a current training round according to a third accuracy rate corresponding to the reconstructed model, thereby determining a current reputation value of each verified client in the set of verified clients, and determining a set of selected clients for the next training round according to the current reputation value include: Determine the current reputation value of each verified client in the set of verified clients using a reputation algorithm based on real-time contribution value updates according to the historical contribution value and current contribution value corresponding to the verified client; Detecting whether the current reputation value is greater than a preset reputation threshold; if the current reputation value is less than the preset reputation threshold, adding the verified client to a low-reputation node group; if the current reputation value is greater than the preset reputation threshold, adding the verified client to a high-reputation node group, wherein the low-reputation node group includes new client nodes and client nodes below the reputation threshold; Clients are randomly selected from the low reputation node group and the high reputation node group according to a preset ratio to construct a selected client set to participate in the training of the target medical model. In each round of training, the participating clients first submit their corresponding sub-models for training and perform standardized verification on their results. In the verification set, if the contribution of client i meets the accuracy Above the adaptive threshold Then it participates in the aggregation of the global model and calculates the contribution value of the current training round Otherwise, the contribution value of the client i is directly set to 0, and it will not be included in the model update in the current training round. Model training continues until the preset training round R is met. The system calculates the corresponding final contribution value λ for all clients. i ; For clients with positive contribution values, their reputation values ​​are updated according to the reward mechanism. The greater the contribution, the faster the reputation value grows. For clients with negative contribution values ​​or those that do not meet the requirements, their reputation values ​​will be penalized to a certain extent, reducing the fixed reputation value and increasing the isolation time δ accordingly. i and the number of violations η i , to limit low-quality client nodes and malicious client nodes.

8. A medical model collaborative training device on blockchain, characterized by: include: An initial model acquisition module is configured to acquire, through the blockchain, an initial global model corresponding to a target medical model of a model demander and a selected client set, wherein the selected client set includes a plurality of selected client subsets, and the selected client subsets include a plurality of medical clients; a global model update module configured to invoke an on-chain Shapley value incentive algorithm based on an adaptive threshold, send the global model of the previous training round to each selected client in the set of selected clients, so that each selected client uses its local medical data to train the global model of the previous training round to generate a sub-model corresponding to each selected client in the current training round, use the sub-model to update the initial global model, and if the first accuracy corresponding to the sub-model is greater than the adaptive accuracy threshold of the current training round, add the selected client to the set of verified clients; a threshold updating module, configured to determine a global model of a current training round based on a gradient value of each verified client in the set of verified clients, and update the adaptive accuracy threshold if a second accuracy corresponding to the global model of the current training round is greater than a sum of the adaptive accuracy threshold and a buffer; a contribution value calculation module, configured to update the global model of the previous training round using the gradient value corresponding to each subset of verified clients in the set of verified clients to determine a reconstructed model corresponding to the subset of verified clients, and determine a current contribution value of each verified client in the current training round based on a third accuracy rate corresponding to the reconstructed model; The target model training module is configured to call a reputation algorithm based on real-time contribution value updates, and determine the current contribution value of each verified client in the current training round according to the third accuracy calculation corresponding to the reconstructed model, so as to determine the current reputation value of each verified client in the verified client set, and determine the selected client set for the next training round according to the current reputation value; the above steps are executed in a loop, and the initial global model is trained to a preset number of training times using the selected client set until the target medical model meets the training task requirements, so as to complete the training of the target medical model and record the final contribution value of each participating client in all training rounds.

9. An electronic device comprising a central processing unit and a memory, characterized in that: The central processing unit is configured to call and run a computer program stored in the memory to execute the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that It stores a computer program implemented according to the method described in any one of claims 1 to 7 in the form of computer-readable instructions, and when the computer program is called and executed by a computer, the steps included in the corresponding method are executed.