Privacy data sharing methods and devices

CN117278236BActive Publication Date: 2026-09-18BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210685356.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-15
Publication Date
2026-09-18
Estimated Expiration
2042-06-15

AI Technical Summary

Technical Problem

在现有隐私集合求交算法中,安全性较弱,尤其针对企业/机构拥有大批量用户容易造成撞库攻击等风险

Benefits of technology

[0012] The privacy data sharing method and apparatus provided in this disclosure, within a consortium blockchain, allow enterprise and institutional members to obtain user intersection information by constructing smart contracts and utilizing Threshold-Paillier multi-party privacy sets for intersection. During this process, no user identity information outside the intersection sought by the collaborative task is leaked, thus protecting the privacy of individual user identities. Simultaneously, enterprises and institutions share privacy data through two-way authentication encryption, and during the sharing process, the hash value of the data is stored on-chain, ensuring the traceability and tamper-proof nature of user data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117278236B_ABST
    Figure CN117278236B_ABST
Patent Text Reader

Abstract

This disclosure provides a method and apparatus for sharing private data, relating to the field of artificial intelligence, and particularly to the field of blockchain. The specific implementation scheme is as follows: creating a channel and inviting at least one participant to join the channel; installing and instantiating a smart contract; generating a public key and a private key for each participant according to a homomorphic encryption algorithm, and sending the public key and corresponding private key to each participant so that each participant can use the public key and corresponding private key to encrypt the shared data; obtaining the ciphertext sent by each participant from the blockchain and aggregating it to obtain aggregated ciphertext; decrypting the aggregated ciphertext to obtain a privacy intersection set; and publishing the privacy intersection set to the blockchain through the smart contract. This implementation, by combining blockchain with a multi-party privacy set intersection method, can obtain a multi-party user set without leaking any identity information of users outside the intersection of the collaborative task, thus protecting the privacy of individual user identities.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of artificial intelligence, and more particularly to the field of blockchain, specifically a method and apparatus for sharing private data. Background Technology

[0002] With the development of the mobile internet, users are increasingly concerned about personal data security and privacy. On November 1, 2021, my country's Personal Information Protection Law officially came into effect, requiring enterprises and institutions to protect privacy data and promote innovative development of the internet. Among the challenges, how to share user data while protecting individual data privacy involves overcoming "data silos," requiring collaboration among multiple institutions. Furthermore, enterprises and institutions must protect the privacy and security of user data during the data sharing process.

[0003] Currently, in the process of data sharing, enterprises / organizations mainly share data based on business needs. Current blockchain-based data sharing does not consider the privacy of individual users. Existing privacy set intersection algorithms have relatively weak security, especially for enterprises / organizations with a large number of users, making them susceptible to risks such as credential stuffing attacks. Among privacy intersection schemes based on homomorphic encryption, many utilize additive homomorphic two-way privacy intersection algorithms. However, two-way homomorphic encryption privacy intersection schemes have poor scalability and are not conducive to multi-party data computation in a blockchain environment. Summary of the Invention

[0004] This disclosure provides a method, apparatus, device, storage medium, and computer program product for sharing privacy-preserving data.

[0005] According to a first aspect of this disclosure, a method for sharing private data is provided, comprising: creating a channel and inviting at least one participant to join the channel; installing and instantiating a smart contract; generating a public key and a private key for each participant according to a homomorphic encryption algorithm, and sending the public key and the corresponding private key to each participant, so that each participant uses the public key and the corresponding private key to encrypt shared data; obtaining ciphertext sent by each participant from a blockchain and aggregating it to obtain aggregated ciphertext; decrypting the aggregated ciphertext to obtain a privacy intersection set; and publishing the privacy intersection set to the blockchain through the smart contract.

[0006] According to a second aspect of this disclosure, a method for sharing privacy data is provided, comprising: receiving an invitation from a collaborative task initiator node to join a channel; installing and instantiating a smart contract; obtaining a public key and a private key; encrypting the data to be shared using the public key and the private key to obtain ciphertext; sending the ciphertext to a blockchain, so that the collaborative task initiator obtains the ciphertext of each participant from the blockchain, calculates a privacy intersection set, and uploads it to the blockchain; obtaining the privacy intersection set from the blockchain; and sharing the shared data involved in the privacy intersection set with other participants via a bidirectional secure socket protocol.

[0007] According to a third aspect of this disclosure, a privacy data sharing device is provided, comprising: a creation unit configured to create a channel and invite at least one participant to join the channel; an installation unit configured to install and instantiate a smart contract; a generation unit configured to generate a public key and a private key for each participant according to a homomorphic encryption algorithm, and send the public key and the corresponding private key to each participant, so that each participant uses the public key and the corresponding private key to encrypt shared data; an aggregation unit configured to obtain ciphertext sent by each participant from a blockchain and aggregate it to obtain aggregated ciphertext; a decryption unit configured to decrypt the aggregated ciphertext to obtain a privacy intersection set; and a publishing unit configured to publish the privacy intersection set to the blockchain via a smart contract.

[0008] According to a fourth aspect of this disclosure, a privacy data sharing device is provided, comprising: a joining unit configured to receive an invitation from a collaborative task initiator node to join a channel; an installation unit configured to install and instantiate a smart contract; a first acquisition unit configured to acquire a public key and a private key; an encryption unit configured to encrypt data to be shared based on the public key and the private key to obtain ciphertext; a sending unit configured to send the ciphertext to a blockchain, so that the collaborative task initiator can obtain the ciphertext of each participant from the blockchain, calculate a privacy intersection set, and upload it to the blockchain; a second acquisition unit configured to obtain the privacy intersection set from the blockchain; and a sharing unit configured to share the shared data involved in the privacy intersection set with other participants via a bidirectional secure socket protocol.

[0009] According to a fifth aspect of this disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of the first and second aspects.

[0010] According to a sixth aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause the computer to perform the method of any one of the first and second aspects.

[0011] According to a seventh aspect of this disclosure, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the method of any one of the first and second aspects.

[0012] The privacy data sharing method and apparatus provided in this disclosure, within a consortium blockchain, allow enterprise and institutional members to obtain user intersection information by constructing smart contracts and utilizing Threshold-Paillier multi-party privacy sets for intersection. During this process, no user identity information outside the intersection sought by the collaborative task is leaked, thus protecting the privacy of individual user identities. Simultaneously, enterprises and institutions share privacy data through two-way authentication encryption, and during the sharing process, the hash value of the data is stored on-chain, ensuring the traceability and tamper-proof nature of user data.

[0013] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0014] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:

[0015] Figure 1 This is an exemplary system architecture diagram to which one embodiment of this disclosure can be applied;

[0016] Figure 2 This is a flowchart of one embodiment of the privacy data sharing method according to this disclosure;

[0017] Figure 3 This is a flowchart of yet another embodiment of the privacy data sharing method according to the present disclosure;

[0018] Figure 4 This is a schematic diagram of an application scenario of the privacy data sharing method disclosed herein;

[0019] Figure 5 This is a schematic diagram of a structure of an embodiment of a privacy data sharing device according to the present disclosure;

[0020] Figure 6 This is a schematic diagram of the structure of yet another embodiment of the privacy data sharing device according to the present disclosure;

[0021] Figure 7This is a schematic diagram of the structure of a computer system suitable for implementing embodiments of the present disclosure. Detailed Implementation

[0022] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0023] Figure 1 An exemplary system architecture is shown that embodiments of the privacy data sharing method or privacy data sharing apparatus to which this disclosure can be applied are illustrated.

[0024] like Figure 1 As shown, the system architecture includes a consortium blockchain network. Users can enable their terminal devices to interact with the blockchain via the network to receive or send messages, etc. Various communication client applications can be installed on the terminal devices, such as shopping apps, IoT apps, web browsers, search apps, instant messaging tools, email clients, and social media platforms.

[0025] Terminal devices can be hardware or software. When a terminal device is hardware, it can be any electronic device that supports blockchain access. Each terminal device can connect to at least one node in the blockchain; for example, a collaborative task initiator terminal can connect to only node 1 or all nodes. Regardless of which node it connects to, it can access the shared data on the blockchain. The collaborative task initiator terminal is the terminal used by the participants in the collaborative task initiation action.

[0026] The system architecture may also include third-party servers, which can provide node management functions, such as adding / deleting nodes, specifying the accounts of collaborative task initiators or participants, etc.

[0027] This application proposes a privacy-preserving data sharing method based on consortium blockchain and homomorphic encryption. Enterprises and institutions can collaborate on privacy-preserving intersection operations involving user sets by constructing a consortium blockchain. After obtaining the intersection results from the users, the enterprises or institutions share the privacy data using a two-way authentication and encryption method, and also share the hash value of the privacy data on the blockchain, enabling privacy data to be shared across "data silos."

[0028] Enterprises and institutions build basic trust relationships by establishing consortium blockchain nodes, such as Figure 1As shown, for example, companies A, B, and C own consortium blockchain nodes 1, 2, and 3 respectively, while institutions D, E, and F own nodes 4, 5, and 6 respectively. AF constructs a consortium blockchain through a cooperative model and sets consensus algorithms (such as Kafka, Raft, PBFT, etc.) to ensure data consistency and correctness.

[0029] It should be noted that the privacy data sharing method provided in the embodiments of this disclosure is generally executed by blockchain nodes. Accordingly, the privacy data sharing device is generally located within the blockchain nodes.

[0030] It should be understood that Figure 1 The number of nodes in the blockchain shown is merely illustrative. Depending on implementation needs, there can be any number of blockchain nodes.

[0031] Continue to refer to Figure 2 This illustrates a process 200 applied to a collaborative task initiator node according to an embodiment of the privacy data sharing method of this disclosure. The privacy data sharing method includes the following steps:

[0032] Step 201: Create a channel and invite at least one participant to join the channel.

[0033] In this embodiment, the entity executing the privacy data sharing method (e.g. Figure 1 The nodes shown can create channels on the blockchain via wired or wireless connections from users' data-sharing terminals. Channels allow specific nodes and applications within the blockchain network to interact with each other. Application A can communicate directly with nodes P1 and P2 using channel C.

[0034] The initiator of a collaborative task can invite at least one participant to join the channel. For example, in Figure 1 In the process, organization E initiates a collaborative task, inviting companies A and B to join the collaborative task channel. After A and B agree...

[0035] Step 202: Install and instantiate the smart contract.

[0036] In this embodiment, after constructing a collaborative task smart contract (such as a joint credit reporting smart contract), each participant in the collaborative task installs and instantiates the smart contract. The smart contract may include the task's objective, participant information, and each participant's public and private key information for this task. A smart contract allows for traceable, irreversible, and secure transactions to be executed according to its terms without the need for a trusted third party. Triggering conditions are set in the smart contract through code; the result operation is only executed after the conditions are met. Smart contracts enable secure transactions between two strangers without a trusted central authority. Essentially, a smart contract is a piece of automatically executable code that executes automatically when triggering conditions are met.

[0037] Step 203: Generate a public key and a private key for each participant according to the homomorphic encryption algorithm, and send the public key and the corresponding private key to each participant so that each participant can use the public key and the corresponding private key to encrypt the shared data.

[0038] In this embodiment, homomorphic encryption refers to an encryption function that performs addition and multiplication operations on a ring on plaintext before encryption, which is equivalent to performing the corresponding operations on the encrypted ciphertext, yielding the same result. Due to this desirable property, people can entrust third parties to process data without leaking information. An encryption function with homomorphic properties is one that satisfies the following conditions: The encryption function, where En is the encryption operation, Dec is the decryption operation, and ⊙, These correspond to operations on the plaintext and ciphertext fields, respectively. When When representing addition, the encryption is called addative homomorphic encryption: when When representing multiplication, this encryption is called multiplicative homomorphic encryption. The public and private keys here can be generated by conventional homomorphic encryption algorithms, such as RSA, Elgamal, Paillier, etc.

[0039] For each participant, the public key and the participant's private key can be sent to each other through an established channel. Alternatively, the public key and the participant's private key can be sent to each other through other channels of the blockchain.

[0040] In some optional implementations of this embodiment, public and private keys are generated according to the Threshold-Paillier algorithm. The Threshold-Paillier algorithm allows members on the blockchain to perform multi-party privacy set intersections.

[0041] The specific privacy set intersection algorithm is as follows: For each privacy intersection participant, i∈{1,.....t-1}, t>=3, each enterprise / institution has a private key sk iThe goal of the entire alliance is to obtain the intersection set of set S = ∩ti = 1Si.

[0042] Threshold-Paillier key generation: Select two prime numbers p and q, satisfying p = 2p′ + 1 and q = 2q′ + 1, where p′ and q′ are two other prime numbers. Let N = pq and M = p′q′, and simultaneously select... Let g = (1 + N) a b N mod N 2 Random selection Then the private key sk = (β × M), and a0 = βM, and then select a polynomial. Private key sk i =f(i)mod NM, public key pk=(g, N=aMβ mod N), and public key pk and private key sk i Distribute the data to the user set and find the participants.

[0043] Then each participant (including the initiator of the collaborative task) uses a public key and a private key to encrypt the data, as follows:

[0044] Paillier's basic encryption algorithm, assuming the set of data to be encrypted is X, the ciphertext data is C, and a random number r is selected:

[0045] C = g X r N mod N 2

[0046] Threshold-Paillier keys support intersection calculations among multiple parties, and are convenient and fast.

[0047] Step 204: Obtain the ciphertext sent by each participant from the blockchain and aggregate it to obtain the aggregated ciphertext.

[0048] In this embodiment, the ciphertext sent by i participants is aggregated. The encryption algorithm has the property of being able to re-randomize, and re-randomization can update the ciphertext:

[0049]

[0050] The initiator of the collaborative task, i.e., the aggregator, can publish the aggregated ciphertext to the blockchain, where each participant can then encrypt it again using their private key. Optionally, the aggregator, knowing the private keys of each participant, can encrypt the aggregated ciphertext again using Formula 1 to obtain the aggregated ciphertext C. i .

[0051] Each data owner uses Threshold-Paillier encryption for individual information:

[0052] Where Δ = t! (1)

[0053] Here, C refers to

[0054] Alternatively, the Private Set Intersection (PSI) algorithm can be used to obtain the intersection of the data held by both parties without revealing any additional information. Here, additional information refers to any information other than the intersection of the data held by both parties.

[0055] Privacy set intersection is extremely useful in real-world scenarios, such as data alignment in longitudinal federated learning or friend discovery using address books in social media. Therefore, a secure and fast privacy set intersection algorithm is crucial.

[0056] Step 205: Decrypt the aggregated ciphertext to obtain the privacy intersection set.

[0057] In this embodiment, C is adjusted using Formula 2. i Decrypt and obtain the plaintext of the intersection of all participants' sets:

[0058]

[0059] in,

[0060] u is an element in the set.

[0061] Step 206: Publish the privacy intersection set to the blockchain via a smart contract.

[0062] In this embodiment, the final aggregator publishes the privacy set intersection result to the blockchain via a smart contract. Each participating party shares the intersection user data with the task's collaborating party via two-way SSL using the obtained privacy intersection set. Simultaneously, the shared data hash value is recorded on the blockchain, and the data sharing process log is recorded on the blockchain ledger. This log needs to include process information such as the size of the shared data, the number of shared data entries, the hash of the shared data, and the timestamp of successful sharing.

[0063] The method provided in the above embodiments of this disclosure, by combining blockchain with a method for finding the intersection of multiple privacy sets, can protect the individual privacy of other users while obtaining a set of multiple users. Furthermore, after obtaining the privacy set, the privacy data is shared via bidirectional SSL and the data information is recorded in the blockchain ledger, which can ensure the traceability and tamper-proof nature of the shared data.

[0064] In some optional implementations of this embodiment, the method further includes: in response to receiving a request to join the shared data, determining whether the applicant meets the joining criteria according to the voting strategy set in the genesis block; if the applicant meets the joining criteria, generating the applicant's private key according to a homomorphic encryption algorithm, and sending the public key and the applicant's private key to the applicant.

[0065] If other companies / organizations wish to join, the voting strategy set in the genesis block (such as Majority, ANY, ALL) can be used to determine whether the inviting party meets the joining criteria, thereby reaching a consensus among the participants to join the task. This allows for the dynamic addition of new nodes and enriches the shared data content.

[0066] Further reference Figure 3 This illustrates a process 300 of a privacy data sharing method applied to a participant node in one embodiment. The process 300 of the privacy data sharing method includes the following steps:

[0067] Step 301: Receive an invitation from the collaborative task initiator node to join the channel.

[0068] In this embodiment, the entity executing the privacy data sharing method (e.g. Figure 1 The node shown can receive an invitation from the collaborative task initiator node through a wired or wireless connection and join the channel established by the collaborative task initiator.

[0069] Step 302: Install and instantiate the smart contract.

[0070] In this embodiment, after constructing a collaborative task smart contract (such as a joint credit investigation smart contract), each participant in the collaborative task installs and instantiates the smart contract. The smart contract may include the task's objective, the task's participant information, and the public and private key information of each participant for this task.

[0071] Step 303: Obtain the public and private keys.

[0072] In this embodiment, public and private keys can be obtained through the blockchain. Each participant in the task can obtain the public and private keys by calling the homomorphic encryption algorithm library in the smart contract through the SDK or CLI.

[0073] Step 304: Encrypt the data to be shared using the public and private keys to obtain ciphertext.

[0074] In this embodiment, a random number r can be obtained from a homomorphic encryption algorithm library and the private data can be encrypted using a public key to obtain intermediate ciphertext. Then, the intermediate ciphertext is encrypted using a private key to generate ciphertext. For example, using Paillier's basic encryption algorithm, if the data to be encrypted is X and the ciphertext data is C, a random number r is selected:

[0075] C = g X r N modN 2

[0076] Step 305: Send the ciphertext to the blockchain so that the initiator of the collaborative task can obtain the ciphertext of each participant from the blockchain, calculate the privacy intersection set, and then upload it to the blockchain.

[0077] In this embodiment, the ciphertext obtained in step 304 is uploaded to the blockchain. The initiator of the collaborative task can listen to the ciphertext sent by each participant from the blockchain, and then aggregate the ciphertexts of all participants using the method described in step 204, calculate the privacy intersection set, and upload it to the blockchain.

[0078] Optionally, it is also necessary to obtain the aggregated ciphertext from the blockchain, encrypt it using a private key, and perform Threshold-Paillier encryption for each data owner's individual information:

[0079] Where Δ = t! (1)

[0080] Then the C i Published to the blockchain, where aggregators compute the privacy-preserving intersection set.

[0081] If the current node is the initiator of the collaborative task, private key encryption can be performed directly on the local machine.

[0082] Step 306: Obtain the privacy intersection set from the blockchain.

[0083] In this embodiment, each participant can obtain a privacy intersection set from the blockchain.

[0084] Step 307: Share the shared data involved in the privacy intersection set with other participants through a two-way secure socket protocol.

[0085] In this embodiment, the privacy intersection set is the intersection ID of the shared data of all participants (including the initiator of the collaborative task). For example, all shared data includes the personal information of Zhang San and Li Si. Then, each pair of participants can share the shared data involved in their privacy intersection set with each other via SSL. For example, node 1 sends Zhang San and Li Si's bank loan information to node 2, and node 2 sends Zhang San and Li Si's bank deposit information to node 1.

[0086] In some optional implementations of this embodiment, the method further includes: calculating the hash value of the shared data; and uploading the hash value to the blockchain. Uploading the fingerprint of the data information to the blockchain after sharing the privacy data via two-way SSL can ensure the tamper-proof nature of the shared data.

[0087] In some optional implementations of this embodiment, the method further includes: recording the data sharing process log on the blockchain ledger, wherein the process log includes at least one of the following: the size of the shared data, the entries of the shared data, the hash value of the shared data, and a timestamp of successful sharing. Recording the data information on the blockchain ledger after sharing private data via two-way SSL ensures the traceability and tamper-proof nature of the shared data.

[0088] See also Figure 4 , Figure 4 This is a schematic diagram of an application scenario of the privacy data sharing method according to this embodiment. Figure 4 This is a flowchart illustrating the process of privacy-preserving intersection of user sets using blockchain smart contracts and the Threshold-Paillier algorithm. Taking the data aggregator's process as an example, each participant first obtains a random number r by calling the Threshold-Paillier algorithm library via SDK or CLI and encrypts the privacy data X using Formula 1 to obtain ciphertext c. Then, the ciphertext c is published on the blockchain by calling the smart contract (success.protos(C).message, meaning whether the encrypted data has been successfully sent to the blockchain node via the protos protocol). Verification is then performed by the validator node. Once all participants have completed uploading their ciphertexts to the blockchain, the aggregator queries the ciphertext C of all enterprises and institutions via the smart contract. i The encrypted data is aggregated, and the query results also need to be verified by a verification node. After aggregation, the aggregator uses the private keys of each participant to encrypt the data using Formula 1. Then, Formula 2 is used to decrypt the data and obtain the privacy intersection set. Finally, the privacy intersection set is published to the blockchain via a smart contract, and it still needs to be verified by a verification node.

[0089] Further reference Figure 5 As an implementation of the methods shown in the above figures, this disclosure provides an embodiment of a privacy data sharing device, which is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.

[0090] like Figure 5As shown, the privacy data sharing device 500 of this embodiment includes: a creation unit 501, an installation unit 502, a generation unit 503, an aggregation unit 504, a decryption unit 505, and a publishing unit 506. Specifically, the creation unit 501 is configured to create a channel and invite at least one participant to join the channel; the installation unit 502 is configured to install and instantiate a smart contract; the generation unit 503 is configured to generate a public key and a private key for each participant according to a homomorphic encryption algorithm, and send the public key and the corresponding private key to each participant so that each participant can use the public key and the corresponding private key to encrypt the shared data; the aggregation unit 504 is configured to obtain the ciphertext sent by each participant from the blockchain and aggregate it to obtain aggregated ciphertext; the decryption unit 505 is configured to decrypt the aggregated ciphertext to obtain a privacy intersection set; and the publishing unit 506 is configured to publish the privacy intersection set to the blockchain through a smart contract.

[0091] In this embodiment, the specific processing of the creation unit 501, installation unit 502, generation unit 503, aggregation unit 504, decryption unit 505, and publishing unit 506 of the privacy data sharing device 500 can be referred to Figure 2 The corresponding steps are 201, 202, 203, 204, 205 and 206 in the embodiment.

[0092] In some optional implementations of this embodiment, the device 500 further includes an adding unit (not shown in the figures), configured to: in response to receiving a request to join the shared data, determine whether the applicant meets the joining criteria according to the voting strategy set in the genesis block; if the applicant meets the joining criteria, generate the applicant's private key according to the homomorphic encryption algorithm, and send the public key and the applicant's private key to the applicant.

[0093] In some optional implementations of this embodiment, the generation unit 503 is further configured to generate a public key and a private key according to the Threshold-Paillier algorithm.

[0094] Further reference Figure 6 As an implementation of the methods shown in the above figures, this disclosure provides an embodiment of a privacy data sharing device, which is similar to... Figure 3 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.

[0095] like Figure 6As shown, the privacy data sharing device 600 of this embodiment includes: a joining unit 601, an installation unit 602, a first acquisition unit 603, an encryption unit 604, a sending unit 605, a second acquisition unit 606, and a sharing unit 607. The joining unit 601 is configured to receive an invitation to join the channel from a collaborative task initiator node; the installation unit 602 is configured to install and instantiate a smart contract; the first acquisition unit 603 is configured to acquire a public key and a private key; the encryption unit 604 is configured to encrypt the data to be shared based on the public key and the private key to obtain ciphertext; the sending unit 605 is configured to send the ciphertext to the blockchain, so that the collaborative task initiator can obtain the ciphertext of each participant from the blockchain, calculate the privacy intersection set, and upload it to the blockchain; the second acquisition unit 606 is configured to obtain the privacy intersection set from the blockchain; and the sharing unit 607 is configured to share the shared data involved in the privacy intersection set with other participants via a bidirectional secure socket protocol.

[0096] In this embodiment, the specific processing of the joining unit 601, installation unit 602, first acquisition unit 603, encryption unit 604, sending unit 605, second acquisition unit 606, and sharing unit 607 of the privacy data sharing device 600 can be referred to Figure 3 Steps 301-307 in the corresponding embodiment.

[0097] In some optional implementations of this embodiment, the device 600 further includes a recording unit (not shown in the figures), configured to: calculate the hash value of the shared data; and upload the hash value to the blockchain.

[0098] In some optional implementations of this embodiment, the recording unit is further configured to: record the process log of data sharing on the blockchain ledger, wherein the process log record includes at least one of the following: the size of the shared data, the entries of the shared data, the hash value of the shared data, and the timestamp of successful sharing.

[0099] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0100] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0101] An electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method described in process 200 or 300.

[0102] A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to perform the method described in process 200 or 300.

[0103] A computer program product includes a computer program that, when executed by a processor, implements the method described in process 200 or 300.

[0104] Figure 7 A schematic block diagram of an example electronic device 700 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0105] like Figure 7 As shown, device 700 includes a computing unit 701, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 702 or a computer program loaded into random access memory (RAM) 703 from storage unit 708. RAM 703 may also store various programs and data required for the operation of device 700. The computing unit 701, ROM 702, and RAM 703 are interconnected via bus 704. Input / output (I / O) interface 705 is also connected to bus 704.

[0106] Multiple components in device 700 are connected to I / O interface 705, including: input unit 706, such as keyboard, mouse, etc.; output unit 707, such as various types of monitors, speakers, etc.; storage unit 708, such as disk, optical disk, etc.; and communication unit 709, such as network card, modem, wireless transceiver, etc. Communication unit 709 allows device 700 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0107] The computing unit 701 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 701 performs the various methods and processes described above, such as methods for sharing private data. For example, in some embodiments, the method for sharing private data may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on device 700 via ROM 702 and / or communication unit 709. When the computer program is loaded into RAM 703 and executed by the computing unit 701, one or more steps of the method for sharing private data described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the method for sharing private data by any other suitable means (e.g., by means of firmware).

[0108] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0109] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0110] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0111] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0112] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0113] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.

[0114] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0115] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A method for sharing privacy-preserving data, comprising: Create a channel and invite at least one participant to join the channel, wherein the channel allows specific nodes and applications in the blockchain network to interact with each other; Install and instantiate the smart contract; A public key and a private key for each participant are generated according to a homomorphic encryption algorithm, and the public key and the corresponding private key are sent to each participant so that each participant can use the public key and the corresponding private key to encrypt the shared data. The ciphertext sent by each participant is obtained from the blockchain and aggregated to obtain the aggregated ciphertext. If the aggregator knows the private keys of each participant, the aggregator will encrypt the aggregated ciphertext again to obtain the aggregated ciphertext. Alternatively, the aggregated ciphertext can be obtained by using a privacy set intersection algorithm without disclosing any information other than the intersection of their data. Decrypt the aggregated ciphertext to obtain the privacy intersection set; The privacy intersection set is published to the blockchain through a smart contract.

2. The method according to claim 1, wherein, The method further includes: In response to receiving a request to join the shared data, the system determines whether the applicant meets the joining criteria based on the voting strategy set in the genesis block. If the criteria for joining are met, the applicant's private key is generated according to the homomorphic encryption algorithm, and the public key and the applicant's private key are sent to the applicant.

3. The method according to claim 1, wherein, The generation of public and private keys based on the homomorphic encryption algorithm includes: The public and private keys are generated using the Threshold-Paillier algorithm.

4. A method for sharing privacy-preserving data, comprising: Receive invitations from the node that initiated the collaborative task to join the channel; Install and instantiate the smart contract; Obtain the public and private keys; The data to be shared is encrypted using the public key and the private key to obtain ciphertext; The ciphertext is sent to the blockchain so that the collaborative task initiator can obtain the ciphertext of each participant from the blockchain and calculate the privacy intersection set according to any one of claims 1-3 and then upload it to the blockchain. Obtaining privacy-preserving intersection sets from blockchain; The shared data involved in the privacy intersection set is shared with other participants via a two-way secure socket protocol.

5. The method according to claim 1, wherein, The method further includes: Calculate the hash value of the shared data; The hash value is uploaded to the blockchain.

6. The method according to claim 5, wherein, The method further includes: The process of data sharing is logged on the blockchain ledger, wherein the process log includes at least one of the following: the size of the shared data, the entries of the shared data, the hash value of the shared data, and the timestamp of successful sharing.

7. A privacy data sharing device, comprising: A creation unit is configured to create a channel and invite at least one participant to join the channel, wherein the channel allows specific nodes and applications in the blockchain network to interact with each other; The installation unit is configured to install and instantiate smart contracts; The generation unit is configured to generate a public key and a private key for each participant according to a homomorphic encryption algorithm, and send the public key and the corresponding private key to each participant so that each participant can use the public key and the corresponding private key to encrypt shared data. The aggregation unit is configured to obtain the ciphertext sent by each participant from the blockchain and aggregate it to obtain the aggregated ciphertext. If the aggregator knows the private keys of each participant, the aggregator will encrypt the aggregated ciphertext again to obtain the aggregated ciphertext. Alternatively, the participants can use a privacy set intersection algorithm to obtain the aggregated ciphertext without disclosing any information other than the intersection of their data. The decryption unit is configured to decrypt the aggregated ciphertext to obtain a privacy intersection set; The publishing unit is configured to publish the privacy intersection set to the blockchain via a smart contract.

8. The apparatus according to claim 7, wherein, The device further includes an adding unit configured to: In response to receiving a request to join the shared data, the system determines whether the applicant meets the joining criteria based on the voting strategy set in the genesis block. If the criteria for joining are met, the applicant's private key is generated according to the homomorphic encryption algorithm, and the public key and the applicant's private key are sent to the applicant.

9. The apparatus according to claim 7, wherein, The generation unit is further configured to: The public and private keys are generated using the Threshold-Paillier algorithm.

10. A privacy data sharing device, comprising: The joining unit is configured to receive invitations from the node that initiated the collaborative task to join the channel; The installation unit is configured to install and instantiate smart contracts; The first acquisition unit is configured to acquire the public key and the private key; The encryption unit is configured to encrypt the data to be shared based on the public key and the private key to obtain ciphertext. The sending unit is configured to send the ciphertext to the blockchain, so that the collaborative task initiator obtains the ciphertext of each participant from the blockchain and calculates the privacy intersection set according to any one of claims 1-3 and uploads it to the blockchain. The second acquisition unit is configured to obtain a privacy intersection set from the blockchain; The sharing unit is configured to share the shared data involved in the privacy intersection set with other participants via a bidirectional secure socket protocol.

11. The apparatus according to claim 7, wherein, The device further includes a recording unit configured to: Calculate the hash value of the shared data; The hash value is uploaded to the blockchain.

12. The apparatus according to claim 11, wherein, The recording unit is further configured to: The process of data sharing is logged on the blockchain ledger, wherein the process log includes at least one of the following: the size of the shared data, the entries of the shared data, the hash value of the shared data, and the timestamp of successful sharing.

13. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.

14. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-6.

15. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Data sharing and exchanging method based on block chain

    CN111597583A

  • Multi-party electric power department collaborative user privacy protection and traceability method and system

    CN114547677A

  • Alliance chain information release control method and terminal device

    WO2020119536A1