CN108197944B - Resource transaction method and device based on block chain technology - Google Patents

Resource transaction method and device based on block chain technology Download PDF

Info

Publication number
CN108197944B
CN108197944B CN201711174165.0A CN201711174165A CN108197944B CN 108197944 B CN108197944 B CN 108197944B CN 201711174165 A CN201711174165 A CN 201711174165A CN 108197944 B CN108197944 B CN 108197944B
Authority
CN
China
Prior art keywords
blockchain
transaction
electronic device
locked
block chain
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
CN201711174165.0A
Other languages
Chinese (zh)
Other versions
CN108197944A (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.)
Yuanguang Software Co Ltd
Original Assignee
Yuanguang 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 Yuanguang Software Co Ltd filed Critical Yuanguang Software Co Ltd
Priority to CN201711174165.0A priority Critical patent/CN108197944B/en
Publication of CN108197944A publication Critical patent/CN108197944A/en
Application granted granted Critical
Publication of CN108197944B publication Critical patent/CN108197944B/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/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • 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/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme

Abstract

The invention discloses a resource transaction method based on a block chain technology, which comprises the following steps: the electronic device receiving digital currency of a user transaction address payment on a first blockchain; the electronic device transferring digital currency from the first blockchain to the second blockchain via a bidirectional anchoring protocol between the first blockchain and the second blockchain; the electronic device paying the transferred digital currency to an interface address of the smart contract on the second blockchain; and the electronic equipment receives the resources returned by the intelligent contract interface address or the acquisition mode of the resources on the second blockchain and acquires the digital currency on the first blockchain through the bidirectional anchoring protocol. The invention also discloses a resource transaction device and a readable storage medium based on the blockchain technology. Through the mode, the probability of performance bottleneck of a single block chain can be reduced, and potential safety hazards are reduced.

Description

Resource transaction method and device based on block chain technology
Technical Field
The present invention relates to the field of networks, and in particular, to a resource transaction method and apparatus based on a block chain technique.
Background
With the development of internet technology, resources in the form of data have been presented in a rich variety. At present, resource transactions mostly operate in a centralized and non-point-to-point mode, that is, all transaction information is uniformly mediated and stored through a transaction center, and if the transaction center is not trusted, such as the situations that a database is hacked, transaction data is artificially tampered, and the like, the transaction information is possibly maliciously tampered and is difficult to obtain evidence.
In order to solve the problems, a transaction mode based on a block chain technology is provided, the problems of centralized and non-point-to-point transactions are solved to a certain extent, but due to the fact that only a single transaction block chain is used, along with the gradual increase of transaction participants and the monopolization of a large number of intelligent contracts to computing resources, the transaction chain becomes mixed and bloated in content, and the risk of sudden performance bottleneck occurs in the peak period of transaction, so that the efficiency of the whole transaction block chain is influenced. In addition, as the transaction occurs in a public transaction block chain, the resource issuer basically has no controllability on the transaction safety, and certain potential safety hazard exists for resources with private transaction requirements.
Disclosure of Invention
The invention mainly solves the technical problem of providing a resource transaction method and a resource transaction device based on a block chain technology, which can solve the problems of performance pressure risk and potential safety hazard caused by a single transaction block chain in the prior art.
In order to solve the above technical problem, a first aspect of the present invention provides a resource transaction method based on a blockchain technique, where the method includes: the electronic device receiving digital currency of a user transaction address payment on a first blockchain; the electronic device transferring digital currency from the first blockchain to the second blockchain via a bidirectional anchoring protocol between the first blockchain and the second blockchain; the electronic device paying the transferred digital currency to an interface address of the smart contract on the second blockchain; and the electronic equipment receives the resources returned by the intelligent contract interface address or the acquisition mode of the resources on the second blockchain and acquires the digital currency on the first blockchain through the bidirectional anchoring protocol.
In order to solve the technical problem, a second aspect of the present invention provides a resource transaction apparatus based on a blockchain technology, the apparatus including a processor and a communication circuit, the processor being connected to the communication circuit, the processor being configured to execute instructions to implement the method provided by the first aspect of the present invention.
In order to solve the above technical problem, a third aspect of the present invention provides a readable storage medium storing instructions that, when executed, implement the method provided by the first aspect of the present invention.
The invention has the beneficial effects that: the resource transaction is completed by using two block chains achieving a bidirectional anchoring protocol, the payment of the transaction is completed on the first block chain, the actual execution of the transaction is completed on the second block chain, the payment and execution decoupling of the transaction are realized, the problem of centralized and non-point-to-point transactions is solved, the possibility of performance bottleneck of a single block chain is effectively reduced, and the resource only circulates on the second block chain because the execution of the transaction only occurs on the second block chain, the circulation range is reduced, and the potential safety hazard is reduced.
Drawings
FIG. 1 is a flowchart illustrating a resource transaction method based on a blockchain technique according to a first embodiment of the present invention;
FIG. 2 is a flowchart illustrating a resource transaction method based on the blockchain technique according to a second embodiment of the present invention;
FIG. 3 is a schematic flow chart diagram illustrating one embodiment of S13 of FIG. 2;
FIG. 4 is a schematic flow chart of another embodiment of S13 of FIG. 2;
FIG. 5 is a schematic flow chart diagram illustrating one embodiment of S18 of FIG. 2;
FIG. 6 is a schematic flow chart of another embodiment of S18 of FIG. 2;
FIG. 7 is a flowchart illustrating a resource transaction method based on the blockchain technique according to a third embodiment of the present invention;
FIG. 8 is a schematic structural diagram of a resource transaction apparatus according to a first embodiment of the present invention;
fig. 9 is a schematic structural diagram of a first embodiment of the readable storage medium of the present invention.
Detailed Description
The present invention will be described in detail below with reference to the accompanying drawings and examples. Non-conflicting ones of the following embodiments may be combined with each other.
As shown in fig. 1, a first embodiment of a resource transaction method based on the blockchain technique of the present invention includes:
s1: the electronic device receives digital currency for payment of the user transaction address over the first blockchain.
The electronic device is a fixed or mobile device, such as a computer, a mobile phone, a tablet, a server, etc., connected to a network. The electronic device may include a processor and a memory, the memory storing instructions for composing a transaction application for implementing resource transactions, the processor may execute the instructions to run the transaction application to implement the method provided by the present embodiment.
Typically, a user initiates a payment transaction using an application end (e.g., a first blockchain wallet) having access to a first blockchain to transfer a specified amount of digital currency equivalent to a resource price in a user transaction address to the first transaction address of the transaction application. On the first block chain, the user transaction address belongs to a user, namely a requirement main body in resource transaction; the first transaction address belongs to a resource issuer (or resource provider, i.e., the supplier in a resource transaction).
Both the application side and the transaction application may run on the electronic device. The application terminal may also be run on another terminal different from the electronic device, the terminal and the electronic device being communicatively connected. Of course the user may also directly use the transaction application to initiate a payment transaction.
The transaction application may or may not be issued by the resource issuer. If the transaction application is issued by the resource issuer, the resource issuer may register information and access/download links of the transaction application on the first blockchain to which the registration information is submitted in a transactional manner. The application end can obtain the registered transaction application program information by scanning the first blockchain, and the registered transaction application program information is displayed in a tradable resource list for the user to select, and each table entry is linked to the corresponding transaction application program.
Blockchain technology is a new decentralized infrastructure and distributed computing paradigm that utilizes an encrypted chained blockstructure to verify and store data, a distributed node consensus algorithm to generate and update data, and automated script code to program and manipulate data. The core advantage of the blockchain technology is decentralization, and point-to-point transaction, coordination and cooperation based on decentralization credit can be realized in a distributed system with nodes not needing to trust with each other by means of data encryption, timestamps, distributed consensus and the like, so that a solution is provided for solving the problems of high cost, low efficiency, unsafe data storage and the like commonly existing in a centralization mechanism.
The first blockchain is distributively stored in a first blockchain network, and the first blockchain network is a multi-node network system formed by utilizing blockchain technology. The electronic device may or may not belong to the first blockchain network. If the electronic device does not belong to the first blockchain network, a node of the blockchain network to which the electronic device is connected, which is connected to at least one node of the first blockchain network, may be referred to as a first connection node.
S2: the electronic device transfers digital currency from the first blockchain to the second blockchain through a bidirectional anchoring protocol between the first blockchain and the second blockchain.
The bi-directional anchoring protocol refers to that value of digital currency can be transferred bi-directionally between the first blockchain and the second blockchain. The accounting nodes of the first blockchain and the second blockchain are respectively incorporated with a bidirectional anchor protocol code, and the verification of the digital currency during the transfer between blockchains can be executed according to the bidirectional anchor protocol to determine whether the transfer of the digital currency is accepted.
Similarly, the second blockchain is distributively stored in a second blockchain network, which is a multi-node network system composed by using blockchain technology. The electronic device may or may not belong to the second blockchain network. If the electronic device does not belong to the second blockchain network, the node of the blockchain network to which the electronic device is connected, which is connected to the at least one node of the second blockchain network, may be referred to as a second connection node.
After the transfer is completed, the transaction application program may not use the specified amount of digital money in the first transaction address on the first blockchain, and the transaction application program may add a corresponding amount of tokens to the second transaction address on the second blockchain as the transferred digital money.
S3: the electronic device pays the transferred digital currency to the interface address of the smart contract on the second blockchain.
In particular, the electronic device may forward tokens at the second transaction address to an interface address of the smart contract.
The intelligent contract is a core constituent element (contract layer) of the block chain, is a computer program which is driven by events, has a state and runs on a reproducible shared block chain data book, and can realize the functions of actively or passively processing data, receiving, storing and sending values, controlling and managing intelligent assets on various chains and the like. In particular, an intelligent contract is a set of scenario-correspondence type programming rules and logic, which is decentralized, trusted, shared program code deployed on a blockchain. The smart contracts also have the general characteristics of blockchain data, such as distributed recording, storage and verification, non-falsification and forgery. After the parties signing the contract agree on the contract content, the contract is deployed on the block chain in the form of an intelligent contract, and the contract can be automatically executed on behalf of the signing parties without any central authority.
In general, the second blockchain may be a blockchain deployed or approved by a resource issuer. The intelligent contract may be pre-deployed on the second block chain by the resource issuer, and after the intelligent contract is deployed, the second block chain may generate an interface address of the corresponding intelligent contract according to the function of the intelligent contract for access. The content of the smart contract may include: the resource content or the obtaining mode, the resource price, the triggering condition of the intelligent contract execution and the transaction content executed by the intelligent contract.
If the resource issuer provides more than one resource, different intelligent contracts may be deployed for different resources, although one intelligent contract may be used for trading of multiple resources.
S4: and the electronic equipment receives the resources returned by the intelligent contract interface address or the acquisition mode of the resources on the second blockchain and acquires the digital currency on the first blockchain through the bidirectional anchoring protocol.
The triggering condition for the execution of the intelligent contract in this embodiment may include the receipt of a certain amount of tokens, and the contents of the transaction executed by the intelligent contract may include the return of the resource or the manner of acquisition of the resource to the second transaction address on the second blockchain, and the transfer of the received tokens from the second blockchain back to the first blockchain, thereby enabling the electronic device to acquire the specified amount of digital currency on the first blockchain.
After receiving the resource or the resource acquisition mode, the electronic device may show the resource or the resource acquisition mode to the user, for example, display the resource content or the resource acquisition mode in a visual interface of the transaction application. If the received resource acquisition mode is the format of the link address, the resource acquisition mode can be directly jumped to the address.
In order to ensure the realization of point-to-point transactions of decentralized credit on the blockchain, after each transaction, the electronic device submits the processing result of the transaction to the corresponding first/second blockchain network, so that the node of the first/second blockchain network stores the processing result of the transaction in the first/second blockchain.
Specifically, if the electronic device belongs to the first/second blockchain network, the processing result can be directly submitted to the first/second blockchain network in a broadcast manner; if the electronic device does not belong to the first/second blockchain network, the processing result can be sent to the first/second connection node, and then the processing result can be submitted to the first/second blockchain network in a mode of broadcasting to the first/second blockchain network by the first/second connection node. After the accounting nodes of the first/second block chain network achieve consensus, the processing result of the transaction is recorded to a new block, and the block is accessed into the first/second block chain, so that the processing result of the transaction is stored in the first/second block chain by the nodes of the first/second block chain network.
Through the implementation of the embodiment, two block chains achieving a bidirectional anchoring protocol are used for completing resource transaction, the payment of the transaction is completed on the first block chain, the actual execution of the transaction is completed on the second block chain, the payment and execution decoupling of the transaction is realized, the problem of centralized and non-point-to-point transactions is solved, the possibility of performance bottleneck of a single block chain is effectively reduced, the execution of the transaction only occurs on the second block chain, resources only circulate on the second block chain, the circulation range is reduced, and the potential safety hazard is reduced.
As shown in fig. 2, a second embodiment of the resource transaction method based on the blockchain technology of the present invention is based on the first embodiment of the resource transaction method based on the blockchain technology of the present invention, and specifically defines a transfer process of digital money between blockchains. This embodiment is a further extension of the first embodiment of the resource transaction method based on the blockchain technology, and therefore, the same contents as those in the first embodiment of the resource transaction method based on the blockchain technology are not described herein again. The embodiment comprises the following steps:
s11: the electronic device receives digital currency for payment by the user transaction address using the first transaction address on the first blockchain.
S12: the electronic device constructs a first locked transaction on the first blockchain to lock digital currency in a first transaction address.
The locked digital currency is not available.
S13: the electronic device references the first locked transaction and the payment verification for the first locked transaction on the second blockchain.
The payment verification of the first locked transaction includes: the first locked transaction has been recorded in a first block of the first block chain, and a number of valid blocks following the first block in the first block chain is greater than a first threshold.
The valid blocks after the first block may also be referred to as first protected blocks, the role of which is to ensure that the recording of the first locked transaction is truly valid. The accounting node of the second blockchain stores the bidirectional anchoring protocol code, so that the first locked transaction referenced by the electronic equipment can be checked, and the payment verification of the first locked transaction is completed if the checking is successful.
As shown in fig. 3, in an embodiment of the present invention, S13 may specifically include:
s131: the electronic device submits the referenced first locked transaction to the second blockchain network.
S132: the accounting node of the second blockchain network checks whether the first locked transaction has been recorded in the first block of the first blockchain by the bidirectional anchoring protocol and the number of valid blocks after the first block in the first blockchain is greater than a first threshold.
If the inspection is successful, the subsequent steps are performed, and if the inspection is unsuccessful, the electronic device may perform S131 again. Optionally, the electronic device may wait for a period of time before performing S131 again to reduce the number of repeated submissions.
To avoid duplicate submissions, as shown in fig. 4, in another embodiment of the present invention, S13 may specifically include:
s134: the electronic device checks on the first block chain whether the first locked transaction has been recorded in a first block of the first block chain, and the number of valid blocks after the first block in the first block chain is greater than a first threshold.
In this embodiment, the electronic device has the capability of identifying the consensus mechanism of the first blockchain and the second blockchain, and is used for payment verification of the locked transaction when digital currency is transferred between the chains. If the verification is successful, the payment verification of the first locking transaction is completed, and S135 is skipped; if not, S134 is repeatedly executed.
S135: the electronic device submits the referenced first locked transaction to the second blockchain network.
S136: the accounting node of the second blockchain network checks whether the first locked transaction has been recorded in the first block of the first blockchain by the bidirectional anchoring protocol and the number of valid blocks after the first block in the first blockchain is greater than a first threshold.
And after the electronic equipment completes the checking, the accounting node of the second block chain network successfully checks and executes the subsequent steps.
S14: after consensus by the accounting node of the second blockchain, the electronic device obtains a corresponding amount of tokens on the second blockchain as transferred digital currency using the second transaction address.
The electronic device obtains the amount of tokens on the second blockchain corresponding to the amount of digital currency locked on the first blockchain, for example, the amount of tokens is the same as or proportional to the amount of digital currency.
S15: the electronic device pays the transferred digital currency to the interface address of the smart contract on the second blockchain.
S16: and the electronic equipment receives the resource returned by the intelligent contract interface address or the acquisition mode of the resource on the second block chain.
The execution sequence between this step and S17-S19 is merely illustrative, and may be actually exchanged or executed simultaneously.
S17: the electronic device obtains information that intelligently closes a second locked transaction constructed on a second blockchain.
The second lock transaction is to lock a token in a second blockchain, the locked token not being available.
S18: the electronic device references the second locked transaction and the payment verification for the second locked transaction on the first blockchain.
The payment verification of the second locked transaction includes: the second lock transaction has been recorded in a second block of the second block chain, and a number of valid blocks following the second block in the second block chain is greater than a second threshold.
Similarly, the valid blocks after the second block may also be referred to as second protection blocks, which function to ensure that the record of the second lock transaction is truly valid. The accounting node of the first blockchain stores the bidirectional anchoring protocol code, so that the second locked transaction referenced by the electronic equipment can be checked, and the payment verification of the second locked transaction is completed if the checking is successful. The first threshold and the second threshold may be the same or different.
As shown in fig. 5, in an embodiment of the present invention, S18 may specifically include:
s181: the electronic device submits the referenced second locked transaction to the first blockchain network.
S182: the accounting node of the first blockchain network checks whether the second locked transaction has been recorded in a second block of the second blockchain by the bidirectional anchoring protocol, and the number of valid blocks after the second block in the second blockchain is greater than a second threshold.
If the inspection is successful, the subsequent steps are performed, and if the inspection is unsuccessful, the electronic device may perform S181 again. Optionally, the electronic device may wait for a period of time before performing S181 again to reduce the number of repeated submissions.
To avoid duplicate submissions, as shown in fig. 6, in another embodiment of the present invention, S18 may specifically include:
s184: the electronic device checks on the second blockchain whether the second locked transaction has been recorded in a second block of the second blockchain, and the number of valid blocks after the second block in the second blockchain is greater than a second threshold.
In this embodiment, the electronic device has the capability of identifying the consensus mechanism of the first blockchain and the second blockchain, and is used for payment verification of the locked transaction when digital currency is transferred between the chains. If the verification is successful, the payment verification of the second locking transaction is completed, and the step is shifted to S185; if not, S184 is repeatedly executed.
S185: the electronic device submits the referenced second locked transaction to the first blockchain network.
S186: the accounting node of the first blockchain network checks whether the second locked transaction has been recorded in a second block of the second blockchain by the bidirectional anchoring protocol, and the number of valid blocks after the second block in the second blockchain is greater than a second threshold.
And after the electronic equipment completes the checking, the accounting node of the first block chain network successfully checks and executes the subsequent steps.
S19: after consensus by the accounting node of the first blockchain, the electronic device unlocks the digital currency in the first transaction address on the first blockchain.
After unlocking, the digital currency becomes available and the resource transaction is completed.
As shown in fig. 7, a third embodiment of the resource transaction method based on the blockchain technique according to the present invention is based on the first embodiment of the resource transaction method based on the blockchain technique according to the present invention, and S1 includes:
s101: the electronic device receives a payment request.
The payment request may be made by the user via an input device (e.g., a touch screen, a keyboard, a microphone, etc.) of the electronic device, or may be made remotely by the user via another device.
S102: the electronic device determines whether the balance in the user's transaction address is greater than or equal to the price of the resource.
If the balance is larger than or equal to the price of the resource, the user can pay the full amount, and the step S103 is skipped; if the balance is less than the price of the resource, it indicates that the user can not pay the full amount, and it goes to step S104.
S103: the electronic device initiates a payment transaction to transfer from the balance a digital currency equivalent to the price of the resource to the first transaction address and submits a processing result of the payment transaction to the first blockchain network.
The nodes of the first blockchain network store the results of the processing of the payment transaction in the first blockchain. The detailed process can refer to the related description in the first embodiment of the resource transaction method based on the blockchain technology.
S104: the electronic device denies the payment request.
In addition, the electronic equipment can give a prompt of insufficient balance to the user so as to remind the user to buy the rechargeable paper after recharging.
As shown in fig. 8, the first embodiment of the resource transaction apparatus based on the blockchain technique of the present invention includes: processor 110 and communication circuit 120, communication circuit 120 is connected to processor 110.
The communication circuit 120 is used for sending and receiving data, and is an interface for the resource transaction apparatus based on the block chain technology to communicate with other communication devices.
The processor 110 controls the operation of the resource transaction apparatus based on the blockchain technology, and the processor 110 may also be referred to as a Central Processing Unit (CPU). The processor 110 may be an integrated circuit chip having signal processing capabilities. The processor 110 may also be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The processor 110 is configured to execute the instructions to implement the method provided by any one of the first and third embodiments of the resource transaction method based on the blockchain technology and the non-conflicting combination.
As shown in fig. 8, the first embodiment of the storage medium readable by the present invention includes a memory 210, and the memory 210 stores instructions that when executed implement the method provided by any one of the first to third embodiments of the resource transaction method based on the blockchain technology and any non-conflicting combination.
The Memory 210 may include a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a hard disk, an optical disk, and the like.
In the embodiments provided in the present invention, it should be understood that the disclosed method and apparatus can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a module or a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be substantially or partially implemented in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only an 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 (10)

1. A resource transaction method based on a block chain technology is characterized by comprising the following steps:
the electronic device receiving digital currency of a user transaction address payment on a first blockchain;
the electronic device transferring the digital currency from the first blockchain to a second blockchain through a bidirectional anchoring protocol between the first blockchain and the second blockchain;
the electronic device paying the transferred digital currency to an interface address of a smart contract on the second blockchain;
the electronic device receives the resource returned by the intelligent contract interface address or the acquisition mode of the resource on the second blockchain, transfers the transferred digital currency from the second blockchain back to the first blockchain through the bidirectional anchoring protocol, and acquires the digital currency on the first blockchain;
and the electronic equipment displays the resources or the acquisition mode of the resources.
2. The method of claim 1,
the electronic device transferring the digital currency from the first blockchain onto a second blockchain through a bidirectional anchoring protocol between the first blockchain and the second blockchain comprises:
the electronic device constructing a first locked transaction on the first blockchain to lock the digital currency in a first transaction address;
the electronic device referencing the first locked transaction and a payment verification for the first locked transaction on the second blockchain;
after consensus by the accounting node of the second blockchain, the electronic device obtains a corresponding amount of tokens on the second blockchain as the transferred digital currency by using a second transaction address.
3. The method of claim 2,
the electronic device obtaining the digital currency on the first blockchain via the bi-directional anchor protocol includes:
the electronic device obtaining information of a second locked transaction constructed on the second blockchain for locking the token in the second blockchain for the intelligent contract;
the electronic device referencing the second locked transaction and a payment verification for the second locked transaction on the first blockchain;
after consensus by a billing node of the first blockchain, the electronic device unlocks the digital currency in the first transaction address on the first blockchain.
4. The method of claim 3,
the payment verification of the first locked transaction comprises: the first locked transaction has been recorded in a first block of the first block chain and a number of valid blocks following the first block in the first block chain is greater than a first threshold;
the payment verification of the second locked transaction comprises: the second lock transaction has been recorded in a second block of the second block chain, and a number of valid blocks following the second block in the second block chain is greater than a second threshold.
5. The method of claim 4,
the electronic device referencing the first locked transaction and the payment verification for the first locked transaction on the second blockchain includes:
the electronic device submits the referenced first locked transaction to a second blockchain network, so that an accounting node of the second blockchain network verifies through the bidirectional anchoring protocol whether the first locked transaction is recorded in a first block of the first blockchain, the number of valid blocks behind the first block in the first blockchain is greater than a first threshold, and if the verification is successful, payment verification of the first locked transaction is completed;
the electronic device referencing the second locked transaction and the payment verification for the second locked transaction on the first blockchain includes:
the electronic device submits the referenced second locked transaction to a first blockchain network, so that an accounting node of the first blockchain network verifies through the bidirectional anchoring protocol whether the second locked transaction has been recorded in a second block of the second blockchain, and the number of valid blocks behind the second block in the second blockchain is greater than a second threshold, and if the verification is successful, payment verification of the second locked transaction is completed.
6. The method of claim 4,
the electronic device further comprises, prior to referencing the first locked transaction and the payment verification for the first locked transaction on the second blockchain:
the electronic equipment checks whether the first locked transaction is recorded in a first block of the first block chain or not on the first block chain, the number of effective blocks behind the first block in the first block chain is larger than a first threshold value, and if the checking is successful, the payment verification of the first locked transaction is completed;
the electronic device, prior to payment verification referencing the second locked transaction and the second locked transaction on the first blockchain, comprises:
the electronic device checks on the second block chain whether the second locked transaction is recorded in a second block of the second block chain, the number of valid blocks behind the second block in the second block chain is greater than a second threshold value, and if the checking is successful, payment verification of the second locked transaction is completed.
7. The method according to any one of claims 2 to 6,
the electronic device receiving digital currency for a user transaction address payment on a first blockchain includes:
the electronic device receiving a payment request;
the electronic equipment judges whether the balance in the user transaction address is larger than or equal to the price of the resource;
if the balance is greater than or equal to the price of the resource, the electronic device initiates a payment transaction to transfer the digital currency equivalent to the price of the resource from the balance to the first transaction address, and submits a processing result of the payment transaction to a first blockchain network, so that a node of the first blockchain network stores the processing result of the payment transaction in the first blockchain, otherwise the electronic device rejects the payment request.
8. The method according to any one of claims 1 to 6,
the smart contract is issued by an issuer of the resource.
9. A resource transaction device based on a block chain technology is characterized by comprising a processor and a communication circuit, wherein the processor is connected with the communication circuit;
the processor is configured to execute instructions to implement the method of any one of claims 1-8.
10. A readable storage medium storing instructions that, when executed, implement the method of any one of claims 1-8.
CN201711174165.0A 2017-11-22 2017-11-22 Resource transaction method and device based on block chain technology Active CN108197944B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711174165.0A CN108197944B (en) 2017-11-22 2017-11-22 Resource transaction method and device based on block chain technology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711174165.0A CN108197944B (en) 2017-11-22 2017-11-22 Resource transaction method and device based on block chain technology

Publications (2)

Publication Number Publication Date
CN108197944A CN108197944A (en) 2018-06-22
CN108197944B true CN108197944B (en) 2021-03-30

Family

ID=62572872

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711174165.0A Active CN108197944B (en) 2017-11-22 2017-11-22 Resource transaction method and device based on block chain technology

Country Status (1)

Country Link
CN (1) CN108197944B (en)

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11018851B2 (en) * 2018-08-23 2021-05-25 Paypal, Inc. Multi-blockchain digital transaction information segregation system
CN109389496A (en) * 2018-08-23 2019-02-26 泰链(厦门)科技有限公司 Construction method, medium, device and the block catenary system of main body block catenary system
CN109118227A (en) * 2018-08-23 2019-01-01 泰链(厦门)科技有限公司 Construction method, medium, device and the block catenary system of bridge block catenary system
EP3866094A4 (en) * 2018-10-11 2022-04-20 Hefei Dappworks Technology Co., Ltd. Resource flow transaction method and apparatus
CN109361664B (en) * 2018-10-11 2021-05-11 腾讯科技(深圳)有限公司 Block chain based data verification method, system and computer readable storage medium
CN109391619B (en) * 2018-10-22 2021-08-03 上海幼鸢网络科技有限公司 Cross-link certificate exchange method based on authority and computer readable medium
CN109409885A (en) * 2018-10-29 2019-03-01 深圳声笑科技有限公司 Across chain method of commerce, device and storage medium on block chain
CN111340481B (en) * 2018-12-19 2023-05-12 北京沃东天骏信息技术有限公司 Data processing method, device and equipment based on multi-chain block chain network
CN109886661A (en) * 2019-01-16 2019-06-14 深圳壹账通智能科技有限公司 Across chain digital cash exchanging method, device, computer system and storage medium
CN111489257A (en) * 2019-01-28 2020-08-04 北京威宁特科技有限公司 Resource sharing block chaining
CN110659888A (en) * 2019-08-05 2020-01-07 孟江华 On-chain asset transfer system and method through on-chain digital currency settlement
CN111275414A (en) * 2019-12-31 2020-06-12 深圳市网心科技有限公司 Block chain-based digital currency exchange method, device and system
CN111080421A (en) * 2020-03-24 2020-04-28 国网电子商务有限公司 Green power certificate transaction method and device based on block chain
CN114125020B (en) * 2020-09-11 2023-08-29 京东方科技集团股份有限公司 Method, electronic device and system for real-time data communication
CN112184453A (en) * 2020-11-06 2021-01-05 上海优扬新媒信息技术有限公司 Block chain based information processing method, block chain link point and storage medium
CN112348679A (en) * 2020-11-16 2021-02-09 天元大数据信用管理有限公司 Asset issuance and redemption method and system based on block chain

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105719185A (en) * 2016-01-22 2016-06-29 杭州复杂美科技有限公司 Block chain data comparison and consensus method
CN105956923A (en) * 2016-04-20 2016-09-21 上海如鸽投资有限公司 Asset transaction platform and digital certification and transaction method for assets
CN106447309A (en) * 2016-11-13 2017-02-22 杭州复杂美科技有限公司 Across-chain transaction of source chain and lateral chain
CN106780032A (en) * 2016-12-16 2017-05-31 杭州云象网络技术有限公司 A kind of block chain interchain assets transfer method under multichain scene

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170048209A1 (en) * 2015-07-14 2017-02-16 Fmr Llc Crypto Key Recovery and Social Aggregating, Fractionally Efficient Transfer Guidance, Conditional Triggered Transaction, Datastructures, Apparatuses, Methods and Systems

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105719185A (en) * 2016-01-22 2016-06-29 杭州复杂美科技有限公司 Block chain data comparison and consensus method
CN105956923A (en) * 2016-04-20 2016-09-21 上海如鸽投资有限公司 Asset transaction platform and digital certification and transaction method for assets
CN106447309A (en) * 2016-11-13 2017-02-22 杭州复杂美科技有限公司 Across-chain transaction of source chain and lateral chain
CN106780032A (en) * 2016-12-16 2017-05-31 杭州云象网络技术有限公司 A kind of block chain interchain assets transfer method under multichain scene

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"区块链之跨链技术介绍";高志豪;《金卡工程》;20161130(第11期);全文 *

Also Published As

Publication number Publication date
CN108197944A (en) 2018-06-22

Similar Documents

Publication Publication Date Title
CN108197944B (en) Resource transaction method and device based on block chain technology
CN108959621B (en) Method, device, equipment and storage medium for realizing block chain network
US10592985B2 (en) Systems and methods for a commodity contracts market using a secure distributed transaction ledger
CN108885761B (en) Method for secure point-to-point communication on a blockchain
CN109214818B (en) Cross-chain transaction method and device
CN112749957A (en) Asset right management system and method based on block chain
TWI640937B (en) Online payment method and equipment
CN110599323B (en) Resource processing method and processing equipment
CN109241778A (en) A kind of public transport data processing method and device based on block chain
CN114707988A (en) Method and system for realizing block chain
CN110659906B (en) Bill information processing method, related device and medium
CN110659887A (en) Automatic transaction processing system and method based on block chain
CN109426955B (en) Target object providing method, device and system
US20040034597A1 (en) System and method for managing micropayment transactions, corresponding client terminal and trader equipment
CN110659993A (en) Resource management method and device based on block chain network
CN110599264A (en) Card and ticket data processing method and device and electronic equipment
CN111125778A (en) Copyright transaction information processing method and device
CN112001713A (en) Block chain system and request processing method and device
CN114742654A (en) Digital asset circulation method, system, electronic device and medium based on alliance chain
US10867296B2 (en) Method, apparatus and system for processing data
CN112488707A (en) Service flow supervision method and system
CN116862494A (en) Payment method and device based on payment cash register and readable storage medium
CN110599146B (en) Data processing method, device, terminal, node equipment and storage medium
CN104205142A (en) Link of mobile devices to facilitate mobile commerce transactions
CN112446787A (en) Resource transfer 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
GR01 Patent grant
GR01 Patent grant