CN111935208A - Block chain private data sharing method and device, computer equipment and storage medium - Google Patents

Block chain private data sharing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN111935208A
CN111935208A CN202010597017.5A CN202010597017A CN111935208A CN 111935208 A CN111935208 A CN 111935208A CN 202010597017 A CN202010597017 A CN 202010597017A CN 111935208 A CN111935208 A CN 111935208A
Authority
CN
China
Prior art keywords
data
target
block chain
target privacy
privacy data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010597017.5A
Other languages
Chinese (zh)
Inventor
蒋海
商松
赵正涌
旷凯
朱建国
刘建章
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bubi Beijing Network Technology Co ltd
Original Assignee
Bubi Beijing Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bubi Beijing Network Technology Co ltd filed Critical Bubi Beijing Network Technology Co ltd
Priority to CN202010597017.5A priority Critical patent/CN111935208A/en
Publication of CN111935208A publication Critical patent/CN111935208A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Abstract

The application relates to a method and a device for sharing block chain private data, computer equipment and a storage medium. The method comprises the following steps: creating a first transaction contract, and sending the first transaction contract with the data content hash value and the data type of the target privacy data set to a block chain platform, wherein the block chain platform is used for carrying out consensus processing and chain linking on the first transaction contract; receiving a privacy data acquisition request sent by the block chain platform, carrying out differential query on the target privacy data set to obtain differential target privacy data, and feeding back the differential target privacy data to the block chain platform. By adopting the method, the safety in the private data sharing process can be improved.

Description

Block chain private data sharing method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of blockchain technologies, and in particular, to a method and an apparatus for sharing blockchain private data, a computer device, and a storage medium.
Background
The blockchain is used as a decentralized trust platform, the behavior of the user can be witnessed through publicly queriable records, meanwhile, the requirement of data sharing is inevitably generated, personal privacy data such as medical diagnosis records, personal consumption habits, use preferences and the like are not rarely contained in the shared data set, and the information can be leaked due to data sharing.
Although, in the current data sharing process, a method is provided in which before the privacy data is published to the blockchain network, the blockchain platform may delete the identity corresponding to the privacy data, so as to protect the personal privacy to a certain extent, but for the plaintext data content from which the identity is deleted, an attacker still may perform a background knowledge attack operation according to the plaintext data content, and thus the security of the privacy information still cannot be ensured.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method, an apparatus, a computer device and a storage medium for sharing block chain private data.
A method of blockchain private data sharing, the method comprising:
creating a first transaction contract, and sending the first transaction contract with a target private data set data content hash value and a data type to a blockchain platform, wherein the blockchain platform is used for carrying out consensus processing and uplink on the first transaction contract;
receiving a privacy data acquisition request sent by the block chain platform, performing differential query on the target privacy data set to obtain differential target privacy data, and feeding back the differential target privacy data to the block chain platform.
In one embodiment, the method further comprises:
extracting data characteristics from each written data record, and establishing an index relationship between the data characteristics and the data identification of the corresponding data record, wherein the data characteristics comprise data types;
determining the corresponding relation between the specific data content of each data record and the data identifier according to the index relation;
and storing the index relation and the corresponding relation to a local cache queue according to a writing sequence, sequentially storing the index relation and the corresponding relation containing the same data type to the same database of a local memory by the local cache queue according to the data type in the data characteristics, and determining a data set type identifier corresponding to the database according to the data type.
In one embodiment, the receiving a privacy data acquisition request sent by the blockchain platform, performing differential query on the target privacy data set to obtain differential target privacy data, and feeding back the differential target privacy data to the blockchain platform includes:
receiving a private data acquisition request sent by the block chain platform, and performing differential query on all index relationships and corresponding relationships in a local cache queue corresponding to the target private data set according to target data characteristics carried in the private data acquisition request;
if the data characteristics contained in the index relationship are consistent with the target data characteristics in the local cache queue, determining the index relationship and the corresponding relationship as a target index relationship and a target corresponding relationship;
determining corresponding target privacy data according to the target index relation and the target corresponding relation, and performing differencing processing on the target privacy data according to a preset privacy budget factor to obtain differencing target privacy data;
and reading the differentiated target privacy data, and feeding back the read differentiated target privacy data to the block chain platform.
In one embodiment, the method further comprises:
if the index relation that the contained data features are consistent with the target data features does not exist in the local cache queue, inquiring and determining a target index relation and a target corresponding relation that the contained data features are consistent with the target data features in the local memory, determining corresponding target privacy data according to the target index relation and the target corresponding relation, and performing differential processing on the target privacy data according to a preset privacy budget factor to obtain the differential target privacy data;
and reading the differentiated target privacy data, and feeding back the read differentiated target privacy data to the block chain platform.
In one embodiment, the method further comprises:
obtaining a hash value of the differentiated target privacy data according to the differentiated target privacy data and a preset hash algorithm;
encrypting the differentiated target privacy data and the hash value of the differentiated target privacy data according to the public key of the data owner to obtain a first ciphertext;
generating a re-encryption key according to the private key of the data owner and the public key of the data receiver;
and encrypting the first ciphertext by using the re-encryption key to obtain a second ciphertext, and feeding the second ciphertext back to the block chain platform.
A method for sharing block chain private data, the method being applied to a data receiver device, the method comprising:
creating a second transaction contract, and sending the second transaction contract with a target privacy data acquisition request and target data characteristics to a block chain platform, wherein the block chain platform is used for carrying out consensus processing and uplink on the second transaction contract;
and receiving the differentiated target privacy data fed back by the blockchain platform according to the target data characteristics in the second transaction contract, and analyzing and processing the differentiated target privacy data to obtain a target privacy data statistical result.
In one embodiment, the receiving, by the blockchain platform, differentiated target privacy data fed back according to the target data feature in the second transaction contract, and analyzing and processing the differentiated target privacy data to obtain a target privacy data statistical result includes:
receiving the differentiated target privacy data fed back by the block chain platform, and performing disturbance statistics on the differentiated target privacy data to obtain a disturbance statistical result;
and constructing a likelihood function to correct the disturbance statistical result to obtain a corrected statistical value serving as a target privacy data statistical result.
In one embodiment, the method further comprises:
and receiving the encrypted differentiated target privacy data fed back by the block chain platform, and decrypting the encrypted differentiated target privacy data according to a private key of the data receiver to obtain the decrypted differentiated target privacy data.
A blockchain private data sharing apparatus, the apparatus being applied to a data owner device, the apparatus comprising:
the system comprises a creating module, a block chain platform and a data processing module, wherein the creating module is used for creating a first transaction contract and sending the first transaction contract with a target private data set data content hash value and a data type to the block chain platform, and the block chain platform is used for carrying out common identification processing and chain linking on the first transaction contract;
and the receiving module is used for receiving the privacy data acquisition request sent by the block chain platform, carrying out differential query on the target privacy data set to obtain differential target privacy data, and feeding back the differential target privacy data to the block chain platform.
A blockchain private data sharing apparatus, the apparatus being applied to a data recipient device, the apparatus comprising:
the system comprises a creating module, a block chain platform and a data processing module, wherein the creating module is used for creating a second transaction contract and sending the second transaction contract with a target privacy data acquisition request and target data characteristics to the block chain platform, and the block chain platform is used for carrying out consensus processing and chain linking on the second transaction contract;
and the receiving module is used for receiving the differentiated target privacy data fed back by the block chain platform according to the target data characteristics in the second transaction contract, and analyzing and processing the differentiated target privacy data to obtain a target privacy data statistical result.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
creating a first transaction contract, and sending the first transaction contract with a target private data set data content hash value and a data type to a blockchain platform, wherein the blockchain platform is used for carrying out consensus processing and uplink on the first transaction contract;
receiving a privacy data acquisition request sent by the block chain platform, performing differential query on the target privacy data set to obtain differential target privacy data, and feeding back the differential target privacy data to the block chain platform.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
creating a first transaction contract, and sending the first transaction contract with a target private data set data content hash value and a data type to a blockchain platform, wherein the blockchain platform is used for carrying out consensus processing and uplink on the first transaction contract;
receiving a privacy data acquisition request sent by the block chain platform, performing differential query on the target privacy data set to obtain differential target privacy data, and feeding back the differential target privacy data to the block chain platform.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
creating a second transaction contract, and sending the second transaction contract with a target privacy data acquisition request and target data characteristics to a block chain platform, wherein the block chain platform is used for carrying out consensus processing and uplink on the second transaction contract;
and receiving the differentiated target privacy data fed back by the blockchain platform according to the target data characteristics in the second transaction contract, and analyzing and processing the differentiated target privacy data to obtain a target privacy data statistical result.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
creating a second transaction contract, and sending the second transaction contract with a target privacy data acquisition request and target data characteristics to a block chain platform, wherein the block chain platform is used for carrying out consensus processing and uplink on the second transaction contract;
and receiving the differentiated target privacy data fed back by the blockchain platform according to the target data characteristics in the second transaction contract, and analyzing and processing the differentiated target privacy data to obtain a target privacy data statistical result.
The block chain private data sharing method, device, computer equipment and storage medium comprise: creating a first transaction contract, and sending the first transaction contract with a target private data set data content hash value and a data type to a blockchain platform, wherein the blockchain platform is used for carrying out consensus processing and uplink on the first transaction contract; receiving a privacy data acquisition request sent by the block chain platform, performing differential query on the target privacy data set to obtain differential target privacy data, and feeding back the differential target privacy data to the block chain platform. By adopting the method, the common identification processing and the chain linking are carried out on the data content hash value and the data type of the private data instead of the plaintext data, and meanwhile, the differential inquiry processing is carried out on the private data in the private data sharing process, so that the safety in the private data sharing process is improved.
Drawings
FIG. 1 is a diagram of an exemplary implementation of a method for sharing blockchain private data;
FIG. 2 is a flow diagram that illustrates a method for sharing block chain privacy data in one embodiment;
FIG. 3 is a flow diagram illustrating a differencing query method in one embodiment;
FIG. 4 is a schematic flow chart diagram illustrating a method for storing data records in one embodiment;
FIG. 5 is a schematic illustration of a database of different disease types in one embodiment;
FIG. 6 is a flowchart illustrating a specific process of receiving a private data acquisition request in one embodiment;
FIG. 7 is a flowchart illustrating a method for querying a hotspot cache in one embodiment;
FIG. 8 is a flow diagram that illustrates a method for encrypting differenced target privacy data, in one embodiment;
FIG. 9 is a flowchart illustrating a method for sharing block chain privacy data according to another embodiment;
FIG. 10 is a flowchart illustrating a specific process of receiving differenced target privacy data in one embodiment;
FIG. 11 is a block diagram of an apparatus for sharing blockchain private data in one embodiment;
FIG. 12 is a block diagram of an apparatus for sharing blockchain private data according to another embodiment;
FIG. 13 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The block chain private data sharing method provided by the application can be applied to the application environment shown in fig. 1. Including a data owner device 110, a data receiver device 120, and a blockchain platform 130. The data owner device 110 is configured to create a first transaction contract, and send the first transaction contract with the data content hash value and the data type of the target private data set to the blockchain platform 130, where the blockchain platform 130 is configured to perform consensus processing and uplink on the first transaction contract; the data owner device 110 is further configured to receive a privacy data acquisition request sent by the blockchain platform 130, perform differential query on the target privacy data set to obtain differential target privacy data, and feed back the differential target privacy data to the blockchain platform 130. The data receiver device 120 is configured to create a second transaction contract, and send the second transaction contract with the target private data obtaining request and the target data characteristic to the blockchain platform 130, where the blockchain platform 130 is configured to perform consensus processing and uplink on the second transaction contract; the data receiving device 120 is further configured to receive the differentiated target privacy data fed back by the blockchain platform 130 according to the target data feature in the second transaction contract, and analyze and process the differentiated target privacy data to obtain a target privacy data statistical result.
In one embodiment, as shown in fig. 2, a method for sharing block chain private data is provided, which is described by taking the method as an example applied to the data owner device 110 in fig. 1, and includes the following steps:
step 201, creating a first transaction contract, and sending the first transaction contract with the data content hash value and the data type of the target private data set to a blockchain platform, where the blockchain platform is used to perform consensus processing and uplink on the first transaction contract.
In an implementation, a data owner device creates a first transaction contract and sends the first transaction contract with a target private data set data content hash value and a data type to a blockchain platform, and the blockchain platform is used for carrying out consensus processing and uplink transmission on the first transaction contract.
Specifically, the private data may be medical diagnosis data, personal consumption data, personal behavior preference data, and the like, which is not limited in the embodiments of the present application, but is hidden in the present applicationThe private data is explained by taking medical diagnosis data as an example, the data owner is a medical center, the data owner device is a medical center device, the medical center device writes a target private data set formed by the diagnosis data records of each user into a local storage space, then, the medical center device creates a first transaction contract locally, the first transaction contract may be expressed as tx ═ source _ address, id, info, priv, sigs }, where source _ address is an account address of the data owner. And id is a transaction serial number, the transaction serial number is the same as the transaction serial number in the cache queue, the transaction serial number is specifically the current transaction serial number of the data owner plus one, and the current transaction serial number can be verified by inquiring the currently returned transaction result. info is an operation list, i.e. the payload of the transaction, and contains the main contents of the transaction { id, hash _ d, to }, id is the transaction serial number, hash _ d ═ hash (d)j),hash(dj) As hash value of private data, djFor the target private data set, which contains the corresponding data type, hash _ d is used for private data anchoring. to is the data receiver address (i.e. any node address of the blockchain platform in this embodiment). priv is authority information of data owner account. sigs is signature information of a data owner, and the data owner device uses a private key of an account number of the data owner device to sign a contract of the transaction. Finally, the medical center equipment sends the first transaction contract containing the data content hash value and the data type of the target privacy data set to a block chain network (block chain platform), and common identification processing and uplink processing are carried out on the first transaction contract.
Step 202, receiving a privacy data acquisition request sent by the blockchain platform, performing differencing query on the target privacy data set to obtain differencing target privacy data, and feeding the differencing target privacy data back to the blockchain platform.
In implementation, the data owner device receives a private data acquisition request sent by the blockchain platform, the private data acquisition request carries data characteristics of target private data, differential query is performed on the target private data set according to the data characteristics to obtain differential target private data, and the differential target private data is fed back to the blockchain platform.
For example, if the data owner device is a medical center device, the medical center device may receive a private data acquisition request sent by the blockchain platform, where the private data acquisition request carries target data characteristics, for example, data statistics of whether cancer is present between the ages of 40 and 60. Performing a differential query in a target privacy data set (namely a cancer diagnosis data set) according to the target data characteristics to obtain differential target privacy data, namely the differential privacy data containing data statistics of whether the cancer is suffered between 40 and 60 years old, and then feeding back the differential privacy data containing data statistics of whether the cancer is suffered between 40 and 60 years old to the block chain platform by the data owner device.
Wherein, the differential query needs to be applied to the differential privacy algorithm, n user diagnosis records are assumed to be contained in a data set, a preset differential privacy algorithm M is assumed, the definition domain is Dom (M), the value domain is ran (M), and if the diagnosis records d and d 'of any two users in the n user diagnosis records (both the two user records meet the definition domain d of the differential privacy algorithm, and d' belongs to Dom (M)), the same output result is obtained
Figure BDA0002557706410000081
Figure BDA0002557706410000082
The differencing privacy algorithm satisfies the local differencing query requirement, i.e., satisfies the following requirements:
Pr[M(d)=d*]≤e×Pr[M(d′)=d*]
similarly, applying the above differential privacy algorithm in the data set can still satisfy the local differential query requirement, as shown in fig. 3, D1 and D2 are two adjacent data sets (also referred to as databases), and the specific attestation process is: if only one record in two adjacent data sets is inconsistent, then when differential query is performed, for example, query "data statistics on whether cancer is present between 40-60 years old" and the probability that the patient population statistics obtained for the two adjacent data sets is 100 is 86% and 85%, respectively, and the ratio of the two query probabilities is smaller than the preset differential threshold, it proves that if the query results of the two adjacent data sets D1 and D2 are interchangeable for any query, it proves that the above-mentioned differential privacy algorithm applied to the data sets can still satisfy the-local differential query requirement.
In the block chain private data sharing method, data owner equipment sends a first transaction contract with a target private data set data content hash value and a data type to a block chain platform by creating the first transaction contract, wherein the block chain platform is used for carrying out consensus processing and chaining on the first transaction contract; then, the data owner device receives the privacy data acquisition request sent by the blockchain platform, performs differential query on the target privacy data set to obtain differential target privacy data, and feeds the differential target privacy data back to the blockchain platform. By adopting the method, the data content hash value and the data type of the target private data, not plaintext data, are subjected to consensus processing and chaining, and meanwhile, the private data are subjected to differential query processing in the private data sharing process, so that the safety in the private data sharing process is improved.
In one embodiment, as shown in fig. 4, the method for sharing blockchain private data further includes:
step 401, extracting data characteristics from each written data record, and establishing an index relationship between the data characteristics and the data identifier of the corresponding data record, where the data characteristics include data types.
In implementation, the data owner device performs an operation of extracting a data feature, which may include a data type of the extracted private data, for each written data record, and then establishes an index relationship between the data feature and a data identifier of the corresponding data record.
Specifically, for example, the data records are user diagnosis data records (simply referred to as user records) of a medical center, each user diagnosis data record may include a data type identifier, a user name,user's telephone, ID number, sex, age, diagnosis condition]Wherein the diagnosis condition is whether the user has a disease, and the disease also includes a plurality of conditions, such as [ cancer, diabetes, HIV, HPV]. Representing the user diagnostic data record as djThe serial number of the user diagnosis data record is represented by j (j is equal to the transaction serial number in the transaction contract), the serial number is matched with writing of the user diagnosis data record by automatically adding 1, id is a data type identifier (referred to as a data identifier for short), then, the data owner device performs an operation of extracting data characteristics of each user diagnosis data record, for example, the extracted data characteristics are key1 k _1_10_20, where k represents a prefix, 1 represents a cancer, 10_20 represents a period between 10 and 20 years old, and the data owner device establishes an index relationship between the extracted data characteristics key1 and the data identifier id, that is: the data feature list is constructed (key1), then id is added to the key1 list, and the index relationship is obtained by the list (key1, list).
Step 402, according to the index relationship, determining the corresponding relationship between the specific data content of each data record and the data identifier.
In implementation, the data owner device determines the corresponding relationship between the specific data content of each data record and the data identifier according to the established index relationship.
Specifically, for example, each data record is a user diagnosis data record, and the specific data content d is determined according to the index relationship (key1, list) between the data feature key1 and the data identification idjCorresponding relation (id, d) with data identification idj)。
And 403, storing the index relationship and the corresponding relationship into a local cache queue according to the writing sequence, sequentially storing the index relationship and the corresponding relationship containing the same data type into the same database of the local memory by the local cache queue according to the data type in the data characteristics, and determining the type identifier of the data set corresponding to the database according to the data type.
In implementation, the data owner device will index the relationship (key1)List) and correspondence (id, d)j) According to the writing sequence (i.e. the sequence of the serial number j of the corresponding user diagnostic data record), pass through put (key1, list) and put (id, d)j) Means, store to the local buffer queue, then, the data owner's apparatus according to the data type in the data characteristic, namely data type identification id, will include index relation and corresponding relation of the same data type, with the first-in first-out principle (d)jRatio dj+1First-out queue) stored in the same database of the local memory sequentially by the local cache queue, and determining the data set type identifier corresponding to the database according to the data type, for example, as shown in fig. 5, according to the disease diagnosis type, a cancer data set D1, an HIV data set D2, an HPV data set D3, a diabetes data set D4, etc. may be determined.
In this embodiment, the data owner device creates an index relationship between data characteristics and data identifiers and a corresponding relationship between specific data contents and data identifiers, so as to facilitate query of target private data in a database, and meanwhile, the index relationship and the corresponding relationship are stored in a local cache queue, and then are stored in a local memory by the cache queue, so that data reading and writing efficiency is improved, and data storage speed is increased.
In one embodiment, as shown in fig. 6, the specific processing procedure of step 202 is as follows:
step 2021, receiving the private data acquisition request sent by the blockchain platform, and performing differential query on all index relationships and corresponding relationships in a local cache queue corresponding to the target private data set according to target data characteristics carried in the private data acquisition request.
In implementation, the data owner device receives a private data acquisition request sent by a block chain platform, then, firstly, queries the content in the cache queue, and finally, queries the data content in the local storage, and then, according to a target data feature carried in the private data acquisition request, firstly, performs differential query on all the index relationships and corresponding relationships in the local cache queue corresponding to the target private data set, for example, according to data statistics on whether the target data feature carried in the private data acquisition request is cancer between 40 and 60 years old, and then, according to the target data feature, first, performs differential query on all the index relationships and corresponding relationships in the cache queue corresponding to the cancer data set D1.
Step 2022, if there is an index relationship between the data features contained in the local cache queue and the target data features, determining the index relationship and the corresponding relationship as a target index relationship and a target corresponding relationship.
In implementation, if an index relationship exists in the local cache queue, where the data features contained in the local cache queue are consistent with the target data features, the index relationship and the corresponding relationship are determined as a target index relationship and a target corresponding relationship.
Specifically, a data owner adopts a method of querying a hot spot cache (cache queue), and first determines whether a target index relationship and a target corresponding relationship exist in the hot spot cache (cache queue), and a specific process of querying the hot spot cache is shown in fig. 7, for example, original elements in a current cache queue are [ (a,45), (B,41), (C,36), (D,28) (E,27), (F,22) ], where (a in a,45) represents data content (index relationship and corresponding relationship), 45 is a number of times of access queries, and if an element accessed by a last target query is D, the number of times of access queries in D is increased by 1 to become (D,29), and then, D with the increased number of times of query accesses needs to be compared with a previous element in the cache queue to determine a position in the cache queue again. Specifically, the number of access times of the D element is 29 which is smaller than 36 of the C element, no position exchange is required, and D is continuously kept in the buffer queue; if the last element accessed by the target query is B, the query access frequency of the element B is changed to 42, namely (B,42), and then the query access frequency 42 of the element B is compared with the query access frequency 45 of the element A, wherein 42 is less than 45, so that position exchange is not needed and the element B is kept in the cache queue. If the element accessed by the last target query is G, the element G is not in the hot spot cache (cache queue), so that the database in the local memory needs to be accessed for query, and the last element F in the hot spot cache is eliminated, so that the last element in the hot spot cache (cache queue) is changed into (G, 1).
And the data owner equipment inquires the index relation of the data characteristics contained in the cache queue and the target data characteristics according to the process of inquiring the hot spot cache, and determines the index relation and the corresponding relation as a target index relation and a target corresponding relation.
Step 2023, determining corresponding target privacy data according to the target index relationship and the target corresponding relationship, and performing differencing processing on the target privacy data according to a preset privacy budget factor to obtain differencing target privacy data.
In implementation, the data owner device determines corresponding target privacy data according to the determined target index relationship and the target corresponding relationship, and then performs differentiation processing on the target privacy data according to a preset privacy budget factor to obtain differentiated target privacy data.
Specifically, the data owner device obtains the ids of all users diagnosed with cancer diseases between the ages of 40 and 60 according to the target data features list1 ═ get (k _1_40_50) and list2 ═ get (k _1_50_60) in the target index relationship. Then, the data owner device queries a specific cancer diagnosis condition in the target correspondence according to all the user ids, wherein the diagnosis condition may include: with and without cancer. Finally, in order to protect the security of the target private data, the data owner device performs differentiation processing on the target private data according to a preset privacy budget factor, that is, performs perturbation processing F (D1) + Lap (0,1) on the target private data set (cancer data set D1) by using a perturbation coefficient Δ F/═ 1, and then obtains differentiated target private data (result).
Step 2024, reading the differentiated target privacy data, and feeding back the read differentiated target privacy data to the blockchain platform.
In an implementation, the data owner device reads the differentiated target privacy data (result) and feeds back the differentiated target privacy data to the blockchain platform.
In one embodiment, step 202 further comprises:
step 2022', if there is no index relationship between the data features and the target data features contained in the local cache queue, querying and determining a target index relationship and a target corresponding relationship between the data features and the target data features contained in the local cache queue, determining corresponding target privacy data according to the target index relationship and the target corresponding relationship, performing differentiation processing on the target privacy data according to a preset privacy budget factor to obtain differentiated target privacy data, reading the differentiated target privacy data, and feeding back the read differentiated target privacy data to the block chain platform.
In implementation, if the index relationship that the included data features are consistent with the target data features does not exist in the local cache queue, the data owner device continues to query and determine the target index relationship and the target corresponding relationship that the included data features are consistent with the target data features in the local memory, and determines the corresponding target privacy data according to the target index relationship and the target corresponding relationship. And finally, the data owner equipment performs differencing processing on the target privacy data according to a preset privacy budget factor to obtain differencing target privacy data, reads the differencing target privacy data, and feeds the read differencing target privacy data back to the block chain platform. Specifically, the target index relationship and the target corresponding relationship are continuously queried and determined in the local storage, and the subsequent processing process is the same as the above step 2023 to step 2024, and the embodiment of the present application is not described again.
In this embodiment, the data owner device searches for the target index relationship and the target corresponding relationship in the cache queue by querying a hot spot cache (cache queue), and further searches in the database if the cache queue does not exist, so that the target data query speed is increased, and meanwhile, the data owner performs differential query on the target privacy data, so that the security of the target privacy data is ensured.
In one embodiment, as shown in fig. 8, the method for sharing block chain private data further includes:
step 801, obtaining a hash value of the differentiated target privacy data according to the differentiated target privacy data and a preset hash algorithm.
In implementation, the data owner device obtains a hash value h (result) of the differentiated target privacy data by using a preset hash algorithm hash on the determined differentiated target privacy data (result).
Step 802, encrypting the differentiated target privacy data and the hash value of the differentiated target privacy data according to the public key of the data owner to obtain a first ciphertext.
In implementation, the data owner device uses its own account public key RmcEncrypting the differentiated target privacy data (result) and the hash value h (result) of the differentiated target privacy data (i.e. the data owner public key) CA=EccEncrypt(RmcH (result), result) to obtain a first ciphertext CA
Step 803, a re-encryption key is generated according to the private key of the data owner and the public key of the data receiver.
In implementation, the data owner device uses the private key r of the own account numbermc(private key of data owner) and public key R of data receiverdcGenerating a re-encryption key rKmc→dc
And step 804, encrypting the first ciphertext by using the re-encryption key to obtain a second ciphertext, and feeding the second ciphertext back to the block chain platform.
In implementation, the data owner device utilizes the re-encryption key rKmc→dcFor the first ciphertext CAPerforming re-encryption CB=ReEccEncrypt(rKmc→dcH (result), result) to obtain a second ciphertext CBAnd then, the data owner equipment feeds the second ciphertext back to the block chain platform for consensus processing and uplink.
In this embodiment, the data owner device re-encrypts the differentiated target privacy data by using a re-encryption technology through the self account public key, the data receiver public key and the self account private key, so that only a specific data receiver can decrypt the data, and the security of the privacy data is further ensured.
In one embodiment, as shown in fig. 9, a method for sharing block chain private data is provided, which is described by taking the method as an example applied to the data receiving device 120 in fig. 1, and includes the following steps:
step 901, creating a second transaction contract, and sending the second transaction contract with the target private data acquisition request and the target data characteristics to a blockchain platform, where the blockchain platform is used to perform consensus processing and uplink on the second transaction contract.
In implementation, the data receiver device creates a second transaction contract according to own data requirements, and sends the second transaction contract with the target privacy data acquisition request and the target data characteristics to the blockchain platform. The block chain platform is used for carrying out consensus processing and chain transmission on the second trading contract.
Specifically, the role of the data receiver may be a data analyzer or an insurance platform, and the embodiment of the present application is not limited. The data receiving party device creates a second transaction contract locally, where the second transaction contract may be represented as tx _ req ═ { source _ address, id, info, priv, sigs }, where source _ address is a blockchain platform address, id is a transaction sequence number, and the specific transaction sequence number is the current transaction sequence number of the data receiving party plus one, and the current transaction sequence number may be verified by querying a currently returned transaction result. info is an operation list, i.e. the payload of the transaction, containing the main contents of the transaction { req _ type, to }, req _ type is a data recipient target data feature, e.g. a data statistic (40_60_1) of whether there is cancer disease between 40 and 60 years of age, where 1 represents statistics of requested cancer disease, optionally 2 represents statistics of HIV disease, 3 represents statistics of HPV disease, 4 represents statistics of diabetes disease, and req _ type provides parsing rules in the form of an interface, resolve _ req _ type (req _ type), which is issued by a consensus of a second transaction contract; to is the data recipient address. And priv is authority information of the data receiving party account. The sigs is signature information of a data receiver, and the data receiver equipment uses a private key of an account number of the data receiver equipment to sign the contract of the transaction. Finally, the data receiver equipment (for example, an insurance platform) sends a second transaction contract containing the target privacy data acquisition request and the target data characteristics to a blockchain network (blockchain platform), and the blockchain platform is used for carrying out consensus processing and uplink on the second transaction contract.
And 902, receiving the differentiated target privacy data fed back by the blockchain platform according to the target data characteristics in the second transaction contract, and analyzing and processing the differentiated target privacy data to obtain a target privacy data statistical result.
In implementation, the data receiver device receives the differentiated target privacy data fed back by the blockchain platform according to the target data characteristics in the second transaction contract, and then the data receiver device analyzes and processes the differentiated target privacy data to obtain a target privacy data statistical result.
Optionally, after receiving the differentiated private data fed back by the blockchain platform, the data receiver device may perform screening and filtering according to a data receiver address in the second transaction contract corresponding to the private data, and when the data receiver address in the second transaction contract is consistent with the address of the data receiver device, determine that the differentiated private data fed back corresponding to the second transaction contract is differentiated target private data.
According to the block chain private data sharing method, data receiver equipment creates a second transaction contract, the second transaction contract with a target private data acquisition request and target data characteristics is sent to a block chain platform, and the block chain platform is used for carrying out consensus processing and uplink on the second transaction contract; and then, the data receiving party equipment receives the differentiated target privacy data fed back by the blockchain platform according to the target data characteristics in the second transaction contract, and analyzes and processes the differentiated target privacy data to obtain a target privacy data statistical result. By adopting the method, the data receiver equipment can only receive the differentiated target privacy data, and the data receiver equipment can analyze and process the differentiated target privacy data to obtain the statistical result, but cannot acquire the specific content of the privacy data, thereby ensuring the security of the privacy data.
In one embodiment, as shown in fig. 10, the specific processing procedure of step 902 is as follows:
step 8021, receiving the differentiated target privacy data fed back by the block chain platform, and performing disturbance statistics on the differentiated target privacy data to obtain a disturbance statistical result.
In implementation, the data receiving device receives the differentiated target privacy data fed back by the blockchain platform, and may perform perturbation statistics on the differentiated target privacy data to obtain a perturbation statistical result.
Specifically, for example, the data receiving device does not know the number of people with cancer diseases between the ages of 40 and 60 in the specific target privacy data, only knows that the true proportion of people with cancer diseases between the ages of 40 and 60 is pi, the differentiated target privacy data has n users, and the ith user XiThe probability of having cancer is: the probability of having cancer is p (perturbation probability) and the probability of not having cancer is 1-p. The data-receiving device first performs disturbance statistics on the differentiated target privacy data assuming that the number of people having cancer whose diagnosis data shows "yes" is n among all users of the differentiated target privacy data1The number of persons who did not have cancer and whose diagnosis data shows "No" is n-n1Therefore, the proportion of users who are displayed as "yes" and "no" in the target privacy data (diagnosis data) whose disturbance statistical result is differentiated is as follows:
Pr(Xiis ═ p + (1-pi) (1-p)
Pr(XiNo) ═ p + pi (1-pi) p (1-p)
And 8022, constructing a likelihood function to correct the disturbance statistical result, and obtaining a corrected statistical value serving as a target privacy data statistical result.
In implementation, obviously, the perturbation statistical result obtained by the data receiving device according to the above-mentioned formula of step 8021 is not an unbiased estimation of a true proportion, so that the obtained perturbation statistical result needs to be corrected. And the data receiving party equipment constructs a likelihood function to correct the disturbance statistical result to obtain a corrected statistical value serving as a target privacy data statistical result.
Specifically, the likelihood function constructed by the data receiving device is as follows:
Figure BDA0002557706410000161
according to the likelihood function, the data receiving device can obtain the maximum likelihood estimation of pi:
Figure BDA0002557706410000162
then, the data receiving side equipment estimates the maximum likelihood according to the pi
Figure BDA0002557706410000163
Is expected to verify
Figure BDA0002557706410000164
Is an unbiased estimate of the true distribution of pi, in particular
Figure BDA0002557706410000168
The mathematical expectation formula of (c) is as follows:
Figure BDA0002557706410000165
finally, the data receiver device application
Figure BDA0002557706410000166
As a corrected perturbation statistic, an estimate of the number of people with cancer disease between ages 40 and 60 is made, with the following calculation:
Figure BDA0002557706410000167
wherein N represents an estimated value of the number of people with cancer between 40 and 60 years of age, and the differentiated target privacy data has a total number of people of NThe number of people having cancer whose diagnosis data shows "yes" is n1And perturbation probability p, namely obtaining the estimated value of the real number of people with cancer diseases between the ages of 40 and 60 contained in the differentiated target privacy data as the statistical result of the target privacy data.
In this embodiment, the data receiving device may analyze and process the differentiated target privacy data by performing perturbation statistics and likelihood function correction on the differentiated target privacy data to obtain a statistical result, but cannot acquire specific content of the privacy data, thereby ensuring security of the privacy data.
In one embodiment, the method for sharing block chain private data further comprises:
and receiving the encrypted differentiated target privacy data fed back by the block chain platform, and decrypting the encrypted differentiated target privacy data according to a private key of a data receiver to obtain the decrypted differentiated target privacy data.
In implementation, the blockchain platform may encrypt the differentiated target privacy data and feed the encrypted differentiated target privacy data back to the data receiving device, so that the data receiving device receives the encrypted differentiated target privacy data disturbed by the blockchain platform and decrypts the encrypted differentiated target privacy data according to a private key of its account (private key of the data receiving device), thereby obtaining the decrypted differentiated target privacy data.
In this embodiment, the data receiving party device decrypts the encrypted differentiated target private data through a private key of its own account, so that only the corresponding data receiving party can obtain the differentiated target private data, thereby ensuring the security of the private data.
It should be understood that although the various steps in the flowcharts of fig. 2, 4, 6, 8-10 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2, 4, 6, 8-10 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or in alternation with other steps or at least some of the other steps.
In one embodiment, as shown in fig. 11, there is provided a block chain private data sharing apparatus 1100, which is exemplified by the application of the apparatus to the data owner device 110 in fig. 1, and the apparatus 1100 includes: a creation module 1110 and a reception module 1120.
A creating module 1110, configured to create a first transaction contract, and send the first transaction contract with the data content hash value and the data type of the target private data set to a blockchain platform, where the blockchain platform is configured to perform consensus processing and uplink on the first transaction contract.
The receiving module 1120 is configured to receive the privacy data acquisition request sent by the blockchain platform, perform differential query on the target privacy data set to obtain differential target privacy data, and feed back the differential target privacy data to the blockchain platform.
In one embodiment, the apparatus 1100 further comprises:
and the extraction module is used for extracting data characteristics from each written data record and establishing an index relationship between the data characteristics and the data identification of the corresponding data record, wherein the data characteristics comprise data types.
The determining module is used for determining the corresponding relation between the specific data content of each data record and the data identifier according to the index relation;
and the storage module is used for storing the index relation and the corresponding relation to a local cache queue according to the writing sequence, sequentially storing the index relation and the corresponding relation containing the same data type to the same database of the local storage by the local cache queue according to the data type in the data characteristics, and determining the type identifier of the data set corresponding to the database according to the data type.
In an embodiment, the receiving module 1120 is specifically configured to receive a private data acquisition request sent by a blockchain platform, and perform differential query on all index relationships and corresponding relationships in a local cache queue corresponding to a target private data set according to target data features carried in the private data acquisition request.
And if the index relation of the data characteristics contained in the local cache queue and the target data characteristics is consistent, determining the index relation and the corresponding relation as a target index relation and a target corresponding relation.
And determining corresponding target privacy data according to the target index relation and the target corresponding relation, and performing differencing processing on the target privacy data according to a preset privacy budget factor to obtain the differencing target privacy data.
Reading the differentiated target privacy data, and feeding back the read differentiated target privacy data to the block chain platform.
In an embodiment, the receiving module 1120 is further configured to, if there is no index relationship where the data features included in the local cache queue are consistent with the target data features, query and determine a target index relationship and a target corresponding relationship where the data features included in the local cache queue are consistent with the target data features, determine corresponding target privacy data according to the target index relationship and the target corresponding relationship, and perform differential processing on the target privacy data according to a preset privacy budget factor to obtain differential target privacy data.
Reading the differentiated target privacy data, and feeding back the read differentiated target privacy data to the block chain platform.
In one embodiment, the apparatus 1100 further comprises:
and the hash generation module is used for obtaining the hash value of the differentiated target privacy data according to the differentiated target privacy data and a preset hash algorithm.
And the first encryption module is used for encrypting the differentiated target privacy data and the hash value of the differentiated target privacy data according to the public key of the data owner to obtain a first ciphertext.
The key generation module is used for generating a re-encryption key according to the private key of the data owner and the public key of the data receiver;
and the second encryption module is used for encrypting the first ciphertext by using the re-encryption key to obtain a second ciphertext and feeding the second ciphertext back to the block chain platform.
The block chain private data sharing apparatus 1100 includes: a creating module 1110 and a receiving module 1120, wherein the creating module 1110 is configured to create a first transaction contract, and send the first transaction contract with a target private data set data content hash value and a data type to a blockchain platform, and the blockchain platform is configured to perform consensus processing and uplink on the first transaction contract; a receiving module 1120, configured to receive the privacy data acquisition request sent by the blockchain platform, perform differential query on the target privacy data set to obtain differential target privacy data, and feed back the differential target privacy data to the blockchain platform. By adopting the device, the data content hash value and the data type of the target private data, but not the plaintext data, are subjected to consensus processing and chaining, and meanwhile, the private data are subjected to differential query processing in the private data sharing process, so that the security in the private data sharing process is improved.
In one embodiment, as shown in fig. 12, there is provided a block chain private data sharing apparatus 1200, which is illustrated by taking the apparatus as an example for being applied to the data receiving device 120 in fig. 1, and the apparatus 1200 includes: a creation module 1210 and a reception module 1220.
A creating module 1210, configured to create a second transaction contract, and send the second transaction contract with the target private data obtaining request and the target data characteristic to a blockchain platform, where the blockchain platform is configured to perform consensus processing and uplink on the second transaction contract.
The receiving module 1220 is configured to receive the differentiated target privacy data fed back by the blockchain platform according to the target data feature in the second transaction contract, and analyze and process the differentiated target privacy data to obtain a target privacy data statistical result.
In an embodiment, the receiving module 1220 is specifically configured to receive the differentiated target privacy data fed back by the blockchain platform, and perform perturbation statistics on the differentiated target privacy data to obtain a perturbation statistical result.
And constructing a likelihood function to correct the disturbance statistical result to obtain a corrected statistical value serving as a target privacy data statistical result.
In one embodiment, the apparatus 1200 further comprises:
and the decryption module is used for receiving the encrypted differentiated target privacy data fed back by the block chain platform, decrypting the encrypted differentiated target privacy data according to a private key of a data receiver, and obtaining the decrypted differentiated target privacy data.
The device 1200 for sharing blockchain private data includes a creating module 1210 and a receiving module 1220, where the creating module 1210 is configured to create a second transaction contract, and send the second transaction contract with the target private data obtaining request and the target data characteristic to a blockchain platform, and the blockchain platform is configured to perform consensus processing and uplink on the second transaction contract. The receiving module 1220 is configured to receive the differentiated target privacy data fed back by the blockchain platform according to the target data feature in the second transaction contract, and analyze and process the differentiated target privacy data to obtain a target privacy data statistical result. By adopting the device, the data receiver equipment can only receive the differentiated target privacy data, and the data receiver equipment can analyze and process the differentiated target privacy data to obtain a statistical result, but cannot acquire the specific content of the privacy data, so that the security of the privacy data is ensured.
For specific limitations of the device, reference may be made to the above limitations of the block chain private data sharing method, which is not described herein again. The modules in the block chain private data sharing device may be implemented in whole or in part by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 13. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method for sharing blockchain private data.
Those skilled in the art will appreciate that the architecture shown in fig. 13 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the above-described method embodiments when executing the computer program.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (12)

1. A method for sharing block chain private data, the method being applied to a data owner device, the method comprising:
creating a first transaction contract, and sending the first transaction contract with a target private data set data content hash value and a data type to a blockchain platform, wherein the blockchain platform is used for carrying out consensus processing and uplink on the first transaction contract;
receiving a privacy data acquisition request sent by the block chain platform, performing differential query on the target privacy data set to obtain differential target privacy data, and feeding back the differential target privacy data to the block chain platform.
2. The method of claim 1, further comprising:
extracting data characteristics from each written data record, and establishing an index relationship between the data characteristics and the data identification of the corresponding data record, wherein the data characteristics comprise data types;
determining the corresponding relation between the specific data content of each data record and the data identifier according to the index relation;
and storing the index relation and the corresponding relation to a local cache queue according to a writing sequence, sequentially storing the index relation and the corresponding relation containing the same data type to the same database of a local memory by the local cache queue according to the data type in the data characteristics, and determining a data set type identifier corresponding to the database according to the data type.
3. The method of claim 1, wherein the receiving a privacy data acquisition request sent by the blockchain platform, performing a differencing query in the target privacy data set to obtain differenced target privacy data, and feeding back the differenced target privacy data to the blockchain platform comprises:
receiving a private data acquisition request sent by the block chain platform, and performing differential query on all index relationships and corresponding relationships in a local cache queue corresponding to the target private data set according to target data characteristics carried in the private data acquisition request;
if the index relationship with the data characteristics consistent with the target data characteristics exists in the local cache queue, determining the index relationship and the corresponding relationship as a target index relationship and a target corresponding relationship;
determining corresponding target privacy data according to the target index relation and the target corresponding relation, and performing differencing processing on the target privacy data according to a preset privacy budget factor to obtain differencing target privacy data;
and reading the differentiated target privacy data, and feeding back the read differentiated target privacy data to the block chain platform.
4. The method of claim 3, further comprising:
if the index relation that the contained data features are consistent with the target data features does not exist in the local cache queue, inquiring and determining a target index relation and a target corresponding relation that the contained data features are consistent with the target data features in the local memory, determining corresponding target privacy data according to the target index relation and the target corresponding relation, and performing differential processing on the target privacy data according to a preset privacy budget factor to obtain the differential target privacy data;
and reading the differentiated target privacy data, and feeding back the read differentiated target privacy data to the block chain platform.
5. The method of claim 1, further comprising:
obtaining a hash value of the differentiated target privacy data according to the differentiated target privacy data and a preset hash algorithm;
encrypting the differentiated target privacy data and the hash value of the differentiated target privacy data according to the public key of the data owner to obtain a first ciphertext;
generating a re-encryption key according to the private key of the data owner and the public key of the data receiver;
and encrypting the first ciphertext by using the re-encryption key to obtain a second ciphertext, and feeding the second ciphertext back to the block chain platform.
6. A method for sharing block chain private data, the method being applied to a data receiving device, the method comprising:
creating a second transaction contract, and sending the second transaction contract with a target privacy data acquisition request and target data characteristics to a block chain platform, wherein the block chain platform is used for carrying out consensus processing and uplink on the second transaction contract;
and receiving the differentiated target privacy data fed back by the blockchain platform according to the target data characteristics in the second transaction contract, and analyzing and processing the differentiated target privacy data to obtain a target privacy data statistical result.
7. The method according to claim 6, wherein the receiving the differentiated target privacy data fed back by the blockchain platform according to the target data feature in the second transaction contract, and analyzing and processing the differentiated target privacy data to obtain a target privacy data statistic result comprises:
receiving the differentiated target privacy data fed back by the block chain platform, and performing disturbance statistics on the differentiated target privacy data to obtain a disturbance statistical result;
and constructing a likelihood function to correct the disturbance statistical result to obtain a corrected statistical value serving as a target privacy data statistical result.
8. The method of claim 6, further comprising:
and receiving the encrypted differentiated target privacy data fed back by the block chain platform, and decrypting the encrypted differentiated target privacy data according to a private key of the data receiver to obtain the decrypted differentiated target privacy data.
9. An apparatus for sharing private data in a blockchain, the apparatus being applied to a data owner device, the apparatus comprising:
the system comprises a creating module, a block chain platform and a data processing module, wherein the creating module is used for creating a first transaction contract and sending the first transaction contract with a target private data set data content hash value and a data type to the block chain platform, and the block chain platform is used for carrying out common identification processing and chain linking on the first transaction contract;
and the receiving module is used for receiving the privacy data acquisition request sent by the block chain platform, carrying out differential query on the target privacy data set to obtain differential target privacy data, and feeding back the differential target privacy data to the block chain platform.
10. An apparatus for sharing private data in a blockchain, the apparatus being applied to a data receiving device, the apparatus comprising:
the system comprises a creating module, a block chain platform and a data processing module, wherein the creating module is used for creating a second transaction contract and sending the second transaction contract with a target privacy data acquisition request and target data characteristics to the block chain platform, and the block chain platform is used for carrying out consensus processing and chain linking on the second transaction contract;
and the receiving module is used for receiving the differentiated target privacy data fed back by the block chain platform according to the target data characteristics in the second transaction contract, and analyzing and processing the differentiated target privacy data to obtain a target privacy data statistical result.
11. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 5, or 6 to 8 when executing the computer program.
12. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 5, or 6 to 8.
CN202010597017.5A 2020-06-28 2020-06-28 Block chain private data sharing method and device, computer equipment and storage medium Pending CN111935208A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010597017.5A CN111935208A (en) 2020-06-28 2020-06-28 Block chain private data sharing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010597017.5A CN111935208A (en) 2020-06-28 2020-06-28 Block chain private data sharing method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111935208A true CN111935208A (en) 2020-11-13

Family

ID=73317854

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010597017.5A Pending CN111935208A (en) 2020-06-28 2020-06-28 Block chain private data sharing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111935208A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113127535A (en) * 2021-04-07 2021-07-16 支付宝(杭州)信息技术有限公司 Data processing method and device based on block chain and electronic equipment
CN113420319A (en) * 2021-04-08 2021-09-21 同方股份有限公司 Data privacy protection method and system based on block chain and permission contract
TWI765538B (en) * 2020-11-20 2022-05-21 鴻海精密工業股份有限公司 Data query method, blockchain system, sharing device, and query device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107239479A (en) * 2017-03-28 2017-10-10 阿里巴巴集团控股有限公司 A kind of method and device of data storage and inquiry based on block chain
CN109558404A (en) * 2018-10-19 2019-04-02 中国平安人寿保险股份有限公司 Date storage method, device, computer equipment and storage medium
CN111079171A (en) * 2019-11-11 2020-04-28 重庆邮电大学 Block chain-based medical data privacy protection method and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107239479A (en) * 2017-03-28 2017-10-10 阿里巴巴集团控股有限公司 A kind of method and device of data storage and inquiry based on block chain
CN109558404A (en) * 2018-10-19 2019-04-02 中国平安人寿保险股份有限公司 Date storage method, device, computer equipment and storage medium
CN111079171A (en) * 2019-11-11 2020-04-28 重庆邮电大学 Block chain-based medical data privacy protection method and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
孙学波等: "基于区块链的医疗信息系统及智能合约设计", 《辽宁科技大学学报》 *
张立: "基于差分隐私保护的医院患者病症安全统计方法研究", 《电脑编程技巧与维护》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI765538B (en) * 2020-11-20 2022-05-21 鴻海精密工業股份有限公司 Data query method, blockchain system, sharing device, and query device
CN113127535A (en) * 2021-04-07 2021-07-16 支付宝(杭州)信息技术有限公司 Data processing method and device based on block chain and electronic equipment
CN113127535B (en) * 2021-04-07 2022-06-07 支付宝(杭州)信息技术有限公司 Data processing method and device based on block chain and electronic equipment
CN113420319A (en) * 2021-04-08 2021-09-21 同方股份有限公司 Data privacy protection method and system based on block chain and permission contract

Similar Documents

Publication Publication Date Title
CN110990407B (en) Block chain based data storage method and device, server and storage medium
CN108123800B (en) Key management method, key management device, computer equipment and storage medium
Ramu A secure cloud framework to share EHRs using modified CP-ABE and the attribute bloom filter
US8705746B2 (en) Data security in an off-premise environment
US8601598B2 (en) Off-premise encryption of data storage
CN111935208A (en) Block chain private data sharing method and device, computer equipment and storage medium
US20140172830A1 (en) Secure search processing system and secure search processing method
EP2103032B1 (en) Privacy enhanced comparison of data sets
KR20130064701A (en) Privacy-preserving collaborative filtering
Guo et al. A lightweight verifiable outsourced decryption of attribute-based encryption scheme for blockchain-enabled wireless body area network in fog computing
WO2022068355A1 (en) Encryption method and apparatus based on feature of information, device, and storage medium
Ali et al. Verifiable online/offline multi-keyword search for cloud-assisted industrial internet of things
EP2942899B1 (en) Information processing method, trust server and cloud server
US8402278B2 (en) Method and system for protecting data
CN113609221A (en) Data storage method, data access device and storage medium
EP3605379A1 (en) Method and device for processing user information
CN115269938A (en) Keyword track hiding query method and system based on homomorphic encryption and related device
CN113726772B (en) Method, device, equipment and storage medium for realizing online inquiry session
Hassan et al. A lightweight proxy Re-encryption approach with certificate-based and incremental cryptography for fog-enabled E-healthcare
CN114500069A (en) Method and system for storing and sharing electronic contract
CN111147474B (en) Data encryption transmission method and device, computer equipment and storage medium
CN112860790A (en) Data management method, system and device
CN115544572A (en) Multi-party privacy data and financial privacy data processing method based on privacy protection
CN112187750B (en) Information encryption method and system based on Internet
KR20220092811A (en) Method and device for storing encrypted data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20201113