Trusted sharing method of medical data based on blockchain and federated learning

By introducing identity trustworthy authentication, behavior trustworthy assessment and trustworthy federal average aggregation algorithm in the medical data sharing model of blockchain and federated learning, the problems of multi-participant trust and model aggregation algorithm are solved, and the secure trustworthy sharing of medical data and the improvement of model quality are achieved.

CN116776373BActive Publication Date: 2025-03-28YUNNAN UNIVERSITY OF FINANCE AND ECONOMICS
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310716744.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-16
Publication Date
2025-03-28
Estimated Expiration
2043-06-16

AI Technical Summary

Technical Problem

The existing medical data sharing model based on blockchain and federated learning has problems with multi-participant trust and model aggregation algorithm, resulting in low data sharing efficiency and low model quality, affecting the safe and trustworthy sharing of medical data.

Method used

The medical data trusted sharing method based on blockchain and federated learning is adopted, and through the combination of data sharing layer, blockchain layer and federated learning layer, identity trusted authentication, behavior trusted assessment and trusted federated aggregation algorithm are realized to ensure the security of data sharing and the quality of the model.

Benefits of technology

It improves the credibility and security of medical data sharing, ensures the trust value and model quality of data requesters, and improves the efficiency of data sharing and model accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116776373B_ABST
    Figure CN116776373B_ABST
Patent Text Reader

Abstract

The present invention discloses a medical data trusted sharing method based on blockchain and federated learning, including: a data sharing layer, a blockchain layer and a federated learning layer; divided into 5 steps: user registration, issuing data request, data request processing, federated learning, and data sharing to complete the safe and trusted sharing of medical data. The present invention proposes a two-factor trusted model based on the combination of identity trusted authentication and behavior trusted evaluation to ensure the credibility of users in the shared blockchain. The trusted federated average aggregation algorithm is used to increase the contribution of high-trust and high-quality model parameters in the aggregation model, thereby improving the accuracy of the medical data federated learning aggregation model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an access control method based on requesting user credibility, in particular to a medical data trusted sharing method based on blockchain and federated learning. Background Art

[0002] With the improvement of medical informationization, the open sharing of massive medical data has become an inevitable trend that meets the actual data needs of the medical and health industry and has great application value. However, how to balance data sharing and privacy protection and maximize the value of medical data while ensuring data security is an important issue that scholars are currently working on.

[0003] The blockchain-based medical data sharing model has problems such as limited data storage space, increased difficulty of interoperability during the encryption and decryption process, poor sharing efficiency, high computing overhead, and unresolved data privacy issues. The integration of blockchain and federated learning technology can greatly integrate the advantages of both parties and complement each other. The secure and reliable data sharing that combines blockchain and federated learning is different from the traditional blockchain-based data sharing method. It does not require the transmission of original data. Instead, it extracts the original data into a data model through a federated learning model, and realizes "data available but invisible" through a shared data model. The parameters of the federated learning model are stored in the blockchain, which ensures the security and reliability of the model parameters.

[0004] However, the existing data sharing model based on blockchain and federated learning faces the following two important problems in the application of medical sharing networks: (1) The trust problem among multiple participants. The reliability of the clients participating in the federated training is ignored, and there may be semi-honest or malicious client nodes. (2) The federated average aggregation algorithm is unreasonable. After the blockchain nodes collect the local models of the nodes participating in the training, they aggregate the models. The existing model aggregation method is mainly federated averaging, but federated averaging does not take into account the problem of global model quality degradation caused by the participation of low-credibility and low-quality models in aggregation, which affects the quality of the entire federated learning task model and thus affects the effect of medical data sharing. Summary of the invention

[0005] In view of the defects existing in the prior art, the purpose of the present invention is to provide a trusted sharing method of medical data based on blockchain and federated learning.

[0006] In order to achieve the above-mentioned purpose, the medical data trusted sharing method based on blockchain and federated learning described in the present invention is composed of the following parts: a data sharing layer, a blockchain layer and a federated learning layer;

[0007] Data sharing layer: medical institutions join the medical data sharing alliance chain through user registration and identity trusted computing; data requesters publish data request information; and obtain the global model of federated learning through the blockchain sharing platform;

[0008] Blockchain layer: For specific data sharing requests, behavioral trusted computing selects data provider nodes based on the on-chain data retrieval mechanism and the federated client selection mechanism, forms a federated training committee, and updates the global model based on the trusted federated average aggregation algorithm;

[0009] Federated learning layer: Model training committee members perform federated learning based on their local data sets to train the same federated learning model. When data providers participate in the federated learning process, their trust values ​​are updated and stored on the blockchain.

[0010] The working steps are as follows:

[0011] Step 1. User registration: The user uploads his / her user registration information reg, and the trusted authentication center CA performs identity trusted computing for the nodes joining the blockchain. The identity trusted computing smart contract ITSC sets a certain entry threshold for users participating in data sharing. The system assigns the unique identification ID and public key Pk to the user who passes the review, issues an identity trusted certificate, and completes the user identity registration;

[0012] Step 2. Issue a data request: The data requester DR publishes a data sharing request req on the blockchain. The req contains the requested data description information, indicating the required data type, data size, data quality, and time. The request is stored as a data record on the consortium chain, and the blockchain saves the hash timestamp of its transaction to maintain the auditability of transactions on the chain;

[0013] Step 3. Data request processing: After receiving the data request req, the blockchain system calculates the behavior trust value of each data provider based on the retrieval mechanism and trust mechanism on the chain, executes the behavior trust smart contract BTSC and selects a highly trusted federated learning client SP i , forming a federated learning training committee SP = {SP1, SP2, …, SP n};

[0014] Step 4, Federated Learning: Members of the Federated Learning Training Committee execute the Federated Learning algorithm based on their own local data sets according to the data request req, and collaboratively train the same Federated Learning model in a distributed manner until the model is fitted or the number of iterations is reached; during each model update, differential privacy is used to achieve encrypted aggregation of global parameters, and accounting nodes are selected through a consensus mechanism based on node contribution. The blockchain records the update process of model parameters to achieve auditability of parameters;

[0015] Step 5. Data sharing: After the federated learning task is completed, the global model M is encrypted and saved in the blockchain. After receiving the broadcast of the completion of the federated learning task, the relevant data requester downloads the encrypted model file from the alliance chain, decrypts it, and obtains the shared model M. Therefore, the data requester can obtain medical data through the sharing platform without obtaining the original data of the patient, achieving the purpose of safe and reliable sharing of medical data.

[0016] Preferably, the identity trusted calculation process in Step 1 is:

[0017] Determine whether the user attribute exists. If not, the user identity credibility is 0, and on-chain registration is not allowed; if it exists, construct a forward matrix consisting of the original values ​​of the user's attributes as X = (x ij ) m×n ; where m is the number of users to be evaluated, n is the number of identity trust attribute evaluation indicators; x ij is the standardized matrix p obtained by normalizing the j-th identity trust attribute evaluation index of the i-th user to be evaluated ij ; Calculate the information entropy value e of the jth attribute j ; Calculate the information utility value d j ; Calculate the weight W occupied by each attribute indicator j ; Calculate the user's identity credibility IT i ; If IT i ≥IT threshold ;IT threshold It is the trust threshold, and the identity is identified and the identity certificate is produced. The user ID and public key Pk are returned, and the user registration is successful;

[0018] The user attributes include the name of the organization, the alliance ID, the degree of informatization a1, the organizational management capability a2, the anti-attack capability a3, the local data volume a4, the computing capability a5, and the network reliability a6.

[0019] Preferably, the behavioral trust calculation process in Step 3 is as follows: according to the similarities and differences between the alliance regions where the evaluating user and the evaluated user are located, the intra-alliance trust and the inter-alliance trust are studied respectively. If both are in the same alliance, the direct comprehensive trust of the user in the alliance is obtained by combining the direct trust and the recommended trust;

[0020] The two are in different alliances. On the basis of the trust evaluation within the alliance, the alliances are used as units to influence the inter-domain trust according to the inter-domain interaction behaviors, and finally the comprehensive trust between different users in the alliances is obtained.

[0021] Preferably, the trust calculation process within the alliance is: user i's comprehensive trust value of user j's behavior BTij It can be expressed as:

[0022] BT ij =α·DT ij +β·RT ij ;

[0023] Among them, DT ij is the direct trust value, RT ij is the recommended trust value, α, β are the weights of direct trust and recommended trust in the calculation of comprehensive trust value, α, β∈(0, 1) and α+β=1.

[0024] Preferably, the direct trust calculation process is: assuming that in n historical medical sharing tasks, the trust of hospital I to hospital J combined with the interaction time forms a sequence S = (<t1, DT1(i, j)>, <t2, DT2(i, j)>, …, <t n ,DT n (i,j)>). n is the time value of the interaction, DT n (i, j) is the historical trust value of the interaction, and the direct trust calculated by the IOWA operator is:

[0025]

[0026] Among them, w t is the weight of the historical direct trust ranked at the tth time in the direct trust evaluation, DT v-index(i) is t1, t2, … t n The historical direct trust at the tth position after sorting from largest to smallest.

[0027] Preferably, the process of calculating the recommendation trust is as follows: when calculating the recommendation trust of hospital I to hospital J, let the set of hospitals that can provide effective recommendation trust be E k ={E1,E2,…,E h}, h is the number of recommended hospitals, then the recommendation trust of hospital I to J is:

[0028]

[0029] Among them, DT(E k ,j) is the recommended entity E k The direct trust provided by the target hospital J. ω(E k ) is E k The recommendation factor for providing recommendation information is the credibility of hospital I in its recommendation information, which is defined as the number of hospital I to E k The shortest path calculated using Dijkstra's algorithm The product of all link weights, that is:

[0030]

[0031] Preferably, in different alliances, the comprehensive trust of I in alliance X to R in alliance Z can be expressed as:

[0032] BT ir =DT XZ ·R r→Z ;

[0033] DT XZ is the direct trust value of alliance X to alliance Z, R r→Z is the comprehensive reputation value of R in the alliance Z, which is the comprehensive trust value of all entities in the alliance to R. The calculation method is the same as the recommended trust value of entities in the alliance, expressed as:

[0034]

[0035] E k ' is all the evaluators in the alliance Z who can provide trust values ​​about R, n is E k ', ω(E k ') is the recommendation factor, where it is assumed that all evaluators are equally important and the recommendation factor is 1.

[0036] Compared with the prior art, the present invention has the following beneficial effects:

[0037] (1) A two-factor trust model based on identity trust authentication and behavioral trust evaluation is proposed. The identity trust calculation based on the entropy weight method ensures the trustworthiness of users in the shared blockchain and alleviates the dilemma of hospital data owners who are unwilling to participate in medical data sharing due to lack of trust. The behavioral trust calculation that integrates direct trust and recommended trust provides a basis for the screening of trusted and high-quality client nodes in federated learning.

[0038] (2) A behavioral trust calculation based on the IOWA operator and the Dijkstra algorithm is proposed. In order to characterize the impact of historical trust on the direct trust evaluation and the time decay, the time series of interactions are sorted, and the induced ordered weighted average (IOWA) operator is proposed to evaluate the direct trust. The Dijkstra algorithm is used to calculate the recommended trust based on the shortest path, and combined with the characteristics of the medical alliance, the calculation methods of intra-alliance trust and inter-alliance trust are given respectively.

[0039] (3) An improved Trusted Federated Average Aggregation Algorithm (Trusted-FedAvg) based on local model quality and reputation is proposed. The model aggregation weight is adjusted according to the model quality evaluation results and the historical reputation score of the node during the sharing process, increasing the contribution of high-quality model parameters in the aggregation model, thereby improving the accuracy of the aggregation model. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 TSMD-BFL system model architecture;

[0041] Figure 2 Interactions in trusted data sharing;

[0042] Figure 3 Identity trust attribute tree based on other objective trust attributes;

[0043] Figure 4 Behavioral Trust Network Examples; DETAILED DESCRIPTION

[0044] The present invention is further described in detail below in conjunction with specific implementation modes.

[0045] The present invention adopts the alliance chain architecture and establishes a medical data trusted sharing method TSMD-BFL based on blockchain and federated learning. The model builds a federal multilateral trust relationship by using the alliance chain to realize a decentralized medical data trusted sharing service platform. The model framework is divided into a data sharing layer, a blockchain layer, and a federated learning layer.

[0046] At the data sharing layer, first, medical-related institutions such as hospitals, pharmaceutical companies, scientific research institutions, and medical insurance departments join the medical data sharing alliance chain through user registration and identity trusted computing. Then, the data requester publishes the data request information. Finally, the federated learning global model is obtained through the blockchain sharing platform. According to the different roles of users in a data sharing transaction, users are divided into: data requesters DR and data providers DP. There is no clear division between the two in the entire medical data sharing system, and data providers may also become data requesters. The blockchain-shared federated learning global model can be used in medical research, drug development, auxiliary diagnosis and treatment, genomics analysis, genetic analysis, and epidemic prevention and control.

[0047] At the blockchain layer, for specific data sharing requests, behavioral trusted computing selects data provider nodes based on the on-chain data retrieval mechanism and the federated client selection mechanism, forms a federated training committee, and updates the global model based on the trusted federated average aggregation algorithm. Each block in the consortium chain is responsible for recording data records such as the identity information, identity attribute information, identity trusted computing results, behavioral trusted computing results, global model parameters, number of iterations, and sharing process information of participating nodes.

[0048] At the federated learning layer, the local client of federated learning is the data provider, which is generally a medical institution, gene sequencing institution, medical center, etc. The members of the model training committee perform federated learning based on their local data sets to train the same federated learning model. When the data provider participates in the federated learning process, its trust value is updated and stored on the blockchain. The integration of blockchain and federated learning improves the credibility and security of the medical data sharing system and promotes the union of more medical institutions with a larger number of training samples and medical-related data providers with additional computing power.

[0049] In the medical data sharing scenario, mutual trust among participants is the key to successful sharing. According to the "identity + behavior" two-factor theory, trust includes identity trust and behavior trust, that is, both identity and behavior are credible to ensure that the subject is credible. The trust mechanism designed by the present invention provides trusted services for medical data sharing through identity trusted smart contracts (ITSC), behavior trusted smart contracts (BTSC) and trusted federated average aggregation algorithm (Trusted-FedAvg).

[0050] Definition 1: Trust refers to the belief that the entity's capabilities or needs, behavior or service reliability can meet the expected goals, based on the entity's identity authentication and the historical transaction behavior between entities. It can be expressed as T = (IT, BT).

[0051] IT (Identification Trust) is identity trust, that is, the degree of trust in identity authentication information. It is a measure of whether the user's identity is true and reliable. It is a regulation on the credibility of entity identity information. It determines whether to give trust based on identity attribute information. When a node joins the blockchain through user registration, it means that it has passed the blockchain's identity authentication mechanism. BT (Behavior Trust) is behavioral trust, which focuses on the evaluation of entity behavior. It is an important yardstick for measuring the degree of trust in client nodes by observing the entity's behavior and authenticating the reliability of the entity's capabilities. At time t, BT t∈[0,1]. Behavior trustworthiness BT is determined by direct trust DT and recommended trust RT according to the degree of direct interaction between the two trusting parties. The trust generated by the direct interaction between the two trusting parties without the help of a third-party entity is called direct trust; when the trust information comes from the recommender, it is called recommended trust. Behavior trust changes over time and has time decay, so it is a dynamic variable. Entities interact with each other through identity authentication. Identity trust ensures that the identity of the entity is credible, laying the foundation for the evaluation of behavior trust, while behavior trust dynamically evaluates the trust status of the entity and provides a basis for the update and revocation of the identity trust of the entity.

[0052] The trusted sharing process based on identity trusted smart contract (ITSC) and behavior trusted smart contract (BTSC) proposed in this invention consists of five stages: user registration, data request issuance, data request processing, federated learning and data sharing. The specific trusted sharing process steps are as follows:

[0053] Step 1. User registration: The user uploads his / her user registration information reg, and the trusted authentication center CA performs identity trusted computing for the nodes joining the blockchain. The identity trusted computing smart contract ITSC sets a certain entry threshold for users participating in data sharing. The system assigns the unique identification ID and public key Pk to the user who passes the review, issues an identity trusted certificate, and completes the user identity registration;

[0054] Step 2. Issue a data request: The data requester DR publishes a data sharing request req on the blockchain. The req contains the requested data description information, indicating the required data type, data size, data quality, and time. The request is stored as a data record on the consortium chain, and the blockchain saves the hash timestamp of its transaction to maintain the auditability of transactions on the chain;

[0055] Step 3. Data request processing: After receiving the data request req, the blockchain system calculates the behavior trust value of each data provider based on the retrieval mechanism and trust mechanism on the chain, executes the behavior trust smart contract BTSC and selects a highly trusted federated learning client SP i , forming a federated learning training committee SP = {SP1, SP2, …, SP n};

[0056] Step 4, Federated Learning: Members of the Federated Learning Training Committee execute the Federated Learning algorithm based on their own local data sets according to the data request req, and collaboratively train the same Federated Learning model in a distributed manner until the model is fitted or the number of iterations is reached; during each model update, differential privacy is used to achieve encrypted aggregation of global parameters, and accounting nodes are selected through a consensus mechanism based on node contribution. The blockchain records the update process of model parameters to achieve auditability of parameters;

[0057] Step 5. Data sharing: After the federated learning task is completed, the global model M is encrypted and saved in the blockchain. After receiving the broadcast of the completion of the federated learning task, the relevant data requester downloads the encrypted model file from the alliance chain, decrypts it, and obtains the shared model M. Therefore, the data requester can obtain medical data through the sharing platform without obtaining the original data of the patient, achieving the purpose of safe and reliable sharing of medical data.

[0058] Two-factor trusted computing:

[0059] 1. Identity Trusted Computing:

[0060] According to the medical data sharing scenario, the user identity credibility of medical-related institutions such as hospitals, pharmaceutical companies, scientific research institutions and medical insurance departments is determined based on the user's identity attribute information. User attributes generally include user name, alliance ID, informationization level a1, organizational management ability a2, anti-attack ability a3, local data volume a4, computing ability a5, network reliability a6 and other objective identity attribute information, which are the basis for judging the credibility of their identity. Identity credibility can be expressed as:

[0061]

[0062] When the name of the organization and the alliance to which it belongs cannot be found in the relevant real information, the user's identity credibility is 0, and on-chain registration is not allowed. When the user's organization name and the alliance to which it belongs exist, IT∈[0,1], and the quantification of identity credibility is related to other identity attributes. Construct an identity trust attribute tree based on other objective trust attributes from the two aspects of sharing ability and federated learning ability. In the process of identity credibility quantification of identity attributes, the weight calculation of attributes is very important. The entropy weight method is a commonly used objective weighting method, which mainly determines the weight based on information entropy. Information entropy refers to the amount of information contained in the evaluation index. Generally speaking, the smaller the information entropy, the more information is provided, and the corresponding weight is larger, and vice versa. The present invention adopts the entropy weight method to calculate the attribute weight. Assuming that there are m users to be evaluated and n identity credibility attribute evaluation indicators, the forward matrix composed of the original numerical values ​​of the user's attributes is X=(x ij ) m×n :

[0063]

[0064] The matrix is ​​normalized and the original data is mapped to numbers between the interval [0,1] by the maximum and minimum method. This will not only not change the characteristics of the original data group, but also improve the model's convergence speed. The standardized matrix p ij for:

[0065]

[0066] According to the information entropy theory and information entropy calculation formula Calculate the information entropy value e of the jth attribute j and information utility value d j , the calculation formulas are as follows:

[0067]

[0068] d j =1-e j (5)

[0069] Finally, calculate the weight W occupied by each attribute indicator j , the user's identity attribute value can be used to calculate the user's identity credibility IT i , the calculation formulas are as follows:

[0070]

[0071]

[0072] According to the trusted sharing process, the user's identity credibility is calculated when the user registers. When the identity credibility is greater than the trust threshold IT threshold When a registered user accesses shared data, the blockchain uses distributed signature technology to verify the identity of the data accessor. If the verification is successful, the accessor's identity can be determined to be credible and allowed to access the shared data. In summary, the algorithm for identity trust calculation is as follows:

[0073]

[0074] 2. Behavioral Trusted Computing

[0075] Since the participants in medical data sharing constitute a distributed multi-alliance environment, this paper constructs a hierarchical trust model based on the alliance domain in terms of behavioral trust, such as Figure 4As shown. The trust relationship between all entities constitutes a weighted directed graph. Among them, the vertex represents the entity, the directed edge between the vertices represents the direct trust situation, and the weight on the edge is the direct trust of the starting entity to the end entity. When calculating behavioral trust, it is necessary to study the trust within the alliance and the trust between alliances separately according to the similarities and differences between the alliance areas where the evaluating entity and the evaluated entity are located. When the two are in the same alliance, the comprehensive trust is obtained based on the direct trust and the recommended trust. The two are in different alliances. On the basis of the trust evaluation within the alliance, the alliances are taken as units, and the trust between domains is affected by the interaction behavior between domains, and finally the comprehensive trust between different entities between alliances is obtained. The comprehensive trust value is used to select the clients participating in federated learning, providing trust support and decision-making basis for federated learning.

[0076] (1) Trust calculation within the alliance

[0077] Assuming that hospital entities i and j have sufficient historical trust data, the trust of nodes is quantified based on the interaction history. The interaction history comes from the interaction results between the interaction nodes, and the interaction results are continuously updated based on the trust evaluation results. In the trust evaluation process, the trust value (reputation) of hospital entity i on the behavior of hospital entity j is BT ij It can be expressed as:

[0078] BT ij =α·DT ij +β·RT ij (8)

[0079] Among them, DT ij is the direct trust value, RT ij is the recommended trust value, α, β are the weights of direct trust and recommended trust in the calculation of comprehensive trust value, α, β∈(0, 1) and α+β=1.

[0080] (2) Direct trust

[0081] Direct trust is an entity trust relationship established through direct interaction. Assuming that the number of positive and negative events in the historical interaction task is m and u respectively, the direct trust is usually expressed as:

[0082]

[0083] However, this calculation method does not take into account the time decay of trust, that is, the longer the historical behavior is from the current interaction, the less impact it has on the current trust evaluation, and the lower its weight in the direct trust calculation. To address this problem, the present invention sorts the time series of behavioral interactions and proposes to perform weighted calculation of direct trust based on the Induced Ordered Weighted Averaging (IOWA) operator. The IOWA operator is a weighted average operator proposed by scholar Yager based on the OWA operator.

[0084] Assume that <v1,b1>,<v2,b2>,…,<v m ,b m > is m two-dimensional sequences, and the IOWA operator is defined as

[0085]

[0086] In the above formula, function fw is composed of v1,v2,…v n The generated m-dimensional induced ordered weighted average operator. v-index(i) is v1,v2,…,v m The subscript of the ith largest number in the sequence from largest to smallest. i Yes i The induction value of w i With number b i The size and position of is not important, but the location of its induced value is.

[0087] Assume that in n historical medical sharing tasks, the trust of hospital I in hospital J combined with the interaction time forms a sequence S = (<t1, DT1(i, j)>, <t2, DT2(i, j)>, …, <t n ,DT n (i,j)>). n is the time value of the interaction, DT n (i,j) is the historical trust value of the interaction. According to the IOWA operator, the direct trust value of the n+1th time is:

[0088]

[0089] Among them, w t is the weight of the historical direct trust ranked at the tth time in the direct trust evaluation, DT v-index(i) is t1, t2, … t n The direct trust of the tth position after sorting from largest to smallest. According to the time decay of direct trust, w t The value should decrease gradually with the increase of interaction time. Therefore, the weight sequence W of sequence S is W = (w1, w2, ..., wn ) T is an ordered weighted vector that conforms to the IOWA operator.

[0090] In order to solve the weight sequence, the maximum discreteness method is used for calculation. W=(w1,w2,…,w n ) T Must meet:

[0091]

[0092] According to the maximum discreteness principle, the discreteness Disp(W) represents the degree to which all historical trust information is fully utilized after vector operation, and 0<Disp(W)≤ln(n). Andness(W)=1-Orness(W) are the or metric and the and metric, respectively, indicating the degree of inducing the or and and of the ordered weighted vector. Therefore, we can get:

[0093]

[0094] w1[(n-1)λ+1-nw1] n =[(n-1)λ] n-1 [((n-1)λ-n)w1+1] (14)

[0095]

[0096]

[0097] According to the specific application environment characteristics and the required setting value λ, w1, w n ,w k (k=2,3,…,n-1), and finally the direct trust is calculated according to formula (11). According to the characteristics that the closer the historical information is to the current time, the greater the impact, and the farther the historical information is from the current time, the smaller the impact, after the interaction time is arranged in order from recent to distant, the corresponding weight vector has a decreasing property. Therefore, the direct trust calculation method based on the IOWA operator proposed in the present invention not only fully reflects the impact of historical trust on the direct trust calculation, but also better describes the characteristic that the direct trust decays over time.

[0098] (3) Recommendation trust

[0099] Recommendation trust refers to the trust obtained through indirect interaction between entities. It is evaluated based on the recommendation trust information provided by other entities in the alliance. Therefore, to calculate the recommendation trust, we must first obtain the recommendation information of the evaluated entity. The traditional method uses broadcasting to obtain recommendation information, which is inefficient. To solve this problem, this paper uses Dijkstra's related ideas to obtain recommendation trust information and then calculate the recommendation trust.

[0100] The Dijkstra algorithm was proposed by Dutch computer scientist Dijkstra in 1959. It is an algorithm for the shortest path from one vertex to the remaining vertices, and solves the shortest path problem in a weighted graph. The main feature of the Dijkstra algorithm is that it starts from the starting point and adopts a greedy algorithm strategy, traversing the adjacent nodes of the vertex closest to the starting point and not visited each time until it reaches the end point.

[0101] When calculating the recommendation trust of hospital I to hospital J, let the set of hospitals that can provide effective recommendation trust be E k ={E1,E2,…,E h}, h is the number of recommended hospitals, then the recommendation trust of hospital I to J is:

[0102]

[0103] Among them, DT(E k ,j) is the recommended entity E k The direct trust provided by the target hospital J. ω(E k ) is E k The recommendation factor for providing recommendation information is the credibility of hospital I in its recommendation information, which is defined as the number of hospital I to E k The shortest path calculated using Dijkstra's algorithm The product of all link weights, that is:

[0104]

[0105] (4) Trust Assessment between Alliances

[0106] In different alliances, the comprehensive trust of hospital I in hospital alliance X to research institute R in scientific research institution alliance Z can be expressed as:

[0107] BT ir =DT XZ ·R r→Z (19)

[0108] Among them, DT XZ is the direct trust value of hospital alliance X to scientific research institution alliance Z. r→Zis the comprehensive reputation value of the research institute R in the scientific research institution alliance Z. Its calculation method is the comprehensive trust value of all entities in the alliance to R, which is the same as the calculation method of the recommended trust of entities in the alliance, and can be expressed as:

[0109]

[0110] In the formula, E k ' is all the evaluators in the scientific research institution alliance Z who can provide trust values ​​about R, n is the number of E in the alliance Z k ', ω(E k ') is the recommendation factor, where it is assumed that all evaluators are equally important and the recommendation factor is 1.

[0111] In order to timely query and verify the comprehensive trust value of nodes participating in the data sharing process, each node has a local trust value storage pool. After the comprehensive trust value of each node is updated, it is uploaded to the blockchain as a reference for other data requesters. According to the final reputation opinion, when the comprehensive trust value is greater than the trust threshold BT threshold , select candidate hospitals with high reliability and high reputation as federated learning clients for federated learning tasks. The initial trust value of the node is 0.5. Under normal circumstances, the trust mechanism makes the reputation value of the honest node distributed in [0.5, l], while the trust value of the malicious node is distributed in [0, 0.5]. The behavioral trust algorithm is expressed as follows:

[0112] Trusted federation average aggregation algorithm:

[0113] When a medical institution H wants to request the personal privacy data of patients from hospitals A, B or C for a certain study (for example, requesting a patient's blood test report to study the patient's chance of developing breast cancer), the data requester H publishes the task on the blockchain platform. The blockchain selects highly trusted hospitals to participate in the federated model training based on trusted computing. After the federated learning server collects the local model of the federated learning client, it aggregates the model. The existing model aggregation method is mainly federated averaging, but the federated averaging does not take into account the problem of reduced global model quality caused by the participation of low-quality models in aggregation. Based on FedAvg, the present invention proposes an aggregation algorithm Trusted-FedAvg based on trusted computing results. The model aggregation weight is adjusted according to the local model quality evaluation results and the reputation score of the node in the collaboration process, and the contribution of high-quality model parameters in the aggregation model is increased, thereby improving the accuracy of the aggregation model.

[0114] The quality of the local model is mainly determined by the model loss of the local training. We use the cross entropy in the local training process to evaluate the local model loss. Assume that all participating nodes in the federated learning have a labeled dataset d = {x1, y1), (x2, y2), …, (x n ,y n )}, then for the label data x i ,y i The cross entropy H(f(x i ),y i ) is calculated as follows:

[0115]

[0116] Among them, y i represents the expected output of the label data, f(x i ) represents the prediction result of the model. The smaller the cross entropy value, the closer the probability distribution predicted by the model is to the actual result, that is, the higher the quality of model training.

[0117] Assume that N nodes are selected to participate in model aggregation, and the participating nodes P in federated learning are k The quality assessment weight can be defined as:

[0118]

[0119] The reputation of a node during the aggregation process can be reflected by the accumulated trust score, which can be expressed as:

[0120]

[0121] Among them, τ is the number of times a node participates in model aggregation. The quality assessment weight and cumulative trust score of each node in each model aggregation are recorded on the blockchain, which is the basis for federated learning model aggregation and participating nodes. The global model update calculation process can be expressed as:

[0122]

[0123] The main idea of ​​federated learning is that multiple data sources (such as hospitals, medical research institutions, etc.) jointly participate in the construction of a global model. Each data source uses local data to perform calculations and generate corresponding local models. The global node updates the global model through the collected local gradients of each data source and returns the updated model to each data source, through repeated iterations until the global model converges. Since the server side of the model is completed by the blockchain, the trusted aggregation algorithm is deployed in the smart contract of the blockchain. The Trusted-FedAvg algorithm of the present invention can be expressed as:

[0124]

[0125] The above descriptions are only some specific implementation methods of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by any person familiar with the art within the technical scope disclosed in the present invention should be covered within the protection scope of the present invention.

Claims

1. A trusted sharing method of medical data based on blockchain and federated learning, characterized by It consists of the following parts: data sharing layer, blockchain layer and federated learning layer; Data sharing layer: medical institutions join the medical data sharing alliance chain through user registration and identity trusted computing; data requesters publish data request information; and obtain the global model of federated learning through the blockchain sharing platform; Blockchain layer: For specific data sharing requests, behavioral trusted computing selects data provider nodes based on the on-chain data retrieval mechanism and the federated client selection mechanism, forms a federated training committee, and updates the global model based on the trusted federated average aggregation algorithm; Federated learning layer: Model training committee members perform federated learning based on their local data sets to train the same federated learning model. When data providers participate in the federated learning process, their trust values ​​are updated and stored on the blockchain. The working steps are as follows: Step 1. User registration: The user uploads his / her user registration information reg, and the trusted authentication center CA performs identity trusted computing for the nodes joining the blockchain. The identity trusted computing smart contract ITSC sets an entry threshold for users participating in data sharing. The system assigns the unique identification ID and public key Pk to the user who passes the review, issues an identity trusted certificate, and completes the user identity registration; The registration of the user identity specifically includes: (a) Verify whether user attributes exist, including organization name, alliance ID, information level a1, organizational management capability a2, anti-attack capability a3, local data volume a4, computing capability a5, and network reliability a6; (b) If the user attribute exists, then the forward matrix is ​​constructed as X = (x ij ) m×n ; where m is the number of users to be evaluated, n is the number of identity trust attribute evaluation indicators; x ij is the standardized matrix p obtained by normalizing the j-th identity trust attribute evaluation index of the i-th user to be evaluated ij ; (c) Calculate the weight W of each attribute based on the entropy weight method j , and obtain the user identity credibility ITi through weighted summation; (d) When ITi ≥ the preset trust threshold IT threshold When a unique ID and public key PK are assigned, a trusted identity certificate is issued; Step 2. Issue a data request: The data requester DR publishes a data sharing request req on the blockchain. The req contains the requested data description information, indicating the required data type, data size, data quality, and time. The request is stored as a data record on the consortium chain, and the blockchain saves the hash timestamp of its transaction to maintain the auditability of transactions on the chain. Step 3. Data request processing: The blockchain system performs the following operations based on the on-chain retrieval mechanism and the behaviorally trusted smart contract BTSC: (a) Calculate the direct trust value DT of each data provider based on the IOWA operator ij , the recommendation trust value RT calculated by Dijkstra algorithm ij , through the formula BT ij =α·DT ij +β·RT ij (α, β∈(0, 1) and α+β=1) calculate the comprehensive behavior trust value; (b) Select a behavior whose trust value is higher than the preset threshold BT threshold Federated Learning Client SP i , forming a federated learning training committee SP = {SP1, SP2, …, SP n }; Step 4. Federated Learning: (a) Members of the training committee execute the federated learning algorithm based on local datasets to distribute training of the global model; (b) In each model update, the global parameters are encrypted and aggregated using a differential privacy algorithm, and accounting nodes are selected through a contribution consensus mechanism; (c) Blockchain records the model parameter update process; Step 5. Data sharing: The global model M is encrypted and stored in the blockchain. The data requester downloads and decrypts it to obtain the shared model, completing the secure sharing of medical data.

2. The medical data trusted sharing method based on blockchain and federated learning according to claim 1 is characterized by: The specific steps for calculating the direct trust value by the IOWA operator in Step 3 are: The historical interaction time series {t1, t2, …t n } Sort from near to far and calculate the weight w t satisfy And w t Decreasing, through the formula Update direct trust value, DT v-index(i) is t1, t2, … t n The direct trust value of the tth position after sorting from largest to smallest.

3. The medical data trusted sharing method based on blockchain and federated learning according to claim 1 is characterized by: The calculation steps of the recommendation trust value described in Step 3 are: Obtaining the shortest path using Dijkstra's algorithm Calculate the shortest path The product of all link weights on the Get the recommended trust value, where DT(E k ,j) is the recommended entity E k The direct trust provided by the target hospital J; ω(E k ) is E k The recommendation factor for providing recommendation information is the credibility of hospital I in its recommendation information, which is defined as the number of hospital I to E k The shortest path calculated using Dijkstra's algorithm The product of all link weights, that is:

4. The medical data trusted sharing method based on blockchain and federated learning according to claim 1 is characterized by: In different alliances, the comprehensive behavioral trust value of I in alliance X to R in alliance Z can be expressed as: BT ir =DT XZ ·R r→Z ; DT XZ is the direct trust value of alliance X to alliance Z, R r→Z is the comprehensive behavior trust value of R in alliance Z, which is the comprehensive trust value of all entities in the alliance to R. The calculation method is the same as the recommended trust of entities in the alliance, expressed as: E k ' is all the evaluators in the alliance Z who can provide trust values ​​about R, n is E k ', ω(E k ') is the recommendation factor, where it is assumed that all evaluators are equally important and the recommendation factor is 1.

Citation Information

Patent Citations

  • Medical data privacy protection method based on block chain credible consensus and differential privacy

    CN119337422A