Block chain data sharing and security verification method based on DID
Through the blockchain data sharing and security verification method based on DID, using technologies such as real-name DID and smart contracts, the problems of user private key management and complex multi-account management are solved, cross-chain data sharing and security verification are realized, and cross-chain data sharing and security verification are improved. The integrity and user experience of data transmission.
Patent Information
- Application Number
- CN202411245864.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2024-12-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the existing blockchain data sharing method, user private key management is difficult, lack of effective supervision and complex multi-account management, resulting in increased data security risks and operational difficulties.
Using DID-based blockchain data sharing and security verification methods, the zero-knowledge proof of multi-factor identity authentication, secret sharing technology, private key shard storage, and deep learning model optimization through real-name DID, smart contracts and cross-chain communication protocols and cross-chain data sharing.
Simplifies the identity authentication and data operations of users on different blockchains, improves the integrity and confidentiality of data transmission, reduces the risks of private key management, realizes effective supervision and cross-chain data sharing, and improves the security of the system. Sex and user experience.
Smart Images

Figure CN119210800A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain data, and in particular to a DID-based blockchain data sharing and security verification method. Background Art
[0002] With the development of blockchain technology, data sharing and security verification methods have become important application directions in various industries. However, existing technologies still have many problems and challenges in data sharing and security verification.
[0003] First, in the existing blockchain-based data sharing methods, the difficulty of managing user private keys has always been a significant problem. The private key is the only credential for users to access blockchain data. Once lost or leaked, the user will be unable to access their own data, and may even cause security risks such as data theft. At present, some solutions use private key escrow, but this method requires a very high degree of trust in the custodian, and there is still a risk of private key theft or leakage.
[0004] Secondly, existing technologies lack effective regulatory mechanisms. Traditional blockchain system design is based on decentralization. Although it guarantees data transparency and immutability to a certain extent, it also brings about regulatory difficulties. Especially in areas involving sensitive data such as finance and medical care, how to achieve effective supervision while ensuring data privacy has become a problem that needs to be solved urgently.
[0005] Third, multi-account management is complex. Users may have multiple accounts on multiple blockchain platforms, each with different private and public keys. Managing these accounts is not only complex but also prone to errors. In addition, data interoperability between different blockchain platforms is poor, and the user's identity and data on one platform cannot be directly used on another platform, which increases the difficulty of data management and operation.
[0006] Based on the above-mentioned defects of the prior art, the present invention proposes a blockchain data sharing and security verification method based on DID. This method aims to solve the problems of difficult user private key management, lack of effective supervision and complex multi-account management. By utilizing advanced distributed identity identification DID and blockchain technology, combined with smart contracts and public-private key encryption mechanisms, data sharing and security verification can be achieved.
[0007] Therefore, how to provide a DID-based blockchain data sharing and security verification method is an urgent problem that technicians in this field need to solve. Summary of the invention
[0008] The present invention relates to a blockchain data sharing and security verification method based on DID, which aims to solve the problems of difficult user private key management, lack of effective supervision and complex multi-account management in the prior art. The method uses real-name DID, smart contracts and cross-chain communication protocols to achieve data sharing and security verification, and simplify the user's identity authentication and data operation processes on different blockchains.
[0009] The DID-based blockchain data sharing and security verification method according to an embodiment of the present invention includes the following steps:
[0010] S1. The user applies for a real-name DID that is officially certified and endorsed for the first time, generates a unique real-name DID string, and binds it to the user's biometric data and device fingerprint to achieve multi-factor identity authentication;
[0011] S2. Generate multiple sets of public and private key pairs during the real-name DID application process, use secret sharing technology to divide the private key into multiple fragments, and store these fragments in multiple nodes of the decentralized network;
[0012] S3. Use real-name DID as the only user account on the blockchain, and achieve data sharing and security verification through deep learning model optimization and adaptive zero-knowledge proof privacy authentication mechanism;
[0013] S4. When the user loses the private key, a new public-private key pair is regenerated through biometric verification, device fingerprint and real-name DID;
[0014] S5. Query the corresponding public key information on the blockchain based on the real-name DID string, use the public key to encrypt data and verify signatures, achieve the integrity and confidentiality of data transmission, and analyze and predict user behavior patterns by combining the on-chain federated learning model and distributed autonomous organizations;
[0015] S6. Through the real-name DID string and multi-factor authentication system, it is associated with the user's real identity information to achieve the regulatory requirements of front-end anonymity and back-end real-name;
[0016] S7. Use the same real-name DID as a user account on multiple blockchains, and manage identities and data on multiple chains through multi-signature technology;
[0017] S8. Use real-name DID and smart contracts to achieve cross-chain data sharing and security verification through inter-chain communication protocols.
[0018] Optionally, the S1 includes the following steps:
[0019] S11. The user submits an identity authentication request to the official certification authority through the device, including the user's basic identity information, device fingerprint and biometric data;
[0020] S12. The official certification body verifies the identity information submitted by the user, including comparing the user's biometric data and device fingerprint to confirm the uniqueness and authenticity of the user's identity;
[0021] S13. After the authentication is passed, the official authentication agency generates a unique real-name DID string, which is generated based on the user's identity information and device fingerprint using the hash algorithm H:
[0022] H(ID,DF,BF)=DID;
[0023] Where ID is the user's identity information, DF is the device fingerprint, BF is the biometric data, and DID is the generated real-name DID string;
[0024] S14. The generated real-name DID string is bound to the user’s identity information, device fingerprint, and biometric data, and stored in the database of the official certification authority;
[0025] S15. The user device receives the generated real-name DID string and stores it in the local device for subsequent identity authentication.
[0026] Optionally, S2 includes the following steps:
[0027] S21. When a user applies for a real-name DID, the system generates multiple sets of public and private key pairs, with the public key denoted as K pub , the private key is denoted as K pri ;
[0028] S22, use the secret sharing algorithm S to transfer the private key K pri Divide into multiple segments, denoted as K pri1 ,K pri2 ,…,K prik , satisfying K pri =S -1 (K pri1 ,K pri2 ,…,K prik ), where k is the threshold of secret sharing;
[0029] S23, the generated private key fragment K pri1 ,K pri2 ,…,K prik They are stored on different nodes of the decentralized network, with each node storing a private key fragment;
[0030] S24, public key K pub Associated with the user’s real-name DID string DID and stored on the blockchain for use in subsequent data encryption and verification processes;
[0031] S25, when the private key needs to be restored, the secret sharing algorithm S -1 Get the corresponding private key fragments from at least k nodes and reconstruct the complete private key K pri Used for data manipulation.
[0032] Optionally, S3 includes the following steps:
[0033] S31. Create a user account on the blockchain, using the real-name DID string DID as the unique identifier;
[0034] S32. Deploy a deep learning model based on generative adversarial networks and reinforcement learning to optimize the generation and verification process of zero-knowledge proofs. The model uses historical data H and real-time data D real Perform training to generate optimization strategy parameters P opt ;
[0035] S33. Generative adversarial network model training: The generative adversarial network consists of a generator G and a discriminator D. The generator G generates forged data samples G(z). The discriminator D is used to distinguish between real data H and forged data G(z). The training goal is to make the data generated by the generator G indistinguishable from the real data H:
[0036] The goals of the generator are:
[0037]
[0038] The goal of the discriminator is:
[0039]
[0040] Among them, L D represents the loss function of the generator, L D represents the loss function of the discriminator,
[0041] represents the expected value of the logarithmic probability of the real data, z is the random noise vector, p data (H) is the real data distribution, p z (z) is the noise distribution, represents the expected value of the log probability of the data generated by the generator;
[0042] S34. The deep learning model of reinforcement learning is used to dynamically adjust the parameters in the generative adversarial network model and define the parameters of the generative adversarial network model {P G ,P D} As the state space of the deep learning model, define the action A that adjusts the parameters of the generative adversarial network model, and define the reward function r based on the loss function of the generator and the discriminator t, optimize the parameters of the generator G and the discriminator D through the policy gradient algorithm:
[0043]
[0044] Among them, P is the model parameter, r t is the reward at time step t, γ is the discount factor;
[0045] S35. When the user submits data, the adaptive zero-knowledge proof mechanism is used to generate a zero-knowledge proof:
[0046] Convert user data Data and metadata Meta into a circuit constraint system, expressed as a set of polynomial constraints:
[0047]
[0048] Among them, Data and Meta are user data and their metadata, a ij are polynomial coefficients, Data i Indicates Data raised to the power of i, Meta j represents Meta raised to the jth power;
[0049] S36. Generate zero-knowledge proof π through polynomial calculation:
[0050]
[0051] π=(A,B,C)=(g a (s),g b (s),g c (s));
[0052] Among them, g is the generator, a(s), b(s), c(s) are polynomial functions;
[0053] S37. Generate optimization strategy parameters P through deep learning model opt , and optimize the generated proof, converting the initially generated proof π=(A,B,C) and the optimization strategy parameter P opt Combined into input vector X input , processed and transformed through multiple hidden layers and nonlinear activation function f:
[0054]
[0055] Among them, W i and b i Represent the weight matrix and bias vector of the i-th layer respectively;
[0056] Generate optimized zero-knowledge proof π opt :
[0057]
[0058] π opt =[A opt ,B opt ,C opt ]=W out ·H n +b out
[0059] Among them, A opt The optimized proof element corresponds to the optimized polynomial function a opt (s), B opt The optimized proof element corresponds to the optimized polynomial function b opt (s), C opt The optimized proof element corresponds to the optimized polynomial function c opt (s), W out and b out represents the weight matrix and bias vector of the output layer, a opt,i , b opt,i , b opt,i Represents the polynomial coefficient after deep learning model optimization, π opt is the optimized zero-knowledge proof, and π is the initially generated zero-knowledge proof;
[0060] The verification node uses the public key K pub And the optimized zero-knowledge proof π opt To verify:
[0061] e(A opt ,B opt )=e(g a (s),g b (s))=e(g,g) a(s)·b(s) ;
[0062] Where e represents a bilinear mapping;
[0063] S38. In the process of generating zero-knowledge proofs, generative adversarial networks and reinforcement learning optimization algorithms are applied to dynamically adjust proof generation parameters:
[0064] L joint =L GAN +L RL +β∑ k (L(H k ,P));
[0065]
[0066] Among them, L GAN represents the loss of the generative adversarial network, L RLrepresents the loss of reinforcement learning, L represents the loss of data, β is the weight parameter, γ and δ are adaptive parameters, and R(P) is the regularization term;
[0067] S39. The generated zero-knowledge proof Proof contains the data hash H(Data);
[0068] S310, the process of verifying zero-knowledge proof, through the verification node in the blockchain network using the strategy parameter P optimized by the deep learning model based on generative adversarial network and reinforcement learning opt To verify:
[0069]
[0070] Among them, Valid represents the verification result, K pub is the public key, P opt are the optimized strategy parameters;
[0071] S311. If the verification is successful, the data sharing request is accepted and the transaction data is recorded on the blockchain.
[0072] Optionally, S4 includes the following steps:
[0073] S41. When a user loses his private key, he shall first verify his identity through biometric verification, including at least two of fingerprint recognition, iris scanning or facial recognition;
[0074] S42, the user verifies the uniqueness of the device through device fingerprint verification, including device ID, MAC address and hardware characteristics;
[0075] S43. After passing the biometric and device fingerprint verification, the system uses a multi-signature mechanism to generate a new public-private key pair K pubnew ,K prinew ;
[0076] S44, the newly generated public key K pubnew Bind to the user’s real-name DID;
[0077] S45, using the improved secret sharing algorithm to send the new private key K prinew Divide into multiple fragments and store them in multiple decentralized nodes;
[0078] S46. Using a blockchain-based timestamp service to record the generation and binding of new public and private key pairs;
[0079] S47. Verify the new public-private key pair and use the blockchain node network for distributed verification.
[0080] Optionally, S5 includes the following steps:
[0081] S51. DID based on real-name DID string str Query the corresponding public key information K on the blockchain pub ;
[0082] S52. Use public key K pub Perform multi-level homomorphic encryption and multi-party computing encryption on the data, combined with a dynamic key management system:
[0083]
[0084] Where: E data represents the encrypted data, Data represents the original data to be encrypted, K pub represents the user's public key, α i represents the parameters used for homomorphic encryption, n represents the number of encryption layers, β j Indicates the parameters used for dynamic key management, m indicates the number of dynamic key management layers, DKM param Indicates dynamic key management parameters, Represents the XOR operation in bit operations;
[0085] S53. Use private key K pri Hybrid signature of encrypted data, combining threshold signature mechanism and improved secret sharing technology:
[0086]
[0087] Among them: MS sig Indicates the mixed signature result, E data Represents the encrypted data, K pri Represents the user's private key, H k represents the kth hash function, t represents the number of fragments in the threshold signature mechanism, γ l represents the weight parameter of secret sharing, s l represents the secret sharing fragment, s represents the total number of secret sharing fragments, Represents the XOR operation in bit operations;
[0088] S54, transmitting the encrypted data and the signature fragment together;
[0089] S55, the receiving end uses the public key K pub Verify the signature, combined with the threshold recovery mechanism:
[0090]
[0091]
[0092] Among them: VMS sig Indicates the signature verification result, E dataRepresents the encrypted data, K pri Represents the user's private key, H k represents the kth hash function, t represents the number of fragments in the threshold signature mechanism, γ l represents the weight parameter of secret sharing, s l represents the secret sharing fragment, s represents the total number of secret sharing fragments, Represents the XOR operation in bit operations;
[0093] S56, the receiving end uses the private key K pri Decrypt the encrypted data and combine it with advanced federated learning mechanism:
[0094]
[0095] Where: D data Indicates the decrypted data, E data Represents the encrypted data, K pri represents the user's private key, δ j Indicates the parameters used for decryption, p indicates the number of decryption layers, FL param represents high-level federated learning parameters, Indicates a specific decryption operation;
[0096] S57. Through the on-chain federated learning model FL model and Distributed Autonomous Organizations (DAOs) model Analyze and predict user behavior patterns and adopt privacy protection mechanisms:
[0097]
[0098] Where: P behavior Represents the prediction result of user behavior pattern, Represents the analysis result of the federated learning model on the kth data shard, represents the analysis result of the distributed autonomous organization on the lth data shard, θ k represents the weight parameter of federated learning, λ l represents the weight parameter of the distributed autonomous organization, m represents the total number of data shards of federated learning, and q represents the total number of data shards of the distributed autonomous organization.
[0099] Optionally, the S6 comprises the following steps:
[0100] S61. DID by real-name DID string str Perform preliminary identity verification with the multi-factor authentication system MFAS;
[0101] S62. The multi-factor authentication system includes the following factors: Biometric data B data 、Device fingerprint Edata and behavioral characteristics A data ;
[0102] S63. Generate an identity association identifier I based on the multi-factor identity authentication result. link ;
[0103] S64, through the identity association identification I link Query the user's real identity information;
[0104] S65. Record all operations during the query process and generate an operation log L ops ;
[0105] S66. Regulatory requirements for achieving front-end anonymity and back-end real-name authentication;
[0106] S67. Implement identity authentication and regulatory requirements through a distributed identity platform to optimize the security and compliance of the system.
[0107] Optionally, the S7 includes the following steps:
[0108] S71. Create the same real-name DID string on multiple blockchains str As a user account, generated through a distributed authentication protocol;
[0109] S72. Generate and manage public and private key pairs on multiple blockchains through a cross-chain communication protocol;
[0110] S73. Bind the public key to the real-name DID on each blockchain;
[0111] S74. Sign and verify transactions on multiple blockchains through a cross-chain communication protocol;
[0112] S75. Realize cross-chain sharing and verification of data between multiple blockchains;
[0113] S76. Use cross-chain communication protocols to coordinate identity and data management on multiple blockchains;
[0114] S77. Record cross-chain transactions and data sharing operations.
[0115] Optionally, the S8 includes the following steps:
[0116] S81. Use the real-name DID to initialize a cross-chain data sharing request on the source blockchain and generate a cross-chain data sharing request identifier R ID ;
[0117] S82. Create a data receiving identifier R on the target blockchain through a smart contract recv , and verify the cross-chain on the source blockchain;
[0118] S83, the source blockchain transmits data through the inter-chain communication protocol i Transfer to the target blockchain;
[0119] S84. The target blockchain receives and verifies the data i , confirm the integrity and authenticity of the data;
[0120] S85. Use smart contracts to perform data operations on the target blockchain;
[0121] S86, record data transmission and operation logs;
[0122] S87. Simplify user identity authentication and data operations on different blockchains.
[0123] The beneficial effects of the present invention are:
[0124] (1) The present invention generates a unique real-name DID string through multi-factor identity authentication, generates multiple sets of public-private key pairs during the application process, and uses secret sharing technology to store private key fragments in multiple nodes of a decentralized network. When a user loses his private key, a new public-private key pair can be regenerated through biometric verification, device fingerprint and real-name DID, keeping the real-name DID string unchanged, thereby solving the problem of difficult user private key management.
[0125] (2) The real-name DID feature of the present invention, "anonymous at the front end and real-name at the back end", meets both regulatory requirements and user privacy needs. The public security organs use the real-name DID string and multi-factor authentication system to link to the user's real identity information and achieve effective supervision. At the same time, users and platforms cannot directly find the corresponding personal information through the real-name DID string, which protects the privacy of users.
[0126] (3) The present invention uses the same real-name DID as the user account on multiple blockchains, manages identities and data on multiple chains through multi-signature technology, and realizes cross-chain and multi-chain integrated data management. By using smart contracts and cross-chain communication protocols, cross-chain data sharing and security verification are realized, simplifying the user's identity authentication and data operation process on different blockchains. This not only reduces the complexity of multi-account management, but also improves the convenience and efficiency of data sharing.
[0127] (4) The present invention combines the on-chain federated learning model with a distributed autonomous organization (DAO) to analyze and predict user behavior patterns, thereby improving the security and user experience of the system. Based on deep learning model optimization and adaptive zero-knowledge proof mechanism, the efficiency and reliability of data sharing and security verification are achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0128] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0129] Figure 1 This is a flow chart of the DID-based blockchain data sharing and security verification method proposed in the present invention;
[0130] Figure 2 The deep learning optimization and adaptive zero-knowledge proof privacy authentication flow chart proposed by the present invention;
[0131] Figure 3 This is a flow chart of the cross-chain data sharing based on real-name DID and multi-signature technology proposed in this invention. DETAILED DESCRIPTION
[0132] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.
[0133] refer to Figure 1-3 , a blockchain data sharing and security verification method based on DID includes the following steps:
[0134] S1. The user applies for a real-name DID that is officially certified and endorsed for the first time, generates a unique real-name DID string, and binds it to the user's biometric data and device fingerprint to achieve multi-factor identity authentication;
[0135] S2. Generate multiple sets of public and private key pairs during the real-name DID application process, use secret sharing technology to divide the private key into multiple fragments, and store these fragments in multiple nodes of the decentralized network;
[0136] S3. Use real-name DID as the only user account on the blockchain, and achieve data sharing and security verification through deep learning model optimization and adaptive zero-knowledge proof privacy authentication mechanism;
[0137] S4. When the user loses the private key, a new public-private key pair is regenerated through biometric verification, device fingerprint and real-name DID;
[0138] S5. Query the corresponding public key information on the blockchain based on the real-name DID string, use the public key to encrypt data and verify signatures, achieve the integrity and confidentiality of data transmission, and analyze and predict user behavior patterns by combining the on-chain federated learning model and distributed autonomous organizations;
[0139] S6. Through the real-name DID string and multi-factor authentication system, it is associated with the user's real identity information to achieve the regulatory requirements of front-end anonymity and back-end real-name;
[0140] S7. Use the same real-name DID as a user account on multiple blockchains, and manage identities and data on multiple chains through multi-signature technology;
[0141] S8. Use real-name DID and smart contracts to achieve cross-chain data sharing and security verification through inter-chain communication protocols.
[0142] In this implementation, S1 includes the following steps:
[0143] S11. The user submits an identity authentication request to the official certification authority through the device, including the user's basic identity information, device fingerprint and biometric data;
[0144] S12. The official certification body verifies the identity information submitted by the user, including comparing the user's biometric data and device fingerprint to confirm the uniqueness and authenticity of the user's identity;
[0145] S13. After the authentication is passed, the official authentication agency generates a unique real-name DID string, which is generated based on the user's identity information and device fingerprint using the hash algorithm H:
[0146] H(ID,DF,BF)=DID;
[0147] Where ID is the user's identity information, DF is the device fingerprint, BF is the biometric data, and DID is the generated real-name DID string;
[0148] S14. The generated real-name DID string is bound to the user’s identity information, device fingerprint, and biometric data, and stored in the database of the official certification authority;
[0149] S15. The user device receives the generated real-name DID string and stores it in the local device for subsequent identity authentication.
[0150] In this implementation, S2 includes the following steps:
[0151] S21. When a user applies for a real-name DID, the system generates multiple sets of public and private key pairs, with the public key denoted as K pub , the private key is denoted as K pri ;
[0152] S22, use the secret sharing algorithm S to transfer the private key K pri Divide into multiple segments, denoted as K pri1 ,K pri2 ,…,K prik , satisfying K pri =S -1 (K pri1 ,K pri2,…,K prik ), where k is the threshold of secret sharing;
[0153] S23, the generated private key fragment K pri1 ,K pri2 ,…,K prik They are stored on different nodes of the decentralized network, with each node storing a private key fragment;
[0154] S24, public key K pub Associated with the user’s real-name DID string DID and stored on the blockchain for use in subsequent data encryption and verification processes;
[0155] S25, when the private key needs to be restored, the secret sharing algorithm S -1 Get the corresponding private key fragments from at least k nodes and reconstruct the complete private key K pri Used for data manipulation.
[0156] In this implementation, S3 includes the following steps:
[0157] S31. Create a user account on the blockchain, using the real-name DID string DID as the unique identifier;
[0158] S32. Deploy a deep learning model based on generative adversarial networks and reinforcement learning to optimize the generation and verification process of zero-knowledge proofs. The model uses historical data H and real-time data D real Perform training to generate optimization strategy parameters P opt ;
[0159] S33. Generative adversarial network model training: The generative adversarial network consists of a generator G and a discriminator D. The generator G generates forged data samples G(z). The discriminator D is used to distinguish between real data H and forged data G(z). The training goal is to make the data generated by the generator G indistinguishable from the real data H:
[0160] The goals of the generator are:
[0161]
[0162] The goal of the discriminator is:
[0163]
[0164] Among them, L D represents the loss function of the generator, L D represents the loss function of the discriminator,
[0165] represents the expected value of the logarithmic probability of the real data, z is the random noise vector, pdata (H) is the real data distribution, p z (z) is the noise distribution, represents the expected value of the log probability of the data generated by the generator;
[0166] S34. The deep learning model of reinforcement learning is used to dynamically adjust the parameters in the generative adversarial network model and define the parameters of the generative adversarial network model {P G ,P D} As the state space of the deep learning model, define the action A that adjusts the parameters of the generative adversarial network model, and define the reward function r based on the loss function of the generator and the discriminator t , optimize the parameters of the generator G and the discriminator D through the policy gradient algorithm:
[0167]
[0168] Among them, P is the model parameter, r t is the reward at time step t, γ is the discount factor;
[0169] S35. When the user submits data, the adaptive zero-knowledge proof mechanism is used to generate a zero-knowledge proof:
[0170] Convert user data Data and metadata Meta into a circuit constraint system, expressed as a set of polynomial constraints:
[0171]
[0172] Among them, Data and Meta are user data and their metadata, a ij are polynomial coefficients, Data i Indicates Data raised to the power of i, Meta j represents Meta raised to the jth power;
[0173] S36. Generate zero-knowledge proof π through polynomial calculation:
[0174]
[0175] π=(A,B,C)=(g a (s),g b (s),g c (s));
[0176] Among them, g is the generator, a(s), b(s), c(s) are polynomial functions;
[0177] S37. Generate optimization strategy parameters P through deep learning model opt , and optimize the generated proof, converting the initially generated proof π=(A,B,C) and the optimization strategy parameter Popt Combined into input vector X input , processed and transformed through multiple hidden layers and nonlinear activation function f:
[0178]
[0179] Among them, W i and b i Represent the weight matrix and bias vector of the i-th layer respectively;
[0180] Generate optimized zero-knowledge proof π opt :
[0181]
[0182] π opt =[A opt ,B opt ,C opt ]=W out ·H n +b out
[0183] Among them, A opt The optimized proof element corresponds to the optimized polynomial function a opt (s), B opt The optimized proof element corresponds to the optimized polynomial function b opt (s), C opt The optimized proof element corresponds to the optimized polynomial function c opt (s), W out and b out represents the weight matrix and bias vector of the output layer, a opt,i , b opt,i , b opt,i Represents the polynomial coefficient after deep learning model optimization, π opt is the optimized zero-knowledge proof, and π is the initially generated zero-knowledge proof;
[0184] The verification node uses the public key K pub And the optimized zero-knowledge proof π opt To verify:
[0185] e(A opt ,B opt )=e(g a (s),g b (s))=e(g,g) a(s)·b(s) ;
[0186] Where e represents a bilinear mapping;
[0187] S38. In the process of generating zero-knowledge proofs, generative adversarial networks and reinforcement learning optimization algorithms are applied to dynamically adjust proof generation parameters:
[0188] L joint =L GAN +L RL +β∑ k (L(H k ,P));
[0189]
[0190] Among them, L GAN represents the loss of the generative adversarial network, L RL represents the loss of reinforcement learning, L represents the loss of data, β is the weight parameter, γ and δ are adaptive parameters, and R(P) is the regularization term;
[0191] S39. The generated zero-knowledge proof Proof contains the data hash H(Data);
[0192] S310, the process of verifying zero-knowledge proof, through the verification node in the blockchain network using the strategy parameter P optimized by the deep learning model based on generative adversarial network and reinforcement learning opt To verify:
[0193]
[0194] Among them, Valid represents the verification result, K pub is the public key, P opt are the optimized strategy parameters;
[0195] S311. If the verification is successful, the data sharing request is accepted and the transaction data is recorded on the blockchain.
[0196] In this implementation, S4 includes the following steps:
[0197] S41. When a user loses his private key, he shall first verify his identity through biometric verification, including at least two of fingerprint recognition, iris scanning or facial recognition;
[0198] S42, the user verifies the uniqueness of the device through device fingerprint verification, including device ID, MAC address and hardware characteristics;
[0199] S43. After passing the biometric and device fingerprint verification, the system uses a multi-signature mechanism to generate a new public-private key pair K pubnew ,K prinew ;
[0200] S44, the newly generated public key K pubnew Bind to the user’s real-name DID;
[0201] S45, using the improved secret sharing algorithm to send the new private key K prinew Divide into multiple fragments and store them in multiple decentralized nodes;
[0202] S46. Using a blockchain-based timestamp service to record the generation and binding of new public and private key pairs;
[0203] S47. Verify the new public-private key pair and use the blockchain node network for distributed verification.
[0204] In this implementation, S5 includes the following steps:
[0205] S51. DID based on real-name DID string str Query the corresponding public key information K on the blockchain pub ;
[0206] S52. Use public key K pub Perform multi-level homomorphic encryption and multi-party computing encryption on the data, combined with a dynamic key management system:
[0207]
[0208]
[0209] Where: E data represents the encrypted data, Data represents the original data to be encrypted, K pub represents the user's public key, α i represents the parameters used for homomorphic encryption, n represents the number of encryption layers, β j Indicates the parameters used for dynamic key management, m indicates the number of dynamic key management layers, DKM param Indicates dynamic key management parameters, Represents the XOR operation in bit operations;
[0210] S53. Use private key K pri Hybrid signature of encrypted data, combining threshold signature mechanism and improved secret sharing technology:
[0211]
[0212] Among them: MS sig Indicates the mixed signature result, E data Represents the encrypted data, K pri Represents the user's private key, H k represents the kth hash function, t represents the number of fragments in the threshold signature mechanism, γ l represents the weight parameter of secret sharing, s lrepresents the secret sharing fragment, s represents the total number of secret sharing fragments, Represents the XOR operation in bit operations;
[0213] S54, transmitting the encrypted data and the signature fragment together;
[0214] S55, the receiving end uses the public key K pub Verify the signature, combined with the threshold recovery mechanism:
[0215]
[0216] Among them: VMS sig Indicates the signature verification result, E data Represents the encrypted data, K pri Represents the user's private key, H k represents the kth hash function, t represents the number of fragments in the threshold signature mechanism, γ l represents the weight parameter of secret sharing, s l represents the secret sharing fragment, s represents the total number of secret sharing fragments, Represents the XOR operation in bit operations;
[0217] S56, the receiving end uses the private key K pri Decrypt the encrypted data and combine it with advanced federated learning mechanism:
[0218]
[0219] Where: D data Indicates the decrypted data, E data Represents the encrypted data, K pri represents the user's private key, δ j Indicates the parameters used for decryption, p indicates the number of decryption layers, FL param represents high-level federated learning parameters, Indicates a specific decryption operation;
[0220] S57. Through the on-chain federated learning model FL model and Distributed Autonomous Organizations (DAOs) model Analyze and predict user behavior patterns and adopt privacy protection mechanisms:
[0221]
[0222] Where: P behavior Represents the prediction result of user behavior pattern, Represents the analysis result of the federated learning model on the kth data shard, represents the analysis result of the distributed autonomous organization on the lth data shard, θ krepresents the weight parameter of federated learning, λ l represents the weight parameter of the distributed autonomous organization, m represents the total number of data shards of federated learning, and q represents the total number of data shards of the distributed autonomous organization.
[0223] In this implementation, S6 includes the following steps:
[0224] S61. DID by real-name DID string str Perform preliminary identity verification with the multi-factor authentication system MFAS;
[0225] S62. The multi-factor authentication system includes the following factors: Biometric data B data 、Device fingerprint E data and behavioral characteristics A data ;
[0226] S63. Generate an identity association identifier I based on the multi-factor identity authentication result. link ;
[0227] S64, through the identity association identification I link Query the user's real identity information;
[0228] S65. Record all operations during the query process and generate an operation log L ops ;
[0229] S66. Regulatory requirements for achieving front-end anonymity and back-end real-name authentication;
[0230] S67. Implement identity authentication and regulatory requirements through a distributed identity platform to optimize the security and compliance of the system.
[0231] In this implementation, S7 includes the following steps:
[0232] S71. Create the same real-name DID string on multiple blockchains str As a user account, generated through a distributed authentication protocol;
[0233] S72. Generate and manage public and private key pairs on multiple blockchains through a cross-chain communication protocol;
[0234] S73. Bind the public key to the real-name DID on each blockchain;
[0235] S74. Sign and verify transactions on multiple blockchains through a cross-chain communication protocol;
[0236] S75. Realize cross-chain sharing and verification of data between multiple blockchains;
[0237] S76. Use cross-chain communication protocols to coordinate identity and data management on multiple blockchains;
[0238] S77. Record cross-chain transactions and data sharing operations.
[0239] In this implementation, S8 includes the following steps:
[0240] S81. Use the real-name DID to initialize a cross-chain data sharing request on the source blockchain and generate a cross-chain data sharing request identifier R ID ;
[0241] S82. Create a data receiving identifier R on the target blockchain through a smart contract recv , and verify the cross-chain on the source blockchain;
[0242] S83, the source blockchain transmits data through the inter-chain communication protocol i Transfer to the target blockchain;
[0243] S84. The target blockchain receives and verifies the data i , confirm the integrity and authenticity of the data;
[0244] S85. Use smart contracts to perform data operations on the target blockchain;
[0245] S86, record data transmission and operation logs;
[0246] S87. Simplify user identity authentication and data operations on different blockchains.
[0247] Embodiment 1:
[0248] In a large financial institution, blockchain technology is used to record and manage customer transaction data. However, as the business expands, financial institutions face the following problems: difficulty in managing user private keys, lack of effective supervision, complex multi-account management, and complex cross-chain data sharing. These problems not only increase the security risks of the system, but also reduce the user experience.
[0249] In order to solve the above problems, financial institutions decided to adopt a blockchain data sharing and security verification method based on DID. When users register for the first time, they will generate a unique real-name DID string through multi-factor identity authentication and bind it to their biometric data and device fingerprint. In the process of applying for real-name DID, multiple sets of public and private key pairs are generated, and secret sharing technology is used to store private keys in multiple nodes of the decentralized network. In this process, the user's data security is greatly guaranteed.
[0250] In actual applications, when users conduct cross-chain transactions, the system uses real-name DID as the user account, combined with smart contracts and cross-chain communication protocols, to achieve cross-chain data sharing and security verification. For example, when a user transfers assets from blockchain A to blockchain B, the system first generates a cross-chain data sharing request identifier on blockchain A, and transmits the data to blockchain B through the inter-chain communication protocol. On blockchain B, the system verifies the integrity and authenticity of the data through smart contracts to ensure the security of the transaction.
[0251] In addition, when a user loses their private key, the system regenerates a new public-private key pair through biometric verification, device fingerprint, and real-name DID, keeping the real-name DID string unchanged. Throughout the process, users do not need to worry about data loss caused by the loss of their private key.
[0252] Concrete data proves our beneficial effects:
[0253] Time: January 2023 - June 2023
[0254] Location: A large financial institution
[0255] Table 1
[0256] index Before implementation After implementation Private key loss case 20 cases / month 3 cases / month Recovering private keys takes time 3 days 1 day Transaction risk events 2 from / month From 0.5 / month Number of user complaints 50 times / month 5 times / month Cross-chain transactions take time 5 hours 1 hour User satisfaction rating 3.2 points 4.6 points
[0257] Table 1 shows the changes in key indicators before and after the adoption of the DID-based blockchain data sharing and security verification method in a large financial institution. The data shows that the present invention significantly reduces the number of private key loss cases and recovery time, improves transaction security, reduces the number of user complaints and cross-chain transaction time, and significantly improves user satisfaction, fully proving the significant improvements and beneficial effects of the present invention in private key management, effective supervision, multi-account management and cross-chain data sharing.
[0258] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A blockchain data sharing and security verification method based on DID, characterized in that: The steps include: S1. The user applies for a real-name DID that is officially certified and endorsed for the first time, generates a unique real-name DID string, and binds it to the user's biometric data and device fingerprint to achieve multi-factor identity authentication; S2. Generate multiple sets of public and private key pairs during the real-name DID application process, use secret sharing technology to divide the private key into multiple fragments, and store these fragments in multiple nodes of the decentralized network; S3. Use real-name DID as the only user account on the blockchain, and achieve data sharing and security verification through deep learning model optimization and adaptive zero-knowledge proof privacy authentication mechanism; S4. When the user loses the private key, a new public-private key pair is regenerated through biometric verification, device fingerprint and real-name DID; S5. Query the corresponding public key information on the blockchain based on the real-name DID string, use the public key to encrypt data and verify signatures, achieve the integrity and confidentiality of data transmission, and analyze and predict user behavior patterns by combining the on-chain federated learning model and distributed autonomous organizations; S6. Through the real-name DID string and multi-factor authentication system, it is associated with the user's real identity information to achieve the regulatory requirements of front-end anonymity and back-end real-name; S7. Use the same real-name DID as a user account on multiple blockchains, and manage identities and data on multiple chains through multi-signature technology; S8. Use real-name DID and smart contracts to achieve cross-chain data sharing and security verification through inter-chain communication protocols.
2. The DID-based blockchain data sharing and security verification method according to claim 1 is characterized in that: S1 specifically includes the following steps: S11. The user submits an identity authentication request to the official certification authority through the device, including the user's basic identity information, device fingerprint and biometric data; S12. The official certification body verifies the identity information submitted by the user, including comparing the user's biometric data and device fingerprint to confirm the uniqueness and authenticity of the user's identity; S13. After the authentication is passed, the official authentication agency generates a unique real-name DID string, which is generated based on the user's identity information and device fingerprint using the hash algorithm H: H(ID,DF,BF)=DID; Where ID is the user's identity information, DF is the device fingerprint, BF is the biometric data, and DID is the generated real-name DID string; S14. The generated real-name DID string is bound to the user’s identity information, device fingerprint, and biometric data, and stored in the database of the official certification authority; S15. The user device receives the generated real-name DID string and stores it in the local device for subsequent identity authentication.
3. The DID-based blockchain data sharing and security verification method according to claim 1 is characterized in that: S2 specifically includes the following steps: S21. When a user applies for a real-name DID, the system generates multiple sets of public and private key pairs, with the public key denoted as K pub , the private key is denoted as K pri ; S22, use the secret sharing algorithm S to transfer the private key K pri Divide into multiple segments, denoted as K pri1 ,K pri2 ,…,K prik , satisfying K pri =S -1 (K pri1 ,K pri2 ,…,K prik ), where k is the threshold of secret sharing; S23, the generated private key fragment K pri1 ,K pri2 ,…,K prik They are stored on different nodes of the decentralized network, with each node storing a private key fragment; S24, public key K pub Associated with the user’s real-name DID string DID and stored on the blockchain for use in subsequent data encryption and verification processes; S25, when the private key needs to be restored, the secret sharing algorithm S -1 Get the corresponding private key fragments from at least k nodes and reconstruct the complete private key K pri Used for data manipulation.
4. The DID-based blockchain data sharing and security verification method according to claim 1 is characterized in that: S3 specifically includes the following steps: S31. Create a user account on the blockchain, using the real-name DID string DID as the unique identifier; S32. Deploy a deep learning model based on generative adversarial networks and reinforcement learning to optimize the generation and verification process of zero-knowledge proofs. The model uses historical data H and real-time data D real Perform training to generate optimization strategy parameters P opt ; S33. Generative adversarial network model training: The generative adversarial network consists of a generator G and a discriminator D. The generator G generates forged data samples G(z). The discriminator D is used to distinguish between real data H and forged data G(z). The training goal is to make the data generated by the generator G indistinguishable from the real data H: The goals of the generator are: The goal of the discriminator is: Among them, L D represents the loss function of the generator, L D represents the loss function of the discriminator, represents the expected value of the logarithmic probability of the real data, z is the random noise vector, p data (H) is the real data distribution, p z (z) is the noise distribution, represents the expected value of the log probability of the data generated by the generator; S34. The deep learning model of reinforcement learning is used to dynamically adjust the parameters in the generative adversarial network model and define the parameters of the generative adversarial network model {P G ,P D } As the state space of the deep learning model, define the action A that adjusts the parameters of the generative adversarial network model, and define the reward function r based on the loss function of the generator and the discriminator t , optimize the parameters of the generator G and the discriminator D through the policy gradient algorithm: Among them, P is the model parameter, r t is the reward at time step t, γ is the discount factor; S35. When the user submits data, the adaptive zero-knowledge proof mechanism is used to generate a zero-knowledge proof: Convert user data Data and metadata Meta into a circuit constraint system, expressed as a set of polynomial constraints: Among them, Data and Meta are user data and their metadata, a ij are polynomial coefficients, Data i Indicates Data raised to the power of i, Meta j represents Meta raised to the jth power; S36. Generate zero-knowledge proof π through polynomial calculation: π=(A,B,C)=(g a (s),g b (s),g c (s)); Among them, g is the generator, a(s), b(s), c(s) are polynomial functions; S37. Generate optimization strategy parameters P through deep learning model opt , and optimize the generated proof, converting the initially generated proof π=(A,B,C) and the optimization strategy parameter P opt Combined into input vector X input , processed and transformed through multiple hidden layers and nonlinear activation function f: Among them, W i and b i Represent the weight matrix and bias vector of the i-th layer respectively; Generate optimized zero-knowledge proof π opt : π opt =[A opt ,B opt ,C opt ]=W out ·H n +b out Among them, A opt The optimized proof element corresponds to the optimized polynomial function a opt (s), B opt The optimized proof element corresponds to the optimized polynomial function b opt (s), C opt The optimized proof element corresponds to the optimized polynomial function c opt (s), W out and b out represents the weight matrix and bias vector of the output layer, a opt,i , b opt,i ,b opt,i Represents the polynomial coefficient after deep learning model optimization, π opt is the optimized zero-knowledge proof, and π is the initially generated zero-knowledge proof; The verification node uses the public key K pub And the optimized zero-knowledge proof π opt To verify: e(A opt ,B opt )=e(g a (s),g b (s))=e(g,g) a(s)·b(s) ; Where, e represents a bilinear mapping; S38. In the process of generating zero-knowledge proofs, generative adversarial networks and reinforcement learning optimization algorithms are applied to dynamically adjust proof generation parameters: L joint =L GAN +L RL +β∑ k (L(H k ,P)); Among them, L GAN represents the loss of the generative adversarial network, L RL represents the loss of reinforcement learning, L represents the loss of data, β is the weight parameter, γ and δ are adaptive parameters, and R(P) is the regularization term; S39. The generated zero-knowledge proof Proof contains the data hash H(Data); S310, the process of verifying zero-knowledge proof, through the verification node in the blockchain network using the strategy parameter P optimized by the deep learning model based on generative adversarial network and reinforcement learning opt To verify: Among them, Valid represents the verification result, K pub is the public key, P opt are the optimized strategy parameters; S311. If the verification is successful, the data sharing request is accepted and the transaction data is recorded on the blockchain.
5. The DID-based blockchain data sharing and security verification method according to claim 1 is characterized in that: S4 specifically includes the following steps: S41. When a user loses his private key, he shall first verify his identity through biometric verification, including at least two of fingerprint recognition, iris scanning or facial recognition; S42, the user verifies the uniqueness of the device through device fingerprint verification, including device ID, MAC address and hardware characteristics; S43. After passing the biometric and device fingerprint verification, the system uses a multi-signature mechanism to generate a new public-private key pair K pubnew ,K prinew ; S44, the newly generated public key K pubnew Bind to the user’s real-name DID; S45, using the improved secret sharing algorithm to send the new private key K prinew Divide into multiple fragments and store them in multiple decentralized nodes; S46. Using a blockchain-based timestamp service to record the generation and binding of new public and private key pairs; S47. Verify the new public-private key pair and use the blockchain node network for distributed verification.
6. The DID-based blockchain data sharing and security verification method according to claim 1 is characterized in that: S5 specifically includes the following steps: S51. DID based on real-name DID string str Query the corresponding public key information K on the blockchain pub ; S52. Use public key K pub Perform multi-level homomorphic encryption and multi-party computing encryption on the data, combined with a dynamic key management system: Where: E data represents the encrypted data, Data represents the original data to be encrypted, K pub represents the user's public key, α i represents the parameters used for homomorphic encryption, n represents the number of encryption layers, β j Indicates the parameters used for dynamic key management, m indicates the number of dynamic key management layers, DKM param represents the dynamic key management parameter, ⊕ represents the XOR operation in bitwise operation; S53. Use private key K pri Hybrid signature of encrypted data, combining threshold signature mechanism and improved secret sharing technology: Among them: MS sig Indicates the mixed signature result, E data Represents the encrypted data, K pri Represents the user's private key, H k represents the kth hash function, t represents the number of fragments in the threshold signature mechanism, γ l represents the weight parameter of secret sharing, s l represents the secret sharing fragment, s represents the total number of secret sharing fragments, and ⊕ represents the XOR operation in bit operation; S54, transmitting the encrypted data and the signature fragment together; S55, the receiving end uses the public key K pub Verify the signature, combined with the threshold recovery mechanism: Among them: VMS sig Indicates the signature verification result, E data Represents the encrypted data, K pri Represents the user's private key, H k represents the kth hash function, t represents the number of fragments in the threshold signature mechanism, γ l represents the weight parameter of secret sharing, s l represents the secret sharing fragment, s represents the total number of secret sharing fragments, and ⊕ represents the XOR operation in bit operation; S56, the receiving end uses the private key K pri Decrypt the encrypted data and combine it with advanced federated learning mechanism: Where: D data Indicates the decrypted data, E data Represents the encrypted data, K pri represents the user's private key, δ j Indicates the parameters used for decryption, p indicates the number of decryption layers, FL param represents high-level federated learning parameters, Indicates a specific decryption operation; S57. Through the on-chain federated learning model FL model and Distributed Autonomous Organizations (DAOs) model Analyze and predict user behavior patterns and adopt privacy protection mechanisms: Where: P behavior Represents the prediction result of user behavior pattern, Represents the analysis result of the federated learning model on the kth data shard, represents the analysis result of the distributed autonomous organization on the lth data shard, θ k represents the weight parameter of federated learning, λ l represents the weight parameter of the distributed autonomous organization, m represents the total number of data shards of federated learning, and q represents the total number of data shards of the distributed autonomous organization.
7. The DID-based blockchain data sharing and security verification method according to claim 1 is characterized in that: S6 specifically includes the following steps: S61. DID by real-name DID string str Perform preliminary identity verification with the multi-factor authentication system MFAS; S62. The multi-factor authentication system includes the following factors: Biometric data B data 、Device fingerprint E data and behavioral characteristics A data ; S63. Generate an identity association identifier I based on the multi-factor identity authentication result. link ; S64, through the identity association identification I link Query the user's real identity information; S65. Record all operations during the query process and generate an operation log L ops ; S66. Regulatory requirements for achieving front-end anonymity and back-end real-name authentication; S67. Implement identity authentication and regulatory requirements through a distributed identity platform to optimize the security and compliance of the system.
8. The DID-based blockchain data sharing and security verification method according to claim 1 is characterized in that: S7 specifically includes the following steps: S71. Create the same real-name DID string on multiple blockchains str As a user account, generated through a distributed authentication protocol; S72. Generate and manage public and private key pairs on multiple blockchains through a cross-chain communication protocol; S73. Bind the public key to the real-name DID on each blockchain; S74. Sign and verify transactions on multiple blockchains through a cross-chain communication protocol; S75. Realize cross-chain sharing and verification of data between multiple blockchains; S76. Use cross-chain communication protocols to coordinate identity and data management on multiple blockchains; S77. Record cross-chain transactions and data sharing operations.
9. The DID-based blockchain data sharing and security verification method according to claim 1 is characterized in that: S8 specifically includes the following steps: S81. Use the real-name DID to initialize a cross-chain data sharing request on the source blockchain and generate a cross-chain data sharing request identifier R ID ; S82. Create a data receiving identifier R on the target blockchain through a smart contract recv , and verify the cross-chain on the source blockchain; S83, the source blockchain transmits data through the inter-chain communication protocol i Transfer to the target blockchain; S84. The target blockchain receives and verifies the data i , confirm the integrity and authenticity of the data; S85. Use smart contracts to perform data operations on the target blockchain; S86, record data transmission and operation logs; S87. Simplify user identity authentication and data operations on different blockchains.
Citation Information
Patent Citations
Block chain key trusteeship and recovery method and device based on secrecy sharing technology
CN107623569A
System architecture for cross-block-chain open data sharing under heterogeneous multi-chain architecture
CN108876370A
Systems and methods for computer-implemented data trusts
US20220058285A1
Method and apparatus for product recommendation in offline store on basis of federated learning
WO2022054983A1
Cited By
Data security sharing method and system
CN119483909A
Decentralization identity verification system based on block chain
CN120086827A
A blockchain-based decentralized identity verification system
CN120086827B
Identity verification system and method based on block chain
CN120145353A
Hotel check-in identity verification system and method based on real-name DID
CN120781092A