A method and system for collaborative sharing of credit information data
By using blockchain and encryption algorithms to protect data privacy in the credit data sharing system, and combining federated learning to ensure the authenticity of model parameters, the problems of data security and model authenticity in credit data sharing are solved, thereby improving the model training effect and detection accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-31
- Publication Date
- 2026-03-13
- Estimated Expiration
- Not applicable · inactive patent
Smart Images

Figure CN121037140B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method and system for collaborative sharing of credit information. Background Technology
[0002] With the development of fintech, the collection and sharing of credit data has become increasingly important, especially in the financial industry where it is widely used for credit assessment, risk management, and loan decisions. However, the sharing and use of credit data currently faces many challenges, primarily including data privacy protection, data security, the credibility of data sharing, and difficulties in cooperation between different financial institutions. These issues hinder the efficient flow of credit data, thereby affecting the accuracy and fairness of credit assessment.
[0003] With the development of artificial intelligence and machine learning technologies, federated learning has become an ideal solution to ensure data privacy and promote collaboration among different financial institutions. Federated learning allows multiple participants to jointly train models without storing data centrally, achieving cross-institutional collaborative training through local model training, parameter exchange, and aggregation.
[0004] However, although the data itself is not directly shared in federated learning, model updates (such as local gradients and parameters) can still leak information about the data. Especially with a large number of participants, ensuring data privacy and model security remains a significant challenge. Furthermore, it is difficult to guarantee that the shared model parameters are truly reliable, leading to poor model training performance and impacting the model's detection accuracy. Summary of the Invention
[0005] In view of the shortcomings of the prior art, the purpose of this invention is to provide a method and system for collaborative sharing of credit data, which can solve the technical problems of existing technologies where model updates (such as local gradients and parameters) may still leak information about the data, making it difficult to guarantee data privacy and model security. At the same time, it is also difficult to guarantee that the shared model parameters are real and reliable, resulting in poor model training effect and affecting the detection accuracy of the model.
[0006] A first aspect of this invention proposes a method for collaborative sharing of credit information data, comprising:
[0007] S1: Using credit data providers as participant nodes and global model managers as coordinator nodes, configure permission control contracts and credit verification contracts to build the basic blockchain framework.
[0008] S2: The participant node encrypts and stores the local credit data in a local database;
[0009] S3: The participant node trains the local model using the local credit data and sends the local model parameters and loss function values to the coordinator node;
[0010] S4: The coordinator node trains the global model based on the aggregation result of the local model, and broadcasts the global model parameters to each participant node so as to continue training the local model using the global model parameters;
[0011] S5: Upload the global model parameters of the finally trained global model to the blockchain, and upload the model file to the InterPlanetary File System;
[0012] S6: When the participant node initiates a model sharing request, the legality of the model sharing request is verified through the permission control contract; when the verification is successful, the participant node is allowed to obtain the global model parameters from the blockchain, download the model file from the interplanetary file system, perform detection locally using the global model, and upload the detection results to the blockchain.
[0013] A second aspect of this invention provides a credit data collaborative sharing system, comprising: a processor and a memory;
[0014] The memory stores programs or instructions that can run on the processor, which, when executed by the processor, implement the steps of the credit data collaborative sharing method as described in the first aspect.
[0015] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following:
[0016] (1) In this embodiment of the invention, blockchain is used to ensure the immutability of data and model parameters, and smart contracts are used for permission control and credit verification, thereby enhancing the privacy protection of data and the security of the model.
[0017] (2) In this embodiment of the invention, model parameter updates and sharing are recorded on the blockchain, which realizes the transparency and traceability of the model training process. Each participant can verify the authenticity and source of the model parameters, which can ensure that the shared model parameters are real and credible, enhance the training effect of the model, and improve the detection accuracy of the model. Attached Figure Description
[0018] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts. Obviously, the drawings described below are merely some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings without any creative effort.
[0019] Figure 1 This is a flowchart illustrating a credit data collaborative sharing method provided in an embodiment of the present invention.
[0020] Figure 2 This is a schematic diagram of the structure of a credit data collaborative sharing system provided in an embodiment of the present invention. Detailed Implementation
[0021] To enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. It should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0022] The credit data collaborative sharing method provided by the present invention will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.
[0023] Reference manual attached Figure 1 The diagram shows a flowchart of a credit data collaborative sharing method provided by an embodiment of the present invention.
[0024] This invention provides a method for collaborative sharing of credit information, which may include the following steps:
[0025] S1: Using credit data providers as participant nodes and global model managers as coordinator nodes, configure permission control contracts and credit verification contracts to build the basic blockchain framework.
[0026] Among them, the access control contract is used to manage the node's operating permissions.
[0027] Optionally, the access control contract defines a UserFuncAuthority mapping table, where the key is the user address plus the operation name, and the value is the permission identifier.
[0028] Among them, the credit verification contract is used to verify the authenticity of the test results.
[0029] S2: Participant nodes encrypt and store local credit data in their local database.
[0030] In one possible implementation, S2 specifically includes sub-steps S201 and S202:
[0031] S201: Participant nodes encrypt local credit data using the AES-256 algorithm and store it in their local database.
[0032] Local credit data includes user identity information, income records, loan records, and default history.
[0033] AES-256 (Advanced Encryption Standard, 256-bit key) is a symmetric encryption algorithm widely used to protect data confidentiality. In AES-256, a 256-bit key is used to encrypt and decrypt data, ensuring its confidentiality and integrity.
[0034] S202: Store the summary information of local credit data in the blockchain.
[0035] The summary information includes metadata and hash values.
[0036] In this embodiment of the invention, by encrypting and storing local credit data in a local database and storing its summary information (including metadata and hash values) in a blockchain, the privacy and integrity of the data can be effectively ensured. The AES-256 algorithm provides strong encryption protection to prevent sensitive data from being leaked or tampered with, while the immutability of the blockchain ensures the reliability and traceability of the data. In this way, transparent data verification can be achieved while protecting user privacy, improving the security of data storage and sharing, and enhancing trust among all parties.
[0037] This invention employs federated learning for the collaborative sharing of credit data. Federated learning is a distributed machine learning technique that allows multiple participants to collaboratively train a shared global model while protecting data privacy. Each participant only needs to train the model locally and send the model parameters to a central server for aggregation, without exchanging raw data. This method reduces the risk of data leakage and is suitable for scenarios involving sensitive data, such as the financial and healthcare industries.
[0038] S3: Participant nodes train their local models using local credit data and send the local model parameters and loss function values to the coordinator node.
[0039] It should be noted that the local model and global model mentioned in this invention can be a model for credit scoring, a model for default prediction, a model for repayment ability prediction, or a model for anti-fraud detection, etc. This invention does not limit the specific detection function of the model.
[0040] In one possible implementation, S3 specifically includes sub-steps S301 to S307:
[0041] S301: Participant nodes obtain global model parameters from the blockchain.
[0042] It's important to note that retrieving global model parameters from the blockchain ensures that participating nodes are using the latest, trusted, and verified global model. This method leverages the transparency and immutability of the blockchain to guarantee that the model parameters obtained by participants are valid and tamper-proof, enhancing the trust and consistency of the model training process.
[0043] S302: Calculate the importance factors of each model parameter based on the global loss function of the global model:
[0044]
[0045] in, c i Indicates the first i Importance factors of each model parameter L global This represents the global loss function during global model training. i i Indicates the first i Each model parameter This represents partial derivative operations.
[0046] It should be noted that by calculating the importance factors (i.e., gradients) of each model parameter, the parameters that have the greatest impact on the global loss function can be effectively identified, thus providing guidance for subsequent optimization.
[0047] It should be further explained that the local model and the global model have the same number of model parameters, only the specific values of the model parameters differ.
[0048] S303: During local training, the parameters of each model are aggregated and optimized based on importance factors to construct a local loss function.
[0049]
[0050] in, L local Represents the local loss function. L MSE This represents the mean squared error loss function. l 1 indicates the local regularization parameter. Represents the first in the global model i Each model parameter Indicates the first in the local model i Each model parameter n This indicates the total number of model parameters.
[0051] Those skilled in the art can set the size of the local regularization parameter according to the actual situation, and the present invention does not impose any limitations.
[0052] It should be emphasized that the introduction of importance factors and regularization terms is one of the key innovations that distinguishes this invention from other federated learning methods.
[0053] It's important to note that by introducing an importance factor to optimize individual model parameters during local training, and combining this with the mean squared error loss function and regularization, a local loss function can be constructed that effectively aligns the training of the local model with the target of the global model. Through weighted optimization, local parameters that significantly influence the global model receive more attention, promoting a closer approximation of the global model's parameter distribution. Simultaneously, the introduction of regularization prevents overfitting and enhances the model's generalization ability. This approach improves the efficiency and accuracy of local training, ensuring that the local model can quickly and effectively integrate with the global model, ultimately improving the performance of the global model.
[0054] Furthermore, by introducing an importance factor into the regularization term, the model pays more attention to parameters that have a greater impact on the global model optimization during training. This method can adjust the regularization weights based on the sensitivity of each model parameter to the global loss function (i.e., the importance factor), which helps to optimize the model more efficiently and accurately, ensure that key parameters are trained sufficiently, prevent model overfitting, and improve the model's performance and generalization ability.
[0055] S304: Utilize local credit data, employ a local loss function, perform iterative training of the local model, and update the local model parameters using gradient descent.
[0056]
[0057] in, Indicates the first t Local model parameters at +1 iteration Indicates the first t Local model parameters in the next iteration or 1 represents the local training learning rate.
[0058] Gradient descent is an optimization algorithm used to find local minima of a function and is widely used in model training in machine learning. By calculating the gradient of the loss function (i.e., the partial derivative of the function) and adjusting the model parameters according to the direction of the gradient, the loss function gradually decreases. Through backpropagation and gradual parameter adjustment, gradient descent helps the model converge quickly to a local optimum, making it a commonly used and efficient optimization algorithm in machine learning, ensuring the stability and efficiency of the training process.
[0059] S305: After training is complete, calculate the loss function value of the local model.
[0060] S306: Use homomorphic encryption algorithm to encrypt local model parameters and loss function values, where the encryption public key is pre-distributed by the coordinator node.
[0061] Homomorphic encryption is a type of encryption technique that allows specific computations to be performed on encrypted data without decryption. In homomorphic encryption, the computation process remains encrypted, ensuring data privacy. The computation result is also encrypted and can only be obtained after decryption. This enables computations in cloud computing and distributed environments without exposing the original data, making it widely used in privacy-preserving computing and secure data analysis.
[0062] It's important to note that using homomorphic encryption algorithms to encrypt local model parameters and loss function values ensures data privacy throughout the entire process. Even if accessed by a third party during data transmission or storage, the data remains encrypted and cannot be directly read or tampered with. This significantly enhances system security and ensures the protection of sensitive information.
[0063] S307: Send the encrypted local model parameters and loss function values to the coordinator node.
[0064] S4: The coordinator node trains the global model based on the aggregation results of the local model and broadcasts the global model parameters to each participant node so that the local model can continue to be trained using the global model parameters.
[0065] In one possible implementation, S4 specifically includes sub-steps S401 to S404:
[0066] S401: The coordinator node collects the local model parameters and loss function values of all participant nodes.
[0067] S402: During global training, with the goal of reducing the loss function of the local model of each participant node and improving the effectiveness of collaboration among participant nodes, a global loss function is constructed based on homomorphic encryption properties:
[0068]
[0069]
[0070] in, L global This represents the global loss function during global model training. L i Indicates the first i The loss function of the local model for each participant node. l 2 represents the global regularization parameter. A i Indicates the first i Local model parameters of each participant node A j Indicates the first j Local model parameters of each participant node m This represents the total number of participant nodes. Y This represents a function for evaluating the effectiveness of collaboration. Indicates the first i The participant node and the first j Euclidean distance between the local model parameters of each participant node e Represents the natural constant. s This represents the sensitivity parameter for similarity measurement.
[0071] Those skilled in the art can set the size of the global regularization parameter according to the actual situation, and this invention does not impose any limitations.
[0072] It should be emphasized that the introduction of collaborative effectiveness is one of the key innovative features that distinguishes this invention from other federated learning methods.
[0073] It's important to note that constructing a global loss function and considering the collaborative effectiveness of model parameters among participants allows for a balance between local loss and collaboration among participants when optimizing the global model. Introducing a collaboration effectiveness evaluation function and a similarity metric ensures that models from different participants maintain consistency during collaboration, reducing unnecessary training discrepancies and thus improving model aggregation and collaboration efficiency. The use of homomorphic encryption also ensures data privacy is protected when participants share model parameters.
[0074] S403: Update the global model parameters using gradient descent based on the global loss function.
[0075]
[0076] in, Indicates the first t Global model parameters at +1 iteration Indicates the first tGlobal model parameters at the next iteration or 2 represents the global training learning rate.
[0077] S404: Broadcast the global model parameters to each participant node and store the global model parameters in the blockchain.
[0078] It's important to note that broadcasting the trained global model parameters to all participant nodes and storing them in the blockchain ensures the transparency and immutability of model sharing. The introduction of blockchain makes the update process of global model parameters traceable and secure, preventing tampering or malicious modification of model parameters, while ensuring that participants can share the latest model data, thereby improving the system's credibility and collaborative effectiveness.
[0079] S5: Upload the global model parameters of the finally trained global model to the blockchain, and upload the model file to the InterPlanetary File System.
[0080] The InterPlanetary File System (IPFS) is a decentralized, distributed file storage system designed to achieve more efficient, reliable, and persistent file storage and sharing. Unlike the traditional HTTP protocol, IPFS uses content addressing and P2P (peer-to-peer) technology to allow users to store files distributed across the network, rather than relying on a single server.
[0081] In this embodiment of the invention, the final trained global model parameters are uploaded to the blockchain, and the model file is uploaded to the InterPlanetary File System (IPFS), ensuring the model's security, transparency, and traceability. Using blockchain to guarantee the immutability of data and model parameters, and employing smart contracts for access control and credit verification, enhances data privacy and model security. Model parameter updates and sharing are recorded on the blockchain, achieving transparency and traceability in the model training process. Each participant can verify the authenticity and source of the model parameters, ensuring that the shared model parameters are genuine and reliable, thus enhancing the model's training effect and improving its detection accuracy.
[0082] S6: When a participant node initiates a model sharing request, the validity of the request is verified through an access control contract. Upon successful verification, the participant node is allowed to retrieve global model parameters from the blockchain, download the model file from the InterPlanetary File System, perform local testing using the global model, and upload the test results to the blockchain.
[0083] In one possible implementation, S6 specifically includes sub-steps S601 to S606:
[0084] S601: A participant node initiates a model sharing request, which contains the address of the participant node.
[0085] S602: Combine the requester's address with the operation name to form a key, and query the UserFuncAuthority mapping table.
[0086] S603: If the mapping value is 1, it indicates that authorization has been granted, and the authentication is successful. Otherwise, the request is rejected.
[0087] S604: Upon successful verification, participant nodes are allowed to retrieve global model parameters from the blockchain and download model files from the InterPlanetary File System.
[0088] S605: Use hash values to verify the integrity of the model files for the global model.
[0089] It should be noted that verifying the integrity of the model file using hash values ensures that the downloaded model file has not been tampered with or corrupted, increasing the reliability and trustworthiness of the detection results. This verification step guarantees the integrity of the model, ensuring that the model file remains unchanged during transmission.
[0090] S606: When the integrity verification passes, the participant node performs the detection locally through the global model.
[0091] In this embodiment of the invention, by introducing an access control contract to verify the legitimacy of a model sharing request, it can be ensured that only authorized nodes can access and use the global model, preventing unauthorized access and abuse. This mechanism ensures the security and compliance of data and models while maintaining the transparency and controllability of the system. Allowing verified nodes to obtain global model parameters from the blockchain and download model files from the InterPlanetary File System ensures data integrity, immutability, and durability. Nodes perform local checks and upload the results to the blockchain, further guaranteeing the transparency of operations and the traceability of results, thereby enhancing trust and collaboration efficiency.
[0092] In one possible implementation, the credit data collaborative sharing method further includes:
[0093] S7: When a user presents the detection result to a participant node, a zero-knowledge proof is generated. The participant node verifies the correctness of the zero-knowledge proof through a credit verification contract. If the verification passes, the detection result is returned as valid. Otherwise, the detection result is returned as invalid.
[0094] Zero-Knowledge Proof (ZKP) is a cryptographic protocol that allows one party (the prover) to prove to another party (the verifier) that a statement is true without providing any additional information about the statement. In other words, the verifier can be certain of the truth of a fact solely based on the prover's "proof," without obtaining any sensitive information. Zero-knowledge proofs are widely used in identity authentication, blockchain, and privacy protection.
[0095] It should be noted that the scenario here could be that a user uses a global model to perform detection at a certain financial institution (participant node) and obtains the detection result. When the user presents this detection result to other financial institutions (participant nodes), it is necessary to verify the validity of the detection result.
[0096] In this embodiment of the invention, the validity of the detection results is verified using zero-knowledge proofs (ZKP), ensuring both data privacy and the authenticity of the results. When presenting the detection results to other financial institutions, users do not need to disclose sensitive information; they only need to provide zero-knowledge proofs to assure the verifier of the accuracy of the results. This approach not only protects user privacy and prevents data leakage but also ensures the security and efficiency of the verification process. Furthermore, using credit verification contracts for verification further ensures the legality and validity of the zero-knowledge proofs, thereby enhancing the transparency and trustworthiness of the system and improving the efficiency of cross-institutional collaboration.
[0097] In one possible implementation, S7 specifically includes sub-steps S701 to S708:
[0098] S701: When a user displays the detection results to a participant node, aggregate the detection result data of each user in the current time period:
[0099]
[0100] in, d i Indicates the first i Individual user's test results data , n This indicates the total number of users awaiting verification.
[0101] S702: Calculate the hash value of each detection result data:
[0102]
[0103] in, h i Indicates the first i The hash value of the detection result data for each user. H This represents a hash function.
[0104] It's important to note that calculating the hash value of each detection result provides a unique identifier, ensuring accurate matching of each user's detection results in subsequent processes. This step guarantees data integrity, preventing any alteration or tampering during transmission or processing.
[0105] S703: Based on the hash values of each detection result data, use the zk-SNARK zero-knowledge concise non-interactive proof algorithm to generate zero-knowledge proofs for the detection result data:
[0106]
[0107]
[0108]
[0109] in, Indicates the first i Zero-knowledge proof of individual user's test result data. P This indicates the proof generating function. S p Indicates the proof key. x i Indicates the first i The common input for each user is the hash path of the detection result data. The hash path is used to prove whether the data is in the Merkle tree. w i Indicates the first i Each user has a private witness, which contains part or all of the hash path. This private witness is crucial data for proving the validity of the public input. It ensures zero-knowledge proof; the prover uses the private witness to generate the proof, but the verifier has no access to this private information. This indicates a join operation.
[0110] zk-SNARK (Zero-Knowledge Succinct Non-Interactive Argument of Knowledge) is an efficient zero-knowledge proof algorithm that allows provers to demonstrate the truth of a statement to verifiers without interaction. The "simplicity" of zk-SNARK means that the generated proofs are very small and the verification process is fast, making it suitable for transaction verification in blockchain technology. zk-SNARK is a relatively mature algorithm, and this invention will not elaborate further. The key to this invention lies in using the zero-knowledge proofs of zk-SNARK for aggregation.
[0111] It should be noted that using zk-SNARK to generate zero-knowledge proofs can prove the correctness of detection results without exposing sensitive user data. This proof method enhances data privacy protection by using zero-knowledge verification without revealing any additional information, while ensuring the efficiency and security of the verification process. It is suitable for privacy protection and blockchain scenarios.
[0112] S704: Determine if the aggregate difficulty coefficient of the current zero-knowledge proof is less than the preset difficulty coefficient. If yes, proceed to S705. Otherwise, proceed to S708.
[0113] Optionally, the aggregation difficulty coefficient is calculated by weighted summation of the total number of users to be verified and the hash path depth.
[0114] It's important to note that as the number of users verifying data increases, the amount of data the system needs to process and verify also increases, thus increasing the complexity of the verification process. The more users, the greater the computational resources required for the aggregation process. Hash path depth refers to the number of layers in the hash chain used to verify data in zero-knowledge proofs. A deeper path requires more time and resources for computation because more computational steps are needed to verify the integrity and consistency of the data. Weighted summation combines these two factors, adjusting their impact on the aggregation difficulty coefficient to arrive at a comprehensive difficulty assessment value that reflects the overall complexity of the verification process.
[0115] It should be noted that by judging the aggregation difficulty coefficient, the system can intelligently choose whether to perform recursive aggregation. This mechanism ensures that the system automatically adjusts the verification complexity according to the actual situation, avoiding unnecessary calculations and improving system efficiency.
[0116] S705: Employs a recursive aggregation algorithm to aggregate zero-knowledge proofs from various users, forming an aggregated zero-knowledge proof.
[0117]
[0118]
[0119]
[0120] in, Indicates will n Aggregated zero-knowledge proofs formed by aggregating zero-knowledge proofs from individual users xr n This represents the common input obtained by combining the hash value of the previous user and the hash value of the current user. wr n This represents a private witness in the recursive process, including the current user's zero-knowledge proof and the previous user's zero-knowledge proof.
[0121] It's important to note that the recursive aggregation algorithm starts with the first user, calculating that user's public input and private witness. As each new user joins, the public input and private witness are updated. Each new user's zero-knowledge proof is linked to the previous user's public input via a hash function, and that user's zero-knowledge proof is also added to the private witness. Ultimately, all users' zero-knowledge proofs are merged into a single aggregated zero-knowledge proof.
[0122] One of the core inventive points of this invention is the use of aggregated zero-knowledge proofs for unified verification. The recursive aggregation algorithm can merge multiple zero-knowledge proofs into a single aggregated proof, reducing the amount of data that needs to be processed during verification and thus improving verification efficiency. Through recursive aggregation, redundant data is further reduced while maintaining the integrity of the verification process.
[0123] S706: Verify the correctness of aggregated zero-knowledge proofs in one go through a credit verification contract.
[0124] Specifically, firstly, the credit verification contract embeds a zero-knowledge proof verification algorithm, which is used to validate public inputs (such as hash paths) and private witnesses to ensure they are consistent with each user's original data. By verifying the integrity of the hash value and the legality of the private witness, the contract can confirm the validity of the proof.
[0125] S707: Determine if the aggregated zero-knowledge proof has passed verification. If yes, return a conclusion that all users' detection results are valid. Otherwise, proceed to S708.
[0126] It's important to note that by determining whether the aggregated zero-knowledge proof passes verification, the system can decide whether to accept the test results from all users. If the verification passes, the validity of all data is ensured. If the verification fails, further individual verification steps are initiated. This decision-making process enhances the accuracy and reliability of data processing.
[0127] In this embodiment of the invention, the aggregation of zero-knowledge proofs for verification eliminates the need for the credit verification contract to verify each user's zero-knowledge proof individually. Instead, it verifies the aggregated proofs all at once, thereby improving efficiency and reducing computational resource consumption. Upon successful verification, the contract returns "valid"; otherwise, it returns "invalid," ensuring the system's transparency, security, and efficiency.
[0128] S708: Verify the zero-knowledge proof of each user one by one through the credit verification contract. If the verification passes, return a valid result. Otherwise, return an invalid result.
[0129] It's important to note that verifying zero-knowledge proofs individually ensures that each user's test results can be verified independently, preventing errors in the overall result due to failed aggregate verification. This approach allows for more thorough investigation when final verification fails, ensuring the accuracy and legitimacy of the test results.
[0130] Reference manual attached Figure 2 The diagram shows a structural schematic of a credit data collaborative sharing system provided by an embodiment of the present invention.
[0131] This invention provides a credit data collaborative sharing system 20, including: a processor 201 and a memory 202;
[0132] The memory 202 stores programs or instructions that can run on the processor 201. When the program or instructions are executed by the processor 201, they implement the steps of the above-mentioned credit data collaborative sharing method and achieve the same technical effect. To avoid repetition, the present invention will not elaborate further.
[0133] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention, and are not intended 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. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the protection scope of the present invention.
Claims
1. A method for collaborative sharing of credit information, characterized in that, include: S1: Using credit data providers as participant nodes and global model managers as coordinator nodes, configure permission control contracts and credit verification contracts to build the basic blockchain framework. S2: The participant node encrypts and stores the local credit data in a local database; S3: The participant node trains the local model using the local credit data, and sends the local model parameters and loss function values to the coordinator node after encrypting them using a homomorphic encryption algorithm; S4: The coordinator node trains the global model based on the aggregation result of the local model, and broadcasts the global model parameters to each participant node so as to continue training the local model using the global model parameters; S5: Upload the global model parameters of the finally trained global model to the blockchain, and upload the model file to the InterPlanetary File System; S6: When the participant node initiates a model sharing request, the legality of the model sharing request is verified through the permission control contract; when the verification is successful, the participant node is allowed to obtain the global model parameters from the blockchain, download the model file from the interplanetary file system, perform detection locally using the global model, and upload the detection results to the blockchain; Specifically, S4 includes: S401: The coordinator node collects the local model parameters and loss function values of all the participant nodes; S402: During global training, with the goal of reducing the loss function of the local model of each participant node and improving the cooperation effectiveness among the participant nodes, a global loss function is constructed based on homomorphic encryption properties: in, L global This represents the global loss function during global model training. L i Indicates the first i The loss function of the local model for each participant node. λ 2 represents the global regularization parameter. A i Indicates the first i Local model parameters of each participant node A j Indicates the first j Local model parameters of each participant node m This represents the total number of participant nodes. Y This represents a function for evaluating the effectiveness of collaboration. Indicates the first i The participant node and the first j Euclidean distance between the local model parameters of each participant node e Represents the natural constant. σ This represents the sensitivity parameter for similarity measurement; S403: Update the global model parameters using gradient descent based on the global loss function; S404: Broadcast the global model parameters to each participant node and store the global model parameters in the blockchain.
2. The credit data collaborative sharing method according to claim 1, characterized in that, The permission control contract defines a UserFuncAuthority mapping table. The key in the UserFuncAuthority mapping table is the user address plus the operation name, and the value is the permission identifier, which is used to manage the operation permissions of nodes.
3. The credit data collaborative sharing method according to claim 1, characterized in that, S2 specifically includes: S201: The participating node encrypts the local credit data using the AES-256 algorithm and stores it in the local database. The local credit data includes user identity information, income records, loan records, and default history. S202: Store the summary information of the local credit data in the blockchain. The summary information includes metadata and hash value.
4. The credit data collaborative sharing method according to claim 1, characterized in that, S3 specifically includes: S301: The participant node obtains the global model parameters from the blockchain; S302: Calculate the importance factor of each model parameter based on the global loss function of the global model; S303: During local training, the model parameters are aggregated and optimized according to the importance factors to construct a local loss function; S304: Using the local credit data, the local model is iteratively trained using the local loss function, and the local model parameters are updated using gradient descent. S305: After training is complete, calculate the loss function value of the local model; S306: The local model parameters and the loss function value are encrypted using a homomorphic encryption algorithm, wherein the encryption public key is pre-distributed by the coordinator node; S307: Send the encrypted local model parameters and loss function values to the coordinator node.
5. The credit data collaborative sharing method according to claim 2, characterized in that, S6 specifically includes: S601: The participant node initiates the model sharing request, and the model sharing request contains the address of the participant node; S602: Combine the requester's address with the operation name to form a key, and query the UserFuncAuthority mapping table; S603: If the mapping value is 1, it indicates that authorization has been granted, and the verification is successful; otherwise, the request is rejected. S604: Upon successful verification, participant nodes are allowed to obtain the global model parameters from the blockchain and download the model file from the InterPlanetary File System; S605: Verify the integrity of the model file of the global model using a hash value; S606: When the integrity verification passes, the participant node performs the detection locally through the global model.
6. The credit data collaborative sharing method according to claim 1, characterized in that, Also includes: S7: When the user shows the detection result to the participant node, a zero-knowledge proof is generated, and the participant node verifies the correctness of the zero-knowledge proof through the credit verification contract; If the verification passes, the test result is returned as valid; otherwise, the test result is returned as invalid.
7. The credit data collaborative sharing method according to claim 6, characterized in that, Specifically, S7 includes: S701: When a user displays the detection results to the participant node, aggregate the detection result data of each user in the current time period; S702: Calculate the hash value of each of the detection result data; S703: Based on the hash value of each of the detection result data, use the zk-SNARK zero-knowledge concise non-interactive proof algorithm to generate a zero-knowledge proof of the detection result data; S704: Determine whether the aggregation difficulty coefficient of the current zero-knowledge proof is less than the preset difficulty coefficient; if yes, proceed to S705; otherwise, proceed to S708. S705: Employs a recursive aggregation algorithm to aggregate the zero-knowledge proofs from each user, forming an aggregated zero-knowledge proof; S706: The correctness of the aggregated zero-knowledge proof is verified in one go through the credit verification contract; S707: Determine whether the aggregated zero-knowledge proof has passed verification; if yes, return the conclusion that the detection results of all users are valid; otherwise, proceed to S708; S708: Verify the zero-knowledge proof of each user one by one through the credit verification contract; if the verification passes, return a valid test result; otherwise, return an invalid test result.
8. The method for collaborative sharing of credit information data according to claim 7, characterized in that, The aggregation difficulty coefficient is calculated by weighted summation of the total number of users to be verified and the hash path depth.
9. A credit data collaborative sharing system, characterized in that, include: processor; A memory storing computer-readable instructions, which, when executed by the processor, implement the credit data collaborative sharing method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Machine learning model training method, device and system, equipment and storage medium
CN112257873A
Method for solving data imbalance problem in federated learning based on second derivative
CN113691594A
Determination method of risk prediction model, central server and related equipment
CN115271471A
Decentralized digital identity verification method and device, equipment, storage medium and program product
CN120223317A
Computing node selection method and device and storage medium
CN120528814A