Privacy calculation method, system and device based on heterogeneous alliance chain
By building the data chain, proof chain, relay chain and custody chain on the heterogeneous alliance chain platform, combined with the hash time lock algorithm and Shamir key sharing, the problems of data flow and privacy calculation between heterogeneous alliance chains are solved and realized It provides safe and authentic cross-chain data transfer and calculation result verification.
Patent Information
- Application Number
- CN202411122951.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-15
- Publication Date
- 2024-09-17
AI Technical Summary
Existing technology cannot adapt to and realize data flow, asset interoperability and privacy calculations between heterogeneous alliance chains, and lacks cross-chain support capabilities and smart contract on-chain computing solutions.
Based on the heterogeneous alliance chain platform, the data chain, proof chain, relay chain and custody chain are constructed, the hash time lock algorithm is used to perform information flow, private computing tasks are performed through smart contracts, and Shamir key sharing and zero-knowledge proof are used to ensure data Security and authenticity of calculation results.
It realizes the data flow and privacy calculation between heterogeneous alliance chains, ensures the security of data and the authenticity of calculation results, prevents the failure of computing tasks caused by node disconnection, and improves the utilization of computing resources.
Smart Images

Figure CN118659924A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain privacy computing technology, and in particular to a privacy computing method, system and device based on heterogeneous alliance chains. Background Art
[0002] Privacy computing provides security guarantees for collaborative computing between multiple data owners in an unsafe environment, and has three characteristics: correctness, security, and decentralization. Correctness means that privacy computing can ensure that the results returned by the calculations between participants are correct, security means that all data in the calculation process is available but invisible, and decentralization means that there is no trusted third party or privileged node between the participants that can interfere with the results.
[0003] In the existing technology, for example, the iCube project is based on the in-depth cooperation between the iCube team and the Purdue University Blockchain Artificial Intelligence Laboratory, and realizes the information-oriented connection layer and the algorithm layer based on artificial intelligence. It realizes the privacy computing on the blockchain by implementing the Turing-complete programming language and the privacy computing algorithm sandbox. Unlike the traditional blockchain, iCube independently implements the security protocol that supports privacy joint computing and embeds it into the bottom layer of the blockchain, which can realize the function of privacy joint computing between each node. Unlike the Ethereum solution, iCube supports data privacy computing and has certain support capabilities in distributed artificial intelligence. Compared with the Zcash solution, which also has data privacy computing capabilities, Zcash uses zero-knowledge proof to implement the privacy computing solution, but does not have cross-chain support capabilities and does not support the on-chain computing solution of smart contracts. At the same time, it is also unable to adapt to and realize the data flow, asset interoperability and privacy computing in the cross-chain process of alliance chains with different architectures.
[0004] Therefore, a new solution is urgently needed to support the circulation of digital assets and privacy computing among heterogeneous alliance chains. Summary of the invention
[0005] In view of this, the embodiments of the present invention provide a privacy computing method, system and device based on heterogeneous alliance chains to eliminate or improve one or more defects existing in the prior art and solve the problem that the prior art cannot adapt to and realize data flow, asset interoperability and privacy computing between heterogeneous alliance chains.
[0006] One aspect of the present invention provides a privacy computing method based on a heterogeneous alliance chain, the method is based on the execution of smart contracts on a heterogeneous alliance chain platform, the heterogeneous alliance chain platform is composed of alliance chains of multiple architectures, the heterogeneous alliance chain platform provides a data chain, a proof chain, a relay chain and a supervision chain at the basic alliance chain layer, and uses the standardized security interface provided by the basic alliance chain layer to call on-chain resources at the heterogeneous alliance chain cross-chain layer, and performs information flow based on a hash time lock algorithm to serve the privacy computing platform layer; wherein, the data flow is used to store specific information of blockchain blocks as the basic data for privacy computing and cross-chain operations; the proof chain is used to store and verify the results of privacy computing through zero-knowledge proof; the relay chain acts as an intermediary to realize information and data transmission between different alliance chains; the supervision chain is used to record and supervise all cross-chain data flow information; In the privacy computing platform layer, the method comprises the following steps: The task initiator publishes the computing task to the heterogeneous alliance chain platform, and the computing task uses a preset standard data protocol to describe the data requirements and mark the price set for the computing task; the computing task includes aggregation calculation; The data holding node continuously monitors each computing round of the computing task, and at the beginning of each computing round, decides whether to sign up for the task on the chain as a candidate node based on the data demand and the corresponding price, so that the task initiator can randomly select a set number of candidate nodes to participate in this round of computing; The privacy computing node client obtains the computing code and data required for the computing task from the server of the relay chain. The data required for the computing task includes model parameters, secure aggregated intermediate results, constants and literals defined by the user in the code; each privacy computing node client shares the key of the computing task based on Shamir key sharing; The selected data holding node transfers the local data selected according to the data demand to the privacy computing node client through the relay chain based on the hash time lock algorithm; The online privacy computing node client recovers the key of the computing task based on Shamir key sharing, and executes the computing task to obtain the computing result; A data aggregation start event is issued. Each privacy computing node client determines the number of offline nodes through on-chain data. When the number of offline nodes is within the set range, each privacy computing node client processes the local calculation result based on the random number mask and sends it to the server to perform data aggregation. At the same time, the Shamir secret sharing generated according to the mask is sent to the outside for the server to reversely deduce its mask and remove it from the final result. The server obtains the calculation results of all the privacy computing node clients and aggregates them to obtain the final privacy computing result.
[0007] In some embodiments, the data chain, the certification chain, the relay chain and the supervision chain in the basic alliance chain layer are provided with a cross-link routing module, which is used to achieve access in the alliance chain network and cross-link routing in the P2P network through unified CA certification; The data chain, the certification chain, the relay chain and the supervision chain are also provided with a cross-link adapter for providing a consistency interface, and the consistency interface includes a contract interface, a data interface, a network interface, a verification interface and a consensus interface.
[0008] In some embodiments, the supervision chain uses the Hyperledger Fabric blockchain platform to record each cross-chain flow information in the heterogeneous alliance chain platform, and the chain storage serves as a unified standard for information traceability, and sets access permissions.
[0009] In some embodiments, the selected data holding node transfers the local data selected according to the data requirement to the privacy computing node client through the relay chain based on the hash time lock algorithm, and the steps of the hash time lock algorithm include: Input parameters include the dual-chain accounts A and a of the data holding node on the first alliance chain p, the information m of the data holding node and its lock time t1; the dual-chain accounts B and b of the privacy computing node on the second alliance chain q, the information n of the privacy computing node and its lock time t2; Generate a random number S based on the random number generation algorithm Random, the expression is: ; The hash value of the random number S is calculated using the hash algorithm Keccak256. The expression is: ; The data holding node uses the Lock function to perform a locking operation on the first alliance chain p, taking A, H, t1, m, and p as parameters to obtain the locking result k, which is expressed as: ; If k is locked successfully, proceed to the next step, otherwise the algorithm fails and terminates; The privacy computing node uses the Lock function to perform a locking operation on the second alliance chain q, and uses B, H, t2, n, and q as parameters to obtain the locking result l, which is expressed as: ; If l is locked successfully and within time t2, proceed to the next step, otherwise the algorithm fails and terminates; On the first alliance chain p, the data holding node unlocks the information l of the privacy computing node through the get function, with parameters a, S, t2, and q, and the expression is: ; On the second alliance chain q, the privacy computing node unlocks the information k of the data holding node through the get function, with parameters b, S, t1, and p, and the expression is: ; If the unlocking is successful, the data exchange is successful and the data interaction success information is returned; otherwise, the algorithm fails and terminates.
[0010] In some embodiments, each of the privacy computing node clients shares the key of the computing task based on Shamir key sharing, including: Constructing polynomials , and obtain a large prime number p, , s is the key of the computing task, and ; Determine the minimum number of restored fragments as k; the polynomial The expression is as follows: ; The task initiator randomly generates t-2 random numbers less than p , and randomly select n different integers ; Substituting these n different integers into the polynomial, the n values obtained by calculation are as follows: ; Distribute each calculated value to the privacy computing node client, and the i-th privacy computing node client obtains ; Correspondingly, the online privacy computing node client recovers the key of the computing task based on Shamir key sharing, including: For the t online privacy computing node clients , t>k, substitute into the following formula to restore the key of the computing task: .
[0011] In some embodiments, before the online privacy computing node client recovers the key of the computing task based on Shamir key sharing, the process further includes: Check the number of currently online privacy computing nodes. If the number of online nodes is less than the minimum number of recovery shards, terminate and generate feedback prompt information.
[0012] In some embodiments, before each privacy computing node client processes the local calculation result based on the random number mask and sends it to the server for data aggregation, the method further includes: The zero-knowledge commitment party of the masked calculation result is sent to the proof chain for verification by the server.
[0013] On the other hand, the present invention also provides a privacy computing system based on a heterogeneous alliance chain, wherein the system is composed of alliance chains of various architectures, and a heterogeneous alliance chain platform is constructed by loading smart contracts. The heterogeneous alliance chain platform provides a data chain, a proof chain, a relay chain and a supervision chain at the basic alliance chain layer, and uses the standardized security interface provided by the basic alliance chain layer to call on-chain resources at the heterogeneous alliance chain cross-chain layer, and performs information flow based on a hash time lock algorithm to serve the privacy computing platform layer; wherein the data flow is used to store specific information of blockchain blocks as the basic data for privacy computing and cross-chain operations; the proof chain is used to store and verify the results of privacy computing through zero-knowledge proof; the relay chain acts as an intermediary to realize information and data transmission between different alliance chains; the supervision chain is used to record and supervise all cross-chain data flow information; The smart contract executes the steps of the above method.
[0014] Furthermore, the computing task includes homomorphic encryption operations, and the key used in the homomorphic encryption operations is sent by the server to each of the privacy computing node clients through Shamir key sharing, and is restored by the privacy computing node client for homomorphic encryption operations.
[0015] On the other hand, the present invention further provides a computer-readable storage medium having a computer program / instruction stored thereon, wherein the computer program / instruction implements the steps of the above method when executed by a processor.
[0016] The beneficial effects of the present invention are at least: The privacy computing method, system and device based on the heterogeneous alliance chain described in the present invention construct a data chain, a certification chain, a relay chain and a supervision chain as the basic alliance chain layer, and extract data according to a unified standard and circulate based on a hash time lock algorithm by setting an on-chain security interface on the heterogeneous alliance chain architecture, so that the heterogeneous alliance chain is transparent, and timed tasks are eliminated to achieve access control; in the process of executing privacy computing tasks, the keys required for privacy computing are distributed in the form of Shamir key sharing, and in the process of key recovery, the number of online privacy computing nodes is checked to ensure that the number requirements are met, so as to prevent too many privacy computing node clients from being disconnected, resulting in the failure of computing tasks and wasting computing resources.
[0017] Furthermore, when executing privacy computing tasks, the present invention requires data holders to sign up for the task at the beginning of each round of the computing task to prevent task failure caused by data holders being disconnected during long computing processes, and ensure that enough data holder nodes join in each round.
[0018] Furthermore, by introducing a proof chain to store and verify the results of privacy computing, the flow process of on-chain data and off-chain computing and on-chain verification can be realized, ensuring the authenticity and immutability of data flow and privacy computing.
[0019] Additional advantages, purposes, and features of the present invention will be described in part in the following description, and will become apparent to those skilled in the art after studying the following, or may be learned from the practice of the present invention. The purposes and other advantages of the present invention may be achieved and obtained by the structures specifically indicated in the specification and the accompanying drawings.
[0020] Those skilled in the art will appreciate that the objectives and advantages that can be achieved with the present invention are not limited to the above specific description, and the above and other objectives that can be achieved by the present invention will be more clearly understood from the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The drawings described herein are used to provide a further understanding of the present invention, constitute a part of the present application, and do not constitute a limitation of the present invention. In the drawings: Figure 1 This is an architectural model diagram of a heterogeneous alliance chain platform in a privacy computing method based on a heterogeneous alliance chain described in an embodiment of the present invention.
[0022] Figure 2 This is a diagram of the cross-chain management model of privacy computing in the privacy computing method based on heterogeneous alliance chain described in one embodiment of the present invention.
[0023] Figure 3 This is a diagram of the heterogeneous alliance chain cross-chain privacy computing node calling model described in one embodiment of the present invention.
[0024] Figure 4 This is a diagram of the heterogeneous alliance chain cross-chain privacy computing node model described in one embodiment of the present invention.
[0025] Figure 5 This is a diagram of the heterogeneous alliance chain privacy computing task execution model described in one embodiment of the present invention. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments and the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0027] It should also be noted that, in order to avoid obscuring the present invention due to unnecessary details, only structures and / or processing steps closely related to the solutions according to the present invention are shown in the accompanying drawings, while other details that are not closely related to the present invention are omitted.
[0028] It should be emphasized that the term “include / comprises” when used herein refers to the presence of features, elements, steps or components, but does not exclude the presence or addition of one or more other features, elements, steps or components.
[0029] It should also be noted that, unless otherwise specified, the term “connection” herein may refer not only to a direct connection but also to an indirect connection involving an intermediate.
[0030] In order to realize data flow and privacy computing between heterogeneous alliance chains, this application first constructs a heterogeneous alliance chain platform, builds data chain, proof chain, relay chain and supervision chain. In the process of data flow and privacy computing, the hash time lock algorithm is introduced for access control, and the Shamir key sharing method is introduced to distribute the keys involved in the computing tasks to the privacy computing node clients. The node providing data is determined at the beginning of each iteration of the computing task, which effectively prevents the impact of node disconnection.
[0031] Specifically, the present invention provides a privacy computing method based on a heterogeneous alliance chain, which is based on the execution of smart contracts on a heterogeneous alliance chain platform. The heterogeneous alliance chain platform is composed of alliance chains of multiple architectures. The heterogeneous alliance chain platform provides data chain, proof chain, relay chain and supervision chain in the basic alliance chain layer, and uses the standardized security interface provided by the basic alliance chain layer in the heterogeneous alliance chain cross-chain layer to call chain resources, and executes information flow based on the hash time lock algorithm to serve the privacy computing platform layer; wherein, the data flow is used to store specific information of blockchain blocks as the basic data for privacy computing and cross-chain operations; the proof chain is used to store and verify the results of privacy computing through zero-knowledge proof; the relay chain acts as an intermediary to realize information and data transmission between different alliance chains; the supervision chain is used to record and supervise all cross-chain data flow information.
[0032] The heterogeneous alliance chain platform includes the basic alliance chain layer, the heterogeneous alliance chain cross-chain layer, and the privacy computing platform layer. The heterogeneous alliance chain layer includes at least three types of architecture alliance chains, which are specifically divided into alliance chains with the same consensus mechanism and different block architectures, alliance chains with different consensus mechanisms and the same block architectures, and alliance chains with different consensus mechanisms and different block architectures. It provides data chains, proof chains, relay chains, and supervision chains for the upper heterogeneous alliance chain cross-chain layer. The four-tuple is .
[0033] In some embodiments, the data chain, proof chain, relay chain and supervision chain in the basic alliance chain layer are equipped with a cross-link routing module, which is used to achieve access to the alliance chain network and cross-link routing in the P2P network through a unified CA certification; the data chain, proof chain, relay chain and supervision chain are also equipped with a cross-link adapter to provide a consistency interface, which includes a contract interface, a data interface, a network interface, a verification interface and a consensus interface.
[0034] In some embodiments, the supervision chain uses the Hyperledger Fabric blockchain platform to record each cross-chain flow information in the heterogeneous alliance chain platform, and the chain storage serves as a unified standard for information traceability, and sets access permissions.
[0035] The heterogeneous alliance chain cross-chain layer at least includes the relay chain cross-chain responsible for information flow, among which the relay chain includes the consensus algorithm for blockchain confirmation and cross-chain routing, and the consensus algorithm module includes a binary , the cross-chain routing includes the cross-chain adapter and the cross-chain routing. . Hash time lock cross-chain is responsible for the transfer of digital assets on heterogeneous alliance chains. The privacy computing platform layer includes Shamir key sharing and zero-knowledge proof support including Groth16 and Plonk zero-knowledge proof algorithms.
[0036] For the same alliance chain , abstract unified addressing services and perform partition management for different alliance chains , where each set contains alliance chains with the same architecture, the same consensus and different users. The triplet of the unified addressing service interface on the same alliance chain is data, transaction, execution .
[0037] The present invention utilizes the relay chain to realize cross-chain data transfer of the alliance chain, hash time lock to realize cross-chain digital asset transfer, and performs digital asset transfer according to data flow on different chains and privacy data calculation. It provides a cross-chain routing module, a cross-chain adapter module, a hash time lock module, a relay chain data flow module, and a supervision chain module.
[0038] In the privacy computing platform layer, the method includes the following steps S101-S107: Step S101: The task initiator publishes the computing task to the heterogeneous alliance chain platform. The computing task uses a preset standard data protocol to describe the data requirements and mark the price set for the computing task; the computing task includes aggregation operations.
[0039] Step S102: The data holding node continuously monitors each calculation round of the calculation task, and at the beginning of each calculation round, decides whether to sign up for the task on the chain as a candidate node based on the data demand and the corresponding price, so that the task initiator can randomly select a set number of candidate nodes to participate in this round of calculation.
[0040] Step S103: The privacy computing node client obtains the computing code and data required for the computing task from the server of the relay chain. The data required for the calculation includes model parameters, secure aggregation intermediate results, constants and literals defined by the user in the code; each privacy computing node client shares the key of the computing task based on the Shamir key sharing method.
[0041] Step S104: The selected data holding node transfers the local data selected according to data requirements to the privacy computing node client through the relay chain based on the hash time lock algorithm.
[0042] Step S105: The online privacy computing node client recovers the key of the computing task based on Shamir key sharing, and executes the computing task to obtain the computing result.
[0043] Step S106: A data aggregation event is initiated. Each privacy computing node client determines the number of offline nodes through on-chain data. When the number of offline nodes is within the set range, each privacy computing node client processes the local calculation results based on the random number mask and sends them to the server to perform data aggregation. At the same time, the Shamir secret sharing generated according to the mask is sent to the outside for the server to reversely infer its mask and remove it from the final result.
[0044] Step S107: The server obtains the calculation results of all privacy computing node clients and aggregates them to obtain the final privacy computing result.
[0045] Steps S101 to S107 of this application record the operation steps under the aggregate computing task, such as model training, aggregate statistics, etc. The computing task describes the data requirements according to the preset standard data protocol so that it can be obtained between heterogeneous alliance chains. The data requirements can record the type, content, structure, etc. of the required data. The task initiator also provides the price of the computing task for the data holder to determine whether he can participate in the calculation and whether he can get a suitable price reward, and decide whether to participate.
[0046] In step S102, unlike the traditional computing task execution process, which determines which data holding nodes will participate in the calculation at the beginning of the task release, this application adopts a finer granularity. At the beginning of each round of iteration, data holders re-register to participate as candidate nodes, and the task initiator center selects some of them as participating nodes. Price refers to the reward provided by the task initiator for executing the computing task. This reward can include various forms, such as providing additional computing resources, data access rights, etc. as rewards.
[0047] In step S103, the privacy computing node client obtains the computing code and data required for the computing task from the server of the relay chain. The keys required for the computing task are shared through Shamir key sharing.
[0048] In step S104, the relay chain is used to send the data provided by the data holding node to the privacy computing node client, specifically using a hash time lock algorithm to improve security.
[0049] In step S105, the privacy computing node client recovers the key related to the computing task through Shamir key sharing and uses it to perform the calculation.
[0050] In steps S106 and S107, aggregation is performed. First, it is determined whether there are privacy computing node clients offline and the number of offlines. If it is within the tolerance range, further aggregation is performed, otherwise it stops. During the aggregation process, the privacy computing node client processes the calculation results through a random number mask and sends them to the server. The mask is published in the form of Shamir's secret sharing, and the mask is deduced by the server and removed from the processed calculation results. After the server obtains the calculation results of all privacy computing node clients, it aggregates them to obtain the final privacy calculation result.
[0051] In some embodiments, in step S103, each privacy computing node client shares the key of the computing task based on Shamir key sharing, including steps S201 to S206: Step S201: Constructing a polynomial , and obtain a large prime number p, , s is the key of the computing task, and ; Determine the minimum number of recovery shards to be k; polynomial The expression is as follows: .
[0052] Step S202: The task initiator randomly generates t-2 random numbers less than p , and randomly select n different integers .
[0053] Step S203: Substitute the n different integers into the polynomial and calculate n values as follows: .
[0054] Step S204: Distribute each calculated value to the privacy computing node client, and the i-th privacy computing node client obtains ; Correspondingly, in step S105, the online privacy computing node client recovers the key of the computing task based on Shamir key sharing, including: , t>k, substitute into the following formula to restore the key of the computing task: .
[0055] In some embodiments, in step S104, the selected data holding node transfers the local data selected according to the data requirements to the privacy computing node client through the relay chain based on the hash time lock algorithm. The steps of the hash time lock algorithm include steps S301 to S310: Step S301: Input parameters, including the dual-chain accounts A and a of the data holding node on the first alliance chain p, the information m of the data holding node and its lock time t1; the dual-chain accounts B and b of the privacy computing node on the second alliance chain q, the information n of the privacy computing node and its lock time t2.
[0056] Step S302: Generate a random number S based on the random number generation algorithm Random, the expression is: .
[0057] Step S303: Calculate the hash value of the random number S using the hash algorithm Keccak256, expressed as: .
[0058] Step S304: The data holding node uses the Lock function on the first alliance chain p to perform a locking operation, taking A, H, t1, m, and p as parameters to obtain the locking result k, which is expressed as: .
[0059] Step S305: If k is locked successfully, proceed to the next step, otherwise the algorithm fails and terminates.
[0060] Step S306: The privacy computing node uses the Lock function on the second alliance chain q to perform a locking operation, and uses B, H, t2, n, and q as parameters to obtain the locking result l, which is expressed as: .
[0061] Step S307: If l is locked successfully and within time t2, proceed to the next step, otherwise the algorithm fails and terminates.
[0062] Step S308: On the first alliance chain p, the data holding node unlocks the information l of the privacy computing node through the get function. The parameters are a, S, t2, q, and the expression is: ; Step S309: On the second alliance chain q, the privacy computing node unlocks the information k of the data holding node through the get function. The parameters are b, S, t1, and p. The expression is: ; Step S310: If the unlocking is successful, the data exchange is successful and the data exchange success information is returned; otherwise, the algorithm fails and terminates.
[0063] In some embodiments, in step S105, before the online privacy computing node client recovers the key of the computing task based on Shamir's key sharing method, it also includes: checking the number of online privacy computing nodes currently online. If the number of online nodes is less than the minimum number of recovery shards, the process is terminated and feedback prompt information is generated.
[0064] In some embodiments, in step S106, before each privacy computing node client processes the local calculation result based on the random number mask and sends it to the server to perform data aggregation, the method also includes: sending the zero-knowledge commitment party of the masked calculation result to the proof chain for verification by the server.
[0065] In some embodiments, the computing task includes homomorphic encryption operations. The key used in the homomorphic encryption operations is sent by the server to each privacy computing node client through Shamir key sharing, and is restored by the privacy computing node client for homomorphic encryption operations.
[0066] In this embodiment, the privacy computing node client itself also supports non-aggregate computing, such as the Paillier homomorphic encryption operation protocol and the CKKS homomorphic encryption operation protocol, which can improve the availability of different nodes.
[0067] On the other hand, the present invention also provides a privacy computing system based on a heterogeneous alliance chain, wherein the system is composed of alliance chains of various architectures, and a heterogeneous alliance chain platform is constructed by loading smart contracts. The heterogeneous alliance chain platform provides a data chain, a proof chain, a relay chain and a supervision chain at the basic alliance chain layer, and uses the standardized security interface provided by the basic alliance chain layer to call on-chain resources at the heterogeneous alliance chain cross-chain layer, and performs information flow based on a hash time lock algorithm to serve the privacy computing platform layer; wherein the data flow is used to store specific information of blockchain blocks as the basic data for privacy computing and cross-chain operations; the proof chain is used to store and verify the results of privacy computing through zero-knowledge proof; the relay chain acts as an intermediary to realize information and data transmission between different alliance chains; the supervision chain is used to record and supervise all cross-chain data flow information; The smart contract executes the steps of the method described in steps S101 to S107 above.
[0068] On the other hand, the present invention further provides a computer-readable storage medium having a computer program / instruction stored thereon, wherein the computer program / instruction implements the steps of the above method when executed by a processor.
[0069] The present invention is described below in conjunction with a specific embodiment: This embodiment mainly solves the cross-chain problem based on alliance chains with different architectures, so that data under different alliance chain architectures can flow, data assets can be interoperable, and information assets can be intercalated. In order to more clearly describe the technical solution of the present invention, the specific implementation method of the present invention is now described in detail with reference to the accompanying drawings.
[0070] The blockchain security strength analysis method based on fuzzy hierarchical analysis proposed in this embodiment has the following specific implementation process: The present invention applies privacy computing technologies such as Groth16, Plonk, and Shamir to a heterogeneous alliance chain cross-chain platform that supports hash time locking and relay chain cross-chain. First, a cross-chain platform is built based on alliance chain technologies of different architectures. It is necessary to implement adapters according to the underlying architecture of different alliance chains. Then, based on the implementation of the relay chain, the supervision chain, and the zero-knowledge verification chain in the cross-chain scenario, the corresponding framework is implemented using privacy computing technology, and finally the flow process of on-chain data, off-chain computing, and on-chain verification is realized. The basic architecture of the platform is as follows: Figure 1 shown.
[0071] Figure 1 The architecture of a heterogeneous alliance chain cross-chain privacy computing platform is demonstrated, providing an interface layer for users and applications at the user level, including user registration, identity authentication, access control and permission management.
[0072] The core mechanism layer provides secure and trusted blockchain interfaces, heterogeneous alliance chain transaction protocols, multi-institutional secure multi-party computing cases, and multi-heterogeneous alliance chain data privacy protection.
[0073] The cross-chain business layer of heterogeneous alliance chains provides idle management and handles the idle management of business; provides primary accounts, i.e. primary account management. Provides secondary accounts, i.e. secondary account management. Provides digital signature technology applications.
[0074] The heterogeneous alliance chain cross-chain engine layer provides services for viewing block information, querying transaction records, and sending transaction requests.
[0075] The heterogeneous alliance chain cross-chain consensus layer provides RAFT algorithm (consistency algorithm), KAFKA message queue system, PBFT practical Byzantine fault tolerance algorithm, as well as POS / POW proof of equity and proof of work mechanism for cross-chain data sharing.
[0076] The heterogeneous alliance chain cross-chain processing layer provides account management, block management, unified addressing and data management services.
[0077] The management layer is used for account management, asset management, pointer management, cross-chain management, and swap-in management.
[0078] The privacy computing layer of the heterogeneous alliance chain provides a privacy computing engine, including: Grouth16 zero-knowledge proof protocol, Shamir secret sharing scheme; and smart contracts. It provides privacy computing algorithms and encryption algorithms, including: Paillier homomorphic encryption algorithm, Elgama encryption algorithm and CKKS homomorphic encryption scheme. It also provides a privacy computing cross-chain routing layer to provide consensus algorithms, including PBFT practical Byzantine fault tolerance algorithm, RAFT consensus algorithm, and block synchronization mechanism.
[0079] At the basic layer, it provides cryptographic foundations, privacy algorithms, database drivers, Boost and Socket technologies.
[0080] At the underlying data source, business application data, Internet data, third-party business data and other data are provided. Step 1. Based on alliance chains with different architectures, establish a cross-chain platform based on relay chains and hash locks, which includes supervision chains, relay chains, proof chains, and data chains, and support corresponding upper-layer privacy computing evidence, contracts, and asset transfers.
[0081] In step 1, the heterogeneous alliance chain includes a basic alliance chain layer, a heterogeneous alliance chain cross-chain layer, and a privacy computing platform layer. The heterogeneous alliance chain layer includes at least two architecture alliance chains, specifically divided into alliance chains with the same consensus mechanism and different block architectures, alliance chains with different consensus mechanisms and the same block architectures, and alliance chains with different consensus mechanisms and different block architectures. It provides data chains, proof chains, relay chains, and supervision chains for the upper heterogeneous alliance chain cross-chain layer. The four-tuple is The heterogeneous alliance chain cross-chain layer at least includes a relay chain cross-chain responsible for information flow, where the relay chain includes a consensus algorithm to confirm the blockchain and cross-chain routing, and the consensus algorithm module includes a binary , the cross-chain routing includes the cross-chain adapter and the cross-chain routing. . Hash time lock cross-chain is responsible for the transfer of digital assets on heterogeneous alliance chains. . Provides interfaces for privacy computing platform layer services, including shamir key sharing, zero-knowledge proof support including groth16 and plonk zero-knowledge proof algorithms.
[0082] In order to cope with the problem of hash time locking caused by differences between alliance chains of different architectures in cross-chain scenarios, an interface design is adopted to abstract the same secure and trusted blockchain interface according to different alliance chain platforms, which can effectively avoid the possibility of errors caused by excessive development costs.
[0083] Even if the architectures of alliance chains are different, as long as the secure and trusted blockchain universal interface is implemented, the resources on the chain are abstracted, and universal interfaces and addressing are provided, the access of alliance chains with different architectures can be achieved. Developers do not need to develop and debug cross-chain interaction logic for each alliance chain separately, which greatly reduces development resources and time costs. Through the abstracted secure and trusted interface, security design and auditing can be centralized, providing consistent security guarantees for cross-chain transactions. The standardization of interfaces also means that verified security mechanisms can be reused, reducing security vulnerabilities caused by implementation differences. The interface design enables alliance chains with different architectures to achieve interoperability by implementing the same interface, thereby supporting a wider range of cross-chain scenarios, whether it is asset transfer, data sharing or complex cross-chain applications. The abstraction of on-chain resources and the provision of universal interfaces make cross-chain interactions more concise and clear, and developers can complete the originally complex cross-chain operations through unified interface calls. With the addition of new alliance chains, as long as these new chains implement universal interfaces, they can seamlessly access the existing cross-chain ecosystem and achieve dynamic expansion.
[0084] Among them, the secure and trusted blockchain universal interface needs to provide a secure and universal alliance chain data communication protocol, and deeply abstractly define the data structure and data resources of Hyperledger Fabric and FISCO BCOS, so that heterogeneous alliance chains can communicate using a unified data format, solving the problem of secure communication interfaces for heterogeneous alliance chains. The heterogeneous alliance chain secure communication protocol is to unify the network interaction protocol and interaction, so that heterogeneous alliance chains can be interconnected, and heterogeneous alliance chains can be interoperable through secure channel transmission. The multi-stage secure atomic transaction mechanism uses cryptographic systems and distributed networks to realize the atomicity of the operational logic of heterogeneous alliance chains, ensuring the authenticity and immutability of data transfer. The multi-heterogeneous alliance chain cross-chain governance system is a set of cross-chain governance architectures for decentralized networks, which realizes functions such as access control, transaction management, and third-party supervision.
[0085] Step 2. Implement cross-chain interfaces for different alliance chains, and implement a layer of abstraction for on-chain resources, abstract the data locations on different chains, and implement universal access on heterogeneous alliance chains. , abstract unified addressing services and perform partition management for different alliance chains , where each set contains alliance chains with the same architecture, the same consensus and different users. The triplet of the unified addressing service interface on the same alliance chain is data, transaction, execution That is, the final addressing model is abstracted as .
[0086] Consortium chains with different architectures have similarities and differences. In the structures of FISCO BCOS and Hyperledger Fabric, the meaning of blocks is the same, but the verification of security is different. Therefore, it is necessary to abstract a separate blockchain as the intersection of multiple consortium chains, in which blocks of each consortium chain can be verified. Multiple consortium chains jointly synchronize and maintain the public blockchain to perceive the status and verify the correctness of data interaction.
[0087] The information is divided into two parts. The first part is the data resources carried, and the second part is the verification information. The data resources include the specific information of the blockchain block, such as the hash value of the block, the written information, etc. The verification information includes the relevant information of the Merkle root of the transaction. The two parts constitute the basic unit of the public blockchain, which can effectively complete the transmission and verification of messages. For this reason, different alliance chains can abstract their own interface adapters based on the above resources, so as to complete the rapid access to the cross-chain platform.
[0088] Through the cross-chain unified interface, any data of any alliance chain on any alliance chain set can be accessed. The final addressing form is as follows: .
[0089] Step 3. For data privacy computing nodes on different alliance chains, hash time locking is used to achieve cross-alliance chain data asset settlement, cross-chain data asset governance, and relay chain is used to achieve cross-chain data transfer of alliance chains. The process is as follows: Figure 2 shown.
[0090] In step 3, this embodiment uses the relay chain to realize cross-chain data transfer of the alliance chain, hash time lock to realize cross-chain digital asset transfer, and transfers digital assets according to data flow on different chains and privacy data calculation. It provides a cross-chain routing module, a cross-chain adapter module, a hash time lock module, a relay chain data flow module, and a supervision chain module.
[0091] The cross-chain routing module adopts a network access mechanism to achieve access to the alliance chain network and the availability of cross-chain routing links in the P2P network through unified CA certification. Figure 3 As shown, the availability between links is guaranteed by consecutive confirmation calls to prepare and calls to submit.
[0092] The cross-chain adapter module implements a consistent interface for alliance chains of different architectures, which is divided into contract interface, data interface, network interface, verification interface, and consensus interface.
[0093] Based on the definition of a single alliance chain cross-chain resource model, different alliance chain platforms only need to perform upper-layer encapsulation according to the original SDK and implement the model acquisition and change interface to realize the work of the adapter. The following interfaces need to be implemented: obtaining the adapter type, obtaining the status of the blockchain where the adapter is located, obtaining the block header information of the blockchain where the adapter is located, and obtaining the resources on the blockchain where the adapter is located.
[0094] In order to solve various cross-chain scenarios, such as single-partition single-route, single-partition multi-route, and multi-partition multi-route, different scenarios need to be adapted and solved. Cross-chain routing interacts with smart contracts, business contracts, and different alliance chains. Different cross-chain routing can be connected through p2p networks, and on-chain and off-chain and heterogeneous alliance chains interact through cross-chain contracts.
[0095] Traditional cross-chain information transfer of homogeneous chains can adopt the hash time lock method. However, it also has its limitations. It requires both blockchains to be based on the same hash algorithm and both parties to trade. However, it is impossible to build a practical and secure cross-chain information transfer solution in heterogeneous scenarios. Therefore, the solution is improved, and a cross-chain router is added as an intermediary to provide support for heterogeneous alliance chains, and all tasks are packaged for the cross-chain router.
[0096] The traditional hash locking scheme is protected by hash time lock technology, but it also brings many security issues. It is necessary to add application layer control algorithms to control the overall scale and prevent race condition attacks caused by long cross-chain transaction delays.
[0097] Therefore, in order to prevent attacks through large-scale blocking in the cross-chain scenario of traditional hash time lock, the on-chain storage transaction queue of the cross-chain router is adopted. The unfinished information flow transactions are stored in the unfinished transaction queue stored on the chain, and polled and processed by the cross-chain router, and the timed tasks are eliminated to achieve access control. When the queue is too long, the cross-chain information flow application is automatically cancelled, and the information flow information is stored on the chain to achieve message traceability, which can effectively reduce risks.
[0098] The hash time lock module implements the basic heterogeneous alliance chain hash lock technology, combined with Figure 2 For effective transfer of assets between different alliance chains, as shown in Algorithm 1.
[0099] The relay chain data transfer module uses relay chain technology to realize large-scale information transfer on the alliance chain. The supervision chain module uses Hyperledger Fabric to record each cross-chain information transfer on the chain as a unified standard for information backtracking and set access permissions.
[0100] Step 4. In the traditional privacy key exchange, encrypted communication between nodes is achieved through the exchange of a set of keys, fault tolerance for node disconnection is achieved through the secret sharing of another set of keys, and defense against cheating by the server to obtain the plaintext calculation results of a single node is achieved through the secret sharing of an additional random number.
[0101] In traditional algorithms, this step of secret sharing is performed after the local calculation of the model as part of security aggregation. In the heterogeneous alliance chain privacy computing system, under the framework of a computing system, the model training step that consumes a lot of computing power is postponed. Because nodes are easy to go offline, and too many nodes going offline will cause the execution of this round of tasks to fail, so the computing power consumption of the nodes is wasted. Therefore, under the design principle of saving computing resources, the heterogeneous alliance chain privacy computing system advances other operations as much as possible. Once a failure occurs, there is no need to perform model training, which helps nodes save computing resources.
[0102] When the privacy computing node client is running on a private cloud and the network is unreliable, the communication between nodes is unreliable, so the secret sharing between nodes is transferred through the privacy computing server. If it is an enterprise-level privacy computing node with a complete network mechanism, secret sharing can be directly carried out through the secondary communication network between nodes.
[0103] use The secret sharing method is used to share the key to each privacy computing node. After the calculation is completed, tolerance for some offline nodes can be achieved, as shown in Algorithm 2.
[0104] The key sharing scheme adopted in this embodiment is Shamir threshold key sharing, and the main mathematical formula used is Lagrange interpolation theorem.
[0105] (1) Lagrange interpolation theorem For a polynomial function, it is known that there are given k+1 value points: ,in corresponds to the position of the independent variable, and Represents the function value.
[0106] Assume that any two different are all different, then the Lagrange interpolation polynomial obtained by applying the Lagrange interpolation formula is as follows: ; Among them, each is the Lagrange basic polynomial, expressed as follows: ; (2) Shamir threshold key sharing Shamir threshold secret sharing has two processes: distribution and recovery. For any t-1 degree polynomial function, we only need to obtain t points on its polynomial curve to determine the polynomial function through Lagrange interpolation. Using the points in multidimensional space, we can regard the shared secret as A point in a t-dimensional space, each sub-secret is the equation of a t-1-dimensional hyperplane containing this point. T such planes are constructed and distributed to t participants. The focus of any t t-1-dimensional hyperplanes just determines the shared secret, while the t-1 sub-secret, that is, t-1 t-1-dimensional hyperplanes, can only determine their intersection lines, and no information about the shared secret can be obtained.
[0107] A) Shamir Threshold Secret Distribution Process Constructing polynomials , and obtain a large prime number p, , s is the key of the computing task, and ; Determine the minimum number of restored shards as k; the polynomial The expression is as follows: ; 1. The secret holder randomly generates t-2 random numbers less than p , and randomly select n different integers ; 2. Substitute these n different integers into the polynomial and calculate the n values as follows: ; Distribute each calculated value to the participants, and the i-th participant obtains .
[0108] B) Shamir Threshold Secret Recovery Process Assume that group t , t>k, substitute the following formula to restore the key: .
[0109] Step 5. For privacy computing, zero-knowledge proof is used to store zero-knowledge commitment in the proof chain, and the zero-knowledge proof algorithm of the smart contract is implemented. Each privacy computing node can implement independent homomorphic encryption operations entrusted by the alliance chain. The calculation method of the privacy computing node is as follows: Figure 4 As shown in the figure, the local development environment and privacy computing network node structure of the heterogeneous alliance chain cross-chain privacy computing platform are shown. On the left is the local development environment, including IDE (such as PyCharm, VSCode, Jupyter) and Python execution environment. The execution environment contains the privacy computing task framework, task definition, task registration, execution status monitoring and network node API. On the right is the privacy computing network node connected by a cross-chain connector, which is divided into two parts: Server and Client. Each Server has a task manager, API and task coordinator. The Client part includes a secure execution environment, multi-party secure computing and privacy technology, data isolator and monitor.
[0110] During the task registration phase, the task developer publishes the computing task to the heterogeneous alliance chain platform. The core here is the task content published on the blockchain, and can apply for the storage data on multiple alliance chain nodes to join, excluding the original computing code or initial model parameters. The computing chain only stores the zero-knowledge commitment of the computing task, which is used to verify the computing task and the subsequent verification of the computing results.
[0111] The computing task includes the demand for data, which is described using a standardized data protocol. It also includes some other requirements for nodes and data. The task also needs to set a price, which represents how much you are willing to pay for the task. The data owner's node uses these requirements to determine whether to join a computing and data task. The price is price, the data is data, and the computing algorithm is algorithm. Therefore, the triplet needs to be provided as .
[0112] The data holder chain node will continue to receive the blockchain event CreateTask to obtain the task. If you choose to join a task, you will start listening to the event notification RoundStart of another computing task round. Wait for the computing round to start. During the task registration phase, the data holder does not need to sign up for the task on the chain. The action of signing up occurs after each RoundStart event is received, that is, the data holder does not participate in the entire task, but in a certain round. The reason for this is that both federated learning and federated statistical tasks may contain many rounds, and the process is very long. During the entire task process, the data holder may suddenly disconnect. For the case where the data holder is on the mobile phone, disconnection is even more common. If data holders are only allowed to join the task during the task registration phase, the number of nodes will only decrease during the task operation. The granularity of each round is small enough to allow nodes to choose to join at the beginning of each round. In the case where nodes often disconnect, there can be enough nodes to join each round. This design is also applicable to enterprise scenarios with few nodes and a single node with a lot of data. Compared to letting nodes choose to join a task every time a task is registered, this design will of course cost more. However, the operation of joining a task itself has very little overhead, and even if it is performed once in each round, it will not bring a big burden.
[0113] The task initiator sends an event poll to start the round on the chain. The computing node that receives the event calls the smart contract to sign up to participate. After waiting for a certain period of time, the registration ends, and the task initiator randomly selects a group of registered nodes to participate in the calculation of this round.
[0114] Since computing nodes may go offline at any time, the design principle of the heterogeneous alliance chain privacy computing network is to ensure that the time of a single round of computing is as short as possible. Therefore, the waiting time here must be strictly controlled to prevent the node from going offline after joining the round. For a privacy computing task, no matter what kind of computing task is performed, the basic unit of task execution is the round.
[0115] At the beginning of each round, data holders can choose to join this round. At this time, these joined nodes are called candidate nodes. However, not all candidate nodes can join this round. The task initiator needs to screen the candidate nodes to join and select the nodes that can really join this round, that is, the participating nodes. This is the participant selection. Therefore, the computing network needs to screen the participants, mainly because the more nodes joined, the better. The more nodes are added, the greater the overhead of data transmission and synchronization in the subsequent security aggregation process, so there needs to be an upper limit on the number of nodes. The task initiator can set this upper limit when creating the task as needed.
[0116] Generally speaking, there are three situations for privacy computing tasks: one is different data for different nodes, one is different data for the same node, and one is different computing rounds and different computing nodes also correspond to different computing data. For privacy tasks, the task is training or training models. In each round, the training of the task requires randomly selecting a batch of samples to update the model. In order to ensure randomness, in addition to each node itself randomly selecting on the local data set, we also need to randomly select nodes to prevent data skew caused by node selection.
[0117] Then, the privacy computing client based on the heterogeneous alliance chain starts to run computing tasks on the local data set. Since there is no code and data of the computing logic on the chain, the node needs to first connect to the server based on the privacy computing node of the heterogeneous alliance chain to obtain the computing code and the data required for this round of computing. The node verifies the matching of computing logic and computing tasks through the zero-knowledge commitment of the computing tasks submitted on the chain to prevent the computing node from giving other computing tasks and deceiving the computing node.
[0118] Here, the heterogeneous alliance chain privacy computing node client obtains two things from the server, the computing code and the data required for the computing. The computing code is expressed in the form of a serialized heterogeneous alliance chain privacy computing task. When registering the task on the server, the zero-knowledge commitment corresponding to the heterogeneous alliance chain privacy computing task has been submitted to the chain. Therefore, in this step, the heterogeneous alliance chain privacy computing node client obtains the zero-knowledge commitment from the chain and verifies the correctness of the received heterogeneous alliance chain privacy computing task through the zero-knowledge commitment.
[0119] The data required for calculation includes model parameters, intermediate results obtained by secure aggregation, constants and literals defined by users in the code, and other data. The heterogeneous alliance chain privacy computing node client does not need to verify the correctness of this data. After each round of secure aggregation, the heterogeneous alliance chain privacy computing node server does not upload the aggregated results to the chain. Because this data is useless for the successful execution and settlement of the entire computing task, the client does not care what the data is, as long as the calculation logic is executed on the data given by the server.
[0120] After that, the process of data aggregation algorithm 3 and the node offline fault tolerance processing are integrated together. When the blockchain sends an event to start data aggregation, each computing node determines which nodes have submitted calculation results and which nodes are offline through the data on the chain. If the number of offline nodes is within the tolerable range, data aggregation is started. The mask is a random number that can ensure the privacy of information.
[0121] For each offline node, the computing node sends the secret share used to generate the mask to the outside world, which is used to infer the mask and remove it from the final result. For each online node, the secret share of the seed used to generate the random number is sent to the outside world to remove the random number from the result, which can effectively resist the inference attack, that is, the existence of an eavesdropper eavesdropping on the result.
[0122] The server obtains all the secret shares and adds them together to get the final privacy calculation result.
[0123] In this process, before sending the secret sharing to the outside, the computing node also needs to send the zero-knowledge commitment of the secret sharing to the chain. After the server receives the secret sharing, it also needs to verify it according to the commitment on the chain.
[0124] In step 5, Storage The zero-knowledge proof commitment contains two states of the privacy computing task , the privacy computing node obtains The correctness of the model and data verification is ,as well as After obtaining the calculation results of the privacy computing node, To verify Among them, the required symbols are shown in Table 1.
[0125] Among them, the algorithm of zero-knowledge commitment needs to generate corresponding circuits, implement trusted settings, generate keys, and generate proofs to complete the implementation of zero-knowledge commitment. First, generate the zero-knowledge circuit that needs to be proved. The input is the different Secrets that need to be proved and the selected curves, and the Witness evidence file and R1CS circuit constraints are constructed. The expression is as follows: ; The Groth16 algorithm requires a trusted setup, which consists of two parts: and phase2, first generate The parameters of are based on the curve, the selected constraint values and the random beacon, as follows: ; Phase2 calculates the Lagrange interpolation polynomial based on the ptau output by the following formula to generate the final finalptau, which is expressed as: ; After the trusted setup is completed, it is necessary to build the proof and verification key based on the circuit. It is necessary to use the generated circuit constraints R1CS and finalptau to generate the zero-knowledge key zkey and add a random beacon value as shown below: ; Based on Witness and zkey, proof and public are constructed, and the verification of zero-knowledge commitment can be completed. As shown in the following formula: ; The node itself also supports non-aggregate computing such as the Paillier homomorphic encryption computing protocol. The specific algorithm flow is as follows: Figure 5 As shown in Figure 1. Homomorphic encryption operations can improve the availability of different nodes. The Paillier homomorphic encryption algorithm first selects two random prime numbers p and q, and then calculates the product of the two prime numbers. and the least common multiple . Then select a random number , and satisfy the following formula: ; The public key is , the private key is .
[0126] According to the plaintext passed by the data owner , choose a random number , the encryption formula is as follows: ; Then, a homomorphic addition operation can be performed to obtain the ciphertext after privacy calculation.
[0127] After the client obtains the ciphertext, it can decrypt it according to the following formula to get the privacy calculation result, which is expressed as: .
[0128] According to the algorithm flow, it is not difficult to find that the above algorithm has the following characteristics: The additive homomorphism property is expressed as: ; The homomorphic multiplication property is expressed as: ; ; It is easy to prove the correctness of the homomorphic decryption algorithm. The proof process is as follows: ; To summarize, the privacy computing method, system and device based on heterogeneous alliance chain described in the present invention construct data chain, certification chain, relay chain and supervision chain as the basic alliance chain layer, and extract data according to unified standards and circulate based on hash time lock algorithm by setting up on-chain security interface on the heterogeneous alliance chain architecture, so as to make the heterogeneous alliance chain transparent, eliminate timed tasks and implement access control; in the process of executing privacy computing tasks, the keys required for privacy computing are distributed in the form of Shamir key sharing, and in the process of key recovery, the number of online privacy computing nodes is checked to ensure that the number requirements are met, so as to prevent the failure of computing tasks caused by too many privacy computing node clients being disconnected and waste computing resources.
[0129] Furthermore, when executing privacy computing tasks, the present invention requires data holders to sign up for the task at the beginning of each round of the computing task to prevent task failure caused by data holders being disconnected during long computing processes, and ensure that enough data holder nodes join in each round.
[0130] Furthermore, by introducing a proof chain to store and verify the results of privacy computing, the flow process of on-chain data and off-chain computing and on-chain verification can be realized, ensuring the authenticity and immutability of data flow and privacy computing.
[0131] It should be understood by those skilled in the art that the exemplary components, systems and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software or a combination of the two. Whether it is performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present invention are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link via a data signal carried in a carrier.
[0132] It should be clear that the present invention is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present invention.
[0133] In the present invention, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with features of other embodiments or replace features of other embodiments.
[0134] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the embodiments of the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A privacy computing method based on heterogeneous alliance chain, characterized in that: The method is based on the execution of smart contracts on a heterogeneous alliance chain platform, which is composed of alliance chains of various architectures. The heterogeneous alliance chain platform provides data chain, proof chain, relay chain and supervision chain at the basic alliance chain layer, and uses the standardized security interface provided by the basic alliance chain layer to call on-chain resources at the heterogeneous alliance chain cross-chain layer, and performs information flow based on the hash time lock algorithm to serve the privacy computing platform layer; wherein the data flow is used to store specific information of blockchain blocks as the basic data for privacy computing and cross-chain operations; the proof chain is used to store and verify the results of privacy computing through zero-knowledge proof; the relay chain acts as an intermediary to realize information and data transmission between different alliance chains; the supervision chain is used to record and supervise all cross-chain data flow information; In the privacy computing platform layer, the method comprises the following steps: The task initiator publishes the computing task to the heterogeneous alliance chain platform, and the computing task uses a preset standard data protocol to describe the data requirements and mark the price set for the computing task; the computing task includes aggregation calculation; The data holding node continuously monitors each computing round of the computing task, and at the beginning of each computing round, decides whether to sign up for the task on the chain as a candidate node based on the data demand and the corresponding price, so that the task initiator can randomly select a set number of candidate nodes to participate in this round of computing; The privacy computing node client obtains the computing code and data required for the computing task from the server of the relay chain. The data required for the computing task includes model parameters, secure aggregated intermediate results, constants and literals defined by the user in the code; each privacy computing node client shares the key of the computing task based on Shamir key sharing; The selected data holding node transfers the local data selected according to the data demand to the privacy computing node client through the relay chain based on the hash time lock algorithm; The online privacy computing node client recovers the key of the computing task based on Shamir key sharing, and executes the computing task to obtain the computing result; A data aggregation start event is issued. Each privacy computing node client determines the number of offline nodes through on-chain data. When the number of offline nodes is within the set range, each privacy computing node client processes the local calculation result based on the random number mask and sends it to the server to perform data aggregation. At the same time, the Shamir secret sharing generated according to the mask is sent to the outside for the server to reversely deduce its mask and remove it from the final result. The server obtains the calculation results of all the privacy computing node clients and aggregates them to obtain the final privacy computing result.
2. The privacy computing method based on heterogeneous alliance chain according to claim 1 is characterized in that: The data chain, the certification chain, the relay chain and the supervision chain in the basic alliance chain layer are provided with a cross-link routing module, which is used to achieve access to the alliance chain network and cross-link routing in the P2P network through unified CA certification; The data chain, the certification chain, the relay chain and the supervision chain are also provided with a cross-link adapter for providing a consistency interface, and the consistency interface includes a contract interface, a data interface, a network interface, a verification interface and a consensus interface.
3. The privacy computing method based on heterogeneous alliance chain according to claim 1 is characterized in that: The supervision chain adopts the Hyperledger Fabric blockchain platform to record each cross-chain flow information in the heterogeneous alliance chain platform, and the chain storage serves as a unified standard for information traceability, and sets access permissions.
4. The privacy computing method based on heterogeneous alliance chain according to claim 1 is characterized in that: The selected data holding node transfers the local data selected according to the data requirement to the privacy computing node client through the relay chain based on the hash time lock algorithm. The steps of the hash time lock algorithm include: Input parameters include the dual-chain accounts A and a of the data holding node on the first alliance chain p, the information m of the data holding node and its lock time t1; the dual-chain accounts B and b of the privacy computing node on the second alliance chain q, the information n of the privacy computing node and its lock time t2; Generate a random number S based on the random number generation algorithm Random, the expression is: ; The hash value of the random number S is calculated using the hash algorithm Keccak256. The expression is: ; The data holding node uses the Lock function to perform a locking operation on the first alliance chain p, taking A, H, t1, m, and p as parameters to obtain the locking result k, which is expressed as: ; If k is locked successfully, proceed to the next step, otherwise the algorithm fails and terminates; The privacy computing node uses the Lock function to perform a locking operation on the second alliance chain q, and uses B, H, t2, n, and q as parameters to obtain the locking result l, which is expressed as: ; If l is locked successfully and within time t2, proceed to the next step, otherwise the algorithm fails and terminates; On the first alliance chain p, the data holding node unlocks the information l of the privacy computing node through the get function, with parameters a, S, t2, and q, and the expression is: ; On the second alliance chain q, the privacy computing node unlocks the information k of the data holding node through the get function, with parameters b, S, t1, and p, and the expression is: ; If the unlocking is successful, the data exchange is successful and the data exchange success information is returned; otherwise, the algorithm fails and terminates.
5. The privacy computing method based on heterogeneous alliance chain according to claim 1 is characterized in that: Each privacy computing node client shares the key of the computing task based on Shamir key sharing, including: Constructing polynomials , and obtain a large prime number p, , s is the key of the computing task, and ; Determine the minimum number of restored shards as k; the polynomial The expression is as follows: ; The task initiator randomly generates t-2 random numbers less than p , and randomly select n different integers ; Substituting these n different integers into the polynomial, the n values obtained by calculation are as follows: ; Distribute each calculated value to the privacy computing node client, and the i-th privacy computing node client obtains ; Correspondingly, the online privacy computing node client recovers the key of the computing task based on Shamir key sharing, including: For the t online privacy computing node clients , t>k, substitute into the following formula to restore the key of the computing task: 。 6. The privacy computing method based on heterogeneous alliance chain according to claim 5 is characterized in that: Before the online privacy computing node client recovers the key of the computing task based on Shamir key sharing, the method further includes: Check the number of currently online privacy computing nodes. If the number of online nodes is less than the minimum number of recovery shards, terminate and generate feedback prompt information.
7. The privacy computing method based on heterogeneous alliance chain according to claim 1 is characterized in that: Before each privacy computing node client processes the local calculation result based on the random number mask and sends it to the server to perform data aggregation, the method also includes: The zero-knowledge commitment party of the masked calculation result is sent to the proof chain for verification by the server.
8. The privacy computing method based on heterogeneous alliance chain according to claim 1 is characterized in that: The computing task includes homomorphic encryption operations. The key used in the homomorphic encryption operations is sent by the server to each privacy computing node client through Shamir key sharing, and is restored by the privacy computing node client for homomorphic encryption operations.
9. A privacy computing system based on heterogeneous alliance chain, characterized in that: The system is composed of alliance chains of various architectures. A heterogeneous alliance chain platform is constructed by loading smart contracts. The heterogeneous alliance chain platform provides data chain, proof chain, relay chain and supervision chain at the basic alliance chain layer. The standardized security interface provided by the basic alliance chain layer is used to call on-chain resources at the heterogeneous alliance chain cross-chain layer, and information flow is performed based on the hash time lock algorithm to serve the privacy computing platform layer; wherein, the data flow is used to store specific information of blockchain blocks as the basic data for privacy computing and cross-chain operations; the proof chain is used to store and verify the results of privacy computing through zero-knowledge proof; the relay chain acts as an intermediary to realize information and data transmission between different alliance chains; the supervision chain is used to record and supervise all cross-chain data flow information; The smart contract executes the steps of the method as described in any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Cited By
Cross-chain data supervision method and system based on homomorphic encryption
CN119945737A
