Privacy calculation method and device, electronic equipment and storage medium

By integrating privacy computing algorithms with blockchain smart contract technology, a privacy computing contract architecture is solved in the existing technology of algorithm opacity, hardware dependence and inability to meet the trusted computing of the entire process, the security and trustworthiness of data and algorithms are realized, and the hardware cost is reduced.

CN119918082APending Publication Date: 2025-05-02ZTE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311435235.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-30
Publication Date
2025-05-02

AI Technical Summary

Technical Problem

When existing privacy computing technologies realize data circulation security and trustworthy computing, there is the opacity of algorithms to each participant, hardware dependence, and the inability to meet the requirements of trustworthy computing in the entire process of data.

Method used

By integrating privacy computing algorithms with blockchain smart contract technology, a privacy computing contract architecture is built to realize pure soft design that does not rely on hardware, reduce hardware costs, and use blockchain to store privacy computing encryption results to realize monitoring and auditing of privacy computing in the circulation of data elements.

Benefits of technology

It realizes the security and trustworthiness of data and algorithms in the privacy computing process, reduces hardware costs, simplifies algorithm upgrade operations, and has the ability to monitor and audit privacy computing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119918082A_ABST
    Figure CN119918082A_ABST
Patent Text Reader

Abstract

The invention discloses a privacy calculation method and system, electronic equipment and a storage medium, and belongs to the technical field of communication. The method comprises the following steps: acquiring a privacy computing task request sent by a task initiator node, wherein the privacy computing task request comprises an algorithm identifier and a plurality of data identifiers; obtaining a target privacy calculation algorithm corresponding to the algorithm identifier from the block chain, obtaining encrypted data corresponding to the data identifier from each task participant node, and calculating to obtain a privacy calculation encryption result; storing the privacy calculation encryption result to the block chain; and receiving a query request parameter carrying the target result identifier sent by the task initiator node, and obtaining a privacy calculation encryption result corresponding to the target result identifier from the block chain, so as to obtain a privacy calculation result based on the privacy calculation encryption result. According to the method, the hardware cost can be reduced while the privacy calculation process is safe and credible, and privacy calculation in data element circulation can be monitored and audited.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to privacy computing methods, devices, electronic devices and storage media. Background Art

[0002] Nowadays, data has become a new type of production factor. Accelerating the improvement of the market-oriented allocation of data factors has become the only way to promote high-quality digital development. As a technological product, data has many characteristics such as virtuality, low-cost replicability, and subject diversity. At present, in the circulation process of data, there is a risk of easy copying and leakage of data. How to ensure the orderly flow and safe application of data while ensuring that the data is available, manageable, complete, accurate, safe and reliable is still in the exploration stage of the industry.

[0003] At present, the industry mainly adopts a solution that combines multi-party secure computing and trusted execution environment (TEE) in privacy computing technology. Multi-party secure computing technology is used to improve the security of data circulation at the software level to achieve "available but invisible" data. TEE is used to provide a secure and complete independent processing environment at the hardware level to jointly achieve trusted computing of data elements at the software and hardware levels. However, this solution has the following problems in practice:

[0004] 1. Storing the privacy computing algorithm in a trusted execution environment can prevent the algorithm from being tampered with by means of memory isolation and restricted access, but it is not possible to make the algorithm completely open and transparent to all participants, and it is not convenient to monitor and audit the privacy computing in the circulation of data elements;

[0005] 2. The trusted execution environment relies on hardware implementation, which is costly;

[0006] 3. Pure privacy computing cannot meet the requirements of in-process monitoring and post-audit required for trusted computing of the entire data process. Summary of the invention

[0007] The main purpose of this application is to provide a privacy computing method, device, electronic device and storage medium, aiming to achieve a secure and reliable privacy computing process while reducing hardware costs, and being able to monitor and audit privacy computing in the circulation of data elements.

[0008] To achieve the above objectives, this application provides a privacy computing method, including:

[0009] Obtaining a privacy computing task request sent by a task initiator node, wherein the privacy computing task request includes an algorithm identifier and multiple data identifiers, wherein one data identifier corresponds to encrypted data required for a task participant node to participate in privacy computing;

[0010] Obtaining the target privacy computing algorithm corresponding to the algorithm identifier from the blockchain, and obtaining the encrypted data corresponding to the data identifier from each of the task participant nodes, and calculating to obtain the privacy computing encryption result;

[0011] Storing the privacy-preserving computing encryption result in the blockchain, wherein each stored privacy-preserving computing encryption result corresponds to a unique result identifier;

[0012] Receive a query request parameter carrying a target result identifier sent by the task initiator node, obtain a privacy computing encryption result corresponding to the target result identifier from the blockchain, and obtain a privacy computing result based on the privacy computing encryption result.

[0013] In addition, to achieve the above objectives, the present application also provides a privacy computing device, including:

[0014] A first acquisition module is configured to acquire a privacy computing task request sent by a task initiator node, wherein the privacy computing task request includes an algorithm identifier and multiple data identifiers, wherein one data identifier corresponds to encrypted data required for a task participant node to participate in privacy computing;

[0015] The second acquisition module is configured to obtain the target privacy computing algorithm corresponding to the algorithm identifier from the blockchain, and obtain the encrypted data corresponding to the data identifier from each of the task participant nodes, and calculate the privacy computing encryption result;

[0016] A privacy-preserving computing module, configured to store the privacy-preserving computing encryption result in the blockchain, wherein each stored privacy-preserving computing encryption result corresponds to a unique result identifier;

[0017] The result query module is configured to receive a query request parameter carrying a target result identifier sent by the task initiator node, obtain a privacy-preserving computing encryption result corresponding to the target result identifier from the blockchain, and obtain a privacy-preserving computing result based on the privacy-preserving computing encryption result.

[0018] In addition, to achieve the above-mentioned purpose, the present application also provides an electronic device, which includes: a memory, a processor, and a privacy computing program stored in the memory and executable on the processor, and the privacy computing program implements the privacy computing method as described above when executed by the processor.

[0019] In addition, to achieve the above-mentioned purpose, the present application also provides a computer-readable storage medium, on which a privacy computing program is stored. When the privacy computing program is executed by a processor, the privacy computing method as described above is implemented.

[0020] The present application proposes a privacy computing method, device, electronic device and storage medium. In the privacy computing method, the technical solution of the embodiment of the present application is to obtain a privacy computing task request sent by a task initiator node, and the privacy computing task request includes an algorithm identifier and multiple data identifiers, wherein one data identifier corresponds to the encrypted data required for a task participant node to participate in the privacy computing; obtain the target privacy computing algorithm corresponding to the algorithm identifier from the blockchain, and obtain the encrypted data corresponding to the data identifier from each task participant node, calculate the privacy computing encryption result, and store the privacy computing encryption result in the blockchain, wherein each stored privacy computing encryption result corresponds to a unique , and then receive the query request parameter carrying the target result identifier sent by the task initiator node, and obtain the privacy computing encryption result corresponding to the target result identifier from the blockchain, so as to obtain the privacy computing result based on the privacy computing encryption result, so that the embodiment of the present application integrates and innovates the privacy computing algorithm and blockchain smart contract technology, constructs a privacy computing contract architecture, and proposes a trusted computing contract framework to achieve data and algorithm security and reliability in the privacy computing process. The privacy computing contract architecture implements a pure software design that does not rely on hardware, meets the requirements of reducing hardware costs, and more convenient algorithm upgrade operations, and can monitor and audit privacy computing in the circulation of data elements. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0022] Figure 1 This is a flowchart of the first embodiment of the privacy computing method of this application;

[0023] Figure 2 A schematic diagram of a trusted computing contract system framework in an embodiment of the present application;

[0024] Figure 3 for Figure 2 Schematic diagram of transaction scenarios of key storage module;

[0025] Figure 4 for Figure 2 Schematic diagram of the transaction scenario of the encrypted data storage module;

[0026] Figure 5 for Figure 2 Schematic diagram of the transaction scenario of the result storage module and the decryption module;

[0027] Figure 6 A flowchart of generating a privacy computing contract in an embodiment of the present application;

[0028] Figure 7 This is a timing diagram of the privacy computing method in an embodiment of the present application;

[0029] Figure 8 This is a schematic diagram of the functional modules of the privacy computing device according to an embodiment of the present application;

[0030] Fig. 9 This is a schematic diagram of the hardware structure of the electronic device involved in the embodiment of the present application.

[0031] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0032] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

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

[0034] It should be noted that all directional indications in the embodiments of the present application (such as up, down, left, right, front, back, etc.) are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0035] In this application, unless otherwise clearly specified and limited, the terms "connection", "fixation", etc. should be understood in a broad sense. For example, "fixation" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0036] In addition, in this application, descriptions such as "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.

[0037] At present, the industry mainly adopts a solution that combines multi-party secure computing and trusted execution environment (TEE) in privacy computing technology. Multi-party secure computing technology is used to improve the security of data circulation at the software level to achieve "available but invisible" data. TEE is used to provide a secure and complete independent processing environment at the hardware level to jointly achieve trusted computing of data elements at the software and hardware levels. However, this solution has the following problems in practice:

[0038] 1. Storing the privacy computing algorithm in a trusted execution environment can prevent the algorithm from being tampered with by means of memory isolation and restricted access, but it is not possible to make the algorithm completely open and transparent to all participants, and it is not convenient to monitor and audit the privacy computing in the circulation of data elements;

[0039] 2. The trusted execution environment relies on hardware implementation, which is costly;

[0040] 3. Pure privacy computing cannot meet the requirements of in-process monitoring and post-audit required for trusted computing of the entire data process.

[0041] Based on this, the present application embodiment provides a privacy computing method, referring to Figure 1 , Figure 1 This is a flowchart of an embodiment of a privacy computing method of the present application. In this embodiment, the privacy computing method includes:

[0042] Step S10, obtaining a privacy computing task request sent by a task initiator node, wherein the privacy computing task request includes an algorithm identifier and multiple data identifiers, wherein one data identifier corresponds to encrypted data required for a task participant node to participate in privacy computing;

[0043] Those skilled in the art know that privacy computing refers to a series of information technologies that analyze and calculate data while ensuring that the data provider does not leak the original data, thereby ensuring that the data is "available but invisible" during the circulation and integration process.

[0044] The embodiments of the present application are mainly used in multi-party data privacy computing scenarios during the circulation of data elements. For example, in the federated learning scenario: Federated learning aims to establish a federated learning model based on a distributed data set. It is a learning model that collaboratively completes machine learning tasks without the original data being stored. The participants in federated learning jointly train a network model. Each participant trains and calculates its own samples locally. It is necessary to exchange the gradient data of each training, and jointly calculate a gradient value suitable for both parties based on the gradient data of both parties to perform the joint gradient descent process.

[0045] In this embodiment, one algorithm identifier corresponds to one privacy computing algorithm, wherein the first preset node in the blockchain may store multiple different algorithm identifiers and a first mapping relationship between each algorithm identifier and the privacy computing algorithm.

[0046] After step S10, execute step S20 to obtain the target privacy computing algorithm corresponding to the algorithm identifier from the blockchain, and obtain the encrypted data corresponding to the data identifier from each of the task participant nodes, and calculate to obtain the privacy computing encryption result;

[0047] Among them, the target privacy computing algorithm is the privacy computing algorithm corresponding to the algorithm identifier sent by the task initiator node.

[0048] In this embodiment, the algorithm identifier sent by the task initiator node can be obtained, the first mapping relationship can be queried from the first preset node of the blockchain to retrieve the corresponding privacy computing algorithm (the corresponding privacy computing algorithm is the target privacy computing algorithm), and the encrypted data corresponding to the data identifier can be obtained from each task participant node. Then, based on the encrypted data obtained from each task participant node and combined with the target privacy computing algorithm, the privacy computing encryption result is calculated.

[0049] It should be noted that the encrypted data is obtained by encrypting the original data required to participate in secure multi-party privacy computing by the task participant node. The algorithm used to encrypt the original data is an asymmetric encryption algorithm, that is, the encryption key used to encrypt the original data is inconsistent with the decryption key corresponding to the encrypted data (to prevent illegal persons from decrypting the encrypted data by stealing the encryption key, obtaining the original data participating in secure multi-party privacy computing, and thus leaking the privacy information of the participant nodes).

[0050] Among them, secure multi-party privacy computing means: in the absence of a trusted third party, multiple participants jointly calculate an objective function, and ensure that each party only obtains its own calculation results, and it is impossible to infer the input data of any other party through the interaction data during the calculation process.

[0051] The embodiment of the present application obtains the encrypted data from each task participant node instead of directly obtaining the original data of the task participant node participating in the secure multi-party privacy computing, thereby avoiding the leakage of privacy data, improving the security of the privacy computing process, and ensuring that the data is "available but invisible" during the circulation and integration process.

[0052] After step S20, executing step S30, storing the privacy-preserving computing encryption result in the blockchain, wherein each stored privacy-preserving computing encryption result corresponds to a unique result identifier;

[0053] That is, the privacy computing encryption result obtained after encrypting the acquired encrypted data is stored on the chain. It should be noted that the second preset node in the blockchain can store multiple different privacy computing encryption results, as well as a second mapping relationship between each privacy computing encryption result and the result identifier.

[0054] Step S40, receiving a query request parameter carrying a target result identifier sent by the task initiator node, obtaining a privacy computing encryption result corresponding to the target result identifier from the blockchain, and obtaining a privacy computing result based on the privacy computing encryption result.

[0055] In this embodiment, by receiving the query request parameter carrying the target result identifier sent by the task initiator node, the second mapping relationship can be queried from the second preset node of the blockchain to retrieve the corresponding privacy computing encryption result (that is, the privacy computing encryption result corresponding to the target result identifier is obtained from the chain), and based on the privacy computing encryption result obtained from the chain, the client (the client at this time refers to the task initiator node) obtains the final required data information (that is, the privacy computing result).

[0056] As an example, the step of obtaining a privacy computing result based on the privacy computing encryption result includes:

[0057] Step A10, sending the privacy computing encryption result to the task initiator node, so that the task initiator node decrypts the privacy computing encryption result based on the decryption key corresponding to the encrypted data to obtain the privacy computing result.

[0058] In this embodiment, the decryption key corresponding to the encrypted data is stored in the task initiator node. Those skilled in the art will know that the decryption key corresponding to the encrypted data is also the decryption key of the privacy computing encryption result.

[0059] This embodiment can send the privacy computing encryption result to the task initiator node, so that the task initiator node can decrypt the privacy computing encryption result based on the decryption key corresponding to the encrypted data to obtain the privacy computing result, so that the task initiator can obtain the privacy computing result calculated by participating in the secure multi-party privacy computing. Since the privacy computing result requires the task initiator's private decryption key to decrypt the privacy computing encryption result, it effectively avoids the leakage of privacy data, thereby improving the security of the privacy computing process and ensuring that the data is "available but invisible" during the circulation and integration process.

[0060] As another example, the step of obtaining a privacy computing result based on the privacy computing encryption result includes:

[0061] Step B10, decrypting the privacy computing encryption result based on the decryption key corresponding to the encrypted data to obtain a privacy computing result;

[0062] Step B20, sending the privacy calculation result to the task initiator node.

[0063] In this embodiment, the decryption key corresponding to the encrypted data is stored in the key storage module of the trusted computing contract platform (at this time, the client terminal corresponding to the trusted computing contract platform is the executor of the privacy computing method of the embodiment of this application), and is not stored on the chain (that is, the decryption key corresponding to the encrypted data is not stored on the blockchain).

[0064] That is, this embodiment integrates and innovates the privacy computing algorithm and blockchain smart contract technology, constructs a privacy computing contract architecture, and proposes a trusted computing contract framework (including a trusted computing contract platform) to ensure data and algorithms are secure and reliable during the privacy computing process. The trusted computing contract platform implements a pure software design that does not rely on hardware, meets the requirements of reducing costs, and facilitates algorithm upgrade operations, and can monitor and audit privacy computing in the circulation of data elements.

[0065] This embodiment can decrypt the privacy computing encryption result based on the decryption key corresponding to the encrypted data to obtain the privacy computing result, and send the privacy computing result to the task initiator node, so that the task initiator obtains the privacy computing result calculated by participating in the secure multi-party privacy computing. Since the privacy computing result and the decryption key are not stored on the chain, illegal persons cannot obtain the original data information of the task initiator (that is, the original data participating in the secure multi-party privacy computing) and the privacy computing result through the privacy computing encryption result, thereby effectively avoiding the leakage of privacy data, further improving the security of the privacy computing process, and ensuring that the data is "available but invisible" during the circulation and integration process.

[0066] It is known to those skilled in the art that blockchain is a technology set composed of multiple technologies such as consensus algorithms, cryptography and distributed storage. It combines data in a sequential manner in chronological order into a chain data structure, which has the characteristics of decentralization, information cannot be tampered with, information transparency and common maintenance. The smart contract platform (the executor of the privacy computing method in the embodiment of the present application) can automatically execute the contract on behalf of each signatory without relying on a central agency. Due to the decentralized characteristics of blockchain, the results of smart contract execution will be saved on all nodes to ensure the credibility and non-tamperability of the execution results. This embodiment combines privacy computing with blockchain technology, which can not only effectively protect sensitive information in the process of data circulation and sharing, but also realizes data sharing that can be recorded, verified, traceable, auditable, controllable and secure and reliable throughout the process.

[0067] It should be noted that in this embodiment, any task initiator node among the above-mentioned task participant nodes can have its role converted into a task initiator node, and the task initiator node can also have its role converted into a task participant node. After the role conversion, if the processing logic of the privacy computing method of the embodiment of the present application is still executed, that is, even if the task participant node and / or the task initiator node undergoes a role conversion, if the processing logic of the task participant node and the task initiator node itself is essentially the same as the technical concept of the embodiment of the present application, it is still within the scope of protection of the present application.

[0068] The present application proposes a privacy computing method, device, electronic device and storage medium. In the privacy computing method, the technical solution of the embodiment of the present application is to obtain a privacy computing task request sent by a task initiator node, and the privacy computing task request includes an algorithm identifier and multiple data identifiers, wherein one data identifier corresponds to the encrypted data required for a task participant node to participate in the privacy computing; obtain the target privacy computing algorithm corresponding to the algorithm identifier from the blockchain, and obtain the encrypted data corresponding to the data identifier from each task participant node, calculate the privacy computing encryption result, and store the privacy computing encryption result in the blockchain, wherein each stored privacy computing encryption result corresponds to a unique , and then receive the query request parameter carrying the target result identifier sent by the task initiator node, and obtain the privacy computing encryption result corresponding to the target result identifier from the blockchain, so as to obtain the privacy computing result based on the privacy computing encryption result, so that the embodiment of the present application integrates and innovates the privacy computing algorithm and blockchain smart contract technology, constructs a privacy computing contract architecture, and proposes a trusted computing contract framework to achieve data and algorithm security and reliability in the privacy computing process. The privacy computing contract architecture implements a pure software design that does not rely on hardware, meets the requirements of reducing hardware costs, and more convenient algorithm upgrade operations, and can monitor and audit privacy computing in the circulation of data elements.

[0069] In order to help understand the technical concept of the embodiment of the present application, a specific embodiment 1 is listed, please refer to Figure 2 , Figure 2 Schematic diagram of the trusted computing contract system framework in the embodiment of the present application, wherein the terminal corresponding to the trusted computing contract platform is the execution subject of the privacy computing method in the embodiment of the present application, including:

[0070] The privacy computing task initiator is used to generate encryption and decryption key pairs and initiate privacy computing request tasks (i.e., privacy computing task requests).

[0071] Trusted computing contract platform, providing trusted privacy computing functions based on privacy computing contracts;

[0072] Privacy computing task participants are used to participate in privacy computing tasks.

[0073] Furthermore, after the initiator of the privacy computing task generates an encryption and decryption key pair locally, it stores the encryption key (i.e., an asymmetric encryption key) in the key storage module in the trusted computing contract platform. Its local original data set is encrypted by the encryption key and becomes encrypted data stored in the local privacy data set. Before initiating the privacy computing task, the hash value of the required encrypted data is stored in the blockchain through the encrypted data notarization module; the task initiator sends a request to execute the privacy computing contract (i.e., a privacy computing task request), and after the privacy computing task is completed, it obtains the privacy computing contract execution result (i.e., the privacy computing encryption result) from the blockchain through the result notarization module.

[0074] Furthermore, the trusted computing contract platform can be divided into three layers: blockchain infrastructure layer, privacy computing contract interface layer, and privacy computing contract application layer. Among them, the blockchain infrastructure layer mainly includes the underlying blockchain engine, providing blockchain capabilities that cannot be tampered with, decentralized, and fully traceable data.

[0075] The privacy computing contract interface layer provides privacy computing contract applications with interfaces including ledger reading, ledger writing, and encrypted data acquisition:

[0076] Ledger reading interface (GetState): communicates with the blockchain node through the grpc protocol to obtain the corresponding ledger data at the node. gRPC is a high-performance, open source, and universal RPC (Remote Procedure Call) framework;

[0077] Ledger writing interface (PutState): communicates with blockchain nodes through the grpc protocol, sends data to the nodes, and writes the data into the node ledger after the corresponding transaction reaches a consensus;

[0078] Encrypted data acquisition interface (GetEncryptedData): obtains the corresponding encrypted data stored in the privacy data set of each participant based on the address information of the privacy computing participant and the participant data identifier (dataId).

[0079] This embodiment proposes a trusted computing contract framework, solves the adaptation problem between privacy computing and smart contracts based on the framework, constructs a privacy computing contract architecture, and realizes the adaptation and transformation of privacy computing algorithms and processes.

[0080] Among the related technologies, privacy computing improves the security of data circulation at the technical level and can achieve "available but invisible" data. However, in practice, the following problems still exist: (1) The trustworthiness of data and algorithms in the privacy computing process, how to make the algorithm completely transparent to users so as to review its security; (2) The trusted execution environment relies on hardware implementation, which is costly and has the problem that the algorithm cannot be updated or is difficult to update; (3) Simple privacy computing cannot meet the requirements of prior authorization, in-process monitoring, and post-audit required for trusted computing of the entire data process.

[0081] In response to the above problems, this embodiment integrates and innovates the privacy computing algorithm and blockchain smart contract technology, and proposes a trusted computing contract framework. Through smart contracts, the data and algorithms in the privacy computing process can be secure and reliable. The trusted computing contract framework implements a pure software design that does not rely on hardware, meets the requirements of reducing costs, and more convenient algorithm upgrade operations. It can also monitor and audit the privacy computing in the circulation of data elements.

[0082] It should be noted that although the above-mentioned specific embodiment 1 shows many details, it is only used to help understand the technical concept or technical principle of the embodiment of the present application, and does not constitute a limitation of the present application. More simple transformations based on the technical concept should all be within the scope of protection of the present application.

[0083] In order to further help understand the application scenarios or technical concepts of the embodiments of the present application, a specific embodiment 2 is listed:

[0084] This embodiment is mainly used in multi-party data privacy computing scenarios during the circulation of data elements, such as federated learning scenarios. Combined with the homomorphic encryption algorithm, the available invisible gradient data in the federated learning process can be achieved, avoiding the inference of privacy information such as training data, labels, and models from the gradient data of several iterations. The specific implementation content of the homomorphic encryption privacy computing contract constructed based on the trusted computing contract framework of the embodiment of this application is as follows:

[0085] 1. Implement the encryption key storage module, construct the key storage transaction and store the homomorphic encryption key to the blockchain, and provide a key acquisition method to obtain the stored homomorphic encryption key from it;

[0086] 2. Implement the encrypted data notarization module, construct the encrypted data hash notarization transaction and store the hash value of the encrypted training data of the federated learning participants in the blockchain;

[0087] 3. Implement the result storage and decryption module, construct the result storage transaction and store the homomorphic encryption result on the chain, and provide a decryption method to obtain the plaintext calculation result based on the homomorphic encryption result and the decryption key.

[0088] 4. Implement the privacy computing module, in which the homomorphic encryption algorithm is implemented as follows:

[0089] 1) Implement homomorphic "addition" and homomorphic "multiplication" of encrypted data, wherein the "addition" operation includes the plaintext polynomial "addition" of the ciphertext polynomial, and the ciphertext polynomial "addition" of the ciphertext polynomial operation; and the "multiplication" operation includes the plaintext polynomial "multiplication" of the ciphertext polynomial, and the ciphertext polynomial "multiplication" of the ciphertext polynomial operation.

[0090] 2) Based on the above key storage module and decryption module, data encryption and decryption of federated learning training data are realized.

[0091] 3) Use the encrypted data acquisition interface in the privacy computing contract layer to obtain the encrypted data of federated learning participants required for the privacy computing task.

[0092] 4) Based on the above-mentioned result storage module, the calculation results of the federated learning data through homomorphic "addition" or homomorphic "multiplication" are stored on the blockchain to make the calculation results traceable.

[0093] In the above homomorphic encryption privacy computing contract, homomorphic encryption data storage, homomorphic encryption algorithm execution, homomorphic encryption result storage and decryption are carried out in the federated learning process, which can ensure the security and reliability of the data and algorithm of the homomorphic encryption process.

[0094] It should be noted that Specific Example 2 is only used to help understand the application scenarios or technical concepts of the embodiments of the present application, and does not constitute a limitation on the embodiments of the present application. More simple transformations based on the technical concept should all be within the scope of protection of the present application.

[0095] In a possible implementation manner, the privacy-preserving computing task request further includes a target key identifier, and before obtaining the privacy-preserving computing task request sent by the task initiator node, further includes:

[0096] Step C10, obtaining the asymmetric encryption key sent by the task initiator node, and storing the encryption key in the blockchain, wherein each stored encryption key corresponds to a unique key identifier, and the encryption key is the encryption key corresponding to the encrypted data;

[0097] In this embodiment, one key identifier corresponds to one encryption key, and the third preset node in the blockchain may store multiple different key identifiers, as well as a third mapping relationship between each key identifier and the encryption key.

[0098] Step C20, the step of calculating and obtaining the privacy calculation encryption result includes:

[0099] Step C30, obtaining a target encryption key corresponding to the target key identifier from the blockchain;

[0100] The target encryption key is the encryption key corresponding to the target key identifier.

[0101] In this embodiment, the target key identifier sent by the task initiator node can be obtained, and the third mapping relationship can be queried from the third preset node of the blockchain to retrieve the corresponding encryption key (the corresponding encryption key is the target encryption key).

[0102] Step C40, using the target encryption key and the encrypted data obtained from each of the task participant nodes as input parameters of the target privacy computing algorithm to calculate a privacy computing encryption result.

[0103] This embodiment obtains the target encryption key corresponding to the target key identifier from the blockchain, and uses the target encryption key and the encrypted data obtained from each task participant node as input parameters of the target privacy computing algorithm for calculation, so as to accurately calculate the privacy computing encryption result and accurately obtain the encrypted privacy computing result. After the task initiator obtains the privacy computing encryption result from the blockchain, it can decrypt the privacy computing encryption result through a private decryption key, so that the client (the client at this time can refer to the task initiator node) can obtain the final required data information.

[0104] In a possible implementation, the privacy computing task request further includes an information identifier, where the information identifier corresponds to the encrypted information required for the task initiator node to participate in the privacy computing.

[0105] The step of using the target encryption key and the encrypted data obtained from each of the task participant nodes as input parameters of the target privacy computing algorithm to calculate the privacy computing encryption result also includes:

[0106] Step D10, obtaining the encrypted information corresponding to the information identifier from the task initiator node;

[0107] The embodiment of the present application obtains the encrypted information from the task initiator node instead of directly obtaining the original data of the task initiator node participating in the secure multi-party privacy computing, thereby avoiding the leakage of privacy data, improving the security of the privacy computing process, and ensuring that the data is "available but invisible" during the circulation and integration process.

[0108] Step D20, using the target encryption key, the encrypted information obtained from the task initiator node, and the encrypted data obtained from each of the task participant nodes as input parameters of the target privacy computing algorithm, and calculating the privacy computing encryption result.

[0109] In this embodiment, the encrypted information is the encrypted data corresponding to the task initiator node, that is, the encrypted information is obtained by the task initiator node encrypting the original data required to participate in the secure multi-party privacy computing. The encrypted data obtained from the task participant node is obtained by the task participant node encrypting the original data required to participate in the secure multi-party privacy computing.

[0110] This embodiment obtains the encrypted information corresponding to the information identifier from the task initiator node, and uses the target encryption key, the encrypted information obtained from the task initiator node, and the encrypted data obtained from each task participant node as input parameters of the target privacy computing algorithm. This allows multiple task participant nodes to participate in secure multi-party privacy computing by inputting their own data information. In addition, the task initiator node itself can also input its own data information to participate in secure multi-party privacy computing, enriching the scenario application requirements of secure multi-party privacy computing and thereby improving the robustness of the privacy computing method of the embodiment of the present application.

[0111] In a possible implementation, the privacy-preserving computing task request further includes a target hash data identifier, and before obtaining the target privacy-preserving computing algorithm corresponding to the algorithm identifier from the blockchain, further includes:

[0112] Step E10, obtaining the hash value corresponding to the encrypted information and the hash value of the encrypted data corresponding to each of the task participant nodes, and storing the obtained hash values ​​in the blockchain, wherein each stored hash value corresponds to a unique hash value identifier.

[0113] Further, after obtaining the encrypted information corresponding to the information identifier from the task initiator node, the method further includes:

[0114] Step F10, performing hash calculation on the encrypted information obtained from the task initiator node to obtain a first actual hash value corresponding to the task initiator node, and performing hash calculation on the encrypted data obtained from each of the task participant nodes to obtain a second actual hash value corresponding to each of the task participant nodes;

[0115] Step F20, based on the first hash value identifier sent by the task initiator node, obtain the first target hash value of the encrypted information sent by the task initiator node from the blockchain, and based on the second hash value identifier sent by each task participant node, obtain the second target hash value of the encrypted data sent by each task participant node from the blockchain;

[0116] Step F30, performing security verification on the encrypted information sent by the task initiator node according to the first actual hash value and the first target hash value to obtain a first security verification result;

[0117] Exemplarily, in step F30, the step of performing security verification on the encrypted information sent by the task initiator node according to the first actual hash value and the first target hash value, and obtaining a first security verification result includes:

[0118] Step G10: when the first actual hash value and the first target hash value are inconsistent, determining that the first security verification result is a verification failure;

[0119] Step G20: When the first actual hash value is consistent with the first target hash value, determine that the first security verification result is successful.

[0120] This embodiment performs security verification on the encrypted information sent by the task initiator node by comparing whether the first actual hash value is consistent with the first target hash value, thereby preventing illegal persons from maliciously tampering with the encrypted information sent by the task initiator node, and preventing the data uploaded by the task initiator node from containing errors, thereby affecting the security and credibility of the privacy calculation process in the circulation of data elements.

[0121] After step F30, step F40 is executed to perform security verification on the encrypted data sent by each of the task participant nodes according to the second actual hash value and the second target hash value, so as to obtain a second security verification result corresponding to each of the task participant nodes;

[0122] Exemplarily, in step F40, the encrypted data sent by each of the task participant nodes is security verified according to the second actual hash value and the second target hash value, and the step of obtaining the second security verification result corresponding to each of the task participant nodes includes:

[0123] Step H10, respectively comparing the second actual hash value and the second target hash value corresponding to the same task participant node to obtain a comparison result corresponding to each task participant node;

[0124] Step H20, when all the comparison results are consistent, determine that the second security verification results corresponding to all the task participant nodes are successful.

[0125] This embodiment performs security verification on the encrypted data sent by the task participant node by comparing the second actual hash value and the second target hash value corresponding to the same task participant node to see if they are consistent, thereby preventing illegal persons from maliciously tampering with the encrypted data sent by the task participant node, and preventing the data uploaded by the task participant node from containing errors, which affects the security and credibility of the privacy calculation process in the circulation of data elements.

[0126] After step F40, execute step F50. When the first security verification result and each of the second security verification results are successful, execute the step of using the target encryption key, the encrypted information obtained from the task initiator node, and the encrypted data obtained from each of the task participant nodes as input parameters of the target privacy calculation algorithm.

[0127] In this embodiment, when the first security verification result and each second security verification result are all successful, it means that the data provided by all nodes participating in the secure multi-party privacy computing (including the task initiator node and each task participant node) are safe and reliable. Through comprehensive security verification, the data participating in the multi-party secure computing can be prevented from being illegally tampered with, or the node itself can upload data incorrectly, resulting in unreliable computing results. This realizes secure and reliable computing of data flow and solves the problems of malicious algorithms and data tampering in privacy computing.

[0128] It is worth mentioning that the embodiment of the present application avoids the leakage of privacy data caused by the open and transparent nature of the privacy computing contract by proposing a privacy data storage and encryption and decryption mechanism based on the trusted computing contract framework, thereby achieving full-process privacy data security.

[0129] In order to help understand the technical principles of the embodiments of this application, a specific embodiment 3 is listed, in which the privacy computing contract application layer includes:

[0130] 1. The key storage module is used to store the encryption keys for encrypting the original data sets of all participants in the privacy computing, so as to avoid directly passing the plaintext data sets to the privacy computing contract and causing privacy data leakage. It implements the key storage method based on the PutState interface in the smart contract interface layer to construct a key storage transaction based on the key-value pair information of the encryption key generated by the task initiator and stores it in the blockchain. It implements the key acquisition method based on the GetState interface to obtain the stored encryption key. Among them: Key is constructed by the task initiator Id, and Value is the encryption key (publicKey). Task participants can obtain the corresponding encryption key from the blockchain through the key storage module, such as Figure 3 shown.

[0131] 2. The encrypted data evidence module is used to store the hash values ​​of the encrypted data belonging to the privacy computing participants on the chain to achieve tamper-proofing of the encrypted data of each participant. It implements the encrypted data hash value evidence method through the PutState interface in the smart contract interface layer, and uses the encrypted data hash value key-value pair information uploaded by the privacy computing parties to construct an encrypted data hash evidence transaction and store it on the blockchain. When executing a privacy computing task, the privacy computing contract can obtain the corresponding encrypted data from each privacy computing task participant according to the encrypted data identifier (dataId), and query the hash value of the corresponding encrypted data through the encrypted data hash query method implemented based on the GetState interface in the encrypted data evidence module, and determine whether the encrypted data has been tampered with by comparison, such as Figure 4 shown.

[0132] 3. The result storage module and the decryption module are used to store and upload the privacy computing results to the blockchain and for the privacy computing task initiator to decrypt the privacy computing results. The result storage module implements the privacy computing result storage method through the PutState interface in the smart contract interface layer, constructs the corresponding result storage transaction and writes it to the blockchain. Accordingly, the task initiator can obtain the corresponding privacy computing result from the result storage module according to the result identifier (resId). The decryption module is used to decrypt the encrypted privacy computing result. Its input is the encrypted privacy computing result and the decryption key, and its output is the plaintext privacy computing result, such as Figure 5 shown.

[0133] 4. Privacy computing module, which is used to receive privacy computing task requests and implement privacy computing of privacy data of all parties involved in privacy computing. The privacy computing module contains a privacy computing algorithm (hereinafter referred to as the privacy computing contract algorithm) adapted and modified according to the privacy computing contract framework. It implements the privacy data encryption and decryption, encrypted data acquisition of participants and storage of privacy computing algorithm results in the original privacy computing algorithm through the privacy computing contract framework. The specific adaptation and modification methods are as follows:

[0134] (1) The privacy computing contract algorithm implements privacy data encryption and decryption based on the key storage module and decryption module of the privacy computing contract application layer. The privacy data is encrypted by obtaining the encryption key from the key storage module, and the privacy data is decrypted by the decryption module;

[0135] (2) The privacy computing contract algorithm uses the GetEncryptedData interface in the privacy computing contract layer to obtain the encrypted data of the participants required for the privacy computing task;

[0136] (3) The privacy computing contract algorithm stores its calculation results on the blockchain based on the result storage module of the privacy computing contract application layer, making the calculation results traceable. The calculation results may include the privacy computing intermediate calculation results and the final calculation results.

[0137] Furthermore, after the participants in the privacy computing task obtain the encryption key from the key storage module of the trusted computing contract platform, they encrypt the original data set and store the encrypted data in the privacy data set. Before the task initiator initiates the privacy computing task, the task participants need to upload the hash value of the required encrypted data to the encrypted data storage module of the trusted computing contract platform for subsequent tamper-proof verification of the encrypted data.

[0138] It should be noted that Specific Example 3 is only used to help understand the technical concept of the embodiments of the present application, and does not constitute a limitation on the embodiments of the present application. More simple transformations based on the technical concept should all be within the scope of protection of the present application.

[0139] In addition, in order to further help understand the technical concept or technical principle of the embodiment of the present application, a specific embodiment 4 is listed. This embodiment includes two parts: privacy computing contract generation, data confidentiality processing of each participant, and trusted privacy computing, where:

[0140] 1. Privacy Computing Contract Generation

[0141] like Figure 6 As shown in the figure, the generation of privacy computing contract includes the following steps:

[0142] 1. Privacy computing contract editing: Any participant in the privacy computing task builds a privacy computing contract template, which includes the privacy computing module, key storage module, encrypted data storage module, result storage module and decryption module contained in the above contract application layer;

[0143] 2. Privacy computing contract signature: Each participant reviews the privacy computing contract template and signs the privacy computing smart contract template after passing the review. The content of the privacy computing contract is completely transparent to all participants, and each participant can review the specific implementation logic of the privacy computing contract;

[0144] 3. Privacy computing contract installation: After the privacy computing contract is signed by all parties, it is uploaded to the blockchain and runs on the blockchain node, becoming an executable privacy computing contract. The blockchain network and the privacy computing contract together constitute a trusted computing contract platform.

[0145] 2. Confidential Data Processing and Trusted Privacy Computing for Each Participant

[0146] like Figure 7 As shown in the figure, the confidential data processing and trusted privacy computing of each participant include the following steps:

[0147] 1. Key generation: The task initiator generates encryption and decryption key pairs locally;

[0148] 2. Encryption key storage: The task initiator generates an encryption key storage transaction (transaction 1) through the key storage module of the trusted computing contract platform and sends the transaction to the blockchain node. The blockchain node stores the encryption key in the blockchain ledger.

[0149] 3. Key acquisition: The participants of the privacy computing task obtain the encryption key through the key storage module of the trusted computing contract platform;

[0150] 4. Data encryption: The privacy computing task initiator and each privacy computing participant use the encryption key locally to encrypt the original data set to obtain encrypted data;

[0151] 5. Encrypted data hash storage: Each privacy computing participant hashes the encrypted data, where H represents the hash function, d identifies the encrypted data, and V represents the calculated hash value. The encrypted data hash value storage transaction (transaction 2) is generated through the encrypted data storage module of the trusted computing contract platform and sent to the blockchain node, which stores the encrypted data in the blockchain ledger;

[0152] 6. Sending a computing request: The task initiator sends a privacy computing task request to the privacy computing module of the trusted computing contract platform and generates a privacy computing request transaction (transaction three), which is sent to the blockchain node and written into the blockchain ledger. The request contains the ID of each participant, the privacy computing algorithm identifier, the encrypted data dataId of each participant, the encryption key keyId, and the encrypted data of the task initiator;

[0153] 7. Algorithm selection and encrypted data acquisition: The privacy computing contract obtains the corresponding encryption key from the chain through the key storage module according to the encryption key keyId in the privacy computing request parameter, obtains the specified encrypted data from the privacy data set of the privacy computing participant according to the encrypted data dataId of each participant in the request parameter, and selects the corresponding privacy computing algorithm according to the privacy computing algorithm identifier;

[0154] The encrypted data of each participant is tamper-proof verified. The specific method is to hash the encrypted data to obtain a hash value and then compare it with the corresponding encrypted data hash value stored on the chain. If they are equal, it means that the encrypted data has not been tampered with. If they are not equal, it means that the encrypted data has been tampered with. Only when the encryption passes the tamper-proof verification can the privacy computing task continue;

[0155] 8. Privacy computing execution and result storage: Use the encrypted data of all parties to execute the corresponding privacy computing algorithm logic through the privacy computing module of the trusted computing contract platform to obtain the privacy computing result, and generate the result storage transaction (transaction 4) through the result storage module and send the transaction to the blockchain node. The blockchain node stores the encrypted result of the privacy computing in the blockchain ledger;

[0156] 9. Result decryption and return: The task initiator initiates a privacy computing result query request, and the query request parameters are the decryption key and the result identifier (resId). The decryption module decrypts the privacy computing encryption result based on the decryption key provided by the task initiator and the privacy computing result obtained through the result evidence module based on resId, and returns the decrypted result to the task initiator.

[0157] To summarize the above process, this embodiment is based on the trusted computing contract framework and uses privacy computing contracts to ensure the security and reliability of data and algorithms in the privacy computing process, and realizes the traceability of privacy computing results through the on-chain storage of privacy computing results, thereby achieving data credibility, algorithm credibility and result credibility in the privacy computing process.

[0158] It should be noted that what is disclosed above are only a few specific implementation scenarios of the privacy computing method of the embodiment of this application. Of course, this cannot be used to limit the scope of protection of this application. Ordinary technicians in this field can understand that all or part of the processes of the above embodiments and the equivalent changes made in accordance with the claims of the present invention are still within the scope covered by this application.

[0159] That is to say, the above-mentioned specific embodiment 4 is only used to help understand the technical concept or technical principle of the embodiment of the present application, and does not constitute a limitation of the present application. More simple transformations based on the technical concept should all be within the scope of protection of the present application.

[0160] In addition, the present application also provides a privacy computing device, referring to Figure 8 , Figure 8 This is a schematic diagram of the functional modules of the privacy computing device according to an embodiment of the present application.

[0161] In this embodiment, the privacy computing device includes:

[0162] A first acquisition module 10 is configured to acquire a privacy computing task request sent by a task initiator node, wherein the privacy computing task request includes an algorithm identifier and multiple data identifiers, wherein one data identifier corresponds to encrypted data required for a task participant node to participate in privacy computing;

[0163] The second acquisition module 20 is configured to obtain the target privacy computing algorithm corresponding to the algorithm identifier from the blockchain, and obtain the encrypted data corresponding to the data identifier from each of the task participant nodes, and calculate the privacy computing encryption result;

[0164] The privacy computing module 30 is configured to store the privacy computing encryption result in the blockchain, wherein each stored privacy computing encryption result corresponds to a unique result identifier;

[0165] The result query module 40 is configured to receive a query request parameter carrying a target result identifier sent by the task initiator node, obtain a privacy computing encryption result corresponding to the target result identifier from the blockchain, and obtain a privacy computing result based on the privacy computing encryption result.

[0166] In some embodiments, the result query module 40 is further configured to:

[0167] The privacy computing encryption result is sent to the task initiator node, so that the task initiator node decrypts the privacy computing encryption result based on the decryption key corresponding to the encrypted data to obtain the privacy computing result.

[0168] In some embodiments, the result query module 40 is further configured to:

[0169] Decrypting the privacy computing encryption result based on the decryption key corresponding to the encrypted data to obtain a privacy computing result;

[0170] The privacy calculation result is sent to the task initiator node.

[0171] In some embodiments, the privacy computing task request further includes a target key identifier, and the first acquisition module 10 is further configured to:

[0172] Obtain an asymmetric encryption key sent by the task initiator node, and store the encryption key in the blockchain, wherein each stored encryption key corresponds to a unique key identifier, and the encryption key is the encryption key corresponding to the encrypted data;

[0173] The second acquisition module 20 is further configured to:

[0174] Obtain a target encryption key corresponding to the target key identifier from the blockchain;

[0175] The target encryption key and the encrypted data obtained from each of the task participant nodes are used as input parameters of the target privacy computing algorithm to calculate the privacy computing encryption result.

[0176] In some embodiments, the privacy computing task request further includes an information identifier, where the information identifier corresponds to the encrypted information required for the task initiator node to participate in the privacy computing. The second acquisition module 20 is further configured as:

[0177] Acquire the encrypted information corresponding to the information identifier from the task initiator node;

[0178] The target encryption key, the encrypted information obtained from the task initiator node, and the encrypted data obtained from each of the task participant nodes are used as input parameters of the target privacy computing algorithm to calculate the privacy computing encryption result.

[0179] In some embodiments, the privacy computing task request further includes a target hash data identifier, and the second acquisition module 20 is further configured to:

[0180] Obtain a hash value corresponding to the encrypted information and a hash value of the encrypted data corresponding to each of the task participant nodes, and store the obtained hash values ​​in the blockchain, wherein each stored hash value corresponds to a unique hash value identifier.

[0181] In some embodiments, the second acquisition module 20 is further configured to:

[0182] Performing hash calculation on the encrypted information obtained from the task initiator node to obtain a first actual hash value corresponding to the task initiator node, and performing hash calculation on the encrypted data obtained from each of the task participant nodes to obtain a second actual hash value corresponding to each of the task participant nodes;

[0183] Based on the first hash value identifier sent by the task initiator node, a first target hash value of the encrypted information sent by the task initiator node is obtained from the blockchain, and based on the second hash value identifier sent by each task participant node, a second target hash value of the encrypted data sent by each task participant node is obtained from the blockchain;

[0184] Performing a security check on the encrypted information sent by the task initiator node according to the first actual hash value and the first target hash value to obtain a first security check result;

[0185] According to the second actual hash value and the second target hash value, security verification is performed on the encrypted data sent by each of the task participant nodes to obtain a second security verification result corresponding to each of the task participant nodes;

[0186] When the first security verification result and each of the second security verification results are successful, execute the step of using the target encryption key, the encrypted information obtained from the task initiator node, and the encrypted data obtained from each of the task participant nodes as input parameters of the target privacy calculation algorithm.

[0187] In some embodiments, the second acquisition module 20 is further configured to:

[0188] When the first actual hash value and the first target hash value are inconsistent, determining that the first security verification result is a verification failure;

[0189] When the first actual hash value is consistent with the first target hash value, the first security verification result is determined to be a successful verification.

[0190] In some embodiments, the second acquisition module 20 is further configured to:

[0191] Respectively comparing the second actual hash value and the second target hash value corresponding to the same task participant node to obtain a comparison result corresponding to each task participant node;

[0192] When all the comparison results are consistent, it is determined that the second security verification results corresponding to all the task participant nodes are successful.

[0193] The privacy computing device provided in this embodiment and the privacy computing method provided in the above embodiment belong to the same inventive concept. For technical details not fully described in this embodiment, please refer to the embodiments of the above-mentioned privacy computing method. This embodiment has the same beneficial effects as the embodiments of the privacy computing method, which will not be repeated here.

[0194] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0195] In addition, the present application also provides an electronic device, referring to Fig. 9 , Fig. 9 The hardware structure diagram of an electronic device provided in an embodiment of the present application is shown in FIG. Fig. 9As shown, the electronic device may include: a processor 1001, a communication bus 1002, a user interface 1003, a network interface 1004 and a memory 1005. Among them, the processor 1001 may be a central processing unit (CPU). The communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (WIreless-FIdelity, WI-FI) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM), or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk storage. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0196] Those skilled in the art will understand that Fig. 9 The structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Fig. 9 As shown, the memory 1005 as a computer-readable storage medium may include an operating system, a data storage module, a network communication module, a user interface module and a privacy computing program.

[0197] exist Fig. 9 In the electronic device shown, the network interface 1004 is mainly used for data communication with other devices; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in this embodiment can be set in the electronic device, and the electronic device calls the privacy computing program stored in the memory 1005 through the processor 1001, and executes the privacy computing method provided in any of the above embodiments.

[0198] The device proposed in this embodiment and the privacy computing method proposed in the above embodiments belong to the same inventive concept. The technical details not fully described in this embodiment can be referred to any of the above embodiments, and this embodiment has the same beneficial effects as executing the privacy computing method.

[0199] In addition, an embodiment of the present application also proposes a computer-readable storage medium, which may be a non-volatile computer-readable storage medium, on which a privacy computing program is stored, and when the privacy computing program is executed by a processor, the privacy computing method of the present application as described above is implemented.

[0200] The various embodiments of the electronic device and computer-readable storage medium of the present application can all refer to the various embodiments of the privacy computing method of the present application, and will not be repeated here.

[0201] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0202] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0203] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for an electronic device to execute the methods described in each embodiment of the present application.

[0204] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A privacy computing method, characterized in that: include: Obtaining a privacy computing task request sent by a task initiator node, wherein the privacy computing task request includes an algorithm identifier and multiple data identifiers, wherein one data identifier corresponds to encrypted data required for a task participant node to participate in privacy computing; Obtaining the target privacy computing algorithm corresponding to the algorithm identifier from the blockchain, and obtaining the encrypted data corresponding to the data identifier from each of the task participant nodes, and calculating to obtain the privacy computing encryption result; Storing the privacy-preserving computing encryption result in the blockchain, wherein each stored privacy-preserving computing encryption result corresponds to a unique result identifier; Receive a query request parameter carrying a target result identifier sent by the task initiator node, obtain a privacy computing encryption result corresponding to the target result identifier from the blockchain, and obtain a privacy computing result based on the privacy computing encryption result.

2. The privacy computing method according to claim 1, characterized in that: The step of obtaining a privacy computing result based on the privacy computing encryption result comprises: The privacy computing encryption result is sent to the task initiator node, so that the task initiator node decrypts the privacy computing encryption result based on the decryption key corresponding to the encrypted data to obtain the privacy computing result.

3. The privacy computing method according to claim 1, characterized in that: The step of obtaining a privacy computing result based on the privacy computing encryption result comprises: Decrypting the privacy computing encryption result based on the decryption key corresponding to the encrypted data to obtain a privacy computing result; The privacy calculation result is sent to the task initiator node.

4. The privacy computing method according to claim 1, wherein: The privacy-preserving computing task request also includes a target key identifier, and before obtaining the privacy-preserving computing task request sent by the task initiator node, further includes: Obtain an asymmetric encryption key sent by the task initiator node, and store the encryption key in the blockchain, wherein each stored encryption key corresponds to a unique key identifier, and the encryption key is the encryption key corresponding to the encrypted data; The step of calculating and obtaining the privacy calculation encryption result includes: Obtain a target encryption key corresponding to the target key identifier from the blockchain; The target encryption key and the encrypted data obtained from each of the task participant nodes are used as input parameters of the target privacy computing algorithm to calculate the privacy computing encryption result.

5. The privacy computing method according to claim 4, characterized in that: The privacy computing task request also includes an information identifier, which corresponds to the encrypted information required by the task initiator node to participate in the privacy computing. The step of using the target encryption key and the encrypted data obtained from each of the task participant nodes as input parameters of the target privacy computing algorithm to calculate the privacy computing encryption result also includes: Acquire the encrypted information corresponding to the information identifier from the task initiator node; The target encryption key, the encrypted information obtained from the task initiator node, and the encrypted data obtained from each of the task participant nodes are used as input parameters of the target privacy computing algorithm to calculate the privacy computing encryption result.

6. The privacy computing method according to claim 5, characterized in that: The privacy-preserving computing task request also includes a target hash data identifier, and before obtaining the target privacy-preserving computing algorithm corresponding to the algorithm identifier from the blockchain, further includes: Obtain a hash value corresponding to the encrypted information and a hash value of the encrypted data corresponding to each of the task participant nodes, and store the obtained hash values ​​in the blockchain, wherein each stored hash value corresponds to a unique hash value identifier.

7. The privacy computing method according to claim 6, characterized in that: After obtaining the encrypted information corresponding to the information identifier from the task initiator node, the method further includes: Performing hash calculation on the encrypted information obtained from the task initiator node to obtain a first actual hash value corresponding to the task initiator node, and performing hash calculation on the encrypted data obtained from each of the task participant nodes to obtain a second actual hash value corresponding to each of the task participant nodes; Based on the first hash value identifier sent by the task initiator node, a first target hash value of the encrypted information sent by the task initiator node is obtained from the blockchain, and based on the second hash value identifier sent by each task participant node, a second target hash value of the encrypted data sent by each task participant node is obtained from the blockchain; Performing a security check on the encrypted information sent by the task initiator node according to the first actual hash value and the first target hash value to obtain a first security check result; According to the second actual hash value and the second target hash value, security verification is performed on the encrypted data sent by each of the task participant nodes to obtain a second security verification result corresponding to each of the task participant nodes; When the first security verification result and each of the second security verification results are successful, execute the step of using the target encryption key, the encrypted information obtained from the task initiator node, and the encrypted data obtained from each of the task participant nodes as input parameters of the target privacy calculation algorithm.

8. The privacy computing method according to claim 7, characterized in that: The step of performing security verification on the encrypted information sent by the task initiator node according to the first actual hash value and the first target hash value to obtain a first security verification result includes: When the first actual hash value and the first target hash value are inconsistent, determining that the first security verification result is a verification failure; When the first actual hash value is consistent with the first target hash value, the first security verification result is determined to be a successful verification.

9. The privacy computing method according to claim 7, wherein: The step of performing security verification on the encrypted data sent by each of the task participant nodes according to the second actual hash value and the second target hash value to obtain a second security verification result corresponding to each of the task participant nodes includes: Respectively comparing the second actual hash value and the second target hash value corresponding to the same task participant node to obtain a comparison result corresponding to each task participant node; When all the comparison results are consistent, it is determined that the second security verification results corresponding to all the task participant nodes are successful.

10. A privacy computing device, characterized in that: include: A first acquisition module is configured to acquire a privacy computing task request sent by a task initiator node, wherein the privacy computing task request includes an algorithm identifier and multiple data identifiers, wherein one data identifier corresponds to encrypted data required for a task participant node to participate in privacy computing; The second acquisition module is configured to obtain the target privacy computing algorithm corresponding to the algorithm identifier from the blockchain, and obtain the encrypted data corresponding to the data identifier from each of the task participant nodes, and calculate the privacy computing encryption result; A privacy-preserving computing module, configured to store the privacy-preserving computing encryption result in the blockchain, wherein each stored privacy-preserving computing encryption result corresponds to a unique result identifier; The result query module is configured to receive a query request parameter carrying a target result identifier sent by the task initiator node, obtain a privacy-preserving computing encryption result corresponding to the target result identifier from the blockchain, and obtain a privacy-preserving computing result based on the privacy-preserving computing encryption result.

11. An electronic device, characterized in that: include: A memory, a processor, and a privacy computing program stored in the memory and executable on the processor, wherein the privacy computing program, when executed by the processor, implements the privacy computing method as described in any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a privacy computing program, which, when executed by a processor, implements the privacy computing method according to any one of claims 1 to 9.