CN110264207A - Block chain separation processing method and system - Google Patents
Block chain separation processing method and system Download PDFInfo
- Publication number
- CN110264207A CN110264207A CN201910751516.2A CN201910751516A CN110264207A CN 110264207 A CN110264207 A CN 110264207A CN 201910751516 A CN201910751516 A CN 201910751516A CN 110264207 A CN110264207 A CN 110264207A
- Authority
- CN
- China
- Prior art keywords
- transaction
- cryptographic hash
- node
- verifying
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Payment architectures, schemes or protocols
- G06Q20/38—Payment protocols; Details thereof
- G06Q20/382—Payment protocols; Details thereof insuring higher security of transaction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Payment architectures, schemes or protocols
- G06Q20/38—Payment protocols; Details thereof
- G06Q20/40—Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
- G06Q20/401—Transaction verification
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Databases & Information Systems (AREA)
- Finance (AREA)
- Strategic Management (AREA)
- General Business, Economics & Management (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Computing Systems (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
Abstract
The application provides a kind of block chain separation processing method and system, is related to block chain technical field.This method comprises: the transaction node in chain transaction initiates transaction, the transaction data based on the transaction, which calculates, obtains transaction cryptographic Hash, and the transaction data and the transaction cryptographic Hash are sent to validation chain;Verifying node in the validation chain is based on the transaction data and the transaction cryptographic Hash verifies the transaction;When the transaction passes through verifying, the transaction data, the transaction cryptographic Hash are sent to storage chains by the verifying node;Memory node in the storage chains stores the transaction data.The block chain separation processing method reduces the computing load of block chain node, improves treatment effeciency.
Description
Technical field
This application involves block chain technical fields, in particular to a kind of block chain separation processing method and system.
Background technique
Nowadays the development of block chain technology is getting faster, and block chain technology is also applied to rapidly every field, is being based on
Block chain requires to store a large amount of data within a block whens realizing transaction record, product traceability etc..Existing block chain skill
Art is usually to realize storage, verifying and data-transformation facility by the same block chain, so that the block chain is certain
Node data treating capacity is larger, and load is more serious, and treatment effeciency is low.
Summary of the invention
In view of this, the embodiment of the present application is designed to provide a kind of block chain separation processing method and system, to change
Kind block chain data processing amount in the prior art is larger, loads more serious, the low problem for the treatment of effeciency.
The embodiment of the present application provides a kind of block chain separation processing method, and the block chain separation processing method includes:
Transaction node in chain transaction initiates transaction, and the transaction data based on the transaction, which calculates, obtains transaction cryptographic Hash, and will be described
Transaction data and the transaction cryptographic Hash are sent to validation chain;Verifying node in the validation chain be based on the transaction data and
The transaction cryptographic Hash verifies the transaction;When the transaction passes through verifying, the verifying node is by the transaction
Data, the transaction cryptographic Hash are sent to storage chains;Memory node in the storage chains stores the transaction data.
During above-mentioned realization, by chain transaction, validation chain and storage chains be respectively completed transaction initiate, transaction verification and
The work of data storage, thus by the job sharing to a plurality of chain carried out originally by single block chain, to reduce area
The load of block chain node improves the efficiency of data transmission and processing.
Optionally, the transaction node in chain transaction initiates transaction, and is handed over based on the calculating of the transaction data of the transaction
The transaction data and the transaction cryptographic Hash are sent to validation chain by easy cryptographic Hash, comprising: first in the chain transaction hands over
Easy node initiates transaction;The current calculating speed of the second transaction node in the chain transaction, the network with the validation chain
When connection state meets preset condition, the transaction data is sent to second transaction node by first transaction node;
Second transaction node is based on the transaction data and calculates to obtain the transaction cryptographic Hash, and by the transaction data and described
Transaction cryptographic Hash is sent to the validation chain.
During above-mentioned realization, is chosen in chain transaction situations such as based on calculating speed, Network status and carry out transaction Kazakhstan
The transaction node that uncommon value calculates, ensure that the calculating speed of transaction cryptographic Hash, optimizes the utilization rate of calculation resources.
Optionally, the transaction data and the transaction cryptographic Hash are sent to the validation chain, comprising: described second hands over
Easy node encrypts the transaction data and the transaction cryptographic Hash using private key, and the encryption data that encryption is obtained is sent
To the validation chain.
Optionally, the verifying node in the validation chain is based on the transaction data and the transaction cryptographic Hash to the friendship
It is easily verified, comprising: the first verifying node in the validation chain receives the encryption data, and the encryption data is wide
It broadcasts to other verifying nodes in the validation chain;Each verifying node in the validation chain uses second transaction node
Public key the encryption data is decrypted, obtain the transaction data and the transaction cryptographic Hash;Each verifying node base
The transaction is verified in the transaction data and the transaction cryptographic Hash.
During above-mentioned realization, transaction cryptographic Hash is confirmed by asymmetric encryption mode between transaction node and validation chain
Sender identity it is whether legal, improve the safety of transaction authentication.
Optionally, the transaction data includes that transaction initiator, transaction acceptance side, transaction amount and exchange hour stab, often
A verifying node is based on the transaction data and the transaction cryptographic Hash verifies the transaction, comprising: each verifying section
Point is obtained verifying transaction and is breathed out based on the transaction initiator, the transaction acceptance side, the transaction amount, exchange hour stamp
Uncommon value;It is identical as the transaction cryptographic Hash in verifying transaction cryptographic Hash, and the transaction initiator and the transaction acceptance
The address of side is effective address, when the exchange hour stamp and the transaction amount meet preset rules, determines that the transaction is logical
Cross verifying.
During above-mentioned realization, verifying node is respectively to transaction initiator, transaction acceptance side, transaction amount and when trading
Between stamp verified after, then to based on transaction data to transaction cryptographic Hash verify, when above-mentioned various aspects pass through verifying
The transaction is determined by verifying, to ensure that the comprehensive and accuracy of transaction verification.
Optionally, the transaction data, the transaction cryptographic Hash are sent to storage chains by verifying node, comprising: described
When determining that the transaction passes through verifying greater than the verifying node of preset quantity in validation chain, the verifying node is by the number of deals
Storage chains are sent to according to, the transaction cryptographic Hash.
During above-mentioned realization, after multiple verifying nodes complete verifying to transaction, just determine that the transaction passes through verifying
It is able to carry out storage, further improves the safety of transaction.
Optionally, the memory node in the storage chains stores the transaction data, the transaction cryptographic Hash, packet
Include: the first memory node in the storage chains receives the transaction cryptographic Hash, the number of deals that the verifying node is sent
According to;The first memory node in the storage chains is packaged the transaction cryptographic Hash, obtains storage cryptographic Hash;Described first
The transaction data and the storage cryptographic Hash are sent to other memory nodes in the storage chains by memory node;It is described to deposit
Each memory node in chain is stored up after receiving the transaction data and the storage cryptographic Hash, by the transaction data and institute
It states in storage cryptographic Hash deposit block chain.
During above-mentioned realization, storage chains will trade after cryptographic Hash is packaged and with transaction data be respectively stored in different data
In library, and the specific data structure by the transaction cryptographic Hash after being packaged as transaction data indexes, and deposits to improve data
Storage and search efficiency;Transaction data and storage cryptographic Hash are broadcasted in all memory nodes of storage chains simultaneously, so that each
Memory node by the local database of transaction data and storage cryptographic Hash deposit, improves transaction security.
The embodiment of the present application also provides a kind of block chain separation processing system, the system comprises: chain transaction, for leading to
It crosses transaction node and initiates transaction, transaction data based on the transaction, which calculates, obtains transaction cryptographic Hash, and by the transaction data
Validation chain is sent to the transaction cryptographic Hash;The validation chain, for being based on the transaction data and institute by verifying node
It states transaction cryptographic Hash to verify the transaction, and when the transaction passes through verifying, the verifying node is by the transaction
Data, the transaction cryptographic Hash are sent to storage chains;The storage chains, for being carried out by memory node to the transaction data
Storage.
During above-mentioned realization, by chain transaction, validation chain and storage chains be respectively completed transaction initiate, transaction verification and
The work of data storage, thus by the job sharing to a plurality of chain carried out originally by single block chain, to reduce area
The load of block chain node improves the efficiency of data transmission and processing.
Detailed description of the invention
Technical solution in ord to more clearly illustrate embodiments of the present application will make below to required in the embodiment of the present application
Attached drawing is briefly described, it should be understood that the following drawings illustrates only some embodiments of the application, therefore should not be seen
Work is the restriction to range, for those of ordinary skill in the art, without creative efforts, can be with
Other relevant attached drawings are obtained according to these attached drawings.
Fig. 1 is a kind of flow chart of block chain separation processing method provided by the embodiments of the present application;
Fig. 2 is the flow chart of the acquisition and sending step of a kind of transaction data provided by the embodiments of the present application and cryptographic Hash of trading;
Fig. 3 is a kind of flow chart of the verification step of cryptographic Hash of trading provided by the embodiments of the present application;
Fig. 4 is a kind of flow chart of the data storing steps of memory node provided by the embodiments of the present application;
Fig. 5 is a kind of module frame chart of block chain separation processing system provided by the embodiments of the present application.
Icon: 20- block chain separation processing system;21- chain transaction;22- validation chain;23- storage chains.
Specific embodiment
Below in conjunction with attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application is described.
It should also be noted that similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi
It is defined in a attached drawing, does not then need that it is further defined and explained in subsequent attached drawing.Meanwhile the application's
In description, term " first ", " second " etc. are only used for distinguishing description, are not understood to indicate or imply relative importance.
Through the applicant the study found that existing block chain technology there is normally only a chains, that is, pass through same block chain
It stored, verified and the work of data transmission, certain block chain link points in block chain may have data processing amount
The low problem of larger, overload, data-handling efficiency.
To solve the above-mentioned problems, the embodiment of the present application provides a kind of block chain separation processing method, referring to FIG. 1,
Fig. 1 is a kind of flow diagram of block chain separation processing method provided by the embodiments of the present application.The block chain separation processing side
The specific steps of method can be such that
Step S12: the transaction node in chain transaction initiates transaction, and the transaction data based on the transaction, which calculates, obtains transaction Hash
Value, and the transaction data and the transaction cryptographic Hash are sent to validation chain.
Transaction data can be the transaction data of one or more transaction, mainly include transaction input (inputs) and friendship
Easily output (outputs) can also include transactional reference version number (version), input quantity (numInputs), output number
Measure the data such as (numOutputs), transactional lock time (lockTime).
Above-mentioned transaction cryptographic Hash is the ciphertext for seeking obtaining to transaction data using one-way Hash function, and which can be
Hash signature, hash signature are most important digital signature methods, also referred to as digital digest method (Digital Digest) or
Digital finger-print method (Digital Finger Print).Digital digest is exactly to use individual event hash function (such as MD4, MD5 etc.)
The plaintext " abstract " that encrypts will be needed to be also known as number at the ciphertext of a string of regular lengths (such as 128) this string of ciphertexts to refer to
Line, it has fixed length, and different plaintexts is made a summary into ciphertext, and result is always different, and similarly it is plucked in plain text
Must be consistent.Wherein, Hash is exactly the input random length, by hashing algorithm, is transformed into the output of regular length, should
Output is exactly hashed value.
Step S14: the verifying node in the validation chain is based on the transaction data and the transaction cryptographic Hash to described
Transaction is verified.
In the present embodiment, when more valuing verifying speed, validation chain can be by a verifying node to transaction
Data and transaction cryptographic Hash are verified, and when to security verified more emphasis, validation chain can be saved by multiple verifyings
Point verifies transaction data and transaction cryptographic Hash.
Step S16: when the transaction passes through verifying, the verifying node is by the transaction data, the transaction Hash
Value is sent to storage chains.
Step S18: the memory node in the storage chains stores the transaction data.
In the above-described embodiments, single block chain is divided into chain transaction, validation chain and storage chains, by chain transaction,
Validation chain and storage chains are respectively completed the work of transaction initiation, transaction verification and data storage, so that script is passed through single area
In the job sharing to a plurality of chain that block chain carries out, avoids one or certain several block chain node carrying excessively calculates or resource transfer
Task improves the efficiency of data transmission and processing to reduce the load of block chain node.
For step S12, referring to FIG. 2, " transaction node in chain transaction initiates transaction, and the friendship based on the transaction
Easy data, which calculate, obtains transaction cryptographic Hash, and the transaction data and the transaction cryptographic Hash are sent to validation chain " may include
Following specific steps:
Step S121: the first transaction node in the chain transaction initiates transaction.
Chain transaction in the present embodiment is the chain for needing to initiate the arbitrary node composition of transaction, and the first transaction node is transaction
Currently need to initiate the arbitrary node of transaction in chain.
Step S122: the current calculating speed of the second transaction node in the chain transaction, the net with the validation chain
When network connection state meets preset condition, the transaction data is sent to second transaction and saved by first transaction node
Point.
The preset condition of the second transaction node in this step can be the calculating speed of preset fixation, network passes
The parameters such as defeated speed can also be and choose current calculating speed, network connection status most in All Activity node in chain transaction
A good transaction node is as the second transaction node.
Step S123: second transaction node is based on the transaction data and calculates the acquisition transaction cryptographic Hash, and will
The transaction data and the transaction cryptographic Hash are sent to the validation chain.
The calculating of transaction cryptographic Hash is carried out by preferable second transaction node of current calculating speed and network connection status
And send, the computing resource that can be avoided transaction node occupies unevenness, improves the computational efficiency of transaction cryptographic Hash, improves simultaneously
The transmission speed for cryptographic Hash of trading.It should be understood that the present embodiment can also be by the calculating for cryptographic Hash of trading and transmission task
It distributes to different transaction nodes to carry out, chooses and calculate most fast transaction node calculating transaction cryptographic Hash, choose network connection state
Optimal transaction node sends transaction cryptographic Hash, further increases the calculating and transmitting efficiency of transaction cryptographic Hash.
In network data transmission, need to confirm the identity of the data sender of a data, and the data received
Whether be tampered, it usually needs data are encrypted, the present embodiment in order to guarantee transaction data and trade cryptographic Hash safety
Property, transaction data and transaction cryptographic Hash can be encrypted by way of asymmetric encryption.Therefore it is directed to step S12, it " will
The transaction data and the transaction cryptographic Hash are sent to the validation chain " it can specifically include: second transaction node is adopted
The transaction data and the transaction cryptographic Hash are encrypted with private key, the encryption data that encryption obtains is sent to described test
Demonstrate,prove chain.
Wherein, public key and private key are a key pair (the i.e. public keys obtained by a kind of algorithm (such as RSA Algorithm)
With a private key), public key is part disclosed in cipher key pair, and private key is then private part.Public key is commonly used in encryption meeting
Talk about key, verifying digital signature, or the data that encryption can be decrypted with corresponding private key.The key pair obtained by this algorithm
Can guarantee it is worldwide only one, when using this key pair, if encrypting a number of segment with one of key
According to, need with another key decrypt.For example just need to be decrypted with corresponding private key with public key encryption data, if added with private key
Close to be also required to corresponding public key decryptions, otherwise decryption will not succeed.
It is corresponding with above-mentioned steps to be, referring to FIG. 3, " the verifying node in validation chain is based on the transaction in step S14
Data and the transaction cryptographic Hash verify the transaction " it based on asymmetric encryption mode may include following specific step
It is rapid:
Step S141: the first verifying node in the validation chain receives the encryption data, and the encryption data is broadcasted
To other verifying nodes in the validation chain.
Optionally, the first verifying node, which can be, randomly selects, and is also possible to based on network connection status, current calculates
The selections such as speed, to guarantee efficiency of the first verifying node when receiving, sending encryption data.
It optionally, can be with when carrying out transaction node in step S123 and step S141 and verifying the selection of node
Consider to introduce anti-cheating mechanism, all nodes in chain transaction and validation chain are carried out with the detection of cheating probability, is existed according to the result
The small transaction node of cheating probability is chosen in chain transaction, and the small verifying node of cheating probability is chosen in validation chain.
Optionally, encryption data is sent to which verifying node in validation chain can be at random by the first verifying node
, it is also possible in calculating speed, the satisfactory verifying node of network transfer speeds choose specified using random algorithm
Several verifying node, to ensure that the randomness of verifying node while improving verification efficiency, to improve verifying
Safety.
Step S142: each verifying node in the validation chain is added using the public key of second transaction node to described
Ciphertext data is decrypted, and obtains the transaction data and the transaction cryptographic Hash.
It should be understood that since above-mentioned encryption data is that the second transaction node uses the private key of oneself to the transaction
What data and the transaction cryptographic Hash obtained after being encrypted, therefore the verifying node in this implementation is solved to encryption data
Need to use the public key of the second transaction node when close, therefore before decryption, the second transaction node needs to send the public key of itself
To all verifying nodes in validation chain;Alternatively, the public key of the second transaction node can also be sent to the institute in validation chain in advance
There is verifying node, such as after the public private key pair of the second transaction node generates, so that it may verifying is sent to by way of broadcast
Other verifying nodes in chain.
The problem of the present embodiment carries out authentication using public key and private key, can be effectively prevented personation identity, improves
Safety.
Step S143: each verifying node is based on the transaction data and the transaction cryptographic Hash tests the transaction
Card.
Optionally, the step S143 in the present embodiment can specifically include: each verifying node is based on the transaction data
Calculate and obtain verifying transaction cryptographic Hash, and when verifying transaction cryptographic Hash is identical as the transaction cryptographic Hash, it is determining described in
Transaction passes through verifying.
Due to transaction cryptographic Hash in transaction data there are also will appear apparent difference when slight change, after decryption
The verifying transaction cryptographic Hash of the transaction data obtained from encryption data is calculated using the same hash function of the second transaction node,
When verifying transaction cryptographic Hash is identical with transaction cryptographic Hash, it was demonstrated that the transaction data obtained from encryption data is the second transaction section
It puts sending and is not tampered with.
As an alternative embodiment, the transaction data in this implementation may include transaction initiator, transaction acceptance
Side, transaction amount and exchange hour stamp.It is illustrated with certain block chain currency type, A needs to transfer accounts to B for 10 points in this morning
Ten coin, the then initiator that trades are A, and transaction acceptance side is B, and transaction amount 10, exchange hour, which stabs, is
" 1559038736000 ", the timestamp can represent 29 minutes and 21 seconds 16 points of such as on October 10th, 2016 specific time.
Further, then " each verifying node is based on the transaction data and the transaction cryptographic Hash to institute to above-mentioned steps
Transaction is stated to be verified " may include:
Step S143.1: each verifying node is based on the transaction initiator, the transaction acceptance side, the transaction amount, institute
It states exchange hour stamp and obtains verifying transaction cryptographic Hash.
The present embodiment will trade initiator, transaction acceptance side, transaction amount and exchange hour stamp according to the arrangement of certain sequence
As the original text of transaction data, hash operations are then carried out to it using hash function and obtain verifying transaction cryptographic Hash.
Step S143.2: it is identical as the transaction cryptographic Hash in verifying transaction cryptographic Hash, and the transaction initiator
Address with the transaction acceptance side is effective address, when the exchange hour stamp and the transaction amount meet preset rules,
Determine that the transaction passes through verifying.
Verifying node can store or can inquire by cloud the effective address of All Activity node, to send out transaction
The validity for playing side or transaction acceptance side is confirmed.
Exchange hour is stabbed, this step can stab the transaction time of origin indicated in current or past in exchange hour
Determine that exchange hour stamp meets preset rules.
For transaction amount, each verifying node can store account book, which can be directly according to the account book
The remaining sum of upper transaction initiator determines whether transaction amount is more than its remaining sum, can also going through by the initiator that trades on the account book
History transaction record determines whether transaction amount determines its remaining sum, determines and hands over when transaction amount is less than the remaining sum of transaction initiator
The easy amount of money meets preset rules.
In the above-described embodiments, verifying node is respectively to transaction initiator, transaction acceptance side, transaction amount and exchange hour
After stamp is verified, then transaction cryptographic Hash is verified to based on transaction data, it is true when above-mentioned various aspects pass through verifying
The fixed transaction is by verifying, to ensure that the comprehensive and accuracy of transaction verification.
Next it is directed to step S16, when validation chain is verified, if only carrying out by a verifying node
Meant that after verifying transaction data and transaction cryptographic Hash by verifying, then there may be verifying node verification mistake or fraud can
Can, therefore in order to improve transaction security, the present embodiment can be used multiple verifying nodes to same transaction and verify, specific
Step may include: in the validation chain greater than preset quantity verifying node determine it is described transaction pass through verifying when, it is described
It verifies node and the transaction data, the transaction cryptographic Hash is sent to storage chains.
Above-mentioned preset quantity can carry out specific according to the quantity for verifying node in the significance level or validation chain of transaction
Adjustment, such as 6,8 etc..
For step S18, referring to FIG. 4, " memory node in the storage chains is to the transaction data, the transaction
Cryptographic Hash is stored " may include following specific steps:
Step S181: the first memory node in the storage chains receive it is described verifying node send the transaction cryptographic Hash,
The transaction data.
Step S182: the first memory node in the storage chains is packaged the transaction cryptographic Hash, is stored
Cryptographic Hash.
Storage cryptographic Hash in this step can be the transaction cryptographic Hash of this transaction data and the friendship of a upper transaction data
Easy cryptographic Hash, which is packaged, to be obtained, and is used to indicate the linking relationship between block and block.Optionally, can also be arranged in storage chains
There is trading pit, the number of transaction in trading pit starts block out when meeting preset quantity, the transaction in trading pit is packaged into one
A block.
Step S183: the transaction data and the storage cryptographic Hash are sent to the storage by first memory node
Other memory nodes in chain.
Other above-mentioned memory nodes can be all memory nodes in storage chains, be also possible to be chosen according to preset rules
The part memory node for being adapted for data storage out.
Step S184: each memory node in the storage chains is receiving the transaction data and the storage Hash
It, will be in the transaction data and storage cryptographic Hash deposit block chain after value.
Optionally, before storage chains are by transaction data and storage cryptographic Hash deposit block chain, common recognition can also be passed through
Mechanism chooses the specified memory node for executing storage operation in all memory nodes of storage chains.Further, to safety
Property when having high requirements, can also be sieved again in the multiple memory nodes selected by common recognition mechanism using random algorithm
Choosing, to improve the safety and non-controllability of memory node selection.
The present embodiment stores transaction data and storage cryptographic Hash respectively, can be improved the storage and inquiry of data
Call efficiency.
For know together mechanism, be the ballot by special joint, in a short period of time the verifying of complete swap and really
Recognize;To a transaction, if several incoherent nodes of interests can reach common understanding, we can think the whole network to this
It can reach common understanding.The common recognition mechanism can be proof of work (Proof of Work, POW) mechanism, equity proves (Proof
Of Stake, POS) one or more of mechanism or other proof mechanism.
In order to cooperate above-mentioned block chain separation processing method, the present embodiment additionally provides a kind of block for executing method
Chain separation processing system 20.Referring to FIG. 5, Fig. 5 is a kind of mould of block chain separation processing system provided by the embodiments of the present application
Block block diagram.
Block chain separation processing system 20 includes chain transaction 21, validation chain 22 and storage chains 23.
Chain transaction 21, for initiating to trade by transaction node, the transaction data calculating based on the transaction is traded
Cryptographic Hash, and the transaction data and the transaction cryptographic Hash are sent to validation chain.
Validation chain 22, for by verifying node be based on the transaction data and the transaction cryptographic Hash to it is described trade into
Row verifying, and when the transaction passes through verifying, the transaction data, the transaction cryptographic Hash are sent to by the verifying node
Storage chains.
Storage chains 23, for being stored by memory node to the transaction data.
It should be understood that chain transaction 21, validation chain 22 and storage chains 23 can be by multiple electronic equipment conducts respectively
Node is communicated to connect and is formed.The electronic equipment can be PC (personal computer, PC), tablet computer, intelligence
The electronics with logic computing function such as energy mobile phone, personal digital assistant (personal digital assistant, PDA) are set
It is standby.
Optionally, chain transaction 21 specifically can be used for: the first transaction node in the chain transaction initiates transaction;Described
The network connection status of the current calculating speed of the second transaction node in chain transaction and the validation chain meets preset condition
When, the transaction data is sent to second transaction node by first transaction node;Second transaction node is based on
The transaction data, which calculates, obtains the transaction cryptographic Hash, and described in the transaction data and the transaction cryptographic Hash be sent to
Validation chain.
Chain transaction 21 will trade before cryptographic Hash and transaction data be sent to validation chain, can also include the following steps: institute
It states the second transaction node to encrypt the transaction data and the transaction cryptographic Hash using private key, the encryption that encryption is obtained
Data are sent to the validation chain.
Optionally, validation chain 22 specifically can be used for: the first verifying node in the validation chain receives the encryption number
According to, and by the encryption data be broadcast in the validation chain other verifying nodes;Each verifying section in the validation chain
Point is decrypted the encryption data using the public key of second transaction node, obtains the transaction data and the transaction
Cryptographic Hash;Each verifying node is based on the transaction data and the transaction cryptographic Hash verifies the transaction.
Further, when being verified, step is specifically as follows validation chain 22: each verifying node is based on the friendship
Easy data, which calculate, obtains verifying transaction cryptographic Hash, and when verifying transaction cryptographic Hash is identical as the transaction cryptographic Hash, really
The fixed transaction passes through verifying.
Optionally, the condition that is specifically verified of validation chain 22 can be such that each verifying node is sent out based on the transaction
Play side, the transaction acceptance side, the transaction amount, exchange hour stamp acquisition verifying transaction cryptographic Hash;In the verifying
Cryptographic Hash of trading is identical as the transaction cryptographic Hash, and the address of the transaction initiator and the transaction acceptance side is effectively
Location when the exchange hour stamp and the transaction amount meet preset rules, determines that the transaction passes through verifying.
It should be understood that validation chain 22 can also be verified by multiple nodes, to enhance safety, specific steps
It can be with are as follows: when determining that the transaction passes through verifying greater than the verifying node of preset quantity in the validation chain, the verifying is saved
The transaction data, the transaction cryptographic Hash are sent to storage chains by point.
Optionally, storage chains 23 specifically can be used for: the first memory node in the storage chains receives the verifying section
The transaction cryptographic Hash of point transmission, the transaction data;The first memory node in the storage chains is to the transaction Hash
Value is packaged, and storage cryptographic Hash is obtained;First memory node sends the transaction data and the storage cryptographic Hash
To other memory nodes in the storage chains;Each memory node in the storage chains receive the transaction data and
It, will be in the transaction data and storage cryptographic Hash deposit block chain after the storage cryptographic Hash.
In conclusion the embodiment of the present application provides a kind of block chain separation processing method and system, the block chain point
From the transaction node initiation transaction that processing method includes: in chain transaction, the transaction data calculating based on the transaction is traded
Cryptographic Hash, and the transaction data and the transaction cryptographic Hash are sent to validation chain;Verifying node base in the validation chain
The transaction is verified in the transaction data and the transaction cryptographic Hash;It is described to test when the transaction passes through verifying
It demonstrate,proves node and the transaction data, the transaction cryptographic Hash is sent to storage chains;Memory node in the storage chains is to described
Transaction data is stored.
During above-mentioned realization, by chain transaction, validation chain and storage chains be respectively completed transaction initiate, transaction verification and
The work of data storage, thus by the job sharing to a plurality of chain carried out originally by single block chain, to reduce area
The load of block chain node improves the efficiency of data transmission and processing.
In several embodiments provided herein, it should be understood that disclosed equipment can also pass through others
Mode is realized.The apparatus embodiments described above are merely exemplary, for example, the block diagram in attached drawing is shown according to this Shen
The architecture, function and operation in the cards of the equipment of multiple embodiments please.In this regard, each box in block diagram
Can represent a part of a module, section or code, a part of the module, section or code include one or
Multiple executable instructions for implementing the specified logical function.It should also be noted that in some implementations as replacement,
Function marked in the box can also occur in a different order than that indicated in the drawings.For example, two continuous boxes are real
It can be basically executed in parallel on border, they can also be executed in the opposite order sometimes, and this depends on the function involved.?
It should be noted that the combination of each box and block diagram in block diagram, can function or movement as defined in executing it is dedicated
Hardware based system is realized, or can be realized using a combination of dedicated hardware and computer instructions.
In addition, each functional module in each embodiment of the application can integrate one independent portion of formation together
Point, it is also possible to modules individualism, an independent part can also be integrated to form with two or more modules.
It, can be with if the function is realized and when sold or used as an independent product in the form of software function module
It is stored in a computer readable storage medium.Therefore the present embodiment additionally provides stores in a kind of read/write memory medium
There are computer program instructions, when the computer program instructions are read and run by a processor, executes block data storage side
Step in any one of method the method.Based on this understanding, the technical solution of the application is substantially in other words to existing
The part of part or the technical solution that technology contributes can be embodied in the form of software products, and the computer is soft
Part product is stored in a storage medium, including some instructions are used so that a computer equipment (can be individual calculus
Machine, server or network equipment etc.) execute each embodiment the method for the application all or part of the steps.And it is aforementioned
Storage medium include: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory
The various media that can store program code such as (RAM, RanDOm Access Memory), magnetic or disk.
The above description is only an example of the present application, the protection scope being not intended to limit this application, for ability
For the technical staff in domain, various changes and changes are possible in this application.Within the spirit and principles of this application, made
Any modification, equivalent substitution, improvement and etc. should be included within the scope of protection of this application.It should also be noted that similar label and
Letter indicates similar terms in following attached drawing, therefore, once it is defined in a certain Xiang Yi attached drawing, then in subsequent attached drawing
In do not need that it is further defined and explained.
The above, the only specific embodiment of the application, but the protection scope of the application is not limited thereto, it is any
Those familiar with the art within the technical scope of the present application, can easily think of the change or the replacement, and should all contain
Lid is within the scope of protection of this application.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or equipment including the element.
Claims (9)
1. a kind of block chain separation processing method, which is characterized in that the described method includes:
Transaction node in chain transaction initiates transaction, and the transaction data based on the transaction, which calculates, obtains transaction cryptographic Hash, and will
The transaction data and the transaction cryptographic Hash are sent to validation chain;
Verifying node in the validation chain is based on the transaction data and the transaction cryptographic Hash verifies the transaction;
When the transaction passes through verifying, the transaction data, the transaction cryptographic Hash are sent to storage by the verifying node
Chain;
Memory node in the storage chains stores the transaction data, the transaction cryptographic Hash.
2. block chain separation processing method according to claim 1, which is characterized in that the transaction node in chain transaction is initiated
Transaction, the transaction data based on the transaction, which calculates, obtains transaction cryptographic Hash, by the transaction data and the transaction cryptographic Hash
It is sent to validation chain, comprising:
The first transaction node in the chain transaction initiates transaction;
The current calculating speed of the second transaction node in the chain transaction, the network connection status satisfaction with the validation chain
When preset condition, the transaction data is sent to second transaction node by first transaction node;
Second transaction node is based on the transaction data and calculates to obtain the transaction cryptographic Hash, and by the transaction data and
The transaction cryptographic Hash is sent to the validation chain.
3. block chain separation processing method according to claim 2, which is characterized in that by the transaction data and the friendship
Easy cryptographic Hash is sent to the validation chain, comprising:
Second transaction node encrypts the transaction data and the transaction cryptographic Hash using private key, and encryption is obtained
Encryption data be sent to the validation chain.
4. block chain separation processing method according to claim 3, which is characterized in that the verifying node in the validation chain
The transaction is verified based on the transaction data and the transaction cryptographic Hash, comprising:
The first verifying node in the validation chain receives the encryption data, and the encryption data is broadcast to the verifying
Other verifying nodes in chain;
Each verifying node in the validation chain solves the encryption data using the public key of second transaction node
It is close, obtain the transaction data and the transaction cryptographic Hash;
Each verifying node is based on the transaction data and the transaction cryptographic Hash verifies the transaction.
5. block chain separation processing method according to claim 4, which is characterized in that each verifying node is based on the friendship
Easy data and the transaction cryptographic Hash verify the transaction, comprising:
Each verifying node is calculated based on the transaction data obtains verifying transaction cryptographic Hash, and in verifying transaction cryptographic Hash
When identical as the transaction cryptographic Hash, determine that the transaction passes through verifying.
6. block chain separation processing method according to claim 4, which is characterized in that the transaction data includes transaction hair
Side, transaction acceptance side, transaction amount and exchange hour stamp are played, each verifying node is based on the transaction data and the transaction is breathed out
Uncommon value verifies the transaction, comprising:
Each verifying node is based on the transaction initiator, the transaction acceptance side, the transaction amount, exchange hour stamp
Obtain verifying transaction cryptographic Hash;
It is identical as the transaction cryptographic Hash in verifying transaction cryptographic Hash, and the transaction initiator and the transaction acceptance side
Address be effective address, when exchange hour stamp and the transaction amount meet preset rules, determine that the transaction passes through
Verifying.
7. block chain separation processing method according to claim 1, which is characterized in that verify node for the number of deals
Storage chains are sent to according to, the transaction cryptographic Hash, comprising:
When determining that the transaction passes through verifying greater than the verifying node of preset quantity in the validation chain, the verifying node will
The transaction data, the transaction cryptographic Hash are sent to storage chains.
8. block chain separation processing method according to claim 1, which is characterized in that the memory node in the storage chains
The transaction data, the transaction cryptographic Hash are stored, comprising:
The first memory node in the storage chains receives the transaction cryptographic Hash, the number of deals that the verifying node is sent
According to;
The first memory node in the storage chains is packaged the transaction cryptographic Hash, obtains storage cryptographic Hash;
First memory node by the transaction data and it is described storage cryptographic Hash be sent in the storage chains other deposit
Store up node;
Each memory node in the storage chains is after receiving the transaction data and the storage cryptographic Hash, by the friendship
In easy data and storage cryptographic Hash deposit block chain.
9. a kind of block chain separation processing system, which is characterized in that the system comprises:
Chain transaction, for initiating to trade by transaction node, the transaction data based on the transaction, which calculates, obtains transaction cryptographic Hash,
And the transaction data and the transaction cryptographic Hash are sent to validation chain;
The validation chain carries out the transaction for being based on the transaction data and the transaction cryptographic Hash by verifying node
Verifying, and when the transaction passes through verifying, the transaction data, the transaction cryptographic Hash are sent to and are deposited by the verifying node
Store up chain;
The storage chains, for being stored by memory node to the transaction data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910751516.2A CN110264207A (en) | 2019-08-15 | 2019-08-15 | Block chain separation processing method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910751516.2A CN110264207A (en) | 2019-08-15 | 2019-08-15 | Block chain separation processing method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110264207A true CN110264207A (en) | 2019-09-20 |
Family
ID=67912068
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910751516.2A Pending CN110264207A (en) | 2019-08-15 | 2019-08-15 | Block chain separation processing method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110264207A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110958303A (en) * | 2019-11-14 | 2020-04-03 | 杭州复杂美科技有限公司 | Block storage and query method, equipment and storage medium |
CN111309731A (en) * | 2020-02-18 | 2020-06-19 | 杭州复杂美科技有限公司 | Block storage and query method, equipment and storage medium |
CN111858520A (en) * | 2020-07-21 | 2020-10-30 | 杭州溪塔科技有限公司 | Method and device for separately storing block link point data |
CN112732831A (en) * | 2020-12-31 | 2021-04-30 | 上海简苏网络科技有限公司 | Transaction source and destination address separation processing method and system |
CN115017234A (en) * | 2022-06-29 | 2022-09-06 | 贵州财经大学 | Block chain information management system, block chain information storage and query method |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108492183A (en) * | 2018-03-29 | 2018-09-04 | 深圳前海微众银行股份有限公司 | Account trading method, system and the computer readable storage medium of block chain |
WO2018215871A1 (en) * | 2017-05-22 | 2018-11-29 | nChain Holdings Limited | Constraining injection of unlocking transaction bytecode |
CN110109930A (en) * | 2019-05-15 | 2019-08-09 | 山东省计算中心(国家超级计算济南中心) | Government data storage, querying method and system based on block chain duplex structure |
-
2019
- 2019-08-15 CN CN201910751516.2A patent/CN110264207A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018215871A1 (en) * | 2017-05-22 | 2018-11-29 | nChain Holdings Limited | Constraining injection of unlocking transaction bytecode |
CN108492183A (en) * | 2018-03-29 | 2018-09-04 | 深圳前海微众银行股份有限公司 | Account trading method, system and the computer readable storage medium of block chain |
CN110109930A (en) * | 2019-05-15 | 2019-08-09 | 山东省计算中心(国家超级计算济南中心) | Government data storage, querying method and system based on block chain duplex structure |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110958303A (en) * | 2019-11-14 | 2020-04-03 | 杭州复杂美科技有限公司 | Block storage and query method, equipment and storage medium |
CN110958303B (en) * | 2019-11-14 | 2022-06-24 | 杭州复杂美科技有限公司 | Block storage and query method, equipment and storage medium |
CN111309731A (en) * | 2020-02-18 | 2020-06-19 | 杭州复杂美科技有限公司 | Block storage and query method, equipment and storage medium |
CN111858520A (en) * | 2020-07-21 | 2020-10-30 | 杭州溪塔科技有限公司 | Method and device for separately storing block link point data |
CN111858520B (en) * | 2020-07-21 | 2024-03-22 | 杭州溪塔科技有限公司 | Method and device for separately storing block chain node data |
CN112732831A (en) * | 2020-12-31 | 2021-04-30 | 上海简苏网络科技有限公司 | Transaction source and destination address separation processing method and system |
CN112732831B (en) * | 2020-12-31 | 2023-12-15 | 上海简苏网络科技有限公司 | Transaction source-destination address separation processing method and system |
CN115017234A (en) * | 2022-06-29 | 2022-09-06 | 贵州财经大学 | Block chain information management system, block chain information storage and query method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102409819B1 (en) | Distributed transaction propagation and verification system | |
CN110264207A (en) | Block chain separation processing method and system | |
CN110046996B (en) | Data processing method and device | |
Franco | Understanding Bitcoin: Cryptography, engineering and economics | |
Asokan | Fairness in electronic commerce | |
Dennis et al. | Rep on the roll: a peer to peer reputation system based on a rolling blockchain | |
CN109472164A (en) | The verification method and its network and electronic equipment of contract dataset | |
Lipton et al. | Micro-payments via efficient coin-flipping | |
CN111556007B (en) | Identity verification method, device and equipment based on block chain and storage medium | |
CN110458560A (en) | For carrying out the method and device of transaction verification | |
CN109491965A (en) | The storage method and its network and electronic equipment of purchase sale of electricity contract | |
US20200250655A1 (en) | Efficient, environmental and consumer friendly consensus method for cryptographic transactions | |
Delgado-Mohatar et al. | Blockchain-based semi-autonomous ransomware | |
CN110490640A (en) | Method, apparatus and system for object distribution processor | |
CN111507839A (en) | Data processing method and device based on block chain, storage medium and equipment | |
Zhao | Graph-based forensic investigation of bitcoin transactions | |
Ali et al. | The nuts and bolts of micropayments: A survey | |
CN109784918A (en) | Information measure of supervision, device, equipment and storage medium based on block chain | |
Suliyanti et al. | Evaluation of hash rate-based double-spending based on proof-of-work blockchain | |
Basagiannis et al. | Synthesis of attack actions using model checking for the verification of security protocols | |
JP6967211B1 (en) | Fully decentralized blockchain system and computer program for trading crypto assets that prevents illegal transactions while also allowing anonymous users to participate | |
CN109816525A (en) | A kind of data processing method and its device, medium, terminal | |
US20230162176A1 (en) | Method for implementing a digital coin system using a blockchain | |
Lee et al. | A robust e-commerce service: Light-weight secure mail-order mechanism | |
Peng et al. | A secure RFID ticket system for public transport |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190920 |
|
RJ01 | Rejection of invention patent application after publication |