Method, device and equipment for acquiring multi-party shared data and storage medium

By using smart contracts and homomorphic encryption technology on the blockchain, the problem of data privacy leakage in multi-party data sharing is solved, and security and efficient computing are achieved during data transmission and storage.

CN118747374APending Publication Date: 2024-10-08HEFEI CO OF ANHUI TOBACCO CO
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410963168.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-17
Publication Date
2024-10-08

AI Technical Summary

Technical Problem

On the premise of protecting the privacy of multi-party data, traditional methods have the risk of data privacy leakage. Especially in the process of data exchange and sharing, how to effectively realize multi-party data sharing is a technical challenge.

Method used

By using the participants in the data sharing behavior as blockchain nodes, using smart contracts and homomorphic encryption technology, the initiator of the agreement uses public and private keys to homomorphically encrypt the data, and synchronously encrypts the data through the blockchain to ensure that the data is transmitted and Security in stored procedures.

Benefits of technology

It implements a method of securely sharing multi-party data on the blockchain, preventing malicious access and analysis, while improving the efficiency and reliability of data sharing and processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118747374A_ABST
    Figure CN118747374A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-party shared data acquisition method and device, equipment and a storage medium. When the method provided by the embodiment of the invention is executed, firstly, a protocol partner performs homomorphic encryption on shared data held by the protocol partner by using a public key of a protocol initiator to obtain first encrypted data; then, common data held by all protocol matching parties are initialized through an initialization formula to obtain multiple pieces of initialized data, the initialized data are processed through a homomorphic encryption algorithm on the basis of the first encrypted data and the encrypted data of the protocol initiator, and second encrypted data are obtained; the protocol initiator encrypted data is common data of the protocol initiator encrypted using its public key. And the protocol initiator decrypts the second encrypted data by using the private key, and intersection of the decrypted data of all the protocol matching parties is solved to finally obtain actual common data. According to the method and the device, multi-party data sharing can be effectively realized while data privacy is protected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a method, device, equipment and storage medium for acquiring data shared by multiple parties. Background Art

[0002] In more and more application scenarios, it is necessary to obtain the shared data of multiple parties while protecting their privacy. For example, calculating the actual purchase effect of advertisements, finding shared contacts for new services, diagnosing and analyzing genetic data, and mining ETC hidden customers all require the collection and analysis of data from multiple participants to complete specific application recommendations or problem analysis.

[0003] Traditional methods often involve data centers or third-party intermediaries to collect and process data, but these methods may have the risk of privacy leakage, especially when data is exchanged and shared. Blockchain technology has been proposed as a solution. Blockchain has the characteristics of decentralization, immutability, security and controllability, and can effectively manage and protect the privacy of data.

[0004] However, uploading data to the blockchain directly based on plain text information usually leads to information leakage issues. In this case, even if the blockchain itself is secure, the data may be accessed and parsed by malicious parties or unauthorized persons during the upload process and when stored on the blockchain.

[0005] Therefore, how to effectively realize multi-party data sharing under the premise of protecting data privacy is a technical problem that technical personnel in this field urgently need to solve. Summary of the invention

[0006] Based on the above problems, the present application provides a method, device, equipment and storage medium for obtaining data shared by multiple parties, which can effectively realize multi-party data sharing under the premise of protecting data privacy.

[0007] The embodiments of the present application disclose the following technical solutions:

[0008] A method for acquiring multi-party shared data, wherein the participants in the data sharing behavior are used as blockchain nodes, and each participant has signed a smart contract, and the method includes:

[0009] Obtaining a public key in a public-private key pair owned by a protocol initiator and shared data held by each protocol partner, and using the public key to homomorphically encrypt the shared data held by each protocol partner to obtain a plurality of first encrypted data; the protocol initiator is a participant who has agreed on the shared data; the protocol partner is a participant who has shared data other than the protocol initiator;

[0010] Based on the shared data held by the protocol initiator, the shared data held by each of the protocol cooperators are respectively initialized using an initialization formula to obtain a plurality of initialization data;

[0011] Using a homomorphic encryption algorithm, the multiple initialization data are homomorphically encrypted based on the initiator encrypted data and the multiple first encrypted data to obtain multiple second encrypted data; the initiator encrypted data is encrypted data obtained by the protocol initiator using the public key in the public-private key pair to homomorphically encrypt the shared data held by the protocol initiator;

[0012] The multiple second encrypted data are synchronized to the protocol initiator through the blockchain, so that the protocol initiator uses the private key in the public-private key pair to decrypt the multiple second encrypted data, and calculates the intersection of the multiple data obtained by decryption to obtain the actual shared data.

[0013] In a possible implementation, the initialization formula is:

[0014]

[0015] Among them, r i ·p(x i ) is the initialization data; x i The common data held by the initiator of the protocol; j The shared data held by the parties to the agreement; i A random number introduced by the protocol partner.

[0016] In one possible implementation, if r i ·p(x i ) is 0, then the shared data of the protocol initiator and the shared data held by the protocol cooperator have an intersection;

[0017] If r i ·p(x i ) is not 0, then the shared data held by the protocol initiator has no intersection with the shared data held by the protocol cooperator.

[0018] In a possible implementation, the shared data includes a data name and data content;

[0019] The step of obtaining the intersection of the multiple decrypted data to obtain the actual shared data includes:

[0020] The data contents corresponding to the multiple data obtained by decryption are intersected to obtain the actual shared data content.

[0021] In a possible implementation, the public key in the public-private key pair, the first encrypted data, the second encrypted data, and the initiator encrypted data are all synchronized in all nodes of the blockchain.

[0022] A device for acquiring shared data by multiple parties, wherein the parties involved in the data sharing behavior are used as blockchain nodes, and smart contracts have been signed between the parties. The device includes:

[0023] An encryption acquisition unit is used to acquire a public key in a public-private key pair owned by a protocol initiator and shared data held by each protocol partner, and use the public key to homomorphically encrypt the shared data held by each protocol partner to obtain a plurality of first encrypted data; the protocol initiator is a participant who has agreed on the shared data; the protocol partner is a participant who has shared data other than the protocol initiator;

[0024] An initialization unit, configured to initialize the common data held by each of the protocol cooperating parties respectively based on the common data held by the protocol initiator using an initialization formula to obtain a plurality of initialization data;

[0025] a homomorphic encryption unit, configured to use a homomorphic encryption algorithm to homomorphically encrypt the multiple initialization data based on the initiator encrypted data and the multiple first encrypted data to obtain multiple second encrypted data; the initiator encrypted data is encrypted data obtained by the protocol initiator using the public key in the public-private key pair to homomorphically encrypt the shared data held by the protocol initiator;

[0026] A synchronization unit is used to synchronize the multiple second encrypted data to the protocol initiator through the blockchain, so that the protocol initiator uses the private key in the public-private key pair to decrypt the multiple second encrypted data, and obtains the intersection of the multiple data obtained by decryption to obtain the actual shared data.

[0027] In a possible implementation, the initialization formula is:

[0028]

[0029] Among them, r i ·p(x i ) is the initialization data; x i The common data held by the initiator of the protocol; j The shared data held by the parties to the agreement; i A random number introduced by the protocol partner.

[0030] In one possible implementation,

[0031] If r i ·p(xi ) is 0, then the shared data of the protocol initiator and the shared data held by the protocol cooperator have an intersection;

[0032] If r i ·p(x i ) is not 0, then the shared data held by the protocol initiator has no intersection with the shared data held by the protocol cooperator.

[0033] A device for acquiring data shared by multiple parties, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for acquiring data shared by multiple parties as described above is implemented.

[0034] A computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device executes the method for acquiring multi-party shared data as described above.

[0035] Compared with the prior art, this application has the following beneficial effects:

[0036] The present application provides a method, device, equipment and storage medium for obtaining multi-party shared data. Specifically, when executing the method for obtaining multi-party shared data provided by the embodiment of the present application, the public-private key pair of the protocol initiator of the agreed shared data and the shared data held by the protocol partner can be first obtained, and the shared data held by the protocol partner can be homomorphically encrypted using the public key in the public-private key pair to obtain the first encrypted data. Based on the initiator's encrypted data obtained by homomorphically encrypting the shared data held by the protocol initiator using the public key in its public-private key pair, the protocol initiator's shared data is initialized using the initialization formula to obtain the initialization data. Then, based on the first encrypted data and the initiator's encrypted data, the initialization data is homomorphically encrypted using the homomorphic encryption algorithm to obtain the second encrypted data. The second encrypted data is then synchronized to the protocol initiator through the blockchain, so that the protocol initiator uses the private key in the public-private key pair to decrypt the second encrypted data, and the multiple data obtained by decryption are intersected to obtain the actual shared data. Through homomorphic encryption technology, the present application allows the protocol initiator to encrypt the shared data it holds without leaking the data content. This encryption method ensures the security of data upload and processing. Even if the data is stored and transmitted on the blockchain, it is difficult to be parsed by malicious visitors. At the same time, through the synergy of blockchain-based homomorphic encryption technology and smart contracts, efficient multi-party shared data calculation is achieved. Participants can share data securely while ensuring the efficiency and real-time nature of the calculation process. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the technical solutions in this embodiment or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0038] Figure 1 A method flow chart of a method for acquiring data shared by multiple parties provided in an embodiment of the present application;

[0039] Figure 2 A schematic diagram of the structure of a device for acquiring data shared by multiple parties provided in an embodiment of the present application. DETAILED DESCRIPTION

[0040] To facilitate understanding of the technical solutions provided by the embodiments of the present application, the background technology involved in the embodiments of the present application will be described below.

[0041] As more and more demands are made to obtain shared data of multiple parties while protecting their data privacy, traditional data centers or third-party intermediaries are at risk of privacy leakage. To solve these problems, blockchain technology has been proposed as a solution, which has the characteristics of decentralization, immutability, and security and controllability, and can effectively manage and protect data privacy. However, directly uploading plaintext data to the blockchain may lead to information leakage. Even if the blockchain itself is secure, the data may still be accessed and parsed by malicious parties or unauthorized personnel during the upload and storage process.

[0042] In order to solve this problem, a method, device, equipment and storage medium for obtaining multi-party shared data are provided in the embodiment of the present application. The protocol initiator uses the public key in its own public and private keys to homomorphically encrypt the shared data it holds to obtain the initiator's encrypted data. At the same time, the protocol partner performs homomorphic encryption on the shared data it holds based on the public key of the protocol initiator to obtain the first encrypted data. Then, the protocol initiator initializes the shared data of the protocol initiator using the initialization formula to obtain the initialized data. Then, the homomorphic encryption algorithm is used to homomorphically encrypt multiple initialized data based on the initiator's encrypted data and multiple first encrypted data to obtain multiple second encrypted data. Finally, the second encrypted data is synchronized to the protocol initiator through the blockchain, decrypted using its private key pair, and the intersection between the decrypted data is obtained to obtain the actual shared data. The present application uses homomorphic encryption technology to ensure the security of data during upload and processing, and can effectively prevent malicious visitors from parsing even when the blockchain stores and transmits data. At the same time, through the synergy of smart contracts, efficient calculation and real-time processing of multi-party shared data are achieved, thereby improving the efficiency and reliability of data sharing and processing.

[0043] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0044] See also Figure 1 , which is a flow chart of a method for obtaining multi-party shared data provided by an embodiment of the present application, such as Figure 1 As shown, the method for obtaining data shared by multiple parties may include steps S101-S104:

[0045] S101: Obtain a public key in a public-private key pair owned by a protocol initiator and shared data held by each protocol partner, and use the public key to homomorphically encrypt the shared data held by each protocol partner to obtain a plurality of first encrypted data.

[0046] First, the public key in the public-private key pair of the protocol initiator is used to homomorphically encrypt the data shared by each protocol partner, and the first layer of encrypted data of each protocol partner is obtained. The protocol initiator is one of the participants in the shared data, and the protocol partners are the participants in the shared data other than the initiator.

[0047] The protocol initiator holds the public-private key pair (pk1, sk1) and the agreed shared data. The protocol initiator writes the public key pk1 into the blockchain node and synchronizes it to the blockchain nodes of other participants. At the same time, the public key pk1 is used to homomorphically encrypt x i Get the encrypted data of the initiator The initiator encrypts the data Write to the blockchain node and synchronize it to the blockchain nodes of other participants.

[0048] The parties to the agreement hold shared data y j (j=1,2…n), and the shared data y j (j=1,2…n) is stored in the private data storage area of ​​the blockchain node and is not published. The protocol partner uses the public key pk1 of the protocol initiator to encrypt and calculate y j Get the first encrypted data

[0049] It should be noted that the protocol initiator is the initiator of data sharing specified in the protocol and owns the shared data. The protocol collaborators are other participants other than the initiator, who also own the shared data and need to share the data with the protocol initiator for calculation or analysis.

[0050] Homomorphic encryption is a special encryption technology that allows data to be calculated in an encrypted state without decryption. The protocol initiator uses its own public key to homomorphically encrypt the shared data of the protocol partners to generate the first layer of encrypted data. This ensures that during the data transmission and processing process, even if the data is leaked or intercepted, the actual content of the data will not be leaked.

[0051] Participants (including protocol initiators and protocol collaborators) are all nodes of the blockchain network. Blockchain is a decentralized database where multiple nodes jointly maintain and verify the integrity and security of data. Smart contracts have been signed between the various participants. Smart contracts are automated contract codes running on the blockchain that define the agreements and behavioral rules between the participants. These contracts can ensure that the participants follow the agreed and logical rules during the data sharing process, thereby improving the credibility and security of transactions.

[0052] S102: Based on the shared data held by the protocol initiator, the shared data held by each of the protocol cooperators are initialized using an initialization formula to obtain a plurality of initialized data.

[0053] The protocol partner uses the shared data held by the protocol initiator to initialize the shared data held by the protocol partner of the protocol using an initialization formula, thereby obtaining the initialized data.

[0054] In a possible implementation, the initialization formula is:

[0055]

[0056] Among them, r i ·p(x i ) is the initialization data; x i The common data held by the initiator of the protocol; j The shared data held by the parties to the agreement; i A random number introduced by the protocol partner.

[0057] It should be noted that each protocol partner will calculate a corresponding initialization data.

[0058] S103: Using a homomorphic encryption algorithm, based on the initiator's encrypted data and the plurality of first encrypted data, homomorphically encrypt the plurality of initialization data to obtain a plurality of second encrypted data.

[0059] The protocol partner uses the properties of homomorphic encryption calculations to substitute the initiator's encrypted data and the first encrypted data respectively to obtain the second encrypted data: Substitute the encrypted data of the initiator respectively and first encrypted data Finally, the second encrypted data is obtained

[0060] S104: Synchronize the multiple second encrypted data to the protocol initiator through the blockchain, so that the protocol initiator uses the private key in the public-private key pair to decrypt the multiple second encrypted data, and obtain the intersection of the multiple data obtained by decryption to obtain the actual shared data.

[0061] The second encrypted data is data processed by homomorphic encryption, and its purpose is to protect the security and privacy of the data. The protocol partner synchronizes this data to the protocol initiator through the blockchain, and the protocol initiator uses its private key sk1 to encrypt the second encrypted data. Decryption is performed. After decryption, the data is restored to its original readable state, so that it can be further processed and analyzed. Next, all the decrypted data is subjected to an intersection operation. This means finding the overlap or commonality between these protocol partners. The final result is the actual shared data. This data is obtained by comparing and screening the decrypted data and can be used for further analysis, processing or sharing.

[0062] In one possible implementation, if r i ·p(x i ) is 0, then the shared data of the protocol initiator and the shared data held by the protocol partner have an intersection, that is, the x i In the shared data of the parties to the agreement;

[0063] If r i ·p(x i If it is not 0, the shared data of the protocol initiator and the shared data held by the protocol cooperator have no intersection, that is, the x i It is not included in the shared data of the parties to the agreement.

[0064] In a possible implementation, the shared data includes a data name and data content. For example, the shared data is a mobile phone number: 1234, where the mobile phone number is the data name and 1234 is the data content.

[0065] In a possible implementation, the step of obtaining the actual shared data by finding the intersection of the multiple decrypted data includes:

[0066] The data contents corresponding to the decrypted data are intersected to obtain the actual shared data contents, which means finding the overlapped parts or shared data contents between the protocol partners.

[0067] Based on the contents of S101-S104, it can be seen that the present application uses homomorphic encryption technology to allow the protocol initiator to encrypt its specific shared data without exposing the specific content of the data. The process includes obtaining the public key of the protocol, and using the public key to homomorphically encrypt the shared data held by each protocol to generate the first layer of encrypted data of each protocol partner. The protocol initiator uses its public key to homomorphically encrypt the shared data held by itself to obtain the encrypted data of the initiator. The protocol partner will use the initialization formula to initialize the shared data held by the protocol partner based on the shared data held by the protocol initiator to obtain the initialization data. Subsequently, the initialization data is homomorphically encrypted based on the first encrypted data and the encrypted data of the initiator using the homomorphic encryption algorithm to generate the second layer of encrypted data, and synchronize it to the protocol initiator through the blockchain. The protocol initiator uses its private key to decrypt the second layer of encrypted data to obtain data, and intersects the decrypted data to obtain the actual shared data. The present application ensures the security of data during upload and processing, and can effectively prevent unauthorized access and parsing even when the blockchain is stored and transmitted. At the same time, combined with smart contracts, the protocol can efficiently perform secure calculations on data shared by multiple parties, ensuring the security, efficiency and real-time nature of data sharing.

[0068] See also Figure 2 , Figure 2 A schematic diagram of a device for acquiring shared data by multiple parties provided in an embodiment of the present application. Figure 2 As shown, the device for acquiring the multi-party shared data includes:

[0069] An encryption acquisition unit 201 is used to acquire a public key in a public-private key pair owned by a protocol initiator and shared data held by each protocol partner, and use the public key to homomorphically encrypt the shared data held by each protocol partner to obtain a plurality of first encrypted data; the protocol initiator is a participant who has agreed on the shared data; the protocol partner is a participant who has shared data other than the protocol initiator;

[0070] An initialization unit 202, configured to initialize the common data held by each of the protocol cooperating parties using an initialization formula based on the common data held by the protocol initiator to obtain a plurality of initialization data;

[0071] A homomorphic encryption unit 203 is used to use a homomorphic encryption algorithm to homomorphically encrypt the multiple initialization data based on the initiator encrypted data and the multiple first encrypted data to obtain multiple second encrypted data; the initiator encrypted data is encrypted data obtained by the protocol initiator using the public key in the public-private key pair to homomorphically encrypt the shared data held by the protocol initiator;

[0072] The synchronization unit 204 is used to synchronize the multiple second encrypted data to the protocol initiator through the blockchain, so that the protocol initiator uses the private key in the public-private key pair to decrypt the multiple second encrypted data, and obtains the intersection of the multiple data obtained by decryption to obtain the actual shared data.

[0073] In a possible implementation, the initialization formula is:

[0074]

[0075] Among them, r i ·p(x i ) is the initialization data; x i The common data held by the initiator of the protocol; j The shared data held by the parties to the agreement; i A random number introduced by the protocol partner.

[0076] In a possible implementation, it is characterized in that:

[0077] If r i ·p(x i ) is 0, then the shared data of the protocol initiator and the shared data held by the protocol cooperator have an intersection;

[0078] If r i ·p(x i ) is not 0, then the shared data held by the protocol initiator has no intersection with the shared data held by the protocol cooperator.

[0079] In a possible implementation, the shared data includes a data name and data content;

[0080] In a possible implementation manner, the device further includes:

[0081] The actual shared data acquisition unit is used to obtain the actual shared data content by finding the intersection of the data contents corresponding to the multiple data obtained by decryption.

[0082] In a possible implementation, the public key in the public-private key pair, the first encrypted data, the second encrypted data, and the initiator encrypted data are all synchronized in all nodes of the blockchain.

[0083] In addition, an embodiment of the present application also provides a device for acquiring data shared by multiple parties, including: a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the method for acquiring data shared by multiple parties as described above is implemented.

[0084] In addition, an embodiment of the present application further provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a terminal device, the terminal device executes the method for acquiring multi-party shared data as described above.

[0085] The embodiment of the present application provides a device for acquiring data shared by multiple parties. First, the public key of the protocol initiator and the shared data held by the protocol partner are acquired by using the acquisition encryption unit 201, and the shared data held by the protocol partner is homomorphically encrypted using the public key to obtain the first encrypted data, and the initialization unit 202 is used to initialize the shared data held by the protocol partner based on the shared data held by the protocol initiator using the initialization formula to obtain the initialization data. The homomorphic encryption unit 203 uses the homomorphic encryption algorithm to homomorphically encrypt the initialization data based on the initiator's encrypted data and the first encrypted data to obtain the second encrypted data. Then the synchronization unit 204 synchronizes the second encrypted data to the protocol initiator through the blockchain, so that the protocol initiator uses the private key in the public-private key pair to decrypt the second encrypted data, and obtains the intersection of the multiple data obtained by decryption to obtain the actual shared data. The present application ensures the security of data during transmission and storage on the blockchain, effectively prevents data parsing by malicious visitors, and at the same time, through the combination of smart contracts and homomorphic encryption technology, realizes efficient and secure processing of shared data by multiple parties.

[0086] The above is a detailed introduction to a method, device, equipment and storage medium for obtaining multi-party shared data provided by the present application. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can refer to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can refer to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.

[0087] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0088] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

Claims

1. A method for acquiring data shared by multiple parties, characterized in that: The parties involved in the data sharing behavior are used as blockchain nodes, and smart contracts have been signed between the parties. The method includes: Obtaining a public key in a public-private key pair owned by a protocol initiator and shared data held by each protocol partner, and using the public key to homomorphically encrypt the shared data held by each protocol partner to obtain a plurality of first encrypted data; the protocol initiator is a participant who has agreed on the shared data; the protocol partner is a participant who has shared data other than the protocol initiator; Based on the shared data held by the protocol initiator, the shared data held by each of the protocol cooperators are initialized using an initialization formula to obtain a plurality of initialization data; Using a homomorphic encryption algorithm, the multiple initialization data are homomorphically encrypted based on the initiator encrypted data and the multiple first encrypted data to obtain multiple second encrypted data; the initiator encrypted data is encrypted data obtained by the protocol initiator using the public key in the public-private key pair to homomorphically encrypt the shared data held by the protocol initiator; The multiple second encrypted data are synchronized to the protocol initiator through the blockchain, so that the protocol initiator uses the private key in the public-private key pair to decrypt the multiple second encrypted data, and calculates the intersection of the multiple data obtained by decryption to obtain the actual shared data.

2. The method according to claim 1, characterized in that The initialization formula is: Among them, r i ·p(x i ) is the initialization data; x i The common data held by the initiator of the protocol; j The shared data held by the parties to the agreement; i A random number introduced by the protocol partner.

3. The method according to claim 2, characterized in that: If r i ·p(x i ) is 0, then the shared data of the protocol initiator and the shared data held by the protocol cooperator have an intersection; If r i ·p(x i ) is not 0, the shared data held by the protocol initiator has no intersection with the shared data held by the protocol cooperator.

4. The method according to claim 1, characterized in that: The shared data includes data name and data content; The step of obtaining the intersection of the multiple decrypted data to obtain the actual shared data includes: The data contents corresponding to the multiple data obtained by decryption are intersected to obtain the actual shared data contents.

5. The method according to claim 1, characterized in that The public key in the public-private key pair, the first encrypted data, the second encrypted data, and the initiator's encrypted data are all synchronized in all nodes of the blockchain.

6. A device for acquiring data shared by multiple parties, characterized in that: The participants in the data sharing behavior are used as blockchain nodes, and smart contracts have been signed between the participants. The device includes: An encryption acquisition unit is used to acquire a public key in a public-private key pair owned by a protocol initiator and shared data held by each protocol partner, and use the public key to homomorphically encrypt the shared data held by each protocol partner to obtain a plurality of first encrypted data; the protocol initiator is a participant who has agreed on the shared data; the protocol partner is a participant who has shared data other than the protocol initiator; An initialization unit, configured to initialize the common data held by each of the protocol cooperating parties respectively based on the common data held by the protocol initiator using an initialization formula to obtain a plurality of initialization data; a homomorphic encryption unit, configured to use a homomorphic encryption algorithm to homomorphically encrypt the multiple initialization data based on the initiator encrypted data and the multiple first encrypted data to obtain multiple second encrypted data; the initiator encrypted data is encrypted data obtained by the protocol initiator using the public key in the public-private key pair to homomorphically encrypt the shared data held by the protocol initiator; A synchronization unit is used to synchronize the multiple second encrypted data to the protocol initiator through the blockchain, so that the protocol initiator uses the private key in the public-private key pair to decrypt the multiple second encrypted data, and obtains the intersection of the multiple data obtained by decryption to obtain the actual shared data.

7. The device according to claim 6, characterized in that The initialization formula is: Among them, r i ·p(x i ) is the initialization data; x i The common data held by the initiator of the protocol; j The shared data held by the parties to the agreement; i A random number introduced by the protocol partner.

8. The device according to claim 6, characterized in that: If r i ·p(x i ) is 0, then the shared data held by the protocol initiator and the shared data held by the protocol cooperator have an intersection; If r i ·p(x i ) is not 0, the shared data held by the protocol initiator has no intersection with the shared data held by the protocol cooperator.

9. A device for acquiring data shared by multiple parties, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for obtaining multi-party shared data as described in any one of claims 1 to 5 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device executes the method for acquiring multi-party shared data as described in any one of claims 1 to 5.

Citation Information

Cited By

  • Adaptive interface adaptation method and device for communication machine room

    CN119759818A

  • Adaptive interface adaptation method and device for communication room

    CN119759818B