WO2019153660A1 - Transaction processing method and apparatus, and computer device and storage medium - Google Patents

Transaction processing method and apparatus, and computer device and storage medium Download PDF

Info

Publication number
WO2019153660A1
WO2019153660A1 PCT/CN2018/096845 CN2018096845W WO2019153660A1 WO 2019153660 A1 WO2019153660 A1 WO 2019153660A1 CN 2018096845 W CN2018096845 W CN 2018096845W WO 2019153660 A1 WO2019153660 A1 WO 2019153660A1
Authority
WO
WIPO (PCT)
Prior art keywords
transaction
value
storage address
random number
value storage
Prior art date
Application number
PCT/CN2018/096845
Other languages
French (fr)
Chinese (zh)
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 WO2019153660A1 publication Critical patent/WO2019153660A1/en

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/02Payment architectures, schemes or protocols involving a neutral party, e.g. certification authority, notary or trusted third party [TTP]
    • 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/08Payment architectures
    • G06Q20/10Payment architectures specially adapted for electronic funds transfer [EFT] systems; specially adapted for home banking systems
    • 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/3821Electronic credentials
    • 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/385Payment protocols; Details thereof using an alias or single-use codes

Definitions

  • the application relates to a transaction method, apparatus, computer device and storage medium.
  • the inventor realized that the traditional transaction processing method is handled by a specific authority to ensure the fairness of the transaction.
  • This method has high dependence on a specific authority, and cannot guarantee the transaction when the authority fails. When it comes to fairness, it can cause problems in the transaction.
  • a transaction processing method, apparatus, computer device, and storage medium are provided.
  • a transaction processing method including:
  • a transaction processing device comprising:
  • a receiving module configured to receive first transaction information sent by each transaction terminal, and generate a first transaction value storage address according to the first transaction information
  • a value transfer module for transferring the value of the first transaction to the first transaction value storage address by the second transaction
  • a target random number obtaining module configured to acquire a target random number of the target block of the second transaction according to the workload proof mechanism
  • a transaction processing result generating module configured to obtain a transaction processing result according to the target random number and the first transaction information
  • a transaction output module configured to obtain a value corresponding to the transaction processing result from the first transaction value storage address, and transfer the obtained value to a second transaction value storage address of the corresponding transaction terminal,
  • the first transaction information carries the second transaction value storage address.
  • 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: receiving first transaction information sent by each transaction terminal, and generating a first transaction value storage address according to the first transaction information; transferring the value of the first transaction to the first transaction value storage by using the second transaction In the address; acquiring a target random number of the target block of the second transaction according to the workload proof mechanism; obtaining a transaction processing result according to the target random number and the first transaction information; and storing from the first transaction value Obtaining a value corresponding to the transaction processing result in the address, and transferring the obtained value to a second transaction value storage address of the corresponding transaction terminal, where the first transaction information carries the second transaction value Storage 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: receiving respective transaction terminals Transmitting the first transaction information, and generating a first transaction value storage address according to the first transaction information; transferring the value of the first transaction to the first transaction value storage address by using the second transaction; Obtaining, by the mechanism, a target random number of the target block of the second transaction; obtaining a transaction processing result according to the target random number and the first transaction information; and obtaining and reporting from the first transaction value storage address Transaction processing the value corresponding to the processing result, and transferring the obtained value into the second transaction value storage address of the corresponding transaction terminal, the first transaction information carrying the second transaction value storage address.
  • 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 flow chart of step S206 in the embodiment of Figure 2.
  • FIG. 4 is a block diagram showing the structure of a block in a blockchain in accordance with one or more embodiments.
  • FIG. 5 is a flow chart of step S204 in the embodiment shown in FIG. 2.
  • FIG. 6 is a block diagram of a transaction processing device in accordance with one or more embodiments.
  • FIG. 7 is a block diagram 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.
  • the transaction terminal communicates with the nodes in the blockchain through the network through the network.
  • the node in the blockchain can receive the first transaction request sent by the transaction terminal, and the first transaction request includes the first transaction information, and after receiving the transaction request, the node generates the first transaction value storage address according to the transaction information.
  • the target block of the second transaction that is, the target random number of the target node, obtains the transaction processing result according to the target random number, so that the value corresponding to the transaction processing result can be obtained from the first transaction value storage address, and the obtained value is obtained.
  • the value obtained is transferred to the second transaction value storage address of the corresponding transaction terminal, and the first transaction information carries the second transaction value storage address.
  • the transaction terminal can be, but is not limited to, various personal computers, notebook computers, smart phones, tablets, and portable wearable devices, and the nodes in the blockchain can be implemented by a separate server or a server cluster composed of multiple servers.
  • a transaction processing method is provided, which is applied to the node in the blockchain in FIG. 1 as an example, and includes the following steps:
  • S202 Receive first transaction information sent by each transaction terminal, and generate a first transaction value storage address according to the first transaction information.
  • the transaction terminal refers to a transaction terminal that needs to participate in a transaction, and can communicate with a node on the blockchain, and when the transaction terminal participates in the transaction, can send the first transaction information to the corresponding node on the blockchain, Therefore, the node on the blockchain can generate a first transaction value storage address according to the first transaction information, that is, a public storage address of the transaction value of all the transaction terminals participating in the transaction, that is, the first transaction value storage address can make each transaction terminal
  • the transaction value can be transferred to the transaction value, so that the generation of the first transaction value storage address needs to be generated according to the first transaction information sent by each transaction terminal.
  • S204 Transfer the value of the first transaction to the first transaction value storage address by using the second transaction.
  • the node of the blockchain receives the first transaction information of each transaction terminal through the first transaction, and starts the second transaction, and transfers the transaction value of the first transaction of each transaction terminal to the first transaction value through the second transaction.
  • the first transaction value that is transferred to the blockchain by each transaction terminal is stored.
  • the transaction value may refer to virtual assets such as transaction funds and bitcoin.
  • S206 Acquire a target random number of the target block of the second transaction according to the workload proof mechanism.
  • the mining operation can be performed, so that the nodes on the blockchain pass the competition mechanism.
  • the second transaction is calculated to ensure the credibility of the second transaction.
  • the target block may be a pre-agreed block or calculated according to the nature of the transaction, for example, the last block participating in the transaction as the target block.
  • the target random number refers to the target random number obtained by the target block participating in the second transaction calculation under the condition that the workload proof mechanism is satisfied, and the target random number is the target block determined by calculating the hash value of the target block. A random number in the head.
  • the transaction result is obtained by agreeing to obtain the target random number of the target block, and obtaining the transaction processing result according to the target random number and the first transaction information of each transaction terminal, because the target random number is the workload proof mechanism through the blockchain. Obtained, it has randomness, can not be predicted, and can not be manually interfered. Therefore, the transaction processing result obtained by the target random number is also fair.
  • S210 Obtain a value corresponding to the transaction processing result from the first transaction value storage address, and transfer the obtained value to a second transaction value storage address of the corresponding transaction terminal, where the first transaction information carries the second Transaction value storage address.
  • the value corresponding to the transaction processing result is obtained from the first transaction value storage address, and the value is returned to the second transaction value storage address of the transaction terminal corresponding to the value, thereby completing transaction.
  • the method uses a non-turing complete blockchain scripting system to construct a smart contract to redeem the value of a smart contract according to a set random condition.
  • workload proof of the blockchain in order to complete the workload proof of setting difficulty, the mining node of the blockchain will use a certain algorithm to search for a suitable random number, then the random number can be used as value.
  • a random state condition in the redemption system is used for the control of the value redemption method to ensure the fairness of the transaction.
  • the transaction processing method After receiving the first transaction information sent by each transaction terminal, the transaction processing method generates a public transaction value storage address according to the first transaction information, and transfers the value of the first transaction to the public transaction through the second transaction.
  • the target random number of the target block can be obtained through the workload proof mechanism. Since the work of the blockchain is independent and does not receive external interference, the fairness of the target random number can be guaranteed. Sex, so that the fairness of the transaction processing result generated according to the target random number is also guaranteed.
  • FIG. 3 is a flowchart of step S206 in the embodiment shown in FIG. 2, that is, acquiring the target random number of the target block of the second transaction according to the workload proof mechanism.
  • the steps can include:
  • FIG. 4 is a schematic structural diagram of a block in a blockchain in an embodiment, where a block includes a block header and a block body, wherein the block header includes a previous block. Summary, summary of this 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. Therefore, the target block participating in the second transaction may be first acquired, and the preset workload difficulty is obtained from the head of the target block.
  • S304 Acquire an initial random number in the header of the target block, and calculate a hash value corresponding to the header of the target block according to the initial random number.
  • the header of the block chain further includes an initial random number.
  • the head of the block chain can be calculated.
  • the hash value for example, can be combined according to the order of each parameter in the header, and then the hash value of the combined header is calculated.
  • a workload difficulty may be obtained according to the hash value, for example, the number of 0s of the preset bit of the hash value may be calculated, and the hash value may be optionally obtained.
  • the number of 0 in the beginning, the number of 0 is used as the current workload difficulty, and it is judged whether the workload difficulty meets the preset workload difficulty, that is, whether the number of 0 satisfies the preset workload difficulty, or Determine whether the number of 0 is greater than the preset workload difficulty.
  • the initial random number is adjusted, for example, the initial random number may be incremented or decremented according to a preset step, etc., where the preset The step size can be set as scheduled, typically one.
  • S310 Continue to calculate a hash value corresponding to the head of the target block according to the adjusted initial random number, and extract the adjustment in the header of the target block when the workload corresponding to the hash value satisfies the preset workload difficulty.
  • the initial initial random number is used as the target random number.
  • the hash value corresponding to the target block header since the initial random number in the header of the target block is adjusted, the hash value corresponding to the target block header also changes, so the hash value corresponding to the target header needs to be recalculated, for example, According to the order of each parameter in the header, each parameter is combined, and then the hash value of the combined head is calculated. In the process of calculating the hash value of the head of the target block each time, the order of each parameter is not change.
  • the random number is continuously adjusted until the workload corresponding to the hash value calculated according to the random number is difficult.
  • the random number in the target block at this time is taken as the target random number.
  • blockchain is a new type of method that uses distributed computing devices to generate consensus (reciprocal data and computational behavior between nodes), also known as distributed ledger.
  • the core design ideas include the use of a workload proof mechanism to protect the books.
  • the specific process is described as follows: nodes in a distributed network (commonly known as as-built nodes) collect market transfer transaction information through the network, and the as-built node packages a certain number of transaction information into a block data structure in a specific format. At this time, the completion node generates a block header corresponding to the block according to a fixed format. In addition to the basic description of the current block information, the block header has two important attributes.
  • the ascending node After having the block header, the ascending node starts a step to search for a specific random number, calculates the hash of the block header structure corresponding to the initial value random number, and detects whether the hash satisfies the difficulty of the block chain to the current block. set up. If so, the search is ended, the random number nonce is written to the block header, and the block is broadcast to other as-built nodes in the network, waiting for other completion nodes to accept the block and write to their respective blockchains. If the proof of the set workload is not met, continue to increment the random number nonce, calculate the hash, check the difficulty, until you find a suitable difficulty.
  • the workload proof mechanism of the blockchain that is, due to the characteristics of the hash algorithm, to generate a hash that satisfies a specific difficulty requirement, only the random number nonce is continuously adjusted, and what kind of random number nonce value satisfies the hash
  • the difficulty requirements are randomly generated, thus ensuring the fairness of the target random number, thus ensuring the fairness of the transaction.
  • FIG. 5 is a flowchart of step S204 in the embodiment shown in FIG. 2.
  • the step S204 is to generate a first transaction value storage address according to the first transaction information, which may include :
  • S502 Select first transaction information with the same target block in the first transaction information.
  • the node of the block chain receives the first transaction information sent by each transaction terminal in a preset time period, and the first transaction information may include the identifier of the target block, so that the node of the block chain can obtain the target.
  • the block identifies the same first transaction information.
  • the first transaction information sent by each transaction terminal may include a transaction terminal identifier or a user identifier, a second transaction value storage address, a target block, and transaction data, wherein the second transaction value storage address is adapted to accommodate data transmission in the blockchain. It may be in the form of a public key of an encryption algorithm corresponding to the second transaction value storage address.
  • S504 Generate a redemption script according to the second transaction value storage address and the transaction data in the first transaction information of the same target block.
  • the contract for each transaction terminal to participate in the transaction may be constructed according to the first transaction information, that is, the second transaction value in the first transaction information sent according to each transaction terminal.
  • the storage address and the transaction data generate a redemption script, wherein the transaction data gives the expected target transaction result of the transaction terminal of the transaction, and only the transaction result obtained by the node of the block chain according to the target random number corresponds to the expected target transaction result.
  • the transaction terminal can obtain the corresponding value from the first transaction value storage address.
  • the generated redemption script may be: when the transaction processing result obtained according to the target random number matches the transaction data of the first transaction terminal, the first transaction terminal is allowed to be from the first The corresponding value is obtained in the transaction value storage address, otherwise, the second transaction terminal is allowed to obtain the corresponding value from the first transaction value storage address.
  • it may be implemented by a blockchain script, that is, when the transaction processing result obtained according to the target random number matches the transaction data of the first transaction terminal, then the second corresponding to the first transaction terminal is The public key of the transaction value storage address is pushed onto the stack, otherwise, the public key of the second transaction value storage address corresponding to the second transaction terminal is pushed onto the stack.
  • S506 Calculate the redemption script to obtain a first transaction value storage address.
  • a redemption script is constructed, which can also be regarded as a transaction contract of the transaction, and the first transaction value storage address, that is, a public value storage address, can be calculated according to the redemption script, for example, by redemption The script performs a second hash calculation to obtain the first transaction value storage address.
  • the redemption script can be constructed by the second transaction value storage address in the transaction information of each transaction terminal, which can also be regarded as the transaction contract of the transaction, and the first transaction value can be obtained according to the transaction contract.
  • the storage address implements a scheme for constructing a trading contract using a non-turing complete blockchain scripting system and redeeming the value of the trading contract according to the set random conditions.
  • the step S204 may include: acquiring a third transaction value storage address corresponding to the transaction terminal; The second transaction acquires a value corresponding to the first transaction from the third transaction value storage address, and transfers the acquired value to the first transaction value storage address.
  • the value of the first transaction is transferred to the first transaction value storage address by the second transaction, and in order to ensure the security of the value in the first transaction value storage address, the refill transaction may be signed by each transaction terminal.
  • a refill transaction is obtained according to the transaction information of the plurality of parties.
  • each transaction terminal signs the second transaction by its own second algorithm private key to lock the funds in the transaction fund storage address.
  • the two transaction terminals are taken as an example for description.
  • the funds of each user in the blockchain are obtained, including the third transaction value storage address, the user identifier, the public key corresponding to the third transaction value storage address, and the value amount.
  • the preset amount of value is transferred to the first transaction value storage address. If it is two users, such as Alice and Bob, they exchange each other's transactions and add themselves based on the other party's transaction information.
  • the transaction value is recharged and the refill transaction is signed separately, that is, Alice and Bob respectively sign the private key of the above-mentioned recharge transaction with the encryption algorithm to make it effective; with the signature of Alice and Bob, the first transaction
  • the value transfer address value is validated so that it can be broadcast to the blockchain and the miner node is recorded on the blockchain.
  • the third transaction value storage address corresponding to the transaction terminal is first acquired; the value corresponding to the first transaction is obtained from the third transaction value storage address by the second transaction, and the obtained value is transferred to the first A transaction value storage address ensures the security and accuracy of the transaction.
  • the step of obtaining a transaction processing result according to the target random number and the first transaction information may include: performing a modulo operation on the target random number to obtain a reference random number; according to the reference random number and the first transaction information The transaction data is processed by the transaction results.
  • the reference random number can be obtained according to the obtained target random number.
  • the modulo calculation of the target random number can obtain multiple reference random numbers, and then according to the reference random number and the first transaction information.
  • the transaction data in the transaction is processed as a result of the transaction, wherein the transaction data refers to the expected processing result of the transaction by each transaction terminal.
  • the reference random number can be obtained according to the target random number only by one-step modulo operation, and the modulo operation can be a preset operation, and the reference random number is random under the premise that the target random number has randomness. The number is also random, thus extending the fairness of transactions involving multiple trading terminals.
  • the step of the second transaction value storage address of the transaction terminal may include: receiving a value redemption request of the transaction terminal; determining, according to the transaction processing result, whether the transaction terminal corresponding to the value redemption request has a value redemption authority; and when the value redemption request When the corresponding transaction terminal has the value redemption authority, the value corresponding to the transaction processing result is obtained from the first transaction value storage address, and the obtained value is transferred to the second transaction value storage address of the corresponding transaction terminal. in.
  • the node of the blockchain obtains the transaction processing result, and can receive the value redemption request of the transaction terminal, and the node of the block chain determines whether the transaction terminal has the value redemption authority according to the value redemption request.
  • the redemption authority is available, the value corresponding to the transaction processing result is obtained from the first transaction value storage address, and the obtained value is transferred to the second transaction value storage address of the corresponding transaction terminal to complete The entire transaction.
  • the target random number is directly pushed onto the stack
  • the reference random number can be pushed onto the stack
  • the Boolean value at the top of the stack is set according to the preset rule and the transaction data, and the public key of the encryption algorithm corresponding to the second transaction value storage address conforming to the preset rule is pushed onto the stack, so as to be pressed into the second in the stack.
  • the transaction terminal corresponding to the public key of the encryption algorithm corresponding to the transaction value storage address can obtain the corresponding value.
  • the value redemption request when receiving the value redemption request sent by the transaction terminal, the value redemption request carries the private key corresponding to the public key of the encryption algorithm corresponding to the second transaction value storage address, and then the private key is first verified by the public key. Key, and when the verification is successful, the corresponding value is sent to the transaction terminal corresponding to the private key.
  • the result of the transaction is to determine who can redeem the value among Alice or Bob according to the target random number calculated by the miner at the location of the target block.
  • the value in the first transaction value storage address is pushed onto the stack, and then the instruction is executed to obtain the target random number.
  • the transaction data of each transaction terminal is pushed onto the stack, and then the transaction result acquisition instruction is executed to randomly according to the target.
  • the number and transaction data are processed by the transaction processing.
  • the second transaction value storage address corresponding to Alice is pushed onto the stack, and optionally the second transaction value corresponding to Alice is stored.
  • the public key corresponding to the address is pushed into the stack, otherwise the second transaction value storage address corresponding to Bob is pushed onto the stack, and the public key corresponding to the second transaction value storage address corresponding to Bob is optionally pushed into the stack. And then receiving a transaction value redemption request sent by each transaction terminal, the request carries a corresponding private key, and the private key is verified by the public key pushed in the stack, and only the transaction terminal corresponding to the successful verification private key can Redeem the corresponding value to achieve the transaction.
  • receiving a value redemption request of the transaction terminal determining, according to the transaction processing result, whether the transaction terminal corresponding to the value redemption request has a value redemption authority; and when the transaction terminal corresponding to the value redemption request has a value redemption authority, Obtaining a value corresponding to the transaction processing result from the first transaction value storage address, and transferring the obtained value to the second transaction value storage address of the corresponding transaction terminal, thereby ensuring the first transaction value storage address The security of value.
  • steps in the flowcharts of FIGS. 2, 3, and 5 are sequentially displayed in accordance with the indication of 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 FIG. 2, FIG. 3, and FIG. 5 may include a plurality of sub-steps or stages, which are not necessarily performed at the same time, but may be executed at different times. The order of execution of the sub-steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least a portion of the sub-steps or stages of the other steps or other steps.
  • a transaction processing apparatus including: a receiving module 100, a value transfer module 200, a target random number obtaining module 300, a transaction processing result generating module 400, and a transaction output module. 500, of which:
  • the receiving module 100 is configured to receive first transaction information sent by each transaction terminal, and generate a first transaction value storage address according to the first transaction information.
  • the value transfer module 200 is configured to transfer the value of the first transaction to the first transaction value storage address by the second transaction.
  • the target random number obtaining module 300 is configured to acquire a target random number of the target block of the second transaction according to the workload proof mechanism.
  • the transaction processing result generating module 400 is configured to obtain a transaction processing result according to the target random number and the first transaction information.
  • the transaction output module 500 is configured to obtain the value corresponding to the transaction processing result from the first transaction value storage address, and transfer the obtained value to the second transaction value storage address of the corresponding transaction terminal, the first transaction
  • the information carries a second transaction value storage address.
  • the target random number obtaining module 300 may include:
  • the preset workload difficulty obtaining unit is configured to acquire the preset workload difficulty of the target block.
  • the hash value calculation unit is configured to obtain an initial random number in the header of the target block, and calculate a hash value corresponding to the head of the target block according to the initial random number.
  • the adjusting unit is configured to determine whether the workload difficulty corresponding to the hash value satisfies the preset workload difficulty; when the workload corresponding to the hash value does not satisfy the preset workload difficulty, the initial random number is adjusted.
  • the target random number obtaining unit is configured to continue to calculate a hash value corresponding to the head of the target block according to the adjusted initial random number, and extract the target block when the workload difficulty corresponding to the hash value satisfies the preset workload difficulty
  • the adjusted initial random number in the head is used as the target random number.
  • the transaction processing result generation module 400 can include:
  • the selecting unit is configured to select the first transaction information with the same target block in the first transaction information.
  • a redemption script generating unit configured to generate a redemption script according to the second transaction value storage address and the transaction data in the first transaction information of the same target block.
  • the calculating unit is configured to calculate the redemption script to obtain the first transaction value storage address.
  • the value transfer module 200 can include:
  • the transaction value storage address obtaining unit is configured to obtain a third transaction value storage address corresponding to the transaction terminal.
  • the value transfer unit is configured to obtain the value corresponding to the first transaction from the third transaction value storage address by the second transaction, and transfer the acquired value into the first transaction value storage address.
  • the transaction processing result generation module 400 can include:
  • the reference random number obtaining unit is configured to perform a modulo operation on the target random number to obtain a reference random number.
  • the transaction processing result generating unit is configured to obtain a transaction processing result according to the reference random number and the transaction data in the first transaction information.
  • the transaction output module 500 can include:
  • the value redemption request receiving unit is configured to receive a value redemption request of the transaction terminal.
  • the redemption authority determining unit is configured to determine, according to the transaction processing result, whether the transaction terminal corresponding to the value redemption request has a value redemption authority.
  • a transaction output unit configured to: when the transaction terminal corresponding to the value redemption request has a value redemption right, obtain a value corresponding to the transaction processing result from the first transaction value storage address, and transfer the obtained value into To the second transaction value storage address of the corresponding transaction terminal.
  • 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 server, and its internal structure diagram may be as shown in FIG.
  • the computer device includes a processor, a memory, and a network interface 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 an operating system, computer readable instructions, and a database.
  • 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 transaction terminal via a network connection.
  • the computer readable instructions are executed by a processor to implement a transaction processing method.
  • 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: receiving the respective transaction terminals The first transaction information, and generating a first transaction value storage address according to the first transaction information; transferring the value of the first transaction to the first transaction value storage address by the second transaction; acquiring the second transaction according to the workload certification mechanism a target random number of the target block; obtaining a transaction processing result according to the target random number and the first transaction information; and obtaining a value corresponding to the transaction processing result from the first transaction value storage address, and transferring the obtained value Entering into the second transaction value storage address of the corresponding transaction terminal, the first transaction information carries a second transaction value storage address.
  • the step of acquiring the target random number of the target block of the second transaction according to the workload proof mechanism implemented by the processor when executing the computer readable instruction may include: acquiring a preset workload of the target block Difficulty; obtaining an initial random number in the header of the target block, and calculating a hash value corresponding to the head of the target block according to the initial random number; determining whether the workload difficulty corresponding to the hash value satisfies the preset workload difficulty; When the workload corresponding to the hash value does not satisfy the preset workload difficulty, the initial random number is adjusted; and the hash value corresponding to the head of the target block is continuously calculated according to the adjusted initial random number until the hash value is reached. When the workload corresponding to the hash value satisfies the preset workload difficulty, the adjusted initial random number in the header of the target block is extracted as the target random number.
  • the step of generating the first transaction value storage address according to the first transaction information when the processor executes the computer readable instruction may include: selecting the first transaction in the first transaction information that has the same target block. Information; generating a redemption script according to the second transaction value storage address and the transaction data in the first transaction information of the same target block; and calculating the redemption script to obtain the first transaction value storage address.
  • the step of transferring the value of the first transaction to the first transaction value storage address by the second transaction implemented by the processor when executing the computer readable instruction may include: acquiring the corresponding corresponding to the transaction terminal And the third transaction value storage address; and obtaining the value corresponding to the first transaction from the third transaction value storage address by the second transaction, and transferring the obtained value into the first transaction value storage address.
  • the step of obtaining a transaction processing result according to the target random number and the first transaction information when the processor executes the computer readable instruction may include: performing a modulo operation on the target random number to obtain a reference random number; And obtaining the transaction processing result according to the reference random number and the transaction data in the first transaction information.
  • the processor obtains the value corresponding to the transaction processing result from the first transaction value storage address when the processor executes the computer readable instruction, and transfers the acquired value to the corresponding transaction terminal.
  • the step of the second transaction value storage address may include: receiving a value redemption request of the transaction terminal; determining, according to the transaction processing result, whether the transaction terminal corresponding to the value redemption request has a value redemption authority; and when the value redemption request corresponds When the transaction terminal has the value redemption authority, the value corresponding to the transaction processing result is obtained from the first transaction value storage address, and the obtained value is transferred to the second transaction value storage address of the corresponding transaction terminal.
  • 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: receiving individual transactions Transmitting the first transaction information by the terminal, and generating a first transaction value storage address according to the first transaction information; transferring the value of the first transaction to the first transaction value storage address by using the second transaction; acquiring the first according to the workload verification mechanism a target random number of the target block of the second transaction; obtaining a transaction processing result according to the target random number and the first transaction information; and obtaining a value corresponding to the transaction processing result from the first transaction value storage address, and acquiring the obtained value
  • the value is transferred to the second transaction value storage address of the corresponding transaction terminal, and the first transaction information carries the second transaction value storage address.
  • the step of acquiring, by the processor, the target random number of the target block of the second transaction according to the workload proof mechanism implemented by the processor may include: obtaining a preset work of the target block The difficulty is obtained; the initial random number in the head of the target block is obtained, and the hash value corresponding to the head of the target block is calculated according to the initial random number; whether the difficulty corresponding to the hash value satisfies the preset workload difficulty When the workload corresponding to the hash value does not satisfy the preset workload difficulty, the initial random number is adjusted; and the hash value corresponding to the head of the target block is continuously calculated according to the adjusted initial random number until When the workload difficulty corresponding to the hash value satisfies the preset workload difficulty, the adjusted initial random number in the header of the target block is extracted as the target random number.
  • the step of generating the first transaction value storage address according to the first transaction information when the computer readable instructions are executed by the processor may include: selecting the first target in the first transaction information that is the same as the first block. Transaction information; generating a redemption script according to the second transaction value storage address and transaction data in the same first transaction information of the target block; and calculating the redemption script to obtain the first transaction value storage address.
  • the step of transferring the value of the first transaction to the first transaction value storage address by the second transaction implemented by the processor when the computer readable instructions are executed may include: acquiring a corresponding transaction terminal The third transaction value storage address; and obtaining the value corresponding to the first transaction from the third transaction value storage address by the second transaction, and transferring the obtained value into the first transaction value storage address.
  • the step of obtaining the transaction processing result according to the target random number and the first transaction information implemented by the processor when the computer readable instructions are executed by the processor may include: performing a modulo operation on the target random number to obtain a reference random number And obtaining transaction processing results based on the reference random number and the transaction data in the first transaction information.
  • the computer readable instructions are obtained by the processor to obtain a value corresponding to the transaction processing result from the first transaction value storage address, and transfer the obtained value to the corresponding transaction terminal.
  • the step of storing the second transaction value storage address may include: receiving a value redemption request of the transaction terminal; determining, according to the transaction processing result, whether the transaction terminal corresponding to the value redemption request has a value redemption authority; and when the value redemption request corresponds When the transaction terminal has the value redemption authority, the value corresponding to the transaction processing result is obtained from the first transaction value storage address, and the obtained value is transferred to the second transaction value storage address of the corresponding transaction terminal.
  • 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

Abstract

A transaction processing method, comprising: receiving first transaction information sent by each transaction terminal, and generating a first transaction value storage address according to the first transaction information; transferring the value of a first transaction into the first transaction value storage address by means of a second transaction; obtaining a target random number of a target block of the second transaction according to a proof of work mechanism; obtaining a transaction processing result according to the target random number and the first transaction information; and obtaining the value corresponding to the transaction processing result from the first transaction value storage address, and transferring the obtained value into a second transaction value storage address of a corresponding transaction terminal, the first transaction information carrying the second transaction value storage address.

Description

交易处理方法、装置、计算机设备和存储介质Transaction processing method, device, computer device and storage medium
相关申请的交叉引用Cross-reference to related applications
本申请要求于2018年2月7日提交中国专利局,申请号为2018101237671,申请名称为“交易方法、装置、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 2018101237671, filed on February 7, 2018, the entire disclosure of which is incorporated herein by reference. In this application.
技术领域Technical field
本申请涉及一种交易方法、装置、计算机设备和存储介质。The application relates to a transaction method, apparatus, computer device and storage medium.
背景技术Background technique
随着计算机技术的发展,出现了网上交易,由于网上交易的各个交易方可能互不相识,容易产生信用危机,因此各个交易方对于网上交易的公正性的重视度比较高。With the development of computer technology, online transactions have emerged. Since the various parties to online transactions may not know each other and are prone to credit crisis, each party has a higher degree of emphasis on the fairness of online transactions.
然而,发明人意识到,传统交易处理方式是由特定的权威机构来进行处理以保证交易的公正性,这种方式对于特定的权威机构的依赖性较高,当权威机构出现故障等不能保证交易的公正性时,则会导致交易出现问题。However, the inventor realized that the traditional transaction processing method is handled by a specific authority to ensure the fairness of the transaction. This method has high dependence on a specific authority, and cannot guarantee the transaction when the authority fails. When it comes to fairness, it can cause problems in the transaction.
发明内容Summary of the invention
根据本申请公开的各种实施例,提供一种交易处理方法、装置、计算机设备和存储介质。According to various embodiments disclosed herein, a transaction processing method, apparatus, computer device, and storage medium are provided.
一种交易处理方法,包括:A transaction processing method, including:
接收各个交易终端发送的第一交易信息,并根据所述第一交易信息生成第一交易价值存储地址;Receiving first transaction information sent by each transaction terminal, and generating a first transaction value storage address according to the first transaction information;
通过第二交易将第一交易的价值转入到所述第一交易价值存储地址中;Transferring the value of the first transaction to the first transaction value storage address by the second transaction;
根据工作量证明机制获取所述第二交易的目标区块的目标随机数;Obtaining a target random number of the target block of the second transaction according to the workload proof mechanism;
根据所述目标随机数和所述第一交易信息得到交易处理结果;及Obtaining a transaction processing result according to the target random number and the first transaction information; and
从所述第一交易价值存储地址中获取到与所述交易处理结果对应的价值,并将所获取到的价值转入至对应交易终端的第二交易价值存储地址中,所述第一交易信息携带有所述第二交易价值存储地址。Obtaining a value corresponding to the transaction processing result from the first transaction value storage address, and transferring the acquired value to a second transaction value storage address of the corresponding transaction terminal, the first transaction information Carrying the second transaction value storage address.
一种交易处理装置,包括:A transaction processing device comprising:
接收模块,用于接收各个交易终端发送的第一交易信息,并根据所述第一交易信息生成第一交易价值存储地址;a receiving module, configured to receive first transaction information sent by each transaction terminal, and generate a first transaction value storage address according to the first transaction information;
价值转入模块,用于通过第二交易将第一交易的价值转入到所述第一交易价值存储地址中;a value transfer module for transferring the value of the first transaction to the first transaction value storage address by the second transaction;
目标随机数获取模块,用于根据工作量证明机制获取所述第二交易的目标区块的目标随机数;a target random number obtaining module, configured to acquire a target random number of the target block of the second transaction according to the workload proof mechanism;
交易处理结果生成模块,用于根据所述目标随机数和所述第一交易信息得到交易处理结果;及a transaction processing result generating module, configured to obtain a transaction processing result according to the target random number and the first transaction information; and
交易输出模块,用于从所述第一交易价值存储地址中获取到与所述交易处理结果对应的价值,并将所获取到的价值转入至对应交易终端的第二交易价值存储地址中,所述第一交易信息携带有所述第二交易价值存储地址。a transaction output module, configured to obtain a value corresponding to the transaction processing result from the first transaction value storage address, and transfer the obtained value to a second transaction value storage address of the corresponding transaction terminal, The first transaction information carries the second transaction value storage address.
一种计算机设备,包括存储器和一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述一个或多个处理器执行以下步骤:接收各个交易终端发送的第一交易信息,并根据所述第一交易信息生成第一交易价值存储地址;通过第二交易将第一交易的价值转入到所述第一交易价值存储地址中;根据工作量证明机制获取所述第二交易的目标区块的目标随机数;根据所述目标随机数和所述第一交易信息得到交易处理结果;及从所述第一交易价值存储地址中获取到与所述交易处理结果对应的价值,并将所获取到的价值转入至对应交易终端的第二交易价值存储地址中,所述第一交易信息携带有所述第二交易价值存储地址。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: receiving first transaction information sent by each transaction terminal, and generating a first transaction value storage address according to the first transaction information; transferring the value of the first transaction to the first transaction value storage by using the second transaction In the address; acquiring a target random number of the target block of the second transaction according to the workload proof mechanism; obtaining a transaction processing result according to the target random number and the first transaction information; and storing from the first transaction value Obtaining a value corresponding to the transaction processing result in the address, and transferring the obtained value to a second transaction value storage address of the corresponding transaction terminal, where the first transaction information carries the second transaction value Storage 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: receiving respective transaction terminals Transmitting the first transaction information, and generating a first transaction value storage address according to the first transaction information; transferring the value of the first transaction to the first transaction value storage address by using the second transaction; Obtaining, by the mechanism, a target random number of the target block of the second transaction; obtaining a transaction processing result according to the target random number and the first transaction information; and obtaining and reporting from the first transaction value storage address Transaction processing the value corresponding to the processing result, and transferring the obtained value into the second transaction value storage address of the corresponding transaction terminal, the first transaction information carrying the second transaction value storage address.
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和优点将从说明书、附图以及权利要求书变得明显。Details of one or more embodiments of the present application are set forth in the accompanying drawings and description below. Other features and advantages of the present invention will be apparent from the description, drawings and claims.
附图说明DRAWINGS
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings to be used in the embodiments will be briefly described below. Obviously, the drawings in the following description are only some embodiments of the present application, Those skilled in the art can also obtain other drawings based on these drawings without any creative work.
图1为根据一个或多个实施例中交易处理方法的应用场景图。1 is an application scenario diagram of a transaction processing method in accordance with one or more embodiments.
图2为根据一个或多个实施例中交易处理方法的流程示意图。2 is a flow diagram of a transaction processing method in accordance with one or more embodiments.
图3为根据图2所示实施例中的步骤S206的流程图。Figure 3 is a flow chart of step S206 in the embodiment of Figure 2.
图4为根据一个或多个实施例中的区块链中区块的结构示意图。4 is a block diagram showing the structure of a block in a blockchain in accordance with one or more embodiments.
图5为根据图2所示实施例中的步骤S204的流程图。FIG. 5 is a flow chart of step S204 in the embodiment shown in FIG. 2.
图6为根据一个或多个实施例中交易处理装置的框图。6 is a block diagram of a transaction processing device in accordance with one or more embodiments.
图7为根据一个或多个实施例中计算机设备的框图。FIG. 7 is a block diagram of a computer device in accordance with one or more embodiments.
具体实施方式Detailed ways
为了使本申请的技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the technical solutions and advantages of the present application more clear, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the application and are not intended to be limiting.
本申请提供的交易处理方法,可以应用于如图1所示的应用环境中。交易终端通过网络与区块链中的节点通过网络进行通信。其中区块链中的节点可以接收到交易终端发送的第一交易请求,第一交易请求中包含了第一交易信息,节点在接收到该交易请求后,根据交易信息生成第一交易价值存储地址,并通过第二交易将第一交易信息中的第一交易的交易价值转入到上述的第一交易价值存储地址,并通过区块链对第二交易进行挖矿,根据工作量证明机制获取第二交易的目标区块,即目标节点的目标随机数,根据该目标随机数得到交易处理结果,从而可以从第一交易价值存储地址中获取到与交易处理结果对应的价值,并将所获取到的价值转入至对应交易终端的第二交易价值存储地址中,第一交易信息携带有第二交易价值存储地址。交易终端可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备,区块链中的节点可以用独立的服务器或者是多个服务器组成的服务器集群来实现。The transaction processing method provided by the present application can be applied to an application environment as shown in FIG. 1. The transaction terminal communicates with the nodes in the blockchain through the network through the network. The node in the blockchain can receive the first transaction request sent by the transaction terminal, and the first transaction request includes the first transaction information, and after receiving the transaction request, the node generates the first transaction value storage address according to the transaction information. And transferring, by the second transaction, the transaction value of the first transaction in the first transaction information to the first transaction value storage address, and mining the second transaction through the blockchain, and obtaining according to the workload proof mechanism The target block of the second transaction, that is, the target random number of the target node, obtains the transaction processing result according to the target random number, so that the value corresponding to the transaction processing result can be obtained from the first transaction value storage address, and the obtained value is obtained. The value obtained is transferred to the second transaction value storage address of the corresponding transaction terminal, and the first transaction information carries the second transaction value storage address. The transaction terminal can be, but is not limited to, various personal computers, notebook computers, smart phones, tablets, and portable wearable devices, and the nodes in the blockchain can be implemented by a separate server or a server cluster composed of multiple servers.
在其中一个实施例中,如图2所示,提供了一种交易处理方法,以该方法应用于图1中的区块链中的节点为例进行说明,包括以下步骤:In one embodiment, as shown in FIG. 2, a transaction processing method is provided, which is applied to the node in the blockchain in FIG. 1 as an example, and includes the following steps:
S202:接收各个交易终端发送的第一交易信息,并根据第一交易信息生成第一交易价值存储地址。S202: Receive first transaction information sent by each transaction terminal, and generate a first transaction value storage address according to the first transaction information.
具体地,交易终端是指需要参与交易的交易终端,其可以与区块链上的节点进行通信,并且当交易终端参与交易时,可以向区块链上的相应的节点发送第一交易信息,从而区块链上的节点可以根据该第一交易信息生成第一交易价值存储地址,即参与交易的所有交易终端的交易价值的公共存储地址,即该第一交易价值存储地址可以使得各个交易终端均可以向其转入交易价值,从而该第一交易价值存储地址的生成需要根据各个交易终端发送的第一交易信息生成。Specifically, the transaction terminal refers to a transaction terminal that needs to participate in a transaction, and can communicate with a node on the blockchain, and when the transaction terminal participates in the transaction, can send the first transaction information to the corresponding node on the blockchain, Therefore, the node on the blockchain can generate a first transaction value storage address according to the first transaction information, that is, a public storage address of the transaction value of all the transaction terminals participating in the transaction, that is, the first transaction value storage address can make each transaction terminal The transaction value can be transferred to the transaction value, so that the generation of the first transaction value storage address needs to be generated according to the first transaction information sent by each transaction terminal.
S204:通过第二交易将第一交易的价值转入到第一交易价值存储地址中。S204: Transfer the value of the first transaction to the first transaction value storage address by using the second transaction.
具体地,区块链的节点通过第一交易接收各个交易终端的第一交易信息,并开启第二交易,通过第二交易将各个交易终端的第一交易的交易价值转入到第一交易价值存储地址中,即将各个交易终端向区块链中转入的第一交易价值进行存储。可选地,该交易价值可以是指交易资金、比特币等虚拟财产。Specifically, the node of the blockchain receives the first transaction information of each transaction terminal through the first transaction, and starts the second transaction, and transfers the transaction value of the first transaction of each transaction terminal to the first transaction value through the second transaction. In the storage address, the first transaction value that is transferred to the blockchain by each transaction terminal is stored. Alternatively, the transaction value may refer to virtual assets such as transaction funds and bitcoin.
S206:根据工作量证明机制获取第二交易的目标区块的目标随机数。S206: Acquire a target random number of the target block of the second transaction according to the workload proof mechanism.
具体地,在区块链的节点将各个交易终端的第一交易的价值转入到第一交易价值存 储地址中后,则可以进行挖矿操作,从而区块链上的节点通过竞争机制来对该第二交易进行计算以保证该第二交易的可信性。其中目标区块可以是预先约定的区块,或者是根据交易的性质计算得到的,例如参与交易的最后一个区块作为目标区块。目标随机数是指参与第二交易计算的目标区块在满足工作量证明机制的条件下所得到的目标随机数,该目标随机数是通过计算目标区块的哈希值所确定的目标区块中的头部中的随机数。Specifically, after the node of the blockchain transfers the value of the first transaction of each transaction terminal to the first transaction value storage address, the mining operation can be performed, so that the nodes on the blockchain pass the competition mechanism. The second transaction is calculated to ensure the credibility of the second transaction. The target block may be a pre-agreed block or calculated according to the nature of the transaction, for example, the last block participating in the transaction as the target block. The target random number refers to the target random number obtained by the target block participating in the second transaction calculation under the condition that the workload proof mechanism is satisfied, and the target random number is the target block determined by calculating the hash value of the target block. A random number in the head.
S208:根据目标随机数和第一交易信息得到交易处理结果。S208: Obtain a transaction processing result according to the target random number and the first transaction information.
具体地,通过约定目标区块的得到目标随机数,并根据该目标随机数和各个交易终端的第一交易信息即可以得到交易处理结果,由于目标随机数是通过区块链的工作量证明机制得到的,其具有随机性,不可以预测,也不可以人工干预,因此通过该目标随机数得到的交易处理结果也具有公正性。Specifically, the transaction result is obtained by agreeing to obtain the target random number of the target block, and obtaining the transaction processing result according to the target random number and the first transaction information of each transaction terminal, because the target random number is the workload proof mechanism through the blockchain. Obtained, it has randomness, can not be predicted, and can not be manually interfered. Therefore, the transaction processing result obtained by the target random number is also fair.
S210:从第一交易价值存储地址中获取到与交易处理结果对应的价值,并将所获取到的价值转入至对应交易终端的第二交易价值存储地址中,第一交易信息携带有第二交易价值存储地址。S210: Obtain a value corresponding to the transaction processing result from the first transaction value storage address, and transfer the obtained value to a second transaction value storage address of the corresponding transaction terminal, where the first transaction information carries the second Transaction value storage address.
具体地,当得到交易处理结果后,则从第一交易价值存储地址中获取到与交易处理结果对应的价值,并将该价值返回值对应的交易终端的第二交易价值存储地址中,从而完成交易。Specifically, when the transaction processing result is obtained, the value corresponding to the transaction processing result is obtained from the first transaction value storage address, and the value is returned to the second transaction value storage address of the transaction terminal corresponding to the value, thereby completing transaction.
该方法使用非图灵完备的区块链脚本系统构造智能合约按照设定的随机条件赎回智能合约的价值。在区块链的核心过程工作量证明中,为了完成设定难度的工作量证明,区块链的挖矿节点会使用一定的算法搜索某个合适的随机数,那么这个随机数就可以作为价值赎回系统中一个随机态条件用于价值赎回方式的控制,保证了交易的公正性。The method uses a non-turing complete blockchain scripting system to construct a smart contract to redeem the value of a smart contract according to a set random condition. In the core process workload proof of the blockchain, in order to complete the workload proof of setting difficulty, the mining node of the blockchain will use a certain algorithm to search for a suitable random number, then the random number can be used as value. A random state condition in the redemption system is used for the control of the value redemption method to ensure the fairness of the transaction.
上述交易处理方法,在接收到各个交易终端发送的第一交易信息后,根据第一交易信息生成公共的交易价值存储地址,并通过第二交易将第一交易的价值转入到该公共的交易价值存储地址中,从而可以通过工作量证明机制获取到目标区块的目标随机数,由于区块链的工作是独立进行的,不会收到外界的干扰,因此可以保证该目标随机数的公正性,从而根据该目标随机数生成的交易处理结果的公正性也得到保证。After receiving the first transaction information sent by each transaction terminal, the transaction processing method generates a public transaction value storage address according to the first transaction information, and transfers the value of the first transaction to the public transaction through the second transaction. In the value storage address, the target random number of the target block can be obtained through the workload proof mechanism. Since the work of the blockchain is independent and does not receive external interference, the fairness of the target random number can be guaranteed. Sex, so that the fairness of the transaction processing result generated according to the target random number is also guaranteed.
在其中一个实施例中,参见图3,图3为图2所示实施例中的步骤S206的流程图,该步骤S206,即根据工作量证明机制获取第二交易的目标区块的目标随机数的步骤,可以包括:In one embodiment, referring to FIG. 3, FIG. 3 is a flowchart of step S206 in the embodiment shown in FIG. 2, that is, acquiring the target random number of the target block of the second transaction according to the workload proof mechanism. The steps can include:
S302:获取目标区块的预设工作量难度。S302: Obtain a preset workload difficulty of the target block.
具体地,参与图4,图4为一实施例中的区块链中区块的结构示意图,其中一个区块包括区块头部和区块主体,其中区块头部包括前一个区块的摘要、本区块的摘要。时间、版本、初始随机数、交易构造的默克树的根(相当于预设工作量难度),交易主体则涉及多个交易。因此可以首先获取到参与第二交易的目标区块,再从该目标区块的头部获取到预设工作量难度。Specifically, FIG. 4 is a schematic structural diagram of a block in a blockchain in an embodiment, where a block includes a block header and a block body, wherein the block header includes a previous block. Summary, summary of this 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. Therefore, the target block participating in the second transaction may be first acquired, and the preset workload difficulty is obtained from the head of the target block.
S304:获取目标区块的头部中的初始随机数,并根据初始随机数计算目标区块的头 部对应的哈希值。S304: Acquire an initial random number in the header of the target block, and calculate a hash value corresponding to the header of the target block according to the initial random number.
具体地,继续参阅图4,其中区块链的头部中还包括一初始随机数,在获取到目标区块的头部中的初始随机数后,则可以计算区块链的头部的哈希值,例如可以按照头部中各个参数的顺序将各个参数进行组合,再计算组合后的头部的哈希值。Specifically, referring to FIG. 4, the header of the block chain further includes an initial random number. After obtaining the initial random number in the header of the target block, the head of the block chain can be calculated. The hash value, for example, can be combined according to the order of each parameter in the header, and then the hash value of the combined header is calculated.
S306:判断哈希值对应的工作量难度是否满足预设工作量难度。S306: Determine whether the workload difficulty corresponding to the hash value satisfies the preset workload difficulty.
具体地,在获取到哈希值后,则可以根据该哈希值得到一个工作量难度,例如可以是计算哈希值的预设位的0的个数,可选地可以获取该哈希值的开头中0的个数,以该0的个数作为当前工作量难度,并判断该工作量难度是否满足预设工作量难度,即0的个数是否满足预设工作量难度,也可以是判断0的个数是否大于预设工作量难度等。Specifically, after the hash value is obtained, a workload difficulty may be obtained according to the hash value, for example, the number of 0s of the preset bit of the hash value may be calculated, and the hash value may be optionally obtained. The number of 0 in the beginning, the number of 0 is used as the current workload difficulty, and it is judged whether the workload difficulty meets the preset workload difficulty, that is, whether the number of 0 satisfies the preset workload difficulty, or Determine whether the number of 0 is greater than the preset workload difficulty.
S308:当哈希值对应的工作量难度不满足预设工作量难度时,则对初始随机数进行调整。S308: When the workload corresponding to the hash value does not meet the preset workload difficulty, the initial random number is adjusted.
具体地,当哈希值对应的工作量难度不满足预设工作量难度时,则对初始随机数进行调整,例如可以将该初始随机数按照预设步长进行递增或递减等,其中预设步长可以是按照预定进行设置,一般为1。Specifically, when the workload difficulty corresponding to the hash value does not meet the preset workload difficulty, the initial random number is adjusted, for example, the initial random number may be incremented or decremented according to a preset step, etc., where the preset The step size can be set as scheduled, typically one.
S310:根据调整后的初始随机数继续计算目标区块的头部对应的哈希值,直至哈希值对应的工作量难度满足预设工作量难度时,提取目标区块的头部中的调整后的初始随机数作为目标随机数。S310: Continue to calculate a hash value corresponding to the head of the target block according to the adjusted initial random number, and extract the adjustment in the header of the target block when the workload corresponding to the hash value satisfies the preset workload difficulty. The initial initial random number is used as the target random number.
具体地,由于目标区块的头部中的初始随机数进行了调整,因此目标区块头部对应的哈希值也发生了改变,因此需要重新计算目标头部对应的哈希值,例如可以按照头部中各个参数的顺序将各个参数进行组合,再计算组合后的头部的哈希值,其中在每次计算目标区块的头部的哈希值的过程中,各个参数的顺序不变。Specifically, since the initial random number in the header of the target block is adjusted, the hash value corresponding to the target block header also changes, so the hash value corresponding to the target header needs to be recalculated, for example, According to the order of each parameter in the header, each parameter is combined, and then the hash value of the combined head is calculated. In the process of calculating the hash value of the head of the target block each time, the order of each parameter is not change.
在获取到新的哈希值后,则继续判断工作量难度是否满足预设工作量难度,如果不满足则继续调整随机数,直至根据随机数所计算出的哈希值对应的工作量难度满足预设工作量难度时,则将此时的目标区块中的随机数作为目标随机数。After obtaining the new hash value, it continues to determine whether the workload difficulty meets the preset workload difficulty. If not, the random number is continuously adjusted until the workload corresponding to the hash value calculated according to the random number is difficult. When the workload is preset, the random number in the target block at this time is taken as the target random number.
其中,区块链作为一种新型的使用分布式的计算设备产生共识(节点间相互可信的数据和计算行为)的方法,也被称作分布式账本。其中核心的设计思想包括使用工作量证明机制保护账本可信。具体的过程描述如下:分布式网络中的节点(俗称旷工节点)通过网络收集市场的转账交易信息,旷工节点以特定的格式打包若干个数量的交易信息到一个区块的数据结构中(block),这个时候旷工节点再按照固定的一个格式生成一个对应于这个block的区块头部(block header),这个区块头部中除了基本的描述当前block信息之外,还有2个重要的属性,一个是关于所有交易的一个特殊摘要值(hash,从所有序列化的交易中通过merkle-tree方法构造),另一个是一个位置的随机数字段nonce。有了这个区块头部以后,旷工节点开始一下步骤搜索一个特定的随机数,计算初始值随机数对应的区块头部结构的hash,检测该hash是否满足区块链对当前区块的难度设定。如果满足,结束搜索,将该随机数nonce写入区块头部,向网络中的其他旷工节点广播这个区块,等待其 他旷工节点把这个block接受,并写入各自的区块链。如果不满足设定工作量证明,继续递增随机数nonce,计算hash,检查难度,直到找到一个合适的难度。Among them, blockchain is a new type of method that uses distributed computing devices to generate consensus (reciprocal data and computational behavior between nodes), also known as distributed ledger. The core design ideas include the use of a workload proof mechanism to protect the books. The specific process is described as follows: nodes in a distributed network (commonly known as as-built nodes) collect market transfer transaction information through the network, and the as-built node packages a certain number of transaction information into a block data structure in a specific format. At this time, the completion node generates a block header corresponding to the block according to a fixed format. In addition to the basic description of the current block information, the block header has two important attributes. 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 random number field nonce at a location. After having the block header, the ascending node starts a step to search for a specific random number, calculates the hash of the block header structure corresponding to the initial value random number, and detects whether the hash satisfies the difficulty of the block chain to the current block. set up. If so, the search is ended, the random number nonce is written to the block header, and the block is broadcast to other as-built nodes in the network, waiting for other completion nodes to accept the block and write to their respective blockchains. If the proof of the set workload is not met, continue to increment the random number nonce, calculate the hash, check the difficulty, until you find a suitable difficulty.
上述实施例中,通过区块链的工作量证明机制,即由于hash算法的特性,要生成满足特定难度需求的hash,只有不停的调整随机数nonce,而什么样的随机数nonce值满足hash的难度要求是随机出现的,因此保证了所获取到了目标随机数的公正性,从而保证了交易的公正性。In the above embodiment, the workload proof mechanism of the blockchain, that is, due to the characteristics of the hash algorithm, to generate a hash that satisfies a specific difficulty requirement, only the random number nonce is continuously adjusted, and what kind of random number nonce value satisfies the hash The difficulty requirements are randomly generated, thus ensuring the fairness of the target random number, thus ensuring the fairness of the transaction.
在其中一个实施例中,参与图5,图5为图2所示实施例中的步骤S204的流程图,该步骤S204,即根据第一交易信息生成第一交易价值存储地址的步骤,可以包括:In one embodiment, FIG. 5 is a flowchart of step S204 in the embodiment shown in FIG. 2. The step S204 is to generate a first transaction value storage address according to the first transaction information, which may include :
S502:选取第一交易信息中目标区块相同的第一交易信息。S502: Select first transaction information with the same target block in the first transaction information.
具体地,区块链的节点在预设时间段内分别接收各个交易终端发送的第一交易信息,该第一交易信息中可以包含目标区块的标识,从而区块链的节点可以获取到目标区块的标识相同的第一交易信息。其中各个交易终端发送的第一交易信息可以包括交易终端标识或用户标识、第二交易价值存储地址、目标区块以及交易数据,其中为了适应区块链中的数据传输,第二交易价值存储地址可以是以第二交易价值存储地址对应的加密算法的公钥的形式出现。Specifically, the node of the block chain receives the first transaction information sent by each transaction terminal in a preset time period, and the first transaction information may include the identifier of the target block, so that the node of the block chain can obtain the target. The block identifies the same first transaction information. The first transaction information sent by each transaction terminal may include a transaction terminal identifier or a user identifier, a second transaction value storage address, a target block, and transaction data, wherein the second transaction value storage address is adapted to accommodate data transmission in the blockchain. It may be in the form of a public key of an encryption algorithm corresponding to the second transaction value storage address.
S504:根据目标区块相同的第一交易信息中的第二交易价值存储地址以及交易数据生成赎回脚本。S504: Generate a redemption script according to the second transaction value storage address and the transaction data in the first transaction information of the same target block.
具体地,在获取到目标区块相同的第一交易信息后,可以根据该第一交易信息构造各个交易终端参与交易的合约,即根据各个交易终端发送的第一交易信息中的第二交易价值存储地址以及交易数据生成赎回脚本,其中交易数据给出了交易终端本次交易的预期目标交易结果,只有区块链的节点根据目标随机数所得到的交易处理结果与该预期目标交易结果对应时,该交易终端才可以从第一交易价值存储地址中获取到相应的价值。Specifically, after acquiring the same first transaction information of the target block, the contract for each transaction terminal to participate in the transaction may be constructed according to the first transaction information, that is, the second transaction value in the first transaction information sent according to each transaction terminal. The storage address and the transaction data generate a redemption script, wherein the transaction data gives the expected target transaction result of the transaction terminal of the transaction, and only the transaction result obtained by the node of the block chain according to the target random number corresponds to the expected target transaction result. At this time, the transaction terminal can obtain the corresponding value from the first transaction value storage address.
其中以两个交易终端为例,所生成的赎回脚本可以是,当根据目标随机数所得到的交易处理结果与第一交易终端的交易数据相符合时,则允许第一交易终端从第一交易价值存储地址中获取到相应的价值,否则,允许第二交易终端从第一交易价值存储地址中获取到相应的价值。可选地,在实际中可以通过区块链脚本实现,即当根据目标随机数所得到的交易处理结果与第一交易终端的交易数据相符合时,则将与第一交易终端对应的第二交易价值存储地址的公钥压入堆栈中,否则,将与第二交易终端对应的第二交易价值存储地址的公钥压入堆栈中。For example, in the case of two transaction terminals, the generated redemption script may be: when the transaction processing result obtained according to the target random number matches the transaction data of the first transaction terminal, the first transaction terminal is allowed to be from the first The corresponding value is obtained in the transaction value storage address, otherwise, the second transaction terminal is allowed to obtain the corresponding value from the first transaction value storage address. Alternatively, in practice, it may be implemented by a blockchain script, that is, when the transaction processing result obtained according to the target random number matches the transaction data of the first transaction terminal, then the second corresponding to the first transaction terminal is The public key of the transaction value storage address is pushed onto the stack, otherwise, the public key of the second transaction value storage address corresponding to the second transaction terminal is pushed onto the stack.
S506:对赎回脚本进行计算得到第一交易价值存储地址。S506: Calculate the redemption script to obtain a first transaction value storage address.
具体地,构造出赎回脚本,其也可以看作本次交易的交易合约后,则可以根据该赎回脚本计算得到第一交易价值存储地址,即公共价值存储地址,例如可以通过对赎回脚本进行二次哈希计算得到该第一交易价值存储地址。Specifically, a redemption script is constructed, which can also be regarded as a transaction contract of the transaction, and the first transaction value storage address, that is, a public value storage address, can be calculated according to the redemption script, for example, by redemption The script performs a second hash calculation to obtain the first transaction value storage address.
上述实施例中,通过各个交易终端的交易信息中的第二交易价值存储地址可以构造出赎回脚本,其也可以看作本次交易的交易合约,并根据该交易合约可以得到第一交易价 值存储地址,实现了使用非图灵完备的区块链脚本系统构造交易合约,并按照设定的随机条件赎回交易合约的价值的方案。In the above embodiment, the redemption script can be constructed by the second transaction value storage address in the transaction information of each transaction terminal, which can also be regarded as the transaction contract of the transaction, and the first transaction value can be obtained according to the transaction contract. The storage address implements a scheme for constructing a trading contract using a non-turing complete blockchain scripting system and redeeming the value of the trading contract according to the set random conditions.
在其中一个实施例中,步骤S204,即通过第二交易将第一交易的价值转入到第一交易价值存储地址中的步骤,可以包括:获取交易终端对应的第三交易价值存储地址;通过第二交易从第三交易价值存储地址中获取与第一交易对应的价值,并将所获取到的价值转入到第一交易价值存储地址中。In one embodiment, the step S204, that is, the step of transferring the value of the first transaction into the first transaction value storage address by using the second transaction, may include: acquiring a third transaction value storage address corresponding to the transaction terminal; The second transaction acquires a value corresponding to the first transaction from the third transaction value storage address, and transfers the acquired value to the first transaction value storage address.
具体地,通过第二交易将第一交易的价值转入到第一交易价值存储地址中,且为了保证该第一交易价值存储地址中的价值的安全,可以通过各个交易终端对充值交易进行签名,例如,根据多方的交易信息得到充值交易,对充值交易,各个交易终端通过自身的第二算法私钥对第二交易进行签名,以对交易资金存储地址中的资金进行锁定。Specifically, the value of the first transaction is transferred to the first transaction value storage address by the second transaction, and in order to ensure the security of the value in the first transaction value storage address, the refill transaction may be signed by each transaction terminal. For example, a refill transaction is obtained according to the transaction information of the plurality of parties. For the refill transaction, each transaction terminal signs the second transaction by its own second algorithm private key to lock the funds in the transaction fund storage address.
其中还是以两交易终端为例进行说明,首先获取到每一用户在区块链上的资金情况,其中包括第三交易价值存储地址、用户标识、第三交易价值存储地址对应的公钥以及价值量;然后将预设数量的价值转入到上述第一交易价值存储地址中,如果是两个用户,例如Alice和Bob,则其相互交换得到对方的交易,并在对方交易信息的基础上添加自己的交易价值得到充值交易,并分别对该充值交易进行签名处理,即Alice和Bob分别对上面的充值交易用加密算法私钥签名使其生效;有了Alice和Bob的签名,对该第一交易价值存储地址的价值转入就生效了,从而可以向区块链广播,让矿工节点记录到区块链上。The two transaction terminals are taken as an example for description. First, the funds of each user in the blockchain are obtained, including the third transaction value storage address, the user identifier, the public key corresponding to the third transaction value storage address, and the value amount. Then, the preset amount of value is transferred to the first transaction value storage address. If it is two users, such as Alice and Bob, they exchange each other's transactions and add themselves based on the other party's transaction information. The transaction value is recharged and the refill transaction is signed separately, that is, Alice and Bob respectively sign the private key of the above-mentioned recharge transaction with the encryption algorithm to make it effective; with the signature of Alice and Bob, the first transaction The value transfer address value is validated so that it can be broadcast to the blockchain and the miner node is recorded on the blockchain.
上述实施例中,首先获取交易终端对应的第三交易价值存储地址;通过第二交易从第三交易价值存储地址中获取与第一交易对应的价值,并将所获取到的价值转入到第一交易价值存储地址中,保证了交易的安全性以及准确性。In the above embodiment, the third transaction value storage address corresponding to the transaction terminal is first acquired; the value corresponding to the first transaction is obtained from the third transaction value storage address by the second transaction, and the obtained value is transferred to the first A transaction value storage address ensures the security and accuracy of the transaction.
在其中一个实施例中,根据目标随机数和第一交易信息得到交易处理结果的步骤,可以包括:对目标随机数进行取模操作得到参考随机数;根据参考随机数以及第一交易信息中的交易数据得到交易处理结果。In one embodiment, the step of obtaining a transaction processing result according to the target random number and the first transaction information may include: performing a modulo operation on the target random number to obtain a reference random number; according to the reference random number and the first transaction information The transaction data is processed by the transaction results.
具体地,当参与交易的交易终端存在多个时,则最后可能存在多个交易终端可以从第一交易价值存储地址中获取到相应的价值,为了准确地对该多个交易终端参与交易的场景进行量化,且保证交易的公正性,可以根据所获得的目标随机数得到参考随机数,例如对目标随机数进行取模计算可以得到多个参考随机数,然后根据参考随机数以及第一交易信息中的交易数据得到交易处理结果,其中交易数据是指各个交易终端对交易的预期处理结果。Specifically, when there are multiple transaction terminals participating in the transaction, there may be a scenario in which a plurality of transaction terminals may obtain corresponding values from the first transaction value storage address, in order to accurately participate in the transaction for the plurality of transaction terminals. To quantify and ensure the fairness of the transaction, the reference random number can be obtained according to the obtained target random number. For example, the modulo calculation of the target random number can obtain multiple reference random numbers, and then according to the reference random number and the first transaction information. The transaction data in the transaction is processed as a result of the transaction, wherein the transaction data refers to the expected processing result of the transaction by each transaction terminal.
上述实施例中,仅通过一步取模运算即可以根据目标随机数得到参考随机数,且该取模运算可以是预先设置好的运算,在该目标随机数具有随机性的前提下,该参考随机数也具有随机性,从而扩展了多个交易终端参与的交易的公正性。In the above embodiment, the reference random number can be obtained according to the target random number only by one-step modulo operation, and the modulo operation can be a preset operation, and the reference random number is random under the premise that the target random number has randomness. The number is also random, thus extending the fairness of transactions involving multiple trading terminals.
在其中一个实施例中,图2中所示的实施例中的步骤S210,即从第一交易价值存储地址中获取到与交易处理结果对应的价值,并将所获取到的价值转入至对应交易终端的第二交易价值存储地址中的步骤,可以包括:接收交易终端的价值赎回请求;根据交易处理 结果判断价值赎回请求对应的交易终端是否具有价值赎回权限;当价值赎回请求对应的交易终端具有价值赎回权限时,则从第一交易价值存储地址中获取到与交易处理结果对应的价值,并将所获取到的价值转入至对应交易终端的第二交易价值存储地址中。In one embodiment, step S210 in the embodiment shown in FIG. 2, that is, the value corresponding to the transaction processing result is obtained from the first transaction value storage address, and the obtained value is transferred to the corresponding The step of the second transaction value storage address of the transaction terminal may include: receiving a value redemption request of the transaction terminal; determining, according to the transaction processing result, whether the transaction terminal corresponding to the value redemption request has a value redemption authority; and when the value redemption request When the corresponding transaction terminal has the value redemption authority, the value corresponding to the transaction processing result is obtained from the first transaction value storage address, and the obtained value is transferred to the second transaction value storage address of the corresponding transaction terminal. in.
具体地,在交易结束,区块链的节点得到交易处理结果后,可以接收交易终端的价值赎回请求,区块链的节点根据该价值赎回请求判断该交易终端是否具有价值赎回权限,当具有赎回权限时,则从第一交易价值存储地址中获取到与交易处理结果对应的价值,并将所获取到的价值转入至对应交易终端的第二交易价值存储地址中,以完成整个交易。Specifically, after the transaction ends, the node of the blockchain obtains the transaction processing result, and can receive the value redemption request of the transaction terminal, and the node of the block chain determines whether the transaction terminal has the value redemption authority according to the value redemption request. When the redemption authority is available, the value corresponding to the transaction processing result is obtained from the first transaction value storage address, and the obtained value is transferred to the second transaction value storage address of the corresponding transaction terminal to complete The entire transaction.
其中,在实际应用中,例如,如果是两个交易终端参与,则直接将目标随机数压入到堆栈中,如果是多个交易终端参与,则可以将参考随机数压入到堆栈中,并根据预设规则以及交易数据对堆栈顶部布尔值进行设置,将符合预设规则的第二交易价值存储地址对应的加密算法的公钥压入到堆栈中,从而与压入到堆栈中的第二交易价值存储地址对应的加密算法的公钥对应的交易终端可以获取到对应的价值。例如当接收到交易终端发送的价值赎回请求时,该价值赎回请求中携带有与第二交易价值存储地址对应的加密算法的公钥对应的私钥,则首先通过该公钥验证该私钥,并在验证成功时,将对应的价值发送到与该私钥对应的交易终端。Wherein, in practical applications, for example, if two transaction terminals participate, the target random number is directly pushed onto the stack, and if multiple transaction terminals participate, the reference random number can be pushed onto the stack, and The Boolean value at the top of the stack is set according to the preset rule and the transaction data, and the public key of the encryption algorithm corresponding to the second transaction value storage address conforming to the preset rule is pushed onto the stack, so as to be pressed into the second in the stack. The transaction terminal corresponding to the public key of the encryption algorithm corresponding to the transaction value storage address can obtain the corresponding value. For example, when receiving the value redemption request sent by the transaction terminal, the value redemption request carries the private key corresponding to the public key of the encryption algorithm corresponding to the second transaction value storage address, and then the private key is first verified by the public key. Key, and when the verification is successful, the corresponding value is sent to the transaction terminal corresponding to the private key.
其中,以上述两个交易终端的例子进行说明,交易的结果就是根据矿工在目标区块的位置计算出来的目标随机数来决定Alice还是Bob之中谁可以赎回价值。首先将第一交易价值存储地址中的价值压入到堆栈中,然后执行指令得到目标随机数,第三将各个交易终端的交易数据压入到堆栈中,再执行交易结果获取指令以根据目标随机数和交易数据得到交易处理结果,当交易处理结果表示Alice可以赎回价值时,则将Alice对应的第二交易价值存储地址压入到堆栈中,可选地将Alice对应的第二交易价值存储地址对应的公钥压入到堆栈中,否则将Bob对应的第二交易价值存储地址压入到堆栈中,可选地将Bob对应的第二交易价值存储地址对应的公钥压入到堆栈中,然后接收各个交易终端发送的交易价值赎回请求,该请求中携带有对应的私钥,通过堆栈中压入的公钥对该私钥进行验证,只有验证成功的私钥对应的交易终端可以赎回相应的价值,从而实现交易。Among them, the example of the above two transaction terminals is described. The result of the transaction is to determine who can redeem the value among Alice or Bob according to the target random number calculated by the miner at the location of the target block. First, the value in the first transaction value storage address is pushed onto the stack, and then the instruction is executed to obtain the target random number. Third, the transaction data of each transaction terminal is pushed onto the stack, and then the transaction result acquisition instruction is executed to randomly according to the target. The number and transaction data are processed by the transaction processing. When the transaction processing result indicates that Alice can redeem the value, the second transaction value storage address corresponding to Alice is pushed onto the stack, and optionally the second transaction value corresponding to Alice is stored. The public key corresponding to the address is pushed into the stack, otherwise the second transaction value storage address corresponding to Bob is pushed onto the stack, and the public key corresponding to the second transaction value storage address corresponding to Bob is optionally pushed into the stack. And then receiving a transaction value redemption request sent by each transaction terminal, the request carries a corresponding private key, and the private key is verified by the public key pushed in the stack, and only the transaction terminal corresponding to the successful verification private key can Redeem the corresponding value to achieve the transaction.
上述实施例中,接收交易终端的价值赎回请求;根据交易处理结果判断价值赎回请求对应的交易终端是否具有价值赎回权限;当价值赎回请求对应的交易终端具有价值赎回权限时,则从第一交易价值存储地址中获取到与交易处理结果对应的价值,并将所获取到的价值转入至对应交易终端的第二交易价值存储地址中,保证了第一交易价值存储地址中价值的安全性。In the above embodiment, receiving a value redemption request of the transaction terminal; determining, according to the transaction processing result, whether the transaction terminal corresponding to the value redemption request has a value redemption authority; and when the transaction terminal corresponding to the value redemption request has a value redemption authority, Obtaining a value corresponding to the transaction processing result from the first transaction value storage address, and transferring the obtained value to the second transaction value storage address of the corresponding transaction terminal, thereby ensuring the first transaction value storage address The security of value.
应该理解的是,虽然图2、图3、图5的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2、图3、图5中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执 行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the steps in the flowcharts of FIGS. 2, 3, and 5 are sequentially displayed in accordance with the indication of 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 FIG. 2, FIG. 3, and FIG. 5 may include a plurality of sub-steps or stages, which are not necessarily performed at the same time, but may be executed at different times. The order of execution of the sub-steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least a portion of the sub-steps or stages of the other steps or other steps.
在其中一个实施例中,如图6所示,提供了一种交易处理装置,包括:接收模块100、价值转入模块200、目标随机数获取模块300、交易处理结果生成模块400和交易输出模块500,其中:In one embodiment, as shown in FIG. 6, a transaction processing apparatus is provided, including: a receiving module 100, a value transfer module 200, a target random number obtaining module 300, a transaction processing result generating module 400, and a transaction output module. 500, of which:
接收模块100,用于接收各个交易终端发送的第一交易信息,并根据第一交易信息生成第一交易价值存储地址。The receiving module 100 is configured to receive first transaction information sent by each transaction terminal, and generate a first transaction value storage address according to the first transaction information.
价值转入模块200,用于通过第二交易将第一交易的价值转入到第一交易价值存储地址中。The value transfer module 200 is configured to transfer the value of the first transaction to the first transaction value storage address by the second transaction.
目标随机数获取模块300,用于根据工作量证明机制获取第二交易的目标区块的目标随机数。The target random number obtaining module 300 is configured to acquire a target random number of the target block of the second transaction according to the workload proof mechanism.
交易处理结果生成模块400,用于根据目标随机数和第一交易信息得到交易处理结果。The transaction processing result generating module 400 is configured to obtain a transaction processing result according to the target random number and the first transaction information.
交易输出模块500,用于从第一交易价值存储地址中获取到与交易处理结果对应的价值,并将所获取到的价值转入至对应交易终端的第二交易价值存储地址中,第一交易信息携带有第二交易价值存储地址。The transaction output module 500 is configured to obtain the value corresponding to the transaction processing result from the first transaction value storage address, and transfer the obtained value to the second transaction value storage address of the corresponding transaction terminal, the first transaction The information carries a second transaction value storage address.
在其中一个实施例中,目标随机数获取模块300可以包括:In one embodiment, the target random number obtaining module 300 may include:
预设工作量难度获取单元,用于获取目标区块的预设工作量难度。The preset workload difficulty obtaining unit is configured to acquire the preset workload difficulty of the target block.
哈希值计算单元,用于获取目标区块的头部中的初始随机数,并根据初始随机数计算目标区块的头部对应的哈希值。The hash value calculation unit is configured to obtain an initial random number in the header of the target block, and calculate a hash value corresponding to the head of the target block according to the initial random number.
调整单元,用于判断哈希值对应的工作量难度是否满足预设工作量难度;当哈希值对应的工作量难度不满足预设工作量难度时,则对初始随机数进行调整。The adjusting unit is configured to determine whether the workload difficulty corresponding to the hash value satisfies the preset workload difficulty; when the workload corresponding to the hash value does not satisfy the preset workload difficulty, the initial random number is adjusted.
目标随机数获取单元,用于根据调整后的初始随机数继续计算目标区块的头部对应的哈希值,直至哈希值对应的工作量难度满足预设工作量难度时,提取目标区块的头部中的调整后的初始随机数作为目标随机数。The target random number obtaining unit is configured to continue to calculate a hash value corresponding to the head of the target block according to the adjusted initial random number, and extract the target block when the workload difficulty corresponding to the hash value satisfies the preset workload difficulty The adjusted initial random number in the head is used as the target random number.
在其中一个实施例中,交易处理结果生成模块400可以包括:In one embodiment, the transaction processing result generation module 400 can include:
选取单元,用于选取第一交易信息中目标区块相同的第一交易信息。The selecting unit is configured to select the first transaction information with the same target block in the first transaction information.
赎回脚本生成单元,用于根据目标区块相同的第一交易信息中的第二交易价值存储地址以及交易数据生成赎回脚本。And a redemption script generating unit, configured to generate a redemption script according to the second transaction value storage address and the transaction data in the first transaction information of the same target block.
计算单元,用于对赎回脚本进行计算得到第一交易价值存储地址。The calculating unit is configured to calculate the redemption script to obtain the first transaction value storage address.
在其中一个实施例中,价值转入模块200可以包括:In one of the embodiments, the value transfer module 200 can include:
交易价值存储地址获取单元,用于获取交易终端对应的第三交易价值存储地址。The transaction value storage address obtaining unit is configured to obtain a third transaction value storage address corresponding to the transaction terminal.
价值转入单元,用于通过第二交易从第三交易价值存储地址中获取与第一交易对应的价值,并将所获取到的价值转入到第一交易价值存储地址中。The value transfer unit is configured to obtain the value corresponding to the first transaction from the third transaction value storage address by the second transaction, and transfer the acquired value into the first transaction value storage address.
在其中一个实施例中,交易处理结果生成模块400可以包括:In one embodiment, the transaction processing result generation module 400 can include:
参考随机数获取单元,用于对目标随机数进行取模操作得到参考随机数。The reference random number obtaining unit is configured to perform a modulo operation on the target random number to obtain a reference random number.
交易处理结果生成单元,用于根据参考随机数以及第一交易信息中的交易数据得到交易处理结果。The transaction processing result generating unit is configured to obtain a transaction processing result according to the reference random number and the transaction data in the first transaction information.
在其中一个实施例中,交易输出模块500可以包括:In one of the embodiments, the transaction output module 500 can include:
价值赎回请求接收单元,用于接收交易终端的价值赎回请求。The value redemption request receiving unit is configured to receive a value redemption request of the transaction terminal.
赎回权限判断单元,用于根据交易处理结果判断价值赎回请求对应的交易终端是否具有价值赎回权限。The redemption authority determining unit is configured to determine, according to the transaction processing result, whether the transaction terminal corresponding to the value redemption request has a value redemption authority.
交易输出单元,用于当价值赎回请求对应的交易终端具有价值赎回权限时,则从第一交易价值存储地址中获取到与交易处理结果对应的价值,并将所获取到的价值转入至对应交易终端的第二交易价值存储地址中。a transaction output unit, configured to: when the transaction terminal corresponding to the value redemption request has a value redemption right, obtain a value corresponding to the transaction processing result from the first transaction value storage address, and transfer the obtained value into To the second transaction value storage address of the corresponding transaction terminal.
关于交易处理装置的具体限定可以参见上文中对于交易处理方法的限定,在此不再赘述。上述交易处理装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For specific definitions of the transaction processing device, reference may be made to the above description of the transaction processing method, and details are not described herein again. 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.
在其中一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图7所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的网络接口用于与外部的交易终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种交易处理方法。In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in FIG. The computer device includes a processor, a memory, and a network interface 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 an operating system, computer readable instructions, and a database. 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 transaction terminal via a network connection. The computer readable instructions are executed by a processor to implement a transaction processing method.
本领域技术人员可以理解,图7中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。It will be understood by those skilled in the art that the structure shown in 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: receiving the respective transaction terminals The first transaction information, and generating a first transaction value storage address according to the first transaction information; transferring the value of the first transaction to the first transaction value storage address by the second transaction; acquiring the second transaction according to the workload certification mechanism a target random number of the target block; obtaining a transaction processing result according to the target random number and the first transaction information; and obtaining a value corresponding to the transaction processing result from the first transaction value storage address, and transferring the obtained value Entering into the second transaction value storage address of the corresponding transaction terminal, the first transaction information carries a second transaction value storage address.
在其中一个实施例中,处理器执行计算机可读指令时所实现的根据工作量证明机制获取第二交易的目标区块的目标随机数的步骤,可以包括:获取目标区块的预设工作量难度;获取目标区块的头部中的初始随机数,并根据初始随机数计算目标区块的头部对应的哈希值;判断哈希值对应的工作量难度是否满足预设工作量难度;当哈希值对应的工作量 难度不满足预设工作量难度时,则对初始随机数进行调整;及根据调整后的初始随机数继续计算目标区块的头部对应的哈希值,直至哈希值对应的工作量难度满足预设工作量难度时,提取目标区块的头部中的调整后的初始随机数作为目标随机数。In one embodiment, the step of acquiring the target random number of the target block of the second transaction according to the workload proof mechanism implemented by the processor when executing the computer readable instruction may include: acquiring a preset workload of the target block Difficulty; obtaining an initial random number in the header of the target block, and calculating a hash value corresponding to the head of the target block according to the initial random number; determining whether the workload difficulty corresponding to the hash value satisfies the preset workload difficulty; When the workload corresponding to the hash value does not satisfy the preset workload difficulty, the initial random number is adjusted; and the hash value corresponding to the head of the target block is continuously calculated according to the adjusted initial random number until the hash value is reached. When the workload corresponding to the hash value satisfies the preset workload difficulty, the adjusted initial random number in the header of the target block is extracted as the target random number.
在其中一个实施例中,处理器执行计算机可读指令时所实现的根据第一交易信息生成第一交易价值存储地址的步骤,可以包括:选取第一交易信息中目标区块相同的第一交易信息;根据目标区块相同的第一交易信息中的第二交易价值存储地址以及交易数据生成赎回脚本;及对赎回脚本进行计算得到第一交易价值存储地址。In one embodiment, the step of generating the first transaction value storage address according to the first transaction information when the processor executes the computer readable instruction may include: selecting the first transaction in the first transaction information that has the same target block. Information; generating a redemption script according to the second transaction value storage address and the transaction data in the first transaction information of the same target block; and calculating the redemption script to obtain the first transaction value storage address.
在其中一个实施例中,处理器执行计算机可读指令时所实现的通过第二交易将第一交易的价值转入到第一交易价值存储地址中的步骤,可以包括:获取交易终端对应的第三交易价值存储地址;及通过第二交易从第三交易价值存储地址中获取与第一交易对应的价值,并将所获取到的价值转入到第一交易价值存储地址中。In one embodiment, the step of transferring the value of the first transaction to the first transaction value storage address by the second transaction implemented by the processor when executing the computer readable instruction may include: acquiring the corresponding corresponding to the transaction terminal And the third transaction value storage address; and obtaining the value corresponding to the first transaction from the third transaction value storage address by the second transaction, and transferring the obtained value into the first transaction value storage address.
在其中一个实施例中,处理器执行计算机可读指令时所实现的根据目标随机数和第一交易信息得到交易处理结果的步骤,可以包括:对目标随机数进行取模操作得到参考随机数;及根据参考随机数以及第一交易信息中的交易数据得到交易处理结果。In one embodiment, the step of obtaining a transaction processing result according to the target random number and the first transaction information when the processor executes the computer readable instruction may include: performing a modulo operation on the target random number to obtain a reference random number; And obtaining the transaction processing result according to the reference random number and the transaction data in the first transaction information.
在其中一个实施例中,处理器执行计算机可读指令时所实现的从第一交易价值存储地址中获取到与交易处理结果对应的价值,并将所获取到的价值转入至对应交易终端的第二交易价值存储地址中的步骤,可以包括:接收交易终端的价值赎回请求;根据交易处理结果判断价值赎回请求对应的交易终端是否具有价值赎回权限;及当价值赎回请求对应的交易终端具有价值赎回权限时,则从第一交易价值存储地址中获取到与交易处理结果对应的价值,并将所获取到的价值转入至对应交易终端的第二交易价值存储地址中。In one embodiment, the processor obtains the value corresponding to the transaction processing result from the first transaction value storage address when the processor executes the computer readable instruction, and transfers the acquired value to the corresponding transaction terminal. The step of the second transaction value storage address may include: receiving a value redemption request of the transaction terminal; determining, according to the transaction processing result, whether the transaction terminal corresponding to the value redemption request has a value redemption authority; and when the value redemption request corresponds When the transaction terminal has the value redemption authority, the value corresponding to the transaction processing result is obtained from the first transaction value storage address, and the obtained value is transferred to the second transaction value storage address of the corresponding transaction terminal.
一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤::接收各个交易终端发送的第一交易信息,并根据第一交易信息生成第一交易价值存储地址;通过第二交易将第一交易的价值转入到第一交易价值存储地址中;根据工作量证明机制获取第二交易的目标区块的目标随机数;根据目标随机数和第一交易信息得到交易处理结果;及从第一交易价值存储地址中获取到与交易处理结果对应的价值,并将所获取到的价值转入至对应交易终端的第二交易价值存储地址中,第一交易信息携带有第二交易价值存储地址。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: receiving individual transactions Transmitting the first transaction information by the terminal, and generating a first transaction value storage address according to the first transaction information; transferring the value of the first transaction to the first transaction value storage address by using the second transaction; acquiring the first according to the workload verification mechanism a target random number of the target block of the second transaction; obtaining a transaction processing result according to the target random number and the first transaction information; and obtaining a value corresponding to the transaction processing result from the first transaction value storage address, and acquiring the obtained value The value is transferred to the second transaction value storage address of the corresponding transaction terminal, and the first transaction information carries the second transaction value storage address.
在其中一个实施例中,计算机可读指令被处理器执行时所实现的根据工作量证明机制获取第二交易的目标区块的目标随机数的步骤,可以包括:获取目标区块的预设工作量难度;获取目标区块的头部中的初始随机数,并根据初始随机数计算目标区块的头部对应的哈希值;判断哈希值对应的工作量难度是否满足预设工作量难度;当哈希值对应的工作量难度不满足预设工作量难度时,则对初始随机数进行调整;及根据调整后的初始随机数继续计算目标区块的头部对应的哈希值,直至哈希值对应的工作量难度满足预设工作量难度时,提取目标区块的头部中的调整后的初始随机数作为目标随机数。In one embodiment, the step of acquiring, by the processor, the target random number of the target block of the second transaction according to the workload proof mechanism implemented by the processor may include: obtaining a preset work of the target block The difficulty is obtained; the initial random number in the head of the target block is obtained, and the hash value corresponding to the head of the target block is calculated according to the initial random number; whether the difficulty corresponding to the hash value satisfies the preset workload difficulty When the workload corresponding to the hash value does not satisfy the preset workload difficulty, the initial random number is adjusted; and the hash value corresponding to the head of the target block is continuously calculated according to the adjusted initial random number until When the workload difficulty corresponding to the hash value satisfies the preset workload difficulty, the adjusted initial random number in the header of the target block is extracted as the target random number.
在其中一个实施例中,计算机可读指令被处理器执行时所实现的根据第一交易信息 生成第一交易价值存储地址的步骤,可以包括:选取第一交易信息中目标区块相同的第一交易信息;根据目标区块相同的第一交易信息中的第二交易价值存储地址以及交易数据生成赎回脚本;及对赎回脚本进行计算得到第一交易价值存储地址。In one embodiment, the step of generating the first transaction value storage address according to the first transaction information when the computer readable instructions are executed by the processor may include: selecting the first target in the first transaction information that is the same as the first block. Transaction information; generating a redemption script according to the second transaction value storage address and transaction data in the same first transaction information of the target block; and calculating the redemption script to obtain the first transaction value storage address.
在其中一个实施例中,计算机可读指令被处理器执行时所实现的通过第二交易将第一交易的价值转入到第一交易价值存储地址中的步骤,可以包括:获取交易终端对应的第三交易价值存储地址;及通过第二交易从第三交易价值存储地址中获取与第一交易对应的价值,并将所获取到的价值转入到第一交易价值存储地址中。In one embodiment, the step of transferring the value of the first transaction to the first transaction value storage address by the second transaction implemented by the processor when the computer readable instructions are executed may include: acquiring a corresponding transaction terminal The third transaction value storage address; and obtaining the value corresponding to the first transaction from the third transaction value storage address by the second transaction, and transferring the obtained value into the first transaction value storage address.
在其中一个实施例中,计算机可读指令被处理器执行时所实现的根据目标随机数和第一交易信息得到交易处理结果的步骤,可以包括:对目标随机数进行取模操作得到参考随机数;及根据参考随机数以及第一交易信息中的交易数据得到交易处理结果。In one embodiment, the step of obtaining the transaction processing result according to the target random number and the first transaction information implemented by the processor when the computer readable instructions are executed by the processor may include: performing a modulo operation on the target random number to obtain a reference random number And obtaining transaction processing results based on the reference random number and the transaction data in the first transaction information.
在其中一个实施例中,计算机可读指令被处理器执行时所实现的从第一交易价值存储地址中获取到与交易处理结果对应的价值,并将所获取到的价值转入至对应交易终端的第二交易价值存储地址中的步骤,可以包括:接收交易终端的价值赎回请求;根据交易处理结果判断价值赎回请求对应的交易终端是否具有价值赎回权限;及当价值赎回请求对应的交易终端具有价值赎回权限时,则从第一交易价值存储地址中获取到与交易处理结果对应的价值,并将所获取到的价值转入至对应交易终端的第二交易价值存储地址中。In one embodiment, the computer readable instructions are obtained by the processor to obtain a value corresponding to the transaction processing result from the first transaction value storage address, and transfer the obtained value to the corresponding transaction terminal. The step of storing the second transaction value storage address may include: receiving a value redemption request of the transaction terminal; determining, according to the transaction processing result, whether the transaction terminal corresponding to the value redemption request has a value redemption authority; and when the value redemption request corresponds When the transaction terminal has the value redemption authority, the value corresponding to the transaction processing result is obtained from the first transaction value storage address, and the obtained value is transferred to the second transaction value storage address of the corresponding transaction terminal. .
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(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)等。One of ordinary skill in the art can understand that all or part of the process of implementing the above embodiments can be completed by computer readable instructions, which can be stored in a non-volatile computer. The readable storage medium, which when executed, may include the flow of an embodiment of the methods as described above. Any reference to a memory, storage, database or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. Non-volatile memory can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of formats, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronization chain. Synchlink DRAM (SLDRAM), Memory Bus (Rambus) Direct RAM (RDRAM), Direct Memory Bus Dynamic RAM (DRDRAM), and Memory Bus Dynamic RAM (RDRAM).
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments may be arbitrarily combined. For the sake of brevity of description, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, It is considered to be the range described in this specification.
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments are merely illustrative of several embodiments of the present application, and the description thereof is more specific and detailed, but is not to be construed as limiting the scope of the invention. It should be noted that a number of variations and modifications may be made by those skilled in the art without departing from the spirit and scope of the present application. Therefore, the scope of the invention should be determined by the appended claims.

Claims (20)

  1. 一种交易处理方法,包括:A transaction processing method, including:
    接收各个交易终端发送的第一交易信息,并根据所述第一交易信息生成第一交易价值存储地址;Receiving first transaction information sent by each transaction terminal, and generating a first transaction value storage address according to the first transaction information;
    通过第二交易将第一交易的价值转入到所述第一交易价值存储地址中;Transferring the value of the first transaction to the first transaction value storage address by the second transaction;
    根据工作量证明机制获取所述第二交易的目标区块的目标随机数;Obtaining a target random number of the target block of the second transaction according to the workload proof mechanism;
    根据所述目标随机数和所述第一交易信息得到交易处理结果;及Obtaining a transaction processing result according to the target random number and the first transaction information; and
    从所述第一交易价值存储地址中获取到与所述交易处理结果对应的价值,并将所获取到的价值转入至对应交易终端的第二交易价值存储地址中,所述第一交易信息携带有所述第二交易价值存储地址。Obtaining a value corresponding to the transaction processing result from the first transaction value storage address, and transferring the acquired value to a second transaction value storage address of the corresponding transaction terminal, the first transaction information Carrying the second transaction value storage address.
  2. 根据权利要求1所述的方法,其特征在于,所述根据工作量证明机制获取所述第二交易的目标区块的目标随机数,包括:The method according to claim 1, wherein the obtaining a target random number of the target block of the second transaction according to the workload verification mechanism comprises:
    获取目标区块的预设工作量难度;Obtain the preset workload difficulty of the target block;
    获取所述目标区块的头部中的初始随机数,并根据所述初始随机数计算所述目标区块的头部对应的哈希值;Obtaining an initial random number in a header of the target block, and calculating a hash value corresponding to a header of the target block according to the initial random number;
    判断所述哈希值对应的工作量难度是否满足所述预设工作量难度;Determining whether the workload difficulty corresponding to the hash value satisfies the preset workload difficulty;
    当所述哈希值对应的工作量难度不满足所述预设工作量难度时,则对所述初始随机数进行调整;及Adjusting the initial random number when the workload difficulty corresponding to the hash value does not satisfy the preset workload difficulty; and
    根据调整后的所述初始随机数继续计算所述目标区块的头部对应的哈希值,直至所述哈希值对应的工作量难度满足所述预设工作量难度时,提取所述目标区块的头部中的调整后的所述初始随机数作为目标随机数。And continuing to calculate a hash value corresponding to the head of the target block according to the adjusted initial random number, and extracting the target when the workload difficulty corresponding to the hash value satisfies the preset workload difficulty The adjusted initial random number in the header of the block is taken as the target random number.
  3. 根据权利要求1或2所述的方法,其特征在于,所述根据所述第一交易信息生成第一交易价值存储地址,包括:The method according to claim 1 or 2, wherein the generating the first transaction value storage address according to the first transaction information comprises:
    选取所述第一交易信息中目标区块相同的第一交易信息;Selecting the first transaction information in the first transaction information that has the same target block;
    根据所述目标区块相同的第一交易信息中的第二交易价值存储地址以及交易数据生成赎回脚本;及Generating a redemption script according to the second transaction value storage address and the transaction data in the same first transaction information of the target block; and
    对所述赎回脚本进行计算得到第一交易价值存储地址。The redemption script is calculated to obtain a first transaction value storage address.
  4. 根据权利要求3所述的方法,其特征在于,所述通过第二交易将第一交易的价值转入到所述第一交易价值存储地址中,包括:The method of claim 3, wherein the transferring the value of the first transaction to the first transaction value storage address by the second transaction comprises:
    获取所述交易终端对应的第三交易价值存储地址;Obtaining a third transaction value storage address corresponding to the transaction terminal;
    通过第二交易从所述第三交易价值存储地址中获取与所述第一交易对应的价值,并将所获取到的价值转入到所述第一交易价值存储地址中。Obtaining a value corresponding to the first transaction from the third transaction value storage address by the second transaction, and transferring the acquired value into the first transaction value storage address.
  5. 根据权利要求4所述的方法,其特征在于,所述根据所述目标随机数和所述第一交易信息得到交易处理结果,包括:The method according to claim 4, wherein the obtaining the transaction processing result according to the target random number and the first transaction information comprises:
    对所述目标随机数进行取模操作得到参考随机数;及Performing a modulo operation on the target random number to obtain a reference random number; and
    根据所述参考随机数以及所述第一交易信息中的交易数据得到交易处理结果。Transaction processing results are obtained based on the reference random number and transaction data in the first transaction information.
  6. 根据权利要求5所述的方法,其特征在于,所述从所述第一交易价值存储地址中获取到与所述交易处理结果对应的价值,并将所获取到的价值转入至对应交易终端的第二交易价值存储地址中,包括:The method according to claim 5, wherein said obtaining a value corresponding to said transaction processing result from said first transaction value storage address, and transferring said acquired value to a corresponding transaction terminal The second transaction value storage address includes:
    接收所述交易终端的价值赎回请求;Receiving a value redemption request of the transaction terminal;
    根据所述交易处理结果判断所述价值赎回请求对应的交易终端是否具有价值赎回权限;及Determining, according to the transaction processing result, whether the transaction terminal corresponding to the value redemption request has a value redemption authority; and
    当所述价值赎回请求对应的交易终端具有价值赎回权限时,则从所述第一交易价值存储地址中获取到与所述交易处理结果对应的价值,并将所获取到的价值转入至对应交易终端的第二交易价值存储地址中。When the transaction terminal corresponding to the value redemption request has a value redemption right, obtaining a value corresponding to the transaction processing result from the first transaction value storage address, and transferring the obtained value into To the second transaction value storage address of the corresponding transaction terminal.
  7. 一种交易处理装置,包括:A transaction processing device comprising:
    接收模块,用于接收各个交易终端发送的第一交易信息,并根据所述第一交易信息生成第一交易价值存储地址;a receiving module, configured to receive first transaction information sent by each transaction terminal, and generate a first transaction value storage address according to the first transaction information;
    价值转入模块,用于通过第二交易将第一交易的价值转入到所述第一交易价值存储地址中;a value transfer module for transferring the value of the first transaction to the first transaction value storage address by the second transaction;
    目标随机数获取模块,用于根据工作量证明机制获取所述第二交易的目标区块的目标随机数;a target random number obtaining module, configured to acquire a target random number of the target block of the second transaction according to the workload proof mechanism;
    交易处理结果生成模块,用于根据所述目标随机数和所述第一交易信息得到交易处理结果;a transaction processing result generating module, configured to obtain a transaction processing result according to the target random number and the first transaction information;
    交易输出模块,用于从所述第一交易价值存储地址中获取到与所述交易处理结果对应的价值,并将所获取到的价值转入至对应交易终端的第二交易价值存储地址中,所述第一交易信息携带有所述第二交易价值存储地址。a transaction output module, configured to obtain a value corresponding to the transaction processing result from the first transaction value storage address, and transfer the obtained value to a second transaction value storage address of the corresponding transaction terminal, The first transaction information carries the second transaction value storage address.
  8. 根据权利要求7所述的装置,其特征在于,所述目标随机数获取模块包括:The apparatus according to claim 7, wherein the target random number obtaining module comprises:
    预设工作量难度获取单元,用于获取目标区块的预设工作量难度;The preset workload difficulty obtaining unit is configured to acquire a preset workload difficulty of the target block;
    哈希值计算单元,用于获取所述目标区块的头部中的初始随机数,并根据所述初始随机数计算所述目标区块的头部对应的哈希值;a hash value calculation unit, configured to acquire an initial random number in a header of the target block, and calculate a hash value corresponding to a header of the target block according to the initial random number;
    调整单元,用于判断所述哈希值对应的工作量难度是否满足所述预设工作量难度;当所述哈希值对应的工作量难度不满足所述预设工作量难度时,则对所述初始随机数进行调整;The adjusting unit is configured to determine whether the workload difficulty corresponding to the hash value satisfies the preset workload difficulty; when the workload difficulty corresponding to the hash value does not satisfy the preset workload difficulty, The initial random number is adjusted;
    目标随机数获取单元,用于根据调整后的所述初始随机数继续计算所述目标区块的头部对应的哈希值,直至所述哈希值对应的工作量难度满足所述预设工作量难度时,提取所述目标区块的头部中的调整后的所述初始随机数作为目标随机数。a target random number obtaining unit, configured to continue to calculate a hash value corresponding to a header of the target block according to the adjusted initial random number, until the workload difficulty corresponding to the hash value satisfies the preset work When the amount is difficult, the adjusted initial random number in the header of the target block is extracted as the target random number.
  9. 一种计算机设备,包括存储器及一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:接收各个交易终端发送的第一交易信息,并根据所述第一交易信息生 成第一交易价值存储地址;通过第二交易将第一交易的价值转入到所述第一交易价值存储地址中;根据工作量证明机制获取所述第二交易的目标区块的目标随机数;根据所述目标随机数和所述第一交易信息得到交易处理结果;及从所述第一交易价值存储地址中获取到与所述交易处理结果对应的价值,并将所获取到的价值转入至对应交易终端的第二交易价值存储地址中,所述第一交易信息携带有所述第二交易价值存储地址。A computer device comprising a memory and one or more processors having stored therein computer readable instructions, the computer readable instructions being executed by the one or more processors to cause the one or more The processor performs the following steps: receiving first transaction information sent by each transaction terminal, and generating a first transaction value storage address according to the first transaction information; transferring the value of the first transaction to the first a transaction value storage address; acquiring a target random number of the target block of the second transaction according to the workload proof mechanism; obtaining a transaction processing result according to the target random number and the first transaction information; and Obtaining a value corresponding to the transaction processing result in a transaction value storage address, and transferring the obtained value to a second transaction value storage address of the corresponding transaction terminal, where the first transaction information carries the The second transaction value storage address.
  10. 根据权利要求9所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时所实现的根据工作量证明机制获取所述第二交易的目标区块的目标随机数,包括:获取目标区块的预设工作量难度;获取所述目标区块的头部中的初始随机数,并根据所述初始随机数计算所述目标区块的头部对应的哈希值;判断所述哈希值对应的工作量难度是否满足所述预设工作量难度;当所述哈希值对应的工作量难度不满足所述预设工作量难度时,则对所述初始随机数进行调整;及根据调整后的所述初始随机数继续计算所述目标区块的头部对应的哈希值,直至所述哈希值对应的工作量难度满足所述预设工作量难度时,提取所述目标区块的头部中的调整后的所述初始随机数作为目标随机数。The computer device according to claim 9, wherein the processor obtains the target random number of the target block of the second transaction according to the workload proof mechanism implemented by the processor when the computer readable instruction is executed, including Obtaining a preset workload difficulty of the target block; acquiring an initial random number in the header of the target block, and calculating a hash value corresponding to the head of the target block according to the initial random number; Whether the workload difficulty corresponding to the hash value satisfies the preset workload difficulty; when the workload difficulty corresponding to the hash value does not satisfy the preset workload difficulty, the initial random number is performed And adjusting, according to the adjusted initial random number, a hash value corresponding to the head of the target block, until the workload corresponding to the hash value meets the preset workload difficulty, and extracting The adjusted initial random number in the header of the target block is taken as the target random number.
  11. 根据权利要求9或10所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时所实现的所述根据所述第一交易信息生成第一交易价值存储地址,包括:选取所述第一交易信息中目标区块相同的第一交易信息;根据所述目标区块相同的第一交易信息中的第二交易价值存储地址以及交易数据生成赎回脚本;及对所述赎回脚本进行计算得到第一交易价值存储地址。The computer device according to claim 9 or 10, wherein the generating the first transaction value storage address according to the first transaction information when the processor executes the computer readable instruction comprises: Selecting first transaction information in the first transaction information that is the same as the target block; generating a redemption script according to the second transaction value storage address and the transaction data in the first transaction information of the target block; and The redemption script calculates the first transaction value storage address.
  12. 根据权利要求11所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时所实现的所述通过第二交易将第一交易的价值转入到所述第一交易价值存储地址中,包括:获取所述交易终端对应的第三交易价值存储地址;通过第二交易从所述第三交易价值存储地址中获取与所述第一交易对应的价值,并将所获取到的价值转入到所述第一交易价值存储地址中。A computer apparatus according to claim 11, wherein said said first transaction value is transferred to said first transaction value by said second transaction by said processor executing said computer readable instructions The storage address includes: obtaining a third transaction value storage address corresponding to the transaction terminal; obtaining, by the second transaction, a value corresponding to the first transaction from the third transaction value storage address, and acquiring the value The value is transferred to the first transaction value storage address.
  13. 根据权利要求12所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时所实现的所述根据所述目标随机数和所述第一交易信息得到交易处理结果,包括:对所述目标随机数进行取模操作得到参考随机数;及根据所述参考随机数以及所述第一交易信息中的交易数据得到交易处理结果。The computer apparatus according to claim 12, wherein said processor, when said computer readable instructions are executed, said obtaining transaction processing results based on said target random number and said first transaction information, including And performing a modulo operation on the target random number to obtain a reference random number; and obtaining a transaction processing result according to the reference random number and the transaction data in the first transaction information.
  14. 根据权利要求13所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时所实现的所述从所述第一交易价值存储地址中获取到与所述交易处理结果对应的价值,并将所获取到的价值转入至对应交易终端的第二交易价值存储地址中,包括:接收所述交易终端的价值赎回请求;根据所述交易处理结果判断所述价值赎回请求对应的交易终端是否具有价值赎回权限;及当所述价值赎回请求对应的交易终端具有价值赎回权限时,则从所述第一交易价值存储地址中获取到与所述交易处理结果对应的价值,并将所获取到的价值转入至对应交易终端的第二交易价值存储地址中。The computer apparatus according to claim 13, wherein said processor is configured to execute said computer readable instructions to obtain said correspondence from said first transaction value storage address to said transaction processing result And the value obtained by transferring the obtained value into the second transaction value storage address of the corresponding transaction terminal, comprising: receiving a value redemption request of the transaction terminal; determining the value redemption according to the transaction processing result Determining whether the corresponding transaction terminal has the value redemption authority; and when the transaction terminal corresponding to the value redemption request has the value redemption authority, obtaining the transaction processing result from the first transaction value storage address Corresponding value, and transferring the obtained value into the second transaction value storage address of the corresponding transaction terminal.
  15. 一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,所述计算机 可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:接收各个交易终端发送的第一交易信息,并根据所述第一交易信息生成第一交易价值存储地址;通过第二交易将第一交易的价值转入到所述第一交易价值存储地址中;根据工作量证明机制获取所述第二交易的目标区块的目标随机数;根据所述目标随机数和所述第一交易信息得到交易处理结果;及从所述第一交易价值存储地址中获取到与所述交易处理结果对应的价值,并将所获取到的价值转入至对应交易终端的第二交易价值存储地址中,所述第一交易信息携带有所述第二交易价值存储地址。One or more non-transitory computer readable storage mediums storing computer readable instructions, when executed by one or more processors, cause the one or more processors to perform the following steps: Receiving first transaction information sent by each transaction terminal, and generating a first transaction value storage address according to the first transaction information; transferring the value of the first transaction to the first transaction value storage address by using the second transaction; Acquiring a target random number of the target block of the second transaction according to the workload proof mechanism; obtaining a transaction processing result according to the target random number and the first transaction information; and obtaining from the first transaction value storage address And the value corresponding to the transaction processing result is transferred to the second transaction value storage address of the corresponding transaction terminal, where the first transaction information carries the second transaction value storage address.
  16. 根据权利要求15所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时所实现的根据工作量证明机制获取所述第二交易的目标区块的目标随机数,包括:获取目标区块的预设工作量难度;获取所述目标区块的头部中的初始随机数,并根据所述初始随机数计算所述目标区块的头部对应的哈希值;判断所述哈希值对应的工作量难度是否满足所述预设工作量难度;当所述哈希值对应的工作量难度不满足所述预设工作量难度时,则对所述初始随机数进行调整;及根据调整后的所述初始随机数继续计算所述目标区块的头部对应的哈希值,直至所述哈希值对应的工作量难度满足所述预设工作量难度时,提取所述目标区块的头部中的调整后的所述初始随机数作为目标随机数。The storage medium of claim 15, wherein the computer readable instructions are executed by the processor to obtain a target random number of a target block of the second transaction according to a workload proof mechanism, The method includes: acquiring a preset workload difficulty of the target block; acquiring an initial random number in the header of the target block, and calculating a hash value corresponding to the head of the target block according to the initial random number; Determining whether the workload difficulty corresponding to the hash value satisfies the preset workload difficulty; when the workload difficulty corresponding to the hash value does not satisfy the preset workload difficulty, then the initial random number is And performing an adjustment; and continuing to calculate a hash value corresponding to the head of the target block according to the adjusted initial random number, until the workload difficulty corresponding to the hash value satisfies the preset workload difficulty The adjusted initial random number in the header of the target block is extracted as a target random number.
  17. 根据权利要求15或16所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时所实现的所述根据所述第一交易信息生成第一交易价值存储地址,包括:选取所述第一交易信息中目标区块相同的第一交易信息;根据所述目标区块相同的第一交易信息中的第二交易价值存储地址以及交易数据生成赎回脚本;及对所述赎回脚本进行计算得到第一交易价值存储地址。A storage medium according to claim 15 or claim 16, wherein said computer readable instructions are executed by said processor to generate said first transaction value storage address based on said first transaction information, including Selecting the first transaction information of the first transaction information in the first transaction information; generating a redemption script according to the second transaction value storage address and the transaction data in the same first transaction information of the target block; The redemption script calculates the first transaction value storage address.
  18. 根据权利要求17所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时所实现的所述通过第二交易将第一交易的价值转入到所述第一交易价值存储地址中,包括:获取所述交易终端对应的第三交易价值存储地址;通过第二交易从所述第三交易价值存储地址中获取与所述第一交易对应的价值,并将所获取到的价值转入到所述第一交易价值存储地址中。A storage medium according to claim 17, wherein said computer readable instructions are implemented by said processor to transfer said first transaction to said first transaction by said second transaction The value storage address includes: obtaining a third transaction value storage address corresponding to the transaction terminal; obtaining, by the second transaction, a value corresponding to the first transaction from the third transaction value storage address, and acquiring the value The value arrived is transferred to the first transaction value storage address.
  19. 根据权利要求18所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时所实现的所述根据所述目标随机数和所述第一交易信息得到交易处理结果,包括:对所述目标随机数进行取模操作得到参考随机数;及根据所述参考随机数以及所述第一交易信息中的交易数据得到交易处理结果。A storage medium according to claim 18, wherein said computer readable instructions are executed by said processor to obtain a transaction processing result based on said target random number and said first transaction information, The method includes: performing a modulo operation on the target random number to obtain a reference random number; and obtaining a transaction processing result according to the reference random number and the transaction data in the first transaction information.
  20. 根据权利要求19所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时所实现的所述从所述第一交易价值存储地址中获取到与所述交易处理结果对应的价值,并将所获取到的价值转入至对应交易终端的第二交易价值存储地址中,包括:接收所述交易终端的价值赎回请求;根据所述交易处理结果判断所述价值赎回请求对应的交易终端是否具有价值赎回权限;及当所述价值赎回请求对应的交易终端具有价值赎回权限时,则从所述第一交易价值存储地址中获取到与所述交易处理结果对应的价值,并将所 获取到的价值转入至对应交易终端的第二交易价值存储地址中。A storage medium according to claim 19, wherein said computer readable instructions are obtained from said first transaction value storage address and said transaction processing result implemented by said processor Corresponding value, and transferring the obtained value to the second transaction value storage address of the corresponding transaction terminal, comprising: receiving a value redemption request of the transaction terminal; determining the value redemption according to the transaction processing result Retrieving whether the corresponding transaction terminal has a value redemption authority; and when the transaction terminal corresponding to the value redemption request has a value redemption right, obtaining the transaction processing from the first transaction value storage address The result corresponds to the value, and the acquired value is transferred to the second transaction value storage address of the corresponding transaction terminal.
PCT/CN2018/096845 2018-02-07 2018-07-24 Transaction processing method and apparatus, and computer device and storage medium WO2019153660A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810123767.1 2018-02-07
CN201810123767.1A CN108399533B (en) 2018-02-07 2018-02-07 Transaction processing method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2019153660A1 true WO2019153660A1 (en) 2019-08-15

Family

ID=63096079

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/096845 WO2019153660A1 (en) 2018-02-07 2018-07-24 Transaction processing method and apparatus, and computer device and storage medium

Country Status (2)

Country Link
CN (1) CN108399533B (en)
WO (1) WO2019153660A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109995775B (en) * 2019-03-22 2021-06-01 杭州复杂美科技有限公司 Block chain verification code application method, equipment and storage medium
CN111464544B (en) * 2020-04-01 2022-08-23 中国联合网络通信集团有限公司 Block chain account book generation method and device
CN111586013B (en) * 2020-04-29 2022-02-22 数网金融有限公司 Network intrusion detection method, device, node terminal and storage medium
CN112504292B (en) * 2020-11-18 2023-03-28 广东中电绿能科技有限公司 Navigation method, navigation device and mobile terminal based on consumption information

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106452785A (en) * 2016-09-29 2017-02-22 财付通支付科技有限公司 Block chain network, branch node and block chain network application method
US9818136B1 (en) * 2003-02-05 2017-11-14 Steven M. Hoffberg System and method for determining contingent relevance
CN108305074A (en) * 2018-01-30 2018-07-20 深圳壹账通智能科技有限公司 Transaction processing method, device, computer equipment and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10340038B2 (en) * 2014-05-13 2019-07-02 Nant Holdings Ip, Llc Healthcare transaction validation via blockchain, systems and methods
CN106251144A (en) * 2015-06-05 2016-12-21 地气股份有限公司 Electronic money management method and electronic money node apparatus
CN105488722B (en) * 2015-11-30 2019-11-26 布比(北京)网络技术有限公司 Asset data processing method and processing device based on derivative chain
CN106022917A (en) * 2016-05-08 2016-10-12 杭州复杂美科技有限公司 Block chain matching exchange scheme
CN106779704A (en) * 2016-12-06 2017-05-31 杭州趣链科技有限公司 A kind of block chain anonymous deal method based on ring signatures

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9818136B1 (en) * 2003-02-05 2017-11-14 Steven M. Hoffberg System and method for determining contingent relevance
CN106452785A (en) * 2016-09-29 2017-02-22 财付通支付科技有限公司 Block chain network, branch node and block chain network application method
CN108305074A (en) * 2018-01-30 2018-07-20 深圳壹账通智能科技有限公司 Transaction processing method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN108399533A (en) 2018-08-14
CN108399533B (en) 2020-08-18

Similar Documents

Publication Publication Date Title
KR102215773B1 (en) Blockchain data protection based on account note model with zero-knowledge proof
US11501533B2 (en) Media authentication using distributed ledger
WO2019153660A1 (en) Transaction processing method and apparatus, and computer device and storage medium
US11238447B2 (en) Blockchain transactions with ring signatures
CN110945550B (en) Processing and storing blockchain data in a trusted execution environment
CN108985100B (en) Block chain-based element security certification method, device, equipment and medium
EP3669521A1 (en) Method and system for publicly verifiable proofs of retrievability in blockchains
US11797985B2 (en) Value transfer method, apparatus, and system
US20220311607A1 (en) Key generation method and apparatus, device, and medium
EP4300323A1 (en) Data processing method and apparatus for blockchain network, computer device, computer readable storage medium, and computer program product
CN111095218B (en) Method, system and device for storing shared block chain data based on error correction coding
CN111461691B (en) Flow statistical system, method and device based on block chain
CN111818185B (en) Method and device for starting intelligent contract, electronic equipment and storage medium
CA3037833A1 (en) System and method for information protection
CN109800248A (en) Digital content for block chain network is traced to the source and recording method, storage medium, calculating equipment
WO2020210979A1 (en) Blockchain-network-based joint learning method and joint learning device
WO2020019792A1 (en) Block release method and apparatus, and electronic device
CN111033491A (en) Storing shared blockchain data based on error correction coding
CN111178840A (en) Service processing method, device, system, electronic equipment and storage medium
US20220217004A1 (en) Systems and methods for non-parallelised mining on a proof-of-work blockchain network
TWI608434B (en) Decentralized electronic transaction record method and system with traceability verification mechanism
CN116896564B (en) Block generation method and device based on block chain network and computer equipment
WO2023207529A1 (en) Data processing method and apparatus, device, medium, and product
KR20200095203A (en) Method and system for managing electronic document
WO2020107223A1 (en) Multi-chain information management method and apparatus, storage medium, and blockchain identity parser

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: 18904872

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 1205A DATED 04.12.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18904872

Country of ref document: EP

Kind code of ref document: A1