Blockchain access control-based federated learning financial data sharing method

By combining blockchain access control and federated learning, the problems of privacy leakage, untrusted models, and rigid access control in the cross-institutional sharing of hospital financial data are solved, realizing secure, efficient, and compliant data sharing and enhancing the credibility and sustainability of the system.

CN122490559APending Publication Date: 2026-07-31CHONGQING UNIV CANCER HOSPITAL
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHONGQING UNIV CANCER HOSPITAL
Filing Date
2026-05-12
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing technologies face systemic challenges in cross-institutional sharing of hospital financial data, including high risks of privacy breaches, unreliable model training, lack of node incentives, rigid access controls, and difficulties in compliance implementation.

Method used

A blockchain-based federated learning approach with access control is adopted. Through steps such as node registration and access control initialization, federated learning task publication and controlled distribution, local model training and privacy protection, model parameter verification and aggregation, reputation update and controlled data sharing audit, combined with differential privacy and encryption technology, dynamic access control and incentive mechanisms are realized to ensure data security and compliant sharing.

Benefits of technology

It enables efficient, reliable, and sustainable sharing of financial data while ensuring data privacy and compliance, enhances the system's resistance to attacks and dynamic governance mechanisms, and improves the reliability of model training and fine-grained control over data use.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122490559A_ABST
    Figure CN122490559A_ABST
Patent Text Reader

Abstract

This invention relates to a federated learning financial data sharing method based on blockchain access control, belonging to the field of computer technology. The method includes: 1) Publishing nodes publish federated learning data sharing tasks on the blockchain and select participating nodes based on access control policies and node reputation; 2) After passing access control verification, participating nodes train models locally using a differential privacy mechanism; 3) After training, the nodes upload the model parameters to the consortium blockchain, where verification nodes within the consortium blockchain verify and evaluate the model parameters. Only nodes meeting the criteria participate in model aggregation, and the aggregation weight is determined based on contribution; 4) Updating node reputation information based on each node's performance and packaging the global model summary and reputation results onto the blockchain; 5) Other nodes complete new block verification and dynamically adjust node permissions. This invention achieves controlled data sharing and suppresses malicious node behavior while ensuring data privacy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer technology, specifically relating to a method and system for securely sharing hospital financial data that integrates Federated Learning (FL), blockchain, and dynamic access control mechanisms. It is applicable to cross-institutional collaboration scenarios involving highly sensitive data, such as healthcare, financial risk control, and government collaboration. Background Technology

[0002] Financial data—including medical insurance settlement details, drug and consumable procurement costs, human resource expenditure structure, and departmental operational efficiency—has become a core asset supporting optimal resource allocation, cost control, and performance evaluation. However, this data is highly sensitive, involving both patient privacy and the commercial secrets and public financial security of medical institutions. Its cross-institutional sharing has long faced the dilemma of "not daring to share, not being able to share, and not knowing how to share." Against this backdrop, how to achieve efficient, reliable, and sustainable financial collaboration while ensuring data sovereignty and compliance has become a key challenge in the field of healthcare informatics.

[0003] In recent years, Federated Learning (FL), as a privacy-preserving computing paradigm that allows "the model to move but the data remains stationary," has been widely regarded as a crucial technological path to breaking down data silos in the healthcare sector due to its inherent alignment with the compliance requirement of "raw data not leaving the local machine." By training models locally among participating parties and exchanging only encrypted model parameters (such as gradients or weights), Federated Learning can complete joint modeling without exposing the original records, and has already achieved initial applications in fields such as disease prediction and image analysis. However, when applied to hospital financial data scenarios, existing Federated Learning frameworks reveal significant limitations. On the one hand, financial data is highly structured, heterogeneous, and subject to strict accounting standards. Different hospitals exhibit significant differences in subject settings, accounting standards, and data granularity, leading to difficulties in model convergence and weak generalization ability. On the other hand, Federated Learning itself lacks effective constraints on the behavior of participating nodes. Malicious or low-quality nodes can launch "data poisoning" attacks by submitting false gradients, or even multiple nodes can collude to form a conspiracy alliance, systematically distorting the aggregation results and seriously threatening the accuracy of financial analysis and the reliability of decision-making.

[0004] To enhance the trust foundation of federated learning, researchers have begun exploring its integration with blockchain technology. Blockchain, with its decentralized, immutable, and traceable characteristics, can provide a transparent and reliable execution environment for federated learning tasks, model update documentation, and audit trails. For example, some solutions utilize smart contracts to automatically trigger model aggregation or verify the compliance of the training process through on-chain records. However, current integrations of "blockchain + federated learning" are mostly at the proof-of-concept level, generally suffering from problems such as crude architectural design, high functional coupling, and prominent performance bottlenecks. Typically, a single blockchain must handle both high-frequency model parameter writing and complex governance logic (such as incentive allocation and reputation assessment), easily leading to transaction congestion and consensus delays, making it difficult to support the real-time collaboration needs of large-scale hospital clusters. More critically, existing solutions generally neglect the construction of a sustainable participatory ecosystem—the lack of quantitative evaluation and dynamic incentives for node contributions results in a lack of long-term investment motivation for high-quality data holders, while low-quality participants can "free-ride" to obtain model benefits, ultimately leading to a vicious cycle of "bad money driving out good."

[0005] Meanwhile, the lag in data access control mechanisms further restricts the release of shared value. Traditional role-based access control (RBAC) relies on centralized permission servers, making it difficult to achieve flexible authorization and fine-grained policy management in cross-institutional scenarios. Even with the introduction of blockchain to achieve decentralized identity authentication, if access policies remain static rules, they cannot adapt to the dynamically changing needs of hospital financial operations—for example, a special audit might only require viewing the total purchase amount of a certain type of drug within a specific time period, rather than all details; or, the visibility depth of cost structures should differ for financial personnel at different levels. Existing solutions often adopt a "all or nothing" coarse authorization model, either overexposing sensitive fields and violating the principle of minimum necessity, or overly restricting data use and weakening analytical value. Although attribute-based access control (ABAC) theoretically supports more granular policy expression, its efficient implementation in a blockchain environment still faces technical obstacles such as complex key management, high policy execution overhead, and imperfect revocation mechanisms.

[0006] In summary, while the combination of federated learning and blockchain offers a new approach to the secure sharing of hospital financial data, existing technologies still have significant shortcomings in areas such as attack resistance, dynamic governance mechanisms, fine-grained access control, system scalability, and regulatory compliance. Particularly in real-world medical scenarios, there are still no mature solutions for balancing privacy protection and analytical utility, incentivizing high-quality participation, and achieving the secure sharing goal of "use without storage, and traceability." This invention is proposed against this backdrop, aiming to construct a secure, efficient, compliant, and sustainable new paradigm for hospital financial data sharing through the deep integration of a dual-chain collaborative architecture, verifiable federated learning, evolutionary game incentives, and intelligent access control. Summary of the Invention

[0007] The core objective of this invention is to address the systemic challenges in the current process of sharing hospital financial data across institutions, such as high risk of privacy breaches, unreliable model training, lack of node incentives, rigid access control, and difficulties in compliance implementation. This invention provides a federated learning method for sharing financial data based on blockchain access control.

[0008] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:

[0009] A blockchain-based approach to federated learning financial data sharing, comprising the following steps:

[0010] Step 1: Node registration and access control initialization

[0011] In the blockchain network, the registration and identity initialization of participating nodes are completed, the node's identity information, attribute information and reputation information are recorded, and access control policies are configured through smart contracts to constrain the types of financial data sharing tasks that nodes can participate in and the access permissions for financial data.

[0012] Step 2: Federated Learning Task Issuance and Controlled Distribution

[0013] The task publishing node publishes a federated learning financial data sharing task on the blockchain. The task includes model parameter configuration, access control constraints and node participation rules. Nodes that pass the access control verification obtain the task and participate in federated learning.

[0014] Step 3: Local Model Training and Privacy Protection

[0015] Participating nodes use their financial data locally to train models, with the raw data remaining on their local machines, and the generated model parameters are protected for privacy using differential privacy or encryption methods.

[0016] Step 4: Model parameter validation, aggregation, and global model generation

[0017] Once training is complete, participating nodes will upload the privacy-protected model parameters to the consortium blockchain. The verification nodes within the consortium blockchain will then verify and evaluate the model parameters. Only nodes that meet the preset conditions will be allowed to participate in model aggregation, and a global model will be generated based on the model's contribution.

[0018] Step 5: Reputation Update and Controlled Data Sharing Audit

[0019] The node reputation information is updated based on the performance of each node during model training and aggregation. The global model summary, reputation update results, and financial data access records are packaged and written into the blockchain to achieve controlled financial data sharing and behavior auditing.

[0020] Furthermore, the specific process of Step 1, node registration and access control initialization, includes:

[0021] Step 1.1: Node Registration

[0022] In this step, all nodes participating in financial data sharing and federated learning first register in the consortium blockchain network; each node completes identity registration through a user contract, generates a corresponding blockchain account address and public / private key pair, and writes the node's basic identity information, node type, available financial data, initial reputation value, and margin information into the consortium blockchain;

[0023] The entity component mainly consists of publishers, participating nodes, a cloud database, and a consortium blockchain network. Publishers are responsible for publishing federated learning tasks. Participating nodes are composed of different institutions (such as hospitals, nursing homes, and disease control centers) and are responsible for local model training in federated learning tasks. The cloud database is used to store the local financial data of each participating node. The consortium blockchain is used to uniformly store model summaries, reputation information, access control records, and audit information.

[0024] Step 1.2: Configure access control policies

[0025] The system configures access control policies through access control contracts, adopting a combination of role-based access control and attribute-based access control, while also incorporating node reputation values ​​to achieve dynamic access restrictions.

[0026] 1) Role-based access control: Role-based access control schemes are implemented through smart contracts, including User Contract (UC), Access Contract (AC), and Search Contract (SC); User Contract (UC) is used for user registration and authentication; Access Contract (AC) is used to assign access permissions according to user roles and return authorization results; Search Contract (SC) is used to execute query operations after authorization is granted.

[0027] 2) Attribute-based Access Control: Attribute-based access control further introduces a user attribute and data attribute classification mechanism on top of role-based control, including User Contract (UC), Access Contract (AC), Search Contract (SC), Behavior Contract (BC), and Revocation Contract (RC). The Behavior Contract (BC) is used to record malicious behaviors such as frequent requests, invalid requests, and unauthorized requests. The Revocation Contract (RC) is used to revoke access permissions in cases of resignation, violation, or expiration of access. A node access decision function is also defined. :

[0028]

[0029] in: Indicates the role of a node; This indicates the matching status between data and user attributes; This indicates the current reputation value; This represents historical behavior records; access control is implemented throughout the following stages: ① Task registration stage; ② Model parameter download stage; ③ Model update and upload stage; ④ Local data retrieval stage.

[0030] For reputation threshold, when < When this happens, the system automatically lowers the user's access level or suspends access permissions, achieving dynamic linkage between access control and reputation mechanisms.

[0031] Furthermore, the specific process of Step 2, the release and controlled distribution of the federated learning task, includes: the task-releasing node releases the federated learning financial data sharing task in the consortium blockchain network. The federated learning task includes at least initial global model parameters, target accuracy or training rounds, access control constraints, minimum reputation threshold, and node participation rules. After the task is released, each participating node obtains the corresponding task information by accessing the consortium blockchain network. The system verifies participation eligibility based on the access control policy and the node's current reputation value. Before each training round begins, the system verifies the node's current reputation value... Historical contribution and online status Perform screening and calculate the overall score of the nodes:

[0032]

[0033] To enhance stability, a historical smoothing mechanism can be used:

[0034]

[0035] in, For the final overall score, This is the overall score for the current round. For historical comprehensive score, - besides These are weighting coefficients, selected according to the score ranking. Each node participates in the current round of training.

[0036] Furthermore, the specific process of local model training and privacy protection in Step 3 includes: participating nodes accessing the consortium blockchain to obtain the first... Global model parameters of round iteration Each participating node utilizes the acquired global model parameters. The model is trained on a local dataset, and local model parameters are generated using the Differential Privacy Stochastic Gradient Descent (DP-SGD) algorithm. First, calculate the gradient of the loss function locally:

[0037]

[0038] This represents the model gradient calculated based on local data. To control gradient sensitivity and limit the impact of a single sample on model updates, the gradient is first pruned. The pruned gradient is... for:

[0039]

[0040] in, The gradient clipping threshold is used to limit the upper bound of the gradient norm. After gradient clipping, to satisfy differential privacy constraints, Gaussian noise is superimposed on the clipped gradient. for:

[0041]

[0042] in, This indicates that the mean is 0 and the variance is 0. Gaussian noise; finally, the local model parameters are updated as follows:

[0043]

[0044] in, The learning rate is represented by a combination of gradient clipping and noise injection. This mechanism limits gradient magnitude and enhances privacy protection at the local stage, thereby reducing the potential impact of anomalous gradients on the global model. Simultaneously, to prevent anomalous updates from damaging the global model, model update bias is defined.

[0045]

[0046] when Greater than the preset threshold At this time: the node's updated parameters do not participate in this round of model aggregation; the behavior contract records abnormal behavior; and a penalty item is included in Step 5. This will affect subsequent reputation updates and access control decisions.

[0047] Furthermore, the specific process of Step 4, model parameter verification, aggregation, and global model generation, includes: quality assessment and screening of the local model update results uploaded by participating nodes, and on this basis, safe and reliable weighted aggregation is completed to generate a new round of global model parameters;

[0048] set up This indicates that those who have passed the eligibility screening will participate in this round of federal learning. A set of nodes, i.e. Each participating node Local data volume The total amount of data across all participating nodes is:

[0049]

[0050] To ensure the quality and reliability of the aggregation model, the model parameters uploaded by each node are verified before formal aggregation. The system uses the Youden index as a comprehensive evaluation index of model performance, which is defined as:

[0051]

[0052] in: (True Positive Rate) represents the node model's ability to identify positive class samples; (True Negative Rate) represents the node model's ability to identify negative samples; The larger the value, the better the classification performance of the model; the Youden index can simultaneously measure the sensitivity and specificity of the model, and still has good stability in class imbalance scenarios, so it is suitable for high reliability requirements such as medical and financial risk control.

[0053] After completing this round of quality verification, the system synchronously updates the historical contribution of the nodes. Let the number of valid participation rounds in the history of a node be . If only the number of rounds in which it successfully participated in aggregation is counted, then the historical contribution is updated as follows:

[0054]

[0055] Where: if a node did not participate in aggregation in this round, then No update; if this is your first time participating, then... = ; Updated Write it to the consortium blockchain as a historical record; this mechanism enables... It reflects the long-term model quality performance of nodes and provides a historical capability reference for the comprehensive scoring of the subsequent Step 2;

[0056] The system sets a preset quality threshold. When the node satisfies: If the local model update uploaded by a node is deemed to meet the quality requirements, its model parameters can participate in this round of global aggregation; otherwise, it is considered a low-quality update or a potentially abnormal update, and its parameters will not participate in this round of model aggregation, but can be recorded in the subsequent reputation assessment module; after completing the node selection, a federated average strategy based on data volume is used for model aggregation; let the node... In the The local model parameters of the wheel are Then the global model parameter update formula is:

[0057]

[0058] in: This represents the set of nodes that have passed quality verification. Represents a node Data weights; The total amount of data participating in the aggregation nodes;

[0059] By introducing a data-weighted mechanism, nodes with larger data volumes can have a more significant impact on the global model, thereby improving model convergence efficiency and overall generalization ability. Furthermore, this weighting strategy remains well-adaptable even in scenarios with uneven data distribution. After aggregation, the system generates new global model parameters. The parameter is then subjected to consistency and integrity verification. Upon successful verification, the following information is packaged and written into the consortium blockchain: the hash value of the new round of global model parameters; the list of participating aggregation nodes and their weights; and the model quality indicators of each node. The model version number and timestamp for this round; the distributed consensus and immutability of blockchain ensure the transparency and traceability of the model version evolution process, preventing the model from being maliciously replaced or rolled back; at the same time, each node can query historical aggregate records through the blockchain to audit the model evolution trajectory.

[0060] Furthermore, Step 5, the reputation update and controlled financial data sharing audit mechanism, aims to comprehensively evaluate the quality of a node's contribution, compliance with regulations, and level of continuous participation in the federated learning process, thereby constructing a dynamic, quantifiable, and traceable credit management system.

[0061] The specific process is as follows: Let... Represents a node The reputation value in the current federated learning task is used to characterize its historical contribution and behavioral credibility. To balance historical performance and current contribution quality, a weighted update mechanism is used to dynamically adjust the node's reputation, and the update formula is as follows:

[0062]

[0063] in: This represents the node's reputation value in the previous round; This represents the overall performance evaluation index of a node in the current round of training (which can be calculated by weighting multiple indicators such as model accuracy improvement rate, gradient effectiveness, and consistency test results). This is a historical weighting coefficient used to balance the influence of historical reputation and current contributions; This indicates penalties imposed for abnormal behavior, low-quality updates, or violations of protocol rules;

[0064] This mechanism ensures that reputation values ​​reflect a node's real-time performance while preventing drastic changes in reputation due to short-term abnormal fluctuations. To prevent long-term inactive or "free-riding" nodes from maintaining a dominant position based on historical reputation, a reputation decay mechanism is introduced, using time as a moderating variable. This represents the time interval since the node last effectively participated in the task. Let be the attenuation coefficient, then the reputation attenuation formula is:

[0065]

[0066] in: Represents a node Current original reputation value; This represents the dynamic reputation value after decay over time. Represents the natural constant, whose value is approximately ; This represents the reputation decay coefficient, used to control the rate at which reputation declines over time. When the value is large, the node's reputation decays faster, and the system pays more attention to the node's recent behavior; when When the node is smaller, its reputation declines more slowly, and more emphasis is placed on its long-term historical contributions. This indicates the time interval since the node last effectively participated in the federated learning task, such as the time since the last successful model training, model update upload, or effective contribution.

[0067] Due to the exponential decay term It will happen over time As the number of nodes increases, their reputation gradually decreases. Therefore, if a node does not participate in a task for a long period or lacks effective contributions, its reputation value will gradually decrease. In terms of incentive mechanism design, to enhance the game constraint capability of the system, it is assumed that nodes need to pay a deposit to participate in tasks. The unit cost generated by its participation in training is (Including computing resource consumption, communication overhead, power consumption, etc.), the system allocates rewards based on the quality of contribution. Then the actual profit of the node is:

[0068]

[0069] Based on this, when a node is detected to have engaged in malicious behavior (such as uploading forged gradients, model poisoning attacks, data leakage, or denial-of-service attacks), the system will implement the following penalties: ① Deduct part or all of the security deposit. ② Add penalty items ③ Reduce their reputation value; ③ In severe cases, restrict their eligibility to participate in subsequent activities.

[0070] This design enhances the security and stability of the system by increasing the cost of malicious behavior through economic and credit constraints. After completing reputation updates and revenue settlements, the system encapsulates the following information in a structured manner: updated node reputation values; training rewards and revenue distribution results for this round; margin change records; model parameter submission records and access logs; and anomaly detection and penalty execution records.

[0071] After the above data is verified by the consensus mechanism, it is packaged into new blocks and written to the consortium blockchain. The immutability of the blockchain ensures the transparency and traceability of the model training process, node behavior trajectories, and incentive allocation results, thereby achieving a trustworthy audit of the entire federated learning process. Attached Figure Description

[0072] Figure 1 This is a flowchart illustrating the working process of the Federated Learning Financial Data Sharing Method based on Blockchain Access Control of this invention.

[0073] Figure 2 This is a system architecture diagram of the Federated Learning Financial Data Sharing Method based on Blockchain Access Control of the present invention. Detailed Implementation

[0074] The technical solution of the present invention will be further described in detail below with reference to specific embodiments.

[0075] A Federated Learning Approach to Financial Data Sharing Based on Blockchain Access Control, such as Figure 1 As shown, the method mainly includes the following steps:

[0076] Step 1: Node registration and access control initialization

[0077] The registration and identity initialization of participating nodes are completed in the blockchain network, the node's identity information, attribute information and reputation information are recorded, and access control policies are configured through smart contracts to constrain the types of data sharing tasks that nodes can participate in and the data access permissions.

[0078] Step 2: Federated Learning Task Issuance and Controlled Distribution

[0079] The task publishing node publishes the federated learning financial data sharing task on the blockchain. The task includes model parameter configuration, access control constraints and node participation rules. Nodes that pass the access control verification obtain the task and participate in federated learning.

[0080] Step 3: Local Model Training and Privacy Protection

[0081] Participating nodes use their local financial data to train models, with the raw data remaining on-premises. The generated model parameters are protected for privacy using differential privacy or encryption methods.

[0082] Step 4: Model parameter validation, aggregation, and global model generation

[0083] Once training is complete, participating nodes upload the privacy-protected model parameters to the consortium blockchain. Verification nodes within the consortium blockchain then verify and evaluate the model parameters, allowing only nodes that meet preset conditions to participate in model aggregation and generating a global model based on the model's contribution.

[0084] Step 5: Reputation Update and Controlled Data Sharing Audit

[0085] The node reputation information is updated based on the performance of each node during model training and aggregation. The global model summary, reputation update results, and financial data access records are packaged and written into the blockchain to achieve controlled data sharing and behavior auditing.

[0086] Figure 2 The system architecture diagram of this invention mainly consists of four parts: a publishing node, a blockchain system, participating nodes, and a cloud database. The following description, in conjunction with the accompanying drawings, includes the following steps:

[0087] 1) Register and initialize the identity of nodes participating in financial data sharing in the blockchain network. Write the node's identity information, attribute information, initial reputation information, and margin information into the consortium blockchain. Configure access control rules during the registration phase through smart contracts to bind the node's admission conditions to the types of federated learning tasks it can participate in and its access permissions to financial data. At the same time, set a minimum admission threshold based on the node's reputation status. When the node's reputation is lower than the preset standard, automatically restrict its eligibility to participate in federated learning tasks.

[0088] 2) The task issuing node publishes the federated learning financial data sharing task to the blockchain network under the consortium blockchain architecture, and puts the model parameter configuration, node participation rules, minimum reputation requirements and constraints associated with access control policies on the chain. During the task distribution phase, the identity attributes, access permissions and reputation status of the nodes are jointly verified through on-chain smart contracts. Before the start of each round of training, a comprehensive evaluation is conducted based on the current reputation level, historical contribution performance and online stability of the nodes, and nodes that meet the conditions are selected to participate in the current round of federated learning.

[0089] 3) After passing access control verification, participating nodes perform federated learning model training in their local computing environment based on the financial data they hold. During the training process, the original financial data is always kept on the local node and is not uploaded. At the same time, differential privacy mechanism is used to perturb the generated local model parameters to meet privacy protection requirements. The reasonableness of the model update magnitude is checked. When the detection result exceeds the preset range, the model update is marked as an abnormal update and will not participate in subsequent aggregation.

[0090] 4) Participating nodes that have completed local training will submit the privacy-protected local model parameters to the consortium blockchain network in the form of transactions; the verification nodes in the consortium blockchain will verify the legality and quality of the model parameters. The verification process includes a comprehensive check of the source of the model parameters, the current reputation status of the node, and the validity of the model update. The model update will be screened using model quality evaluation indicators. Only when the preset quality conditions are met will the corresponding node be allowed to enter the model aggregation stage.

[0091] 5) For participating nodes that pass parameter verification, assign corresponding weights to their model updates based on the data scale held by each node, perform model aggregation operations in the consortium blockchain environment, and generate new global model parameters; the global model parameters are recorded in the consortium blockchain as the output of this round of federated learning and are used for distribution in subsequent training rounds and node reputation updates.

[0092] 6) Based on the actual performance of each participating node in the model training and model aggregation process, the node reputation information is dynamically updated, and a reputation decay mechanism is set in combination with the node's historical participation. The updated reputation status is associated with the corresponding global model summary and node data access behavior records and written into the consortium blockchain, thereby realizing continuous supervision of the data sharing process and traceable auditing of node behavior under access control constraints.

[0093] Optional, Figure 2 The specific process of step 1) is as follows:

[0094] 1. Node registration

[0095] In this step, all nodes participating in data sharing and federated learning first register in the consortium blockchain network. Each node completes identity registration through a user contract, generates a corresponding blockchain account address and public / private key pair, and writes the node's basic identity information, node type, available financial data, initial reputation value, and margin information into the consortium blockchain.

[0096] The entity component mainly consists of publishers, participating nodes, a cloud database, and a consortium blockchain network. Publishers are responsible for publishing federated learning tasks; participating nodes are composed of different institutions (such as hospitals, nursing homes, and disease control centers) and are responsible for local model training in federated learning tasks; the cloud database is used to store the local financial data of each participating node; and the consortium blockchain is used to uniformly store model summaries, reputation information, access control records, and audit information.

[0097] 2. Configure access control policies

[0098] The system configures access control policies through access control contracts, adopting a combination of role-based access control and attribute-based access control, while also incorporating node reputation values ​​to achieve dynamic access restrictions.

[0099] 1) Role-based access control: Role-based access control schemes are implemented through smart contracts, including User Contract (UC), Access Contract (AC), and Search Contract (SC). The User Contract (UC) is used for user registration and authentication; the Access Contract (AC) is used to assign access permissions according to user roles and return authorization results; the Search Contract (SC) is used to execute query operations after authorization is granted.

[0100] 2) Attribute-Based Access Control: Attribute-based access control further introduces a user attribute and data attribute classification mechanism on top of role-based control, including User Contract (UC), Access Contract (AC), Search Contract (SC), Behavior Contract (BC), and Revocation Contract (RC). The Behavior Contract (BC) is used to record malicious behaviors such as frequent requests, invalid requests, and unauthorized requests; the Revocation Contract (RC) is used to revoke access permissions in cases of resignation, violation, or expiration. A node access decision function is also defined. :

[0101]

[0102] in: Indicates the role of a node; This indicates the matching status between data and user attributes; This indicates the current reputation value; This represents historical behavior records. Access control is implemented throughout the following stages: ① Task registration stage; ② Model parameter download stage; ③ Model update and upload stage; ④ Local data retrieval stage.

[0103] For reputation threshold, when < When this happens, the system automatically lowers the user's access level or suspends access permissions, achieving dynamic linkage between access control and reputation mechanisms.

[0104] Optional, Figure 2 The specific processes of steps 2) and 3) are as follows: The task publishing node publishes the federated learning data sharing task in the consortium blockchain network. The federated learning task includes at least the initial global model parameters, target accuracy or training rounds, access control constraints, minimum reputation threshold, and node participation rules. After the task is published, each participating node obtains the corresponding task information by accessing the consortium blockchain network. The system verifies the participation qualification based on the access control policy and the node's current reputation value. Before the start of each training round, the system verifies the node's current reputation value. Historical contribution and online status Perform screening and calculate the overall score of the nodes:

[0105]

[0106] To enhance stability, a historical smoothing mechanism can be used:

[0107]

[0108] in, For the final overall score, This is the overall score for the current round. For historical comprehensive score, - besides These are weighting coefficients, selected according to the score ranking. Each node participates in the current round of training.

[0109] Participating nodes access the consortium blockchain to obtain the first Global model parameters of round iteration Each participating node utilizes the acquired global model parameters. The model is trained on a local dataset, and local model parameters are generated using the Differential Privacy Stochastic Gradient Descent (DP-SGD) algorithm. First, calculate the gradient of the loss function locally:

[0110]

[0111] This represents the model gradient calculated based on local data. To control gradient sensitivity and limit the impact of a single sample on model updates, the gradient is first pruned. The pruned gradient... for:

[0112]

[0113] in, This is the gradient clipping threshold, used to limit the upper bound of the gradient norm. After gradient clipping, to satisfy differential privacy constraints, Gaussian noise is superimposed on the clipped gradient. This indicates that the mean is 0 and the variance is 0. Gaussian noise, gradient after adding noise

[0114]

[0115] Ultimately, the local model parameters are updated as follows:

[0116]

[0117] in, This represents the learning rate. Through a combined mechanism of "gradient clipping + noise injection," the gradient magnitude is limited locally, enhancing privacy protection and reducing the potential impact of anomalous gradients on the global model. Simultaneously, to prevent anomalous updates from damaging the global model, a model update bias is defined:

[0118]

[0119] when Greater than the preset threshold At this time: the node's updated parameters do not participate in this round of model aggregation; the behavior contract records abnormal behavior; and a penalty item is included in Step 5. This will affect subsequent reputation updates and access control decisions.

[0120] Optional, Figure 2 The specific processes of steps 4) and 5) are as follows: Let This indicates that those who have passed the eligibility screening will participate in this round of federal learning. A set of nodes, i.e. Each participating node Local data volume The total amount of data across all participating nodes is:

[0121]

[0122] To ensure the quality and reliability of the aggregation model, the model parameters uploaded by each node are verified before formal aggregation. The system uses the Youden index as a comprehensive evaluation index of model performance, defined as follows: (True Positive Rate) represents the node model's ability to identify positive class samples; (True NegativeRate) represents the node model's ability to identify negative class samples; The higher the value, the better the model's classification performance. The Youden index can simultaneously measure the model's sensitivity and specificity, and it still has good stability in imbalanced scenarios, making it suitable for high-reliability scenarios such as healthcare and financial risk control.

[0123]

[0124] After completing this round of quality verification, the system synchronously updates the historical contribution of the nodes. Let the number of valid participation rounds in the history of a node be . If only the number of rounds in which it successfully participated in aggregation is counted, then the historical contribution is updated as follows:

[0125]

[0126] Where: if a node did not participate in aggregation in this round, then No update; if this is your first time participating, then... = ; Updated Write it to the consortium blockchain as historical record. This mechanism enables... It reflects the long-term model quality performance of nodes and provides a historical capability reference for the comprehensive scoring of the subsequent Step 2.

[0127] The system sets a preset quality threshold. When the node satisfies: If the local model update uploaded by a node meets the quality requirements, its model parameters can participate in this round of global aggregation; otherwise, it is considered a low-quality update or a potentially abnormal update, and its parameters will not participate in this round of model aggregation, but can be recorded in the subsequent reputation assessment module. After completing the node selection, a federated average strategy based on data volume is used for model aggregation. Let the nodes be... In the The local model parameters of the wheel are The global model parameter update formula is as follows; where: This represents the set of nodes that have passed quality verification. Represents a node Data weights; The total amount of data participating in the aggregation nodes.

[0128]

[0129] By introducing a data-weighted mechanism, nodes with larger data volumes can have a more significant impact on the global model, thereby improving model convergence efficiency and overall generalization ability. Furthermore, this weighting strategy remains well-adaptable even in scenarios with uneven data distribution. After aggregation, the system generates new global model parameters. The parameters are then subjected to consistency and integrity checks. Upon successful verification, the following information is packaged and written to the consortium blockchain: the hash value of the new round of global model parameters; the list of participating aggregation nodes and their weights; and the model quality indicators for each node. The current model version number and timestamp. The distributed consensus and immutability of blockchain ensure the transparency and traceability of the model version evolution process, preventing malicious replacement or rollback attacks. Simultaneously, each node can query historical aggregated records through the blockchain to audit the model's evolution trajectory.

[0130] set up Represents a node The reputation score in the current federated learning task is used to characterize its historical contributions and behavioral credibility. To balance historical performance with the quality of current contributions, a weighted update mechanism is used to dynamically adjust the node's reputation, with the update formula as follows:

[0131]

[0132] in: This represents the node's reputation value in the previous round; This represents the overall performance evaluation index of a node in the current round of training (which can be calculated by weighting multiple indicators such as model accuracy improvement rate, gradient effectiveness, and consistency test results). This is a historical weighting coefficient used to balance the influence of historical reputation and current contributions; This indicates penalties imposed for abnormal behavior, low-quality updates, or violations of protocol rules.

[0133] This mechanism ensures that reputation values ​​reflect a node's real-time performance while preventing drastic reputation changes due to short-term anomalies. To prevent long-term inactive or "free-riding" nodes from maintaining a dominant position based on historical reputation, a reputation decay mechanism is introduced, using time as a moderating variable. Let... This represents the time interval since the node last effectively participated in the task. Let be the attenuation coefficient, then the reputation attenuation formula is:

[0134]

[0135] in: Represents a node Current original reputation value; This represents the dynamic reputation value after decay over time. Represents the natural constant, whose value is approximately ; This represents the reputation decay coefficient, used to control the rate at which reputation declines over time. When the value is large, the node's reputation decays faster, and the system pays more attention to the node's recent behavior; when When the node is smaller, its reputation declines more slowly, and more emphasis is placed on its long-term historical contributions. This indicates the time interval since the node last effectively participated in a federated learning task, such as the time since the last successful model training, model update upload, or effective contribution.

[0136] Due to the exponential decay term It will happen over time As the number of nodes increases, their reputation gradually decreases. Therefore, if a node does not participate in a task for a long period or lacks effective contributions, its reputation value will gradually decline. In terms of incentive mechanism design, to enhance the system's game-theoretic constraints, it is assumed that nodes must pay a deposit to participate in tasks. The unit cost generated by its participation in training is (Including computing resource consumption, communication overhead, power consumption, etc.), the system allocates rewards based on the quality of contribution. Then the actual profit of the node is:

[0137]

[0138] Based on this, when a node is detected to have engaged in malicious behavior (such as uploading forged gradients, model poisoning attacks, data leakage, or denial-of-service attacks), the system will implement the following penalties: ① Deduct part or all of the security deposit. ② Add penalty items ③ Reduce their reputation value; ③ In severe cases, restrict their eligibility to participate in subsequent activities.

[0139] This design enhances the system's security and stability by increasing the cost of malicious behavior through a dual mechanism of economic and credit constraints. After completing reputation updates and revenue settlements, the system encapsulates the following information in a structured manner: updated node reputation values; training rewards and revenue distribution results for this round; margin change records; model parameter submission records and access logs; and anomaly detection and penalty execution records.

[0140] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A federated learning financial data sharing method based on blockchain access control, characterized in that, The method includes the following steps: Step 1: Node registration and access control initialization In the blockchain network, the registration and identity initialization of participating nodes are completed, the node's identity information, attribute information and reputation information are recorded, and access control policies are configured through smart contracts to constrain the types of financial data sharing tasks that nodes can participate in and the access permissions for financial data. Step 2: Federated Learning Task Issuance and Controlled Distribution The task publishing node publishes a federated learning financial data sharing task on the blockchain. The task includes model parameter configuration, access control constraints and node participation rules. Nodes that pass the access control verification obtain the task and participate in federated learning. Step 3: Local Model Training and Privacy Protection Participating nodes use their financial data locally to train models, with the raw data remaining on their local machines, and the generated model parameters are protected for privacy using differential privacy or encryption methods. Step 4: Model parameter validation, aggregation, and global model generation Once training is complete, participating nodes will upload the privacy-protected model parameters to the consortium blockchain. The verification nodes within the consortium blockchain will then verify and evaluate the model parameters. Only nodes that meet the preset conditions will be allowed to participate in model aggregation, and a global model will be generated based on the model's contribution. Step 5: Reputation Update and Controlled Data Sharing Audit The node reputation information is updated based on the performance of each node during model training and aggregation. The global model summary, reputation update results, and financial data access records are packaged and written into the blockchain to achieve controlled financial data sharing and behavior auditing.

2. The blockchain access control based federated learning financial data sharing method according to claim 1, characterized in that, The specific process of the node registration and access control initialization steps includes: Step 1.1: Node Registration In this step, all nodes participating in financial data sharing and federated learning first register in the consortium blockchain network; each node completes identity registration through a user contract, generates a corresponding blockchain account address and public / private key pair, and writes the node's basic identity information, node type, available financial data, initial reputation value, and margin information into the consortium blockchain; The entity mainly consists of publishers, participating nodes, a cloud database, and a consortium blockchain network. Publishers are responsible for publishing federated learning tasks. Participating nodes are composed of different institutions and are responsible for local model training in federated learning tasks. The cloud database is used to store the local financial data of each participating node. The consortium blockchain is used to uniformly store model summaries, reputation information, access control records, and audit information. Step 1.2: Configure access control policies The system configures access control policies through access control contracts, adopting a combination of role-based access control and attribute-based access control, while also incorporating node reputation values ​​to achieve dynamic access restrictions. 1) Role-based access control: Role-based access control schemes are implemented through smart contracts, including User Contract (UC), Access Contract (AC), and Search Contract (SC); User Contract (UC) is used for user registration and authentication; Access Contract (AC) is used to assign access permissions according to user roles and return authorization results; Search Contract (SC) is used to execute query operations after authorization is granted. 2) Attribute-based access control: Attribute-based access control further introduces user attribute and data attribute classification mechanism on the basis of role control, including user contract (UC), access contract (AC), search contract (SC), behavior contract (BC) and rescission contract (RC); the behavior contract (BC) is used for recording malicious behaviors such as frequent requests, invalid requests and no permission requests; the rescission contract (RC) is used for revoking access rights in the case of off-duty, violation or access expiration; and a node access decision function is defined : in: Indicates the role of a node; This indicates the matching status between data and user attributes; This indicates the current reputation value; This represents historical behavior records; access control is implemented throughout the following stages: ① Task registration stage; ② Model parameter download stage; ③ Model update and upload stage; ④ Local data retrieval stage. For reputation threshold, when < When this happens, the system automatically lowers the user's access level or suspends access permissions, achieving dynamic linkage between access control and reputation mechanisms.

3. The method for sharing financial data in federated learning based on blockchain access control according to claim 1, characterized in that, The specific process of the federated learning task publishing and controlled distribution steps includes: the task publishing node publishing the federated learning financial data sharing task in the consortium blockchain network; the federated learning task includes at least initial global model parameters, target accuracy or training rounds, access control constraints, minimum reputation threshold, and node participation rules; after the task is published, each participating node obtains the corresponding task information by accessing the consortium blockchain network, and the system verifies participation eligibility based on the access control policy and the node's current reputation value; before the start of each training round, the system verifies the node's current reputation value... Historical contribution and online status Perform screening and calculate the overall score of the nodes: To enhance stability, a historical smoothing mechanism can be used: in, For the final overall score, This is the overall score for the current round. For historical comprehensive score, - besides These are weighting coefficients, selected according to the score ranking. Each node participates in the current round of training.

4. The method for sharing financial data in federated learning based on blockchain access control according to claim 1, characterized in that, The specific process of the local model training and privacy protection steps includes: participating nodes accessing the consortium blockchain to obtain the first... Global model parameters of round iteration Each participating node utilizes the acquired global model parameters. The model is trained on a local dataset, and local model parameters are generated using the Differential Privacy Stochastic Gradient Descent (DP-SGD) algorithm. First, calculate the gradient of the loss function locally: This represents the model gradient calculated based on local data. To control gradient sensitivity and limit the impact of a single sample on model updates, the gradient is first pruned. The pruned gradient is... for: in, The gradient clipping threshold is used to limit the upper bound of the gradient norm. After gradient clipping, to satisfy differential privacy constraints, Gaussian noise is superimposed on the clipped gradient. for: in, This indicates that the mean is 0 and the variance is 0. Gaussian noise; finally, the local model parameters are updated as follows: in, The learning rate is represented by a combination of gradient clipping and noise injection. This mechanism limits gradient magnitude and enhances privacy protection at the local stage, thereby reducing the potential impact of anomalous gradients on the global model. Simultaneously, to prevent anomalous updates from damaging the global model, model update bias is defined. when Greater than the preset threshold At this time: the node's updated parameters do not participate in this round of model aggregation; the behavior contract records abnormal behavior; and a penalty item is included in Step 5. This will affect subsequent reputation updates and access control decisions.

5. The method for sharing financial data in federated learning based on blockchain access control according to claim 4, characterized in that, The specific process of the model parameter verification, aggregation and global model generation steps includes: performing quality assessment and screening on the local model update results uploaded by participating nodes, and on this basis, completing safe and reliable weighted aggregation to generate a new round of global model parameters; set up This indicates that those who have passed the eligibility screening will participate in this round of federal learning. A set of nodes, i.e. Each participating node Local data volume The total amount of data across all participating nodes is: To ensure the quality and reliability of the aggregation model, the model parameters uploaded by each node are verified before formal aggregation. The system uses the Youden index as a comprehensive evaluation index of model performance, which is defined as: in: (True Positive Rate) represents the node model's ability to identify positive class samples; (TrueNegative Rate) represents the node model's ability to identify negative class samples; The higher the value, the better the classification performance of the model; the Youden index can simultaneously measure the sensitivity and specificity of the model, and still has good stability in class imbalance scenarios. After completing this round of quality verification, the system synchronously updates the historical contribution of the nodes. Let the number of valid participation rounds in the history of a node be . If only the number of rounds in which it successfully participated in aggregation is counted, then the historical contribution is updated as follows: Where: if a node did not participate in aggregation in this round, then No update; if this is your first time participating, then... = ; Updated Write it to the consortium blockchain as a historical record; this mechanism enables... It reflects the long-term model quality performance of nodes and provides a historical capability reference for the comprehensive scoring of the subsequent Step 2; The system sets a preset quality threshold. When the node satisfies: If the local model update uploaded by a node is deemed to meet the quality requirements, its model parameters can participate in this round of global aggregation; otherwise, it is considered a low-quality update or a potentially abnormal update, and its parameters will not participate in this round of model aggregation, but can be recorded in the subsequent reputation assessment module; after completing the node selection, a federated average strategy based on data volume is used for model aggregation; let the node... In the The local model parameters of the wheel are Then the global model parameter update formula is: in: This represents the set of nodes that have passed quality verification. Represents a node Data weights; The total amount of data participating in the aggregation nodes; By introducing a data-weighted mechanism, nodes with larger data volumes can have a more significant impact on the global model, thereby improving model convergence efficiency and overall generalization ability. Furthermore, this weighting strategy remains well-adaptable even in scenarios with uneven data distribution. After aggregation, the system generates new global model parameters. The parameter is then subjected to consistency and integrity verification. Upon successful verification, the following information is packaged and written into the consortium blockchain: the hash value of the new round of global model parameters; the list of participating aggregation nodes and their weights; and the model quality indicators of each node. The model version number and timestamp for this round; the distributed consensus and immutability of blockchain ensure the transparency and traceability of the model version evolution process, preventing the model from being maliciously replaced or rolled back; at the same time, each node can query historical aggregate records through the blockchain to audit the model evolution trajectory.

6. The method for sharing financial data in federated learning based on blockchain access control according to claim 4, characterized in that, The specific process of the reputation update and controlled data sharing audit steps is as follows: Let... Represents a node The reputation value in the current federated learning task is used to characterize its historical contribution and behavioral credibility. To balance historical performance and current contribution quality, a weighted update mechanism is used to dynamically adjust the node's reputation, and the update formula is as follows: in: This represents the node's reputation value in the previous round; This represents the overall performance evaluation index of a node in the current round of training; This is a historical weighting coefficient used to balance the influence of historical reputation and current contributions; This indicates penalties imposed for abnormal behavior, low-quality updates, or violations of protocol rules; This mechanism ensures that reputation values ​​reflect a node's real-time performance while preventing drastic changes in reputation due to short-term abnormal fluctuations. To prevent long-term inactive or "free-riding" nodes from maintaining a dominant position based on historical reputation, a reputation decay mechanism is introduced, using time as a moderating variable. This represents the time interval since the node last effectively participated in the task. Let be the attenuation coefficient, then the reputation attenuation formula is: in: Represents a node Current original reputation value; This represents the dynamic reputation value after decay over time. Represents the natural constant, whose value is approximately ; This represents the reputation decay coefficient, used to control the rate at which reputation declines over time. When the value is large, the node's reputation decays faster, and the system pays more attention to the node's recent behavior; when When the node is smaller, its reputation declines more slowly, and more emphasis is placed on its long-term historical contributions. This indicates the time interval since the node last effectively participated in the federated learning task; Due to the exponential decay term It will happen over time As the number of nodes increases, their reputation gradually decreases. Therefore, if a node does not participate in a task for a long period or lacks effective contributions, its reputation value will gradually decrease. In terms of incentive mechanism design, to enhance the game constraint capability of the system, it is assumed that nodes need to pay a deposit to participate in tasks. The unit cost generated by its participation in training is The system allocates rewards based on the quality of the contribution. Then the actual profit of the node is: Based on this, when a node is detected to have engaged in malicious behavior, the system will implement the following penalties: ① Deduct part or all of the security deposit. ② Add penalty items ③ Reduce their reputation value; ③ In severe cases, restrict their eligibility to participate in subsequent activities; This design enhances the security and stability of the system by increasing the cost of malicious behavior through economic and credit constraints. After completing reputation updates and revenue settlements, the system encapsulates the following information in a structured manner: updated node reputation values; training rewards and revenue distribution results for this round; margin change records; model parameter submission records and access logs; and anomaly detection and penalty execution records.