CN108876369B - Block chain-based data communication method and device and computer-readable storage medium - Google Patents

Block chain-based data communication method and device and computer-readable storage medium Download PDF

Info

Publication number
CN108876369B
CN108876369B CN201810567633.9A CN201810567633A CN108876369B CN 108876369 B CN108876369 B CN 108876369B CN 201810567633 A CN201810567633 A CN 201810567633A CN 108876369 B CN108876369 B CN 108876369B
Authority
CN
China
Prior art keywords
chain
transaction
cross
request
data communication
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.)
Active
Application number
CN201810567633.9A
Other languages
Chinese (zh)
Other versions
CN108876369A (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.)
Shanghai Heshu Software Co ltd
Original Assignee
Shanghai Heshu Software 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 Shanghai Heshu Software Co ltd filed Critical Shanghai Heshu Software Co ltd
Priority to CN201810567633.9A priority Critical patent/CN108876369B/en
Publication of CN108876369A publication Critical patent/CN108876369A/en
Application granted granted Critical
Publication of CN108876369B publication Critical patent/CN108876369B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3825Use of electronic signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • H04L9/3255Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures using group based signatures, e.g. ring or threshold signatures

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • Accounting & Taxation (AREA)
  • Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • Finance (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention discloses a data communication method based on a block chain, which comprises the following steps: when a cross-chain transaction request is received, acquiring transaction information corresponding to the cross-chain transaction request, and constructing the transaction information as test transaction information; verifying the test transaction information and determining whether the test transaction information is valid; and when the test transaction information passes the verification, determining that the test transaction information is valid, and executing the operation corresponding to the cross-chain transaction request. The invention also discloses a data communication device based on the block chain and a computer readable storage medium. The invention realizes efficient and rapid cross-chain transaction while ensuring safe transaction, avoids centralization of a cross-chain consensus region, improves the safety and reliability of the cross-chain transaction, and ensures the privacy safety of both parties of the transaction.

Description

Block chain-based data communication method and device and computer-readable storage medium
Technical Field
The present invention relates to the field of data communication, and in particular, to a data communication method and apparatus based on a block chain, and a computer-readable storage medium.
Background
The block chain is a permanent non-reversible record formed by overlapping (linking) encrypted data (blocks) according to time sequence, and is a credit voucher formed by computer encryption technology. The block chain technology belongs to a mode of citizen participation accounting, and has five characteristics of decentralization, openness, autonomy, information non-tamper property, anonymity and the like. These characteristics make the blockchain technology have certain advantages in the application of various fields, can reduce the auditing and clearing cost, reduce the distrust to the central node, and make the flow of assets more transparent.
The current blockchain system usually adopts a bidirectional anchoring method, the access threshold of other chains is too high when the other chains are accessed to the current blockchain, in the process of performing cross-chain transaction between the original chain and the current blockchain, the cross-chain transaction is realized mainly by adding script extension which is proved by identifying and verifying SPV (SPV) on the original chain, and various mechanisms of the original chain need to be modified, so that the problems of difficult transaction and low efficiency during the cross-chain transaction between the chains are caused.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a data communication method and device based on a block chain and a computer readable storage medium, and aims to solve the technical problems of difficult transaction and low efficiency in cross-chain transaction.
In order to achieve the above object, the present invention provides a data communication method based on a block chain, including the following steps:
when a cross-chain transaction request is received, acquiring transaction information corresponding to the cross-chain transaction request, and constructing the transaction information as test transaction information;
verifying the test transaction information and determining whether the test transaction information is valid;
and when the test transaction information passes the verification, determining that the test transaction information is valid, and executing the operation corresponding to the cross-chain transaction request.
In one embodiment, the step of verifying the test transaction information comprises:
determining a cross-chain consensus region of a source chain and a target chain corresponding to the cross-chain transaction request;
verifying the test transaction information based on the cross-chain consensus region.
In one embodiment, the step of verifying the test transaction information based on the cross-chain consensus region comprises:
acquiring a ring signature of the test transaction information;
and verifying the validity of the ring signature, and determining that the test transaction information passes the verification when the ring signature is verified to be legal.
In one embodiment, the step of constructing the transaction information as test transaction information comprises:
constructing a one-time account of the target account corresponding to the cross-chain transaction request;
and constructing the transaction information as test transaction information based on the one-time account.
In one embodiment, the step of executing the operation corresponding to the cross-chain transaction request includes:
and when the cross-chain transaction request is a data transfer request, transferring the transaction assets in the transaction information corresponding to the data transfer request to a target account on a target chain.
In an embodiment, after the step of transferring the transaction asset in the transaction information corresponding to the data transfer request to the target account on the target chain when the cross-chain transaction request is the data transfer request, the block chain-based data communication method further includes:
determining whether the transaction corresponding to the cross-chain transaction request is successful;
and when the transaction corresponding to the cross-chain transaction request is determined to be successful, obtaining receipt information of the successful transaction, and returning the receipt information to the source account corresponding to the cross-chain transaction request.
In an embodiment, after the step of determining whether the transaction corresponding to the cross-chain transaction request is successful, the method for data communication based on blockchain further includes:
and when determining that the transaction corresponding to the cross-chain transaction request fails, transferring the transaction assets in the transaction information back to the source account of the source chain corresponding to the cross-chain transaction request.
In one embodiment, the step of determining whether the transaction corresponding to the cross-chain transaction request is successful includes:
acquiring an execution result of the intelligent contract;
and determining whether the transaction corresponding to the cross-chain transaction request is successful or not according to the execution result.
In addition, to achieve the above object, the present invention also provides a data communication apparatus based on a block chain, including: a memory, a processor and a blockchain based data communication program stored on the memory and executable on the processor, the blockchain based data communication program implementing the steps of the blockchain based data communication method as described above when executed by the processor.
Further, to achieve the above object, the present invention also provides a computer readable storage medium having stored thereon a block chain based data communication program, which when executed by a processor, implements the steps of the block chain based data communication method as described above.
According to the invention, through the data communication method based on the block chain, when a cross-chain transaction request is received, transaction information corresponding to the cross-chain transaction request is obtained, and the transaction information is constructed to be test transaction information; verifying the test transaction information and determining whether the test transaction information is valid; when the test transaction information passes verification, the test transaction information is determined to be valid, and the operation corresponding to the cross-chain transaction request is executed, so that the cross-chain transaction is efficiently and quickly realized while the safety transaction is guaranteed, the centralization of a cross-chain consensus area is avoided, the safety and the reliability of the cross-chain transaction are improved, and the privacy safety of both sides of the transaction is guaranteed.
Drawings
Fig. 1 is a schematic structural diagram of a terminal belonging to a data communication device based on a block chain in a hardware operating environment according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a block chain-based data communication method according to a first embodiment of the present invention;
fig. 3 is a flowchart illustrating a block chain-based data communication method according to a second embodiment of the present invention;
FIG. 4 is a schematic diagram of a cross-chain consensus region of the block chain-based data communication method according to the present invention;
fig. 5 is a flowchart illustrating a data communication method based on a block chain according to a third embodiment of the present invention;
fig. 6 is a flowchart illustrating a fourth embodiment of a data communication method based on a block chain according to the present invention;
fig. 7 is a flowchart illustrating a sixth embodiment of a data communication method based on a block chain according to the present invention;
fig. 8 is a flowchart illustrating a seventh embodiment of a data communication method based on a block chain according to the present invention;
fig. 9 is a flowchart illustrating an eighth embodiment of a data communication method based on a block chain according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, fig. 1 is a schematic structural diagram of a terminal to which a data communication device based on a block chain in a hardware operating environment according to an embodiment of the present invention belongs.
The terminal of the embodiment of the invention can be a PC, and can also be a mobile terminal device with a display function, such as a smart phone, a tablet computer, an electronic book reader, an MP3(Moving Picture Experts Group Audio Layer III, dynamic video Experts compress standard Audio Layer 3) player, an MP4(Moving Picture Experts Group Audio Layer IV, dynamic video Experts compress standard Audio Layer 4) player, a portable computer, and the like.
As shown in fig. 1, the terminal may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Optionally, the terminal may further include a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, a WiFi module, and the like. Such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display screen according to the brightness of ambient light, and a proximity sensor that may turn off the display screen and/or the backlight when the mobile terminal is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), detect the magnitude and direction of gravity when the mobile terminal is stationary, and can be used for applications (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer and tapping) and the like for recognizing the attitude of the mobile terminal; of course, the mobile terminal may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which are not described herein again.
Those skilled in the art will appreciate that the terminal structure shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a block chain-based data communication program.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be used to invoke a blockchain based data communication program stored in the memory 1005.
When the processor 1001 calls the block chain-based data communication program stored in the memory 1005, the following operations are performed:
when a cross-chain transaction request is received, acquiring transaction information corresponding to the cross-chain transaction request, and constructing the transaction information as test transaction information;
verifying the test transaction information and determining whether the test transaction information is valid;
and when the test transaction information passes the verification, determining that the test transaction information is valid, and executing the operation corresponding to the cross-chain transaction request.
Further, the block chain based data communication program when executed by the processor further performs the following operations:
determining a cross-chain consensus region of a source chain and a target chain corresponding to the cross-chain transaction request;
verifying the test transaction information based on the cross-chain consensus region.
Further, the block chain based data communication program when executed by the processor further performs the following operations:
acquiring a ring signature of the test transaction information;
and verifying the validity of the ring signature, and determining that the test transaction information passes the verification when the ring signature is verified to be legal.
Further, the block chain based data communication program when executed by the processor further performs the following operations:
constructing a one-time account of the target account corresponding to the cross-chain transaction request;
and constructing the transaction information as test transaction information based on the one-time account.
Further, the block chain based data communication program when executed by the processor further performs the following operations:
and when the cross-chain transaction request is a data transfer request, transferring the transaction assets in the transaction information corresponding to the data transfer request to a target account on a target chain.
Further, the block chain based data communication program when executed by the processor further performs the following operations:
determining whether the transaction corresponding to the cross-chain transaction request is successful;
and when the transaction corresponding to the cross-chain transaction request is determined to be successful, obtaining receipt information of the successful transaction, and returning the receipt information to the source account corresponding to the cross-chain transaction request.
Further, the block chain based data communication program when executed by the processor further performs the following operations:
when determining that the transaction corresponding to the cross-chain transaction request fails, constructing a data transfer-back request of the transaction information;
and transferring the transaction assets in the transaction information back to the source account of the source chain corresponding to the cross-chain transaction request according to the data transfer-back request.
Further, the block chain based data communication program when executed by the processor further performs the following operations:
acquiring an execution result of the intelligent contract;
and determining whether the transaction corresponding to the cross-chain transaction request is successful or not according to the execution result.
The present invention provides a data communication method based on a block chain, and referring to fig. 2, fig. 2 is a schematic flow chart of a first embodiment of the data communication method based on the block chain according to the present invention.
In this embodiment, the data communication method based on the block chain includes:
step S100, when a cross-chain transaction request is received, acquiring transaction information corresponding to the cross-chain transaction request, and constructing the transaction information as test transaction information;
in this embodiment, the cross-chain transaction request is a cross-chain transaction request sent by an initiator of the cross-chain transaction request, where a link where the initiator corresponding to the cross-chain transaction request is located is a source chain, and the source chain may be a main chain or a side chain in the current block chain system; the link where the receiver corresponding to the cross-link transaction request is located is the target link, which may also be the corresponding side chain or main chain in the current block chain system. When a cross-chain transaction request sent by a source account based on a source chain in the blockchain system is received, it indicates that a transaction asset in transaction information corresponding to the cross-chain transaction request needs to be transferred to a target account on a target chain currently.
Specifically, when the cross-chain transaction request is received, the cross-chain transaction request is broadcast to a verification node in a cross-chain consensus region of the source chain and the target chain, and when the verification node receives the cross-chain transaction request, transaction information corresponding to the cross-chain transaction request is acquired, and corresponding test transaction information is constructed according to the transaction information. In order to ensure the safety of the current transaction, when the transaction information corresponding to the cross-chain transaction request is obtained, the transaction information can be constructed as the test transaction information according to the first account of the initiator of the transaction information and the second account of the target party corresponding to the transaction information. Specifically, the first account is a one-time account of a source account of a current initiator, and the second account is a one-time account established by the initiator to a target party. The initiator constructs transaction signature and contract use data in the intelligent contract through the corresponding private key, the first account and the second account. When the transaction signature and contract use data in the intelligent contract are obtained, the initiator randomly selects a plurality of signature accounts in the current block chain network to form a ring signature public key set (namely a ring signature) of the transaction information; and finally, the initiator constructs the transaction information into final test transaction information through the transaction signature, the contract use data and the ring signature.
Step S200, verifying the test transaction information and determining whether the test transaction information is valid;
in this embodiment, when the transaction information is constructed as test transaction information, the test transaction information is verified. Wherein a cross-chain consensus region exists between the side chain and the main chain; the chain-crossing consensus region comprises partial nodes of the main chain and the side chain respectively, and each node included in the chain-crossing consensus region is a verification node. According to the verification node, when the side chain and the main chain carry out cross-chain transaction, the current test transaction information can be identified and verified.
Specifically, a ring signature of the current test transaction information is obtained, where the ring signature is a signature public key set formed by a signer (i.e., an initiator of the current test transaction information) and a signature account randomly selected from a current blockchain account system. When the ring signature of the current test transaction information is obtained, a corresponding judgment result is obtained through a preset function according to the transaction content of the current test transaction information and the ring signature, and whether the ring signature is legal or not is determined according to the judgment result. If the judgment result accords with a preset judgment result, the ring signature is determined to be legal; and if the judgment result does not accord with the preset judgment result, determining that the ring signature is illegal. When the ring signature is determined to be legal, the current test transaction information is determined to be verified.
Step S300, when the test transaction information passes the verification, determining that the test transaction information is valid, and executing the operation corresponding to the cross-chain transaction request.
In this embodiment, when the test transaction information passes verification, the operation corresponding to the current cross-chain transaction request is executed. Wherein the cross-chain transaction request can be a data transfer request.
After the operation corresponding to the cross-chain transaction request is executed, it is necessary to determine whether the transaction corresponding to the current cross-chain transaction request is successful. And if the transaction corresponding to the current cross-chain transaction request is successful, acquiring the transaction success receipt information, and returning the receipt information to the source chain where the sender of the cross-chain transaction request is located.
According to the data communication method based on the block chain, when a cross-chain transaction request is received, transaction information corresponding to the cross-chain transaction request is obtained, the transaction information is constructed to be test transaction information, then the test transaction information is verified, whether the test transaction information is valid or not is determined, then when the test transaction information is verified to be passed, the test transaction information is determined to be valid, and operation corresponding to the cross-chain transaction request is executed, so that efficient and rapid cross-chain transaction is achieved while safety transaction is guaranteed, centralization of a cross-chain common identification area is avoided, safety and reliability of the cross-chain transaction are improved, and privacy safety of both sides of the transaction are guaranteed.
Based on the first embodiment, a second embodiment of the data communication method based on the block chain according to the present invention is proposed, and referring to fig. 3, in this embodiment, step S200 includes:
step S210, determining a cross-chain consensus area of a source chain and a target chain corresponding to the cross-chain transaction request;
step S220, verifying the test transaction information based on the cross-chain consensus region.
In this embodiment, a cross-chain consensus region exists between the side chain and the main chain, where the cross-chain consensus region includes partial nodes of the main chain and the side chain, respectively, as shown in fig. 4, fig. 4 is a schematic diagram of the cross-chain consensus region between the main chain and the side chain, and a cross-chain consensus region a and a cross-chain consensus region B exist between the main chain consensus chain and the side chain a consensus chain and the side chain B consensus chain, respectively; the chain-crossing consensus domain A is composed of a plurality of main chain consensus nodes in the main chain consensus chain and a plurality of A chain link points of the side chain A consensus chain, and the chain-crossing consensus domain B is composed of a plurality of main chain consensus nodes in the main chain consensus chain and a plurality of B chain link points of the side chain B consensus chain.
Each node included in the cross-chain consensus region is a verification node, and according to the verification node, consensus verification can be performed on the current test transaction information when cross-chain transaction is performed between the side chain and the main chain. Specifically, when the verification node is used for verifying the current test transaction information, a ring signature of the current test transaction information is obtained, where the ring signature is a signature public key set formed by a signer (i.e., an initiator of the current test transaction information) and a signature account randomly selected from a current blockchain account system. When the ring signature of the current test transaction information is obtained, a corresponding judgment result is obtained through a preset function according to the transaction content of the current test transaction information and the ring signature, and whether the ring signature is legal or not is determined according to the judgment result. If the judgment result accords with a preset judgment result, the ring signature is determined to be legal; and if the judgment result does not accord with the preset judgment result, determining that the ring signature is illegal. When the ring signature is determined to be legal, the current test transaction information is determined to be verified.
Particularly, in the cross-chain transaction, if a correct cross-chain transaction certificate is provided, the verification node can acquire a transaction reward of a corresponding share; if the verification node provides false cross-chain transaction certification in cross-chain transaction, whether the cross-chain transaction verification qualification of the node is cancelled and whether the deposit is deducted can be determined according to the number of the false cross-chain transaction certification.
According to the data communication method based on the block chain, the cross-chain common identification area of the source chain and the target chain corresponding to the cross-chain transaction request is determined, and then the test transaction information is verified based on the cross-chain common identification area, so that the verification of the test transaction information through the ring signature is realized, the anonymous protection of signer information is ensured when the transaction is carried out, the transaction signer cannot be tracked, and the information privacy protection of the block chain transaction is further realized.
Based on the second embodiment, a third embodiment of the data communication method based on the block chain according to the present invention is proposed, and referring to fig. 5, in this embodiment, step S200 includes:
step S221, acquiring a ring signature of the test transaction information;
step S222, verifying the validity of the ring signature, and determining that the test transaction information passes verification when the ring signature is verified to be valid.
In this embodiment, in order to ensure privacy and security of the transaction and make the initiator of the transaction information untraceable, the initiator of the transaction information performs a ring signature process on the transaction information. Specifically, when a signer (i.e. the initiator of the current test transaction information) constructs a ring signature of the transaction information, a plurality of accounts are randomly selected from a current block chain, the accounts are signature accounts, and the transaction information is jointly signed by the signature accounts and the signer, so that a ring signature public key set of the transaction information can be formed; and when the ring signature is constructed successfully, constructing final test transaction information according to the current transaction information and the ring signature. When the verification node verifies the legal information, the legal information is analyzed to obtain a ring signature and transaction information of the legal information, a corresponding judgment result is obtained through a preset function according to the transaction content and the ring signature of the current test transaction information, and whether the ring signature is legal or not is determined according to the judgment result. If the judgment result accords with a preset judgment result, the ring signature is determined to be legal; when the ring signature is determined to be legal, the current test transaction information is determined to be verified.
According to the data communication method based on the block chain, the ring signature of the test transaction information is obtained, then the validity of the ring signature is verified, when the ring signature is verified to be legal, the test transaction information is determined to be verified to be passed, the verification of the current test transaction information according to the ring signature is achieved, and further the information privacy protection of the block chain transaction is achieved during transaction.
Based on the first embodiment, a fourth embodiment of the data communication method based on the block chain according to the present invention is proposed, and referring to fig. 6, in this embodiment, step S100 includes:
step S110, constructing a one-time account of the target account corresponding to the cross-chain transaction request;
and step S120, constructing the transaction information as test transaction information based on the one-time account.
In this embodiment, when a cross-chain transaction request is received, in order to ensure privacy and security of a transaction, transaction information corresponding to the cross-chain transaction request is acquired, and the transaction information is constructed as test transaction information based on the transaction information, so that the transaction information is a safe and legal effective transaction in a transaction process.
Specifically, when the transaction information is acquired, the initiator of the transaction information acquires a one-time account of the initiator, namely a first account, and establishes a one-time account, namely a second account, for the target party corresponding to the transaction information; and when the first account and the second account are obtained, the initiator constructs a transaction signature and contract use data in the intelligent contract through the corresponding private key, the first account and the second account. When the transaction signature and contract use data in the intelligent contract are obtained, the initiator randomly selects a plurality of signature accounts in the current block chain network to form a ring signature public key set (namely a ring signature) of the transaction information; and finally, the initiator constructs the transaction information into final test transaction information through the transaction signature, the contract use data and the ring signature.
According to the data communication method based on the blockchain, the one-time account of the target account corresponding to the cross-chain transaction request is constructed, and then the transaction information is constructed as the test transaction information based on the one-time account, so that the one-time accounts of both transaction parties are established, the corresponding test transaction information is constructed through the one-time account, the privacy of both transaction parties is further protected, and the transaction safety is guaranteed.
A fifth embodiment of the data communication method based on a block chain according to the present invention is proposed based on the first embodiment.
In this embodiment, when the test transaction information corresponding to the cross-chain transaction request passes verification, it is determined whether the cross-chain transaction request is a data transfer-in request, and it may be determined whether the cross-chain transaction request is a data transfer-in request according to the identification information in the cross-chain transaction request. If the cross-chain transaction request is a data transfer request, it means that the transaction assets in the transaction information corresponding to the data transfer request are required to be transferred to the target account on the target chain at present.
Based on the fifth embodiment, a sixth embodiment of the data communication method based on the block chain of the present invention is proposed, and referring to fig. 7, in this embodiment, after step S300, the data communication method based on the block chain further includes:
step S330, determining whether the transaction corresponding to the cross-chain transaction request is successful;
step S340, when it is determined that the transaction corresponding to the cross-chain transaction request is successful, obtaining receipt information of the successful transaction, and returning the receipt information to the source account corresponding to the cross-chain transaction request.
In this embodiment, after the operation corresponding to the cross-chain transaction request is executed, it is determined whether the transaction corresponding to the current cross-chain transaction request is successful. Specifically, according to an execution result of the intelligent contract corresponding to the current transaction, whether the transaction corresponding to the current cross-chain transaction request is successful or not can be determined, and if the execution result is confirmed, the transaction corresponding to the current cross-chain transaction request is determined to be successful; and if the execution result is not confirmed, determining that the transaction corresponding to the current cross-chain transaction request fails. And when the transaction corresponding to the current cross-chain transaction request is determined to be successful, acquiring transaction success receipt information, and returning the receipt information to the source chain where the sender of the cross-chain transaction request is located, wherein the receipt information is identification information of the transaction success corresponding to the current cross-chain transaction request, and the source account of the source chain corresponding to the cross-chain transaction request can be used for determining that the current transaction is successfully executed according to the receipt information.
In the data communication method based on the blockchain, provided by this embodiment, by determining whether the transaction corresponding to the cross-chain transaction request is successful, and then obtaining receipt information of the successful transaction when determining that the transaction corresponding to the cross-chain transaction request is successful, and returning the receipt information to the source account corresponding to the cross-chain transaction request, it is achieved that whether the transaction corresponding to the cross-chain transaction request is successful is determined, so that the initiator can know the information in the first time when the current transaction is successfully executed.
Based on the sixth embodiment, a seventh embodiment of the data communication method based on the block chain of the present invention is proposed, and referring to fig. 8, in this embodiment, after step S330, the data communication method based on the block chain further includes:
step S350, when the transaction corresponding to the cross-chain transaction request is determined to be failed, constructing a data transfer-back request of the transaction information;
step S360, according to the data transfer-back request, transferring the transaction asset in the transaction information back to the source account of the source chain corresponding to the cross-chain transaction request.
In this embodiment, according to the transfer-in transaction information created for the transaction asset in the transaction information, it may be determined whether the transaction corresponding to the current cross-chain transaction request is successful, and if the transfer-in transaction information is confirmed, it is determined that the transaction corresponding to the current cross-chain transaction request is successful; and if the transfer-in transaction information is invalid, determining that the transaction corresponding to the current cross-chain transaction request fails. And when determining that the transaction corresponding to the current cross-chain transaction request fails, constructing a data transfer request of the current transaction information, and transferring the transaction assets in the transaction information back to the source account of the source chain corresponding to the cross-chain transaction request according to the data transfer request.
According to the data communication method based on the blockchain, provided by the embodiment, the data transfer request of the transaction information is constructed when the transaction corresponding to the cross-chain transaction request is determined to be failed, and then the transaction assets in the transaction information are transferred back to the source account of the source chain corresponding to the cross-chain transaction request according to the data transfer request, so that the transaction assets in the current transaction information are timely returned when the current transaction is not successfully executed, and the transaction efficiency of both parties of the transaction is improved.
Based on the seventh embodiment, an eighth embodiment of the data communication method based on the block chain of the present invention is proposed, and referring to fig. 9, in this embodiment, step S330 includes:
step S331, obtaining an execution result of the intelligent contract;
step S332, determining whether the transaction corresponding to the cross-chain transaction request is successful according to the execution result.
In this embodiment, when executing the transaction corresponding to the cross-chain transaction request, obtaining an execution result of the intelligent contract corresponding to the current transaction, and determining whether the transaction corresponding to the current cross-chain transaction request is successful, if the execution result is confirmed, determining that the transaction corresponding to the current cross-chain transaction request is successful; and if the execution result is not confirmed, determining that the transaction corresponding to the current cross-chain transaction request fails.
According to the data communication method based on the block chain, provided by the embodiment, the execution result of the intelligent contract is obtained, and then whether the transaction corresponding to the cross-chain transaction request is successful or not is determined according to the execution result, so that the efficient and rapid execution of the current cross-chain transaction through the intelligent contract is realized, and the real-time monitoring and feedback of the current transaction state are further realized according to the obtaining of the execution result of the intelligent contract.
Further, to achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon a block chain based data communication program, which when executed by a processor, performs the operations of:
when a cross-chain transaction request is received, acquiring transaction information corresponding to the cross-chain transaction request, and constructing the transaction information as test transaction information;
verifying the test transaction information and determining whether the test transaction information is valid;
and when the test transaction information passes the verification, determining that the test transaction information is valid, and executing the operation corresponding to the cross-chain transaction request.
Further, the block chain based data communication program when executed by the processor further performs the following operations:
determining a cross-chain consensus region of a source chain and a target chain corresponding to the cross-chain transaction request;
verifying the test transaction information based on the cross-chain consensus region.
Further, the block chain based data communication program when executed by the processor further performs the following operations:
acquiring a ring signature of the test transaction information;
and verifying the validity of the ring signature, and determining that the test transaction information passes the verification when the ring signature is verified to be legal.
Further, the block chain based data communication program when executed by the processor further performs the following operations:
constructing a one-time account of the target account corresponding to the cross-chain transaction request;
and constructing the transaction information as test transaction information based on the one-time account.
Further, the block chain based data communication program when executed by the processor further performs the following operations:
and when the cross-chain transaction request is a data transfer request, transferring the transaction assets in the transaction information corresponding to the data transfer request to a target account on a target chain.
Further, the block chain based data communication program when executed by the processor further performs the following operations:
determining whether the transaction corresponding to the cross-chain transaction request is successful;
and when the transaction corresponding to the cross-chain transaction request is determined to be successful, obtaining receipt information of the successful transaction, and returning the receipt information to the source account corresponding to the cross-chain transaction request.
Further, the block chain based data communication program when executed by the processor further performs the following operations:
when determining that the transaction corresponding to the cross-chain transaction request fails, constructing a data transfer-back request of the transaction information;
and transferring the transaction assets in the transaction information back to the source account of the source chain corresponding to the cross-chain transaction request according to the data transfer-back request.
Further, the block chain based data communication program when executed by the processor further performs the following operations:
acquiring an execution result of the intelligent contract;
and determining whether the transaction corresponding to the cross-chain transaction request is successful or not according to the execution result.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (9)

1. A data communication method based on a block chain is characterized in that the data communication method based on the block chain comprises the following steps:
when a cross-chain transaction request is received, acquiring transaction information corresponding to the cross-chain transaction request, constructing a one-time account of a target account corresponding to the cross-chain transaction request, and constructing the transaction information as test transaction information based on the one-time account;
verifying the test transaction information and determining whether the test transaction information is valid;
and when the test transaction information passes the verification, determining that the test transaction information is valid, and executing the operation corresponding to the cross-chain transaction request.
2. The blockchain-based data communication method of claim 1, wherein the step of verifying the test transaction information includes:
determining a cross-chain consensus region of a source chain and a target chain corresponding to the cross-chain transaction request;
verifying the test transaction information based on the cross-chain consensus region.
3. The blockchain-based data communication method of claim 2, wherein the step of verifying the test transaction information based on the cross-chain consensus region includes:
acquiring a ring signature of the test transaction information;
and verifying the validity of the ring signature, and determining that the test transaction information passes the verification when the ring signature is verified to be legal.
4. The blockchain-based data communication method of claim 1, wherein the step of performing the operation corresponding to the cross-chain transaction request includes:
and when the cross-chain transaction request is a data transfer request, transferring the transaction assets in the transaction information corresponding to the data transfer request to a target account on a target chain.
5. The blockchain-based data communication method according to claim 4, wherein after the step of transferring the transaction asset in the transaction information corresponding to the data transfer request to the target account on the target chain when the cross-chain transaction request is a data transfer request, the blockchain-based data communication method further comprises:
determining whether the transaction corresponding to the cross-chain transaction request is successful;
and when the transaction corresponding to the cross-chain transaction request is determined to be successful, obtaining receipt information of the successful transaction, and returning the receipt information to the source account corresponding to the cross-chain transaction request.
6. The blockchain-based data communication method of claim 5, wherein after the step of determining whether the transaction corresponding to the cross-chain transaction request is successful, the blockchain-based data communication method further comprises:
when determining that the transaction corresponding to the cross-chain transaction request fails, constructing a data transfer-back request of the transaction information;
and transferring the transaction assets in the transaction information back to the source account of the source chain corresponding to the cross-chain transaction request according to the data transfer-back request.
7. The blockchain-based data communication method of claim 6, wherein the step of determining whether the transaction corresponding to the cross-chain transaction request is successful comprises:
acquiring an execution result of the intelligent contract;
and determining whether the transaction corresponding to the cross-chain transaction request is successful or not according to the execution result.
8. A blockchain based data communication apparatus, the blockchain based data communication apparatus comprising: memory, a processor and a blockchain based data communication program stored on the memory and executable on the processor, which when executed by the processor implements the steps of the blockchain based data communication method according to any one of claims 1 to 7.
9. A computer-readable storage medium, on which a blockchain-based data communication program is stored, which when executed by a processor implements the steps of the blockchain-based data communication method according to any one of claims 1 to 7.
CN201810567633.9A 2018-06-05 2018-06-05 Block chain-based data communication method and device and computer-readable storage medium Active CN108876369B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810567633.9A CN108876369B (en) 2018-06-05 2018-06-05 Block chain-based data communication method and device and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810567633.9A CN108876369B (en) 2018-06-05 2018-06-05 Block chain-based data communication method and device and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN108876369A CN108876369A (en) 2018-11-23
CN108876369B true CN108876369B (en) 2021-07-13

Family

ID=64335056

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810567633.9A Active CN108876369B (en) 2018-06-05 2018-06-05 Block chain-based data communication method and device and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN108876369B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109660354A (en) * 2018-12-12 2019-04-19 深圳市网心科技有限公司 A kind of communication means based on block chain, device, system and medium
EP3590084B1 (en) * 2019-03-04 2022-05-11 Advanced New Technologies Co., Ltd. Methods and devices for testing signature verification for blockchain system
CN110223178A (en) * 2019-06-06 2019-09-10 杭州趣链科技有限公司 It is a kind of for alliance's chain across catenary system and across chain method
CN110288345B (en) * 2019-06-26 2022-04-05 深圳市迅雷网络技术有限公司 Cross-link communication method, device, main chain node and storage medium
CN110517029B (en) * 2019-08-29 2024-02-23 深圳市迅雷网络技术有限公司 Method, device, equipment and blockchain system for verifying blockchain cross-chain transaction
CN111010441B (en) * 2019-12-18 2022-12-13 深圳市迅雷网络技术有限公司 Block chain cross-chain method and system and electronic equipment
CN111181968B (en) * 2019-12-30 2021-09-21 北京金山云网络技术有限公司 Cross-block chain communication method and device, cross-chain service system and cross-chain transaction system
CN111368003B (en) * 2020-03-06 2020-10-16 安徽中科智链信息科技有限公司 Management method of multi-chain anchoring data
CN111640017B (en) * 2020-05-06 2024-05-28 深圳前海微众银行股份有限公司 Transaction correctness verification method and device applied to alliance chain cross-chain transfer
CN111741114B (en) * 2020-06-24 2023-05-16 陈鹏 Chain-of-block-based supervision cross-chain interaction system, method and equipment
CN112804262B (en) * 2021-03-19 2021-07-27 北京万物智链科技有限公司 Safety guarantee method and system in block chain cross-chain communication
CN117010890A (en) * 2022-04-28 2023-11-07 腾讯科技(深圳)有限公司 Block chain-based transaction processing method, related device, medium and program product

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6385725B1 (en) * 1998-08-24 2002-05-07 Entrust Technologies Limited System and method for providing commitment security among users in a computer network
US8288473B2 (en) * 2005-12-19 2012-10-16 Bridgestone Corporation Disk-like nanoparticles
CN105719185B (en) * 2016-01-22 2019-02-15 杭州复杂美科技有限公司 The data comparison and common recognition method of block chain
CN107085810A (en) * 2017-04-19 2017-08-22 朱皞罡 Across the chain operating method and block chain management system of a kind of block chain
CN107424073A (en) * 2017-07-17 2017-12-01 杭州复杂美科技有限公司 A kind of method of across chain numeral credits transaction
CN107742210A (en) * 2017-10-13 2018-02-27 布比(北京)网络技术有限公司 Across the chain fund transfer system and method for a kind of different blocks interchain

Also Published As

Publication number Publication date
CN108876369A (en) 2018-11-23

Similar Documents

Publication Publication Date Title
CN108876369B (en) Block chain-based data communication method and device and computer-readable storage medium
CN109472166B (en) Electronic signature method, device, equipment and medium
CN110826043B (en) Digital identity application system and method, identity authentication system and method
CN105306204B (en) Security verification method, device and system
CN107766747B (en) Method for verifying integrity of application program installation package, mobile terminal and server
CN109039990B (en) Behavior verification method and device based on verification code
US9225700B1 (en) Proximity-based authentication
CN104683104B (en) The method, apparatus and system of authentication
CN104967586A (en) User identity authentication method, user identity authentication apparatus and user identity authentication system
CN108305065B (en) Data processing method, terminal equipment and data processing system
CN105656627A (en) Identity verification method, device and system
CN109768977A (en) Streaming medium data processing method, device and relevant device and medium
CN108833515B (en) Block chain node optimization method and device and computer readable storage medium
CN112865956A (en) Certificate updating method and device, terminal equipment and server
CN106060027B (en) Method, apparatus, equipment and the system verified based on identifying code
CN115102744B (en) Data access method and device
US20150090781A1 (en) Method And Apparatus For Implementing Action Instruction Based On Barcode
CN106357684B (en) Game application program login method and device
CN108092947B (en) Method and device for identity authentication of third-party application
CN109150880B (en) Data transmission method, device and computer readable storage medium
US20200184430A1 (en) Electronic ticket management system, electronic ticket management method and electronic ticket management program
US11425568B2 (en) Electronic device and controlling method of electronic device
US11775688B2 (en) Information processing device and information processing method
US20080276094A1 (en) Communication terminal device, server apparatus, data management method and recording medium
CN114528533A (en) Authentication method, terminal, handwriting pen 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