CN109905368A - Across the chain data interaction of block chain and verification method, block catenary system and storage medium - Google Patents

Across the chain data interaction of block chain and verification method, block catenary system and storage medium Download PDF

Info

Publication number
CN109905368A
CN109905368A CN201910067029.4A CN201910067029A CN109905368A CN 109905368 A CN109905368 A CN 109905368A CN 201910067029 A CN201910067029 A CN 201910067029A CN 109905368 A CN109905368 A CN 109905368A
Authority
CN
China
Prior art keywords
block chain
block
cochain
chain
voucher
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.)
Granted
Application number
CN201910067029.4A
Other languages
Chinese (zh)
Other versions
CN109905368B (en
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.)
Truth Network Technology (beijing) Co Ltd
Original Assignee
Truth Network Technology (beijing) Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Truth Network Technology (beijing) Co Ltd filed Critical Truth Network Technology (beijing) Co Ltd
Priority to CN201910067029.4A priority Critical patent/CN109905368B/en
Publication of CN109905368A publication Critical patent/CN109905368A/en
Application granted granted Critical
Publication of CN109905368B publication Critical patent/CN109905368B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention relates to block chain correlative technology fields, and in particular to a kind of across the chain data interaction of block chain and verification method, block catenary system and storage medium.Wherein, to include: block chain A obtain the FileHash of original document by the original document that the processing of preset hash algorithm has obtained to across the chain data interactive method of block chain;Block chain A carries out cochain in block chain A to FileHash, obtains the first cochain voucher;After block chain A has carried out the cochain behavior of preset times, block chain A is based on the behavior of preset times cochain and generates block, extracts the Blockhash of block head in block;The interface that block chain A calls block chain B to provide, carries out cochain on block chain B for Blockhash;Blockhash when carrying out cochain on block chain B, is obtained the second cochain voucher by block chain B;Block chain A receives block chain B and returns the second cochain voucher.

Description

Across the chain data interaction of block chain and verification method, block catenary system and storage medium
Technical field
The present invention relates to block chain correlative technology fields, and in particular to a kind of across the chain data interaction of block chain and authentication Method, block catenary system and storage medium.
Background technique
Block chain is the database of a decentralization, be to Distributed Storage, point-to-point transmission, common recognition mechanism, The new application of the computer technologies such as Encryption Algorithm.Block chain includes a string using the associated data generated of cryptography method Block, the information comprising the transaction of block chain network in each data block.Data interaction between different block chains is known as across chain Data interaction.Across chain data interaction is the bridge that the block chain isolated island that will be scattered with connects.
It is main to be generated using in transaction when carrying out across chain data synchronous interaction in existing technology, between different blocks chain While carry out data interaction mode.Under this mode often by data interaction in block chain network, data are synchronous Frequently, block catenary system degraded performance is caused.Data interaction is carried out through the above way simultaneously, can leak the quantity of transaction, and The leakage of the quantity of transaction is easy exposure business secret.
Summary of the invention
In view of this, in order to solve the problems, such as that present in the relevant technologies, the present invention provides one kind at least to a certain extent Across the chain data interaction of block chain and verification method, block catenary system and storage medium.
The present invention adopts the following technical scheme:
Based on the application in a first aspect, the application provides a kind of across chain data interactive method of block chain.
Across the chain data interactive method of block chain provided by the present application includes:
Block chain A obtains the file Hash of original document by the original document that the processing of preset hash algorithm has obtained FileHash;
The block chain A carries out cochain in block chain A to the FileHash, obtains the first cochain voucher;
After block chain A has carried out the cochain behavior of preset times, block chain A is raw based on the preset times cochain behavior At block, the Blockhash block Hash of block head in the block is extracted;
The interface that the block chain A calls block chain B to provide, carries out cochain on block chain B for the Blockhash;
The Blockhash when carrying out cochain on the block chain B, is obtained the second cochain voucher by the block chain B;
Block chain A receives block chain B and returns the second cochain voucher.
Optionally, the data transmitted when the block chain A and the block chain B data interact are to be calculated by preset encryption The encrypted data of method.
Optionally, the predetermined encryption algorithm is keying Hash HmacSHA256 algorithm, the close SM serial algorithm of state or symmetrical Encryption Algorithm.
Optionally, the symmetric encipherment algorithm includes: AES-128 algorithm, AES-192 algorithm or AES-256 algorithm.
Based on the application second aspect, the application provides a kind of across the chain data interaction of block chain and verification method.
Across the chain data interaction of block chain provided by the present application and verification method, comprising:
Block chain A obtains the file Hash of original document by the original document that the processing of preset hash algorithm has obtained FileHash;
The block chain A carries out cochain in block chain A to the FileHash, obtains the first cochain voucher;
After block chain A has carried out the cochain behavior of preset times, block chain A is raw based on the preset times cochain behavior At block, the Blockhash block Hash of block head in the block is extracted;
The interface that the block chain A calls block chain B to provide, carries out cochain on block chain B for the Blockhash;
The Blockhash when carrying out cochain on the block chain B, is obtained the second cochain voucher by the block chain B;
Block chain A receives block chain B and returns the second cochain voucher;
The block chain A to the block chain B send original document, the first cochain voucher and second cochain with Card;
The block chain B is based on the first cochain voucher, calls the interface of the block chain A, obtains the block chain A Described in original document FileHash where block Blockhash;
The block chain B is based on the second cochain voucher, obtains the Blockhash stored in the block chain B;
The Blockhash of block where the block chain B judges the FileHash of original document described in the block chain A It is whether identical as the Blockhash that is stored in the block chain B, obtain the first judging result of yes/no;
If the first judging result is interface yes, that the block chain B is provided by the block chain A, the first cochain is used FileHash of the acquisition of credentials original document on the block chain A, and determine and used when the block chain A calculates FileHash Target hash algorithm;
The block chain B counts the block chain A received the original document sent by the target hash algorithm It calculates, obtains FileHash;
The original document FileHash that block chain B judgement is obtained by the first cochain voucher in block chain A with it is described Whether the FileHash being calculated is identical, obtains the second judging result of yes/no;
If the second judging result be it is yes, be verified.
Optionally, the block chain A and data transmitted are by preset when block chain B data interaction and verifying The encrypted data of Encryption Algorithm.
Optionally, the predetermined encryption algorithm is keying Hash HmacSHA256 algorithm, the close SM serial algorithm of state or symmetrical Encryption Algorithm.
Based on the application third aspect, the application provides a kind of block catenary system.
Block catenary system provided by the present application, including at least two block chains, across the chain number of any two in the system According to across the chain data interactive method of block chain that interactive block chain application the application first aspect provides, or, in the system Across the chain data interaction of block chain and verifying that any two are provided across block chain application the application second aspect of chain data interaction Method.
Optionally, the either block chain in the system includes processor and memory;
The processor and memory communicate to connect;
Wherein, the processor, for calling and executing the program stored in the memory;
The memory, for storing program, described program is at least for realizing the offer of any one of such as Claims 1 to 4 Each step of the block chain across chain data interactive method, or, realize the block chain that is provided such as any one of claim 5~7 across Each step of chain data interaction and verification method.
Based on the application fourth aspect, the application provides a kind of storage medium.
Computer program is stored on storage medium provided by the present application, when the computer program is executed by processor, Each step of the block chain across chain data interactive method provided such as the application first aspect is realized, or, realizing such as the application the Each step of across the chain data interaction of block chain and verification method that two aspects provide.
The invention adopts the above technical scheme, and block chain A handles the original document obtained by preset hash algorithm After obtaining the file Hash FileHash of original document, cochain is carried out in block chain A to FileHash, obtains the first cochain voucher (i.e. primary transaction), at this time and without the data interaction between block chain, but in the cochain behavior for having carried out preset times After (transaction), the information based on above-mentioned multiple cochain behavior of block chain A forms block and specially mentions at this point, just interacting The Blockhash of block is taken, the interface for calling block chain B to provide makes Blockhash carry out cochain in block chain B, obtains second Cochain voucher;Block chain B returns the second cochain voucher to block chain A.So just complete across a chain data interaction of block chain.? That is all carrying out once across chain data interaction in the scheme that the application proposes after not carrying out cochain every time, but carrying out After the cochain behavior of preset times, primary across chain data interaction is carried out.The number of data interaction can be so reduced, number is reduced According to synchronous frequency, block catenary system performance is improved.It, can not be by between block chain meanwhile in method provided by the present application The number of data interaction judges that block chain A carries out the number of cochain, effectively shields the details of transaction, guarantees block chain A The number for carrying out cochain will not expose, and avoid exposing business secret because block chain A carries out the exposure of the number of cochain.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is flow diagram of the block chain across chain data interactive method that the embodiment of the present invention one provides;
Fig. 2 is the flow diagram of block chain provided by Embodiment 2 of the present invention across chain data interaction and verification method;
Fig. 3 is the configuration diagram figure of block chain provided by Embodiment 2 of the present invention across chain data interaction and verification method.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, technical solution of the present invention will be carried out below Detailed description.Obviously, described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Base Embodiment in the present invention, those of ordinary skill in the art are obtained all without making creative work Other embodiment belongs to the range that the present invention is protected.
Embodiment one
Fig. 1 is flow diagram of the block chain across chain data interactive method that the embodiment of the present invention one provides.Such as Fig. 1 institute Show, across the chain data interactive method of block chain provided in this embodiment, comprising:
S101, block chain A obtain original document by the original document that the processing of preset hash algorithm has obtained FileHash;
It is to be understood that including block chain (that is: the application text for issuing data in across a chain data interaction of block chain Block chain A in part) and receive data block chain (that is: the block chain B in present specification).
S102, block chain A carry out cochain in block chain A to FileHash, obtain the first cochain voucher;
Wherein, cochain refers to Hash (i.e. FileHash) and the time etc. that file is saved on block chain.
S103, after block chain A has carried out the cochain behavior of preset times, block chain A is based on the behavior of preset times cochain Block is generated, the Blockhash of block head in block is extracted;
Wherein, preset times (that is: the number of deals for including in a block in block chain network) can be by being arranged block Size set.
The interface that S104, block chain A call block chain B to provide, carries out cochain on block chain B for Blockhash;
That is: block chain A sends Blockhash to block chain B, carries out cochain to Blockhash by block chain B.
Blockhash when carrying out cochain on block chain B, is obtained the second cochain voucher by S105, block chain B;
S106, block chain A receive block chain B and return the second cochain voucher.
Across the chain data interactive method of block chain provided in an embodiment of the present invention can be applied to include at least two block chains Block catenary system, wherein any two in the system can be implemented above-described embodiment across the block chain of chain interaction and mention The technical solution of confession, in addition, the either block chain in block chain of any two across chain interaction can at least execute block Chain A or B the step of.That is, the either block chain in block chain of any two across chain interaction can be in not homogeneous Across chain data interaction in execute block chain A the step of or execute block chain B the step of.Such as a block chain is once across chain The step of block chain A is executed when data interaction, the step of block chain B can be executed in another time across chain data interaction.
It is illustrated by taking specific across a chain data interaction of block chain as an example based on above-mentioned steps: being handed in once across chain data It include the block chain (that is: the block chain A in present specification) for issuing data and block chain (that is: this Shen for receiving data in mutually It please block chain B in file).
Step in referring to Fig.1, specific implementation procedure are as follows:
Block chain A obtains original document, and extracts the FileHash of original document;
It is understood that the FileHash of original document is to handle original document by default hash algorithm to obtain. " hash " is done in Hash, general translation, and also having direct transliteration is " Hash ", and exactly the input of random length (is called to do and be trade-showed Penetrate pre-image) output of regular length is transformed by hashing algorithm, which is exactly hashed value.This conversion is a kind of Compression mapping, it is, the space of hashed value is generally much less than the space inputted, different inputs may hash to identical Output, it is impossible to unique input value is determined from hashed value.It is briefly exactly a kind of message pressure by random length It is reduced to the function of the eap-message digest of a certain regular length.
Block chain A carries out cochain in block chain A to FileHash, obtains the first cochain voucher;Cochain refers in area herein Hash (i.e. FileHash) and the time etc. of file are saved on block chain;
It should be noted that block chain A is simultaneously indirect after completing the uplink operation for the FileHash of original document Data interaction is carried out with other block chains, but judges whether block chain A is carrying out the cochain behavior of preset times and be based on The cochain behavior of preset times simultaneously generates block, if judging result be it is no, wait to the FileHash of alternative document into Row uplink operation if the determination result is YES then carries out across chain data interaction.
After block chain A has carried out the cochain behavior of preset times, the block of block chain A is based on the behavior of preset times cochain Generate block;Extract the Blockhash block Hash of block head in block;
Wherein, (that is: the block chain A for including in a block Block in block chain network carries out uplink operation to preset times Quantity) can be set by the way that the block size of block chain A is arranged.
Block chain A, the interface for calling block chain B to provide make Blockhash carry out cochain in block chain B, obtain on second Chain voucher;Block chain B returns the second cochain voucher to block chain A.
Such Blockhash carries out cochain in block chain B, completes across the chain data interaction of block chain.
The invention adopts the above technical scheme, and block chain A handles the original document obtained by preset hash algorithm After obtaining the FileHash of original document, FileHash is subjected to cochain in block chain A, it is (i.e. primary to obtain the first cochain voucher Transaction), at this time and without the data interaction between block chain, but in the cochain behavior (transaction) for having carried out preset times Afterwards, the information based on above-mentioned multiple cochain behavior of block chain A forms block, at this point, just interacting, specially extracts block Blockhash, call block chain B provide interface, make Blockhash block chain B carry out cochain, obtain the second cochain with Card;Block chain B returns the second cochain voucher to block chain A.So just complete across a chain data interaction of block chain.Namely Say, in the scheme that the application proposes, all carry out once across chain data interaction after not carrying out cochain every time, but carried out it is pre- If after the cochain behavior of number, carrying out once across chain data interaction.The number of data interaction can be so reduced, it is same to reduce data The frequency of step improves block catenary system performance.Meanwhile in method provided by the present application, data between block chain can not be passed through Interactive number judges that block chain A carries out the number of cochain, effectively shields the details of transaction, guarantees that block chain A is carried out The number of cochain will not expose, and avoid exposing business secret because block chain A carries out the exposure of the number of cochain.
In order to further ensure the safety of data, the leakage of interaction data is prevented.In the application providing method, block chain it Between to be used for the data transmitted when data interaction be by the encrypted data of preset Encryption Algorithm.It is arranged such through encryption number According to being authenticated and guaranteed communication security.
Wherein, the Encryption Algorithm used when data interaction between block chain network can be calculated for keying Hash HmacSHA256 Method, the close SM serial algorithm of state or symmetric encipherment algorithm.Symmetric encipherment algorithm include: AES-128 algorithm, AES-192 algorithm or AES-256 algorithm.
Embodiment two
Fig. 2 is the flow diagram of block chain provided by Embodiment 2 of the present invention across chain data interaction and verification method;Ginseng According to Fig. 2, across the chain data interaction of block chain provided in this embodiment and verification method, comprising:
S201, block chain A obtain the file of original document by the original document that the processing of preset hash algorithm has obtained Hash FileHash;
It is to be understood that including block chain (that is: the application for issuing data in across a chain data interaction of block chain Block chain A in file) and receive data block chain (that is: the block chain B in present specification).
S202, block chain A carry out cochain in block chain A to FileHash, obtain the first cochain voucher;
Wherein, cochain refers to Hash (i.e. FileHash) and the time etc. that file is saved on block chain.
S203, after block chain A has carried out the cochain behavior of preset times, block chain A is based on the behavior of preset times cochain Block is generated, the Blockhash block Hash of block head in block is extracted;
Wherein, preset times (that is: the number of deals for including in a block Block in block chain network) can pass through setting The size of block Block is set.
The interface that S204, block chain A call block chain B to provide, carries out cochain on block chain B for Blockhash;
That is: block chain A sends Blockhash to block chain B, carries out cochain to Blockhash by block chain B.
Blockhash when carrying out cochain on block chain B, is obtained the second cochain voucher by S205, block chain B;
S206, block chain A receive block chain B and return the second cochain voucher.
It is to be understood that mainly including two parts in method provided in this embodiment: a part is that S201~S206 is retouched The data interaction part stated;Another part is the data verification part of S207~S214 description.
S207, block chain A send original document, the first cochain voucher and the second cochain voucher to block chain B;
Wherein, it is original document to be verified that block chain A, which sends original document to block chain B, in step S207;On first Chain voucher is the first cochain voucher in step S202;Block chain A receives block chain B passback second in second cochain voucher S206 Cochain voucher.
S208, block chain B are based on the first cochain voucher, call the interface of block chain A, obtain original document in block chain A FileHash where block Blockhash;
Wherein, the Blockhash of block where the FileHash of original document is the block generated in S203 in block chain A Blockhash.
S209, block chain B are based on the second cochain voucher, obtain the Blockhash stored in block chain B;
Wherein, the Blockhash stored in block chain B is to be sent out in step S204 and S205 from block chain A to block chain B It send, and carries out the Blockhash of cochain by block chain B.
The Blockhash and block of block where S210, block chain B judge the FileHash of original document in block chain A Whether the Blockhash stored in chain B is identical, obtains the first judging result of yes/no;
So set, first verifying that the first cochain voucher original document in block chain A when carrying out data verification Whether the Blockhash stored in the Blockhash and block chain B of block where FileHash is identical.If judging result is not It is identical, it is determined that verifying does not pass through, without carrying out next step verifying, simplifies verification step;If judging result be it is identical, carry out The verifying of next step.
S211 uses the first cochain voucher if the first judging result is interface yes, that block chain B is provided by block chain A FileHash of the original document on block chain A is obtained, and obtains block chain A and calculates the target Hash calculation used when FileHash Method;
Wherein, the target hash algorithm obtained herein is calculated when calculating FileHash for block chain A using preset Hash Method.
S212, block chain B calculate the block chain A received the original document sent by target hash algorithm, Obtain FileHash;
S213, block chain B judgement in the obtained original document FileHash of block chain A and are calculated by the first cochain voucher Whether obtained FileHash is identical, obtains the second judging result of yes/no;
S214, if the second judging result be it is yes, be verified.
So set, first verifying that the first cochain voucher original document in block chain A when carrying out data verification Whether the Blockhash stored in the Blockhash and block chain B of block where FileHash is identical.If judging result is not It is identical, it is determined that verifying does not pass through, without carrying out next step verifying, simplifies verification step;If judging result be it is identical, carry out The verifying of next step.The FileHash and block chain for the original document in block chain A that the interface for calling block chain A to provide obtains Whether the FileHash that B is calculated is identical, is then verified if they are the same.The application, which provides, uses dual test in flat scheme Card, ensure that the reliability of data verification.
In order to more clearly demonstrate across the chain data interaction of block chain provided by the present application and verification method, below specifically to show The mode of example, the elaboration that across the chain data interaction of block chain of the application and verification method are more intuitively changed.
Referring to Fig. 3, Fig. 3 is the framework of block chain provided by Embodiment 2 of the present invention across chain data interaction and verification method Schematic diagram.For the data interaction and verifying between at least two block chains, as shown in figure 3, block chain provided in this embodiment Across chain data interaction and verification method, comprising:
1. referring to the arrow in Fig. 3, block chain A obtains original document, handles original document by preset hash algorithm The FileHash of original document is obtained, FileHash is subjected to cochain.The uplink operation is n-th of block (Block in Fig. 3 Header n) in Tx2, while obtaining this document in the first cochain voucher of block chain A.When n-th of block is preset After the uplink operation of number, Tx1~Txm is contained inside n-th of block.N-th of block can be extracted at this time removes block head In BlockHash.And execute the arrow in Fig. 3 2.
2. referring to the arrow in Fig. 3, block chain A calls the interface of block chain network B, by n-th block in block chain A BlockHash is saved in block chain network B, while obtaining the second cochain voucher of block chain B return.It is safeguarded in block chain B The mapping relations of second cochain voucher and the Block Hash of n-th of the block for the block chain A that cochain is carried out in block chain B.
The above process is process of the block chain across chain data interaction.Next mistake of the block chain across chain data verification is introduced Journey:
3. referring to the arrow in Fig. 3, in data verification, the original document of the cochain in block chain network A is submitted to Block chain network B.It also needs to submit this document block where the voucher of the first cochain, this document cochain in block chain A simultaneously The the second cochain voucher obtained when the BlockHash interaction of the block head of chain A is to block chain B
The interface that block chain B uses the first cochain voucher to call block chain A to provide as parameter, obtains this document in block The BlockHash of n-th of block of block chain A in the BlockHash of the block of chain A cochain, i.e. Fig. 3.Meanwhile block chain B is logical The mapping relations of the second cochain voucher with the block head BlockHash for the block chain A that cochain is carried out in block chain B are crossed, obtaining can With the BlockHash of n-th of block of the block chain A stored on block chain B, i.e., in the Tx2 of the 2nd of block chain B the block The BlockHash of storage.Whether consistent compare the two BlockHash.It is 4. representative that arrow in Fig. 3 is carried out if consistent Step is verified if inconsistent and is not passed through.
4. referring to arrow in Fig. 3, the interface that block chain B uses the first cochain voucher to call block chain A to provide as parameter, Obtain the FileHash of preservation of the original document in block chain A, it may be assumed that the Tx2 of n-th of block of block chain A, and obtain block How the target hash algorithm of the FileHash is calculated in chain A.
Target hash algorithm obtained in block chain B use and original document recalculate the FileHash of this document
Compare based on the first cochain voucher FileHash obtained in the block chain A and is calculated by original document Whether FileHash is consistent, if unanimously, data verification passes through.
The application also provides a kind of block catenary system, including multiple block chains, which is characterized in that block provided by the present application Across the chain data interactive method of chain, and/or, using across the chain data interaction of block chain provided by the present application and verification method.
Further, the either block chain in block catenary system provided in an embodiment of the present invention includes processor and storage Device;
Processor and memory communicate to connect;
Wherein, processor, for calling and executing the program stored in memory;
Memory, for storing program, program is at least handed over for realizing across the chain data of block chain that such as embodiment one provides Each step of mutual method, or, realizing each step for across the chain data interaction of block chain and verification method that embodiment two provides.
Specifically, block chain includes block chain node, optionally, processor and memory can be configured to block chain link Point.
The application also provides a kind of storage medium.It is stored with computer program on storage medium provided by the present application, calculates When machine program is executed by processor, such as each step of the block chain provided by the present application across chain data interactive method is realized, or, real Now such as each step of block chain provided by the present application across chain data interaction and verification method.
The specific implementation of the present embodiment may refer to the related description in above-described embodiment, and details are not described herein again.
It is understood that same or similar part can mutually refer in the various embodiments described above, in some embodiments Unspecified content may refer to the same or similar content in other embodiments.
It should be noted that in the description of the present invention, term " first ", " second " etc. are used for description purposes only, without It can be interpreted as indication or suggestion relative importance.In addition, in the description of the present invention, unless otherwise indicated, the meaning of " multiple " Refer at least two.
Any process described otherwise above or method description are construed as in flow chart or herein, and expression includes It is one or more for realizing specific logical function or process the step of executable instruction code module, segment or portion Point, and the range of the preferred embodiment of the present invention includes other realization, wherein can not press shown or discussed suitable Sequence, including according to related function by it is basic simultaneously in the way of or in the opposite order, Lai Zhihang function, this should be of the invention Embodiment person of ordinary skill in the field understood.
It should be appreciated that each section of the invention can be realized with hardware, software, firmware or their combination.Above-mentioned In embodiment, software that multiple steps or method can be executed in memory and by suitable instruction executing device with storage Or firmware is realized.It, and in another embodiment, can be under well known in the art for example, if realized with hardware Any one of column technology or their combination are realized: having a logic gates for realizing logic function to data-signal Discrete logic, with suitable combinational logic gate circuit specific integrated circuit, programmable gate array (PGA), scene Programmable gate array (FPGA) etc..
Those skilled in the art are understood that realize all or part of step that above-described embodiment method carries Suddenly be that relevant hardware can be instructed to complete by program, program can store in a kind of computer readable storage medium In, which when being executed, includes the steps that one or a combination set of embodiment of the method.
It, can also be in addition, each functional unit in each embodiment of the present invention can integrate in a processing module It is that each unit physically exists alone, can also be integrated in two or more units in a module.Above-mentioned integrated mould Block both can take the form of hardware realization, can also be realized in the form of software function module.If integrated module with The form of software function module is realized and when sold or used as an independent product, also can store computer-readable at one It takes in storage medium.
Storage medium mentioned above can be read-only memory, disk or CD etc..
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show The description of example " or " some examples " etc. means specific features, structure, material or spy described in conjunction with this embodiment or example Point is included at least one embodiment or example of the invention.In the present specification, schematic expression of the above terms are not Centainly refer to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be any One or more embodiment or examples in can be combined in any suitable manner.
Although the embodiments of the present invention has been shown and described above, it is to be understood that above-described embodiment is example Property, it is not considered as limiting the invention, those skilled in the art within the scope of the invention can be to above-mentioned Embodiment is changed, modifies, replacement and variant.

Claims (10)

1. a kind of across chain data interactive method of block chain characterized by comprising
Block chain A obtains the file Hash of original document by the original document that the processing of preset hash algorithm has obtained FileHash;
The block chain A carries out cochain in block chain A to the FileHash, obtains the first cochain voucher;
After block chain A has carried out the cochain behavior of preset times, block chain A is based on the preset times cochain behavior generation area Block extracts the Blockhash block Hash of block head in the block;
The interface that the block chain A calls block chain B to provide, carries out cochain on block chain B for the Blockhash;
The Blockhash when carrying out cochain on the block chain B, is obtained the second cochain voucher by the block chain B;
Block chain A receives block chain B and returns the second cochain voucher.
2. the method according to claim 1, wherein being passed when the block chain A and block chain B data interaction Defeated data are to pass through the encrypted data of preset Encryption Algorithm.
3. according to the method described in claim 2, it is characterized in that, the predetermined encryption algorithm is keying Hash HmacSHA256 Algorithm, the close SM serial algorithm of state or symmetric encipherment algorithm.
4. according to the method described in claim 3, it is characterized in that, the symmetric encipherment algorithm include: AES-128 algorithm, AES-192 algorithm or AES-256 algorithm.
5. a kind of across the chain data interaction of block chain and verification method characterized by comprising
Block chain A obtains the file Hash of original document by the original document that the processing of preset hash algorithm has obtained FileHash;
The block chain A carries out cochain in block chain A to the FileHash, obtains the first cochain voucher;
After block chain A has carried out the cochain behavior of preset times, block chain A is based on the preset times cochain behavior generation area Block extracts the Blockhash block Hash of block head in the block;
The interface that the block chain A calls block chain B to provide, carries out cochain on block chain B for the Blockhash;
The Blockhash when carrying out cochain on the block chain B, is obtained the second cochain voucher by the block chain B;
Block chain A receives block chain B and returns the second cochain voucher;
The block chain A sends original document, the first cochain voucher and the second cochain voucher to the block chain B;
The block chain B is based on the first cochain voucher, calls the interface of the block chain A, obtains institute in the block chain A The Blockhash of block where stating the FileHash of original document;
The block chain B is based on the second cochain voucher, obtains the Blockhash stored in the block chain B;
The Blockhash of block and institute where the block chain B judges the FileHash of original document described in the block chain A State whether the Blockhash stored in block chain B is identical, obtains the first judging result of yes/no;
If the first judging result be it is yes, the block chain B passes through the interface that the block chain A is provided, using the first cochain voucher, FileHash of the original document on the block chain A is obtained, and obtains the block chain A and calculates the mesh used when FileHash Mark hash algorithm;
The block chain B calculates the block chain A received the original document sent by the target hash algorithm, obtains To FileHash;
The block chain B judgement is by the first cochain voucher in the obtained original document FileHash of block chain A and the calculating Whether obtained FileHash is identical, obtains the second judging result of yes/no;
If the second judging result be it is yes, be verified.
6. according to the method described in claim 5, it is characterized in that, the block chain A and the block chain B data interaction and test The data transmitted when card are to pass through the encrypted data of preset Encryption Algorithm.
7. according to the method described in claim 6, it is characterized in that, the predetermined encryption algorithm is keying Hash HmacSHA256 Algorithm, the close SM serial algorithm of state or symmetric encipherment algorithm.
8. a kind of block catenary system, including at least two block chains, which is characterized in that across the chain number of any two in the system According to across the chain data interactive method of block chain that any one of interactive block chain application Claims 1 to 4 provides, or, the system In across the chain data of block chain that provide of block chain application claim 5~7 any one of of any two across chain data interaction hand over Mutual and verification method.
9. system according to claim 8, the either block chain in the system includes processor and memory;
The processor and memory communicate to connect;
Wherein, the processor, for calling and executing the program stored in the memory;
The memory, for storing program, the area that described program at least provides for realizing any one of such as Claims 1 to 4 Each step of the block chain across chain data interactive method, or, realizing across the chain number of block chain provided such as any one of claim 5~7 According to interactive and verification method each step.
10. a kind of storage medium is it is characterized in that, be stored thereon with computer program, the computer program is executed by processor When, each step of the block chain across chain data interactive method provided such as any one of Claims 1 to 4 is realized, or, realizing as weighed Benefit requires each step of any one of 5~7 across the chain data interactions of block chain provided and verification method.
CN201910067029.4A 2019-01-24 2019-01-24 Block chain cross-chain data interaction and verification method, block chain system and storage medium Active CN109905368B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910067029.4A CN109905368B (en) 2019-01-24 2019-01-24 Block chain cross-chain data interaction and verification method, block chain system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910067029.4A CN109905368B (en) 2019-01-24 2019-01-24 Block chain cross-chain data interaction and verification method, block chain system and storage medium

Publications (2)

Publication Number Publication Date
CN109905368A true CN109905368A (en) 2019-06-18
CN109905368B CN109905368B (en) 2021-12-10

Family

ID=66944248

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910067029.4A Active CN109905368B (en) 2019-01-24 2019-01-24 Block chain cross-chain data interaction and verification method, block chain system and storage medium

Country Status (1)

Country Link
CN (1) CN109905368B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110535970A (en) * 2019-09-16 2019-12-03 百度在线网络技术(北京)有限公司 The evidence of judicial chain deposits card and processing method, device, equipment and medium
CN110598058A (en) * 2019-09-16 2019-12-20 百度在线网络技术(北京)有限公司 Evidence storing and processing method, device, equipment and medium of judicial chain
CN110602214A (en) * 2019-09-16 2019-12-20 百度在线网络技术(北京)有限公司 Evidence storing and processing method, device, equipment and medium of judicial chain
CN111353180A (en) * 2020-03-30 2020-06-30 北京海益同展信息科技有限公司 Block chain evidence storing method, evidence obtaining method and system
CN111639939A (en) * 2020-06-08 2020-09-08 杭州复杂美科技有限公司 Block restoring method, equipment and storage medium
CN112527837A (en) * 2020-12-09 2021-03-19 苏州市星际云通区块链科技有限公司 Block chain cross-chain data interaction and verification method, block chain system and storage medium
CN113395363A (en) * 2021-08-18 2021-09-14 腾讯科技(深圳)有限公司 Data processing method, device and equipment based on block chain and storage medium
CN113810359A (en) * 2021-03-08 2021-12-17 京东科技信息技术有限公司 Certificate storage method, device and equipment
US20220166602A1 (en) * 2020-11-20 2022-05-26 Hong Kong Applied Science and Technology Research Institute Company Limited Apparatus and Method of Lightweight Communication Protocols between Multiple Blockchains
CN114780932A (en) * 2022-06-21 2022-07-22 中铁电气化局集团有限公司 Cross-block chain data interaction verification method, system and equipment for management three-mode platform

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180351874A1 (en) * 2017-05-30 2018-12-06 At&T Intellectual Property I, L.P. Creating Cross-Service Chains of Virtual Network Functions in a Wide Area Network
CN109218303A (en) * 2018-09-10 2019-01-15 浙江天脉领域科技有限公司 A kind of novel across chain method of block chain of homologous isomery link network fusion
CN109242456A (en) * 2018-09-04 2019-01-18 湖南宸瀚信息科技有限责任公司 Across the chain method of commerce of block chain, system and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180351874A1 (en) * 2017-05-30 2018-12-06 At&T Intellectual Property I, L.P. Creating Cross-Service Chains of Virtual Network Functions in a Wide Area Network
CN109242456A (en) * 2018-09-04 2019-01-18 湖南宸瀚信息科技有限责任公司 Across the chain method of commerce of block chain, system and storage medium
CN109218303A (en) * 2018-09-10 2019-01-15 浙江天脉领域科技有限公司 A kind of novel across chain method of block chain of homologous isomery link network fusion

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110602214B (en) * 2019-09-16 2022-07-19 百度在线网络技术(北京)有限公司 Evidence storing and processing method, device, equipment and medium of judicial chain
CN110535970A (en) * 2019-09-16 2019-12-03 百度在线网络技术(北京)有限公司 The evidence of judicial chain deposits card and processing method, device, equipment and medium
CN110598058A (en) * 2019-09-16 2019-12-20 百度在线网络技术(北京)有限公司 Evidence storing and processing method, device, equipment and medium of judicial chain
CN110535970B (en) * 2019-09-16 2022-04-12 百度在线网络技术(北京)有限公司 Evidence storing and processing method, device, equipment and medium of judicial chain
CN110602214A (en) * 2019-09-16 2019-12-20 百度在线网络技术(北京)有限公司 Evidence storing and processing method, device, equipment and medium of judicial chain
CN111353180A (en) * 2020-03-30 2020-06-30 北京海益同展信息科技有限公司 Block chain evidence storing method, evidence obtaining method and system
CN111639939A (en) * 2020-06-08 2020-09-08 杭州复杂美科技有限公司 Block restoring method, equipment and storage medium
US20220166602A1 (en) * 2020-11-20 2022-05-26 Hong Kong Applied Science and Technology Research Institute Company Limited Apparatus and Method of Lightweight Communication Protocols between Multiple Blockchains
WO2022104860A1 (en) * 2020-11-20 2022-05-27 Hong Kong Applied Science and Technology Research Institute Company Limited Apparatus and method of lightweight communication protocols between multiple blockchains
CN114868359A (en) * 2020-11-20 2022-08-05 香港应用科技研究院有限公司 Apparatus and method for light communication protocol between multi-block chains
CN114868359B (en) * 2020-11-20 2024-04-23 香港应用科技研究院有限公司 Multi-block inter-chain light communication protocol device and method
US11368288B2 (en) * 2020-11-20 2022-06-21 Hong Kong Applied Science and Technology Research Institute Company Limited Apparatus and method of lightweight communication protocols between multiple blockchains
CN112527837A (en) * 2020-12-09 2021-03-19 苏州市星际云通区块链科技有限公司 Block chain cross-chain data interaction and verification method, block chain system and storage medium
CN113810359A (en) * 2021-03-08 2021-12-17 京东科技信息技术有限公司 Certificate storage method, device and equipment
CN113810359B (en) * 2021-03-08 2023-06-23 京东科技信息技术有限公司 Certificate storing method, device and equipment thereof
CN113395363A (en) * 2021-08-18 2021-09-14 腾讯科技(深圳)有限公司 Data processing method, device and equipment based on block chain and storage medium
CN114780932A (en) * 2022-06-21 2022-07-22 中铁电气化局集团有限公司 Cross-block chain data interaction verification method, system and equipment for management three-mode platform
CN114780932B (en) * 2022-06-21 2022-09-02 中铁电气化局集团有限公司 Cross-block chain data interaction verification method, system and equipment for management three-mode platform

Also Published As

Publication number Publication date
CN109905368B (en) 2021-12-10

Similar Documents

Publication Publication Date Title
CN109905368A (en) Across the chain data interaction of block chain and verification method, block catenary system and storage medium
AU2021203184B2 (en) Transaction messaging
US11366924B2 (en) Block chain-based data query method, server and storage medium
JP4620248B2 (en) Method for authenticating a smart card in a message exchange network
CN107330337A (en) Date storage method, device, relevant device and the cloud system of mixed cloud
JP2016515235A5 (en)
CN105574445B (en) A kind of safety communicating method and device of self-help terminal equipment hardware
CN109688098B (en) Method, device and equipment for secure communication of data and computer readable storage medium
CN106130716A (en) Cipher key exchange system based on authentication information and method
CN110690956B (en) Bidirectional authentication method and system, server and terminal
CN109428867A (en) A kind of message encipher-decipher method, network equipment and system
CN102916970B (en) Network-based PIN cache method
CN109922047B (en) Image transmission system and method
CN107426193A (en) For hardware-accelerated novel I/O paths design in a kind of https applications
CN108599926A (en) A kind of HTTP-Digest modified AKA identity authorization systems and method based on pool of symmetric keys
CN109614789A (en) A kind of verification method and equipment of terminal device
CN105897737A (en) Method for safe exchange of data
CN114785524A (en) Electronic seal generation method, device, equipment and medium
CN117240625B (en) Tamper-resistant data processing method and device and electronic equipment
CN107169317A (en) A kind of method and device that LUA scripts are encrypted
CN110493265A (en) The method and storage medium of encryption data
CN110532814A (en) Data processing equipment and operation method for this
CN105306437B (en) A kind of encryption of network security and method of calibration
CN107133517A (en) A kind of data restoration method encrypted and calculated based on data in EMS memory
CN109739875A (en) Core protects method, apparatus and system

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
GR01 Patent grant
GR01 Patent grant