WO2019148783A1 - 交易处理方法、装置、计算机设备和存储介质 - Google Patents

交易处理方法、装置、计算机设备和存储介质 Download PDF

Info

Publication number
WO2019148783A1
WO2019148783A1 PCT/CN2018/096807 CN2018096807W WO2019148783A1 WO 2019148783 A1 WO2019148783 A1 WO 2019148783A1 CN 2018096807 W CN2018096807 W CN 2018096807W WO 2019148783 A1 WO2019148783 A1 WO 2019148783A1
Authority
WO
WIPO (PCT)
Prior art keywords
transaction
value
address
redemption
purchaser
Prior art date
Application number
PCT/CN2018/096807
Other languages
English (en)
French (fr)
Inventor
吴贞海
Original Assignee
深圳壹账通智能科技有限公司
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 深圳壹账通智能科技有限公司 filed Critical 深圳壹账通智能科技有限公司
Publication of WO2019148783A1 publication Critical patent/WO2019148783A1/zh

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/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • G06Q20/065Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash
    • 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/22Payment schemes or models
    • G06Q20/223Payment schemes or models based on the use of peer-to-peer networks
    • 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/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/36Payment architectures, schemes or protocols characterised by the use of specific devices or networks using electronic wallets or electronic money safes
    • G06Q20/367Payment architectures, schemes or protocols characterised by the use of specific devices or networks using electronic wallets or electronic money safes involving electronic purses or money safes
    • G06Q20/3678Payment architectures, schemes or protocols characterised by the use of specific devices or networks using electronic wallets or electronic money safes involving electronic purses or money safes e-cash details, e.g. blinded, divisible or detecting double spending
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
    • 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
    • G06Q2220/00Business processing using cryptography

Definitions

  • the present application is a transaction processing method, apparatus, computer device, and storage medium.
  • the online transaction is generally used for the transaction of digital assets.
  • the digital asset can be a movie, an electronic chip design manual, a list of inquiries, etc.
  • a centralized settlement system is provided, which is used to control the seller and the purchaser to realize the transaction.
  • the inventor realized that the current transaction method requires setting up a settlement system, and both the seller and the purchaser need to register in the settlement system, etc., and the seller or purchaser who does not register at the settlement center cannot perform the transaction.
  • the transaction formed a centralized processing and settlement system, which caused the pressure on the settlement system to be large.
  • a transaction processing method, apparatus, computer device, and storage medium are provided.
  • a transaction processing method including:
  • the seller value redemption address is calculated according to the first public key and the first transaction value storage address by the second transaction.
  • a transaction processing device comprising:
  • a broadcast module configured to broadcast the encrypted digital asset and the first public key of the seller's value redemption address on the blockchain by the first transaction;
  • a receiving module configured to receive a first transaction value storage address corresponding to the first public key returned by the purchaser
  • a calculating module configured to: when detecting that the purchaser transfers the purchase value to the first transaction value storage address, calculate, by the second transaction, the sale according to the first public key and the first transaction value storage address Party value redemption address;
  • a transaction module configured to transfer the purchase value stored in the first transaction value storage address into the seller value redemption address, and send a key for encrypting the digital asset to the buyer .
  • a computer device comprising a memory and one or more processors having stored therein computer readable instructions, the computer readable instructions being executable by the processor to cause the one or more processors to execute The following steps: broadcasting, by the first transaction, the encrypted digital asset and the first public key of the seller value redemption address on the blockchain; receiving the first transaction value returned by the purchaser corresponding to the first public key a storage address; when it is detected that the purchaser transfers the purchase value to the first transaction value storage address, the seller value is calculated according to the first public key and the first transaction value storage address by the second transaction Redeeming the address; and transferring the purchase value stored in the first transaction value storage address to the seller value redemption address, and transmitting a key for encrypting the digital asset to the buyer .
  • One or more non-transitory computer readable storage mediums storing computer readable instructions, when executed by one or more processors, cause one or more processors to perform the steps of: Transmitting the encrypted digital asset and the first public key of the seller value redemption address on the blockchain; receiving a first transaction value storage address returned by the purchaser corresponding to the first public key; When the purchaser transfers the purchase value to the first transaction value storage address, the seller's value redemption address is calculated according to the first public key and the first transaction value storage address by the second transaction; The purchase value stored in the first transaction value storage address is transferred to the seller value redemption address, and a key for encrypting the digital asset is sent to the purchaser.
  • FIG. 1 is an application scenario diagram of a transaction processing method in accordance with one or more embodiments.
  • FIG. 2 is a flow diagram of a transaction processing method in accordance with one or more embodiments.
  • FIG. 3 is a block diagram of a block structure in accordance with one or more embodiments.
  • FIG. 4 is a schematic diagram of a blockchain in accordance with one or more embodiments.
  • FIG. 5 is a timing diagram of a transaction processing method in accordance with one or more embodiments.
  • FIG. 6 is a block diagram showing the structure of a transaction processing apparatus in accordance with one or more embodiments.
  • FIG. 7 is a diagram showing the internal structure of a computer device in accordance with one or more embodiments.
  • the transaction processing method provided by the present application can be applied to an application environment as shown in FIG. 1.
  • Both the seller and the buyer communicate with the blockchain.
  • the seller can encrypt the digital asset to be sold and broadcast it on the blockchain, so that the purchaser can obtain the digital asset, and after obtaining the digital asset, the buyer first redeems the address according to the seller's seller value.
  • the first public key constructs the contract and transfers the purchase value to the first transaction value storage address specified by the contract, and when the seller detects that the purchaser transfers the purchase value to the first transaction value storage address, extracts the The first transaction value stores the purchase value stored in the address and sends the key of the encrypted digital asset to the purchaser to complete the transaction.
  • the terminals corresponding to the seller and the purchaser may be, but are not limited to, various personal computers, notebook computers, smart phones, tablets, and portable wearable devices.
  • a transaction processing method is provided, which is applied to the seller in FIG. 1 as an example, and includes the following steps:
  • S202 Broadcast the encrypted digital asset and the first public key of the seller's value redemption address on the blockchain by the first transaction.
  • the first transaction is a transaction in which the seller sells the digital assets to be sold on the blockchain. After receiving the first transaction, the nodes in the blockchain can competitively mine to calculate The validity of the first transaction.
  • the seller can encrypt the digital asset to be sold by the key and then broadcast it on the blockchain, so that the purchaser cannot directly obtain the plaintext of the digital asset, and only the seller encrypts the key of the digital asset to the seller. After the purchaser, the purchaser can obtain the clear text of the digital asset. And since the data stored in the blockchain needs to be encrypted by the private key, it is to protect the security of the data, so in order to ensure the security of the seller's value redemption address, the seller will redeem the seller value.
  • the first public key of the address is broadcast on the blockchain, thereby preventing the illegal elements on the blockchain from obtaining the redemption address of the seller's value, thereby obtaining the value in the redemption address of the seller's value.
  • S204 Receive a first transaction value storage address corresponding to the first public key returned by the purchaser.
  • the encrypted digital asset broadcasted by the seller and the first public key of the seller's value redemption address are obtained, and according to the first public key and the purchaser's
  • the purchaser value redemption address generates a contract, for example, the content of the contract can be expressed as when the purchaser provides the purchase value of the digital asset, the seller’s value of the seller’s value is redeemed, so that the purchase value can be transferred
  • the seller may, after receiving the purchase value, forward the key of the encrypted digital asset to the corresponding purchaser, when the purchaser does not provide the purchase value of the digital asset, or provide When the purchase value is not for the digital asset, the purchase value is returned to the purchaser value redemption address.
  • the contract may be calculated according to a preset rule to obtain a first transaction value storage address, for example, a second summary calculation may be performed on the contract to obtain a first transaction value storage address.
  • the purchaser may first transfer the purchase value to the first transaction value storage address, and obtain the first transaction value storage address at the purchaser.
  • the blockchain actively provides the purchaser with the key used by the seller to encrypt the digital asset.
  • the transaction can be signed to ensure the security of the transaction and lock the value in the first transaction value storage address, so that only the verification is performed.
  • the successful purchase price can be obtained from the first transaction value storage address.
  • the seller when the seller detects that the purchaser transfers the purchase value to the first transaction value storage address, that is, the seller detects that the purchaser transfers the purchase value to the public value storage address, the seller can provide its own seller. a value redemption address to facilitate the transfer of the purchase value in the first transaction value storage address in the blockchain to its own seller value redemption address, wherein the seller value redemption address is due to It exists in the form of the first public key, so it needs to be calculated according to the first public key and the first transaction value storage address. Specifically, it may be that the first private key is verified by the seller's own, and only the first public key that is successfully verified will obtain the correct seller value redemption address. Thereby, the purchase value in the first transaction value storage address can be transferred to the seller value redemption address.
  • S208 Transfer the purchase value stored in the first transaction value storage address to the seller value redemption address, and send the key for encrypting the digital asset to the purchaser.
  • the seller can transfer the purchase value stored in the first transaction value storage address to the seller value redemption address, and after obtaining the purchase value,
  • the key used to encrypt the digital asset is sent to the purchaser so that the purchaser can decrypt the encrypted digitized asset based on the obtained key used to encrypt the digital asset to obtain the plaintext of the digital asset.
  • the encryption method of the encryption key may be agreed with the purchaser in advance, so that the mode key may be illegally in the process of transmission. Obtained, or the key may be stored in a storage address on the blockchain, so that the purchaser can directly obtain the corresponding key from the storage address.
  • the seller broadcasts on the blockchain a summary of the encrypted digital asset and the key used to encrypt the digital asset, so that the purchaser cannot decrypt the digital asset, ensuring the security of the digital asset, and not during the transaction.
  • the participation of the trading bureau is required to decentralize and improve the effectiveness of the transaction.
  • the above transaction processing method does not require a centralized settlement system, and the seller and the purchaser can freely trade through the blockchain, and the seller can encrypt the sold asset and broadcast it on the blockchain, thereby purchasing the
  • the purchaser of the digital asset may construct a contract based on the first public key of the seller's value redemption address, and the purchase value is transferred to the first transaction value storage address specified by the contract, when the seller detects that the purchaser will purchase the value Transferring to the first transaction value storage address, the purchase value stored in the first transaction value storage address is extracted, and the key of the encrypted digital asset is sent to the purchaser to complete the transaction.
  • the transaction processing method may further include: broadcasting, by the first transaction, the first digest of the key for encrypting the digital asset on the blockchain; receiving the first digest returned by the purchaser.
  • the step of calculating the seller value redemption address according to the first public key and the first transaction value storage address by using the second transaction, that is, the step S206 may include: acquiring a key for encrypting the digital asset by using the second transaction, and Calculating a second summary of the key; when the second summary is the same as the first summary, verifying the first public key by using the first private key of the seller's value redemption address; and when the verification is successful, obtaining the value of the seller's value Back address.
  • the seller not only broadcasts the encrypted digital asset on the blockchain, but also broadcasts the first digest of the key used to encrypt the digital asset on the blockchain, that is, the seller When you want to sell a digital asset, you first encrypt the digital asset with a key, then calculate the first summary of the key, and redeem the encrypted digital asset, the first summary, and the seller’s value to the first public address.
  • the key is broadcast on the blockchain. Therefore, the purchaser can obtain the encrypted digital asset, the first abstract, and the first public key of the seller's value redemption address, and the purchaser can obtain the purchaser value redemption address after obtaining the first public key.
  • the notification seller's purchase value has been transferred to the first transaction value storage address, and the first summary is used to determine which of the digital assets to purchase, that is, the first summary can uniquely determine the digital asset.
  • a second transaction may be opened, and the second transaction is used to provide the blockchain with a key for encrypting the digital asset. And calculating a second summary of the key according to a preset algorithm.
  • the digital asset to be purchased by the buyer may be determined and redeemed by the seller value corresponding to the digital asset.
  • the first private key of the address verifies the first public key, and only after the verification is successful, the purchase value in the first transaction value storage address can be transferred to the seller's value redemption address, that is, the seller can provide the seller Value redemption address.
  • the purchaser also needs to transfer a certain value to the purchaser value storage address of the blockchain in advance, and the purchaser value storage address can be the same as the purchaser value redemption address, so that the purchaser can directly The value in the purchaser's value storage address is transferred to the first transaction value storage address to successfully complete the transaction.
  • the first digest is introduced, and the digital asset purchased by the purchaser is determined by the first digest, and after the first digest verification is successful, the first public key is verified by the first private key of the seller's value redemption address. The key guarantees the security of the transaction.
  • the transaction processing method may further include: receiving a redemption script corresponding to the first public key returned by the purchaser. Therefore, before the step of acquiring the key for encrypting the digital asset by using the second transaction, the method further includes: calculating, by the second transaction, the second transaction value storage address according to the redemption script; and when the second transaction value storage address is the first transaction When the value storage addresses are identical, the step of obtaining a key for encrypting the digital asset through the second transaction is continued.
  • the redemption script is generated by the buyer based on the first public key and the second public key of the buyer value redemption address, the first transaction value storage address being generated by the buyer based on the redemption script.
  • the redemption script is generated based on the first public key of the seller's value redemption address and the second public key of the buyer's value redemption address, which is essentially the contract for the transaction. That is, after the purchaser obtains the first public key and the second public key, the redemption script is generated by the script virtual machine, and the first transaction value storage address is obtained by calculating the redemption script according to the preset rule, and then the purchase party Transferring the purchaser's funds to the first transaction value storage address, wherein the preset rule may be a secondary summary calculation, etc., but it is necessary to ensure that the preset rules of the buyer and the seller are the same, so that the buyer and the seller are based on the same
  • the transaction value storage address obtained by a redemption script is the same.
  • the seller calculates according to the redemption script according to the same preset rule as the buyer.
  • the second transaction value storage address is obtained.
  • the purchaser's redemption script is the same as the first transaction value storage address of the transferred funds, so the transaction can be continued.
  • the redemption script and the first transaction value storage address are verified once again, which further improves the security of the transaction.
  • the transaction processing method further includes a purchaser value redemption step, that is, when the seller does not conduct the transaction, the purchaser can redeem the corresponding purchase value
  • the step may include: when the second When the summary is different from the first summary, the preset number of blocks is obtained; the number of blocks participating in the calculation of the second transaction is obtained; when the number of blocks participating in the calculation of the second transaction is greater than the number of the preset blocks,
  • the first transaction value storage address obtains the second public key; when the second private key of the purchaser value redemption address provided by the buyer and the second public key are successfully verified, the purchase value stored in the first transaction value storage address is transferred Enter the purchaser's value redemption address.
  • blockchain is a novel method of generating consensus (reciprocal data and computational behavior between nodes) using distributed computing devices, also known as distributed ledgers.
  • the core design ideas include the use of a workload proof mechanism to protect the books.
  • the specific process is described as follows: a billing node computer (commonly known as absenteeism) in a distributed network collects the transfer transaction information of the market through the network, and completes the packing of a certain number of transaction information into a block data structure in a specific format ( Block), at this time, the completion node generates a block header corresponding to the block according to a fixed format.
  • a billing node computer commonly known as absenteeism
  • the attribute one is a special summary value for all transactions (hash, constructed from the merkle-tree method from all serialized transactions), and the other is a location random number field nonce.
  • the completion of the step begins to search for a specific random number: calculate the hash of the header structure corresponding to the initial value random number, and detect whether the hash satisfies the difficulty setting of the block chain for the current block. If so, the search is ended, the random number nonce is written to the block header, and the block is broadcast to other nodes in the network, waiting for other nodes to accept the block and write to the respective blockchain. If the proof of the set workload is not met, continue to increment the random number nonce, calculate the hash, and check the difficulty.
  • One block includes a block header and a block body, wherein the block header includes a summary of the previous block and a summary of the block.
  • the time, version, initial random number, the root of the Merck tree of the transaction structure (equivalent to the preset workload difficulty), and the transaction subject involves multiple transactions. See Figure 4 for the structure of the specific blockchain.
  • the participation may be obtained.
  • the number of blocks calculated by the second transaction when the number of blocks is greater than the preset number of blocks, the transaction is considered to be timed out, that is, the seller does not complete the transaction, and the second public key is obtained according to the first transaction value storage address.
  • the redemption script is first obtained according to the second transaction storage address, and then the second public key in the redemption script is obtained, so that the second private key and the second public key of the purchaser value redemption address provided by the purchaser are successfully verified.
  • the purchase value stored in the first transaction value storage address is transferred to the purchaser value redemption address to end the transaction.
  • the computer system of the blockchain is introduced, and whether the transaction is timed out is determined by the computer system of the blockchain. If the timeout is exceeded, the value in the first transaction value storage address can be returned to the purchaser value redemption address. To complete the transaction.
  • FIG. 5 is a sequence diagram of a transaction processing method in an embodiment.
  • the transaction processing method may include: the seller adds the encrypted digital asset, the first summary of the key of the encrypted digital asset, and the seller value redemption.
  • the first public key of the address is sent to the blockchain for broadcast, and the purchaser obtains the encrypted digital asset broadcasted by the seller on the blockchain according to the digital asset that is to be purchased, and encrypts the key of the digital asset.
  • the seller can open a second transaction to complete the transfer of the purchase value and the transfer of the key of the encrypted digital asset.
  • the process of the second transaction can be implemented in the form of a stack.
  • the input of the second transaction may be a key of the encrypted digital asset, a redemption script, a first private key of the seller's value redemption address, and the output is a seller value redemption address.
  • the specific processing of the second transaction is: first, pushing the first private key of the seller's value redemption address into the stack, pressing the key of the encrypted digital asset into the stack, and then calculating the key of the encrypted digital asset.
  • the second transaction process if the first digest and the second digest are not the same, the false is pushed in the header of the stack, and the timeout parameter is pushed onto the stack, and the timeout parameter is the number of preset blocks. So that the purchaser can detect whether the block participating in the calculation of the second transaction reaches the preset number of blocks, and if so, pushes the second public key of the purchaser's purchaser value redemption address onto the stack, thereby purchasing After the correct second private key is provided, after the blockchain verifies the second private key by using the second public key, the purchase value in the first transaction value storage address can be returned to the buyer to end the transaction.
  • FIGS. 2 and 5 are sequentially displayed as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Except as explicitly stated herein, the execution of these steps is not strictly limited, and the steps may be performed in other orders. Moreover, at least some of the steps in FIGS. 2 and 5 may include a plurality of sub-steps or stages, which are not necessarily performed at the same time, but may be performed at different times, or The order of execution of the stages is also not necessarily sequential, but may be performed alternately or alternately with at least a portion of the sub-steps or stages of other steps or other steps.
  • a transaction processing apparatus including: a broadcast module 100, a receiving module 200, a computing module 300, and a transaction module 400, wherein:
  • the broadcast module 100 is configured to broadcast the encrypted digital asset and the first public key of the seller's value redemption address on the blockchain by the first transaction.
  • the receiving module 200 is configured to receive a first transaction value storage address corresponding to the first public key returned by the purchaser.
  • the calculating module 300 is configured to: when detecting that the purchaser transfers the purchase value to the first transaction value storage address, calculate the seller value redemption address according to the first public key and the first transaction value storage address by using the second transaction .
  • the transaction module 400 is configured to transfer the purchase value stored in the first transaction value storage address into the seller value redemption address, and send the key for encrypting the digital asset to the purchaser.
  • the broadcast module 100 can also be configured to broadcast the first digest of the key used to encrypt the digital asset over the blockchain by the first transaction.
  • the receiving module 200 is further configured to receive a first summary returned by the purchaser;
  • the calculation module 300 can include:
  • a summary calculation unit configured to acquire a key for encrypting the digital asset through the second transaction, and calculate a second summary of the key.
  • the verification unit is configured to verify the first public key by using the first private key of the seller value redemption address when the second digest is the same as the first digest.
  • the address obtaining unit is configured to obtain the seller value redemption address when the verification is successful.
  • the receiving module 200 is further configured to receive a redemption script corresponding to the first public key returned by the purchaser.
  • the device may also include:
  • a comparison module configured to calculate, according to the redemption script, a second transaction value storage address by using the second transaction; when the second transaction value storage address is consistent with the first transaction value storage address, proceed to obtain the encrypted number through the second transaction The key to the asset.
  • the redemption script is generated by the buyer based on the first public key and the second public key of the purchaser value redemption address, the first transaction value storage address being generated by the buyer based on the redemption script.
  • the apparatus may further include:
  • the preset block quantity obtaining module is configured to acquire the preset number of blocks when the second summary is different from the first summary.
  • the current block quantity obtaining module is configured to acquire the number of blocks participating in calculating the second transaction.
  • the second public key obtaining module is configured to obtain the second public key according to the first transaction value storage address when the number of the blocks participating in the calculation of the second transaction is greater than the preset number of blocks.
  • a redemption module configured to transfer the purchase value stored in the first transaction value storage address to the purchaser value redemption when the second private key and the second public key verification of the purchaser value redemption address provided by the purchaser are successful Back to address.
  • Each of the above-described transaction processing devices may be implemented in whole or in part by software, hardware, and combinations thereof.
  • Each of the above modules may be embedded in or independent of the processor in the computer device, or may be stored in a memory in the computer device in a software form, so that the processor invokes the operations corresponding to the above modules.
  • a computer device which may be a terminal, and its internal structure diagram may be as shown in FIG.
  • the computer device includes a processor, memory, network interface, display screen, and input device connected by a system bus.
  • the processor of the computer device is used to provide computing and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium, an internal memory.
  • the non-volatile storage medium stores operating systems and computer readable instructions.
  • the internal memory provides an environment for operation of an operating system and computer readable instructions in a non-volatile storage medium.
  • the network interface of the computer device is used to communicate with an external terminal via a network connection.
  • the computer readable instructions are executed by a processor to implement a transaction processing method.
  • the display screen of the computer device may be a liquid crystal display or an electronic ink display screen
  • the input device of the computer device may be a touch layer covered on the display screen, or may be a button, a trackball or a touchpad provided on the computer device casing. It can also be an external keyboard, trackpad or mouse.
  • FIG. 7 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation of the computer device to which the solution of the present application is applied.
  • the specific computer device may It includes more or fewer components than those shown in the figures, or some components are combined, or have different component arrangements.
  • a computer device comprising a memory and one or more processors, the memory storing computer readable instructions, the computer readable instructions being executed by the processor, causing the one or more processors to perform the steps of:
  • the encrypted digital asset and the first public key of the seller's value redemption address are broadcast on the blockchain; receiving the first transaction value storage address returned by the purchaser corresponding to the first public key; when detecting that the purchaser will purchase
  • the seller value redemption address is calculated according to the first transaction key and the first transaction value storage address by the second transaction; and the purchase stored in the first transaction value storage address is obtained.
  • the value is transferred to the seller's value redemption address and the key used to encrypt the digital asset is sent to the buyer.
  • the processor when executing the computer readable instructions, further implements the step of: broadcasting, by the first transaction, the first digest of the key used to encrypt the digital asset on the blockchain; receiving the return from the purchaser a first summary; the step of the processor executing the computer readable instruction, calculating, by the second transaction, the seller value redemption address according to the first public key and the first transaction value storage address, may include: obtaining by using the second transaction a key for encrypting the digital asset, and calculating a second summary of the key; when the second digest is the same as the first digest, verifying the first public key by using the first private key of the vendor value redemption address; When the verification is successful, the seller's value redemption address is obtained.
  • the processor when executing the computer readable instructions, further implements the steps of: receiving a redemption script returned by the purchaser corresponding to the first public key; and implementing the second through the execution of the computer readable instructions by the processor
  • the method may further include: calculating, by the second transaction, the second transaction value storage address according to the redemption script; and when the second transaction value storage address and the first transaction value storage address When they are consistent, the step of obtaining a key for encrypting the digital asset is continued through the second transaction.
  • the redemption script mentioned by the processor when executing the computer readable instructions is generated by the buyer based on the first public key and the second public key of the purchaser value redemption address, the first transaction value The storage address is generated by the purchaser based on the redemption script.
  • the processor executes the computer readable instructions
  • the following steps are further implemented: when the second digest is different from the first digest, the preset number of blocks is acquired; and the block participating in the calculation of the second transaction is acquired. Quantity; when the number of blocks participating in the calculation of the second transaction is greater than the preset number of blocks, the second public key is obtained according to the first transaction value storage address; and the second of the purchaser value redemption address provided by the purchaser When the private key and the second public key are successfully verified, the purchase value stored in the first transaction value storage address is transferred to the purchaser value redemption address.
  • One or more non-transitory computer readable storage mediums storing computer readable instructions, when executed by one or more processors, cause one or more processors to perform the steps of: And transmitting, by the purchaser, a first transaction value storage address corresponding to the first public key returned by the purchaser; and detecting When the purchase value is transferred to the first transaction value storage address, the seller value redemption address is calculated according to the first public key and the first transaction value storage address by the second transaction; and the first transaction value storage address is stored The purchase value is transferred to the seller's value redemption address and the key used to encrypt the digital asset is sent to the purchaser.
  • the computer readable instructions when executed by the processor, further implement the step of: broadcasting, by the first transaction, the first digest of the key used to encrypt the digital asset on the blockchain; receiving the purchaser returning a first summary; the step of calculating, by the processor, the seller-value redemption address according to the first public key and the first transaction value storage address implemented by the processor, may include: passing the second Transaction acquires a key for encrypting the digital asset, and calculates a second summary of the key; when the second digest is identical to the first digest, the first public key is verified by the first private key of the vendor value redemption address; And when the verification is successful, the seller's value redemption address is obtained.
  • the computer readable instructions are further executed by the processor to: receive a redemption script returned by the purchaser corresponding to the first public key; in one of the embodiments, the computer readable instructions are processed Before the step of obtaining the key for encrypting the digital asset by the second transaction, the method further includes: calculating, by the second transaction, the second transaction value storage address according to the redemption script; and when the second transaction value is When the storage address coincides with the first transaction value storage address, the step of obtaining a key for encrypting the digital asset through the second transaction is continued.
  • the redemption script mentioned when the computer readable instructions are executed by the processor is generated by the buyer based on the first public key and the second public key of the purchaser value redemption address, the first transaction The value storage address is generated by the purchaser based on the redemption script.
  • the following steps are further implemented: when the second summary is different from the first summary, the preset number of blocks is acquired; and the block participating in the calculation of the second transaction is acquired.
  • the quantity; when the number of blocks participating in the calculation of the second transaction is greater than the preset number of blocks, the second public key is obtained according to the first transaction value storage address; and the purchaser value redemption address provided by the purchaser
  • the verification of the second private key and the second public key is successful, the purchase value stored in the first transaction value storage address is transferred to the purchaser value redemption address.
  • 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.
  • RAM is available in a variety of formats, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronization chain.
  • SRAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDRSDRAM double data rate SDRAM
  • ESDRAM enhanced SDRAM
  • Synchlink DRAM SLDRAM
  • Memory Bus Radbus
  • RDRAM Direct RAM
  • DRAM Direct Memory Bus Dynamic RAM
  • RDRAM Memory Bus Dynamic RAM

Landscapes

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

Abstract

一种交易处理方法,包括:通过第一交易将加密的数字资产以及出售方价值赎回地址的第一公钥在区块链上进行广播;接收购买方返回的与所述第一公钥对应的第一交易价值存储地址;当检测到所述购买方将购买价值转入至第一交易价值存储地址时,则通过第二交易根据所述第一公钥以及所述第一交易价值存储地址计算得到出售方价值赎回地址;将所述第一交易价值存储地址中存储的购买价值转入至所述出售方价值赎回地址中,并将用于加密所述数字资产的密钥发送至所述购买方。

Description

交易处理方法、装置、计算机设备和存储介质
相关申请的交叉引用
本申请要求于2018年1月30日提交中国专利局,申请号为2018100902028,申请名称为“交易处理方法、装置、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请一种交易处理方法、装置、计算机设备和存储介质。
背景技术
随着计算机技术的发展,出现了网上交易,该网上交易一般是用于进行数字化资产的交易,该数字化资产可以是一部电影、一份电子版芯片设计手册、一份查询列表等,网上交易一般是设置一个中心化的结算***,该结算***用于对出售方和购买方进行控制,以实现交易。
然而,发明人意识到,目前的交易方式需要设置一个结算***,出售方和购买方均需要在该结算***进行注册登记等,而没有在结算中心进行注册登记的出售方或购买方则不能进行交易,形成了中心化处理结算***,造成结算***压力大。
发明内容
根据本申请公开的各种实施例,提供一种交易处理方法、装置、计算机设备和存储介质。
一种交易处理方法,包括:
通过第一交易将加密的数字资产以及出售方价值赎回地址的第一公钥在区块链上进行广播;
接收购买方返回的与所述第一公钥对应的第一交易价值存储地址;
当检测到所述购买方将购买价值转入至第一交易价值存储地址时,则通过第二交易根据所述第一公钥以及所述第一交易价值存储地址计算得到出售方价值赎回地址;及
将所述第一交易价值存储地址中存储的购买价值转入至所述出售方价值赎回地址中,并将用于加密所述数字资产的密钥发送至所述购买方。
一种交易处理装置,包括:
广播模块,用于通过第一交易将加密的数字资产以及出售方价值赎回地址的第一公钥在区块链上进行广播;
接收模块,用于接收购买方返回的与所述第一公钥对应的第一交易价值存储地址;
计算模块,用于当检测到所述购买方将购买价值转入至第一交易价值存储地址时,则通过第二交易根据所述第一公钥以及所述第一交易价值存储地址计算得到出售方价值赎回地址;及
交易模块,用于将所述第一交易价值存储地址中存储的购买价值转入至所述出售方价值赎回地址中,并将用于加密所述数字资产的密钥发送至所述购买方。
一种计算机设备,包括存储器和一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述一个或多个处理器执行以下步骤:通过第一交易将加密的数字资产以及出售方价值赎回地址的第一公钥在区块链上进行广播;接收购买方返回的与所述第一公钥对应的第一交易价值存储地址;当检测到所述购买方将购买价值转入至第一交易价值存储地址时,则通过第二交易根据所述第一公钥以及所述第一交易价值存储地址计算得到出售方价值赎回地址;及将所述第一交易价值存储地址中存储的购买价值转入至所述出售方价值赎回地址中,并将用于加密所述数字资产的密钥发送至所述购买方。
一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:通过第一交易将加密的数字资产以及出售方价值赎回地址的第一公钥在区块链上进行广播;接收购买方返回的与所述第一公钥对应的第一交易价值存储地址;当检测到所述购买方将购买价值转入至第一交易价值存储地址时,则通过第二交易根据所述第一公钥以及所述第一交易价值存储地址计算得到出售方价值赎回地址;及将所述第一交易价值存储地址中存储的购买价值转入至所述出售方价值赎回地址中,并将用于加密所述数字资产的密钥发送至所述购买方。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和优点将从说明书、附图以及权利要求书变得明显。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1为根据一个或多个实施例中交易处理方法的应用场景图。
图2为根据一个或多个实施例中交易处理方法的流程示意图。
图3为根据一个或多个实施例中区块结构示意图。
图4为根据一个或多个实施例中区块链的示意图。
图5为根据一个或多个实施例中的交易处理方法的时序图。
图6为根据一个或多个实施例中交易处理装置的结构框图。
图7为根据一个或多个实施例中计算机设备的内部结构图。
具体实施方式
为了使本申请的技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请提供的交易处理方法,可以应用于如图1所示的应用环境中。出售方和购买方均与区块链进行通信。出售方可以将待出售的数字资产加密后在区块链上进行广播,从而购买方可以获得到该数字资产,购买方在获取到该数字资产后,首先根据出售方的出售方价值赎回地址的第一公钥构造合约,并将购买价值转入到该合约指定的第一交易价值存储地址中,当出售方检测到购买方将购买价值转入至第一交易价值存储地址,则提取该第一交易价值存储地址中存储的购买价值,并将加密数字资产的密钥发送给购买方以完成交易。出售方和购买方对应的终端可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备。
在其中一个实施例中,如图2所示,提供了一种交易处理方法,以该方法应用于图1中的出售方为例进行说明,包括以下步骤:
S202:通过第一交易将加密的数字资产以及出售方价值赎回地址的第一公钥在区块链上进行广播。
具体地,数字化资产的样式多样,可以包括一部电影(movie),一份电子版芯片设计手册(datasheet),一份查询列表(query list)等等。第一交易是出售方将待出售的数字资产在区块链上进行广播的交易,区块链在接收到该第一交易后,区块链中的节点可以竞争性地进行挖矿,以计算该第一交易的有效性。
出售方可以将要出售的数字资产通过密钥进行加密后再在区块链上进行广播,从而购买方不能直接获取到该数字资产的明文,只有在出售方将加密该数字资产的密钥提供给购买方后,购买方才能获取到数字资产的明文。且由于存储在区块链上的数据均是需要通过私钥进行加密的,其是为了保护数据的安全性,因此为了保证出售方价值赎回地址的安全性,出售方将出售方价值赎回地址的第一公钥在区块链上进行广播,从而可以防止区块链上的非法分子获取到出售方价值赎回地址,进而获取到该出售方价值赎回地址中的价值。
S204:接收购买方返回的与第一公钥对应的第一交易价值存储地址。
具体地,当存在购买方想要购买该数字资产时,则获取到出售方广播的加密的数字资产以及出售方价值赎回地址的第一公钥,并根据该第一公钥和购买方的购买方价值赎回地址生成一合约,例如该合约的内容可以表示为当购买方提供购买该数字资产的购买价值时,则给出售方的出售方价值赎回地址,从而可以将购买价值转入到出售方价值赎回地址中,出售方在收到购买价值后则可以将加密数字资产的密钥转发给对应的购买方,当购买方未提供购买该数字资产的购买价值,或者是所提供的购买价值不是针对该数字资产的时候,则将该购买价值退回至购买方价值赎回地址中。
在获得到该合约后,可以对该合约按照预设规则进行计算得到第一交易价值存储地 址,例如可以对合约进行二次摘要计算得到第一交易价值存储地址。为了防止出售方在获取到价值后不将数字资产转给购买方,因此可以购买方先将购买价值转入到第一交易价值存储地址中,并在购买方获取到该第一交易价值存储地址中的购买价值后,区块链主动将出售方用于加密数字资产的密钥提供给购买方。且购买方在向第一交易价值存储地址转入购买价值后,可以对该次交易进行签名,以确保交易的安全性,并实现对第一交易价值存储地址中的价值的锁定,从而只有验证成功的才可以从该第一交易价值存储地址中获取到购买价值。
S206:当检测到购买方将购买价值转入至第一交易价值存储地址时,则通过第二交易根据第一公钥以及第一交易价值存储地址计算得到出售方价值赎回地址。
具体地,当出售方检测到购买方将购买价值转入至第一交易价值存储地址时,即出售方检测到购买方将购买价值转入至公共价值存储地址时,则可以提供自身的出售方价值赎回地址,以便于将区块链中第一交易价值存储地址中的购买价值转入至自身的出售方价值赎回地址中,其中该出售方价值赎回地址由于在区块链上是以第一公钥的形式存在的,因此需要根据第一公钥以及第一交易价值存储地址计算得到。具体地可以是对通过出售方自身的第一私钥进行验证,只有验证成功的第一公钥,才会得到正确的出售方价值赎回地址。从而可以根据第一交易价值存储地址中的购买价值转入至出售方价值赎回地址。
S208:将第一交易价值存储地址中存储的购买价值转入至出售方价值赎回地址中,并将用于加密数字资产的密钥发送至购买方。
具体地,在获取到出售方价值赎回地址后,则出售方可以将第一交易价值存储地址中存储的购买价值转入至出售方价值赎回地址中,并在获取到购买价值后,将用于加密数字资产的密钥发送给购买方,从而购买方可以根据获取到的用于加密数字资产的密钥对加密的数字化资产进行解密得到数字资产的明文。且可选地,在出售方将用于加密数字资产的密钥发送至购买方的时候,可以预先与购买方约定加密密钥的加密方式,从而可以方式密钥在传输的过程中被非法分子获取到,或者可以将密钥存储至区块链上的一存储地址中,从而购买方可以直接从该存储地址中获取到相应的密钥。
出售方在区块链上广播的是加密的数字资产以及用于加密数字资产的密钥的摘要,从而购买方无法解密得到该数字资产,保证了数字资产的安全性,且在交易过程中不需要交易局的参与,去中心化,提高了交易的实效性。
上述交易处理方法,不需要中心化的结算***,出售方和购买方可以通过区块链自由地进行交易,出售方可以将出售的资产进行加密后在区块链上进行广播,从而需要购买该数字资产的购买方可以根据出售方的价值赎回地址的第一公钥构造合约,并购买价值转入到该合约指定的第一交易价值存储地址中,当出售方检测到购买方将购买价值转入至第一交易价值存储地址,则提取该第一交易价值存储地址中存储的购买价值,并将加密数字资产的密钥发送给购买方以完成交易。
在其中一个实施例中,该交易处理方法还可以包括:通过第一交易将用于加密数字 资产的密钥的第一摘要在区块链上进行广播;接收购买方返回的第一摘要。从而通过第二交易根据第一公钥以及第一交易价值存储地址计算得到出售方价值赎回地址的步骤,即上述步骤S206可以包括:通过第二交易获取用于加密数字资产的密钥,并计算密钥的第二摘要;当第二摘要与第一摘要相同时,则通过出售方价值赎回地址的第一私钥验证第一公钥;当验证成功时,则获取到出售方价值赎回地址。
具体地,在本实施例中,出售方不仅将加密的数字资产在区块链上进行广播,还将用于加密数字资产的密钥的第一摘要在区块链上进行广播,即出售方想要出售某一数字资产时,首先将该数字资产通过密钥进行加密,然后计算密钥的第一摘要,并将加密的数字资产、第一摘要以及出售方价值赎回地址的第一公钥在区块链上进行广播。从而购买方可以获取到该加密的数字资产、第一摘要以及出售方价值赎回地址的第一公钥,购买方在获取到第一公钥后,还可以获取到购买方价值赎回地址的第二公钥,并根据第一公钥以及第二公钥生成一合约,根据该合约可以生成第一交易价值存储地址,并将自己的购买价值转入到该第一交易价值存储地址中后,通知出售方购买价值已经转入到第一交易价值存储地址中,并通过第一摘要来确定其所要购买的数字资产是哪一个,即第一摘要可以唯一地确定数字资产。
其中,在出售方接收到购买方已经将购买价值转入到第一交易价值存储地址中后,可以开启一第二交易,通过该第二交易向区块链提供用于加密数字资产的密钥,并按照预设的算法计算密钥的第二摘要,当第二摘要与第一摘要相同时,则可以确定购买方所要购买的数字资产,并通过与该数字资产对应的出售方价值赎回地址的第一私钥验证第一公钥,只有验证成功后,第一交易价值存储地址中的购买价值才可以转入到该出售方价值赎回地址中,即出售方可以提供出该出售方价值赎回地址。
其中,购买方还需要预先将一定的价值转入到区块链的购买方价值存储地址中,该购买方价值存储地址可以与购买方价值赎回地址相同,从而购买方在交易时,可以直接将购买方价值存储地址中的价值转入到第一交易价值存储地址中,以顺利地完成交易。
上述实施例中,引入了第一摘要,通过第一摘要来确定购买方所购买的数字资产,并且在第一摘要验证成功后,通过出售方价值赎回地址的第一私钥验证第一公钥,保证了交易的安全性。
在其中一个实施例中,该交易处理方法还可以包括:接收购买方返回的与第一公钥对应的赎回脚本。从而通过第二交易获取用于加密数字资产的密钥的步骤之前,还可以包括:通过第二交易根据赎回脚本计算得到第二交易价值存储地址;当第二交易价值存储地址与第一交易价值存储地址一致时,则继续通过第二交易获取用于加密数字资产的密钥的步骤。
在其中一个实施例中,赎回脚本是由购买方根据第一公钥以及购买方价值赎回地址的第二公钥生成的,第一交易价值存储地址是购买方根据赎回脚本生成的。
具体地,赎回脚本是根据出售方价值赎回地址的第一公钥和购买方价值赎回地址的 第二公钥生成的,其本质上为本次交易的合约。即购买方将在获取到第一公钥和第二公钥后,通过脚本虚拟机生成赎回脚本,并通过对赎回脚本按照预设规则进行计算得到第一交易价值存储地址,然后购买方将购买方资金转入到该第一交易价值存储地址中,其中预设规则可以是二次摘要计算等,但是需要保证购买方和出售方的预设规则相同,从而购买方和出售方根据同一个赎回脚本得到的交易价值存储地址是相同的。
其中为了保证购买方发送的第一交易价值存储地址与赎回脚本是相对应的,出售方在获取到购买方返回的赎回脚本后,按照与购买方相同的预设规则根据赎回脚本计算得到第二交易价值存储地址,当第二交易价值存储地址与第一交易价值存储地址一致,则说明购买方的赎回脚本与其转入资金的第一交易价值存储地址相同,因此可以继续交易。
上述实施例中,对赎回脚本和第一交易价值存储地址进行了再一次的验证,进一步提高了交易的安全性。
在其中一个实施例中,该交易处理方法还包括一购买方价值赎回步骤,即当出售方不进行交易的情况下,购买方可以赎回相应的购买价值,该步骤可以包括:当第二摘要与第一摘要不相同时,则获取预设区块数量;获取参与计算第二交易的区块的数量;当参与计算第二交易的区块的数量大于预设区块数量时,则根据第一交易价值存储地址得到第二公钥;当购买方提供的购买方价值赎回地址的第二私钥与第二公钥验证成功时,将第一交易价值存储地址中存储的购买价值转入至购买方价值赎回地址中。
具体地,区块链作为一种新型的使用分布式的计算设备产生共识(节点间相互可信的数据和计算行为)的方法,也被称作分布式账本。其中核心的设计思想包括使用工作量证明机制保护账本可信。具体的过程描述如下:分布式网络中的记账节点计算机(俗称旷工),通过网络收集市场的转账交易信息,旷工以特定的格式打包若干个数量的交易信息到一个区块的数据结构中(block),这个时候旷工节点再按照固定的一个格式生成一个对应于这个block的区块头部(block header),这个区块头部中除了基本的描述当前block信息之外,还有2个重要的属性,一个是关于所有交易的一个特殊摘要值(hash,从所有序列化的交易中通过merkle-tree方法构造),另一个是一个位置的随机数字段nonce。有了这个区块头部以后,旷工开始一下步骤搜索一个特定的随机数:计算初始值随机数对应的header结构的hash,检测该hash是否满足区块链对当前区块的难度设定。如果满足,结束搜索,将该随机数nonce写入区块头部,向网络中的其他节点广播这个区块,等待其他节点把这个block接受,并写入各自的区块链。如果不满足设定工作量证明,继续递增随机数nonce,计算hash,检查难度。直到找到一个合适的难度,该区块计算完成,并继续寻找下一区块进行计算。具体的区块的结构请参阅图3,其中一个区块包括区块头部和区块主体,其中区块头部包括前一个区块的摘要、本区块的摘要。时间、版本、初始随机数、交易构造的默克树的根(相当于预设工作量难度),交易主体则涉及多个交易。具体的区块链的结构请参阅图4。
其中,当第二交易中所计算的第二摘要与第一摘要不相同时,即购买方所提供的用 于加密数字资产的密钥的摘要与出售方的不一致时,则可以获取到参与第二交易计算的区块的数量,当区块数量大于预设区块数量时,则认为交易超时,即出售方不会完成本次交易,则根据第一交易价值存储地址得到第二公钥,例如首先根据第二交易存储地址得到赎回脚本,再获取到赎回脚本中的第二公钥,从而当购买方提供的购买方价值赎回地址的第二私钥与第二公钥验证成功时,将第一交易价值存储地址中存储的购买价值转入至购买方价值赎回地址中,以结束交易。
上述实施例中,引入区块链的计算机制,通过区块链的计算机制来判断交易是否超时,如果超时则可以将第一交易价值存储地址中的价值返回至购买方价值赎回地址中,以完成交易。
参阅图5,图5为一实施例中的交易处理方法的时序图,该交易处理方法可以包括:出售方将加密的数字资产,加密数字资产的密钥的第一摘要以及出售方价值赎回地址的第一公钥发送至区块链上进行广播,购买方根据想要购买的数字资产,获取到出售方在区块链上广播的加密的数字资产,加密数字资产的密钥的第一摘要以及出售方价值赎回地址的第一公钥,并根据购买方价值赎回地址的第二公钥生成赎回脚本,然后根据该赎回脚本生成第一交易价值存储地址,并将购买价值转入到该第一交易价值存储地址中,其中,购买方可以预先将一定的价值转入到区块链的购买方价值存储地址中,从而购买时可以直接将购买方价值存储地址中的价值转入到第一交易价值存储地址中,且购买方在价值转入成功后,向出售方发送携带有第一交易价值存储地址的消息以及生成的赎回脚本,从而出售方可以按照与购买方相同的预设规则对赎回脚本进行计算得到第二交易价值存储地址,并比较该第一交易价值存储地址以及第二交易价值存储地址,只有该第一交易价值存储地址以及第二交易价值存储地址相同时,才会继续交易。
为了方便,出售方在接收到赎回脚本以及价值转入成功的消息后,可以开启一第二交易以完成购买价值的转移和加密数字资产的密钥的转移。其中,在实际应用过程中,可以通过堆栈的形式实现第二交易的过程。该第二交易的输入可以为加密数字资产的密钥、赎回脚本、出售方价值赎回地址的第一私钥,输出为出售方价值赎回地址。该第二交易的具体处理过程是:首先将出售方价值赎回地址的第一私钥压入到堆栈中,将加密数字资产的密钥压入堆栈中,然后计算加密数字资产的密钥的第一摘要,并通过该第一摘要与出售方返回的第二摘要进行比对,如果相同,则在堆栈的头部压入true,从而根据第一私钥对赎回脚本中出售方价值赎回地址的第一公钥进行验证,如果验证成功,则输出出售方价值赎回地址。从而出售方可以将第一交易价值存储地址中的交易价值转入到出售方价值赎回地址中,并将加密数字资产的密钥发送给对应的购买方,从而购买方可以根据该密钥对加密的数字资产进行解密得到数字资产的明文以完成交易。
此外,在第二交易过程中,如果第一摘要和第二摘要不相同,则在堆栈的头部压入false,并将超时参数压入到堆栈中,该超时参数即预设区块的数量,从而购买方可以检测参与计算第二交易的区块是否达到预设的区块数量,如果是,则将购买方的购买方价值赎 回地址的第二公钥压入到堆栈中,从而购买方提供正确的第二私钥后,区块链通过第二公钥验证该第二私钥后,可以将第一交易价值存储地址中的购买价值返回给购买方以结束交易。
应该理解的是,虽然图2和图5的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2和图5中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
在其中一个实施例中,如图6所示,提供了一种交易处理装置,包括:广播模块100、接收模块200、计算模块300和交易模块400,其中:
广播模块100,用于通过第一交易将加密的数字资产以及出售方价值赎回地址的第一公钥在区块链上进行广播。
接收模块200,用于接收购买方返回的与第一公钥对应的第一交易价值存储地址。
计算模块300,用于当检测到购买方将购买价值转入至第一交易价值存储地址时,则通过第二交易根据第一公钥以及第一交易价值存储地址计算得到出售方价值赎回地址。
交易模块400,用于将第一交易价值存储地址中存储的购买价值转入至出售方价值赎回地址中,并将用于加密数字资产的密钥发送至购买方。
在其中一个实施例中,广播模块100还可以用于通过第一交易将用于加密数字资产的密钥的第一摘要在区块链上进行广播。
接收模块200还用于接收购买方返回的第一摘要;
计算模块300可以包括:
摘要计算单元,用于通过第二交易获取用于加密数字资产的密钥,并计算密钥的第二摘要。
验证单元,用于当第二摘要与第一摘要相同时,则通过出售方价值赎回地址的第一私钥验证第一公钥。
地址获取单元,用于当验证成功时,则获取到出售方价值赎回地址。
在其中一个实施例中,接收模块200还可以用于接收购买方返回的与第一公钥对应的赎回脚本。
装置还可以包括:
比较模块,用于通过第二交易根据赎回脚本计算得到第二交易价值存储地址;当第二交易价值存储地址与第一交易价值存储地址一致时,则继续通过第二交易获取用于加密数字资产的密钥。
在其中一个实施例中,赎回脚本是由购买方根据第一公钥以及购买方价值赎回地址 的第二公钥生成的,第一交易价值存储地址是购买方根据赎回脚本生成的。
在其中一个实施例中,装置还可以包括:
预设区块数量获取模块,用于当第二摘要与第一摘要不相同时,则获取预设区块数量。
当前区块数量获取模块,用于获取参与计算第二交易的区块的数量。
第二公钥获取模块,用于当参与计算第二交易的区块的数量大于预设区块数量时,则根据第一交易价值存储地址得到第二公钥。
赎回模块,用于当购买方提供的购买方价值赎回地址的第二私钥与第二公钥验证成功时,将第一交易价值存储地址中存储的购买价值转入至购买方价值赎回地址中。
关于交易处理装置的具体限定可以参见上文中对于交易处理方法的限定,在此不再赘述。上述交易处理装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
在其中一个实施例中,提供了一种计算机设备,该计算机设备可以是终端,其内部结构图可以如图7所示。该计算机设备包括通过***总线连接的处理器、存储器、网络接口、显示屏和输入装置。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作***和计算机可读指令。该内存储器为非易失性存储介质中的操作***和计算机可读指令的运行提供环境。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种交易处理方法。该计算机设备的显示屏可以是液晶显示屏或者电子墨水显示屏,该计算机设备的输入装置可以是显示屏上覆盖的触摸层,也可以是计算机设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。
本领域技术人员可以理解,图7中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
一种计算机设备,包括存储器和一个或多个处理器,存储器中储存有计算机可读指令,计算机可读指令被处理器执行时,使得一个或多个处理器执行以下步骤:通过第一交易将加密的数字资产以及出售方价值赎回地址的第一公钥在区块链上进行广播;接收购买方返回的与第一公钥对应的第一交易价值存储地址;当检测到购买方将购买价值转入至第一交易价值存储地址时,则通过第二交易根据第一公钥以及第一交易价值存储地址计算得到出售方价值赎回地址;及将第一交易价值存储地址中存储的购买价值转入至出售方价值赎回地址中,并将用于加密数字资产的密钥发送至购买方。
在其中一个实施例中,处理器执行计算机可读指令时还实现以下步骤:通过第一交易将用于加密数字资产的密钥的第一摘要在区块链上进行广播;接收购买方返回的第一摘 要;处理器执行计算机可读指令时所实现的通过第二交易根据第一公钥以及第一交易价值存储地址计算得到出售方价值赎回地址的步骤,可以包括:通过第二交易获取用于加密数字资产的密钥,并计算密钥的第二摘要;当第二摘要与第一摘要相同时,则通过出售方价值赎回地址的第一私钥验证第一公钥;及当验证成功时,则获取到出售方价值赎回地址。
在其中一个实施例中,处理器执行计算机可读指令时还实现以下步骤:接收购买方返回的与第一公钥对应的赎回脚本;处理器执行计算机可读指令时所实现的通过第二交易获取用于加密数字资产的密钥的步骤之前,还可以包括:通过第二交易根据赎回脚本计算得到第二交易价值存储地址;及当第二交易价值存储地址与第一交易价值存储地址一致时,则继续通过第二交易获取用于加密数字资产的密钥的步骤。
在其中一个实施例中,处理器执行计算机可读指令时所提到的赎回脚本是由购买方根据第一公钥以及购买方价值赎回地址的第二公钥生成的,第一交易价值存储地址是购买方根据赎回脚本生成的。
在其中一个实施例中,处理器执行计算机可读指令时还实现以下步骤:当第二摘要与第一摘要不相同时,则获取预设区块数量;获取参与计算第二交易的区块的数量;当参与计算第二交易的区块的数量大于预设区块数量时,则根据第一交易价值存储地址得到第二公钥;及当购买方提供的购买方价值赎回地址的第二私钥与第二公钥验证成功时,将第一交易价值存储地址中存储的购买价值转入至购买方价值赎回地址中。
一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:通过第一交易将加密的数字资产以及出售方价值赎回地址的第一公钥在区块链上进行广播;接收购买方返回的与第一公钥对应的第一交易价值存储地址;当检测到购买方将购买价值转入至第一交易价值存储地址时,则通过第二交易根据第一公钥以及第一交易价值存储地址计算得到出售方价值赎回地址;及将第一交易价值存储地址中存储的购买价值转入至出售方价值赎回地址中,并将用于加密数字资产的密钥发送至购买方。
在其中一个实施例中,计算机可读指令被处理器执行时还实现以下步骤:通过第一交易将用于加密数字资产的密钥的第一摘要在区块链上进行广播;接收购买方返回的第一摘要;计算机可读指令被处理器执行时所实现的通过第二交易根据第一公钥以及第一交易价值存储地址计算得到出售方价值赎回地址的步骤,可以包括:通过第二交易获取用于加密数字资产的密钥,并计算密钥的第二摘要;当第二摘要与第一摘要相同时,则通过出售方价值赎回地址的第一私钥验证第一公钥;及当验证成功时,则获取到出售方价值赎回地址。
在其中一个实施例中,计算机可读指令被处理器执行时还实现以下步骤:接收购买方返回的与第一公钥对应的赎回脚本;在其中一个实施例中,计算机可读指令被处理器执行时所实现的通过第二交易获取用于加密数字资产的密钥的步骤之前,还可以包括:通过第二交易根据赎回脚本计算得到第二交易价值存储地址;及当第二交易价值存储地址与第 一交易价值存储地址一致时,则继续通过第二交易获取用于加密数字资产的密钥的步骤。
在其中一个实施例中,计算机可读指令被处理器执行时所提到的赎回脚本是由购买方根据第一公钥以及购买方价值赎回地址的第二公钥生成的,第一交易价值存储地址是购买方根据赎回脚本生成的。
在其中一个实施例中,计算机可读指令被处理器执行时还实现以下步骤:当第二摘要与第一摘要不相同时,则获取预设区块数量;获取参与计算第二交易的区块的数量;当参与计算第二交易的区块的数量大于预设区块数量时,则根据第一交易价值存储地址得到第二公钥;及当购买方提供的购买方价值赎回地址的第二私钥与第二公钥验证成功时,将第一交易价值存储地址中存储的购买价值转入至购买方价值赎回地址中。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (20)

  1. 一种交易处理方法,包括:
    通过第一交易将加密的数字资产以及出售方价值赎回地址的第一公钥在区块链上进行广播;
    接收购买方返回的与所述第一公钥对应的第一交易价值存储地址;
    当检测到所述购买方将购买价值转入至第一交易价值存储地址时,则通过第二交易根据所述第一公钥以及所述第一交易价值存储地址计算得到出售方价值赎回地址;及
    将所述第一交易价值存储地址中存储的购买价值转入至所述出售方价值赎回地址中,并将用于加密所述数字资产的密钥发送至所述购买方。
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    通过第一交易将用于加密所述数字资产的密钥的第一摘要在区块链上进行广播;
    接收所述购买方返回的所述第一摘要;
    所述通过第二交易根据所述第一公钥以及所述第一交易价值存储地址计算得到出售方价值赎回地址,包括:
    通过第二交易获取用于加密所述数字资产的密钥,并计算所述密钥的第二摘要;
    当所述第二摘要与所述第一摘要相同时,则通过所述出售方价值赎回地址的第一私钥验证所述第一公钥;及
    当验证成功时,则获取到出售方价值赎回地址。
  3. 根据权利要求2所述的方法,其特征在于,所述方法还包括:
    接收所述购买方返回的与所述第一公钥对应的赎回脚本;
    所述通过第二交易获取用于加密所述数字资产的密钥之前,还包括:
    通过第二交易根据所述赎回脚本计算得到第二交易价值存储地址;及
    当所述第二交易价值存储地址与所述第一交易价值存储地址一致时,则继续通过第二交易获取用于加密所述数字资产的密钥的步骤。
  4. 根据权利要求3所述的方法,其特征在于,所述赎回脚本是由所述购买方根据所述第一公钥以及所述购买方价值赎回地址的第二公钥生成的,所述第一交易价值存储地址是所述购买方根据所述赎回脚本生成的。
  5. 根据权利要求4所述的方法,其特征在于,所述方法还包括:
    当所述第二摘要与所述第一摘要不相同时,则获取预设区块数量;
    获取参与计算所述第二交易的区块的数量;
    当参与计算所述第二交易的区块的数量大于所述预设区块数量时,则根据所述第一交易价值存储地址得到第二公钥;及
    当所述购买方提供的购买方价值赎回地址的第二私钥与所述第二公钥验证成功时,将所述第一交易价值存储地址中存储的购买价值转入至所述购买方价值赎回地址中。
  6. 一种交易处理装置,包括:
    广播模块,用于通过第一交易将加密的数字资产以及出售方价值赎回地址的第一公钥在区块链上进行广播;
    接收模块,用于接收购买方返回的与所述第一公钥对应的第一交易价值存储地址;
    计算模块,用于当检测到所述购买方将购买价值转入至第一交易价值存储地址时,则通过第二交易根据所述第一公钥以及所述第一交易价值存储地址计算得到出售方价值赎回地址;及
    交易模块,用于将所述第一交易价值存储地址中存储的购买价值转入至所述出售方价值赎回地址中,并将用于加密所述数字资产的密钥发送至所述购买方。
  7. 根据权利要求6所述的装置,其特征在于,所述广播模块还用于通过第一交易将用于加密所述数字资产的密钥的第一摘要在区块链上进行广播;
    所述接收模块还用于接收所述购买方返回的所述第一摘要;
    所述计算模块包括:
    摘要计算单元,用于通过第二交易获取用于加密所述数字资产的密钥,并计算所述密钥的第二摘要;
    验证单元,用于当所述第二摘要与所述第一摘要相同时,则通过所述出售方价值赎回地址的第一私钥验证所述第一公钥;及
    地址获取单元,用于当验证成功时,则获取到出售方价值赎回地址。
  8. 根据权利要求7所述的装置,其特征在于,所述接收模块还用于接收所述购买方返回的与所述第一公钥对应的赎回脚本;
    所述装置还包括:
    比较模块,用于通过第二交易根据所述赎回脚本计算得到第二交易价值存储地址;当所述第二交易价值存储地址与所述第一交易价值存储地址一致时,则继续通过第二交易获取用于加密所述数字资产的密钥。
  9. 根据权利要求8所述的装置,其特征在于,所述赎回脚本是由所述购买方根据所述第一公钥以及所述购买方价值赎回地址的第二公钥生成的,所述第一交易价值存储地址是所述购买方根据所述赎回脚本生成的。
  10. 根据权利要求9所述的装置,其特征在于,所述装置还包括:
    预设区块数量获取模块,用于当所述第二摘要与所述第一摘要不相同时,则获取预设区块数量;
    当前区块数量获取模块,用于获取参与计算所述第二交易的区块的数量;
    第二公钥获取模块,用于当参与计算所述第二交易的区块的数量大于所述预设区块数量时,则根据所述第一交易价值存储地址得到第二公钥;及
    赎回模块,用于当所述购买方提供的购买方价值赎回地址的第二私钥与所述第二公钥验证成功时,将所述第一交易价值存储地址中存储的购买价值转入至所述购买方价值赎回 地址中。
  11. 一种计算机设备,包括存储器及一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:通过第一交易将加密的数字资产以及出售方价值赎回地址的第一公钥在区块链上进行广播;接收购买方返回的与所述第一公钥对应的第一交易价值存储地址;当检测到所述购买方将购买价值转入至第一交易价值存储地址时,则通过第二交易根据所述第一公钥以及所述第一交易价值存储地址计算得到出售方价值赎回地址;及将所述第一交易价值存储地址中存储的购买价值转入至所述出售方价值赎回地址中,并将用于加密所述数字资产的密钥发送至所述购买方。
  12. 根据权利要求11所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:通过第一交易将用于加密所述数字资产的密钥的第一摘要在区块链上进行广播;接收所述购买方返回的所述第一摘要;所述处理器执行所述计算机可读指令时所实现的所述通过第二交易根据所述第一公钥以及所述第一交易价值存储地址计算得到出售方价值赎回地址,包括:通过第二交易获取用于加密所述数字资产的密钥,并计算所述密钥的第二摘要;当所述第二摘要与所述第一摘要相同时,则通过所述出售方价值赎回地址的第一私钥验证所述第一公钥;及当验证成功时,则获取到出售方价值赎回地址。
  13. 根据权利要求12所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:接收所述购买方返回的与所述第一公钥对应的赎回脚本;所述处理器执行所述计算机可读指令时所实现的所述通过第二交易获取用于加密所述数字资产的密钥之前,还包括:通过第二交易根据所述赎回脚本计算得到第二交易价值存储地址;及当所述第二交易价值存储地址与所述第一交易价值存储地址一致时,则继续通过第二交易获取用于加密所述数字资产的密钥的步骤。
  14. 根据权利要求13所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时所涉及的所述赎回脚本是由所述购买方根据所述第一公钥以及所述购买方价值赎回地址的第二公钥生成的,所述第一交易价值存储地址是所述购买方根据所述赎回脚本生成的。
  15. 根据权利要求14所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:当所述第二摘要与所述第一摘要不相同时,则获取预设区块数量;获取参与计算所述第二交易的区块的数量;当参与计算所述第二交易的区块的数量大于所述预设区块数量时,则根据所述第一交易价值存储地址得到第二公钥;及当所述购买方提供的购买方价值赎回地址的第二私钥与所述第二公钥验证成功时,将所述第一交易价值存储地址中存储的购买价值转入至所述购买方价值赎回地址中。
  16. 一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:通过第 一交易将加密的数字资产以及出售方价值赎回地址的第一公钥在区块链上进行广播;接收购买方返回的与所述第一公钥对应的第一交易价值存储地址;当检测到所述购买方将购买价值转入至第一交易价值存储地址时,则通过第二交易根据所述第一公钥以及所述第一交易价值存储地址计算得到出售方价值赎回地址;及将所述第一交易价值存储地址中存储的购买价值转入至所述出售方价值赎回地址中,并将用于加密所述数字资产的密钥发送至所述购买方。
  17. 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:通过第一交易将用于加密所述数字资产的密钥的第一摘要在区块链上进行广播;接收所述购买方返回的所述第一摘要;所述计算机可读指令被所述处理器执行时所实现的所述通过第二交易根据所述第一公钥以及所述第一交易价值存储地址计算得到出售方价值赎回地址,包括:通过第二交易获取用于加密所述数字资产的密钥,并计算所述密钥的第二摘要;当所述第二摘要与所述第一摘要相同时,则通过所述出售方价值赎回地址的第一私钥验证所述第一公钥;及当验证成功时,则获取到出售方价值赎回地址。
  18. 根据权利要求17所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:接收所述购买方返回的与所述第一公钥对应的赎回脚本;所述计算机可读指令被所述处理器执行时所实现的所述通过第二交易获取用于加密所述数字资产的密钥之前,还包括:通过第二交易根据所述赎回脚本计算得到第二交易价值存储地址;及当所述第二交易价值存储地址与所述第一交易价值存储地址一致时,则继续通过第二交易获取用于加密所述数字资产的密钥的步骤。
  19. 根据权利要求18所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时所涉及的所述赎回脚本是由所述购买方根据所述第一公钥以及所述购买方价值赎回地址的第二公钥生成的,所述第一交易价值存储地址是所述购买方根据所述赎回脚本生成的。
  20. 根据权利要求19所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:当所述第二摘要与所述第一摘要不相同时,则获取预设区块数量;获取参与计算所述第二交易的区块的数量;当参与计算所述第二交易的区块的数量大于所述预设区块数量时,则根据所述第一交易价值存储地址得到第二公钥;及当所述购买方提供的购买方价值赎回地址的第二私钥与所述第二公钥验证成功时,将所述第一交易价值存储地址中存储的购买价值转入至所述购买方价值赎回地址中。
PCT/CN2018/096807 2018-01-30 2018-07-24 交易处理方法、装置、计算机设备和存储介质 WO2019148783A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810090202.8 2018-01-30
CN201810090202.8A CN108305074B (zh) 2018-01-30 2018-01-30 交易处理方法、装置、计算机设备和存储介质

Publications (1)

Publication Number Publication Date
WO2019148783A1 true WO2019148783A1 (zh) 2019-08-08

Family

ID=62866997

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/096807 WO2019148783A1 (zh) 2018-01-30 2018-07-24 交易处理方法、装置、计算机设备和存储介质

Country Status (2)

Country Link
CN (1) CN108305074B (zh)
WO (1) WO2019148783A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110570313A (zh) * 2019-09-27 2019-12-13 深圳市网心科技有限公司 基于区块链的数据交易方法、数据交易装置及***
CN110599271A (zh) * 2019-09-17 2019-12-20 腾讯科技(深圳)有限公司 票据检测方法、装置、计算机设备和存储介质
CN111586013A (zh) * 2020-04-29 2020-08-25 数网金融有限公司 网络入侵检测方法、装置、节点终端及存储介质

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108305074B (zh) * 2018-01-30 2020-06-02 深圳壹账通智能科技有限公司 交易处理方法、装置、计算机设备和存储介质
CN108399533B (zh) * 2018-02-07 2020-08-18 深圳壹账通智能科技有限公司 交易处理方法、装置、计算机设备和存储介质
GB201815816D0 (en) * 2018-09-28 2018-11-14 Nchain Holdings Ltd Computer-implemented system and method
CN110400221B (zh) * 2018-09-29 2021-09-10 腾讯科技(深圳)有限公司 数据处理方法、***、存储介质及计算机设备
CN109472664A (zh) * 2018-10-10 2019-03-15 南京邮电大学 无线电频谱资源交易***
CN109447740A (zh) * 2018-10-10 2019-03-08 南京邮电大学 无线电频谱资源交易方法、可读存储介质和终端
GB201820947D0 (en) * 2018-12-21 2019-02-06 Nchain Holdings Ltd Computer-implemented system and method
CN113079135B (zh) * 2021-03-19 2022-03-01 中山大学 一种区块链钓鱼诈骗地址检测方法、装置、终端及介质
CN117252702B (zh) * 2023-11-20 2024-05-10 深圳奥联信息安全技术有限公司 一种基于区块链的数据资产交易方法及***

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016178990A1 (en) * 2015-05-01 2016-11-10 Monegraph, Inc Rights transfers using block chain transactions
CN107038578A (zh) * 2017-04-19 2017-08-11 浙江数秦科技有限公司 基于区块链的数据交易平台中多重签名交易信息处理方法
CN107240001A (zh) * 2017-06-06 2017-10-10 北京汇通金财信息科技有限公司 一种数字资产的交易方法和***
CN107409123A (zh) * 2015-02-09 2017-11-28 缇零网股份有限公司 加密集成平台
JP2017220710A (ja) * 2016-06-03 2017-12-14 日本電信電話株式会社 契約合意方法、合意検証方法、契約合意装置および合意検証装置
CN107622385A (zh) * 2017-08-28 2018-01-23 南京邮电大学 一种基于区块链智能合约的数字作品发行方法
CN108305074A (zh) * 2018-01-30 2018-07-20 深圳壹账通智能科技有限公司 交易处理方法、装置、计算机设备和存储介质

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170116693A1 (en) * 2015-10-27 2017-04-27 Verimatrix, Inc. Systems and Methods for Decentralizing Commerce and Rights Management for Digital Assets Using a Blockchain Rights Ledger
CN105681301B (zh) * 2016-01-16 2019-03-12 杭州复杂美科技有限公司 区块链上的结算方法
CN105956923B (zh) * 2016-04-20 2022-04-29 上海如鸽投资有限公司 资产交易***以及资产的数字化认证和交易方法
CN106022917A (zh) * 2016-05-08 2016-10-12 杭州复杂美科技有限公司 区块链撮合交易所方案
CN106790253A (zh) * 2017-01-25 2017-05-31 中钞***产业发展有限公司北京智能卡技术研究院 基于区块链的认证方法和装置

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107409123A (zh) * 2015-02-09 2017-11-28 缇零网股份有限公司 加密集成平台
WO2016178990A1 (en) * 2015-05-01 2016-11-10 Monegraph, Inc Rights transfers using block chain transactions
JP2017220710A (ja) * 2016-06-03 2017-12-14 日本電信電話株式会社 契約合意方法、合意検証方法、契約合意装置および合意検証装置
CN107038578A (zh) * 2017-04-19 2017-08-11 浙江数秦科技有限公司 基于区块链的数据交易平台中多重签名交易信息处理方法
CN107240001A (zh) * 2017-06-06 2017-10-10 北京汇通金财信息科技有限公司 一种数字资产的交易方法和***
CN107622385A (zh) * 2017-08-28 2018-01-23 南京邮电大学 一种基于区块链智能合约的数字作品发行方法
CN108305074A (zh) * 2018-01-30 2018-07-20 深圳壹账通智能科技有限公司 交易处理方法、装置、计算机设备和存储介质

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110599271A (zh) * 2019-09-17 2019-12-20 腾讯科技(深圳)有限公司 票据检测方法、装置、计算机设备和存储介质
CN110570313A (zh) * 2019-09-27 2019-12-13 深圳市网心科技有限公司 基于区块链的数据交易方法、数据交易装置及***
CN111586013A (zh) * 2020-04-29 2020-08-25 数网金融有限公司 网络入侵检测方法、装置、节点终端及存储介质
CN111586013B (zh) * 2020-04-29 2022-02-22 数网金融有限公司 网络入侵检测方法、装置、节点终端及存储介质

Also Published As

Publication number Publication date
CN108305074A (zh) 2018-07-20
CN108305074B (zh) 2020-06-02

Similar Documents

Publication Publication Date Title
WO2019148783A1 (zh) 交易处理方法、装置、计算机设备和存储介质
TWI723658B (zh) 基於區塊鏈中智慧合約保護交易活動敏感資料的方法和設備
TWI701623B (zh) 基於區塊鏈的物流資訊傳輸方法、系統和裝置
US11477034B2 (en) Method and apparatus for processing account information in block chain, storage medium, and electronic apparatus
CN107994991B (zh) 一种数据处理方法、数据处理服务器及存储介质
CA3049761C (en) Method for providing payment gateway service using utxo-based protocol and server using same
EP3961455B1 (en) Data verification methods, apparatuses, and devices
WO2020211462A1 (zh) 一种基于区块链的业务数据上链方法及其***
CN107240001B (zh) 一种数字资产的交易方法和***
CN110135819B (zh) 一种基于区块链的第三方可信数据交易***及方法
CN110766406B (zh) 资源转移方法、资源转移装置、存储介质及电子设备
CN108650077B (zh) 基于区块链的信息传输方法、终端、设备及可读存储介质
WO2022001526A1 (zh) 基于区块链的贸易数据处理方法及其相关设备
US20110131102A1 (en) Secure mobile payment processing
TW202008271A (zh) 區塊鏈交易方法及裝置、電子設備
CN110914857A (zh) 在区块链网络中使用智能合约进行产品促销
CN110336779B (zh) 一种区块链的构建方法、装置和电子设备
KR102302955B1 (ko) 자산의 토큰화를 통해 현물 자산 거래를 가능하게 하는 블록체인 및 클라우드 기반의 자산 거래 플랫폼 서버 및 그 동작 방법
US20200175588A1 (en) Blockchain-based payment
CN111683082A (zh) 一种基于区块链的数据共享方法、***及电子设备
US11956347B2 (en) Method and apparatus with mobile payment and verification
CN110189143B (zh) 一种基于区块链的营销标签真实性验证方法及***
WO2020224092A1 (zh) 基于零知识证明的供应链数据管理方法及装置
WO2021204042A1 (zh) 机构识别编号的注册
CN115603900A (zh) 基于密码学承诺的公平竞标方法、装置及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18904095

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 01/12/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18904095

Country of ref document: EP

Kind code of ref document: A1