Personal data transaction method based on Web3.0 and block chain
By using Web3.0 and blockchain technology on the data trading platform, combined with zero -knowledge certification and homogenous encryption, the existing data trading platform has been solved in the lack of privacy protection, transaction transparency and user control. The security and efficient circulation of transactions.
Patent Information
- Application Number
- CN202411381258.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-01-21
AI Technical Summary
The existing blockchain-based data trading platform has shortcomings in privacy protection, transaction transparency and user control, resulting in poor security of personal data transactions.
Adopting a personal data transaction method based on Web3.0 and blockchain, through the decentralization, non-tampering and transparent characteristics of blockchain technology, combined with zero-knowledge proof and homomorphic encryption technology, to achieve decentralized management and transactions of data , enhance users’ control over data and transaction security.
It effectively ensures the confidentiality and integrity of transaction data, guarantees the autonomy, fairness and security of data transactions, and promotes the efficient circulation and utilization of data.
Smart Images

Figure CN119338588A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data transaction and blockchain technology, and in particular to a personal data transaction method based on Web3.0 and blockchain. Background Art
[0002] With the development of the Internet and digital technology, personal data has become an important asset, widely used in advertising, market analysis, personalized services and other fields, and plays an important role in the economic development of society. However, personal data is usually controlled by centralized institutions, and users lack the right to know and control the use of their own data. The transparency of the data transaction process is insufficient, and there is a risk of data leakage and abuse, resulting in poor security of personal data transactions. Summary of the invention
[0003] The existing blockchain-based data trading platform has deficiencies in privacy protection, transaction transparency and user control. The present invention makes full use of the advantages of Web3.0 and blockchain technology to achieve transparency, automation and privacy protection of data transactions, enhance user control over data, ensure the security and reliability of data transactions, and promote efficient circulation and utilization of data. Among them, Web3.0, as a new stage of Internet development, realizes decentralized management and transaction of data through blockchain technology, distributed storage and smart contracts, giving users full control over data and protecting privacy and data security. The decentralized, tamper-proof and transparent characteristics of blockchain technology can ensure the authenticity and integrity of data, ensure the automation and transparency of smart contracts in the data transaction process, and protect data privacy through encryption technology. At the same time, zero-knowledge proof allows data holders to prove that they own data without revealing the specific data content, thereby enhancing the security and reliability of data transactions.
[0004] In order to solve the technical problem of poor security of personal data transactions, the present invention proposes a personal data transaction method based on Web3.0 and blockchain to ensure the confidentiality and integrity of data and to protect the autonomy, fairness and security of data transactions.
[0005] The present invention provides a personal data transaction method based on Web3.0 and blockchain, the method comprising:
[0006] Obtain the registration information of data holders and data buyers on Web3.0 and blockchain, and generate corresponding DID and public-private key pairs. DID is used for zero-knowledge proof, and public-private key pairs are used for data encryption.
[0007] Obtain the data uploaded to the blockchain by the data holder, obtain the smart contract set by the data purchaser to meet the data needs, and broadcast it to the blockchain network;
[0008] Match the data of the data holder with the smart contract set by the data buyer. If the match is successful, the data buyer is proved to have the data required by the data holder through zero-knowledge proof.
[0009] If the data purchasing user agrees to the transaction, a confirmation message will be returned to the data purchasing user, and the data processing algorithm will be encrypted and uploaded to the cloud server. The data holding user will upload the data to the cloud server with homomorphic encryption;
[0010] Based on the cloud server, the encrypted data is processed in a homomorphic encryption manner through a processing algorithm, and the processed encryption result is sent to the data purchasing user;
[0011] The data holder receives corresponding remuneration, the data purchasing user receives the decryption key, decrypts the encrypted result, and automatically completes the personal data transaction process without the involvement of a third party.
[0012] Optionally, obtaining the registration information of the data holder and the data purchaser on Web3.0 and blockchain, and generating the corresponding DID and public-private key pair, includes:
[0013] Data holders and data buyers are both recorded as users. Users register on the blockchain and generate and store the public and private key pairs of users, recorded as (PK i , S.K. i ), PK i is the public key, SK i It is a private key; the user creates a unique identity on the blockchain, recorded as DID, which is used for subsequent legal verification of the user's identity.
[0014] Optionally, the data holder uses the data holder's public key PK i Encrypt the data, and the encrypted data information is: C = E PK (M), where C is the encrypted data, PK represents the public key, M is the initial data of the data holder, E represents the encryption function, and E PK (M) means that M is encrypted by the public key of the data holder. The data holder uses IPFS to distribute the encrypted data and stores the hash value of the data on the blockchain. The corresponding formula is: H=Hash(M), where H is the hash value of the data and Hash represents the hash function. The data purchasing user defines a smart contract based on demand, which includes the type of requested data, the amount of data and a brief description of the requested data, and broadcasts the smart contract to the blockchain network.
[0015] Optionally, the data holder matches the corresponding smart contract based on personal data and proves to the data buyer that he owns the data he needs through zero-knowledge proof; the zero-knowledge proof is: Proof = (DID i ,Hash(D request ), Sig Ski (DID i )), where Proof is a zero-knowledge proof that verifies the identity of the data holder and the specific data he or she owns through the unique identity of the data holder, the hash value of the data request, and the user's private key signature. i Hash(D request ) is the hash value of the data requested by the data purchasing user, Sig Ski (DID i ) The data holder uses the private key SK i A signature for a unique identifier.
[0016] Optionally, the data purchasing user verifies the zero-knowledge proof. If the transaction is approved after the verification, a confirmation message is returned to the data holding user through the smart contract. The data purchasing user uploads the data processing algorithm to the cloud server, and the data holding user uploads the homomorphically encrypted data to the cloud server.
[0017] Optionally, the cloud server processes the homomorphically encrypted data according to the uploaded data processing algorithm, and sends the processed encryption result to the data purchasing user.
[0018] The present invention has the following beneficial effects:
[0019] The personal data transaction method based on Web3.0 and blockchain of the present invention, first, initialize the blockchain network, the user completes registration on the blockchain, creates and generates a unique identity and a public-private key pair; secondly, the data holder encrypts the data and stores it through the distributed storage system IPFS, and only the hash value of the data is retained on the blockchain, which speeds up the transaction speed of the blockchain; the data purchaser defines the smart contract of the data demand, which includes the description, type and amount of data and other information, and broadcasts it to the blockchain network; then, the data holder matches the corresponding smart contract and proves that he owns the data requested by the purchaser through zero-knowledge proof; then, the data purchaser verifies the zero-knowledge proof, and returns confirmation information to agree to the transaction after verification; then, the data holder uploads the homomorphic encrypted data to the cloud server, the data purchaser uploads the data processing algorithm to the cloud server, and the cloud server processes the data according to the data processing algorithm and returns the encrypted processing result; finally, define the data transaction smart contract, the data holder receives the reward, the data purchaser receives the decrypted key, and completes the data transaction. In summary, the present invention effectively guarantees the confidentiality and integrity of the transaction data, as well as the autonomy and security of the data transaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0021] Figure 1 A flowchart of the personal data transaction method based on Web3.0 and blockchain of the present invention;
[0022] Figure 2 This is a schematic diagram of the module framework of the personal data transaction method based on Web3.0 and blockchain of the present invention;
[0023] Figure 3 This is a process diagram of the personal data transaction method based on Web3.0 and blockchain of the present invention. DETAILED DESCRIPTION
[0024] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the specific implementation methods, structures, features and effects of the technical solutions proposed by the present invention are described in detail below in conjunction with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0025] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0026] refer to Figure 1 , the process of some embodiments of the personal data transaction method based on Web3.0 and blockchain according to the present invention is given. The personal data transaction method based on Web3.0 and blockchain includes the following steps:
[0027] Step S1, obtain the registration information of data holders and data buyers on Web3.0 and blockchain, and generate corresponding DID and public-private key pairs.
[0028] Among them, DID is used for zero-knowledge proof, and public-private key pairs are used for data encryption. Data holders are also called data holders. Data buyers are also called data buyers or data buyers. Data holders can be individual users or organizations. Data holders can decide whether to sell their data based on the data needs of data buyers. Data buyers can be individual users or organizations. Data buyers can define data demand smart contracts and purchase the corresponding results of data processing from data holders.
[0029] In some embodiments, the blockchain network is initialized, the user registers on Web3.0 and the blockchain, and the corresponding DID and public-private key pair are generated. Specifically, the data holder and the data purchaser can be recorded as users, the blockchain network is initialized, the user registers on the blockchain, and the public-private key pair of the user is generated and stored, recorded as (PK i , S.K. i ), PK i is the public key, SK i It is a private key; at the same time, the user creates a unique identity identifier in the blockchain, recorded as DID, which is used for subsequent legal verification of the user's identity.
[0030] Step S2, obtain the data uploaded to the blockchain by the data holder, obtain the smart contract that meets the data needs set by the data purchasing user, and broadcast it to the blockchain network.
[0031] In some embodiments, the data holder uploads the data to the blockchain, the data purchaser defines the smart contract of the data demand, and broadcasts it to the blockchain network. Specifically, the data holder uses the public key PK of the data holder to buy the data. i Encrypt the data, and the encrypted data information is: C = E PK (M), where C is the encrypted data, PK represents the public key, M is the initial data of the data holder, E represents the encryption function, and E PK(M) means that M is encrypted by the public key of the data holder. The data holder uses IPFS (InterPlanetary File System, a peer-to-peer decentralized storage system) to distribute the encrypted data, and only the hash value of the data is stored on the blockchain. The corresponding formula is: H=Hash(M), where H is the hash value of the data and Hash represents the hash function. The data purchasing user defines the smart contract based on his own needs, which mainly includes information such as the type of requested data, the amount of data, and a brief description of the requested data, and broadcasts the smart contract to the blockchain network.
[0032] Among them, IPFS is mainly responsible for distributed storage of data uploaded by users, reducing the burden of blockchain storage.
[0033] Step S3, the data of the data holder is matched with the smart contract set by the data purchasing user. If the match is successful, zero-knowledge proof is used to prove to the data purchasing user that the data holder owns the data required by the data purchasing user.
[0034] In some embodiments, the data holder matches the data requirements defined by the user. If the match is successful, the data holder proves to the data buyer that he owns the data he needs through zero-knowledge proof. Specifically, the data holder matches the corresponding smart contract based on personal data, and proves to the data buyer that he owns the data he needs through zero-knowledge proof. Zero-knowledge proof is: Proof = (DID i ,Hash(D request ), Sig Ski (DID i )), where Proof is a zero-knowledge proof that verifies the identity of the data holder and that he or she owns specific data through the unique identity of the data holder, the hash value of the data request, and the user's private key signature. DID i Hash(D request ) is the hash value of the data requested by the data purchasing user, Sig Ski (DID i ) The data holder uses the private key SK i A signature for a unique identifier (DID).
[0035] Step S4: If the data purchasing user agrees to the transaction, a confirmation message is returned to the data purchasing user, and the data processing algorithm is encrypted and uploaded to the cloud server. The data holding user uploads the data to the cloud server with homomorphic encryption.
[0036] Among them, the cloud server can be a node with strong computing power. The cloud server is mainly responsible for processing the homomorphically encrypted data and returning the encrypted processing results to the data buyer.
[0037] In some embodiments, the data purchasing user verifies the zero-knowledge proof. If the transaction is agreed upon after verification, a confirmation message is returned to the data holding user through the smart contract. At the same time, the data purchasing user uploads the data processing algorithm to the cloud server, and the data holding user uploads the homomorphically encrypted data to the cloud server.
[0038] Step S5, based on the cloud server, the encrypted data is processed by a processing algorithm in a homomorphic encryption manner, and the processed encryption result is sent to the data purchasing user.
[0039] In some embodiments, the cloud server processes the homomorphically encrypted data according to the uploaded data processing algorithm and sends the processed encryption result to the data purchasing user.
[0040] In step S6, the data holder receives corresponding remuneration, and the data purchasing user receives the decryption key and decrypts the encrypted result, thus automatically completing the personal data transaction process without the involvement of a third party.
[0041] In some embodiments, a data transaction smart contract is defined, the data holder receives corresponding remuneration, and the data buyer receives a decryption key to decrypt the encrypted result, thereby automatically completing the personal data transaction process without the involvement of a third party.
[0042] The module framework of the present invention is as follows Figure 2 As shown, it mainly includes: data holders, data buyers, cloud servers and IPFS distributed storage systems.
[0043] The personal data transaction process of the present invention is as follows Figure 3 As shown, the following steps may be specifically included:
[0044] The first step is to initialize the blockchain network. Data holders and data buyers can obtain anonymous identities by registering on the blockchain. By using an Ethereum wallet to generate a public-private key pair (PK i , S.K. i ), and then perform a hash operation on the user's public key to obtain the user's account i , that is, account i =Hash(PK i ), this account is used as the user's payment and communication address. At the same time, a DID document is created based on the generated public and private key pair, and a unique identity (DID) is registered on the blockchain for subsequent transaction user identity authentication.
[0045] In the second step, the data holder uses the public key to encrypt the data and upload it to the IPFS distributed storage system. IPFS returns a unique identifier CID indicating the storage address of the off-chain data. After that, the data is hashed using the SHA-256 hash algorithm to generate a unique hash value, and the hash value and CID are encrypted and uploaded to the blockchain together.
[0046] In the third step, the data buyer defines the required data in the form of a smart contract, including data type, data volume, data description and other information. After the definition is completed, it is broadcast to the blockchain network. The data holder views the smart contract that defines the data requirements and matches it. If the match is successful, the data buyer is proved to have the required data through zero-knowledge proof. The above zero-knowledge proof is: Proof = (DID i ,Hash(D request ), Sig Ski (DID i )), where: Proof is a zero-knowledge proof that verifies the identity of the data holder and the specific data he / she owns through the unique identity of the data holder, the hash value of the data request and the user's private key signature, DID i Hash(D request ) is the hash value of the data requested by the data buyer, Sig Ski (DID i ) The data holder uses the private key SK i A signature for a unique identifier (DID).
[0047] In the fourth step, the data buyer verifies the zero-knowledge proof. If the verification is successful and the data buyer agrees to the transaction, a confirmation message will be returned to the data holder through the smart contract. Afterwards, in order to avoid data resale issues, data buyers cannot directly access the original data, but can only obtain the data analysis results they need. At the same time, in order to avoid data leakage, the data holder uploads the homomorphically encrypted data to the cloud server, and the data buyer uploads the data processing algorithm to the cloud server. The cloud server processes the encrypted data according to the data processing algorithm and returns the processing results to the data buyer.
[0048] The fifth step is to define the data transaction smart contract to automatically complete the execution of the transaction process. Before the transaction, both the data holder and the data buyer need to prepay a certain deposit to prevent dishonest behavior. After the transaction is completed, the data holder receives a certain reward and the data buyer receives the decryption key to obtain the corresponding data processing results.
[0049] In summary, the embodiments of the present invention have the following advantages: as the data holder providing the data, the data holder has the absolute right to know and control whether the data will be involved in the transaction. The data holder decides for himself whether his data set will be traded with those data buyers. In the process of data transaction, the data is encrypted by homomorphic encryption, which ensures the security and integrity of the data during the transaction and effectively prevents the problem of data privacy leakage. Data buyers and data holders are required to make a prepayment before conducting data transactions to ensure that no dishonest behavior occurs on either side. In the process of data transaction, the data is processed by homomorphic encryption to ensure that the data buyer cannot access the original data but can only access the results of data processing, avoiding the problem of data resale.
[0050] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features can be replaced by equivalents. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A personal data transaction method based on Web3.0 and blockchain, characterized in that: The following steps are involved: Obtain the registration information of data holders and data buyers on Web3.0 and blockchain, and generate corresponding DID and public-private key pairs. DID is used for zero-knowledge proof, and public-private key pairs are used for data encryption. Obtain the data uploaded to the blockchain by the data holder, obtain the smart contract set by the data purchaser to meet the data needs, and broadcast it to the blockchain network; Match the data of the data holder with the smart contract set by the data buyer. If the match is successful, the data buyer is proved to have the data required by the data holder through zero-knowledge proof. If the data purchasing user agrees to the transaction, a confirmation message will be returned to the data purchasing user, and the data processing algorithm will be encrypted and uploaded to the cloud server. The data holding user will upload the data to the cloud server with homomorphic encryption; Based on the cloud server, the encrypted data is processed in a homomorphic encryption manner through a processing algorithm, and the processed encryption result is sent to the data purchasing user; The data holder receives corresponding remuneration, the data purchasing user receives the decryption key, decrypts the encrypted result, and automatically completes the personal data transaction process without the involvement of a third party.
2. According to claim 1, a personal data transaction method based on Web3.0 and blockchain is characterized in that: The acquisition of the registration information of the data holder and the data purchaser on Web3.0 and blockchain, and the generation of the corresponding DID and public-private key pair, includes: Data holders and data buyers are both recorded as users. Users register on the blockchain and generate and store the public and private key pairs of users, recorded as (PK i , S.K. i ), PK i is the public key, SK i It is a private key; the user creates a unique identity on the blockchain, recorded as DID, which is used for subsequent legal verification of the user's identity.
3. A personal data transaction method based on Web3.0 and blockchain according to claim 2, characterized in that: The data holder uses the data holder's public key PK i Encrypt the data, and the encrypted data information is: C = E PK (M), where C is the encrypted data, PK represents the public key, M is the initial data of the data holder, E represents the encryption function, and E PK (M) means that M is encrypted by the public key of the data holder. The data holder uses IPFS to distribute the encrypted data and stores the hash value of the data on the blockchain. The corresponding formula is: H=Hash(M), where H is the hash value of the data and Hash represents the hash function. The data purchasing user defines a smart contract based on demand, which includes the type of requested data, the amount of data and a brief description of the requested data, and broadcasts the smart contract to the blockchain network.
4. According to claim 3, a personal data transaction method based on Web3.0 and blockchain is characterized in that: The data holder matches the corresponding smart contract based on personal data and proves to the data buyer that he owns the data he needs through zero-knowledge proof; Zero-knowledge proof is: Proof = (DID i ,Hash(D request ), Sig Ski (DID i )), where Proof is a zero-knowledge proof that verifies the identity of the data holder and that he or she owns specific data through the unique identity of the data holder, the hash value of the data request, and the user's private key signature. i Hash(D request ) is the hash value of the data requested by the data purchasing user, Sig Ski (DID i ) The data holder uses the private key SK i A signature for a unique identifier.
5. According to claim 4, a personal data transaction method based on Web3.0 and blockchain is characterized in that: The data purchasing user verifies the zero-knowledge proof. If the transaction is approved after verification, the confirmation information will be returned to the data holding user through the smart contract. The data purchasing user will upload the data processing algorithm to the cloud server, and the data holding user will upload the homomorphically encrypted data to the cloud server.
6. A personal data transaction method based on Web3.0 and blockchain according to claim 5, characterized in that: The cloud server processes the homomorphically encrypted data according to the uploaded data processing algorithm and sends the processed encryption results to the data purchasing user.