CN111612458A - Method and device for processing block chain data and readable storage medium - Google Patents

Method and device for processing block chain data and readable storage medium Download PDF

Info

Publication number
CN111612458A
CN111612458A CN202010360823.0A CN202010360823A CN111612458A CN 111612458 A CN111612458 A CN 111612458A CN 202010360823 A CN202010360823 A CN 202010360823A CN 111612458 A CN111612458 A CN 111612458A
Authority
CN
China
Prior art keywords
information
transaction
data set
broadcast
private
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
CN202010360823.0A
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.)
OneConnect Smart Technology Co Ltd
OneConnect Financial Technology Co Ltd Shanghai
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
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 OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Priority to CN202010360823.0A priority Critical patent/CN111612458A/en
Priority to PCT/CN2020/106024 priority patent/WO2021217939A1/en
Publication of CN111612458A publication Critical patent/CN111612458A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • 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
    • 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/6245Protecting personal data, e.g. for financial or medical purposes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0442Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption

Abstract

The invention relates to a block chain technology, and provides a data processing method for a block chain, which comprises the following steps: receiving an encrypted transaction data set directionally distributed by a collection node through a distributor and a pre-constructed encryption subclass; decrypting the encrypted transaction data set to generate a plaintext transaction data set; performing broadcast calculation on the plaintext transaction data set to generate broadcast transaction information; carrying out private transaction on the broadcast transaction information by using a private contract to generate broadcast private information; carrying out contract processing on the broadcast private information by using an intelligent contract to generate a state data set; and carrying out consensus processing on the state data set and storing the state data set. Wherein the correlation data may be stored in the blockchain node. The invention also provides a data processing device, an electronic device and a computer readable storage medium for the block chain. The invention can solve the problems of low data processing speed and low data information privacy.

Description

Method and device for processing block chain data and readable storage medium
Technical Field
The present invention relates to the field of block chain technologies, and in particular, to a method and an apparatus for processing data of a block chain, an electronic device, and a readable storage medium.
Background
In recent years, block chain technology has been rapidly developed. The blockchain is essentially a novel database system with a time stamp, achieves 'decentralized' through technical means, and has the obvious characteristic that data is difficult to tamper, so that the blockchain technology is suitable for scenes with high requirements on the safety and reliability of the data. At present, the block chain has obtained better application effect in the fields of shopping, medical treatment and the like, and the application range is continuously expanded.
When private transaction is carried out in the existing block chain, the use of performance is limited, and in order to ensure the safety and integrity of data, the transaction often has the problem of delay, thereby causing the reduction of data processing speed; and, because of the transparent characteristic of the public, the privacy while resulting in the data processing is lower.
Disclosure of Invention
The invention provides a data processing method and device for a block chain, electronic equipment and a computer readable storage medium, and mainly aims to solve the problems of low data processing speed and low data information privacy. In order to achieve the above object, the present invention provides a data processing method for a block chain, which is applied to a participant node, and includes:
receiving an encrypted transaction data set directionally distributed by an acquisition node through a distributor and a pre-constructed encryption subclass, wherein the acquisition node is used for acquiring private transaction information and encrypting the private transaction information to obtain the encrypted transaction data set;
decrypting the encrypted transaction data set to generate a plaintext transaction data set;
performing broadcast calculation on the plaintext transaction data set to generate broadcast transaction information;
carrying out private transaction on the broadcast transaction information by using a private contract to generate broadcast private information;
carrying out contract processing on the broadcast private information by using an intelligent contract to generate a state data set;
and carrying out consensus processing on the state data set and storing the state data set.
Optionally, the encrypting the transaction data set is encrypted by a first public key, and the decrypting the encrypted transaction data set to generate a plaintext transaction data set includes:
calling a first secret key generator to generate an asymmetric decryption private key corresponding to the first public key, and performing password value reverse calculation on the encrypted transaction data set by using the private key to generate a decryption byte array set;
and carrying out byte conversion on the decrypted byte array set to generate a plaintext transaction data set.
Optionally, the storage structure of the broadcast transaction information is a directory structure, and performing private transaction on the broadcast transaction information by using a private contract to generate broadcast private information includes:
accessing a root directory in the directory structure;
acquiring mark information of a transaction mark and state information of a transaction state stored in the root directory and subdirectories of the root directory;
judging whether mark information and state information matched with the standard mark information and the standard state information in the private contract exist or not;
if yes, acquiring target transaction information corresponding to the mark information and the state information matched with the standard mark information and the standard state information in the private contract, and determining the target transaction information as filtering broadcast transaction information;
and performing word segmentation processing on the filtered broadcast transaction information to generate broadcast private information, wherein the broadcast private information comprises broadcast private name information, broadcast private digital information, broadcast private mark information and a plurality of transaction cleartexts.
Optionally, the performing contract processing on the broadcast private information by using an intelligent contract, and generating a state data set includes:
matching the plurality of transaction cleartexts in the broadcast private information with preset transaction cleartexts in the intelligent contract, wherein the preset transaction cleartexts comprise preset broadcast state name information, preset broadcast state digital information and preset broadcast state mark information;
acquiring a target transaction plaintext matched with a preset transaction plaintext in the intelligent contract from the plurality of transaction plaintexts;
determining the target transaction plaintext as filtering broadcast state information;
and combining at least two broadcast state information in the filtered broadcast state information to generate a state data set, wherein the state data set comprises different information combinations of broadcast state name information, broadcast state digital information and broadcast state mark information.
Optionally, the performing consensus processing and storing on the state data set includes:
calling a second secret key generator to generate an asymmetric encryption second public key, wherein the second public key and the first public key are generated by different functions in the second secret key generator;
verifying the authenticity of the state data set by using signature information obtained by decrypting the state data set and the second public key;
if the verification is passed, performing consensus analysis on the state data set to generate first consensus information and consensus state data;
and storing the first consensus information and the consensus state data into a database, and replacing the original consensus information in the database with the first consensus information.
A data processing method for a blockchain is applied to an acquisition node, and comprises the following steps:
obtaining private transaction information;
encrypting the private transaction information to generate an encrypted transaction data set;
acquiring a pre-constructed encryption subclass;
analyzing the encryption subclass through a distributor, and acquiring a distribution address from the encryption subclass;
and directionally distributing to a participant node according to the distribution address, wherein the participant node is used for decrypting and processing the encrypted transaction data set.
Optionally, the encrypting the private transaction information to generate an encrypted transaction data set includes:
calling a second secret key generator to generate an asymmetric encrypted first public key, and performing byte conversion on the private transaction information by using the first public key to generate an encrypted byte array set;
carrying out password value calculation on the encrypted byte array set to generate a password array set;
and combining the password array sets to generate an encrypted transaction data set.
In order to solve the above problem, the present invention also provides a data processing apparatus for a blockchain, the apparatus comprising:
the data receiving module is used for receiving an encrypted transaction data set directionally distributed by an acquisition node through a distributor and a pre-constructed encryption subclass, and the acquisition node is used for acquiring private transaction information and encrypting the private transaction information to obtain the encrypted transaction data set;
the data decryption module is used for decrypting the encrypted transaction data set to generate a plaintext transaction data set;
the broadcast calculation module is used for carrying out broadcast calculation on the plaintext transaction data set to generate broadcast transaction information;
the first transaction module is used for carrying out private transaction on the broadcast transaction information by using a private contract to generate broadcast private information;
the second transaction module is used for carrying out contract processing on the broadcast private information by using an intelligent contract to generate a state data set;
and the consensus processing module is used for performing consensus processing on the state data set and storing the consensus processing.
In order to solve the above problem, the present invention also provides an electronic device, including:
a memory storing at least one instruction; and
a processor executing instructions stored in the memory to implement the data processing method for a blockchain of any one of the above.
In order to solve the above problem, the present invention also provides a computer-readable storage medium including a storage data area storing data created according to use of a blockchain node and a storage program area storing a computer program, wherein the computer program is executed by a processor to implement the data processing method for a blockchain according to any one of the above.
In the embodiment of the invention, because the received encrypted transaction data set directionally distributed for the acquisition node is received, the processing speed of data is improved during data processing, and because the encrypted transaction data set is directionally distributed by the acquisition node, the accuracy and the efficiency of data transmission in the data processing process are improved; after the encrypted transaction data set is received, decryption is carried out, and the plaintext transaction data set generated through decryption is processed through the privacy contract and the intelligent contract, so that the verification efficiency and the privacy of data in the data processing process are further improved. Therefore, the data processing method, the data processing device, the electronic equipment and the computer readable storage medium for the block chain provided by the invention can achieve the purposes of improving the data processing speed and improving the data information privacy.
Drawings
Fig. 1 is a schematic flowchart of a data processing method for a blockchain according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a data processing method for a blockchain according to another embodiment of the present invention;
fig. 3 is a block diagram of a data processing apparatus for blockchains according to an embodiment of the present invention;
fig. 4 is a block diagram of a data processing apparatus for a blockchain according to another embodiment of the present invention;
fig. 5 is a schematic internal structural diagram of an electronic device implementing a data processing method for a blockchain according to an embodiment of the present invention;
the objects, features and advantages of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The invention provides a data processing method for a block chain, which is applied to a block chain system.
The invention provides a data processing method for a block chain. Fig. 1 is a schematic flow chart of a data processing method for a blockchain according to an embodiment of the present invention. The method may be applied to a participant node of a blockchain system that may include an acquisition node and a participant node, where the participant node may include one or more child nodes, e.g., the participant node includes a supplier node, a buyer node, and a supervisor node. The method may be performed by an apparatus, which may be implemented by software and/or hardware.
In detail, in this embodiment, the data processing method for a blockchain includes:
s11, receiving an encrypted transaction data set directionally distributed by a collection node through a distributor and a pre-constructed encryption subclass, wherein the collection node is used for acquiring private transaction information and encrypting the private transaction information to obtain the encrypted transaction data set.
In detail, in this embodiment, the acquisition node obtains the address to be distributed by parsing the pre-constructed encryption subclass through the distributor, and then distributes the encrypted transaction data set according to the distribution address, and the participant node receives the encrypted transaction data set.
In this embodiment, the distributor and the pre-constructed encryption subclass are used to call the distribution function to directly transmit the encrypted transaction data set, so that the data processing speed is increased.
And S12, decrypting the encrypted transaction data set to generate a plaintext transaction data set.
In detail, the encrypted transaction data set is encrypted by a first public key, the S12 includes:
calling a first secret key generator to generate an asymmetric decryption private key corresponding to the first public key, and performing password value reverse calculation on the encrypted transaction data set by using the private key to generate a decryption byte array set;
performing byte conversion on the decrypted byte array set to generate a plaintext transaction data set
Further, the performing a cryptographic value back calculation on the encrypted transaction data set using the private key comprises:
message stuffing the encrypted transaction data set with a hashing algorithm, the message stuffing comprising: first padding a "1" and a number of "0" to make the padded encrypted transaction data set length modulo 1024 and 896 congruent, the number of padding bits being 0-1023, the length of the pre-padding message being appended to the back of the padding message in a 128-bit field, the resulting value being the length of the pre-padding message.
Further, initializing a link variable of the encrypted transaction data set after message padding, storing an intermediate result and a final result generated by the initialization in a 512-bit buffer, representing the buffer by 8 64-bit registers A, B, C, D, E, F, G, H, and storing the link variable of the encrypted transaction data set after initialization in the 8 64-bit registers.
Further, performing a main loop operation on the initialized encrypted transaction data set, the main loop operation comprising: processing the encrypted transaction data set by using 1024-bit grouping as a unit, performing 80-step circular operation, taking a value A, B, C, D, E, F, G, H of a 512-bit buffer area as input in each iteration, wherein the value is obtained from the calculation result of the last iteration compression, different message words and constants in the encrypted transaction data set are adopted in each step of calculation, and after the N1024-bit groupings of the messages are processed, a 512-bit link variable output by the Nth iteration compression is the final password value.
And S13, performing broadcast calculation on the plaintext transaction data set to generate broadcast transaction information.
Further, the S13 includes:
dividing a plaintext transaction data set into n arrays with inconsistent dimensionalities;
performing complement calculation on the n arrays with different dimensions to generate n arrays with the same dimensions;
and combining the n arrays with consistent dimensionalities to generate broadcast transaction information.
And S14, carrying out private transaction on the broadcast transaction information by using a private contract to generate the broadcast private information.
Further, the S14 includes:
the storage structure of the broadcast transaction information is a directory structure, and a root directory in the directory structure is accessed;
acquiring mark information of a transaction mark and state information of a transaction state stored in the root directory and subdirectories of the root directory;
judging whether mark information and state information matched with the standard mark information and the standard state information in the private contract exist or not;
if the broadcast private information exists, acquiring target transaction information corresponding to the mark information and the state information matched with the standard mark information and the standard state information in the private contract, determining that the target transaction information is filtering broadcast transaction information, and performing word segmentation processing on the filtering broadcast transaction information to generate broadcast private information, wherein the broadcast private information comprises broadcast private name information, broadcast private digital information, broadcast private mark information and a plurality of transaction cleartexts.
And S15, carrying out contract processing on the broadcast private information by using an intelligent contract to generate a state data set.
Preferably, the S15 includes:
matching the plurality of transaction cleartexts in the broadcast private information with preset transaction cleartexts in the intelligent contract, wherein the preset transaction cleartexts comprise preset broadcast state name information, preset broadcast state digital information and preset broadcast state mark information;
acquiring a target transaction plaintext matched with a preset transaction plaintext in the intelligent contract from the plurality of transaction plaintexts;
determining the target transaction plaintext as filtering broadcast state information;
and combining at least two broadcast state information in the filtered broadcast state information to generate a state data set, wherein the state data set comprises different information combinations of broadcast state name information, broadcast state digital information and broadcast state mark information.
And S16, performing consensus processing on the state data set and storing the state data set.
In detail, the S16 includes:
calling a second secret key generator to generate an asymmetric encryption second public key, wherein the second public key and the first public key are generated by different functions in the second secret key generator, verifying the authenticity of the state data set by using signature information obtained by decrypting the state data set and the second public key, performing consensus analysis on the state data set if the authenticity of the state data set passes the verification, generating first consensus information and consensus state data, storing the first consensus information and the consensus state data into a database, and replacing the first consensus information with original consensus information in the database.
In this embodiment of the present invention, when the participant node performs the consensus on the state data, the participant node performs the consensus on the state data set that needs to be consensus.
In an optional embodiment, the supervisory node, the buyer node, and the supplier node in the participant perform signature processing first, and after receiving a consensus request, the supervisory node, the buyer node, and the supplier node in the participant verify the signature in the state data set, and only if the condition attribute is met in the verification process, the state data set is valid, and when more than 50% of the state data sets are consistent after the consensus processing, the state data set is stored in a database; otherwise, discarding the state data set.
In the embodiment of the invention, the privacy of the transaction information is improved during data processing because the received encrypted transaction data set directionally distributed for the acquisition node, and the accuracy and the efficiency of data transmission in the data processing process are improved because the encrypted transaction data set is directionally distributed by the acquisition node; after receiving the encrypted transaction data set, decrypting the encrypted transaction data set, and processing the plaintext transaction data set generated by decryption through the private contract and the intelligent contract, so that the verification efficiency and the privacy of data in the data processing process are further improved, and therefore the purposes of improving the data processing speed and improving the privacy of transaction information are achieved.
Referring to fig. 2, fig. 2 is a flowchart illustrating a data processing method for a block chain according to another embodiment of the present invention. The method can be applied to the acquisition nodes of the block chain system. The method may be performed by an apparatus, which may be implemented by software and/or hardware.
In detail, in an embodiment of the present invention, the data processing method for a block chain includes:
and S21, obtaining the private transaction information.
In this embodiment, the blockchain transaction system includes an acquisition node and a participant node, and the acquisition node acquires a private transaction information set of a user, where the participant node may include at least two nodes, such as a supplier node, a buyer node, and a monitoring node.
For example, the buyer node represents mobile, internet, telecommunication, the supplier node represents apple, nokia, the supervisory node represents government, and any one of the purchases may involve the buyer and the supplier, the supervisor, or only the buyer and the supplier.
In this embodiment, the private transaction information is information when a private transaction is performed.
S22, the private transaction information is encrypted to generate an encrypted transaction data set.
In detail, the encrypting the private transaction information to generate an encrypted transaction data set includes: calling a second secret key generator to generate an asymmetric encrypted first public key, performing byte conversion on the private transaction information by using the first public key to generate an encrypted byte array set, performing password value calculation on the encrypted byte array set to generate a password array set, and combining the password array set to generate an encrypted transaction data set.
And S23, acquiring the pre-constructed encryption subclass.
In the embodiment of the invention, the encryption subclass is encoded and pre-constructed in the httpServlet class, so that the defect that each request and response need to be processed by a different class is overcome.
S24, analyzing the encryption subclass through a distributor, and acquiring a distribution address from the encryption subclass;
in the embodiment of the invention, the encryption subclass is analyzed through a distributor, and the encryption subclass comprises a distribution address of the encrypted transaction data set. The distributor is a library containing a variety of functions and methods.
And S25, directionally distributing to a participant node according to the distribution address, wherein the participant node is used for decrypting and processing the encrypted transaction data set.
Further, directionally distributing the encrypted transaction data set to participant nodes according to the distribution address, comprising: and acquiring a preset URL address, and transmitting the encrypted transaction data set to the participant node or a server to which the participant node belongs through the URL address.
In this embodiment, the server to which the participant node belongs is the server including the participant node.
In the embodiment, by acquiring the private transaction information and encrypting the private transaction information, the privacy of the transaction information during data processing is improved, the encrypted transaction data set is directionally distributed, and the accuracy and the efficiency of data transmission in the data processing process are improved.
Referring to fig. 3, fig. 3 is a functional block diagram of a data processing apparatus for a block chain according to an embodiment of the present invention.
The data processing apparatus 100 for a block chain according to the present invention may be installed in an electronic device. According to the implemented functions, the data processing apparatus for the blockchain may include a data receiving module 101, a data decrypting module 102, a broadcast calculating module 103, a first transaction module 104, a second transaction module 105, and a consensus processing module 106. A module according to the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the data receiving module 101 is configured to receive an encrypted transaction data set directionally distributed by an acquisition node through a distributor and a pre-established encryption subclass, where the acquisition node is configured to obtain private transaction information and encrypt the private transaction information to obtain the encrypted transaction data set;
the data decryption module 102 is configured to decrypt the encrypted transaction data set to generate a plaintext transaction data set;
the broadcast calculation module 103 is configured to perform broadcast calculation on the plaintext transaction data set to generate broadcast transaction information;
the first transaction module 104 is configured to perform private transaction on the broadcast transaction information by using a private contract, so as to generate broadcast private information;
the second transaction module 105 is configured to perform contract processing on the broadcast private information by using an intelligent contract to generate a state data set;
the consensus processing module 106 is configured to perform consensus processing on the state data set and store the result.
In detail, the specific implementation steps of each module of the data processing device for the block chain are as follows:
the data receiving module 101 receives an encrypted transaction data set directionally distributed by a collection node through a distributor and a pre-constructed encryption subclass, wherein the collection node is used for acquiring private transaction information and encrypting the private transaction information to obtain the encrypted transaction data set.
In detail, in this embodiment, the acquisition node obtains the address to be distributed by parsing the pre-constructed encryption subclass through the distributor, and then distributes the encrypted transaction data set according to the distribution address, and the participant node receives the encrypted transaction data set.
In this embodiment, the distributor and the pre-constructed encryption subclass are used to call the distribution function to directly transmit the encrypted transaction data set, so that the data processing speed is increased.
The data decryption module 102 decrypts the encrypted transaction data set to generate a plaintext transaction data set.
In detail, the encrypting the transaction data set is encrypted by a first public key, and the decrypting the encrypting the transaction data set to generate a plaintext transaction data set includes:
calling a first secret key generator to generate an asymmetric decryption private key corresponding to the first public key, and performing password value reverse calculation on the encrypted transaction data set by using the private key to generate a decryption byte array set;
and carrying out byte conversion on the decrypted byte array set to generate a plaintext transaction data set.
Further, the performing a cryptographic value back calculation on the encrypted transaction data set using the private key comprises:
message stuffing the encrypted transaction data set with a hashing algorithm, the message stuffing comprising: first padding a "1" and a number of "0" to make the padded encrypted transaction data set length modulo 1024 and 896 congruent, the number of padding bits being 0-1023, the length of the pre-padding message being appended to the back of the padding message in a 128-bit field, the resulting value being the length of the pre-padding message.
Further, initializing a link variable of the encrypted transaction data set after message padding, storing an intermediate result and a final result generated by the initialization in a 512-bit buffer, representing the buffer by 8 64-bit registers A, B, C, D, E, F, G, H, and storing the link variable of the encrypted transaction data set after initialization in the 8 64-bit registers.
Further, performing a main loop operation on the initialized encrypted transaction data set, the main loop operation comprising: processing the encrypted transaction data set by using 1024-bit grouping as a unit, performing 80-step circular operation, taking a value A, B, C, D, E, F, G, H of a 512-bit buffer area as input in each iteration, wherein the value is obtained from the calculation result of the last iteration compression, different message words and constants in the encrypted transaction data set are adopted in each step of calculation, and after the N1024-bit groupings of the messages are processed, a 512-bit link variable output by the Nth iteration compression is the final password value.
The broadcast calculation module 103 performs broadcast calculation on the plaintext transaction data set to generate broadcast transaction information, and performs private transaction on the broadcast transaction information by using a private contract to generate broadcast private information.
Further, the performing broadcast computation on the plaintext transaction data set to generate broadcast transaction information includes:
dividing a plaintext transaction data set into n arrays with inconsistent dimensionalities;
performing complement calculation on the n arrays with different dimensions to generate n arrays with the same dimensions;
and combining the n arrays with consistent dimensionalities to generate broadcast transaction information.
The first transaction module 104 performs private transaction on the broadcast transaction information by using a private contract to generate broadcast private information.
Further, the performing private transaction on the broadcast transaction information by using a private contract, and generating the broadcast private information includes:
the storage structure of the broadcast transaction information is a directory structure, and a root directory in the directory structure is accessed;
acquiring mark information of a transaction mark and state information of a transaction state stored in the root directory and subdirectories of the root directory;
judging whether mark information and state information matched with the standard mark information and the standard state information in the private contract exist or not;
if the broadcast private information exists, acquiring target transaction information corresponding to the mark information and the state information matched with the standard mark information and the standard state information in the private contract, determining that the target transaction information is filtering broadcast transaction information, and performing word segmentation processing on the filtering broadcast transaction information to generate broadcast private information, wherein the broadcast private information comprises broadcast private name information, broadcast private digital information, broadcast private mark information and a plurality of transaction cleartexts.
The second transaction module 105 performs contract processing on the broadcast private information using an intelligent contract to generate a state data set.
Preferably, the performing contract processing on the broadcast private information by using an intelligent contract, and generating a state data set includes:
matching the plurality of transaction cleartexts in the broadcast private information with preset transaction cleartexts in the intelligent contract, wherein the preset transaction cleartexts comprise preset broadcast state name information, preset broadcast state digital information and preset broadcast state mark information;
acquiring a target transaction plaintext matched with a preset transaction plaintext in the intelligent contract from the plurality of transaction plaintexts;
determining the target transaction plaintext as filtering broadcast state information;
and combining at least two broadcast state information in the filtered broadcast state information to generate a state data set, wherein the state data set comprises different information combinations of broadcast state name information, broadcast state digital information and broadcast state mark information.
The consensus processing module 106 performs consensus processing on the state data set and stores the consensus processing.
In detail, the consensus processing and storing the state data set comprises:
calling a second secret key generator to generate an asymmetric encryption second public key, wherein the second public key and the first public key are generated by different functions in the second secret key generator, verifying the authenticity of the state data set by using signature information obtained by decrypting the state data set and the second public key, performing consensus analysis on the state data set if the authenticity of the state data set passes the verification, generating first consensus information and consensus state data, storing the first consensus information and the consensus state data into a database, and replacing the first consensus information with original consensus information in the database.
In the embodiment of the present invention, when the participant node performs the consensus processing on the status data, signature processing needs to be performed on the status data set that needs to be consensus, the supervision node, the purchasing node, and the supplier node in the participant node first, after the supervision node, the purchasing node, and the supplier node in the participant receive a consensus request, the signature in the status data set is verified, only if the condition attribute is met in the verification process is valid, and when more than 50% of the status data sets are consistent after the consensus processing, the status data set is stored in a database; otherwise, discarding the state data set.
In the embodiment of the invention, the privacy of the transaction information is improved during data processing because the received encrypted transaction data set directionally distributed for the acquisition node, and the accuracy and the efficiency of data transmission in the data processing process are improved because the encrypted transaction data set is directionally distributed by the acquisition node; after receiving the encrypted transaction data set, decrypting the encrypted transaction data set, and processing the plaintext transaction data set generated by decryption through the privacy contract and the intelligent contract, so that the verification efficiency and the privacy of data in the data processing process are further improved, and therefore the purposes of improving the data processing speed and improving the privacy of data information are achieved. The invention can also be applied to the fields of intelligent medical treatment, intelligent logistics and the like, thereby promoting the construction of intelligent cities.
Referring to fig. 4, fig. 4 is a functional block diagram of a data processing apparatus for a blockchain according to another embodiment of the present invention.
The data processing apparatus 200 for a block chain according to the present invention may be installed in an electronic device. According to the implemented functions, the data processing device for the blockchain may include a data acquisition module 201, a data encryption module 202, and a data distribution module 203. A module according to the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the data obtaining module 201 is configured to obtain private transaction information.
In this embodiment, the private transaction information is information when a private transaction is performed.
The transaction may be participated in by multiple parties. For example, the supplier, the buyer and the supervisor participate, wherein the buyer represents mobile, internet and telecommunication, the supplier represents apple and Nokia, the supervisor represents government, and the buyer and the supplier and the supervisor can participate in any one purchase or only participate in the buyer and the supplier.
And the data encryption module 202 is configured to encrypt the private transaction information, generate an encrypted transaction data set, and obtain a pre-constructed encryption subclass.
In detail, the encrypting the private transaction information to generate an encrypted transaction data set includes: calling a second secret key generator to generate an asymmetric encrypted first public key, performing byte conversion on the private transaction information by using the first public key to generate an encrypted byte array set, performing password value calculation on the encrypted byte array set to generate a password array set, and combining the password array set to generate an encrypted transaction data set.
In the embodiment of the invention, the encryption subclass is encoded and pre-constructed in the httpServlet class, so that the defect that each request and response need to be processed by a different class is overcome.
The data distribution module 203 is configured to analyze the encryption subclass through a distributor, obtain a distribution address from the encryption subclass, and directionally distribute the distribution address to a participant node according to the distribution address, where the participant node is configured to decrypt and process the encrypted transaction data set.
In the embodiment of the invention, the encryption subclass is analyzed through a distributor, and the encryption subclass comprises a distribution address of the encrypted transaction data set. The distributor is a library containing a variety of functions and methods.
Further, directionally distributing the encrypted transaction data set to participant nodes according to the distribution address, comprising: and acquiring a preset URL address, and transmitting the encrypted transaction data set to the participant node or a server to which the participant node belongs through the URL address.
In this embodiment, the server to which the participant node belongs is the server including the participant node.
In the embodiment, by acquiring the private transaction information and encrypting the private transaction information, the privacy of the transaction information during data processing is improved, the encrypted transaction data set is directionally distributed, and the accuracy and the efficiency of data transmission in the data processing process are improved.
Fig. 5 is a schematic structural diagram of an electronic device implementing the data processing method for a blockchain according to the present invention.
The electronic device 1 may comprise a processor 10, a memory 11 and a bus, and may further comprise a computer program, such as a data processing program 12 for a blockchain, stored in the memory 11 and executable on the processor 10.
The memory 11 includes at least one type of readable storage medium, which includes flash memory, removable hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. Further, the computer-readable storage medium mainly includes a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the blockchain node, and the like.
The memory 11 may in some embodiments be an internal storage unit of the electronic device 1, such as a removable hard disk of the electronic device 1. The memory 11 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device 1. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device 1. The memory 11 may be used not only for storing application software installed in the electronic device 1 and various types of data, such as codes for data processing of a block chain, etc., but also for temporarily storing data that has been output or is to be output.
The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device 1 by running or executing programs or modules (for example, performing data processing for a block chain, etc.) stored in the memory 11 and calling data stored in the memory 11.
The bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like.
Fig. 5 only shows an electronic device with components, and it will be understood by a person skilled in the art that the structure shown in fig. 5 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than shown, or a combination of certain components, or a different arrangement of components.
For example, although not shown, the electronic device 1 may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so as to implement functions of charge management, discharge management, power consumption management, and the like through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device 1 may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
Further, the electronic device 1 may further include a network interface, and optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a bluetooth interface, etc.), which are generally used for establishing a communication connection between the electronic device 1 and other electronic devices.
Optionally, the electronic device 1 may further comprise a user interface, which may be a Display (Display), an input unit (such as a Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the electronic device 1 and for displaying a visualized user interface, among other things.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The data processing 12 for the blockchain stored by the memory 11 in the electronic device 1 is a combination of instructions that, when executed in the processor 10, may implement:
receiving an encrypted transaction data set directionally distributed by an acquisition node through a distributor and a pre-constructed encryption subclass, wherein the acquisition node is used for acquiring private transaction information and encrypting the private transaction information to obtain the encrypted transaction data set;
decrypting the encrypted transaction data set to generate a plaintext transaction data set;
performing broadcast calculation on the plaintext transaction data set to generate broadcast transaction information;
carrying out private transaction on the broadcast transaction information by using a private contract to generate broadcast private information;
carrying out contract processing on the broadcast private information by using an intelligent contract to generate a state data set;
and carrying out consensus processing on the state data set and storing the state data set.
Alternatively, the data processing 12 for the block chain stored by the memory 11 in the electronic device 1 is a combination of a plurality of instructions, which when executed in the processor 10, can implement:
obtaining private transaction information;
encrypting the private transaction information to generate an encrypted transaction data set;
directionally distributing the encrypted transaction data set to a participant node to cause the participant node to decrypt and process the encrypted transaction data set.
Specifically, the specific implementation method of the processor 10 for the instruction may refer to the description of the relevant steps in the embodiment corresponding to fig. 1 or fig. 2, which is not repeated herein.
Further, the integrated modules/units of the electronic device 1, if implemented in the form of software functional units and sold or used as separate products, may be stored in a non-volatile computer-readable storage medium. The computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. A data processing method for blockchains, applied to a participant node, the method comprising:
receiving an encrypted transaction data set directionally distributed by an acquisition node through a distributor and a pre-constructed encryption subclass, wherein the acquisition node is used for acquiring private transaction information and encrypting the private transaction information to obtain the encrypted transaction data set;
decrypting the encrypted transaction data set to generate a plaintext transaction data set;
performing broadcast calculation on the plaintext transaction data set to generate broadcast transaction information;
carrying out private transaction on the broadcast transaction information by using a private contract to generate broadcast private information;
carrying out contract processing on the broadcast private information by using an intelligent contract to generate a state data set;
and carrying out consensus processing on the state data set and storing the state data set.
2. The data processing method for a blockchain of claim 1, wherein the encrypted transaction data set is encrypted by a first public key, and wherein decrypting the encrypted transaction data set to generate a clear transaction data set comprises:
calling a first secret key generator to generate an asymmetric decryption private key corresponding to the first public key, and performing password value reverse calculation on the encrypted transaction data set by using the private key to generate a decryption byte array set;
and carrying out byte conversion on the decrypted byte array set to generate a plaintext transaction data set.
3. The data processing method for the blockchain according to claim 1, wherein the storage structure of the broadcast transaction information is a directory structure, and performing a private transaction on the broadcast transaction information by using a private contract to generate broadcast private information includes:
accessing a root directory in the directory structure;
acquiring mark information of a transaction mark and state information of a transaction state stored in the root directory and subdirectories of the root directory;
judging whether mark information and state information matched with the standard mark information and the standard state information in the private contract exist or not;
if yes, acquiring target transaction information corresponding to the mark information and the state information matched with the standard mark information and the standard state information in the private contract, and determining the target transaction information as filtering broadcast transaction information;
and performing word segmentation processing on the filtered broadcast transaction information to generate broadcast private information, wherein the broadcast private information comprises broadcast private name information, broadcast private digital information, broadcast private mark information and a plurality of transaction cleartexts.
4. The data processing method for a blockchain according to claim 3, wherein the contract-processing the broadcast privacy information using an intelligent contract, the generating a state data set comprising:
matching the plurality of transaction cleartexts in the broadcast private information with preset transaction cleartexts in the intelligent contract, wherein the preset transaction cleartexts comprise preset broadcast state name information, preset broadcast state digital information and preset broadcast state mark information;
acquiring a target transaction plaintext matched with a preset transaction plaintext in the intelligent contract from the plurality of transaction plaintexts;
determining the target transaction plaintext as filtering broadcast state information;
and combining at least two broadcast state information in the filtered broadcast state information to generate a state data set, wherein the state data set comprises different information combinations of broadcast state name information, broadcast state digital information and broadcast state mark information.
5. The data processing method for blockchain according to claim 1, wherein the consensus processing and storing the state data set comprises:
calling a second secret key generator to generate an asymmetric encryption second public key, wherein the second public key and the first public key are generated by different functions in the second secret key generator;
verifying the authenticity of the state data set by using signature information obtained by decrypting the state data set and the second public key;
if the verification is passed, performing consensus analysis on the state data set to generate first consensus information and consensus state data;
storing the first consensus information and the consensus status data in a database, and replacing original consensus information in the database with the first consensus information.
6. A method for blockchain, applied to an acquisition node, the method comprising:
obtaining private transaction information;
encrypting the private transaction information to generate an encrypted transaction data set;
acquiring a pre-constructed encryption subclass;
analyzing the encryption subclass through a distributor, and acquiring a distribution address from the encryption subclass;
and directionally distributing to a participant node according to the distribution address, wherein the participant node is used for decrypting and processing the encrypted transaction data set.
7. The data processing method for a blockchain of claim 6, wherein the encrypting the private transaction information to generate an encrypted transaction data set comprises:
calling a second secret key generator to generate an asymmetric encrypted first public key, and performing byte conversion on the private transaction information by using the first public key to generate an encrypted byte array set;
carrying out password value calculation on the encrypted byte array set to generate a password array set;
and combining the password array sets to generate an encrypted transaction data set.
8. A data processing apparatus for blockchains, the apparatus comprising:
the data receiving module is used for receiving an encrypted transaction data set directionally distributed by an acquisition node through a distributor and a pre-constructed encryption subclass, and the acquisition node is used for acquiring private transaction information and encrypting the private transaction information to obtain the encrypted transaction data set;
the data decryption module is used for decrypting the encrypted transaction data set to generate a plaintext transaction data set;
the broadcast calculation module is used for carrying out broadcast calculation on the plaintext transaction data set to generate broadcast transaction information;
the first transaction module is used for carrying out private transaction on the broadcast transaction information by using a private contract to generate broadcast private information;
the second transaction module is used for carrying out contract processing on the broadcast private information by using an intelligent contract to generate a state data set;
and the consensus processing module is used for performing consensus processing on the state data set and storing the consensus processing.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a data processing method for a blockchain as claimed in any one of claims 1 to 5 or claims 6 to 7.
10. A computer-readable storage medium comprising a stored data area storing data created according to the use of blockchain nodes and a stored program area storing a computer program, characterized in that the computer program, when executed by a processor, implements a data processing method for a blockchain according to any one of claims 1 to 5 or claims 6 to 7.
CN202010360823.0A 2020-04-30 2020-04-30 Method and device for processing block chain data and readable storage medium Pending CN111612458A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010360823.0A CN111612458A (en) 2020-04-30 2020-04-30 Method and device for processing block chain data and readable storage medium
PCT/CN2020/106024 WO2021217939A1 (en) 2020-04-30 2020-07-31 Data processing method and apparatus for blockchain, and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010360823.0A CN111612458A (en) 2020-04-30 2020-04-30 Method and device for processing block chain data and readable storage medium

Publications (1)

Publication Number Publication Date
CN111612458A true CN111612458A (en) 2020-09-01

Family

ID=72196181

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010360823.0A Pending CN111612458A (en) 2020-04-30 2020-04-30 Method and device for processing block chain data and readable storage medium

Country Status (2)

Country Link
CN (1) CN111612458A (en)
WO (1) WO2021217939A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112104747A (en) * 2020-10-30 2020-12-18 广州市玄武无线科技股份有限公司 Request response system based on chain processing
CN112118087A (en) * 2020-09-18 2020-12-22 上海计算机软件技术开发中心 Cross-chain contract compression encryption system and method

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114520726A (en) * 2022-03-21 2022-05-20 中国工商银行股份有限公司 Processing method and device based on block chain data, processor and electronic equipment

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019106612A (en) * 2017-12-12 2019-06-27 株式会社イーグルツリー Cryptocurrency mining system
CN109547407B (en) * 2018-10-16 2024-01-12 国际商业机器公司 Whole-process tracking method for environment monitoring data and block chain link points
CN110059970A (en) * 2019-04-23 2019-07-26 南京工程学院 A kind of network system method of commerce based on block chain technology
CN110197082A (en) * 2019-05-31 2019-09-03 联想(北京)有限公司 Data processing method, data processing equipment and computer system
CN111008385A (en) * 2019-11-21 2020-04-14 山东爱城市网信息技术有限公司 Method, device and medium for constructing privacy transaction in block chain super account book
CN111062716B (en) * 2019-11-29 2021-06-22 支付宝(杭州)信息技术有限公司 Method and device for generating block chain signature data and block chain transaction initiating system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112118087A (en) * 2020-09-18 2020-12-22 上海计算机软件技术开发中心 Cross-chain contract compression encryption system and method
CN112104747A (en) * 2020-10-30 2020-12-18 广州市玄武无线科技股份有限公司 Request response system based on chain processing

Also Published As

Publication number Publication date
WO2021217939A1 (en) 2021-11-04

Similar Documents

Publication Publication Date Title
CN112751852B (en) Data transmission method and related equipment
CN111612458A (en) Method and device for processing block chain data and readable storage medium
CN112732297B (en) Method and device for updating federal learning model, electronic equipment and storage medium
CN113055380B (en) Message processing method and device, electronic equipment and medium
CN111695097A (en) Login checking method and device and computer readable storage medium
CN114389889B (en) File full life cycle management method and device based on block chain technology
CN113112252B (en) Resource transfer method and device based on block chain, electronic equipment and storage medium
CN113822675A (en) Block chain based message processing method, device, equipment and storage medium
CN113420049A (en) Data circulation method and device, electronic equipment and storage medium
CN114826553A (en) Cloud storage data security protection method and device based on group signature and homomorphic encryption
CN115048664A (en) Data security storage method, device, equipment and medium based on solid state disk
CN115374150A (en) Character string data query method and device, electronic equipment and storage medium
CN114553532A (en) Data secure transmission method and device, electronic equipment and storage medium
CN114417374A (en) Intelligent contract business card method, device, equipment and storage medium based on block chain
CN112217639B (en) Data encryption sharing method and device, electronic equipment and computer storage medium
CN111563268B (en) Data encryption method and device based on matrix operation and storage medium
CN115860768B (en) Source tracing method and device based on blockchain and electronic equipment thereof
CN114760073B (en) Block chain-based warehouse commodity distribution method and device, electronic equipment and medium
CN115643090A (en) Longitudinal federal analysis method, device, equipment and medium based on privacy retrieval
CN113918517A (en) Multi-type file centralized management method, device, equipment and storage medium
CN116684077B (en) Carbon emission monitoring method and device based on carbon platform
CN113642020B (en) Dynamic encryption method and device for configuration file, electronic equipment and storage medium
CN115473739A (en) Data processing method, device and equipment based on block chain and storage medium
CN114584283A (en) Privacy protection method, device, equipment and storage medium for blacklist matching
CN116401253A (en) Data interconnection collision method, device, equipment and medium based on artificial intelligence

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