Data security sharing methods, devices, equipment, and media based on distributed architecture
By using a distributed architecture and blockchain technology, the single point of failure and privacy breach issues of traditional centralized data sharing systems have been resolved, enabling secure data sharing and audit traceability, and meeting the compliance requirements of the financial industry.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA PING AN PROPERTY INSURANCE CO LTD
- Filing Date
- 2026-03-09
- Publication Date
- 2026-06-02
AI Technical Summary
Traditional centralized data sharing systems suffer from single-point risks, privacy breaches, and difficulties in auditing and tracing, making it difficult to meet the financial industry's dual needs for data compliance and security.
By adopting a distributed architecture, data holding institutions are treated as independent nodes. Local datasets are processed through homomorphic encryption, and registration information and model summaries are stored using blockchain. Smart contracts are used to control access permissions to achieve secure data sharing and audit traceability.
It achieves privacy protection by ensuring data stays within the data domain, avoids single-point risks, meets the compliance requirements of the financial industry, and enhances the security and traceability of data sharing.
Smart Images

Figure CN122137544A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of cloud security technology, and in particular to a data security sharing method, apparatus, device and storage medium based on a distributed architecture. Background Technology
[0002] Traditional data sharing systems between organizations primarily rely on centralized data exchange platforms or API gateways. Their core logic involves aggregating data from various organizations to a central server, where the platform centrally manages access permissions and data distribution processes. While this architecture offers advantages such as simple initial setup and low operational barriers, it also suffers from significant drawbacks: the central node becomes both the performance bottleneck of the entire system and a prime target for cyberattacks. If the central node crashes, is illegally attacked, or experiences data breaches, it can directly disrupt data transmission across the entire system, potentially leading to large-scale privacy breaches.
[0003] Traditional data sharing solutions primarily rely on static access control and SSL / TLS encrypted transmission for security. While these methods can offer some protection against external malicious attacks, they have significant vulnerabilities in privacy protection during data use. Specifically, once access is granted, the recipient can directly view the plaintext content. This means the original data controller completely loses its ability to protect the data after sharing. In data sharing scenarios involving multiple financial institutions such as banks, insurance companies, and securities firms, the lack of trust between institutions is further amplified, becoming a key obstacle to the efficient flow of data.
[0004] Furthermore, traditional data sharing systems also have shortcomings in dynamic compliance auditing and end-to-end data traceability. Because data is repeatedly copied and distributed at the central node, the operational behavior of multiple participating entities is difficult to trace transparently. This not only easily breeds the risk of data misuse but also leads to a series of problems such as unclear liability definition and difficulty in accountability after data breaches occur. Against the backdrop of increasingly stringent privacy protection regulations such as GDPR and requirements for cross-border financial data flows, this centralized data sharing model is no longer sufficient to meet the financial industry's business needs for both data compliance and security.
[0005] In the fintech sector, the technological drawbacks of traditional centralized data sharing systems have been further amplified. Central nodes, bearing the weight of massive amounts of transaction, credit, and risk control data from multiple institutions such as banks, securities firms, and insurance companies, are highly susceptible to performance bottlenecks due to excessive data throughput, leading to delays in cross-institutional business responses. Simultaneously, as the core hub of the entire system, central nodes become frequent targets of hacker attacks. A system outage or data breach can not only disrupt payment clearing and credit approval processes but also trigger serious consequences such as the leakage of user financial privacy and threats to asset security. The limitations of static access control and encrypted transmission mean that shared data is no longer subject to the supervision of the original controlling party. A lack of trust between institutions hinders the development of innovative businesses such as joint risk control and inclusive finance. Furthermore, insufficient audit traceability capabilities fail to meet the stringent compliance requirements of the financial industry, hindering the large-scale implementation of these businesses. Summary of the Invention
[0006] The main objective of this invention is to provide a data security sharing method, apparatus, device, and storage medium based on a distributed architecture, aiming to solve the problems of single point of risk, privacy leakage, and difficulty in auditing and tracing traditional centralized data sharing.
[0007] To achieve the above objectives, the present invention provides a data security sharing method based on a distributed architecture, comprising: The data holding institution is treated as an independent node in the system. Registration information is generated based on the independent node and its local dataset, and the registration information is stored in the blockchain. Each independent node performs homomorphic encryption on its local dataset. Based on the encrypted local dataset, the initial model is trained and the model gradient is calculated. The model gradient is then encrypted and uploaded to the system. All encrypted gradients are aggregated and decrypted through a secure aggregation protocol to generate an aggregated gradient. The initial model is then updated based on the aggregated gradient to generate a global model. A hash operation is performed on the global model to generate a summary result, which is then stored in the blockchain. Access permissions to the global model are controlled through the result summary and smart contracts. Authorized users can invoke the global model for secure data sharing based on the access permissions, and store the data sharing information in the audit log and write the audit log to the blockchain.
[0008] Furthermore, to achieve the above objectives, the present invention provides a data security sharing device based on a distributed architecture, comprising: The node registration and on-chain module is used to register data holding institutions as independent nodes of the system, generate registration information based on the independent nodes and their local datasets, and store the registration information on the blockchain. The encrypted training aggregation module is used to perform homomorphic encryption on the local dataset by each independent node, train the initial model and calculate the model gradient based on the encrypted local dataset, encrypt the model gradient and upload it to the system, aggregate all encrypted gradients through a secure aggregation protocol and decrypt them to generate aggregated gradients, update the initial model based on the aggregated gradients, and generate a global model. The result storage and authorization module is used to perform hash operations on the global model, generate a summary result, and store the summary result in the blockchain. The access permissions of the global model are controlled through the result summary and smart contracts. The shared log on-chain module is used to authorize users to call the global model for secure data sharing based on the access permissions, and to store the data sharing information in the audit log and write the audit log to the blockchain.
[0009] Furthermore, to achieve the above objectives, the present invention also provides a computer device, the computer device including a memory, a processor, and a data security sharing program based on a distributed architecture stored on the memory and executable on the processor, wherein when the data security sharing program based on a distributed architecture is executed by the processor, it implements the steps of the data security sharing method based on a distributed architecture as described above.
[0010] Furthermore, to achieve the above objectives, the present invention also provides a computer-readable storage medium storing a data security sharing program based on a distributed architecture, wherein when the data security sharing program based on a distributed architecture is executed by a processor, it implements the steps of the data security sharing method based on a distributed architecture as described above.
[0011] Beneficial Effects: This invention relates to the field of cloud security technology and can be applied to business system platforms such as fintech. It discloses a data security sharing method based on a distributed architecture, comprising: treating a data holding institution as an independent node in the system; generating registration information based on the independent node and its local dataset; storing the registration information on a blockchain; having each independent node perform homomorphic encryption on its local dataset; training an initial model and calculating its gradient based on the encrypted local dataset; encrypting the model gradient and uploading it to the system; aggregating and decrypting all encrypted gradients through a secure aggregation protocol to generate an aggregated gradient; updating the initial model based on the aggregated gradient to generate a global model; performing a hash operation on the global model to generate a digest result, storing the digest result on the blockchain; controlling access permissions to the global model through the result digest and smart contracts; authorizing users to call the global model for secure data sharing based on the access permissions; storing the data sharing information in an audit log and writing the audit log to the blockchain. This invention ensures the trustworthiness of nodes and data sources by treating data holders as independent nodes, calculating data summaries, encrypting and generating registration information on the blockchain, and then uploading it. Local data is processed with homomorphic encryption, and a global model is generated through federated learning training with encrypted gradient uploads. This securely aggregates the data to prevent it from leaving its domain. The global model summary is stored on the blockchain for evidence preservation, access permissions are controlled by smart contracts, and shared information and audit logs are uploaded to the blockchain for traceability. This thoroughly protects data privacy and avoids single points of failure. Attached Figure Description
[0012] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings: Figure 1 This is a schematic diagram of an application environment for a data security sharing method based on a distributed architecture according to an embodiment of the present invention; Figure 2 This is a flowchart illustrating an embodiment of the data security sharing method based on a distributed architecture according to the present invention. Figure 3 This is a schematic diagram of the functional modules of a preferred embodiment of the data security sharing device based on a distributed architecture of the present invention; Figure 4 This is a schematic diagram of the structure of a computer device according to an embodiment of the present invention; Figure 5 This is another structural schematic diagram of a computer device according to one embodiment of the present invention. Detailed Implementation
[0013] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.
[0014] The data security sharing method based on a distributed architecture provided in this invention can be applied to, for example... Figure 1In this application environment, the user terminal communicates with the server via a network. The server can use the user terminal to designate data holding institutions as independent nodes in the system. Registration information is generated based on these independent nodes and their local datasets, and this registration information is stored on the blockchain. Each independent node performs homomorphic encryption on its local dataset, trains an initial model based on the encrypted local dataset, calculates the model gradient, encrypts the model gradient, uploads it to the system, aggregates and decrypts all encrypted gradients using a secure aggregation protocol to generate an aggregated gradient, updates the initial model based on the aggregated gradient, and generates a global model. A hash operation is performed on the global model to generate a summary result, which is stored on the blockchain. Access permissions to the global model are controlled through the result summary and smart contracts. Authorized users can use these access permissions to securely share data with the global model, and the data sharing information is stored in the audit log and written to the blockchain. This invention ensures the trustworthiness of nodes and data sources by treating data holders as independent nodes, calculating data summaries, encrypting and generating registration information on the blockchain, and then uploading it. Local data is processed using homomorphic encryption, and a global model is generated through federated learning training with encrypted gradient uploads. This secure aggregation prevents data from leaving its domain. The global model summary is stored on the blockchain, access permissions are controlled by smart contracts, and shared information and audit logs are recorded on the blockchain for traceability. This thoroughly protects data privacy and avoids single points of failure. The user end can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server end can be implemented using a dedicated server or a server cluster consisting of multiple servers. The invention will be described in detail below through specific embodiments.
[0015] Please see Figure 2 , Figure 2 This is a flowchart illustrating an embodiment of the data security sharing method based on a distributed architecture provided by the present invention. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.
[0016] like Figure 2 As shown, the data security sharing method based on a distributed architecture proposed in this invention includes the following steps: S100. Treat the data holding institution as an independent node of the system, generate registration information based on the independent node and the local dataset of the independent node, and store the registration information in the blockchain; S200: Each independent node performs homomorphic encryption on the local dataset, trains the initial model and calculates the model gradient based on the encrypted local dataset, encrypts the model gradient and uploads it to the system, aggregates all encrypted gradients and decrypts them through a secure aggregation protocol to generate an aggregated gradient, updates the initial model based on the aggregated gradient, and generates a global model. S300. Perform a hash operation on the global model to generate a summary result, and store the summary result in the blockchain. Control the access permissions of the global model through the result summary and smart contracts. S400: Authorized users invoke the global model for secure data sharing based on the access permissions, and store the data sharing information in the audit log and write the audit log to the blockchain.
[0017] In this embodiment, the data holder participates in the collaboration as an independent node in the system. Each node first performs a hash calculation (using the SHA256 algorithm) on its own local dataset to generate a unique corresponding data digest. Then, it combines the node's own identity identifier and registration timestamp with the system's public key to encrypt this information, forming complete registration information. This registration information is uniformly written into the blockchain, forming an immutable node and data registration record. This ensures both the uniqueness and verifiability of each node's identity and the trustworthiness of the data source, laying a reliable foundation for subsequent data collaboration.
[0018] During the data processing and model training phases, independent nodes do not directly share the original local dataset. Instead, they encrypt the local dataset using homomorphic encryption. Homomorphic encryption possesses a unique property: performing addition, multiplication, or other operations on the encrypted ciphertext yields the same result after decryption as performing the same operations on the original plaintext. This allows the ciphertext to directly participate in collaborative computation without decryption, fundamentally preventing privacy leaks during data sharing. Based on the encrypted local dataset, each node trains a local model using an initial model with the same structure, capturing feature information from the local data by calculating the gradient of the model's loss function. Afterward, the nodes encrypt the calculated model gradient again and upload it to the system. The system employs a secure aggregation protocol to aggregate the encrypted gradients uploaded by all nodes, obtaining the aggregated encrypted gradient. This aggregated gradient is then decrypted by a designated coordinating node or multiple parties across the network, generating the final aggregated gradient. This aggregated gradient is used to update the parameters of the initial model, ultimately forming a global model that integrates the data features from all nodes.
[0019] After the global model is generated, the system performs a SHA256 hash operation on it to generate a unique digest result. This digest result is stored in the blockchain to ensure the integrity and immutability of the global model. Simultaneously, the system constructs a dynamic access control list through smart contracts. Only authorized users or nodes can access the global model; objects not on the access control list cannot call the global model, thus strictly controlling the scope of use of the global model and ensuring its security.
[0020] Once authorized, users can invoke the global model for secure data sharing and related calculations. Key information throughout the data sharing process, including user identity, operation timestamps, and specific operation types, will be meticulously recorded in the audit log. This audit log will be written to the blockchain in hash form, creating an immutable record of operations and ensuring full traceability of "who operated, when operated, and what was operated," providing a reliable basis for subsequent compliance checks and liability determination.
[0021] For example, in the fintech business, this solution can be applied to cross-institutional credit assessment collaboration. Different data holders do not need to share sensitive data such as users' credit records and transaction flows. Through independent node registration, homomorphic encryption, and federated learning to train a global model, a more comprehensive and accurate credit assessment model can be built. This helps fintech platforms more accurately identify credit risks while strictly protecting user privacy and meeting the compliance requirements of the financial industry.
[0022] In one embodiment, S100 includes: S101. Several data holding institutions are designated as independent nodes of the system, and a unique node identity is assigned to each independent node. S102. Obtain the local dataset for each individual node; S103. Perform a hash operation on the local dataset to generate a data digest; S104. The data digest, registration timestamp, and node identity identifier are concatenated in a preset order to form the registration data of an independent node; S105. Encrypt the registration data using the system public key to generate encrypted registration information; S106. Write the encrypted registration information of all independent nodes into the blockchain.
[0023] In this embodiment, the system first sets each of the data holders participating in the data collaboration as an independent node. Each node receives a unique node identity identifier, which serves as the core basis for various operations and identity verification within the system, preventing identity confusion or impersonation. Next, the system retrieves the local dataset stored by each individual node. These datasets are the core resources for nodes to participate in collaborative computing, and there is no need to transmit the raw data externally. Subsequently, a hash algorithm (specifically SHA256) is used to calculate the hash value of the local dataset, generating a corresponding hash digest. The characteristics of hash algorithms ensure that the same dataset generates a unique and fixed data digest. Any slight modification to the dataset will result in a significant change in the data digest, which provides crucial support for subsequent verification of data integrity.
[0024] Then, the system will concatenate the generated data digest, the timestamp of the node registration, and the node's unique identifier in a preset fixed order to form complete registration data. ,in It is a node identity identifier. It is the system public key. This is a registration timestamp, ensuring that the registration information includes three core elements: node identity, data characteristics, and registration timeliness. To guarantee the security of registration data during transmission and storage, the system uses the system's public key to encrypt this concatenated registration data, generating encrypted registration information. Only authorized parties holding the corresponding private key can decrypt and view the original registration data, preventing the theft or tampering of registration information. Finally, the system writes the encrypted registration information of all independent nodes into the blockchain. The decentralized and immutable characteristics of the blockchain make this registration information a permanent record that is queryable, verifiable, and tamper-proof across the entire network, ensuring that the legitimacy of each node's identity and the credibility of its data source are recognized by the entire network.
[0025] In the fintech sector, this process can be applied to cross-platform credit data collaboration scenarios. Different credit service providers, acting as independent nodes, complete identity registration and data summary upload to the blockchain through the above process. Without sharing sensitive data such as user repayment records and asset status, they can collaborate in subsequent joint risk control model training based on trusted node identities and data sources. This not only protects user privacy and security but also improves the accuracy of risk control models through the synergy of multi-source data, effectively identifying fraud risks.
[0026] In one embodiment, S200 includes: S201. Each independent node stores the local dataset locally and encrypts the local dataset. The initial model with the same structure is trained based on the encrypted local dataset. S202. Calculate the model gradient based on the local dataset stored locally, and encrypt the model gradient to obtain the encrypted gradient; S203. Each independent node uploads its corresponding encryption gradient to the system. S204. The encryption gradients uploaded by all independent nodes are aggregated and calculated using a secure aggregation protocol to obtain the aggregated ciphertext. S205. Decrypt the aggregated ciphertext through the coordination node to generate the aggregated gradient; S206. Based on the aggregated gradient, update the parameters of the trained initial model using the gradient descent algorithm to generate a global model.
[0027] In this embodiment, each independent node stores its local dataset in its local storage environment and does not transmit the original data externally throughout the process, ensuring the physical security of the data. All independent nodes will use an initial model with completely identical structure. Training is conducted to ensure that subsequent model parameters can be effectively fused. Before training, nodes encrypt their local datasets using a homomorphic encryption algorithm. The core advantage of homomorphic encryption is that after performing addition, multiplication, and other operations on the encrypted ciphertext, the decryption result is completely consistent with the result of performing the same operations directly on the original plaintext. This allows the encrypted dataset to be used directly for model training without decryption, fundamentally avoiding the risk of privacy leaks during the training process.
[0028] During model training, each node, based on the locally retained original dataset, captures key information about the optimization of model parameters by calculating the gradient of the model's loss function (i.e., the partial derivative of the loss function with respect to the model parameters), and obtains the corresponding model gradient. To prevent gradient information from being stolen or tampered with during transmission, the node will use encryption technology again to encrypt the model gradient, generating an encrypted gradient. This ensures the secure transmission of gradient data. Subsequently, each independent node uploads the encrypted gradient data to the system, completing the submission of its local training results.
[0029] After receiving the encryption gradients uploaded by all independent nodes, the system uses the SecureAggregation protocol to aggregate and calculate these encryption gradients. The SecureAggregation protocol can collaboratively process all encryption gradients without revealing the specific content of the encryption gradients from individual nodes, ultimately yielding the aggregated ciphertext. This process achieves both the fusion of multi-source gradient data and the protection of the privacy and security of gradient information from individual nodes. Subsequently, a pre-defined coordinating node (or a node jointly authorized by multiple parties across the network) uses the corresponding key to decrypt the aggregated ciphertext and generate the aggregated gradient. The aggregated gradient integrates the local data features of all nodes to optimize model parameters.
[0030] Finally, based on the generated aggregated gradient, the system updates and adjusts the parameters of the initial model using the gradient descent algorithm. Specifically, it subtracts the product of the learning rate and the aggregated gradient from the current model parameters. By continuously iterating through this process, the model can gradually absorb the local data features of all independent nodes, ultimately generating a global model with better performance and stronger generalization ability. This achieves the collaborative goal of "data remaining within the domain and models being jointly optimized".
[0031] In the fintech sector, this process supports joint risk control model training among multiple financial institutions. Each institution, acting as an independent node, stores sensitive local data such as customer credit records and transaction flows in its own system. This data is then homomorphically encrypted and used for initial risk control model training. The calculated model gradient is encrypted and uploaded to the system. The aggregated gradient is obtained through a secure aggregation protocol and then updated using a gradient descent algorithm, generating a global risk control model that integrates the data strengths of all institutions. This model can more accurately identify fraud risks and assess customer credit ratings, while avoiding direct sharing of sensitive data between financial institutions, thus meeting the privacy compliance requirements of the financial industry.
[0032] In one embodiment, S201 includes: S2011. Each independent node uses a homomorphic encryption function to encrypt the local dataset, generating an encrypted local dataset. S2012. Perform joint computation based on the encrypted local dataset to generate an encrypted joint result; S2013. Train the initial model using the encrypted local dataset and the encrypted joint result.
[0033] In this embodiment, each independent node will preferentially use a homomorphic encryption function when participating in collaborative model training. The local dataset is encrypted to generate an encrypted local dataset. Homomorphic encryption technology has unique computational properties, namely, it performs addition on the encrypted ciphertext. ,multiplication After the operation, the decryption result is completely consistent with the result of performing the same operation directly on the original plaintext. This characteristic provides core technical support for subsequent collaborative computing without leaking the original data.
[0034] Based on the encrypted local dataset, each node participates in the joint computation organized by the system. Since the ciphertext can be directly used in the computation without decryption, the encrypted local datasets of all independent nodes can complete collaborative computation within the system to generate encrypted joint results. During this process, no node can obtain the original data from other nodes, thus realizing collaborative value mining of multi-source data while maximizing data privacy protection.
[0035] Subsequently, each independent node uses the encrypted local dataset and the encrypted joint result as input for model training, training an initial model with the same pre-defined structure. The unified structure of the initial model is fundamental to ensuring the effective aggregation of subsequent model parameters and the generation of a global model. The encrypted data input eliminates the risk of data privacy leaks during training, allowing nodes to complete local training in a completely secure environment, laying a solid foundation for subsequent gradient calculations and model parameter updates.
[0036] In the fintech business, multiple financial institutions can apply this process as independent nodes. For example, in a joint credit assessment scenario, each financial institution can homomorphically encrypt its local sensitive datasets, such as customer transaction records and credit history, and then participate in cross-institutional encrypted joint computation to generate an encrypted joint result that integrates data features from multiple institutions. This result is then used to train the initial credit assessment model, combining it with its own encrypted local dataset. This approach not only provides multi-dimensional data support for credit assessment and improves the accuracy of model evaluation, but also avoids cross-institutional leakage of sensitive customer financial data, meeting the stringent privacy compliance requirements of the financial industry.
[0037] In one embodiment, S203 includes: S2031. When the independent node uploads the encrypted gradient to the system, a zero-knowledge proof is generated based on the current global model parameters, the local dataset, and the model gradient. S2032. When the system receives the encryption gradient, it verifies it based on the blockchain registration information, the current global model parameters, the model gradient corresponding to the independent node, and the zero-knowledge proof. S2033. If the verification result shows that the data is real, then it is determined that the model gradient of the independent node has not been tampered with and is allowed to participate in gradient aggregation. S2034. If the verification result is a data error, it is determined that the model gradient of the independent node has been forged or tampered with, and it is refused to participate in gradient aggregation. The abnormal behavior is recorded in the audit log.
[0038] In this embodiment, after generating the encryption gradient, each independent node, before uploading the encryption gradient to the system, will first generate a corresponding proof file based on the parameters of the current global model, its own local dataset, and the calculated model gradient, using zero-knowledge proof technology. (Zero-knowledge proof is a special verification technique that allows the prover to convince the verifier that a statement is true and valid without disclosing any sensitive information to the verifier.) The core function of this proof document is to verify to the system that the model gradient uploaded by the node is indeed calculated based on the current global model parameters and its own real local dataset, and has not been forged or tampered with.
[0039] When the system receives an encrypted gradient uploaded by an independent node, it initiates a rigorous verification process. During verification, the system retrieves node registration information stored in the blockchain (including node identity identifiers, data digests, etc., used to confirm the legitimacy of the node's identity and the credibility of the data source), and performs multi-dimensional cross-verification by combining the parameters of the current global model, the model gradient corresponding to the independent node, and the zero-knowledge proof submitted by the node. The core logic of the verification is to confirm the consistency between the model gradient and the current global model parameters and the node's local data characteristics, while verifying the authenticity of the computation process through zero-knowledge proofs, all without needing to obtain the node's original local dataset.
[0040] If the system's verification result indicates that the data is genuine, it means that the model gradient of this independent node is derived from real data and compliant calculation processes, without any abnormalities such as forgery or tampering. The system will determine that the model gradient is valid and allow it to participate in the subsequent gradient aggregation process, providing effective support for the parameter updates of the global model. If the verification result indicates that the data is incorrect, it means that the model gradient of this node may have been forged or tampered with, and does not match real data or compliant calculation processes. The system will directly reject the model gradient from participating in gradient aggregation to prevent false or tampered gradient data from affecting the accuracy of the global model. At the same time, the system will record the abnormal behavior of this node (including node identity, abnormal operation time, operation type, etc.) in detail in the audit log, providing a basis for subsequent accountability and violation handling.
[0041] In the fintech sector, this process effectively safeguards the security of collaborative scenarios such as joint risk control and credit assessment among financial institutions. For example, when multiple financial institutions participate as independent nodes in training a joint risk control model, after one institution uploads its encrypted gradient, the system verifies the authenticity of its gradient data through the aforementioned verification process. If a financial institution attempts to upload a forged gradient to gain improper benefits (such as lowering the risk assessment level of its own customers), the system will detect the anomaly through verification, refuse its gradient's participation in aggregation, and record the abnormal behavior. This ensures both the accuracy and fairness of the joint risk control model and maintains the compliant and orderly operation of the financial collaboration ecosystem.
[0042] In one embodiment, S300 includes: S301. Perform hash calculation on the global model, generate a result digest, and write the result digest into the blockchain; S302. During the data transmission or invocation process of the global model, the integrity of the current global model is verified based on the result digest of the blockchain. S303. If the integrity verification is consistent, the global model has not been tampered with, and data is transmitted securely or the global model is allowed to be called. S304. Constructing smart contracts based on dynamic authorization lists; S305. Access permissions to the global model after integrity verification are controlled through the smart contract; S306. If the user is not on the access control list, then deny the user access. S307. If the user is on the access control list, then grant access to the user.
[0043] In this embodiment, after the global model is generated, it is first calculated using a hash algorithm (specifically, the SHA256 algorithm) to obtain a unique corresponding result digest. The characteristics of hash algorithms mean that any slight modification to the parameters of the global model will result in a significant difference in the generated result summary, providing a core basis for verifying the integrity of the model. Subsequently, the result summary is written to the blockchain. The decentralized and tamper-proof nature of the blockchain makes the result summary a permanent record that can be queried and traced across the entire network, ensuring that the original state of the global model is solidified and preserved.
[0044] During the transmission or invocation of the global model, the system initiates an integrity verification process. During verification, the system retrieves the result digest stored in the blockchain and simultaneously re-hashes the global model to be transmitted or invoked, generating a real-time digest. The real-time digest is compared with the result digest stored in the blockchain. If they match perfectly, it indicates that the global model has not been tampered with during transmission or storage, maintaining its original integrity. In this case, secure data transmission can proceed normally, or authorized users can be allowed to invoke the global model. If they do not match, it indicates that the global model may have been tampered with, and the system will immediately terminate the transmission or invocation operation to prevent unreliable models from causing security risks or erroneous results.
[0045] To precisely control access permissions for the global model, the system constructs smart contracts based on dynamic authorization lists (i.e., access control lists, abbreviated as ACLs). Dynamic authorization lists can be flexibly adjusted according to actual business needs, changes in user permissions, and other factors. Smart contracts, as automated execution protocols on the blockchain, embed access permission rules into these lists. Once set, they will be executed automatically and strictly according to the rules, requiring no manual intervention.
[0046] When a user initiates a request to access the global model, the smart contract automatically verifies whether the user is on the access control list. If the user is not on the access control list, the smart contract will directly reject the access request, prohibiting the user from obtaining or calling the global model. If the user is an authorized user on the access control list, the smart contract will automatically grant the corresponding access permissions, allowing the user to use the global model for data processing or related calculations within the scope of permissions. This ensures the security of the global model while achieving flexible and precise control over access permissions.
[0047] In the fintech sector, this process effectively supports the sharing of collaborative models among financial institutions. For example, once the results of a global risk control model jointly trained by multiple financial institutions are uploaded to the blockchain, integrity checks can ensure that the model has not been tampered with during transmission among the institutions. Smart contracts built on a dynamic authorization list strictly control access to the risk control model, ensuring secure model sharing, preventing misuse by unauthorized institutions, and meeting the compliance and regulatory requirements of the financial industry.
[0048] In one embodiment, S400 includes: S401. Authorized users call the global model based on the access permission determination result of the smart contract to perform secure data sharing; S402. Store all data sharing information in the audit log; S403. The audit log is hashed to obtain a hash audit log, and the hash audit log is written to the blockchain.
[0049] In this embodiment, after an authorized user initiates a global model call request, the smart contract automatically determines access permissions based on a preset dynamic authorization list (access control list). Only when a user is included in the authorization list can they obtain the permission to call the global model and thus carry out data security sharing operations. Throughout this process, the global model call is always conducted within an encrypted environment and under access control. The original data does not need to leave the local storage environment, effectively avoiding the risk of privacy leakage during data sharing and ensuring the security and compliance of data use.
[0050] Throughout the entire process of secure data sharing, all critical operational information is fully recorded in the audit log. This information includes the identity of the accessing user, the timestamp of the global model call, the specific operation type (such as data query, model inference, result acquisition, etc.), relevant summaries of the shared data, and the operation results, forming a comprehensive and detailed operation trajectory record that provides complete data support for subsequent compliance audits and behavior tracing.
[0051] To ensure the authenticity, integrity, and immutability of audit logs, the system hashes the audit logs that record complete data sharing information (using the SHA256 algorithm) to generate a unique hash audit log. The characteristics of the hash algorithm mean that any tampering with the original audit log will cause a significant change in the hash value, allowing for quick identification of log tampering. This hash audit log is then written to the blockchain. Leveraging the decentralized and immutable nature of blockchain, the audit log is permanently stored and traceable across the entire network, ensuring that every data sharing operation is verifiable and non-repudiable.
[0052] In the fintech sector, this process effectively supports compliant data sharing and collaborative business operations among financial institutions. For example, authorized financial institutions can, based on the permissions granted by smart contracts, invoke a jointly trained global credit assessment model to collaboratively assess customer creditworthiness and securely share data. The entire assessment and sharing process is meticulously recorded in an audit log, hashed, and then stored on the blockchain as evidence. This not only meets the needs of financial institutions for collaborative credit operations and risk management but also provides regulatory authorities with traceable audit evidence, ensuring compliant financial operations and preventing data misuse and illegal activities.
[0053] In one embodiment, a data security sharing device based on a distributed architecture is provided, which corresponds one-to-one with the data security sharing method based on a distributed architecture described in the above embodiments. (Refer to...) Figure 3 , Figure 3 This is a schematic diagram of the functional modules of a preferred embodiment of the data security sharing device based on a distributed architecture of the present invention. The modules include a node registration and on-chain module 10, an encrypted training aggregation module 20, a result storage and authorization module 30, and a shared log on-chain module 40. Detailed descriptions of each functional module are as follows: The node registration and on-chain module 10 is used to register data holding institutions as independent nodes of the system, generate registration information based on the independent nodes and the local datasets of the independent nodes, and store the registration information on the blockchain. The encrypted training aggregation module 20 is used to perform homomorphic encryption on the local dataset by each independent node, train the initial model and calculate the model gradient based on the encrypted local dataset, encrypt the model gradient and upload it to the system, aggregate all encrypted gradients through a secure aggregation protocol and decrypt them to generate aggregated gradients, update the initial model based on the aggregated gradients, and generate a global model. The result storage and authorization module 30 is used to perform hash operations on the global model, generate a summary result, and store the summary result in the blockchain. The access permissions of the global model are controlled through the result summary and smart contracts. The shared log on-chain module 40 is used to authorize users to call the global model for secure data sharing based on the access permissions, and to store the data sharing information in the audit log and write the audit log to the blockchain.
[0054] In one embodiment, the node registration on-chain module 10 includes: Several data holding institutions are treated as independent nodes in the system, and each independent node is assigned a unique node identity identifier. Obtain the local dataset for each individual node; Perform a hash operation on the local dataset to generate a data digest; The data summary, registration timestamp, and node identity identifier are concatenated in a preset order to form the registration data of an independent node; The registration data is encrypted using the system public key to generate encrypted registration information; All encrypted registration information of independent nodes is written into the blockchain.
[0055] In one embodiment, the encrypted training aggregation module 20 includes: Each independent node stores the local dataset locally and encrypts the local dataset. The initial model with the same structure is then trained based on the encrypted local dataset. The model gradient is calculated based on the local dataset stored locally, and the model gradient is encrypted to obtain the encrypted gradient. Each independent node uploads its corresponding encryption gradient to the system. A secure aggregation protocol is used to aggregate and calculate the encryption gradients uploaded by all independent nodes to obtain aggregated ciphertext; The aggregated ciphertext is decrypted by the coordinating node to generate the aggregated gradient; Based on the aggregated gradient, the parameters of the initial trained model are updated using the gradient descent algorithm to generate a global model.
[0056] In one embodiment, each independent node stores the local dataset locally and encrypts the local dataset. Training an initial model with the same structure is then performed based on the encrypted local dataset, including: Each independent node uses a homomorphic encryption function to encrypt its local dataset, generating an encrypted local dataset. Based on the encrypted local dataset, joint computation is performed to generate an encrypted joint result; The initial model is trained using the encrypted local dataset and the encrypted joint result.
[0057] In one embodiment, the process of each independent node uploading its corresponding encryption gradient to the system includes: When the independent node uploads the encrypted gradient to the system, it generates a zero-knowledge proof based on the current global model parameters, the local dataset, and the model gradient. When the system receives the cryptographic gradient, it verifies it based on the blockchain registration information, the current global model parameters, the model gradient corresponding to the independent node, and the zero-knowledge proof. If the verification result shows that the data is real, it is determined that the model gradient of the independent node has not been tampered with and is allowed to participate in gradient aggregation. If the verification result indicates that the data is incorrect, it is determined that the model gradient of the independent node has been forged or tampered with, and it is refused to participate in gradient aggregation. The abnormal behavior is then recorded in the audit log.
[0058] In one embodiment, the result storage and authorization module 30 includes: The global model is hashed to generate a result digest, and the result digest is written into the blockchain. During data transmission or invocation in the global model, the integrity of the current global model is verified based on the result digest of the blockchain. If the integrity verification is successful, the global model has not been tampered with, and data can be transmitted securely or the global model can be invoked. Smart contracts are built based on dynamic authorization lists; Access permissions to the global model after integrity verification are controlled through the smart contract; If the user is not on the access control list, then access is denied to the user. If the user is on the access control list, then the user is granted access.
[0059] In one embodiment, the shared log on-chain module 40 includes: Authorized users can invoke the global model based on the access permission determination result of the smart contract to achieve secure data sharing; All data sharing information is stored in the audit log; The audit log is hashed to obtain a hash audit log, and the hash audit log is written to the blockchain.
[0060] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 4 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used for communication with external user terminals via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a server-side data security sharing method based on a distributed architecture.
[0061] In one embodiment, a computer device is provided, which may be a user terminal, and its internal structure diagram may be as follows: Figure 5As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it implements the user-side functions or steps of a data security sharing method based on a distributed architecture. In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps: The data holding institution is treated as an independent node in the system. Registration information is generated based on the independent node and its local dataset, and the registration information is stored in the blockchain. Each independent node performs homomorphic encryption on its local dataset. Based on the encrypted local dataset, the initial model is trained and the model gradient is calculated. The model gradient is then encrypted and uploaded to the system. All encrypted gradients are aggregated and decrypted through a secure aggregation protocol to generate an aggregated gradient. The initial model is then updated based on the aggregated gradient to generate a global model. A hash operation is performed on the global model to generate a summary result, which is then stored in the blockchain. Access permissions to the global model are controlled through the result summary and smart contracts. Authorized users can invoke the global model for secure data sharing based on the access permissions, and store the data sharing information in the audit log and write the audit log to the blockchain.
[0062] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor: The data holding institution is treated as an independent node in the system. Registration information is generated based on the independent node and its local dataset, and the registration information is stored in the blockchain. Each independent node performs homomorphic encryption on its local dataset. Based on the encrypted local dataset, the initial model is trained and the model gradient is calculated. The model gradient is then encrypted and uploaded to the system. All encrypted gradients are aggregated and decrypted through a secure aggregation protocol to generate an aggregated gradient. The initial model is then updated based on the aggregated gradient to generate a global model. A hash operation is performed on the global model to generate a summary result, which is then stored in the blockchain. Access permissions to the global model are controlled through the result summary and smart contracts. Authorized users can invoke the global model for secure data sharing based on the access permissions, and store the data sharing information in the audit log and write the audit log to the blockchain.
[0063] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side and user side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.
[0064] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0065] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0066] It should be noted that if any software tools or components not belonging to this company appear in the embodiments of this application, they are merely illustrative examples and do not represent actual use. The embodiments described above are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A data security sharing method based on a distributed architecture, characterized in that, Includes the following steps: The data holding institution is treated as an independent node in the system. Registration information is generated based on the independent node and its local dataset, and the registration information is stored in the blockchain. Each independent node performs homomorphic encryption on its local dataset. Based on the encrypted local dataset, the initial model is trained and the model gradient is calculated. The model gradient is then encrypted and uploaded to the system. All encrypted gradients are aggregated and decrypted through a secure aggregation protocol to generate an aggregated gradient. The initial model is then updated based on the aggregated gradient to generate a global model. A hash operation is performed on the global model to generate a summary result, which is then stored in the blockchain. Access permissions to the global model are controlled through the result summary and smart contracts. Authorized users can invoke the global model for secure data sharing based on the access permissions, and store the data sharing information in the audit log and write the audit log to the blockchain.
2. The data security sharing method based on a distributed architecture as described in claim 1, characterized in that, The step of treating the data holding institution as an independent node in the system, generating registration information based on the independent node and its local dataset, and storing the registration information in the blockchain includes: Several data holding institutions are treated as independent nodes in the system, and each independent node is assigned a unique node identity identifier. Obtain the local dataset for each individual node; Perform a hash operation on the local dataset to generate a data digest; The data summary, registration timestamp, and node identity identifier are concatenated in a preset order to form the registration data of an independent node; The registration data is encrypted using the system public key to generate encrypted registration information; All encrypted registration information of independent nodes is written into the blockchain.
3. The data security sharing method based on a distributed architecture as described in claim 1, characterized in that, The process involves each independent node performing homomorphic encryption on its local dataset, training an initial model and calculating its gradients based on the encrypted local dataset, encrypting the model gradients and uploading them to the system, aggregating and decrypting all encrypted gradients using a secure aggregation protocol to generate aggregated gradients, updating the initial model based on these aggregated gradients, and generating a global model, including: Each independent node stores the local dataset locally and encrypts the local dataset. The initial model with the same structure is then trained based on the encrypted local dataset. The model gradient is calculated based on the local dataset stored locally, and the model gradient is encrypted to obtain the encrypted gradient. Each independent node uploads its corresponding encryption gradient to the system. A secure aggregation protocol is used to aggregate and calculate the encryption gradients uploaded by all independent nodes to obtain aggregated ciphertext; The aggregated ciphertext is decrypted by the coordinating node to generate the aggregated gradient; Based on the aggregated gradient, the parameters of the initial trained model are updated using the gradient descent algorithm to generate a global model.
4. The data security sharing method based on a distributed architecture as described in claim 3, characterized in that, Each independent node stores its local dataset locally and encrypts it. Based on the encrypted local dataset, it trains an initial model with the same structure, including: Each independent node uses a homomorphic encryption function to encrypt its local dataset, generating an encrypted local dataset. Based on the encrypted local dataset, joint computation is performed to generate an encrypted joint result; The initial model is trained using the encrypted local dataset and the encrypted joint result.
5. The data security sharing method based on a distributed architecture as described in claim 3, characterized in that, The process of each independent node uploading its corresponding encryption gradient to the system includes: When the independent node uploads the encrypted gradient to the system, it generates a zero-knowledge proof based on the current global model parameters, the local dataset, and the model gradient. When the system receives the cryptographic gradient, it verifies it based on the blockchain registration information, the current global model parameters, the model gradient corresponding to the independent node, and the zero-knowledge proof. If the verification result shows that the data is real, it is determined that the model gradient of the independent node has not been tampered with and is allowed to participate in gradient aggregation. If the verification result indicates that the data is incorrect, it is determined that the model gradient of the independent node has been forged or tampered with, and it is refused to participate in gradient aggregation. The abnormal behavior is then recorded in the audit log.
6. The data security sharing method based on a distributed architecture as described in claim 1, characterized in that, The process of performing a hash operation on the global model to generate a digest result, storing the digest result on the blockchain, and controlling access permissions to the global model through the result digest and smart contracts includes: The global model is hashed to generate a result digest, and the result digest is written into the blockchain. During data transmission or invocation in the global model, the integrity of the current global model is verified based on the result digest of the blockchain. If the integrity verification is successful, the global model has not been tampered with, and data can be transmitted securely or the global model can be invoked. Smart contracts are built based on dynamic authorization lists; Access permissions to the global model after integrity verification are controlled through the smart contract; If the user is not on the access control list, then access is denied to the user. If the user is on the access control list, then the user is granted access.
7. The data security sharing method based on a distributed architecture as described in claim 1, characterized in that, The authorized user, based on the access permissions, invokes the global model for secure data sharing, stores the data sharing information in the audit log, and writes the audit log to the blockchain, including: Authorized users can invoke the global model based on the access permission determination result of the smart contract to achieve secure data sharing; All data sharing information is stored in the audit log; The audit log is hashed to obtain a hash audit log, and the hash audit log is written to the blockchain.
8. A data security sharing device based on a distributed architecture, characterized in that, The data security sharing device based on a distributed architecture includes: The node registration and on-chain module is used to register data holding institutions as independent nodes of the system, generate registration information based on the independent nodes and their local datasets, and store the registration information on the blockchain. The encrypted training aggregation module is used to perform homomorphic encryption on the local dataset by each independent node, train the initial model and calculate the model gradient based on the encrypted local dataset, encrypt the model gradient and upload it to the system, aggregate all encrypted gradients through a secure aggregation protocol and decrypt them to generate aggregated gradients, update the initial model based on the aggregated gradients, and generate a global model. The result storage and authorization module is used to perform hash operations on the global model, generate a summary result, and store the summary result in the blockchain. The access permissions of the global model are controlled through the result summary and smart contracts. The shared log on-chain module is used to authorize users to call the global model for secure data sharing based on the access permissions, and to store the data sharing information in the audit log and write the audit log to the blockchain.
9. A computer device, characterized in that, The computer device includes a memory, a processor, and a data security sharing program based on a distributed architecture stored on the memory and executable on the processor. When executed by the processor, the data security sharing program based on a distributed architecture implements the steps of the data security sharing method based on a distributed architecture as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The storage medium stores a data security sharing program based on a distributed architecture, which, when executed by a processor, implements the steps of the data security sharing method based on a distributed architecture as described in any one of claims 1-7.