Privacy cooperation method and system based on smart contract
By storing member data resource information in the blockchain network and using privacy collaboration smart contracts, the problems of difficulty and misunderstandings in privacy collaboration are solved, and an efficient and accurate privacy collaboration process is achieved.
Patent Information
- Application Number
- CN202510125616.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-26
- Publication Date
- 2025-05-27
AI Technical Summary
In the prior art, it is difficult to accurately obtain the data resource information held by the other party during the privacy collaboration process, which is prone to misunderstandings or deviations in offline communication, resulting in inefficiency and the problem becomes more serious as the number of members increases.
By storing data resource description information of each member in the blockchain network, and using a private collaboration smart contract to realize collaboration requests and confirmations on the blockchain network, ensuring the transparency and accuracy of the negotiation process.
It realizes that each member can easily and accurately obtain the other party’s data resource information, reduces misunderstandings in offline communication, improves the efficiency and accuracy of privacy collaboration, and has good scalability.
Smart Images

Figure CN120046193A_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of blockchain technology, and in particular, to a privacy collaboration method and system based on smart contracts. Background Art
[0002] Privacy collaboration refers to the cooperation among multiple participants to achieve a common goal or complete a specific task while ensuring that the sensitive information of each party is not disclosed. Such cooperation can involve various forms such as data sharing, joint research, and collaborative work. The core is to promote the effective utilization and value creation of data while protecting privacy. For example, secure multi-party computation (MPC) is a key technical means to achieve privacy collaboration, which allows participants to jointly execute calculations without revealing their respective input data.
[0003] Suppose a member A hopes to conduct privacy collaboration with other members. Then: First, member A needs to know which member or members hold the data resources for which it hopes to conduct privacy collaboration. Second, assuming that member A knows that member B holds the data resources for which it hopes to conduct privacy collaboration, then member A needs to negotiate with member B so that member B agrees to conduct privacy collaboration with member A. Third, a network connection for implementing privacy collaboration needs to be established between member A and member B. Fourth, member A and member B need to respectively provide certain computing resources, and utilize the established network connection and allocated computing resources to finally achieve privacy collaboration.
[0004] In the related art, the above steps are all completed offline by each member through methods such as offline meetings, phone calls, or emails. In the first and second steps, member A needs to communicate offline with other members to know what data resources they hold and negotiate privacy collaboration with them. Such offline communication is prone to misunderstandings or deviations. If member A originally does not have the contact information of other members or even does not know exactly which members exist, it will further increase the cost consumption of the above offline communication. Moreover, the offline communication in the first and second steps is likely to be independently implemented respectively, resulting in a further increase in communication costs. In the third step for the establishment of the network connection and in the fourth step for the allocation of computing resources, additional time consumption will be temporarily increased.
[0005] It can be seen that in addition to the low efficiency caused by relying on manual communication, it is usually difficult for the participants in the related art to accurately know information such as the data resources held by the other party, and misunderstandings or deviations are likely to occur in offline communication, thus further causing the problems of too long time consumption and too low efficiency in privacy collaboration. And as the number of members increases, the above problems will become more and more serious. Summary of the Invention
[0006] In view of this, this specification provides a privacy collaboration method and system based on smart contracts to address the deficiencies in the related art.
[0007] Specifically, this specification is implemented through the following technical solutions:
[0008] According to the first aspect of the embodiments of this specification, a privacy collaboration method based on smart contracts is provided, which is applied to node devices respectively corresponding to each member. A blockchain node and a privacy collaboration node are deployed on each node device. The description information of the data resources held by each member respectively released by each member is stored in the blockchain network to which the blockchain node belongs, and the blockchain network includes a privacy collaboration smart contract for implementing privacy collaboration; the method includes:
[0009] Each blockchain node respectively calls the collaboration request logic in the privacy collaboration smart contract according to the collaboration request transaction submitted by the first member, and generates a privacy collaboration request event, which includes information about the requesting member and the responding member participating in the privacy calculation indicated by the collaboration request transaction;
[0010] After the privacy collaboration node corresponding to the second member monitors the privacy collaboration request event, if it confirms that the second member belongs to the responding member, it sends a notification to the second member, and in response to the confirmation operation of the second member, submits a collaboration confirmation transaction to the blockchain network;
[0011] Each blockchain node respectively calls the collaboration confirmation logic in the privacy collaboration smart contract according to the received collaboration confirmation transaction, and generates a privacy collaboration confirmation event, which includes information about the requesting member and the responding member;
[0012] After the privacy collaboration node corresponding to any member monitors the privacy collaboration confirmation event, if it confirms that the any member belongs to the requesting member or the responding member, it allocates the network resources in the corresponding node device to establish a network connection with other members participating in the privacy calculation, and participates in the privacy calculation by using the network connection and the computing resources in the corresponding node device.
[0013] According to the second aspect of the embodiments of this specification, a privacy collaboration system based on smart contracts is provided, including node devices respectively corresponding to each member. A blockchain node and a privacy collaboration node are deployed on each node device. The description information of the data resources held by each member respectively released by each member is stored in the blockchain network to which the blockchain node belongs, and the blockchain network includes a privacy collaboration smart contract for implementing privacy collaboration;
[0014] Each blockchain node respectively invokes the collaboration request logic in the privacy collaboration smart contract according to the collaboration request transaction submitted by the first member, and generates a privacy collaboration request event, where the privacy collaboration request event contains information about the requesting member and the responding member participating in the privacy calculation indicated by the collaboration request transaction;
[0015] After the privacy collaboration node corresponding to the second member monitors the privacy collaboration request event, if it confirms that the second member belongs to the responding member, it sends a notification to the second member, and, in response to the confirmation operation of the second member, submits a collaboration confirmation transaction to the blockchain network;
[0016] Each blockchain node respectively invokes the collaboration confirmation logic in the privacy collaboration smart contract according to the received collaboration confirmation transaction, and generates a privacy collaboration confirmation event, where the privacy collaboration confirmation event contains information about the requesting member and the responding member;
[0017] After the privacy collaboration node corresponding to any member monitors the privacy collaboration confirmation event, if it confirms that the any member belongs to the requesting member or the responding member, it allocates the network resources in the node device where it is located to establish a network connection with other members participating in the privacy calculation, and participates in the privacy calculation by using the network connection and the computing resources in the node device where it is located.
[0018] According to the third aspect of the embodiments of the present specification, a privacy collaboration method based on a smart contract, where blockchain nodes and privacy collaboration nodes are respectively deployed on the node devices corresponding to n members, the description information of the data resources held by each member respectively published is stored in the blockchain network to which the blockchain nodes belong, and the blockchain network includes a privacy collaboration smart contract for implementing privacy collaboration; the method is applied to the node device corresponding to any member Ui, and a blockchain node Bi and a privacy collaboration node Si are deployed on the node device, i ∈ [1, n]; the method includes:
[0019] The blockchain node Bi invokes the collaboration request logic in the privacy collaboration smart contract according to the collaboration request transaction submitted by the first member, and generates a privacy collaboration request event, where the privacy collaboration request event contains information about the requesting member and the responding member participating in the privacy calculation indicated by the collaboration request transaction;
[0020] After the privacy collaboration node Si monitors the privacy collaboration request event, if it confirms that the any member belongs to the responding member, it sends a notification to the any member, and, in response to the confirmation operation of the any member, submits a collaboration confirmation transaction to the blockchain network;
[0021] The blockchain node Bi invokes the collaboration confirmation logic in the privacy collaboration smart contract according to the received collaboration confirmation transaction, and generates a privacy collaboration confirmation event, which contains the information of the requesting member and the responding member;
[0022] After the privacy collaboration node Si monitors the privacy collaboration confirmation event, if it confirms that any member belongs to the requesting member or the responding member, it allocates the network resources in the node device where it is located to establish a network connection with other members participating in the privacy calculation, and participates in the privacy calculation by using the network connection and the computing resources in the node device where it is located.
[0023] According to the fourth aspect of the embodiments of the present specification, an electronic device is provided, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the steps of the method described in the third aspect are implemented.
[0024] According to the fifth aspect of the embodiments of the present specification, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the steps of the method described in the third aspect are implemented.
[0025] According to the sixth aspect of the embodiments of the present specification, a computer program product is provided, including a computer program / instructions. When the computer program / instructions are executed by a processor, the steps of the method described in the third aspect are implemented.
[0026] In the technical solution provided in the present specification, by depositing the description information of the data resources held by each member into the blockchain network, each member can conveniently and accurately learn about the data resource holding situations of other members from the blockchain network, avoiding accidents such as misunderstandings or deviations that are likely to occur in offline communication. With the help of the privacy collaboration smart contract, each member can send a collaboration request and return a collaboration confirmation through the blockchain network, that is, realize the negotiation for privacy collaboration on the chain, and the blockchain network stores the negotiation process for easy reference and traceability when necessary in the future. And, based on the event mechanism, that is, the privacy collaboration node monitors privacy collaboration request events and privacy collaboration confirmation events generated by the privacy collaboration smart contract, etc., smooth interaction between the chain and off-chain can be realized, enabling the responding member to respond to the privacy collaboration request of the requesting member in a timely and accurate manner. At the same time, as the number of members continues to increase, due to the decentralized consensus feature of the blockchain network, each member does not need to pay additional costs for this, or the additional costs paid are much less than the situation of using offline negotiation in related technologies, and it has excellent scalability. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1It is a schematic diagram of a privacy collaboration system based on smart contracts shown in an exemplary embodiment of this specification;
[0028] Figure 2 It is a schematic diagram of constructing a subnet node by a main network node based on blockchain shown in an exemplary embodiment of this specification;
[0029] Figure 3 It is a schematic flowchart of a privacy collaboration method based on smart contracts shown in an exemplary embodiment of this specification;
[0030] Figure 4 It is a schematic diagram of the architecture of a privacy collaboration node shown in an exemplary embodiment of this specification;
[0031] Figure 5 It is a schematic flowchart of another privacy collaboration method based on smart contracts shown in an exemplary embodiment of this specification;
[0032] Figure 6 It is a schematic diagram of the structure of an electronic device shown in an exemplary embodiment of this specification;
[0033] Figure 7 It is a schematic diagram of the structure of a privacy collaboration device based on smart contracts shown in an exemplary embodiment of this specification. Detailed implementation manners
[0034] In the technical solution of this specification, privacy collaboration among members is realized based on blockchain technology. For this purpose, this specification improves the node devices of each member for realizing privacy collaboration, so that a blockchain node and a privacy collaboration node are deployed on each node device.
[0035] For example, in Figure 1 the privacy collaboration system based on smart contracts shown, taking members P1, P2, P3, and P4 as examples, a blockchain node 111 and a privacy collaboration node 112 are deployed on the node device 11 corresponding to member P1, a blockchain node 121 and a privacy collaboration node 122 are deployed on the node device 12 corresponding to member P2, a blockchain node 131 and a privacy collaboration node 132 are deployed on the node device 13 corresponding to member P3, and a blockchain node 141 and a privacy collaboration node 142 are deployed on the node device 14 corresponding to member P4.
[0036] Among them, blockchain node 111, blockchain node 121, blockchain node 131, and blockchain node 141 belong to the same blockchain network. If there are more members in the above privacy cooperation system, the blockchain network can also include more blockchain nodes. In other words, the blockchain nodes included in the blockchain network can all be deployed on the node devices corresponding to the above-mentioned members involved in the privacy cooperation system, which can ensure that the information in the blockchain network is restricted within these members, thus helping to protect the privacy of this information and prevent it from being leaked to other irrelevant objects participating in the blockchain network. For example, the blockchain network can be constructed by these members based on the consortium blockchain mechanism, and these members are consortium blockchain members.
[0037] In some embodiments, the above blockchain network can also include other blockchain nodes, and these blockchain nodes may not belong to the above-mentioned "members" and do not participate in the privacy cooperation among these members. For example, the blockchain network can be constructed based on the public blockchain mechanism, and the above members only correspond to some blockchain nodes in the blockchain network. For another example, the blockchain network can be constructed based on the consortium blockchain mechanism, and the above members are only some consortium blockchain members and only correspond to some blockchain nodes in the blockchain network.
[0038] The above blockchain network can be an independently constructed blockchain network. Or, the above blockchain network can be a blockchain subnet, which is constructed based on the blockchain main network, and the blockchain main network is another blockchain network different from the blockchain subnet. There are already various schemes for constructing a blockchain subnet based on the blockchain main network in the related art, and all of them can be applied in this specification. Taking member P1 as an example, as Figure 2 shown: Assume that member P1 has originally joined the blockchain main network, and a blockchain node 110 belonging to the blockchain main network is deployed on its corresponding node device 11. By, for example, initiating a contract call transaction for creating a blockchain subnet in the blockchain main network, the node device 11 can listen for the event indicating the creation of the blockchain subnet generated by the contract call transaction, and thus deploy a blockchain node 111 belonging to the new blockchain subnet on the node device 11. Relative to the blockchain main network, the blockchain subnet can independently maintain a blockchain database (or directly referred to as a blockchain), perform independent consensus, etc., maintain independence from the blockchain main network, achieve data isolation and avoid interference with each other, and at the same time, the management of the blockchain subnet can be conveniently realized through the blockchain main network.
[0039] For the blockchain nodes deployed on the node devices corresponding to each member, the description information of the data resources held by each member and published by each member is stored in the blockchain network to which these blockchain nodes belong. For example, each member can submit a registration information maintenance transaction to the blockchain network respectively, and the registration information maintenance transaction can carry the description information of the data resources held by the corresponding member, so that each blockchain node in the blockchain network processes the registration information maintenance transaction and stores the description information of the data resources held by the corresponding member.
[0040] Regarding the storage method of the description information of the data resources, there can also be multiple forms. For example, after the registration information maintenance transaction is necessarily packaged into a certain block and then added to the blockchains respectively maintained by each blockchain node, it can be considered that the storage of the registration information maintenance transaction is realized at this time, which also means that the description information of the data resources contained in the registration information maintenance transaction is also stored in the blockchain network. For another example, the registration information maintenance transaction can call the privacy cooperation smart contract used to implement privacy cooperation in the blockchain network, and the contract account of the privacy cooperation smart contract contains the contract state for recording member registration information. Then, when each blockchain node processes the registration information maintenance transaction, it can call and execute the privacy cooperation smart contract, so as to record the description information of the data resources contained in the registration information maintenance transaction to the above contract state for recording member registration information as the content of the member registration information.
[0041] Storing evidence based on the contract state can facilitate subsequent operations such as adding, deleting, modifying, and querying the contract state by calling the privacy cooperation smart contract. Compared with directly querying the blockchain, it has relatively higher efficiency and convenience. For example, in the query scenario, each blockchain node queries the contract state for recording member registration information according to the received registration information query transaction respectively; for another example, in the addition, deletion, and modification scenarios, each blockchain node adds new member registration information to the contract state for recording member registration information according to the received registration information maintenance transaction respectively, or modifies or deletes the existing member registration information in the contract state for recording member registration information. The privacy cooperation smart contract can support at least one of the above operations of adding, deleting, modifying, and querying the member registration information. Among them, the privacy cooperation smart contract can be a precompiled contract (PrecompiledContracts) pre-integrated in the blockchain client program, or a general smart contract deployed through blockchain transactions. This specification does not limit this.
[0042] The description information of the above data resources can be various types of information used to describe the data resources, and this specification does not limit this. For example, the data resources can be a dataset, and the corresponding description information can include the fields contained in each piece of data in the dataset, that is, the schema of the data contained in the dataset. For instance, when a member is a bank, the data resources it holds can include the information table of registered users in the bank, and the corresponding description information can include the fields of each piece of information in the information table, such as name, age, account number, remaining amount, etc. Again, for example, the description information can describe the corresponding data resources from other dimensions, such as the size of the data volume, the year of data entry, the data source, etc.
[0043] In addition to the description information of the data resources, the member registration information can also include other information related to privacy collaboration, and this specification does not limit this. For example, the member registration information can also include the type of privacy computing protocol supported by the corresponding member. In this way, if a member hopes to conduct privacy collaboration with other members, it can confirm the type of privacy computing protocol supported by other members based on the member registration information, and then select the type of privacy computing protocol supported by both parties to promote privacy collaboration. Regarding the type of privacy computing protocol, this specification does not limit this; for example, in the scenario of secure multi-party computing, the type of privacy computing protocol can include PSI (Private Set Intersection), GC (Garbled Circuit), LR (Logistic regression), etc.
[0044] Based on the above introduction, in an exemplary embodiment, the privacy collaboration smart contract of this specification can include the following content, for example:
[0045] Res{
[0046] P1: Dset1; PSI
[0047] P2: Dset2; PSI; GC / LR
[0048] P3: Dset3; PSI; GC / LR
[0049] P4: Dset4; GC / LR
[0050] }
[0051] Interface{
[0052] Init(Px, Py, Proto)
[0053] Commit(Px, Py, Stat)
[0054] }
[0055] Res{} is used to record the member registration information corresponding to each member. For example, in the above embodiment, the member registration information corresponding to members P1 - P4 is specifically recorded. The member registration information corresponding to member P1 is "P1: Dset1; PSI", where: P1 is the member ID, Dset1 is the description information of the data resources held by this member P1, and PSI is the type of privacy computing protocol supported by this member P1. The member registration information corresponding to member P2 is "P2: Dset2; PSI; GC / LR", where: P2 is the member ID, Dset2 is the description information of the data resources held by this member P2, and PSI and GC / LR are the types of privacy computing protocols supported by this member P2. The situations of members P3 and P4 are similar and will not be elaborated here.
[0056] Two interfaces are defined in Interface{}. Among them: the Init() interface is used for a certain member to initiate a privacy collaboration request to other members, and the Commit() interface is used for other members to confirm and respond to the request initiated by this certain member.
[0057] Next, in combination with Figure 3 , a detailed introduction will be given on how to implement privacy collaboration among members based on the privacy collaboration smart contract.
[0058] Figure 3 is a schematic flowchart of a privacy collaboration method based on a smart contract shown in an exemplary embodiment of this specification. As Figure 3 shown, this method is applied to the node devices corresponding to each member respectively. Each node device deploys a blockchain node and a privacy collaboration node. The description information of the data resources held by each member respectively published is stored in the blockchain network to which the blockchain node belongs, and this blockchain network includes a privacy collaboration smart contract for implementing privacy collaboration; the method may include the following steps:
[0059] Step 302, each blockchain node respectively calls the collaboration request logic in the privacy collaboration smart contract according to the collaboration request transaction submitted by the first member, and generates a privacy collaboration request event. The privacy collaboration request event includes the information of the requesting member and the responding member participating in the privacy calculation indicated by the collaboration request transaction.
[0060] The first member can be any one of the above members, that is, any member can, based on its own needs, request other members to perform privacy collaboration with itself. For example, the first member can request the second member mentioned below to perform privacy collaboration with itself.
[0061] As described above, in the blockchain network, there is description information of the data resources held by each member, enabling the first member to learn about the description information of the data resources held by other members based on this, and select members with whom it hopes to conduct privacy collaboration. Taking the aforementioned privacy collaboration smart contract as an example, assume that the first member is member P1, the data resource maintained by this member P1 is dataset Dataset1, and the fields of each data in this dataset Dataset1 include name, age, account number, remaining amount, etc. This member P1 hopes to perform a private intersection with another dataset containing the same fields. Then, member P1 can query the description information Dset2, Dset3, and Dset4 respectively published by members P2, P3, and P4 by submitting a registration information query transaction as described above to the blockchain network, which correspond to the dataset Dataset2 maintained by member P2, the dataset Dataset3 maintained by member P3, and the dataset Dataset4 maintained by member P4 respectively.
[0062] Assume that both Dset2 and Dset3 meet the requirements of member P1. If the privacy collaboration smart contract does not record the types of privacy computing protocols supported by each member, for example, each member defaults to supporting the same type of privacy computing protocol, then member P1 only needs to select any one or all of members P2 and P3 for privacy collaboration based on the matching situation between the description information of the data resources.
[0063] If the privacy collaboration smart contract records the types of privacy computing protocols supported by each member, then member P1 can further consider the types of privacy computing protocols supported by itself and members P2 and P3 respectively, and select other members whose supported privacy computing protocol types are the same as its own. In the aforementioned example, member P1 only supports the PSI algorithm, while both members P2 and P3 support this PSI algorithm. Therefore, both of them meet the requirements of member P1 in terms of the description information of the data resources and the supported privacy computing protocol types. However, if, for example, member P3 only supports the GC algorithm and does not support the PSI algorithm, then even if the description information of the data resources of member P3 meets the requirements of member P1, member P1 should not choose to conduct privacy collaboration with member P3.
[0064] Assume that member P1 chooses to conduct privacy collaboration with member P2. Then member P1 can submit a collaboration request transaction to the blockchain network, that is, a blockchain transaction used to request member P2 to conduct privacy collaboration with this member P1. This collaboration request transaction is executed separately by each blockchain node in the blockchain network. For example, in Figure 1In the illustrated embodiment, blockchain nodes 111, 121, 131, and 141 respectively obtain and execute the collaboration request transaction. The collaboration request transaction invokes the collaboration request logic in the privacy collaboration smart contract. The collaboration request logic refers to a processing logic defined in the privacy collaboration smart contract, and this processing logic is used to transfer from the chain to off-chain a request for the requesting member to hope that the responding member collaborates with it privately.
[0065] The requesting member and the responding member are respectively members of different roles in the privacy collaboration. For example, in the above example, member P1 hopes to collaborate privately with member P2, then member P1 is the requesting member and member P2 is the responding member. Of course, member P1 can also request to collaborate privately with multiple members at the same time, and the quantity here is not limited in this specification. When the collaboration request transaction indicates the information of the responding member participating in the privacy calculation, the information of the responding member can be carried in, for example, the Data field of the collaboration request transaction and can be provided as an input parameter to the above-mentioned collaboration request logic. When the collaboration request transaction indicates the information of the requesting member participating in the privacy calculation, if the requesting member is the initiator of the collaboration request transaction, the information of the requesting member itself is recorded in, for example, the from field of the collaboration request transaction and can be provided as an input parameter to the above-mentioned collaboration request logic, without being additionally recorded in, for example, the above-mentioned Data field. Of course, since the from field usually records information such as the account address and wallet address of the transaction initiator, which can be different from the member ID of the requesting member, in order to avoid the collaboration request logic from converting the account address or wallet address, etc. into the corresponding member ID, the information of the requesting member can also be carried in, for example, the Data field of the collaboration request transaction and can be provided as an input parameter to the above-mentioned collaboration request logic.
[0066] As mentioned above, the blockchain network also stores the types of privacy calculation protocols supported by each member respectively. Correspondingly, the collaboration request transaction can also include one type of privacy calculation protocol or multiple alternative types of privacy calculation protocols recommended by the requesting member and provide them as input parameters to the above-mentioned collaboration request logic.
[0067] Taking the above-mentioned privacy collaboration smart contract as an example, the collaboration request transaction can call the collaboration request logic by invoking the Init() interface defined in the privacy collaboration smart contract. Specifically, the collaboration request transaction can define each parameter in the Init() interface. For example, it defines the requesting member Px = P1, the responding member Py = P2, and the privacy calculation protocol type Proto = PSI to indicate that member P1 is the requesting member, member P2 is the responding member, and the privacy calculation protocol type to be adopted is PSI.
[0068] Taking the collaboration request logic as an example, the way each blockchain node executes the privacy collaboration smart contract may vary due to the different types of privacy collaboration smart contracts. For example, when the privacy collaboration smart contract is a pre-compiled contract, the collaboration request logic is integrated into the client program of the blockchain node, and it is already compiled machine code. Therefore, each blockchain node can directly execute this collaboration request logic without temporarily interpreting the code. When the privacy collaboration smart contract is a general smart contract, the collaboration request logic is usually intermediate language such as bytecode compiled from high-level languages like C++. Therefore, each blockchain node needs to interpret and execute the code of the collaboration request logic in this intermediate language form. Of course, some general smart contracts may also have been pre-compiled into machine code from high-level languages like C++, enabling each blockchain node to directly execute the corresponding collaboration request logic. The execution of other smart contract logics such as the collaboration confirmation logic in this specification is similar and will not be elaborated further later.
[0069] After each blockchain node executes the collaboration request logic, it will generate corresponding privacy collaboration request events. Since both the blockchain node and the privacy collaboration node are deployed on each node device, the privacy collaboration node can screen out the above-mentioned privacy collaboration request events by listening to the contract events generated by the local blockchain node, thus realizing the information transfer from the chain to off-chain. This mechanism of information transfer from the chain to off-chain through events can be called the event mechanism.
[0070] After the blockchain node executes a blockchain transaction to invoke and execute the privacy collaboration smart contract, it will generate a corresponding receipt, which will contain the above-mentioned events. Each event will specifically contain several fields, such as topic (theme) and data (data), etc. The privacy collaboration node can obtain the receipt generated by the blockchain node and read the topic of each event contained in this receipt. For example, the above-mentioned privacy collaboration request events, privacy collaboration confirmation events, etc. will all correspond to a unique specific topic. Therefore, based on the topic of each event, the privacy collaboration node can identify the types of each event generated by the blockchain node, and thus accurately determine whether it has monitored privacy collaboration request events, privacy collaboration confirmation events, or other events. The information of the requesting party member and the responding party member, etc., can be recorded in the data field of the corresponding event.
[0071] It can be seen that by using the blockchain network to store and prove the member registration information of each member, each member can accurately and conveniently obtain the description information of the data resources held by other members, the types of privacy algorithm protocols supported, etc., avoiding problems such as misunderstandings, information asymmetry, and low efficiency that may be caused by offline communication. At the same time, by invoking the privacy collaboration smart contract through the collaboration request transaction, both the collaboration request transaction itself and the privacy collaboration request event generated based on the privacy collaboration smart contract can leave corresponding records on the blockchain, making each privacy collaboration traceable and facilitating subsequent tracing.
[0072] Step 304, after the privacy collaboration node corresponding to the second member monitors the privacy collaboration request event, if it confirms that the second member belongs to the responding member, it sends a notice to the second member, and in response to the confirmation operation of the second member, submits a collaboration confirmation transaction to the blockchain network.
[0073] As mentioned above, the privacy collaboration request event records the information of the requesting member and the responding member. Therefore, after each member's corresponding privacy collaboration node monitors the privacy collaboration request event, it can compare the information of the responding member in the privacy collaboration request event with its own corresponding member to determine whether its own corresponding member belongs to the responding member. For example, assume that the requesting member recorded in the privacy collaboration request event is member P1 and the responding member is member P2. Then: as Figure 1 shown, after the privacy collaboration node 112 monitors the privacy collaboration request event, it finds that its corresponding member P1 does not belong to the responding member, so it will not make further processing; after the privacy collaboration node 122 monitors the privacy collaboration request event, it finds that its corresponding member P2 belongs to the responding member, so it will send a notice to member P2, which can be in any form such as text message, email, instant messaging message, client push message, etc., and this specification does not limit this; after the privacy collaboration node 132 monitors the privacy collaboration request event, it finds that its corresponding member P3 does not belong to the responding member, so it will not make further processing; after the privacy collaboration node 142 monitors the privacy collaboration request event, it finds that its corresponding member P4 does not belong to the responding member, so it will not make further processing. Therefore, finally, only member P2, who is the responding member, will receive the notice, while other members will not be disturbed.
[0074] The notice for the second member may include the information of the requesting member for the second member to confirm whether to accept this request. Of course, the notice may also include other information for the second member to view in order to comprehensively determine whether to accept this request. For example, in a privacy collaboration request event, it may include a type or multiple alternative types of privacy computing protocols recommended by the requesting member, and the information of the privacy computing protocol type can also be added to the above notice for the second member to view and, if necessary, for the second member to select from multiple alternative types of privacy computing protocols. For another example, if there are multiple responder members at the same time, the notice may also indicate the information of all responder members.
[0075] Each member may simultaneously have multiple independent data resources and publish them on the blockchain. Then, the first member needs to indicate in the collaboration request transaction which data resource or resources held by each participant are required to participate in the privacy collaboration. Correspondingly, the privacy collaboration request event may include the description information of the data resources that the requesting member and the responder member respectively need to participate in the privacy collaboration. Then, in the notice provided to the second member, it may include the description information of the data resources held by the second member and required to participate in the privacy collaboration, and may further include the description information of the data resources held by the first member and required to participate in the privacy collaboration for the second member to view in order to comprehensively determine whether to accept this request.
[0076] If it is confirmed to participate in the privacy collaboration, the second member may perform a confirmation operation, which can be any pre-defined operation that can express the confirmation intention of the second member. Based on the confirmation operation of the second member, the privacy collaboration node may submit a collaboration confirmation transaction to the blockchain network, that is, a blockchain transaction indicating that the second member confirms to conduct privacy collaboration with the first member. Then, without the second member and the first member having offline interaction, and even without the two parties knowing each other's offline contact information, the two parties can achieve the negotiation process as described above based on blockchain technology, including the first member initiating a request for privacy collaboration and the second member confirming to participate in the privacy collaboration, and the process is extremely simple and efficient.
[0077] Step 306, each blockchain node respectively invokes the collaboration confirmation logic in the privacy collaboration smart contract according to the received collaboration confirmation transaction and generates a privacy collaboration confirmation event, and the privacy collaboration confirmation event includes the information of the requesting member and the responder member.
[0078] Assume that the first member is member P1 and the second member is member P2. Member P2 can pass through such as Figure 1The privacy collaboration node 122 shown submits a collaboration confirmation transaction to the blockchain network to confirm the privacy collaboration proposed by participating member P1. This collaboration confirmation transaction invokes the collaboration confirmation logic in the privacy collaboration smart contract, which refers to a processing logic defined in the privacy collaboration smart contract and is used to transfer information about the responder member's confirmation of participating in the privacy collaboration requested by the requester member from on-chain to off-chain.
[0079] Similar to the privacy collaboration request event, the privacy collaboration confirmation event can contain information about the requester member and the responder member to facilitate differentiation between different privacy collaboration confirmation events. Specifically, the collaboration confirmation transaction can carry the information of the requester member in the Data field. The information of the responder member can also be carried in the Data field of the collaboration confirmation transaction; or it can be represented by the information in the From field, and later the collaboration confirmation logic will convert it into the member ID of the responder member. In short, it is similar to the aforementioned collaboration request transaction here.
[0080] The privacy collaboration confirmation event can also contain: a type of privacy computing protocol adopted by the second member for confirmation. The privacy collaboration request event can contain a type of privacy computing protocol recommended by the requester member. If the second member confirms adoption, it can carry the information of this privacy computing protocol type in, for example, the Data field of the collaboration confirmation transaction, so as to be passed as an input parameter to the collaboration confirmation logic and then transferred to the privacy collaboration confirmation event. Or, the privacy collaboration request event can contain multiple alternative privacy computing protocol types recommended by the requester member, and the second member can select one type of privacy computing protocol and carry it in the collaboration confirmation transaction, and finally transfer it to the privacy collaboration confirmation event based on the aforementioned method. The privacy collaboration request event can also not contain any type of privacy computing protocol recommended by the requester member, and the second member can actively determine a type of privacy computing protocol and carry it in the collaboration confirmation transaction, and finally transfer it to the privacy collaboration confirmation event based on the aforementioned method. Of course, if a unique and default privacy computing protocol type is uniformly configured on each privacy collaboration node, or a selection rule for the privacy computing protocol type is uniformly configured, then the privacy collaboration request event and the privacy collaboration confirmation event can both not contain information about the privacy computing protocol type, and each privacy collaboration node can automatically select the correct privacy computing protocol type for privacy collaboration.
[0081] Taking the aforementioned privacy collaboration smart contract as an example, the collaboration confirmation transaction can call the Commit() interface defined in the privacy collaboration smart contract to implement the call to the collaboration confirmation logic. Specifically, the collaboration confirmation transaction can define the parameters within the Commit() interface. For example, it can define that the requesting party member Px = P1, the responding party member Py = P2, and the response result Stat = true, indicating that member P1 is the requesting party member, member P2 is the responding party member, and member P2 agrees to participate in the privacy collaboration.
[0082] Step 308, after any privacy collaboration node corresponding to a member monitors the privacy collaboration confirmation event, if it confirms that the any member belongs to the requesting party member or the responding party member, it allocates the network resources in the node device where it is located to establish a network connection with other members participating in privacy computing, and participates in privacy computing by using the network connection and the computing resources in the node device where it is located.
[0083] Similar to the privacy collaboration request event, since the blockchain node and the privacy collaboration node are both deployed on the node devices corresponding to each member, the privacy collaboration node can filter out the above-mentioned privacy collaboration confirmation event from the contract events generated by the local blockchain node based on the event mechanism, thus realizing the information transfer from the chain to off-chain.
[0084] As mentioned above, the information of the requesting party member and the responding party member is recorded in the privacy collaboration confirmation event. Therefore, after any privacy collaboration node corresponding to a member monitors the privacy collaboration confirmation event, it can compare the information of the responding party member in the privacy collaboration confirmation event with the member corresponding to itself to determine whether the member corresponding to itself belongs to the requesting party member or the responding party member. For example, assuming that the requesting party member recorded in the privacy collaboration confirmation event is member P1 and the responding party member is member P2, then: as Figure 1 shown, after the privacy collaboration node 112 monitors the privacy collaboration request event, it finds that the member P1 corresponding to itself belongs to the requesting party member; after the privacy collaboration node 122 monitors the privacy collaboration request event, it finds that the member P2 corresponding to itself belongs to the responding party member; after the privacy collaboration node 132 monitors the privacy collaboration request event, it finds that the member P3 corresponding to itself does not belong to the requesting party member and the responding party member, so it will not make further processing; after the privacy collaboration node 142 monitors the privacy collaboration request event, it finds that the member P4 corresponding to itself does not belong to the requesting party member and the responding party member, so it will not make further processing. Therefore, the privacy collaboration node 112 will allocate the resources on the node device 11, and the privacy collaboration node 122 will allocate the resources on the node device 12, so as to establish a network connection between the privacy collaboration node 112 and the privacy collaboration node 122, and participate in privacy computing by using the network connection and the computing resources in the node devices 11 - 12.
[0085] To allocate resources on the node device, the privacy cooperation nodes corresponding to each member can logically be divided into multiple functional modules, including: a scheduling module, a network module, and a computing module. Of course, in the specific implementation process, these functional modules necessarily need to rely on specific physical hardware, such as network cards, processors, memory, hard disks, etc., which will not be elaborated here. Taking the node device 11 corresponding to member P1 as an example, as Figure 4 shown, the privacy cooperation node 112 on this node device 11 can specifically include a scheduling module 112a, a network module 112b, and a computing module 112c. Generally speaking, the scheduling module 112a listens to the contract events generated by the blockchain node 111, and accordingly schedules the network module 112b and the computing module 112c to utilize the network resources of the network module 112b and the computing resources of the computing module 112c respectively, and apply them to the process related to privacy cooperation.
[0086] Specifically, if the scheduling module 112a monitors a privacy cooperation request event, it can initiate a notification when member P1 belongs to the responding member. As mentioned above, if member P1 is the requesting member, or is neither the requesting member nor the responding member, then the scheduling module 112a does not need to process it.
[0087] If the scheduling module 112a monitors a privacy cooperation confirmation event, it can issue a network resource scheduling instruction to the network module 112b and a computing resource scheduling instruction to the computing module 112c when member P1 belongs to the requesting member or the responding member. Correspondingly, the network module 112b is used to allocate the network resources in the node device 11 it is located in according to the above network resource scheduling instruction to establish a network connection with other members participating in privacy computing. For example, when member P1 is the requesting member and member P2 is the responding member, the allocated network resources are used to establish a network connection between the privacy cooperation node 112 and the privacy cooperation node 122. The computing module 112c is used to participate in privacy computing according to the above computing resource scheduling instruction, utilizing the network connection established by the network module 112b and the computing resources in the node device 11 it is located in.
[0088] It can be seen that the privacy cooperation node can automatically realize the scheduling of network resources and computing resources based on the privacy cooperation confirmation event, thereby automatically establishing a network connection and executing privacy computing. That is to say, in addition to being able to achieve convenient and fast communication and negotiation, the technical solution of this specification can also enable the privacy cooperation smart contract to automatically schedule the off-chain resources of the node device based on the chain, and then automatically complete privacy cooperation among multiple members. The whole process is efficient and convenient.
[0089] Moreover, similar to the privacy collaboration request event, the privacy collaboration smart contract is invoked through the collaboration confirmation transaction, so that both the collaboration confirmation transaction itself and the privacy collaboration confirmation event generated based on the privacy collaboration smart contract can leave corresponding records on the blockchain, making each privacy collaboration traceable and facilitating subsequent tracing.
[0090] In addition, when the privacy collaboration node allocates network resources in the node device it belongs to to establish a network connection with other members participating in privacy computing, it can be achieved in multiple ways.
[0091] For example, the privacy collaboration node can query from the local blockchain node: the IP addresses of each blockchain node in the blockchain network, that is, the IP addresses of the node devices where these blockchain nodes are located, and then establish a network connection based on this.
[0092] For another example, since each blockchain node will establish a network connection after joining the blockchain network, the existing connection established among the blockchain nodes in the blockchain network can be utilized: If any member belongs to the requesting member or the responding member, for this any member, the existing connection established in the blockchain network between the blockchain node of the node device where the privacy collaboration node corresponding to this any member is located and the blockchain nodes corresponding to other members participating in privacy computing can be determined, and a new port number for privacy computing can be allocated to the determined existing connection.
[0093] Taking member P1 and member P2 as an example. Assume that there is a P2P connection established between blockchain node 111 corresponding to member P1 and blockchain node 121 corresponding to member P2. This P2P connection is specifically established based on the IP address A1 of node device 11 and the IP address A2 of node device 12, and the port number allocated for the blockchain instance is D1. Then, when node device 11 receives a communication message with IP address A1 and port number D1, it can hand over this communication message to blockchain node 111 for processing; similarly, when node device 12 receives a communication message with IP address A2 and port number D1, it can hand over this communication message to blockchain node 121 for processing. On this basis, node device 11 can allocate a new port number D2 for privacy collaboration node 112; among them, if combined Figure 4Alternatively, it can be considered that the new port number D2 is allocated to the network module 112b. Similarly, the node device 12 can allocate the new port number D2 to the privacy cooperation node 122. Then, when the node device 11 receives a communication message with the IP address A1 and the port number D2, it can hand over the communication message to the privacy cooperation node 112 for processing; similarly, when the node device 12 receives a communication message with the IP address A2 and the port number D2, it can hand over the communication message to the privacy cooperation node 122 for processing.
[0094] Of course, in addition to directly establishing P2P connections between blockchain nodes, in some embodiments, other methods can also be used to establish connections. For example, blockchain nodes can be respectively connected to the BTN (Blockchain Transmission Network) network, and the BTN network is used to assist in realizing communication between blockchain nodes. The BTN network is a dedicated data transmission network, which is composed of some nodes with high computing power, high reliability and high stability, and is specifically used for blockchain data transmission to ensure the security and integrity during the data transmission process. On this basis, the network connection established between blockchain nodes with the help of the BTN network can be used to realize network transmission between privacy cooperation nodes, so as to improve the efficiency and security of privacy cooperation by leveraging the high speed, reliability and stability of the BTN network.
[0095] Consistent with the above privacy cooperation method based on smart contracts, this specification also proposes a privacy cooperation system based on smart contracts, including node devices corresponding to each member. Each node device deploys a blockchain node and a privacy cooperation node. In the blockchain network to which the blockchain node belongs, description information of data resources held by each member respectively published by each member is stored, and the blockchain network includes a privacy cooperation smart contract for realizing privacy cooperation;
[0096] Each blockchain node respectively calls the cooperation request logic in the privacy cooperation smart contract according to the cooperation request transaction submitted by the first member, and generates a privacy cooperation request event, and the privacy cooperation request event includes information of the requesting member and the responding member participating in the privacy calculation indicated by the cooperation request transaction;
[0097] After the privacy cooperation node corresponding to the second member monitors the privacy cooperation request event, if it confirms that the second member belongs to the responding member, it sends a notification to the second member, and in response to the confirmation operation of the second member, submits a cooperation confirmation transaction to the blockchain network;
[0098] Each blockchain node respectively invokes the collaboration confirmation logic in the privacy collaboration smart contract according to the received collaboration confirmation transaction, and generates a privacy collaboration confirmation event, which contains information about the requesting member and the responding member;
[0099] After any privacy collaboration node corresponding to a member monitors the privacy collaboration confirmation event, if it confirms that the any member belongs to the requesting member or the responding member, it allocates network resources in the node device where it is located to establish a network connection with other members participating in privacy computing, and participates in privacy computing by using the network connection and the computing resources in the node device where it is located.
[0100] Optionally,
[0101] The blockchain network also stores the types of privacy computing protocols supported by each member respectively;
[0102] The privacy collaboration request event also includes: one type of privacy computing protocol type or multiple alternative privacy computing protocol types recommended by the requesting member;
[0103] The privacy collaboration confirmation event also includes: one type of privacy computing protocol type confirmed by the second member.
[0104] Optionally, the privacy collaboration node corresponding to any member allocates network resources in the node device where it is located to establish a network connection with other members participating in privacy computing in the following manner:
[0105] For the node device where the privacy collaboration node corresponding to any member is located, determine the established connections in the blockchain network between the blockchain node on this node device and the blockchain nodes corresponding to other members participating in privacy computing;
[0106] Allocate a new port number for privacy computing to the determined established connections.
[0107] Optionally, each privacy collaboration node corresponding to a member includes: a scheduling module, a network module, and a computing module; where:
[0108] The scheduling module is used to monitor the privacy collaboration request event to initiate a notification when the corresponding member belongs to the responding member, and is used to monitor the privacy collaboration confirmation event to issue a network resource scheduling instruction to the network module and a computing resource scheduling instruction to the computing module when the corresponding member belongs to the requesting member or the responding member;
[0109] The network module is used to allocate network resources in the node device where it is located according to the network resource scheduling instruction, so as to establish a network connection with other members participating in privacy computing;
[0110] The computing module is used to participate in privacy computing by using the network connection and the computing resources in the node device where it is located according to the computing resource scheduling instruction.
[0111] Regarding the privacy collaboration system of this embodiment, its specific processing logic and related descriptions can all refer to the content of the embodiment shown in Figures 1-4 Although there are only differences in the description perspectives between the two, there is no essential technical difference, so it will not be elaborated here.
[0112] The foregoing embodiments of the privacy collaboration method based on smart contracts are specifically described based on the interaction process between multiple node devices. Under this concept, this specification also proposes, from the perspective of each node device, a privacy collaboration method based on smart contracts as shown in Figure 5 On the node devices corresponding to n members, a blockchain node and a privacy collaboration node are respectively deployed. In the blockchain network to which the blockchain node belongs, description information of the data resources held by each member respectively released by each member is stored, and this blockchain network includes a privacy collaboration smart contract for realizing privacy collaboration; the method is applied to the node device corresponding to any member Ui, and a blockchain node Bi and a privacy collaboration node Si are deployed on this node device, i ∈ [1, n]; the method includes:
[0113] Step 502, the blockchain node Bi calls the collaboration request logic in the privacy collaboration smart contract according to the collaboration request transaction submitted by the first member, and generates a privacy collaboration request event, where the privacy collaboration request event includes information about the requesting member and the responding member indicated by the collaboration request transaction.
[0114] Step 504, after the privacy collaboration node Si monitors the privacy collaboration request event, if it confirms that the any member belongs to the responding member, it sends a notification to the any member, and in response to the confirmation operation of the any member, submits a collaboration confirmation transaction to the blockchain network.
[0115] Step 506, the blockchain node Bi calls the collaboration confirmation logic in the privacy collaboration smart contract according to the received collaboration confirmation transaction, and generates a privacy collaboration confirmation event, where the privacy collaboration confirmation event includes information about the requesting member and the responding member.
[0116] Step 508, after the privacy cooperation node Si monitors the privacy cooperation confirmation event, if it confirms that any member belongs to the requesting member or the responding member, it allocates the network resources in the node device where it is located to establish a network connection with other members participating in the privacy calculation, and participates in the privacy calculation by using the network connection and the computing resources in the node device where it is located.
[0117] Optionally,
[0118] The blockchain network also stores the types of privacy calculation protocols supported by each member respectively published by them;
[0119] The privacy cooperation request event also includes: one type of privacy calculation protocol or multiple alternative types of privacy calculation protocols proposed by the requesting member;
[0120] The privacy cooperation confirmation event also includes: one type of privacy calculation protocol confirmed by the second member.
[0121] Optionally, the allocation of the network resources in the node device where it is located to establish a network connection with other members participating in the privacy calculation includes:
[0122] For the node device where the privacy cooperation node corresponding to any member is located, determine the established connection in the blockchain network between the blockchain node on this node device and the blockchain nodes corresponding to other members participating in the privacy calculation;
[0123] Allocate a new port number for privacy calculation to the determined established connection.
[0124] Optionally, the privacy cooperation node Si includes: a scheduling module, a network module, and a computing module; where:
[0125] The scheduling module is used to monitor the privacy cooperation request event to initiate a notification when the corresponding member belongs to the responding member, and is used to monitor the privacy cooperation confirmation event to issue a network resource scheduling instruction to the network module and a computing resource scheduling instruction to the computing module when the corresponding member belongs to the requesting member or the responding member;
[0126] The network module is used to allocate the network resources in the node device where it is located to establish a network connection with other members participating in the privacy calculation according to the network resource scheduling instruction;
[0127] The computing module is used to participate in the privacy calculation by using the network connection and the computing resources in the node device where it is located according to the computing resource scheduling instruction.
[0128] Regarding the privacy collaboration method of this embodiment, for its specific processing logic and related descriptions, reference can be made to the content of the embodiment as shown in Figures 1-4 . There are only differences in the description perspectives between the two, but there is no essential technical difference, so it will not be elaborated here.
[0129] In summary, in the technical solution provided in this specification, by storing the description information of the data resources held by each member in the blockchain network, each member can conveniently and accurately learn about the data resource holdings of other members from the blockchain network, avoiding accidents such as misunderstandings or deviations that are likely to occur in offline communication. With the help of the privacy collaboration smart contract, each member can send a collaboration request and return a collaboration confirmation through the blockchain network, that is, realize the negotiation for privacy collaboration on the chain, and the blockchain network stores the negotiation process for easy reference and traceability when necessary in the future. And, based on the event mechanism, that is, the privacy collaboration node listens for privacy collaboration request events and privacy collaboration confirmation events generated by the privacy collaboration smart contract, etc., to achieve smooth interaction between the chain and off-chain, enabling the responding member to respond to the privacy collaboration request of the requesting member in a timely and accurate manner. At the same time, as the number of members continues to increase, due to the decentralized consensus characteristics of the blockchain network, each member does not need to pay additional costs for this, or the additional costs paid are much less than the case of using offline negotiation in related technologies, with excellent scalability.
[0130] Figure 6 is a schematic structural diagram of an electronic device in an exemplary embodiment. Please refer to Figure 6 . At the hardware level, this electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory. Of course, it may also include other required hardware. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs, forming a device for hiding the recipient address or a device for verifying the transaction attribution at the logical level. Of course, in addition to the software implementation method, this specification does not exclude other implementation methods, such as logical devices or a combination of software and hardware, etc. That is to say, the execution subject of the following processing flow is not limited to each logical unit, and can also be hardware or a logical device.
[0131] Corresponding to the foregoing embodiment of the privacy collaboration method based on a smart contract, this specification also provides an embodiment of a privacy collaboration device based on a smart contract.
[0132] Please refer to Figure 7, blockchain nodes and privacy cooperation nodes are respectively deployed on the node devices corresponding to n members. The description information of the data resources held by each member and released by each member is stored in the blockchain network to which the blockchain nodes belong, and the blockchain network includes a privacy cooperation smart contract for realizing privacy cooperation; the device is applied to the node device corresponding to any member Ui, and a blockchain node Bi and a privacy cooperation node Si are deployed on the node device, i ∈ [1, n]; the device may include:
[0133] A cooperation request unit 701, configured to enable the blockchain node Bi to call the cooperation request logic in the privacy cooperation smart contract according to a cooperation request transaction submitted by a first member, and generate a privacy cooperation request event, where the privacy cooperation request event includes information about the requesting member and the responding member participating in the privacy calculation indicated by the cooperation request transaction;
[0134] A request processing unit 702, configured to enable the privacy cooperation node Si to, after detecting the privacy cooperation request event, if it confirms that the any member belongs to the responding member, initiate a notification to the any member, and, in response to the confirmation operation of the any member, submit a cooperation confirmation transaction to the blockchain network;
[0135] A cooperation confirmation unit 703, configured to enable the blockchain node Bi to call the cooperation confirmation logic in the privacy cooperation smart contract according to the received cooperation confirmation transaction, and generate a privacy cooperation confirmation event, where the privacy cooperation confirmation event includes information about the requesting member and the responding member;
[0136] A cooperation processing unit 704, configured to enable the privacy cooperation node Si to, after detecting the privacy cooperation confirmation event, if it confirms that the any member belongs to the requesting member or the responding member, allocate network resources in the node device where it is located to establish a network connection with other members participating in the privacy calculation, and participate in the privacy calculation by using the network connection and the computing resources in the node device where it is located.
[0137] Optionally,
[0138] The blockchain network also stores the types of privacy calculation protocols supported by each member respectively;
[0139] The privacy cooperation request event further includes: a type of privacy calculation protocol or multiple alternative types of privacy calculation protocols recommended by the requesting member;
[0140] The privacy cooperation confirmation event further includes: a type of privacy calculation protocol confirmed by the second member to be adopted.
[0141] Optionally, the collaborative processing unit 704 allocates network resources in the node device where it is located to establish a network connection with other members participating in the privacy calculation in the following manner:
[0142] For the node device where the privacy collaboration node corresponding to any member is located, determine the connections established in the blockchain network between the blockchain node on this node device and the blockchain nodes corresponding to other members participating in the privacy calculation;
[0143] Allocate a new port number for privacy calculation to the determined established connection.
[0144] Optionally, the privacy collaboration node Si includes: a scheduling module, a network module, and a computing module; where:
[0145] The scheduling module is used to listen for the privacy collaboration request event to initiate a notification when the corresponding member belongs to the responder member, and is used to listen for the privacy collaboration confirmation event to issue a network resource scheduling instruction to the network module and a computing resource scheduling instruction to the computing module when the corresponding member belongs to the requester member or the responder member;
[0146] The network module is used to allocate network resources in the node device where it is located to establish a network connection with other members participating in the privacy calculation according to the network resource scheduling instruction;
[0147] The computing module is used to participate in privacy calculation according to the computing resource scheduling instruction, using the network connection and the computing resources in the node device where it is located.
[0148] The implementation processes of the functions and roles of each unit in the above device are specifically described in detail in the implementation processes of the corresponding steps in the above method, and will not be elaborated here.
[0149] Based on the same concept as the above method, this specification also provides an electronic device, including: a processor; a memory for storing processor-executable instructions; where the processor runs the executable instructions to implement the steps of the method as described in any of the above embodiments.
[0150] Based on the same concept as the above method, this specification also provides a computer-readable storage medium, on which computer instructions are stored, and when the instructions are executed by a processor, the steps of the method as described in any of the above embodiments are implemented.
[0151] Based on the same concept as the above method, this specification also provides a computer program product, including computer programs / instructions, and when the computer programs / instructions are executed by a processor, the steps of the method as described in any of the above embodiments are implemented.
Claims
1. A privacy collaboration method based on smart contracts, applied to node devices corresponding to each member, each node device is deployed with a blockchain node and a privacy collaboration node, the blockchain network to which the blockchain node belongs stores description information of data resources held by each member and published by each member, and the blockchain network contains a privacy collaboration smart contract for realizing privacy collaboration; the method comprises: Each blockchain node calls the collaboration request logic in the privacy collaboration smart contract according to the collaboration request transaction submitted by the first member, and generates a privacy collaboration request event, wherein the privacy collaboration request event includes information of the requesting member and the responding member participating in the privacy computing indicated by the collaboration request transaction; After monitoring the privacy collaboration request event, the privacy collaboration node corresponding to the second member initiates a notification to the second member if it is confirmed that the second member belongs to the responding member, and, in response to the confirmation operation of the second member, submits a collaboration confirmation transaction to the blockchain network; Each blockchain node calls the collaboration confirmation logic in the privacy collaboration smart contract according to the received collaboration confirmation transaction, and generates a privacy collaboration confirmation event, wherein the privacy collaboration confirmation event includes information of the requesting member and the responding member; After the privacy collaboration node corresponding to any member listens to the privacy collaboration confirmation event, if it is confirmed that any member belongs to the requesting member or the responding member, it allocates network resources in the node device to establish a network connection with other members participating in the privacy computing, and uses the network connection and the computing resources in the node device to participate in the privacy computing.
2. According to the method of claim 1, the contract account of the privacy collaboration smart contract contains a contract status for recording member registration information, and the member registration information contains description information of data resources held by the corresponding member; the method further comprises: Each blockchain node queries the transaction according to the received registration information, and queries the status of the contract for recording the member registration information; and / or, Each blockchain node maintains a transaction based on the received registration information, adds new member registration information to the contract state for recording member registration information, or modifies or deletes existing member registration information in the contract state for recording member registration information.
3. The method according to claim 1, The blockchain network also stores the privacy computing protocol types supported by each member and published by each member; The privacy collaboration request event also includes: a privacy computing protocol type or multiple alternative privacy computing protocol types recommended by the requesting member; The privacy collaboration confirmation event also includes: the second member confirms the use of a privacy computing protocol type.
4. According to the method of claim 1, the allocating network resources in the node device to establish a network connection with other members participating in privacy computing comprises: For a node device where a privacy collaboration node corresponding to any of the members is located, determine the connection established in the blockchain network between the blockchain node on the node device and the blockchain nodes corresponding to other members participating in privacy computing; A new port number for privacy computing is allocated to the determined established connection.
5. According to the method of claim 1, the privacy collaboration node corresponding to each member includes: Scheduling module, network module and computing module; among them: The scheduling module is used to monitor the privacy collaboration request event to initiate a notification when the corresponding member belongs to the responder member, and to monitor the privacy collaboration confirmation event to issue a network resource scheduling instruction to the network module and a computing resource scheduling instruction to the computing module when the corresponding member belongs to the requester member or the responder member; The network module is used to allocate network resources in the node device according to the network resource scheduling instruction to establish a network connection with other members participating in privacy computing; The computing module is used to participate in privacy computing by utilizing the network connection and the computing resources in the node device according to the computing resource scheduling instruction.
6. According to the method described in claim 1, the blockchain network to which the blockchain nodes corresponding to each member belong is a blockchain subnet, and the blockchain subnet is built based on the blockchain main network.
7. A privacy collaboration system based on smart contracts, comprising node devices corresponding to each member, each node device is deployed with a blockchain node and a privacy collaboration node, the blockchain network to which the blockchain node belongs stores description information of data resources held by each member and published by each member, and the blockchain network contains a privacy collaboration smart contract for realizing privacy collaboration; Each blockchain node calls the collaboration request logic in the privacy collaboration smart contract according to the collaboration request transaction submitted by the first member, and generates a privacy collaboration request event, wherein the privacy collaboration request event includes information of the requesting member and the responding member participating in the privacy computing indicated by the collaboration request transaction; After monitoring the privacy collaboration request event, the privacy collaboration node corresponding to the second member initiates a notification to the second member if it is confirmed that the second member belongs to the responding member, and, in response to the confirmation operation of the second member, submits a collaboration confirmation transaction to the blockchain network; Each blockchain node calls the collaboration confirmation logic in the privacy collaboration smart contract according to the received collaboration confirmation transaction, and generates a privacy collaboration confirmation event, wherein the privacy collaboration confirmation event includes information of the requesting member and the responding member; After the privacy collaboration node corresponding to any member listens to the privacy collaboration confirmation event, if it is confirmed that any member belongs to the requesting member or the responding member, it allocates network resources in the node device to establish a network connection with other members participating in the privacy computing, and uses the network connection and the computing resources in the node device to participate in the privacy computing.
8. The system according to claim 7, The blockchain network also stores the privacy computing protocol types supported by each member and published by each member; The privacy collaboration request event also includes: a privacy computing protocol type or multiple alternative privacy computing protocol types recommended by the requesting member; The privacy collaboration confirmation event also includes: the second member confirms the use of a privacy computing protocol type.
9. According to the system of claim 7, the privacy collaboration node corresponding to any member allocates network resources in the node device to establish a network connection with other members participating in privacy computing in the following manner: For a node device where a privacy collaboration node corresponding to any of the members is located, determine the connection established in the blockchain network between the blockchain node on the node device and the blockchain nodes corresponding to other members participating in privacy computing; A new port number for privacy computing is allocated to the determined established connection.
10. According to the system of claim 7, the privacy cooperation node corresponding to each member includes: Scheduling module, network module and computing module; among them: The scheduling module is used to monitor the privacy collaboration request event to initiate a notification when the corresponding member belongs to the responder member, and to monitor the privacy collaboration confirmation event to issue a network resource scheduling instruction to the network module and a computing resource scheduling instruction to the computing module when the corresponding member belongs to the requester member or the responder member; The network module is used to allocate network resources in the node device according to the network resource scheduling instruction to establish a network connection with other members participating in privacy computing; The computing module is used to participate in privacy computing by utilizing the network connection and the computing resources in the node device according to the computing resource scheduling instruction.
11. A privacy collaboration method based on smart contracts, wherein a blockchain node and a privacy collaboration node are respectively deployed on the node devices corresponding to n members, and the blockchain network to which the blockchain nodes belong stores description information of data resources held by each member and published by each member, and the blockchain network contains a privacy collaboration smart contract for realizing privacy collaboration; the method is applied to the node device corresponding to any member Ui, and the node device is deployed with a blockchain node Bi and a privacy collaboration node Si, i∈[1,n]; The method comprises: The blockchain node Bi calls the collaboration request logic in the privacy collaboration smart contract according to the collaboration request transaction submitted by the first member, and generates a privacy collaboration request event, wherein the privacy collaboration request event includes information of the requesting member and the responding member participating in the privacy computing indicated by the collaboration request transaction; After monitoring the privacy collaboration request event, the privacy collaboration node Si initiates a notification to any member if it is confirmed that any member belongs to the responding member, and, in response to the confirmation operation of any member, submits a collaboration confirmation transaction to the blockchain network; The blockchain node Bi calls the collaboration confirmation logic in the privacy collaboration smart contract according to the received collaboration confirmation transaction, and generates a privacy collaboration confirmation event, wherein the privacy collaboration confirmation event includes information of the requesting member and the responding member; After listening to the privacy collaboration confirmation event, if the privacy collaboration node Si confirms that any of the members belongs to the requesting member or the responding member, it allocates the network resources in the node device to establish a network connection with other members participating in the privacy computing, and uses the network connection and the computing resources in the node device to participate in the privacy computing.
12. The method according to claim 11, The blockchain network also stores the privacy computing protocol types supported by each member and published by each member; The privacy collaboration request event also includes: a privacy computing protocol type or multiple alternative privacy computing protocol types recommended by the requesting member; The privacy collaboration confirmation event also includes: a privacy computing protocol type confirmed by the second member.
13. The method according to claim 11, wherein allocating network resources in the node device to establish a network connection with other members participating in privacy computing comprises: For a node device where a privacy collaboration node corresponding to any of the members is located, determine the connection established in the blockchain network between the blockchain node on the node device and the blockchain nodes corresponding to other members participating in privacy computing; A new port number for privacy computing is allocated to the determined established connection.
14. The method according to claim 11, wherein the privacy cooperation node Si comprises: Scheduling module, network module and computing module; among them: The scheduling module is used to monitor the privacy collaboration request event to initiate a notification when the corresponding member belongs to the responder member, and to monitor the privacy collaboration confirmation event to issue a network resource scheduling instruction to the network module and a computing resource scheduling instruction to the computing module when the corresponding member belongs to the requester member or the responder member; The network module is used to allocate network resources in the node device according to the network resource scheduling instruction to establish a network connection with other members participating in privacy computing; The computing module is used to participate in privacy computing by utilizing the network connection and the computing resources in the node device according to the computing resource scheduling instruction.
15. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the methods of claims 11 to 14 when executing the program.
16. A computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the steps of the method according to any one of claims 11 to 14.
17. A computer program product, comprising a computer program / instruction, which, when executed by a processor, implements the steps of the method according to any one of claims 11 to 14.