A method and apparatus for data transactions

By employing a blockchain-based data transaction method that involves homomorphic encryption by the data provider, homomorphic computation and decryption by the target data processor, and decryption by the target data user, the problem of inaccurate value valuation and privacy protection in data transactions is solved. This method achieves security and fairness in data transactions and incentivizes data sharing.

CN119919231BActive Publication Date: 2025-11-14太保科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411983317.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-11-14
Estimated Expiration
2044-12-30

AI Technical Summary

Technical Problem

Existing data trading mechanisms cannot accurately value data, leading to unfair data transactions and insufficient revenue for data providers. They also raise privacy concerns and affect data sharing incentive mechanisms.

Method used

The data provider uses homomorphic encryption, the target data processor performs homomorphic computation and decryption, the target data user decrypts the data, and finally records the metadata on the blockchain to ensure that the data transaction process is transparent and traceable, and calculates the contribution value of each party based on the metadata.

Benefits of technology

It ensures the security and fairness of data transactions, guarantees that data value is accurately assessed and protected, and incentivizes data providers and processors to actively participate in data sharing and processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119919231B_ABST
    Figure CN119919231B_ABST
Patent Text Reader

Abstract

This application discloses a method and apparatus for data trading. The data provider homomorphically encrypts the data to be traded, the authorized data processor performs homomorphic computation and then homomorphically decrypts it, and the authorized data user encrypts the decrypted result. During the data trading process, the operational information of each party is written into the blockchain metadata, ensuring that every flow and processing of data can be accurately tracked and verified. This not only ensures the authenticity and immutability of the data but also provides a solid basis for subsequent contribution value calculation. Based on the metadata, the contribution value of each party can be obtained, and based on the contribution value, the economic reward for the data contribution is returned to the corresponding data provider and processor. The contribution value reflects the direct and indirect impact of each party on the data, ensuring that the data value is accurately valued and protected, guaranteeing the security and fairness of data trading, and effectively incentivizing data providers and processors to actively participate in data sharing and processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of blockchain technology, and in particular to a method and apparatus for data transactions. Background Technology

[0002] Data can be replicated at low cost due to its replicability. In an era where data is considered an asset, its value varies across different scenarios. Blockchain technology can ensure data sharing under specific conditions and incentivize data circulation and transactions by building consortium blockchains, thereby creating a multiplier effect of data among multiple participants.

[0003] Existing data trading mechanisms lack clarity regarding the value of data, making fair and reasonable data transactions difficult. Furthermore, the lack of accurate valuation of each participant's contribution often prevents data providers from receiving their due compensation, thus undermining incentives for data sharing. In addition, privacy concerns may also deter data providers from sharing their data.

[0004] Therefore, how to accurately value and protect data to ensure the security and fairness of data transactions has become an urgent problem to be solved. Summary of the Invention

[0005] To address the aforementioned issues, this application provides a method and apparatus for data trading, which accurately values ​​and protects data to ensure the security and fairness of data transactions.

[0006] This application discloses a method for data transactions, the method comprising:

[0007] The data provider homomorphically encrypts the data to be traded to obtain the first ciphertext, and writes the current data provider and the target data processor into the metadata. The metadata and the first ciphertext are then uploaded to the blockchain. The target data processor is a data processor with the operation permission for the data to be traded determined by the data provider.

[0008] The target data processor performs homomorphic computation on the first ciphertext, decrypts the computation result homomorphically, and then encrypts it based on the target data user to obtain the second ciphertext. The current data processor and the target data user are written into the metadata, and the metadata and the second ciphertext are uploaded to the blockchain together. The target data user is a data user with the operation permission of the data to be traded determined by the data provider.

[0009] The target data user decrypts the second ciphertext to obtain the data to be traded, and writes the current data user into the metadata and uploads it to the blockchain;

[0010] The contribution values ​​of the data provider, data processor, and data user in the data transaction are obtained based on the metadata.

[0011] Optionally, the step of homomorphically encrypting the data to be traded by the data provider to obtain the first ciphertext includes:

[0012] The target data processor generates a processor private key and processor noise;

[0013] The data processor obtains the processor's joint public key based on the processor's private key, the processor's noise, and preset shared parameters;

[0014] The data provider performs homomorphic encryption on the data to be traded based on the joint public key of the processor to obtain the first ciphertext; the first ciphertext is ciphertext that has undergone noise operation.

[0015] Optionally, the step of performing homomorphic computation on the first ciphertext through the target data processor includes:

[0016] The target data processor performs homomorphic computation on the first ciphertext to obtain the computation result; the computation result is the ciphertext.

[0017] Optionally, the step of homomorphically decrypting the calculation result and then encrypting it based on the target data user includes:

[0018] The target data processor decrypts the calculation result based on the processor's joint public key;

[0019] The target data processor encrypts the homomorphic decryption result based on the user's public key of the target data user; the user's public key is synthesized from the sub-public keys of multiple target data users.

[0020] Optionally, the step of decrypting the second ciphertext through the target data user includes:

[0021] The user of the target data decrypts the second ciphertext based on the user's private key.

[0022] Optionally, before encrypting the data based on the target data user, the method further includes:

[0023] The target data processor responds to the data user's data usage request and, based on the data usage request, sends an authorization request to the data provider;

[0024] When the data provider agrees to the authorization, the data user is the target data user; at the same time, the data provider uploads the authorization information to the blockchain for evidence storage.

[0025] Optionally, the step of homomorphically encrypting the data to be traded through the data provider to obtain the first ciphertext, and writing the current data provider and the target data processor into the metadata, includes:

[0026] When the size of the data to be traded exceeds a preset range, the data provider performs slicing on the data to be traded to obtain multiple data slices.

[0027] The data provider performs homomorphic encryption on multiple data slices to be traded, resulting in multiple first ciphertexts;

[0028] The data provider writes the current data provider, the target data processor, and the corresponding data slice number to be traded into the metadata for each first ciphertext.

[0029] Optionally, the step of decrypting the second ciphertext through the target data user includes:

[0030] The target data user will decrypt and aggregate the multiple second ciphertexts received.

[0031] Optionally, the first ciphertext and the second ciphertext can be uploaded to the blockchain after hash processing.

[0032] Based on the above-mentioned data transaction method, this application also discloses a data transaction apparatus, including: a homomorphic encryption unit, a secondary encryption unit, a decryption unit, and a contribution unit;

[0033] The homomorphic encryption unit is used to homomorphically encrypt the data to be traded by the data provider to obtain the first ciphertext, and write the current data provider and the target data processor into the metadata, and upload the metadata and the first ciphertext together to the blockchain; the target data processor is a data processor with the operation permission of the data to be traded determined by the data provider.

[0034] The secondary encryption unit performs homomorphic computation on the first ciphertext by the target data processor, performs homomorphic decryption on the computation result, and then encrypts it based on the target data user to obtain the second ciphertext. The current data processor and the target data user are written into the metadata, and the metadata and the second ciphertext are uploaded to the blockchain together. The target data user is a data user with the operation permission for the data to be traded determined by the data provider.

[0035] The decryption unit is used to decrypt the second ciphertext through the target data user to obtain the data to be traded, and to write the current data user into the metadata and upload it to the blockchain.

[0036] The contribution unit is used to obtain the contribution values ​​of the data provider, data processor and data user in the data transaction based on the metadata.

[0037] Optionally, the homomorphic encryption unit includes:

[0038] A generation subunit is used by the target data processor to generate a processor private key and processor noise;

[0039] The acquisition subunit is used by the data processor to acquire the processor's joint public key based on the processor's private key, the processor's noise, and preset shared parameters;

[0040] The homomorphic encryption subunit is used by the data provider to homomorphically encrypt the data to be traded based on the joint public key of the processor to obtain the first ciphertext; the first ciphertext is ciphertext after noise operation.

[0041] Optionally, the secondary encryption unit is used for:

[0042] The target data processor performs homomorphic computation on the first ciphertext to obtain the computation result; the computation result is the ciphertext.

[0043] Optionally, the secondary encryption unit includes:

[0044] A decryption subunit is used by the target data processor to decrypt the calculation result based on the processor's joint public key;

[0045] The encryption subunit is used by the target data processor to encrypt the homomorphic decryption result based on the user's public key of the target data user; the user's public key is synthesized from multiple sub-public keys of the target data user.

[0046] Optionally, the decryption unit is used for:

[0047] The user of the target data decrypts the second ciphertext based on the user's private key.

[0048] Optionally, the device further includes:

[0049] The request-response unit is used for the target data processor to respond to the data user's data usage request, and based on the data usage request, to send an authorization request to the data provider;

[0050] The authorization unit is used when the data provider agrees to the authorization, and the data user is the target data user; at the same time, the data provider uploads the authorization information to the blockchain for evidence storage.

[0051] Optionally, the homomorphic encryption unit includes:

[0052] The slicing subunit is used to slice the data to be traded when the size of the data to be traded exceeds a preset range, so as to obtain multiple data slices to be traded.

[0053] Separate encryption subunits are used by the data provider to perform homomorphic encryption on multiple data slices to be traded, thereby obtaining multiple first ciphertexts;

[0054] The numbering sub-unit is used by the data provider to write the current data provider, target data processor, and corresponding data slice number to be traded for each first ciphertext into the metadata.

[0055] Optionally, the decryption unit is used for:

[0056] The target data user will decrypt and aggregate the multiple second ciphertexts received.

[0057] Optionally, the first ciphertext and the second ciphertext can be uploaded to the blockchain after hash processing.

[0058] This application discloses a method and apparatus for data trading. The data provider homomorphically encrypts the data to be traded, an authorized data processor performs homomorphic computation, and an authorized data user performs homomorphic decryption. The authorized data user then encrypts the decrypted data and waits for the user to decrypt and retrieve the data. Throughout the data trading process, the operational information of each party is written into the blockchain's metadata, ensuring that every data transfer and processing step can be accurately tracked and verified. This not only ensures the authenticity and immutability of the data but also provides a solid basis for subsequent contribution value calculations. Based on the metadata, the contribution values ​​of each party can be obtained. Based on these contribution values, the economic rewards for data contributions are returned to the corresponding data providers and processors. The contribution value reflects the direct and indirect impact of each party on the data, ensuring that the data value is accurately assessed and protected, guaranteeing the security and fairness of data trading, and effectively incentivizing data providers and processors to actively participate in data sharing and processing. Attached Figure Description

[0059] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0060] Figure 1 This is a flowchart illustrating a data transaction method disclosed in an embodiment of this application;

[0061] Figure 2 This is a flowchart illustrating another data transaction method disclosed in an embodiment of this application;

[0062] Figure 3 This is a schematic diagram of the structure of a data transaction apparatus disclosed in an embodiment of this application. Detailed Implementation

[0063] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0064] Example 1: This application discloses a method for data transactions.

[0065] For details, please refer to Figure 1 The data transaction method disclosed in this embodiment includes the following steps:

[0066] Step 101: The data provider homomorphically encrypts the data to be traded to obtain the first ciphertext, and writes the current data provider and the target data processor into the metadata. The metadata and the first ciphertext are then uploaded to the blockchain.

[0067] In the method described in this embodiment, the target data processor determines the data processor with the permission to operate on the data to be traded for the data provider. First, a shared parameter p is set for all parties in the data transaction. The target data processor generates a processor private key s_processor and a processor noise e_processor, and obtains the processor parameter p_processor based on s_processor, e_processor, and p. As an optional method, p_processor can be the product of -p and s_processor plus e_processor. Multiple target data processors can calculate the joint public key cpk. As an optional method, the formula can be:

[0068] cpk = (sum(p_processor_i), p) = (-p*sum(s_processor_i) + sum(e_proces sor_i)), p). Here, i represents the i-th target data processor.

[0069] In the method described in this embodiment, when the size of the data to be traded exceeds a preset range, the data provider can slice the data to be traded to obtain multiple slices of the data to be traded.

[0070] In the method described in this embodiment, the data provider adds noise to the data to be traded based on the processor's joint public key cpk, and performs homomorphic encryption to obtain a first ciphertext, which is the ciphertext processed by the noise operation. Accordingly, when there are multiple data slices to be traded, the data provider performs homomorphic encryption on each of the multiple data slices to be traded, obtaining multiple first ciphertexts. Furthermore, the data provider writes the current data provider, the target data processor, and the corresponding data slice number (e.g., which segment the data slice belongs to) of each first ciphertext into metadata. KZG multinomial commitments can be used to ensure that the data obtained from the segmentation belongs to the original data to be traded.

[0071] In the method described in this embodiment, the first encrypted text is uploaded to the blockchain after hash processing. In practical applications, other secure upload methods can also be used; no specific limitation is made here, as long as encrypted upload is achieved. The first encrypted text uploaded to the blockchain will be broadcast to the data processing party.

[0072] Step 102: The target data processor performs homomorphic computation on the first ciphertext, and after homomorphically decrypting the computation result, it is encrypted based on the target data user to obtain the second ciphertext. The current data processor and the target data user are written into the metadata, and the metadata and the second ciphertext are uploaded to the blockchain together.

[0073] In the method described in this embodiment, the target data processor listens to on-chain messages and obtains the first ciphertext off-chain through an interface. The target data processor performs homomorphic computation on the first ciphertext to obtain the computation result. Subsequently, the target data processor performs homomorphic decryption on the computation result based on the processor's joint public key cpk, obtaining a homomorphic decryption result, which is ciphertext. Specifically, the homomorphic decryption step can be as follows: the target data processor converts the first ciphertext encrypted with the processor's joint public key cpk into ciphertext encrypted with pk through a key switching protocol, and then performs homomorphic decryption on it using pk. Here, pk is associated with the processor's joint public key cpk.

[0074] In the method described in this embodiment, the target data processor can encrypt the homomorphic decryption result using the user's public key to obtain the second ciphertext. The user's public key is synthesized from the sub-public keys of multiple target data users, thus restricting decryption of the second ciphertext to only authorized target data users.

[0075] Prior to this, the target data user identifies the data provider as having the authority to operate on the data to be traded. As an optional method, the target data processor responds to the data user's data usage request and, based on the request, sends an authorization request to the data provider, allowing the data provider to determine whether the requesting data user is authorized. If the data provider agrees to the authorization, that data user becomes the target data user, and the data provider uploads the authorization information to the blockchain for notarization. If the data provider disagrees with the authorization, the target data processor can ignore the data user's request or reply that it does not have the necessary data usage authority. No specific limitations are placed on the subsequent steps after the data provider disagrees with the authorization; the goal is simply to prevent unauthorized data users from using the data.

[0076] In the method described in this embodiment, as an optional approach, the second ciphertext is uploaded to the blockchain after hash processing. Alternatively, due to its small size, the second ciphertext can be uploaded directly. In practical applications, other secure upload methods can also be used; no specific limitation is made to the method of uploading to the blockchain, as long as encrypted uploading is achieved. The second ciphertext uploaded to the blockchain will be broadcast to the data users.

[0077] Step 103: The target data user decrypts the second ciphertext to obtain the data to be traded, and writes the current data user into the metadata and uploads it to the blockchain.

[0078] In the method described in this embodiment, each target data user listens to information on the blockchain, obtains the second ciphertext, and decrypts the second ciphertext using their private key. When multiple second ciphertexts exist, i.e., multiple data slices to be traded, the target data user decrypts the received multiple second ciphertexts and then aggregates them according to the data slice number to be traded in the metadata to obtain the data to be traded.

[0079] In the method described in this embodiment, after receiving the data to be traded, the target data user will analyze and process the data, and then securely aggregate the results and return them to the user. At this point, the user is the blockchain front-end application of the target data user. The target data user hashes the metadata and the secure aggregation results, and then uploads them to the blockchain for evidence storage.

[0080] Step 104: Obtain the contribution values ​​of the data provider, data processor, and data user in the data transaction based on the metadata.

[0081] In the method described in this embodiment, data auditing is performed based on on-chain metadata. Based on the audit results and metadata, the participation level of each data provider and data processor in the entire data transaction process, i.e., the data chain, is calculated. The smart contract utilizes a rule engine to determine the contribution value of each party, thereby achieving a precise pricing mechanism and effectively incentivizing more data providers and data processors to actively participate in data contribution and processing.

[0082] The method described in this embodiment combines the transparency and traceability of blockchain with privacy-enhancing computation technology. It not only supports efficient encrypted broadcasting, resolving the authorization issue for encrypted data to multiple designated users, but also significantly reduces computational resource consumption. Furthermore, it employs a decentralized key management strategy, effectively reducing the overhead of centralized management and ensuring data privacy. Through authorization and sharding, it ensures that only authorized data processors and users can process or aggregate data, and data processors can only obtain partial data, unable to perform full data acquisition or plaintext computation, thereby strengthening data privacy protection. In addition, data providers can authorize multiple data processors at once, reducing workload and improving processing efficiency through sharding. The processing results are uploaded to the blockchain in encrypted form, received and decrypted by subscribed data users, and finally the hash value of the aggregated result is uploaded to the blockchain. During this process, data users can calculate contribution values ​​based on the participation levels of each data provider and data processor, achieving accurate feedback on contribution values ​​and promoting efficient management and incentive mechanisms for data collaboration.

[0083] Example 2: This application discloses another method for data transactions; please refer to [link / reference]. Figure 2 The method described in this embodiment introduces the entire process of data transactions.

[0084] Step 201: When the size of the data to be traded exceeds the preset range, the data provider will divide the data to be traded into multiple data slices, including the first slice and the second slice.

[0085] Step 202: The data provider performs homomorphic encryption on the first slice and the second slice based on the joint public key of the target data processor, to obtain the first ciphertext a and the first ciphertext b.

[0086] Step 203: The data provider uploads the first ciphertext a and the first ciphertext b, along with the corresponding two metadata entries, to the blockchain.

[0087] Step 204: The target data processor obtains the first ciphertext a and the first ciphertext b, and performs homomorphic computation on them respectively to obtain the computation result a and the computation result b.

[0088] Step 205: The target data processor performs homomorphic decryption on calculation result a and calculation result b based on the joint public key of the target data processor, respectively, to obtain homomorphic decryption result a and homomorphic decryption result b.

[0089] Step 206: The data user sends a data usage request to the target data processor.

[0090] Step 207: The target data processor, based on the data usage request, asks the data provider to determine whether to grant authorization. If yes, proceed to step 208. If no, ignore the request.

[0091] Step 208: Identify the data user as the target data user.

[0092] Step 209: The target data processor encrypts the homomorphic decryption result a and the homomorphic decryption result b based on the user's public key to obtain the second ciphertext a and the second ciphertext b.

[0093] Step 210: The target data processor updates the second ciphertext a, the second ciphertext b, and the corresponding two metadata and uploads them to the blockchain.

[0094] Step 211: The target data user obtains the second ciphertext a and the second ciphertext b. Based on the user's private key, the second ciphertext a and the second ciphertext b are decrypted respectively. Then, the data is aggregated according to the metadata to obtain the data to be traded.

[0095] Step 212: The target data user updates the metadata (and the hash of the aggregation result) and uploads it to the blockchain.

[0096] Step 213: The blockchain smart contract obtains the contribution values ​​of the data provider, data processor, and data user in the data transaction based on the metadata on the blockchain.

[0097] Based on the data transaction method disclosed in the above embodiments, this embodiment correspondingly discloses a data transaction apparatus. Please refer to... Figure 3 The data transaction device includes: a homomorphic encryption unit 301, a secondary encryption unit 302, a decryption unit 303, and a contribution unit 304;

[0098] The homomorphic encryption unit 301 is used to homomorphically encrypt the data to be traded by the data provider to obtain the first ciphertext, and write the current data provider and the target data processor into the metadata, and upload the metadata and the first ciphertext together to the blockchain; the target data processor is a data processor with the operation permission of the data to be traded determined by the data provider.

[0099] The secondary encryption unit 302 performs homomorphic computation on the first ciphertext by the target data processor, performs homomorphic decryption on the computation result, and then encrypts it based on the target data user to obtain the second ciphertext. The current data processor and the target data user are written into the metadata, and the metadata and the second ciphertext are uploaded to the blockchain together. The target data user is the data user with the operation permission of the data to be traded determined by the data provider.

[0100] The decryption unit 303 is used to decrypt the second ciphertext through the target data user to obtain the data to be traded, and write the current data user into the metadata and upload it to the blockchain;

[0101] The contribution unit 304 is used to obtain the contribution values ​​of the data provider, data processor and data user in the data transaction based on the metadata.

[0102] Optionally, the homomorphic encryption unit 301 includes:

[0103] A generation subunit is used by the target data processor to generate a processor private key and processor noise;

[0104] The acquisition subunit is used by the data processor to acquire the processor's joint public key based on the processor's private key, the processor's noise, and preset shared parameters;

[0105] The homomorphic encryption subunit is used by the data provider to homomorphically encrypt the data to be traded based on the joint public key of the processor to obtain the first ciphertext; the first ciphertext is ciphertext after noise operation.

[0106] Optionally, the secondary encryption unit 302 is used for:

[0107] The target data processor performs homomorphic computation on the first ciphertext to obtain the computation result; the computation result is the ciphertext.

[0108] Optionally, the secondary encryption unit 302 includes:

[0109] A decryption subunit is used by the target data processor to decrypt the calculation result based on the processor's joint public key;

[0110] The encryption subunit is used by the target data processor to encrypt the homomorphic decryption result based on the user's public key of the target data user; the user's public key is synthesized from multiple sub-public keys of the target data user.

[0111] Optionally, the decryption unit 303 is used for:

[0112] The user of the target data decrypts the second ciphertext based on the user's private key.

[0113] Optionally, the device further includes:

[0114] The request-response unit is used for the target data processor to respond to the data user's data usage request, and based on the data usage request, to send an authorization request to the data provider;

[0115] The authorization unit is used when the data provider agrees to the authorization, and the data user is the target data user; at the same time, the data provider uploads the authorization information to the blockchain for evidence storage.

[0116] Optionally, the homomorphic encryption unit 301 includes:

[0117] The slicing subunit is used to slice the data to be traded when the size of the data to be traded exceeds a preset range, so as to obtain multiple data slices to be traded.

[0118] Separate encryption subunits are used by the data provider to perform homomorphic encryption on multiple data slices to be traded, thereby obtaining multiple first ciphertexts;

[0119] The numbering sub-unit is used by the data provider to write the current data provider, target data processor, and corresponding data slice number to be traded for each first ciphertext into the metadata.

[0120] Optionally, the decryption unit 303 is used for:

[0121] The target data user will decrypt and aggregate the multiple second ciphertexts received.

[0122] Optionally, the first ciphertext and the second ciphertext can be uploaded to the blockchain after hash processing.

[0123] The embodiments in this specification are described in a progressive manner. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant details can be found in the method section.

[0124] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0125] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0126] The features described in the embodiments of this specification can be substituted for or combined with each other, so that those skilled in the art can implement or use this application.

[0127] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for data trading, characterized in that, include: The data provider homomorphically encrypts the data to be traded to obtain the first ciphertext, and writes the current data provider and the target data processor into the metadata. The metadata and the first ciphertext are then uploaded to the blockchain. The target data processor is a data processor with the operation permission for the data to be traded determined by the data provider. The target data processor performs homomorphic computation on the first ciphertext, decrypts the computation result homomorphically, and then encrypts it based on the target data user to obtain the second ciphertext. The current data processor and the target data user are written into the metadata, and the metadata and the second ciphertext are uploaded to the blockchain together. The target data user is a data user with the operation permission of the data to be traded determined by the data provider. The target data user decrypts the second ciphertext to obtain the data to be traded, and writes the current data user into the metadata and uploads it to the blockchain; The contribution values ​​of the data provider, data processor, and data user in the data transaction are obtained based on the metadata.

2. The method according to claim 1, characterized in that, The first ciphertext, obtained by homomorphically encrypting the data to be traded through the data provider, includes: The target data processor generates a processor private key and processor noise; The data processor obtains the processor's joint public key based on the processor's private key, the processor's noise, and preset shared parameters; The data provider performs homomorphic encryption on the data to be traded based on the joint public key of the processor to obtain the first ciphertext; the first ciphertext is ciphertext that has undergone noise operation.

3. The method according to claim 2, characterized in that, The step of performing homomorphic computation on the first ciphertext through the target data processor includes: The target data processor performs homomorphic computation on the first ciphertext to obtain the computation result; the computation result is the ciphertext.

4. The method according to claim 2, characterized in that, The step of homomorphically decrypting the calculation result and then encrypting it based on the target data user includes: The target data processor decrypts the calculation result based on the processor's joint public key; The target data processor encrypts the homomorphic decryption result based on the user's public key of the target data user; the user's public key is synthesized from the sub-public keys of multiple target data users.

5. The method according to claim 1, characterized in that, The step of decrypting the second ciphertext through the target data user includes: The user of the target data decrypts the second ciphertext based on the user's private key.

6. The method according to claim 3, characterized in that, Before encryption based on the target data user, the method further includes: The target data processor responds to the data user's data usage request and, based on the data usage request, sends an authorization request to the data provider; When the data provider agrees to the authorization, the data user is the target data user; at the same time, the data provider uploads the authorization information to the blockchain for evidence storage.

7. The method according to claim 1, characterized in that, The step involves homomorphically encrypting the data to be traded through the data provider to obtain the first ciphertext, and then writing the current data provider and the target data processor into the metadata, including: When the size of the data to be traded exceeds a preset range, the data provider performs slicing on the data to be traded to obtain multiple data slices. The data provider performs homomorphic encryption on multiple data slices to be traded, resulting in multiple first ciphertexts; The data provider writes the current data provider, the target data processor, and the corresponding data slice number to be traded into the metadata for each first ciphertext.

8. The method according to claim 7, characterized in that, The step of decrypting the second ciphertext through the target data user includes: The target data user will decrypt and aggregate the multiple second ciphertexts received.

9. The method according to any one of claims 1-8, characterized in that, The first and second ciphertexts are uploaded to the blockchain after being hashed.

10. A data transaction apparatus, characterized in that, include: Homomorphic encryption unit, secondary encryption unit, decryption unit, and contribution unit; The homomorphic encryption unit is used to homomorphically encrypt the data to be traded by the data provider to obtain the first ciphertext, and write the current data provider and the target data processor into the metadata, and upload the metadata and the first ciphertext together to the blockchain; the target data processor is a data processor with the operation permission of the data to be traded determined by the data provider. The secondary encryption unit performs homomorphic computation on the first ciphertext by the target data processor, performs homomorphic decryption on the computation result, and then encrypts it based on the target data user to obtain the second ciphertext. The current data processor and the target data user are written into the metadata, and the metadata and the second ciphertext are uploaded to the blockchain together. The target data user is a data user with the operation permission for the data to be traded determined by the data provider. The decryption unit is used to decrypt the second ciphertext through the target data user to obtain the data to be traded, and to write the current data user into the metadata and upload it to the blockchain. The contribution unit is used to obtain the contribution values ​​of the data provider, data processor and data user in the data transaction based on the metadata.

Citation Information

Patent Citations

  • Medical record storage, sharing and security claim settlement model and method based on a block chain

    CN110008746A

  • Private data processing method, device and system based on block chain

    CN113722753A