CN111080300A - Asset transfer method and device based on block chain and hardware equipment - Google Patents

Asset transfer method and device based on block chain and hardware equipment Download PDF

Info

Publication number
CN111080300A
CN111080300A CN202010025030.3A CN202010025030A CN111080300A CN 111080300 A CN111080300 A CN 111080300A CN 202010025030 A CN202010025030 A CN 202010025030A CN 111080300 A CN111080300 A CN 111080300A
Authority
CN
China
Prior art keywords
transaction
party
transaction party
wallet
intelligent contract
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010025030.3A
Other languages
Chinese (zh)
Inventor
不公告发明人
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Liannong Shenzhen Information Technology Co Ltd
Original Assignee
Liannong Shenzhen Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Liannong Shenzhen Information Technology Co Ltd filed Critical Liannong Shenzhen Information Technology Co Ltd
Priority to CN202010025030.3A priority Critical patent/CN111080300A/en
Publication of CN111080300A publication Critical patent/CN111080300A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • 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

Abstract

The invention discloses an asset transfer method, an asset transfer device and hardware equipment based on a block chain, relates to the technical field of block chains, and is used for ensuring the safety of asset transfer in the block chain. The main technical scheme is as follows: after receiving a request for triggering execution of an intelligent contract sent by a first trading party in a first blockchain system, verifying a signature of the first trading party; if the verification is passed, decrypting the wallet encryption address of the first transaction party and the intelligent contract to obtain the wallet address of the first transaction party and the evidence-passing content in the intelligent contract; determining a certification passing encryption key at the current time point through the wallet address of the second trading party and the wallet address of the first trading party, and encrypting the wallet address and the certification passing content of the first trading party through the certification passing encryption key to obtain an encrypted certification passing; and sending the intelligent contract containing the encrypted pass certificate to the second trading party, so that the second trading party executes the transaction between the first trading party and the second trading party.

Description

Asset transfer method and device based on block chain and hardware equipment
Technical Field
The invention relates to the technical field of block chains, in particular to an asset transfer method, an asset transfer device and hardware equipment based on a block chain.
Background
The block chain is a recording technology different from the traditional centralized accounting mode, participates in nodes on the block chain system, possibly does not belong to the same organization and does not need to trust each other; the blockchain data is maintained by all nodes together, and each node participating in maintenance can obtain a copy of the complete record. Compared with the traditional accounting technology, the method has the characteristics that: maintaining a chain which grows continuously, only adding records possibly, and the records which occur cannot be tampered; can achieve the consensus without centralized control.
The chain crossing means that information and values on originally different and independent block chains are exchanged and circulated through technical means. Confirming the transaction by the block chain, namely confirming that the transaction has occurred and the block book is written in; secondly, the transaction is confirmed by enough blocks of the system, so that the probability of transaction invalidation caused by node cheating, double payment generation and the like is very low. The blockchain system is a closed system, and lacks a mechanism for actively acquiring external information, so it is not easy to determine the transaction status of another chain, and thus how to ensure the security of cross-chain asset transfer is an urgent problem to be solved at present.
Disclosure of Invention
The invention provides an asset transfer method and device based on a block chain, computer equipment and a storage medium, which are used for ensuring the safety of asset transfer of a block chain system.
The embodiment of the invention provides an asset transfer method based on a block chain, which comprises the following steps:
acquiring wallet encryption addresses of each transaction node sent by a first block chain system and a second block chain system, wherein the wallet encryption addresses are obtained by encrypting according to a secret key of the transaction node; each transaction node corresponds to a transaction party;
after receiving a request for triggering execution of an intelligent contract, which is sent by a first trading party in the first blockchain system, verifying a signature of the first trading party;
if the signature of the first transaction party passes the verification, decrypting the wallet encrypted address of the first transaction party and the intelligent contract to obtain the wallet address of the first transaction party and the evidence-passing content in the intelligent contract, wherein the evidence-passing content comprises a second transaction party, a transaction amount and a transaction type, and the second transaction party is a transaction object corresponding to the first transaction party in the second block chain system;
decrypting the wallet encrypted address of the second transaction party to obtain a wallet address of the second transaction party;
determining a certification passing encryption key at the current time point through the wallet address of the second transaction party and the wallet address of the first transaction party, and encrypting the wallet address and the certification passing content of the first transaction party through the certification passing encryption key to obtain an encrypted certification passing;
sending the intelligent contract containing the encrypted pass to a second trading party in the second blockchain system, so that the second trading party decrypts the encrypted pass in the intelligent contract to execute the transaction between the first trading party and the second trading party.
The embodiment of the invention provides an asset transfer device based on a block chain, which comprises:
the acquisition module is used for acquiring wallet encryption addresses of the transaction nodes sent by the first block chain system and the second block chain system, and the wallet encryption addresses are obtained by encrypting the wallet encryption addresses according to secret keys of the transaction nodes; each transaction node corresponds to a transaction party;
the verification module is used for verifying the signature of the first trading party after receiving a triggering execution intelligent contract request sent by the first trading party in the first blockchain system;
the obtaining module is used for decrypting the wallet encrypted address of the first transaction party and the intelligent contract if the signature of the first transaction party passes verification, and obtaining the wallet address of the first transaction party and the evidence-passing content in the intelligent contract, wherein the evidence-passing content comprises a second transaction party, a transaction amount and a transaction type, and the second transaction party is a transaction object corresponding to the first transaction party in the second block chain system;
the decryption module is used for decrypting the wallet encryption address of the second transaction party to obtain the wallet address of the second transaction party;
the encryption module is further configured to determine a certification-passing encryption key at a current time point through the wallet address of the second transaction party and the wallet address of the first transaction party, and encrypt the wallet address and the certification-passing content of the first transaction party through the certification-passing encryption key to obtain an encrypted certification-passing;
and the sending module is used for sending the intelligent contract containing the encrypted certificate to a second trading party in the second blockchain system, so that the second trading party decrypts the encrypted certificate in the intelligent contract to execute the transaction between the first trading party and the second trading party.
A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the above-described blockchain-based asset transfer method when executing the computer program.
A computer-readable storage medium, storing a computer program which, when executed by a processor, implements the above blockchain-based asset transfer device.
The invention provides an asset transfer method, an asset transfer device, computer equipment and a storage medium based on a blockchain, which are used for acquiring wallet encrypted addresses of transaction nodes sent by a first blockchain system and a second blockchain system; after receiving a request for triggering execution of an intelligent contract sent by a first transaction party in a first blockchain system, verifying a signature of the first transaction party; if the verification is passed, decrypting the wallet encryption address of the first transaction party and the intelligent contract to obtain the wallet address of the first transaction party and the evidence-passing content in the intelligent contract; decrypting the wallet encrypted address of the second transaction party to obtain the wallet address of the second transaction party; determining a certification passing encryption key at the current time point through the wallet address of the second trading party and the wallet address of the first trading party, and encrypting the wallet address and the certification passing content of the first trading party through the certification passing encryption key to obtain an encrypted certification passing; and sending the intelligent contract containing the encrypted pass certificate to a second trading party in the second blockchain system, so that the second trading party decrypts the encrypted pass certificate in the intelligent contract to execute the transaction between the first trading party and the second trading party. According to the invention, after a transaction is initiated, transaction nodes in the first blockchain system and the second blockchain sequentially verify a first transaction party initiating the transaction, generate a new certificate-passing encryption key after the verification is passed, encrypt a wallet address and certificate-passing content of the first transaction party according to the certificate-passing encryption key, and then send the encrypted certificate-passing to a second transaction party in the second blockchain system, so that the second transaction party executes the transaction with the second transaction party according to the encrypted certificate-passing, and thus the security of asset transfer of the blockchain system is ensured.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
FIG. 1 is a flow diagram of a blockchain-based asset transfer method in one embodiment of the invention;
FIG. 2 is a flow chart of a method of determining a certified encryption key in accordance with one embodiment of the present invention;
FIG. 3 is a detailed flow diagram of executing an intelligent contract in one embodiment of the invention;
FIG. 4 is a functional block diagram of a blockchain-based asset transfer device in accordance with an embodiment of the present invention;
FIG. 5 is a schematic diagram of a computer device according to an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In one embodiment, as shown in fig. 1, there is provided a blockchain-based asset transfer method applied to a central node connected to a first blockchain system and a second blockchain system, including the steps of:
s10, obtaining the wallet encrypted address of each transaction node sent by the first blockchain system and the second blockchain system.
The first blockchain system and the second blockchain system are different blockchain systems, and the transaction of the transaction node between the first blockchain system and the second blockchain system needs to be performed with cross-chain transaction. The wallet encryption address is obtained by encrypting according to the secret key of the transaction node; each transaction node corresponds to a transaction party, a secret key of the transaction node is a private key in a blockchain system where the transaction node is located, a wallet encryption address is obtained by encrypting a wallet address through the private key, the wallet address of each transaction node is used for representing an address of an account where the corresponding transaction party is located, payment transaction and other transactions can be achieved through the address of the account, and the embodiment of the invention is not particularly limited.
It should be noted that before acquiring the wallet encrypted addresses of the transaction nodes sent by the first blockchain system and the second blockchain system, each blockchain system needs to deploy the blockchain system through a deployment script, and then determines whether the node service is successfully deployed according to the logs of the nodes in the blockchain system. Specifically, after the blockchain system is deployed through the deployment script, logs corresponding to each node in the blockchain system are obtained, and then whether each node is started successfully is determined through analyzing the logs of each node.
The user who needs to participate in the intelligent contract must register as the user of the blockchain first, namely after the transaction side sends a registration account application to the blockchain, the blockchain system returns a pair of public key and private key to the transaction side. The public key is used as an account address of the user on the block chain, and the private key is used as a unique key for operating the account. Then, more than two users in the transaction party agree a promise contract according to the needs, the contract comprises the rights and obligations of both parties, the rights and obligations are designed and recorded in an electronic mode, the participants sign with respective private keys respectively to ensure the validity of the contract, and the signed intelligent contract is broadcasted in the block chain network.
And S20, after receiving a trigger execution intelligent contract request sent by a first transaction party in the first blockchain system, verifying the signature of the first transaction party.
In the embodiment of the present invention, after receiving a request for triggering execution of an intelligent contract sent by a first transaction party in a first blockchain system, a signature of the first transaction party is verified by a private key of the first transaction party, and if the signature passes verification, the process goes to step S30 to continue execution.
And S30, if the signature of the first transaction party is verified, decrypting the wallet encrypted address of the first transaction party and the intelligent contract to obtain the wallet address of the first transaction party and the evidence-obtaining content in the intelligent contract.
For the embodiment of the invention, the wallet encryption address of the first transaction party and the key for decrypting the intelligent contract are both the private keys corresponding to the first transaction party. And decrypting the wallet encrypted address to obtain the wallet address of the first transaction party, and decrypting the intelligent contract to obtain the evidence-passing content contained in the intelligent contract, wherein the evidence-passing content is the basis for the specific transaction of the two transaction parties. The content of the pass certificate includes a second transaction party, a transaction amount, a transaction type, and the like, and the embodiment of the present invention is not particularly limited. It should be noted that the second transaction party recorded in the content of the certificate of authenticity is a transaction object corresponding to the first transaction party in the second blockchain system, that is, a transaction object that needs to be transacted with the first transaction in another blockchain in the cross-chain transaction.
In another embodiment used by the present invention, after the signature verification of the first transaction part is passed, the wallet encrypted address of the first transaction part and the smart contract are decrypted, and before the wallet address of the first transaction part and the certified content in the smart contract are acquired, the method further comprises: acquiring CA digital certificates corresponding to the first transaction party and the second transaction party respectively; verifying whether the CA digital certificates corresponding to the first transaction party and the second transaction party are authenticated; if the CA digital certificates corresponding to the first transaction party and the second transaction party are authenticated, user identity information contained in the first transaction party and the second transaction party in the digital certificates is acquired respectively; verifying whether the user identity information corresponding to the first transaction party and the second transaction party respectively succeeds or not; and if the user identity information corresponding to the first transaction party and the second transaction party respectively is successfully verified, decrypting the wallet encrypted address of the first transaction party and the intelligent contract to obtain the wallet address of the first transaction party and the evidence-passing content in the intelligent contract.
The CA digital certificate contains a public key, a user trusts the CA by verifying the signature of the CA, and anyone can obtain the CA digital certificate to verify the certificate issued by the CA digital certificate. The CA digital certificate binds the public key with the user identity information of the applicant, and forms a certificate after signing the public key and the user identity information of the applicant, and then sends the certificate to the applicant.
In an embodiment of the present invention, before acquiring CA (electronic authentication service) digital certificates corresponding to the first transaction party and the second transaction party, the method further includes: the first trading party and the second trading party respectively send CA digital certificate acquisition requests to an authority server, wherein the CA digital certificate acquisition requests contain user identity information, so that the authority server can check a user through KYC (Know your customer) according to the user identity information; and the first transaction party and the second transaction party receive CA digital certificates sent by the authority server, wherein the CA digital certificates comprise user identity information, and the CA digital certificates are certificates approved by KYC.
After the CA digital certificates corresponding to the first transaction party and the second transaction party are authenticated, user identity information is obtained from the CA digital certificates of the first transaction party and the second transaction party respectively, namely, the CA digital certificates are decrypted through public keys corresponding to the CA digital certificates respectively, and user identity information contained in the first transaction party and the first transaction party is obtained from the CA digital certificates. And verifying whether the user identity information of the first transaction party and the second transaction party is successful or not, so as to further determine whether the first transaction party and the second transaction party are trusted users, and if the first transaction party and the second transaction party are both trusted users, decrypting the wallet encryption address of the first transaction party and the intelligent contract to obtain the wallet address of the first transaction party and the evidence-passing content in the intelligent contract.
And S40, decrypting the wallet encrypted address of the second transaction party to obtain the wallet address of the second transaction party.
For the embodiment of the invention, after the wallet encrypted address of the first transaction party and the intelligent contract are decrypted and the wallet address of the first transaction party and the evidence-passing content in the intelligent contract are obtained, the second transaction party corresponding to the first transaction party in the evidence-passing content is determined, then the wallet encrypted address of the second transaction party is obtained, and the wallet encrypted address of the second transaction party is decrypted through the private key of the second transaction party to obtain the wallet address of the second transaction party.
And S50, determining a certification passing encryption key at the current time point through the wallet address of the second transaction party and the wallet address of the first transaction party, and encrypting the wallet address of the first transaction party and the certification passing content through the certification passing encryption key to obtain encrypted certification passing.
Specifically, as shown in fig. 2, the determining a certified encryption key at a current time point by using the encrypted address of the second transaction part and the encrypted address of the first transaction part includes:
s501, obtaining a current time point, rounding the current time point and determining the current time point to be a minute.
And the current time point is the current running time point of the first block chain system, and the current time point is determined to be seconds. For example, the current time point is 11 months 11 days 13 in 2019: 00: 20, the time obtained by rounding the current time point is 13: 00. it should be noted that, if the rounding operation performed at the current time point is performed in the second following the minute exceeding 30 seconds, the minute is increased by one; if the seconds following the minute are less than 30 seconds, the seconds are discarded and the minute data remains unchanged.
And S502, splicing the wallet address of the second transaction party, the wallet address of the first transaction party and the rounded current time point to obtain a pass-certificate encryption key.
In the implementation of the present invention, in the process of obtaining the pass-certificate encryption key by splicing the wallet address of the second transaction party, the wallet address of the first transaction party, and the rounded current time point, specifically, the wallet address of the second transaction party, the wallet address of the first transaction party, and the sequence of the rounded current time point may be spliced, and the notification encryption key may also be obtained by splicing the sequence of the rounded current time point and the sequence of the rounded current time point, which is not limited in the embodiment of the present invention.
For the embodiment of the invention, after receiving a request for executing the intelligent contract sent by a first transaction party in a first block chain, a central node verifies the signature of the first transaction party, and after the verification is passed, the central node obtains wallet addresses of the first transaction party and a second transaction party and rounded current time points, and splices the wallet address of the second transaction party and the wallet address of the first transaction party and the rounded current time points to obtain a certification-passing encryption key, so that the wallet address and the certification-passing content of the first transaction party are encrypted by the certification-passing encryption key to obtain an encryption certification, thereby ensuring the security of the intelligent contract containing the encryption certification and further ensuring the security of the asset transfer of a block chain system.
And S60, sending the intelligent contract containing the encrypted certificate to a second trading party in a second blockchain system, so that the second trading party decrypts the encrypted certificate in the intelligent contract to execute the transaction between the first trading party and the second trading party.
Specifically, after receiving the intelligent contract sent by the central node, the second transaction party needs to decrypt the encrypted pass certificate in the intelligent contract to obtain the pass certificate content in the encrypted pass certificate, so as to execute the transaction between the first transaction party and the second transaction party according to the pass certificate content.
In one embodiment provided by the present invention, before performing the transaction between the first transaction part and the second transaction part according to the content of the pass-through and the wallet address of the first transaction part, the method further comprises: broadcasting the intelligent contracts to other transaction nodes in the first blockchain system and the second blockchain system; detecting whether signature authentication of a preset number of other transaction nodes on the intelligent contract is obtained; and if the signature authentication of the intelligent contract by the preset number of other transaction nodes is acquired, executing the transaction between the first transaction party and the second transaction party according to the certification content and the wallet address of the first transaction party. The preset number may be set according to actual requirements, for example, the preset number may be determined according to the total number of the transaction nodes in the blockchain system, and specifically, the preset number may be set to half the number of the transaction nodes in the blockchain system.
In the embodiment of the invention, the intelligent contracts are broadcasted to other transaction nodes in the first blockchain system and the second blockchain system; detecting whether signature authentication of a preset number of other transaction nodes on the intelligent contract is obtained; if the signature authentication of the intelligent contract by the preset number of other transaction nodes is acquired, the party can execute the contents in the intelligent contract according to the certified contents and the wallet addresses of the first transaction party and the second transaction party, and the safety of asset transfer in the block chain system can be further ensured.
Specifically, as shown in fig. 3, the decrypting, by the second transaction part, the encrypted certificate in the smart contract to execute the transaction between the first transaction part and the second transaction part includes:
s601, determining the time point of receiving the intelligent contract, rounding the time point of the intelligent contract and determining the time point to be minute.
Specifically, after receiving the intelligent contract sent by the central node, the second transaction part determines the time for receiving the intelligent contract, and then the time point for receiving the intelligent contract is rounded to be determined in units of minutes. For example, the time point of the smart contract is 11 months, 11 days, 13 in 2019: 00: 40, the time obtained by rounding off this point in time is 13: 01.
and S602, subtracting the preset time from the time point of the intelligent contract which is rounded to be determined to be the minute to obtain the target time.
The preset time can be set according to actual requirements, if the transfer transaction is required to be completed within 1 minute in the actual transaction, if the transfer transaction is not completed within 1 minute, the application needs to be initiated again, and the preset time can be set to be 1 minute in the embodiment of the invention. For example, rounding off gives a time of 13: 01, the preset time is 1 minute, the target time is 13: 00.
and S603, splicing the wallet address of the second transaction party, the wallet address of the first transaction party and the target time to obtain a certification decryption key.
It should be noted that the splicing sequence obtained by splicing according to the wallet address of the second transaction party, the wallet address of the first transaction party, and the target time needs to be the same as the sequence obtained in the step S502 to obtain the passport decryption key corresponding to the passport encryption key, so that the decryption of the encrypted passport can be realized by the passport decryption key.
S604, the encrypted certificate in the intelligent contract is decrypted through the certificate-passing decryption key, and the wallet address and the certificate-passing content of the first transaction party in the encrypted certificate-passing are obtained.
The content of the pass certificate includes transaction amount, transaction type, transaction mode, transaction time, and the like, and the embodiment of the present invention is not particularly limited.
S605, executing the transaction between the first transaction party and the second transaction party according to the content of the certificate and the wallet address of the first transaction party.
In the embodiment of the invention, after the encrypted certificate in the smart contract is decrypted by the certificate-passing decryption key and the wallet address and the certificate-passing content of the first transaction party in the encrypted certificate are acquired, the transaction between the first transaction party and the second transaction party is executed according to the certificate-passing content and the wallet address of the first transaction party. For example, if the transaction between the first transaction party and the second transaction party is a transfer transaction, the transfer amount in the evidence-passing content is 100 yuan, the transfer party is the first transaction party, and the transferred party is the second transaction party, the transfer party acquires 100 yuan from the transfer amount through the wallet address of the first transaction party and transfers the acquired information to the wallet address of the second transaction party, so that the transfer transaction between the first transaction party and the second transaction party is realized.
The invention provides an asset transfer method based on a blockchain, which comprises the steps of obtaining wallet encryption addresses of transaction nodes sent by a first blockchain system and a second blockchain system; after receiving a request for triggering execution of an intelligent contract sent by a first transaction party in a first blockchain system, verifying a signature of the first transaction party; if the verification is passed, decrypting the wallet encryption address of the first transaction party and the intelligent contract to obtain the wallet address of the first transaction party and the evidence-passing content in the intelligent contract; decrypting the wallet encrypted address of the second transaction party to obtain the wallet address of the second transaction party; determining a certification passing encryption key at the current time point through the wallet address of the second trading party and the wallet address of the first trading party, and encrypting the wallet address and the certification passing content of the first trading party through the certification passing encryption key to obtain an encrypted certification passing; and sending the intelligent contract containing the encrypted pass certificate to a second trading party in the second blockchain system, so that the second trading party decrypts the encrypted pass certificate in the intelligent contract to execute the transaction between the first trading party and the second trading party. According to the invention, after a transaction is initiated, transaction nodes in the first blockchain system and the second blockchain sequentially verify a first transaction party initiating the transaction, generate a new certificate-passing encryption key after the verification is passed, encrypt a wallet address and certificate-passing content of the first transaction party according to the certificate-passing encryption key, and then send the encrypted certificate-passing to a second transaction party in the second blockchain system, so that the second transaction party executes the transaction with the second transaction party according to the encrypted certificate-passing, and thus the security of asset transfer of the blockchain system is ensured.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
In an embodiment provided by the present invention, an asset transfer device based on a block chain is provided, and the asset transfer device based on the block chain corresponds to the asset transfer method based on the block chain in the above embodiment one to one. As shown in fig. 4, the block chain-based asset transfer device includes: the system comprises an acquisition module 10, a verification module 20, a decryption module 30, an encryption module 40 and an execution module 50. The functional modules are explained in detail as follows:
the acquisition module 10 is configured to acquire wallet encryption addresses of each transaction node sent by the first blockchain system and the second blockchain system, where the wallet encryption addresses are obtained by encrypting the wallet encryption addresses according to a secret key of the transaction node where the wallet encryption address is located; each transaction node corresponds to a transaction party;
the verification module 20 is configured to verify a signature of a first transaction party in the first blockchain system after receiving a request for triggering execution of an intelligent contract, which is sent by the first transaction party;
the obtaining module 10, if the signature of the first transaction party passes verification, decrypts the wallet encrypted address of the first transaction party and the intelligent contract, and obtains a wallet address of the first transaction party and a certified content in the intelligent contract, where the certified content includes a second transaction party, a transaction amount and a transaction type, and the second transaction party is a transaction object corresponding to the first transaction party in the second blockchain system;
the decryption module 30 is used for decrypting the wallet encrypted address of the second transaction party to obtain the wallet address of the second transaction party;
the encryption module 40 is configured to determine a certified encryption key at a current time point according to the wallet address of the second transaction party and the wallet address of the first transaction party, and encrypt the wallet address and certified content of the first transaction party by using the certified encryption key to obtain an encrypted certified certificate;
an executing module 50, configured to send the smart contract containing the encrypted pass-certificate to a second trading party in the second blockchain system, so that the second trading party decrypts the encrypted pass-certificate in the smart contract to execute the transaction between the first trading party and the second trading party.
Specifically, the encryption module 40 includes:
an obtaining unit 41, configured to obtain the current time point, and round the current time point to determine the current time point to be a minute;
a determining unit 42, configured to splice the wallet address of the second transaction party and the wallet address of the first transaction party, and the rounded current time point to obtain the pass-certificate encryption key.
Specifically, the execution module 50 includes:
a determining unit 51, configured to determine a time point of receiving the intelligent contract, and round the time point of the intelligent contract to determine to minutes;
the calculating unit 52 is configured to subtract a preset time from a time point of the intelligent contract rounded to the minute to obtain a target time;
the determining unit 51 is further configured to obtain the pass-certificate decryption key by concatenating the wallet address of the second transaction party, the wallet address of the first transaction party, and the target time;
an obtaining unit 53, configured to decrypt the encrypted certificate in the smart contract through the certificate authority decryption key, and obtain a wallet address and certificate authority content of the first transaction party in the encrypted certificate;
an executing unit 54, configured to execute a transaction between the first transaction part and the second transaction part according to the content of the pass-through and the wallet address of the first transaction part.
Further, the apparatus further comprises:
a broadcasting module 60, configured to broadcast the smart contract to other transaction nodes in the first blockchain system and the second blockchain system;
the verification module 20 is further configured to detect whether signature authentication of the intelligent contract by a preset number of other transaction nodes is obtained;
the executing module 50 is further configured to execute the transaction between the first transaction party and the second transaction party according to the content of the pass-through and the wallet address of the first transaction party if the signature authentication of the intelligent contract by the preset number of other transaction nodes is obtained.
The obtaining module 10 is further configured to obtain CA digital certificates corresponding to the first transaction party and the second transaction party, respectively; verifying whether the CA digital certificates corresponding to the first transaction party and the second transaction party are authenticated;
the obtaining module 10 is further configured to obtain user identity information included in the digital certificate by the first transaction party and the user identity information included in the digital certificate by the second transaction party, if the CA digital certificates corresponding to the first transaction party and the second transaction party are authenticated respectively;
the verification module 20 is further configured to verify whether the user identity information corresponding to the first transaction party and the user identity information corresponding to the second transaction party are successful;
the obtaining module 10 is further configured to decrypt the wallet encrypted address of the first transaction party and the intelligent contract to obtain the wallet address of the first transaction party and the pass-evidence content in the intelligent contract if the user identity information corresponding to the first transaction party and the second transaction party respectively is successfully verified.
For specific definition of the block chain based asset transfer device, reference may be made to the above definition of the block chain based asset transfer method, which is not described herein again. The various modules in the above block chain based asset transfer device may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 5. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a blockchain-based asset transfer method.
In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
acquiring wallet encryption addresses of each transaction node sent by a first block chain system and a second block chain system, wherein the wallet encryption addresses are obtained by encrypting according to a secret key of the transaction node; each transaction node corresponds to a transaction party;
after receiving a request for triggering execution of an intelligent contract, which is sent by a first trading party in the first blockchain system, verifying a signature of the first trading party;
if the signature of the first transaction party passes the verification, decrypting the wallet encrypted address of the first transaction party and the intelligent contract to obtain the wallet address of the first transaction party and the evidence-passing content in the intelligent contract, wherein the evidence-passing content comprises a second transaction party, a transaction amount and a transaction type, and the second transaction party is a transaction object corresponding to the first transaction party in the second block chain system;
decrypting the wallet encrypted address of the second transaction party to obtain a wallet address of the second transaction party;
determining a certification passing encryption key at the current time point through the wallet address of the second transaction party and the wallet address of the first transaction party, and encrypting the wallet address and the certification passing content of the first transaction party through the certification passing encryption key to obtain an encrypted certification passing;
sending the intelligent contract containing the encrypted pass to a second trading party in the second blockchain system, so that the second trading party decrypts the encrypted pass in the intelligent contract to execute the transaction between the first trading party and the second trading party.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring wallet encryption addresses of each transaction node sent by a first block chain system and a second block chain system, wherein the wallet encryption addresses are obtained by encrypting according to a secret key of the transaction node; each transaction node corresponds to a transaction party;
after receiving a request for triggering execution of an intelligent contract, which is sent by a first trading party in the first blockchain system, verifying a signature of the first trading party;
if the signature of the first transaction party passes the verification, decrypting the wallet encrypted address of the first transaction party and the intelligent contract to obtain the wallet address of the first transaction party and the evidence-passing content in the intelligent contract, wherein the evidence-passing content comprises a second transaction party, a transaction amount and a transaction type, and the second transaction party is a transaction object corresponding to the first transaction party in the second block chain system;
decrypting the wallet encrypted address of the second transaction party to obtain a wallet address of the second transaction party;
determining a certification passing encryption key at the current time point through the wallet address of the second transaction party and the wallet address of the first transaction party, and encrypting the wallet address and the certification passing content of the first transaction party through the certification passing encryption key to obtain an encrypted certification passing;
sending the intelligent contract containing the encrypted pass to a second trading party in the second blockchain system, so that the second trading party decrypts the encrypted pass in the intelligent contract to execute the transaction between the first trading party and the second trading party.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions.
The above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (12)

1. A block chain-based asset transfer method is applied to a central node, and is characterized by comprising the following steps:
acquiring wallet encryption addresses of each transaction node sent by a first block chain system and a second block chain system, wherein the wallet encryption addresses are obtained by encrypting according to a secret key of the transaction node; each transaction node corresponds to a transaction party;
after receiving a request for triggering execution of an intelligent contract, which is sent by a first trading party in the first blockchain system, verifying a signature of the first trading party;
if the signature of the first transaction party passes the verification, decrypting the wallet encrypted address of the first transaction party and the intelligent contract to obtain the wallet address of the first transaction party and the evidence-passing content in the intelligent contract, wherein the evidence-passing content comprises a second transaction party, a transaction amount and a transaction type, and the second transaction party is a transaction object corresponding to the first transaction party in the second block chain system;
decrypting the wallet encrypted address of the second transaction party to obtain a wallet address of the second transaction party;
determining a certification passing encryption key at the current time point through the wallet address of the second transaction party and the wallet address of the first transaction party, and encrypting the wallet address and the certification passing content of the first transaction party through the certification passing encryption key to obtain an encrypted certification passing;
sending the intelligent contract containing the encrypted pass to a second trading party in the second blockchain system, so that the second trading party decrypts the encrypted pass in the intelligent contract to execute the transaction between the first trading party and the second trading party.
2. The blockchain-based asset transfer method according to claim 1, wherein the determining a certified encryption key at a current point in time by the encrypted address of the second transaction party and the encrypted address of the first transaction party comprises:
acquiring the current time point, and rounding the current time point to determine the current time point to be minutes;
and splicing the wallet address of the second transaction party and the wallet address of the first transaction party and the rounded current time point to obtain the pass-certificate encryption key.
3. The blockchain-based asset transfer method of claim 2, wherein the second trading party decrypting the encrypted pass-certificate in the smart contract to execute the transaction between the first trading party and the second trading party comprises:
determining a time point of receiving the intelligent contract, and rounding the time point of the intelligent contract to be determined to be minutes;
subtracting the preset time from the time point of the intelligent contract which is rounded to be determined to be minutes to obtain target time;
obtaining the certification decryption key by splicing the wallet address of the second transaction party, the wallet address of the first transaction party and the target time;
decrypting the encrypted certificate in the intelligent contract through the certificate passing decryption key to obtain a wallet address and certificate passing content of a first transaction party in the encrypted certificate passing;
and executing the transaction between the first transaction party and the second transaction party according to the evidence-passing content and the wallet address of the first transaction party.
4. The blockchain-based asset transfer method of claim 3, wherein prior to the performing of the transaction between the first transaction party and the second transaction party in accordance with the forensic content and the wallet address of the first transaction party, the method further comprises:
broadcasting the intelligent contracts to other transaction nodes in the first blockchain system and the second blockchain system;
detecting whether signature authentication of a preset number of other transaction nodes on the intelligent contract is obtained;
and if the signature authentication of the intelligent contract by the preset number of other transaction nodes is acquired, executing the transaction between the first transaction party and the second transaction party according to the certification content and the wallet address of the first transaction party.
5. The blockchain-based asset transfer method according to claim 1, wherein after the signature of the first transaction part is verified, the wallet encrypted address of the first transaction part and the smart contract are decrypted, and before the wallet address of the first transaction part and the certified content in the smart contract are acquired, the method further comprises:
acquiring CA digital certificates corresponding to the first transaction party and the second transaction party respectively; verifying whether the CA digital certificates corresponding to the first transaction party and the second transaction party are authenticated;
if the CA digital certificates corresponding to the first transaction party and the second transaction party are authenticated, user identity information contained in the first transaction party and the second transaction party in the digital certificates is acquired respectively;
verifying whether the user identity information corresponding to the first transaction party and the second transaction party respectively succeeds or not;
and if the user identity information corresponding to the first transaction party and the second transaction party respectively is successfully verified, decrypting the wallet encrypted address of the first transaction party and the intelligent contract to obtain the wallet address of the first transaction party and the evidence-passing content in the intelligent contract.
6. An apparatus for blockchain based asset transfer, the apparatus comprising:
the acquisition module is used for acquiring wallet encryption addresses of the transaction nodes sent by the first block chain system and the second block chain system, and the wallet encryption addresses are obtained by encrypting the wallet encryption addresses according to secret keys of the transaction nodes; each transaction node corresponds to a transaction party;
the verification module is used for verifying the signature of the first trading party after receiving a triggering execution intelligent contract request sent by the first trading party in the first blockchain system;
the obtaining module is used for decrypting the wallet encrypted address of the first transaction party and the intelligent contract if the signature of the first transaction party passes verification, and obtaining the wallet address of the first transaction party and the evidence-passing content in the intelligent contract, wherein the evidence-passing content comprises a second transaction party, a transaction amount and a transaction type, and the second transaction party is a transaction object corresponding to the first transaction party in the second block chain system;
the decryption module is used for decrypting the wallet encryption address of the second transaction party to obtain the wallet address of the second transaction party;
the encryption module is used for determining a certification-passing encryption key at the current time point through the wallet address of the second trading party and the wallet address of the first trading party, and encrypting the wallet address and the certification-passing content of the first trading party through the certification-passing encryption key to obtain an encrypted certification-passing;
and the execution module is used for sending the intelligent contract containing the encrypted certificate to a second trading party in the second blockchain system, so that the second trading party decrypts the encrypted certificate in the intelligent contract to execute the transaction between the first trading party and the second trading party.
7. The blockchain-based asset transfer device of claim 6, wherein the encryption module comprises:
the acquisition unit is used for acquiring the current time point and rounding the current time point to determine the current time point to be minutes;
and the determining unit is used for splicing the wallet address of the second trading party, the wallet address of the first trading party and the rounded current time point to obtain the certification encryption key.
8. The blockchain-based asset transfer device of claim 7, wherein the execution module comprises:
the determining unit is used for determining the time point of receiving the intelligent contract and rounding the time point of the intelligent contract to be determined to be minutes;
the calculating unit is used for subtracting the preset time from the time point of the intelligent contract which is rounded to be determined to be minutes to obtain target time;
the determining unit is further configured to obtain the pass-certificate decryption key by splicing the wallet address of the second transaction party, the wallet address of the first transaction party, and the target time;
the acquiring unit is used for decrypting the encrypted certificate in the intelligent contract through the certificate passing decryption key to acquire the wallet address and the certificate passing content of the first transaction party in the encrypted certificate passing;
and the execution unit is used for executing the transaction between the first transaction party and the second transaction party according to the evidence obtaining content and the wallet address of the first transaction party.
9. The blockchain-based asset transfer device of claim 8, further comprising:
the broadcasting module is used for broadcasting the intelligent contracts to other transaction nodes in the first blockchain system and the second blockchain system;
the verification module is also used for detecting whether signature authentication of the intelligent contract by other transaction nodes with preset number is obtained;
the execution module is further configured to execute the transaction between the first transaction party and the second transaction party according to the content of the pass-certificate and the wallet address of the first transaction party if the signature authentication of the intelligent contract by the preset number of other transaction nodes is acquired.
10. The blockchain-based asset transfer device of claim 6,
the acquisition module is further used for acquiring CA digital certificates corresponding to the first transaction party and the second transaction party respectively; verifying whether the CA digital certificates corresponding to the first transaction party and the second transaction party are authenticated;
the acquisition module is further configured to acquire user identity information included in the digital certificate by the first transaction party and the second transaction party respectively if the CA digital certificates corresponding to the first transaction party and the second transaction party respectively are authenticated;
the verification module is further configured to verify whether the user identity information corresponding to the first transaction party and the user identity information corresponding to the second transaction party are successful;
the obtaining module is further configured to decrypt the wallet encryption address of the first transaction party and the intelligent contract to obtain the wallet address of the first transaction party and the content of the pass in the intelligent contract if the user identity information corresponding to the first transaction party and the second transaction party respectively is successfully verified.
11. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor when executing the computer program implements a blockchain based asset transfer method according to any one of claims 1 to 5.
12. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out a blockchain-based asset transfer method according to any one of claims 1 to 5.
CN202010025030.3A 2020-01-04 2020-01-04 Asset transfer method and device based on block chain and hardware equipment Pending CN111080300A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010025030.3A CN111080300A (en) 2020-01-04 2020-01-04 Asset transfer method and device based on block chain and hardware equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010025030.3A CN111080300A (en) 2020-01-04 2020-01-04 Asset transfer method and device based on block chain and hardware equipment

Publications (1)

Publication Number Publication Date
CN111080300A true CN111080300A (en) 2020-04-28

Family

ID=70322769

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010025030.3A Pending CN111080300A (en) 2020-01-04 2020-01-04 Asset transfer method and device based on block chain and hardware equipment

Country Status (1)

Country Link
CN (1) CN111080300A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112288431A (en) * 2020-11-03 2021-01-29 上海阿吉必信息技术有限公司 Transaction method and device based on threshold signature
CN112541764A (en) * 2020-12-17 2021-03-23 成都知道创宇信息技术有限公司 Asset management method, device and system based on intelligent contract

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112288431A (en) * 2020-11-03 2021-01-29 上海阿吉必信息技术有限公司 Transaction method and device based on threshold signature
CN112541764A (en) * 2020-12-17 2021-03-23 成都知道创宇信息技术有限公司 Asset management method, device and system based on intelligent contract
CN112541764B (en) * 2020-12-17 2023-11-28 成都知道创宇信息技术有限公司 Asset management method, device and system based on intelligent contract

Similar Documents

Publication Publication Date Title
US11004067B2 (en) Methods and devices for protecting sensitive data of transaction activity based on smart contract in blockchain
CN109377198B (en) Signing system based on multi-party consensus of alliance chain
CN108418680B (en) Block chain key recovery method and medium based on secure multi-party computing technology
CN109067801B (en) Identity authentication method, identity authentication device and computer readable medium
CN107742212B (en) Asset verification method, device and system based on block chain
CN111368340A (en) Block chain-based evidence-based security verification method and device and hardware equipment
US6622247B1 (en) Method for certifying the authenticity of digital objects by an authentication authority and for certifying their compliance by a testing authority
WO2021008453A1 (en) Method and system for offline blockchain transaction based on identifier authentication
CN111444273B (en) Data authorization method and device based on block chain
US10756896B2 (en) Trustless account recovery
CN110992178A (en) Verification method and device for block chain node, computer equipment and storage medium
CN114329529A (en) Asset data management method and system based on block chain
CN108496323B (en) Certificate importing method and terminal
CN112766962A (en) Method for receiving and sending certificate, transaction system, storage medium and electronic device
CN113743939A (en) Identity authentication method, device and system based on block chain
CN111914293A (en) Data access authority verification method and device, computer equipment and storage medium
CN112632574A (en) Multi-mechanism data processing method and device based on alliance chain and related equipment
CN110942382A (en) Electronic contract generating method and device, computer equipment and storage medium
CN113326525A (en) Data processing method and device based on intelligent contract
CN111080300A (en) Asset transfer method and device based on block chain and hardware equipment
CN115147224A (en) Transaction data sharing method and device based on alliance chain
CN113328854B (en) Service processing method and system based on block chain
CN110796448A (en) Intelligent contract verification method based on block chain, participating node and medium
CN113271207A (en) Escrow key using method and system based on mobile electronic signature, computer equipment and storage medium
CN112381634A (en) Tax statistics and settlement method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination