CN115455458A - Data processing method and device based on block chain and computer equipment - Google Patents

Data processing method and device based on block chain and computer equipment Download PDF

Info

Publication number
CN115455458A
CN115455458A CN202110639533.4A CN202110639533A CN115455458A CN 115455458 A CN115455458 A CN 115455458A CN 202110639533 A CN202110639533 A CN 202110639533A CN 115455458 A CN115455458 A CN 115455458A
Authority
CN
China
Prior art keywords
data
encrypted data
blacklist
node
verified
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
CN202110639533.4A
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.)
SF Technology Co Ltd
Original Assignee
SF 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 SF Technology Co Ltd filed Critical SF Technology Co Ltd
Priority to CN202110639533.4A priority Critical patent/CN115455458A/en
Publication of CN115455458A publication Critical patent/CN115455458A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6227Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database where protection concerns the structure of data, e.g. records, types, queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to a data processing method and device based on a block chain, computer equipment and a storage medium. The method comprises the following steps: responding to a blacklist data sharing request sent by a data demand node through a data service node in a block chain network, and uploading an encryption function and an encryption data set to a block chain; the encrypted data set comprises first encrypted data of index values of all objects in the blacklist data; receiving second encrypted data sent by the data demand node; the second encrypted data is determined by inputting the index value of the shared object carried by the sharing request and the random encryption parameter into the encryption function; and when detecting that the first encrypted data matched with the second encrypted data exists in the encrypted data set, determining that the shared object is in the blacklist data. By adopting the method, the data can be shared on the basis of ensuring the authenticity of the data, the data of a shared object is prevented from being leaked, and the safety of the data is improved.

Description

Data processing method and device based on block chain and computer equipment
Technical Field
The present application relates to the field of blockchain technologies, and in particular, to a method and an apparatus for sharing data based on a blockchain, a computer device, and a storage medium.
Background
The development of the society is based on credit, and the development of each field needs to establish a set of credit system, so that the mastering of the risk data of each field is very important. Currently, each system is relatively closed, and data of a small micro enterprise is divided into seat data islands. For example, a bank owns the pipelining data of a small micro-enterprise; the logistics express company has the piece data of the small micro enterprise; the electric power company has the electric quantity data of small and micro enterprises, but the data are not intercommunicated, and the wind control level is difficult to measure. In the wind control data, blacklist data of each enterprise is an important item, and the blacklist data of different companies and industries are often not shared efficiently just like data islands.
Currently, the blacklist sharing is solved, and blacklists of different industries are uploaded to a blockchain in an encrypted mode by using a blockchain technology in an incentive mode and the like. When a data demand party needs to query the blacklist, a query operation can be initiated on the blockchain, and then plaintext data of the blacklist is obtained, so that the safety of the blacklist data on the blockchain is low.
Disclosure of Invention
In view of the above, it is necessary to provide a data processing method, an apparatus, a computer device, and a storage medium based on the number of blockchains, which can secure data on the blockchains.
A method of data processing based on blockchains, the method comprising:
responding to a blacklist data sharing request sent by a data demand node through a data service node in a block chain network, and uploading an encryption function and an encryption data set to a block chain; the encrypted data set comprises first encrypted data of index values of all objects in blacklist data;
receiving second encrypted data sent by the data demand node; the second encrypted data is determined by inputting an index value of a shared object carried by the sharing request and a random encryption parameter into the encryption function;
when it is detected that first encrypted data matching the second encrypted data exists in the encrypted data set, it is determined that the shared object is in the blacklist data.
In one embodiment, the method further comprises:
responding to a detection instruction sent by a detection node in the block chain network, and acquiring a fingerprint value of a blacklist data set from the block chain according to the detection instruction; the fingerprint value is a hash value of a blacklist data set determined by the data service node;
receiving a fingerprint value to be verified sent by the detection node; the fingerprint value to be verified is obtained by carrying out hash processing on the blacklist data set through a detection node;
and when the fingerprint value to be verified is different from the fingerprint value, the data service node has an abnormal behavior, and the sharing request is determined to be abnormal.
In one embodiment, the fingerprint value is obtained by performing hash processing on each blacklist in the blacklist data to obtain a first hash value of each blacklist at a current node; carrying out hash processing on any number of hash values in the first hash values to obtain a second hash value of at least one next-level node; and performing hash processing on each second hash value until a target hash value of the target node is obtained.
In one embodiment, the method further comprises:
when the fingerprint value to be verified is the same as the fingerprint value, acquiring a random encryption parameter and an encryption function of a blacklist data set corresponding to the data service node;
receiving an encryption function to be verified sent by the detection node; the encryption function to be verified is generated according to the random encryption parameters;
and when the encryption function to be verified is different from the encryption function, the data service node has an abnormal behavior, and the sharing request is determined to be abnormal.
In one embodiment, the method further comprises:
when the encryption function to be verified is the same as the encryption function, acquiring the second encrypted data uploaded by the data demand node from the block chain;
receiving second encrypted data to be verified, which is sent by the detection node; the second encrypted data to be verified is generated by the encryption function to be verified;
and when the second encrypted data to be verified is different from the second encrypted data, the data demand node has an abnormal behavior, and the sharing request is determined to be abnormal.
In one embodiment, the method further comprises:
when the second encrypted data to be verified is the same as the second encrypted data, acquiring an encrypted data set of a blacklist data set corresponding to the data service node from the block chain;
acquiring an encrypted data set to be verified of the blacklist data set determined by the encryption function to be verified;
and when the encrypted data set is different from the encrypted data set to be verified, the data service node has an abnormal behavior, and the sharing request is determined to be abnormal.
A blockchain-based data processing apparatus, the apparatus comprising:
the response module is used for responding to a blacklist data sharing request sent by a data demand node through a data service node in a block chain network and uploading an encryption function and an encryption data set to the block chain; the encrypted data set comprises first encrypted data of index values of all objects in blacklist data;
the receiving module is used for receiving second encrypted data sent by the data demand node; the second encrypted data is determined by inputting an index value of a shared object carried by the sharing request and a random encryption parameter into the encryption function;
a detection module, configured to determine that the shared object is in the blacklist data when it is detected that there is first encrypted data in the encrypted data set that matches the second encrypted data.
A computer device comprising a memory storing a computer program and a processor implementing the following steps when the computer program is executed:
responding to a blacklist data sharing request sent by a data demand node through a data service node in a block chain network, and uploading an encryption function and an encryption data set to a block chain; the encrypted data set comprises first encrypted data of index values of all objects in blacklist data;
receiving second encrypted data sent by the data demand node; the second encrypted data is determined by inputting an index value of a shared object carried by the sharing request and a random encryption parameter into the encryption function;
when it is detected that first encrypted data matching the second encrypted data exists in the encrypted data set, it is determined that the shared object is in the blacklist data.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
responding to a blacklist data sharing request sent by a data demand node through a data service node in a block chain network, and uploading an encryption function and an encryption data set to a block chain; the encrypted data set comprises first encrypted data of index values of all objects in blacklist data;
receiving second encrypted data sent by the data demand node; the second encrypted data is determined by inputting an index value of a shared object carried by the sharing request and a random encryption parameter into the encryption function;
when detecting that there is first encrypted data in the encrypted data set that matches the second encrypted data, determining that the shared object is in the blacklist data.
According to the data processing method, the device, the computer equipment and the storage medium based on the block chain, the data service node in the block chain network responds to the blacklist data sharing request sent by the data demand node, the first encrypted data uploaded by the data service node is obtained from the block chain according to the sharing request, the index value of the shared object is encrypted through the encryption function to determine the second encrypted data, and the first encrypted data and the second encrypted data sent by the data demand node are compared to detect whether the shared object exists or not, namely, the data sharing is realized on the basis of ensuring the authenticity of the data, namely, the data leakage of the shared object is avoided, and the safety of the data is improved.
Drawings
FIG. 1 is a diagram of an application environment of a data processing method based on a blockchain in one embodiment;
FIG. 2 is a flow diagram illustrating a method for blockchain-based data processing in one embodiment;
FIG. 3 is a flow diagram that illustrates data processing steps based on blockchains, in one embodiment;
FIG. 4 is a diagram illustrating a fingerprint value determination process for a blacklist data set in an embodiment;
FIG. 5 is a flow chart illustrating a data processing method based on block chains according to another embodiment;
FIG. 6 is a flow chart illustrating a data processing method based on block chains according to another embodiment;
FIG. 7 is a block diagram of a data processing apparatus based on blockchains in one embodiment;
FIG. 8 is a diagram of an internal structure of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clearly understood, the present application is further described in 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 data processing method based on the blockchain provided by the present application may be applied to an application environment shown in fig. 1, referring to a blockchain network 102 shown in fig. 1, where the blockchain network 102 may include a plurality of nodes 104, and the plurality of nodes 104 may refer to respective terminals in the data sharing system, such as a first terminal, a second terminal, and the like. Each node 104 may receive input information and maintain shared data within the blockchain network based on the received input information while operating normally. In order to ensure information intercommunication in the blockchain network, information connection can exist between each node of the blockchain network, and information transmission can be carried out between the nodes through the information connection.
In an embodiment, as shown in fig. 2, a data processing method based on a blockchain is provided, which is described by taking the application of the method to a blockchain node in a blockchain network in fig. 1 as an example, and includes the following steps:
step 202, responding to a blacklist data sharing request sent by a data demand node through a data service node in a blockchain network, uplink is performed on an encryption function and an encryption data set, and the encrypted data set is stored in a blockchain of the blockchain network.
The encrypted data set comprises first encrypted data of index values of all objects in the blacklist data. The blacklist data treasury comprises individual blacklist data and enterprise blacklist data; the blacklist data of an individual includes a blacklist identifier and privacy data (e.g. identity number), which may be denoted as "1000+ xxxxxxxxxxxx", and the blacklist data of an enterprise includes a blacklist identifier and enterprise information (e.g. social Union Credit code), which may be denoted as "1001+ xxxxxxxxxxxxxxx".
Carrying an index value of a shared object in the blacklist data sharing request; for example, the blacklist data sharing request carries an index value N of the object to be shared.
A plurality of nodes exist in the block chain network, and each node represents different clients; the block chain in the block chain network comprises a data demand node, a data service node and a data detection node. The encryption function refers to an Oblivious Pseudo Random Function (OPRF) provided by a data demand node, and the function is constructed by an oblivious transmission protocol and a pseudo random number function; i.e. the encryption function may be denoted F k (x) Wherein k is a seed parameter for generating an oblivious pseudorandom function by a data service party, and x is an index value of each object in the blacklist data to be inquired; the index value of each object in the blacklist data is a hash value generated according to an identifier (e.g., ID) of each object and a random number.
And the encrypted data set is obtained by encrypting the index value of each object in the blacklist data in the data service node through an encryption function. For example, the data server may be based on an inadvertent pseudorandom function and n blacklist index values { x ] in the blacklist data i } n i=1 Calculating n function values { F } k (x i )} n i=1 N values are obtained, i.e. an encrypted data set of blacklist data is determined and the n values are uploaded to the blockchain.
Specifically, a data service node in the blockchain network responds to a blacklist data sharing request sent by a data demand node to generate a data uplink request; based on the data uplink request, sending the uplink request to other nodes of the block chain network according to an endorsement strategy in an intelligent contract, so that the other nodes can feed back endorsement results after carrying out endorsement operation on encrypted data and an encrypted data set in the uplink request; the endorsement operation refers to a process that other nodes verify the encryption function and the encryption data set, add a verification result and a node identifier of the other nodes in the encryption function and the encryption data set, and encrypt the encryption data and the encryption data set added with the verification result and the node identifier; and when the endorsement result passes verification, writing the encryption function and the encryption data set into the block chain.
And step 204, receiving second encrypted data sent by the data demand node.
And the second encrypted data is determined by inputting the index value of the shared object carried by the sharing request and the random encryption parameter into the encryption function.
Specifically, the data demand node acquires the encryption function from the block chain, and inputs the index value of the shared object and the random encryption parameter (i.e., the seed parameter) carried by the sharing request to the encryption function to obtain the second encrypted data. For example, the data demander inputs the index value y of the object to be shared and calculates the function value F k And (y) obtaining second encrypted data, generating a uplink request of the second encrypted data, uploading the value to the block chain by processing the uplink request, and sending the value to the data service node.
And step 206, when detecting that the first encrypted data matched with the second encrypted data exists in the encrypted data set, determining that the shared object is in the blacklist data.
Specifically, when it is detected that first encrypted data which is the same as second encrypted data exists in an encrypted data set of a block chain, it is determined that an object to be shared by a data demand node is in blacklist data of a data service node; otherwise, in the white list data of the data service node. For example, the encrypted data set { F } k (x i )} n i=1 Presence and second encrypted data F k (y) equal first encrypted data, then the data requiring party inquires that the user is in the blacklist of the data serving party.
According to the data processing method based on the block chain, the data service node in the block chain network responds to the blacklist data sharing request sent by the data demand node, the first encrypted data uploaded by the data service node is obtained from the block chain according to the sharing request, the index value of the shared object is encrypted through the encryption function to determine the second encrypted data, and the first encrypted data and the second encrypted data sent by the data demand node are compared to detect whether the shared object exists or not, namely, the data sharing is realized on the basis of ensuring the authenticity of the data, namely, the data of the shared object is prevented from being leaked, and the safety of the data is improved.
In one embodiment, as shown in fig. 3, a data processing step based on a blockchain is provided, which is described by taking the application of the method to a blockchain node in the blockchain network in fig. 1 as an example, and includes the following steps:
step 302, responding to a blacklist data sharing request sent by a data demand node, and uploading an encryption function and an encryption data set to a block chain.
The data demand node and the data service node are block chain nodes in a block chain network; the encryption function is an inadvertent pseudorandom function; and the encryption data set is determined by encrypting the index values of the blacklists in the blacklist data set on the data service node through an encryption function.
And step 304, receiving second encrypted data sent by the data demand node.
And the second encrypted data is determined by inputting the index value of the shared object and the random encryption parameter carried by the sharing request into the encryption function by the data demand node.
And step 306, when detecting that data matched with the second encrypted data exists in the encrypted data set, determining that the shared object is in the blacklist data.
Optionally, if it is detected that there is no data in the encrypted data set that matches the second encrypted data, it is determined that the shared object is in the white list data of the data service node.
In step 308, the fingerprint value of the blacklist data set on the data serving node is determined and the fingerprint value is uplinked to the blockchain.
The fingerprint value is obtained by performing hash processing on each blacklist in the blacklist data to obtain a first hash value of each blacklist at the current node; carrying out hash processing on any number of hash values in the first hash values to obtain a second hash value of at least one next-level node; determining the second hash values until the target hash value of the target node is obtained, as shown in fig. 4, which is a schematic diagram of a fingerprint value determination process of a blacklist DATA set in an embodiment, where the blacklist DATA set includes DATA _1, DATA _2, DATA _3, and DATA _4, and generates Random numbers Random _1, random _2, random _3, and Random _4 corresponding to DATA _1, DATA _2, DATA _3, and DATA _4; performing hash processing on DATA _1, DATA _2, DATA _3 and DATA _4 to obtain a first hash value of each blacklist at the current node as follows: a = Hash ("DATA _1" | Random _ 1), B = Hash ("DATA _2" | Random _ 2), C = Hash ("DATA _3" | Random _ 3), and D = Hash ("DATA _4" | Random _ 4); carrying out Hash processing on any number of Hash values in the first Hash values to obtain a second Hash value of at least one next-level node, namely obtaining E = Hash (A | | B) and E = Hash (A | | B); and performing Hash processing on the second Hash values E and F to obtain the fingerprint value ROOT = Hash (E | | F) of the blacklist data set.
Step 310, in response to a detection instruction sent by a detection node in the blockchain network, a fingerprint value is obtained from the blockchain.
Step 312, determining whether the fingerprint value is the same as the fingerprint value to be verified sent by the detection node, if not, executing step 314, and if not, executing step 316.
The fingerprint value to be verified is obtained by performing hash processing on the blacklist data set through the detection node.
In step 314, the data service node has an abnormal behavior, and determines that the sharing request is abnormal.
At step 316, an encryption function is obtained from the blockchain.
Step 318, determining whether the encryption function is the same as the encryption function to be verified sent by the detection node, if not, executing step 314, otherwise, executing step 320.
The encryption function to be verified is generated according to the random encryption parameters.
Step 320, obtaining second encrypted data from the blockchain.
Specifically, second encrypted data uploaded by the data demand node is acquired from the blockchain.
In step 322, it is determined whether the second encrypted data is the same as the second encrypted data to be verified sent by the detection node, if not, step 324 is executed, otherwise, step 326 is executed.
Step 324, the data demand node has abnormal behavior, and it is determined that the sharing request is abnormal.
Wherein the second encrypted data to be verified is determined by the data demand node according to the encryption function to be verified,
step 326, obtain the encrypted dataset of the blacklist dataset from the blockchain.
Step 328, determining whether the encrypted data set is the same as the encrypted data set to be verified sent by the detection node, if not, executing step 314, otherwise, executing step 330.
Step 330, the data service node has no abnormal behavior, and it is determined that the sharing request is normal.
In the data processing step based on the block chain, an encryption function and an encrypted data set are uploaded to the block chain by responding to a blacklist data sharing request sent by a data demand node, and when first encrypted data matched with second encrypted data sent to the data demand node exist in the block chain, a shared object is determined to be at a data service node; when a detection instruction sent by a detection node in a block chain network is received, whether a fingerprint value, first encrypted data, an encryption function and an encrypted data set in a block chain are correspondingly matched with a fingerprint value to be verified, second encrypted data to be verified, an encryption function to be verified and an encrypted data set to be verified in the detection node is detected, whether a data demand node and a data service node are abnormal or not is determined, and the condition of a sharing request is determined, namely, an index value of blacklist data is encrypted, the encrypted data is linked, the reliability of sharing of the blacklist data is ensured by obtaining the fingerprint values of the encrypted data, the encryption function and the blacklist data, and the safety of the block chain data is improved.
In another embodiment, as shown in fig. 5, a data processing method based on a blockchain is provided, which is described by taking the application of the method to a blockchain node in the blockchain network in fig. 1 as an example, and includes the following steps:
step 502, responding to a blacklist data sharing request sent by a data demand node through a data service node in a block chain network, and uploading an encryption function and an encryption data set to a block chain.
The encrypted data set comprises first encrypted data of index values of all objects in the blacklist data.
Step 504, receiving second encrypted data sent by the data demand node; the second encrypted data is determined by inputting the index value of the shared object carried by the sharing request and the random encryption parameter into the encryption function.
Step 506, when it is detected that the first encrypted data matched with the second encrypted data exists in the encrypted data set, determining that the shared object is in the blacklist data of the data service node.
Step 508, responding to the detection instruction sent by the detection node in the blockchain network, and obtaining the fingerprint value of the blacklist data set from the blockchain according to the detection instruction.
Wherein the fingerprint value is a hash value of the blacklist data set determined by the data service node.
Step 510, receiving a fingerprint value to be verified sent by a detection node; and the fingerprint value to be verified is obtained by carrying out hash processing on the blacklist data set through a terminal corresponding to the detection node.
Step 512, when the fingerprint value to be verified is different from the fingerprint value, the data service node has an abnormal behavior, and it is determined that the sharing request is abnormal.
Optionally, in an embodiment, when the fingerprint value to be verified is the same as the fingerprint value, acquiring a random encryption parameter and an encryption function of the blacklist data set corresponding to the data service node; receiving an encryption function to be verified sent by a detection node; the encryption function to be verified is generated according to the random encryption parameters; and when the encryption function to be verified is different from the encryption function, the data service node has abnormal behavior, and the sharing request is determined to be abnormal.
Optionally, in an embodiment, when the encryption function to be verified is the same as the encryption function, obtaining second encryption data from the blockchain; uploading the second encrypted data to the block chain through the data demand node; receiving second encrypted data to be verified, which is sent by a detection node; the second encrypted data to be verified is generated by an encryption function to be verified; and when the second encrypted data to be verified is different from the second encrypted data, the data demand node has an abnormal behavior, and the sharing request is determined to be abnormal.
Optionally, in an embodiment, when the second encrypted data to be verified is the same as the second encrypted data, an encrypted data set of the blacklist data set corresponding to the data service node is obtained from the blockchain; acquiring an encrypted data set to be verified of a blacklist data set determined by an encryption function to be verified; when the encrypted data set is different from the encrypted data set to be verified, the data service node has abnormal behavior, and the sharing request is determined to be abnormal; when the encrypted data set is the same as the encrypted data set to be verified, the data service node has no abnormal behavior, and the sharing request is normal.
In one embodiment, a data service node in a block chain network responds to a blacklist data sharing request sent by a data demand node, receives second encrypted data determined by the data demand node according to an index value and a random encryption parameter of a shared object carried by the sharing request and an encryption function, and determines that the shared object is in a blacklist data set of the data service node when first encrypted data matched with the second encrypted data exists in the blacklist data encryption set of the block chain.
When a detection request of a detection node for the blacklist data sharing request is received, acquiring a fingerprint value of a blacklist data set from a block chain according to a detection instruction, detecting whether a fingerprint value to be verified sent by the detection node is equal to the fingerprint value or not, and if the fingerprint value to be verified is not equal to the fingerprint value, proving that the data service node has abnormal behavior and the blacklist data sharing is abnormal; if the encryption function is equal to the blacklist data set, detecting the encryption function corresponding to the data service node and detecting whether the encryption function to be verified sent by the detection node is equal to the encryption function; if the data service nodes are not equal, the data service nodes are proved to have abnormal behaviors, and the blacklist data sharing is abnormal; if the index value of the shared object is equal to the index value of the shared object, detecting second encrypted data of the index value of the shared object, and when first encrypted data which is the same as the second encrypted data does not exist, the data demand node has abnormal behavior, and the blacklist data is abnormally shared; when first encrypted data which are the same as the second encrypted data exist, detecting an encrypted data set of the blacklist data set, and when the encrypted data set is different from the encrypted data set to be verified, which is determined by the detection node, proving that the data service node has abnormal behavior, and the sharing of the blacklist data is abnormal; if the data sharing data are the same, the data service node and the data demand node do not have abnormal behaviors, and the blacklist data are abnormal in sharing.
In the data processing method based on the block chain, an encryption function and an encryption data set are uploaded to the block chain by responding to a blacklist data sharing request sent by a data demand node, and when first encryption data matched with second encryption data sent to the data demand node exists in the block chain, a shared object is determined to be at a data service node; when a detection instruction sent by a detection node in a block chain network is received, matching is carried out according to a fingerprint value, encrypted data, an encryption function and an encrypted data set corresponding to blacklist data and data corresponding to the detection node, whether a data demand node and a data service node are abnormal is determined according to a matching result, the condition of a sharing request is determined, namely, an index value of the blacklist data is encrypted, the encrypted data is linked, the reliability of sharing of the blacklist data is ensured by obtaining the fingerprint value of the encrypted data, the encryption function and the blacklist data, and the safety of the block chain data is improved.
In an embodiment, as shown in fig. 6, a block chain-based data processing method is provided, which is described by taking as an example that the method is applied to a first terminal corresponding to a block chain link point in a block chain network, and includes the following steps:
step 602, receiving a sharing request of blacklist data sent by a second terminal.
And step 604, uploading an encryption function and an encryption data set of the blacklist data on the first terminal to the block chain according to the sharing request.
Wherein, the index value of the shared object carried by the sharing request; first encrypted data including an index value in the encrypted data set.
Step 606, when the first encrypted data on the block chain and the second encrypted data corresponding to the sharing request are detected, it is determined that the shared object is in the blacklist data of the first terminal.
Wherein the second encryption data is determined by inputting the index value and the random encryption parameter into an encryption function obtained from the block chain.
Optionally, in an embodiment, in response to a detection instruction sent by the third terminal, a fingerprint value of the blacklist data set is obtained from the block chain according to the detection instruction; the fingerprint value is a hash value of the blacklist data set determined by the first terminal; receiving a fingerprint value to be verified sent by a third terminal; the fingerprint value to be verified is obtained by carrying out hash processing on the blacklist data set through a terminal corresponding to the third terminal; when the fingerprint value to be verified is different from the fingerprint value, the first terminal has abnormal behavior, and the sharing request is determined to be abnormal; the fingerprint value is obtained by performing hash processing on each blacklist in the blacklist data to obtain a first hash value of each blacklist at the current node; carrying out hash processing on any number (2, 3, 4 and the like) of hash values in the first hash values to obtain a second hash value of at least one next-level node; and performing hash processing on each second hash value until the target hash value of the target node is obtained.
When the fingerprint value to be verified is the same as the fingerprint value, acquiring a random encryption parameter and an encryption function of a blacklist data set corresponding to the first terminal; receiving an encryption function to be verified sent by a third terminal; the encryption function to be verified is generated according to the random encryption parameters; and when the encryption function to be verified is different from the encryption function, the first terminal has abnormal behavior, and the sharing request is determined to be abnormal.
When the encryption function to be verified is the same as the encryption function, acquiring second encryption data uploaded by a second terminal from the block chain; receiving second encrypted data to be verified, which is sent by a third terminal; the second encrypted data to be verified is generated by an encryption function to be verified; and when the second encrypted data to be verified is different from the second encrypted data, the second terminal has abnormal behavior, and the sharing request is determined to be abnormal.
When the second encrypted data to be verified is the same as the second encrypted data, acquiring an encrypted data set of the blacklist data set corresponding to the first terminal from the block chain; acquiring an encrypted data set to be verified of a blacklist data set determined by an encryption function to be verified; when the encrypted data set is different from the encrypted data set to be verified, the first terminal has an abnormal behavior, the sharing request is determined to be abnormal, namely, in the blacklist data of the first terminal of the shared object, the sharing of the blacklist data is detected through the third terminal, namely, matching is performed according to the fingerprint value, the encrypted data, the encryption function and the encrypted data set corresponding to the blacklist data and the data corresponding to the detection node, whether the data demand node and the data service node are abnormal or not is determined according to the matching result, the reliability of sharing of the blacklist data is ensured, and the safety of block chain data is improved.
According to the data processing method based on the block chain, the blacklist data sharing request sent by the second terminal is received, the first encrypted data uploaded by the data service node is obtained from the block chain according to the sharing request, the second encrypted data is determined by encrypting the index value of the shared object by the second terminal according to the encryption function, and the first encrypted data and the second encrypted data are compared to detect whether the shared object exists in the first terminal, namely, the data sharing is realized on the basis of ensuring the authenticity of the data, the data of the shared object is prevented from being leaked, and the safety of the data is improved.
It should be understood that although the steps in the flowcharts of fig. 2, 3, 5, and 6 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 a part of the steps in fig. 2, 3, 5, and 6 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the steps or stages is not necessarily sequential, but may be performed alternately or alternatively with other steps or at least a part of the steps or stages in other steps.
In one embodiment, as shown in fig. 7, there is provided a block chain-based data processing apparatus including: a response module 702, a receiving module 704, and a detection module 706, wherein:
a response module 702, configured to respond to a blacklist data sharing request sent by a data demand node through a data service node in a blockchain network, and upload an encryption function and an encryption data set to a blockchain; the encrypted data set includes first encrypted data including index values of objects in the blacklist data.
A receiving module 704, configured to receive second encrypted data sent by the data demand node; the second encrypted data is determined by inputting the index value of the shared object carried by the sharing request and the random encryption parameter into the encryption function.
A detecting module 706, configured to determine that the shared object is in the blacklist data when detecting that there is the first encrypted data in the encrypted data set that matches the second encrypted data.
In the data processing device based on the block chain, the data service node in the block chain network responds to the blacklist data sharing request sent by the data demand node, the first encrypted data uploaded by the data service node is obtained from the block chain according to the sharing request, the index value of the shared object is encrypted through the encryption function to determine the second encrypted data, the first encrypted data and the second encrypted data sent by the data demand node are compared to detect whether the shared object exists, namely, the data sharing is realized on the basis of ensuring the authenticity of the data, namely, the data of the shared object is prevented from being leaked, and the safety of the data is improved
In another embodiment, a blockchain-based data processing apparatus is provided, which comprises, in addition to the response module 702, the receiving module 704, and the detecting module 706: an acquisition module, wherein:
in one embodiment, the response module 702 is further configured to, in response to a detection instruction sent by a detection node in the blockchain network, obtain a fingerprint value of the blacklist data set from the blockchain according to the detection instruction; the fingerprint value is a hash value of the blacklisted data set determined by the data service node.
In one embodiment, the receiving module 704 is further configured to receive a fingerprint value to be verified sent by the detection node; the fingerprint value to be verified is obtained by carrying out hash processing on the blacklist data set through the detection node.
In one embodiment, the detection module 706 is further configured to determine that the sharing request is abnormal when the fingerprint value to be verified is different from the fingerprint value, and the data service node has an abnormal behavior.
In one embodiment, the fingerprint value is obtained by performing hash processing on each blacklist in the blacklist data to obtain a first hash value of each blacklist on a current node; carrying out hash processing on any number of hash values in the first hash values to obtain a second hash value of at least one next-level node; and performing hash processing on each second hash value until the target hash value of the target node is obtained.
And the acquisition module is used for acquiring the random encryption parameters and the encryption functions of the blacklist data set corresponding to the data service node when the fingerprint value to be verified is the same as the fingerprint value.
In one embodiment, the receiving module 704 is further configured to receive an encryption function to be verified sent by the detection node; the encryption function to be verified is generated according to the random encryption parameters.
In one embodiment, the detecting module 706 is further configured to determine that the sharing request is abnormal when the cryptographic function to be verified is different from the cryptographic function, and the data service node has an abnormal behavior.
In one embodiment, the obtaining module is further configured to obtain the second encrypted data uploaded by the data demand node from the block chain when the encryption function to be verified is the same as the encryption function.
In one embodiment, the receiving module 704 is further configured to receive second encrypted data to be verified, sent by the detection node; the second encrypted data to be verified is generated by an encryption function to be verified.
In an embodiment, the detecting module 706 is further configured to determine that the sharing request is abnormal when the second encrypted data to be verified is different from the second encrypted data, and the data requiring node has an abnormal behavior.
In one embodiment, the obtaining module is further configured to obtain, from the blockchain, an encrypted data set of the blacklist data set corresponding to the data service node when the second encrypted data to be verified is the same as the second encrypted data; and acquiring an encrypted data set to be verified of the blacklist data set determined by the encryption function to be verified.
In one embodiment, the detecting module 706 is further configured to determine that the sharing request is abnormal when the encrypted data set is different from the encrypted data set to be verified, and the data service node has an abnormal behavior.
In one embodiment, the data processing apparatus based on the block chain responds to a blacklist data sharing request sent by a data demand node through a data service node in a block chain network, receives second encrypted data determined by the data demand node according to an index value and a random encryption parameter of a shared object carried by the sharing request and an encryption function, and determines that the shared object is in a blacklist data set of the data service node when first encrypted data matched with the second encrypted data exists in a blacklist data encryption set of the block chain.
When a detection request of a detection node for the blacklist data sharing request is received, acquiring a fingerprint value of a blacklist data set from a block chain according to a detection instruction, detecting whether a fingerprint value to be verified sent by the detection node is equal to the fingerprint value or not, and if the fingerprint value to be verified is not equal to the fingerprint value, proving that the data service node has abnormal behavior and the blacklist data sharing is abnormal; if the encryption functions are equal, the encryption functions of the blacklist data sets corresponding to the data service nodes need to be detected, and whether the encryption functions to be verified and sent by the detection nodes are equal to each other is detected; if the data sharing is not equal, the data sharing is abnormal, and the data sharing of the blacklist is abnormal; if the index value of the shared object is equal to the index value of the shared object, detecting second encrypted data of the index value of the shared object, and when first encrypted data which is the same as the second encrypted data does not exist, the data demand node has abnormal behavior, and the blacklist data is abnormally shared; when first encrypted data identical to second encrypted data exist, detecting an encrypted data set of a blacklist data set, and when the encrypted data set is different from an encrypted data set to be verified, which is determined by a detection node, proving that the data service node has abnormal behavior, and sharing the blacklist data is abnormal; if the data service node and the data demand node are the same, abnormal behaviors do not exist in the data service node and the data demand node, and blacklist data sharing is abnormal; namely, the index value of the blacklist data is encrypted, the encrypted data is linked, the reliability of sharing the blacklist data is ensured by acquiring the encrypted data, an encryption function and the fingerprint value of the blacklist data, and the safety of the block chain data is improved.
In one embodiment, there is provided a blockchain-based data processing apparatus comprising: a transceiver module, a cochain module and a determination module, wherein:
and the transceiver module is used for receiving the sharing request of the blacklist data sent by the second terminal.
The uplink module is used for uplink the encryption function and the encryption data set of the blacklist data on the first terminal to the block chain according to the sharing request; the index value of the shared object carried by the sharing request; first encrypted data including an index value in the encrypted data set;
the determining module is used for determining that the shared object is in blacklist data of the first terminal when detecting that the first encrypted data on the block chain is the same as the second encrypted data corresponding to the sharing request; the second encryption data is determined by inputting the index value and the random encryption parameter into an encryption function obtained from the block chain.
According to the data processing device based on the block chain, the blacklist data sharing request sent by the second terminal is received, the first encrypted data uploaded by the data service node is obtained from the block chain according to the sharing request, the second encrypted data is determined by encrypting the index value of the shared object by the second terminal according to the encryption function, and the first encrypted data and the second encrypted data are compared to detect whether the shared object exists in the first terminal, namely, the data sharing is realized on the basis of ensuring the authenticity of the data, the data of the shared object is prevented from being leaked, and the safety of the data is improved.
For specific definition of the data processing apparatus based on the blockchain, reference may be made to the definition of the data processing method based on the blockchain above, and details are not described here. The respective modules in the above block chain-based data processing apparatus may be wholly or partially implemented by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent of 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 terminal, and its internal structure diagram may be as shown in fig. 8. The computer device comprises a processor, a memory, a communication interface, a display screen and an input device which are connected through 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 and a computer program. The internal memory provides an environment for the operating system and the computer program to run on the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a block chain based data processing method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 8 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 an embodiment, a computer device is further provided, which includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above 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 specific and detailed, but not to be understood 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 application shall be subject to the appended claims.

Claims (10)

1. A method for processing data based on a blockchain, the method comprising:
responding to a blacklist data sharing request sent by a data demand node through a data service node in a block chain network, and uploading an encryption function and an encryption data set to a block chain; the encrypted data set comprises first encrypted data of index values of all objects in blacklist data;
receiving second encrypted data sent by the data demand node; the second encrypted data is determined by inputting an index value of a shared object carried by the sharing request and a random encryption parameter into the encryption function;
when it is detected that first encrypted data matching the second encrypted data exists in the encrypted data set, it is determined that the shared object is in the blacklist data.
2. The method of claim 1, further comprising:
responding to a detection instruction sent by a detection node in the block chain network, and acquiring a fingerprint value of a blacklist data set from the block chain according to the detection instruction; the fingerprint value is a hash value of a blacklist data set determined by the data service node;
receiving a fingerprint value to be verified sent by the detection node; the fingerprint value to be verified is obtained by carrying out hash processing on the blacklist data set through a detection node;
and when the fingerprint value to be verified is different from the fingerprint value, the data service node has an abnormal behavior, and the sharing request is determined to be abnormal.
3. The method of claim 2, wherein the fingerprint value is obtained by hashing each blacklist in the blacklist data to obtain a first hash value of each blacklist at a current node; carrying out hash processing on any number of hash values in the first hash values to obtain a second hash value of at least one next-level node; and performing hash processing on each second hash value until a target hash value of the target node is obtained.
4. The method of claim 2, further comprising:
when the fingerprint value to be verified is the same as the fingerprint value, acquiring a random encryption parameter and an encryption function of a blacklist data set corresponding to the data service node;
receiving an encryption function to be verified sent by the detection node; the encryption function to be verified is generated according to the random encryption parameters;
and when the encryption function to be verified is different from the encryption function, the data service node has an abnormal behavior, and the sharing request is determined to be abnormal.
5. The method of claim 4, further comprising:
when the encryption function to be verified is the same as the encryption function, acquiring the second encrypted data uploaded by the data demand node from the block chain;
receiving second encrypted data to be verified sent by the detection node; the second encrypted data to be verified is generated by the encryption function to be verified;
and when the second encrypted data to be verified is different from the second encrypted data, the data demand node has an abnormal behavior, and the sharing request is determined to be abnormal.
6. The method of claim 5, further comprising:
when the second encrypted data to be verified is the same as the second encrypted data, acquiring an encrypted data set of a blacklist data set corresponding to the data service node from the blockchain;
acquiring an encrypted data set to be verified of the blacklist data set determined by the encryption function to be verified;
and when the encrypted data set is different from the encrypted data set to be verified, the data service node has abnormal behavior, and the sharing request is determined to be abnormal.
7. A data processing method based on a block chain is applied to a first terminal, and is characterized in that the method comprises the following steps:
receiving a sharing request of blacklist data sent by a second terminal;
uploading an encryption function and an encryption data set of blacklist data on the first terminal to a block chain according to the sharing request; the index value of the shared object carried by the sharing request; first encrypted data including the index value in the encrypted data set;
when detecting that first encrypted data on the block chain is the same as second encrypted data corresponding to the sharing request, determining that the shared object is in blacklist data of the first terminal; the second encryption data is determined by inputting the index value and a random encryption parameter into an encryption function obtained from the block chain.
8. An apparatus for processing block chain based data, the apparatus comprising:
the response module is used for responding to a blacklist data sharing request sent by a data demand node through a data service node in a block chain network and uploading an encryption function and an encryption data set to the block chain; the encrypted data set comprises first encrypted data of index values of all objects in blacklist data;
the receiving module is used for receiving second encrypted data sent by the data demand node; the second encrypted data is determined by inputting an index value of a shared object carried by the sharing request and a random encryption parameter into the encryption function;
a detection module, configured to determine that the shared object is in the blacklist data when it is detected that first encrypted data matching the second encrypted data exists in the encrypted data set.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. 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 7.
CN202110639533.4A 2021-06-08 2021-06-08 Data processing method and device based on block chain and computer equipment Pending CN115455458A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110639533.4A CN115455458A (en) 2021-06-08 2021-06-08 Data processing method and device based on block chain and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110639533.4A CN115455458A (en) 2021-06-08 2021-06-08 Data processing method and device based on block chain and computer equipment

Publications (1)

Publication Number Publication Date
CN115455458A true CN115455458A (en) 2022-12-09

Family

ID=84295249

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110639533.4A Pending CN115455458A (en) 2021-06-08 2021-06-08 Data processing method and device based on block chain and computer equipment

Country Status (1)

Country Link
CN (1) CN115455458A (en)

Similar Documents

Publication Publication Date Title
CN110365670B (en) Blacklist sharing method and device, computer equipment and storage medium
US11650955B2 (en) Systems and methods for distributed data storage and delivery using blockchain
KR101843340B1 (en) Privacy-preserving collaborative filtering
US20210256309A1 (en) Apparatuses, computer program products, and computer-implemented methods for privacy-preserving federated learning
CN110414567B (en) Data processing method and device and electronic equipment
CN111383021B (en) Node management method, device, equipment and medium based on block chain network
US11546348B2 (en) Data service system
CN113468602B (en) Data inspection method, device and equipment
CN109510840B (en) Method and device for sharing unstructured data, computer equipment and storage medium
CN110166423B (en) User credit determination method, device and system and data processing method
CN111563365B (en) Method and device for processing modification information of test standard worksheet and computer equipment
US20200074122A1 (en) Cryptographic operation processing method, apparatus, and system, and method for building measurement for trust chain
CN110149323B (en) Processing device with ten-million-level TPS (platform secure protocol) contract processing capacity
CN107733639A (en) Key management method, device and readable storage medium storing program for executing
Gupta et al. SELI: Statistical evaluation based leaker identification stochastic scheme for secure data sharing
CN111340483A (en) Data management method based on block chain and related equipment
CN113950679A (en) Validating a measurement dataset using speaker consensus
CN109978543B (en) Contract signing method and device, electronic equipment and storage medium
CN111585995A (en) Method and device for transmitting and processing safety wind control information, computer equipment and storage medium
CN111079153A (en) Security modeling method and device, electronic equipment and storage medium
CN107026729B (en) Method and device for transmitting software
CN115730319A (en) Data processing method, data processing device, computer equipment and storage medium
CN109302442A (en) A kind of data storage method of proof and relevant device
CN116112216B (en) Cloud data verification method and device, electronic equipment and nonvolatile storage medium
CN116743481A (en) Service security management and control method, device, equipment and storage medium

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