CN111210345B - Signature method and device based on block chain network transaction and terminal equipment - Google Patents
Signature method and device based on block chain network transaction and terminal equipment Download PDFInfo
- Publication number
- CN111210345B CN111210345B CN201811390264.7A CN201811390264A CN111210345B CN 111210345 B CN111210345 B CN 111210345B CN 201811390264 A CN201811390264 A CN 201811390264A CN 111210345 B CN111210345 B CN 111210345B
- Authority
- CN
- China
- Prior art keywords
- input
- transaction
- message
- output
- transaction message
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 65
- 238000004590 computer program Methods 0.000 claims description 26
- 238000004364 calculation method Methods 0.000 claims description 13
- 238000012546 transfer Methods 0.000 description 19
- 230000006870 function Effects 0.000 description 11
- 238000010586 diagram Methods 0.000 description 10
- 230000008569 process Effects 0.000 description 8
- 238000004891 communication Methods 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000004422 calculation algorithm Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000003780 insertion Methods 0.000 description 1
- 230000037431 insertion Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012552 review Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Payment architectures, schemes or protocols
- G06Q20/38—Payment protocols; Details thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Payment architectures, schemes or protocols
- G06Q20/38—Payment protocols; Details thereof
- G06Q20/382—Payment protocols; Details thereof insuring higher security of transaction
- G06Q20/3825—Use of electronic signatures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/04—Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
Landscapes
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Engineering & Computer Science (AREA)
- Finance (AREA)
- Physics & Mathematics (AREA)
- Strategic Management (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Development Economics (AREA)
- Economics (AREA)
- Marketing (AREA)
- Technology Law (AREA)
- Computer Security & Cryptography (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
Abstract
本申请提供了一种基于区块链网络交易的签名方法、装置及终端设备,所述签名方法包括:在本次交易报文中,获取本次交易所需的各个input分别对应的input字段下的TxOutHash值,所述本次交易报文为本次交易的交易报文;获取本次交易所需的各个input分别对应的前次交易报文;计算每个前次交易报文的哈希Hash值,得到每个input对应的Hash值;判断计算得到的每个input对应的Hash值与该input对应的input字段下的TxOutHash值是否一致;若计算得到的每个input对应的Hash值与该input对应的input字段下的TxOutHash值均一致,则对所述本次交易报文进行签名。本申请所提供的签名方法能够在一定程度更好的保障用户的资金安全。
This application provides a signature method, device, and terminal equipment based on blockchain network transactions. The signature method includes: in this transaction message, obtain the input fields corresponding to each input required for this transaction. The TxOutHash value of the current transaction message is the transaction message of this transaction; obtain the previous transaction message corresponding to each input required for this transaction; calculate the hash Hash of each previous transaction message Value, get the Hash value corresponding to each input; judge whether the calculated Hash value corresponding to each input is consistent with the TxOutHash value under the input field corresponding to the input; if the calculated Hash value corresponding to each input is consistent with the input If the TxOutHash values under the corresponding input fields are consistent, then the transaction message is signed. The signature method provided by this application can better protect the user's financial security to a certain extent.
Description
技术领域technical field
本申请属于网络交易技术领域,尤其涉及一种基于区块链网络交易的签名方法、签名装置、终端设备及计算机可读存储介质。The present application belongs to the technical field of network transactions, and in particular relates to a signature method, signature device, terminal equipment and computer-readable storage medium based on block chain network transactions.
背景技术Background technique
随着区块链技术的发展,各种电子货币(比如比特币、莱特币、以太币等)在区块链网络中大量流通。With the development of blockchain technology, various electronic currencies (such as Bitcoin, Litecoin, Ethereum, etc.) are widely circulated in the blockchain network.
对于目前的区块链网络来说,当用户在区块链网络中执行转账操作时,需要缴纳一定的手续费,手续费的计算公式为:各个交易输入的金额大小之和-各个交易输出的金额大小之和。例如,对于以比特币为交易币种的区块链网络来说,当用户A向用户B转账时,用户A使用到的各个交易输入的金额大小分别为2比特币和5比特币,用户A向用户B转出了1比特币,区块链网络找零5.5比特币至用户A(虽然该5.5比特币返回至用户A,但依然算本次交易的交易输出),则在本次交易中,用户A需要支付的手续费为0.5比特币。For the current blockchain network, when users perform transfer operations in the blockchain network, they need to pay a certain handling fee. The calculation formula of the handling fee is: the sum of the amount of each transaction input - the amount of each transaction output The sum of the amounts. For example, for a blockchain network that uses bitcoin as the transaction currency, when user A transfers money to user B, the amount of each transaction input used by user A is 2 bitcoins and 5 bitcoins respectively, and
由此可见,当用户在转账时,若被非法提供多个交易输入,则会造成用户需缴纳更多的手续费,因此,当用户在区块链网络中执行转账操作时,如何更好的保障用户的资金安全是目前亟待解决的技术问题。It can be seen that when the user is transferring money, if multiple transaction inputs are illegally provided, the user will have to pay more fees. Therefore, when the user performs the transfer operation in the blockchain network, how to better Ensuring the safety of users' funds is a technical problem that needs to be solved urgently.
发明内容Contents of the invention
有鉴于此,本申请提供了一种基于区块链网络交易的签名方法、签名装置、终端设备及计算机可读存储介质,可以当用户在区块链网络中执行转账操作时,更好的保障用户的资金安全。In view of this, this application provides a signature method, signature device, terminal equipment and computer-readable storage medium based on blockchain network transactions, which can better guarantee User's funds are safe.
本申请第一方面提供了一种基于区块链网络交易的签名方法,上述区块链网络的交易报文中包括有各个交易输入input分别对应的input字段以及各个交易输出output分别对应的output字段,每个input字段中均包括有发送输出哈希TxOutHash值,每个合法的input均对应有前次交易报文,每个合法的input对应的前次交易报文为存在有一output字段,该output字段对应的output为该合法的input,每个合法的input对应的TxOutHash值与该合法的input对应的前次交易报文的哈希Hash值相同;The first aspect of the present application provides a signature method based on a blockchain network transaction. The above-mentioned blockchain network transaction message includes input fields corresponding to each transaction input input and output fields corresponding to each transaction output output. , each input field includes the sending output hash TxOutHash value, each legal input corresponds to the previous transaction message, and the previous transaction message corresponding to each legal input has an output field, the output The output corresponding to the field is the legal input, and the TxOutHash value corresponding to each legal input is the same as the hash Hash value of the previous transaction message corresponding to the legal input;
上述签名方法包括:The above signature methods include:
在本次交易报文中,获取本次交易所需的各个input分别对应的input字段下的TxOutHash值,上述本次交易报文为本次交易的交易报文;In this transaction message, obtain the TxOutHash value under the input field corresponding to each input required for this transaction, and the above-mentioned current transaction message is the transaction message of this transaction;
获取本次交易所需的各个input分别对应的前次交易报文;Obtain the previous transaction message corresponding to each input required for this transaction;
计算每个前次交易报文的哈希Hash值,得到每个input对应的Hash值;Calculate the Hash value of each previous transaction message to obtain the Hash value corresponding to each input;
判断计算得到的每个input对应的Hash值与该input对应的input字段下的TxOutHash值是否一致;Determine whether the calculated Hash value corresponding to each input is consistent with the TxOutHash value under the input field corresponding to the input;
若计算得到的每个input对应的Hash值与该input对应的input字段下的TxOutHash值均一致,则对上述本次交易报文进行签名。If the calculated Hash value corresponding to each input is consistent with the TxOutHash value under the input field corresponding to the input, the above-mentioned transaction message is signed.
本申请第二方面提供了一种基于区块链网络交易的签名装置,上述区块链网络的交易报文中包括有各个交易输入input分别对应的input字段以及各个交易输出output分别对应的output字段,每个input字段中均包括有发送输出哈希TxOutHash值,每个合法的input均对应有前次交易报文,每个合法的input对应的前次交易报文为存在有一output字段,该output字段对应的output为该合法的input,每个合法的input对应的TxOutHash值与该合法的input对应的前次交易报文的哈希Hash值相同;The second aspect of the present application provides a signature device based on a blockchain network transaction. The transaction message of the blockchain network includes input fields corresponding to each transaction input input and output fields corresponding to each transaction output output. , each input field includes the sending output hash TxOutHash value, each legal input corresponds to the previous transaction message, and the previous transaction message corresponding to each legal input has an output field, the output The output corresponding to the field is the legal input, and the TxOutHash value corresponding to each legal input is the same as the hash Hash value of the previous transaction message corresponding to the legal input;
上述签名装置包括:The above signature devices include:
TxOutHash获取模块,用于在本次交易报文中,获取本次交易所需的各个input分别对应的input字段下的TxOutHash值,上述本次交易报文为本次交易的交易报文;The TxOutHash acquisition module is used to obtain the TxOutHash value under the input field corresponding to each input required for this transaction in the current transaction message, and the above-mentioned current transaction message is the transaction message of this transaction;
前次报文获取模块,用于获取本次交易所需的各个input分别对应的前次交易报文;The previous message acquisition module is used to obtain the previous transaction messages corresponding to each input required for this transaction;
哈希值计算模块,用于计算每个前次交易报文的哈希Hash值,得到每个input对应的Hash值;Hash value calculation module, used to calculate the hash Hash value of each previous transaction message, and obtain the Hash value corresponding to each input;
判断模块,用于判断计算得到的每个input对应的Hash值与该input对应的input字段下的TxOutHash值是否一致;Judgment module, used to judge whether the Hash value corresponding to each input calculated is consistent with the TxOutHash value under the input field corresponding to the input;
签名模块,用于若计算得到的每个input对应的Hash值与该input对应的input字段下的TxOutHash值均一致,则对上述本次交易报文进行签名。The signature module is used to sign the above-mentioned transaction message if the calculated Hash value corresponding to each input is consistent with the TxOutHash value under the input field corresponding to the input.
本申请第三方面提供了一种终端设备,包括存储器、处理器以及存储在上述存储器中并可在上述处理器上运行的计算机程序,上述处理器执行上述计算机程序时实现如上述第一方面方法的步骤。The third aspect of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and operable on the processor. When the processor executes the computer program, the method of the first aspect above is implemented. A step of.
本申请第四方面提供了一种计算机可读存储介质,上述计算机可读存储介质存储有计算机程序,上述计算机程序被处理器执行时实现如上述第一方面方法的步骤。A fourth aspect of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned method in the first aspect are implemented.
本申请第五方面提供了一种计算机程序产品,上述计算机程序产品包括计算机程序,上述计算机程序被一个或多个处理器执行时实现如上述第一方面方法的步骤。A fifth aspect of the present application provides a computer program product, the computer program product includes a computer program, and when the computer program is executed by one or more processors, the steps of the method in the first aspect above are implemented.
由上可见,本申请提供了一种基于区块链网络交易的签名方法,该区块链网络的交易报文中,每个合法的input均对应有前次交易报文,每个合法的input对应的前次交易报文的Hash值与该input对应的TxOutHash值相同,本申请所提供的签名方法通过计算本次交易报文中某个input对应的TxOutHash值与该input对应的前次交易报文的Hash值是否相同,来确定该input是否合法,并遍历本次交易报文的所有input,只有当判断出本次交易报文的所有input均合法时,才对本次交易报文进行签名。众所周知,当用户需要在区块链网络中进行转账操作时,该用户所在的区块链节点需要发送签名后的交易报文至区块链交易平台,签名操作用于指示该交易报文为合法报文,区块链交易平台只有在接收到合法报文时,才会执行转账操作。因此,本申请所提供的技术方案可以判断本次交易的各个交易输入是否合法,能够在一定程度上检查出本次交易报文中所嵌入的非法交易输入,只有当判断出所有交易输入均合法时,才会执行签名操作,即才认定本次交易报文合法,进而使得区块链交易平台执行本次转账操作,能够在一定程度上避免在用户转账时,由于交易报文中被非法嵌入多个交易输入,而造成用户需缴纳更多手续费的问题,因此,本申请所提供的签名方法能够在一定程度更好的保障用户的资金安全。It can be seen from the above that this application provides a signature method based on blockchain network transactions. In the transaction messages of the blockchain network, each legal input corresponds to the previous transaction message, and each legal input The Hash value of the corresponding previous transaction message is the same as the TxOutHash value corresponding to the input. The signature method provided by this application calculates the TxOutHash value corresponding to an input in this transaction message and the previous transaction report corresponding to the input. Whether the Hash value of the text is the same to determine whether the input is legal, and traverse all the inputs of the transaction message, only when it is judged that all the inputs of the transaction message are legal, the transaction message is signed . As we all know, when a user needs to perform a transfer operation in the blockchain network, the blockchain node where the user is located needs to send a signed transaction message to the blockchain trading platform, and the signature operation is used to indicate that the transaction message is legal message, the blockchain trading platform will only execute the transfer operation when it receives a legal message. Therefore, the technical solution provided by this application can judge whether each transaction input of this transaction is legal, and can check out the illegal transaction input embedded in this transaction message to a certain extent. Only when it is judged that all transaction inputs are legal Only then will the signature operation be performed, that is, the transaction message is determined to be legal, which in turn enables the blockchain trading platform to perform this transfer operation, which can to a certain extent avoid when the user transfers money due to illegally embedded transactions in the transaction message. Multiple transaction inputs cause the user to pay more fees. Therefore, the signature method provided by this application can better protect the user's fund security to a certain extent.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其它的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the accompanying drawings that need to be used in the descriptions of the embodiments or the prior art will be briefly introduced below. Obviously, the accompanying drawings in the following description are only for the present application For some embodiments, those skilled in the art can also obtain other drawings according to these drawings without paying creative efforts.
图1是本申请提供的基于区块链网络交易的签名方法的应用场景示意图;Figure 1 is a schematic diagram of the application scenario of the signature method based on blockchain network transactions provided by this application;
图2是基于区块链网络进行交易时的常用交易报文格式的示意图;Figure 2 is a schematic diagram of the commonly used transaction message format when conducting transactions based on the blockchain network;
图3是本申请实施例一提供的一种基于区块链网络交易的签名方法的实现流程示意图;Fig. 3 is a schematic diagram of the implementation flow of a signature method based on blockchain network transactions provided by
图4是本申请实施例一提供的判断各个交易输入是否合法的示意图;Fig. 4 is a schematic diagram of judging whether each transaction input is legal or not provided by
图5是本申请实施例二提供的另一种基于区块链网络交易的签名方法的实现流程示意图;Fig. 5 is a schematic diagram of the implementation flow of another signature method based on blockchain network transactions provided by
图6是本申请实施例二提供的手续费计算过程示意图;Figure 6 is a schematic diagram of the fee calculation process provided by
图7是本申请实施例三提供的一种基于区块链网络交易的签名装置的结构示意图;FIG. 7 is a schematic structural diagram of a signature device based on blockchain network transactions provided in
图8是本申请实施例四提供的终端设备的结构示意图。FIG. 8 is a schematic structural diagram of a terminal device provided in
具体实施方式Detailed ways
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。In the following description, specific details such as specific system structures and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
本申请所提供的基于区块链网络交易的签名方法应用于区块链网络中的区块链节点。附图1为本申请提供的基于区块链网络交易的签名方法的应用场景示意图,该应用场景中包括区块链节点1以及区块链交易平台2,当区块链节点1要发起转账交易时,会首先生成一交易报文3,通常情况下,该交易报文3中包括各个收款方的账号以及向各个收款方的账号的转账金额大小,比如,若区块链节点1向区块链节点X以及区块链节点Y转账时,该交易报文3中包括区块链节点X的账号x、向账号x的转账金额、区块链节点Y的账号y以及向账号y的转账金额。区块链节点1将该交易报文3发送至区块链交易平台2,区块链交易平台2在判断出该交易报文3合法时,会协助区块链节点1完成转账交易。The signature method based on blockchain network transactions provided by this application is applied to blockchain nodes in the blockchain network. Accompanying
此外,对于目前的区块链网络,当用户在区块链网络中执行转账操作时,通常需要缴纳一定的手续费。如图1所示,位于区块链节点1处的用户A发起转账操作时,通常是需要缴纳一定的手续费的,该手续费的金额大小与该区块链节点1在转账时所使用的各个交易输入input的金额大小以及各个交易输出output的金额大小有关,上述区块链交易平台2在接收到交易报文3,并判断出该交易报文3合法之后,会收取一定的手续费,对于以比特币为交易币种的区块链网络来说,该手续费会奖励给矿工。In addition, for the current blockchain network, when users perform transfer operations in the blockchain network, they usually need to pay a certain fee. As shown in Figure 1, when user A at
对于不同类型的区块链网络来说(比如,以比特币为交易币种的区块链网络、以以太币为交易币种的区块链网络、以莱特币为交易币种的区块链网络等等),交易报文的格式通常也不同。下面利用附图2,来阐述一种较为常用的交易报文格式,以比特币为交易币种的区块链网络就采用如图2所示的交易报文格式。For different types of blockchain networks (for example, the blockchain network with Bitcoin as the transaction currency, the blockchain network with Ethereum as the transaction currency, and the blockchain network with Litecoin as the transaction currency) network, etc.), the format of the transaction message is usually different. The following uses Figure 2 to illustrate a more commonly used transaction message format. The blockchain network with Bitcoin as the transaction currency adopts the transaction message format shown in Figure 2.
如图2所示,交易报文中包括有各个交易输入input所对应的input字段以及各个交易输出output所对应的output字段,该交易报文中还包括Input-Counter字段和Output-Counter字段,Input-Counter字段的大小用于指示当前交易报文中input字段的个数,Output-Counter字段的大小用于指示当前交易报文中output字段的个数,在附图2所示的例子中,Input-Counter和Output-Counter的大小应均为2。As shown in Figure 2, the transaction message includes an input field corresponding to each transaction input input and an output field corresponding to each transaction output output. The transaction message also includes an Input-Counter field and an Output-Counter field. Input -The size of the Counter field is used to indicate the number of input fields in the current transaction message, and the size of the Output-Counter field is used to indicate the number of output fields in the current transaction message. In the example shown in Figure 2, Input -Counter and Output-Counter should both have a size of 2.
如图2所示,对于每个input字段,均包括有发送输出哈希TxOutHash值、发送输出索引TxOutIndex值、脚本长度ScriptLen值以及签名公钥Sign&PubKey值。其中,对于每个input字段下的TxOutHash值为该input字段对应的input的前次交易报文的哈希Hash值,如图2所示,第一个input字段中的TxOutHash值应为交易输入input1对应的前次交易报文I的Hash值,其中,每个input对应的前次交易报文为存在有一output字段,该output字段对应的output为该input的交易报文(举例来说,对于交易输入input1,若该input1所对应的前次交易报文为前次交易报文I,则该前次交易报文I中包括有一output字段,该output字段对应的交易输出即为该input1);每个input字段下的TxOutIndex值用于指示对应的input具体对应前次交易报文中的哪一个output字段,比如,附图2中的交易输入input1对应的前次交易报文为前次交易报文I,假设该前次交易报文I中包括两个output字段,分别为outputA字段和outputB字段,若该outputA字段对应的交易输出为input1,则该input1所对应的前次交易报文I的output字段具体为outputA字段,则在本次交易报文中,可通过该input1对应的input字段中的TxOutIndex值,得到该input1具体对应前次交易报文I的outputA字段;每个input字段下的ScriptLen值用于指示该input字段中Sign&PubKey值的字段长度;每个input字段下的Sign&Pubkey为本次交易的交易签名和交易公钥。As shown in Figure 2, for each input field, it includes the sending output hash TxOutHash value, sending output index TxOutIndex value, script length ScriptLen value and signature public key Sign&PubKey value. Among them, the TxOutHash value under each input field is the hash Hash value of the previous transaction message of the input corresponding to the input field, as shown in Figure 2, the TxOutHash value in the first input field should be the transaction input input1 The Hash value of the corresponding previous transaction message I, wherein, the previous transaction message corresponding to each input has an output field, and the output corresponding to the output field is the transaction message of the input (for example, for the transaction Input input1, if the previous transaction message corresponding to the input1 is the previous transaction message I, then the previous transaction message I includes an output field, and the transaction output corresponding to the output field is the input1); The TxOutIndex value under each input field is used to indicate which output field in the previous transaction message the corresponding input corresponds to. For example, the previous transaction message corresponding to the transaction input input1 in Figure 2 is the previous transaction message I, assuming that the previous transaction message I includes two output fields, namely the outputA field and the outputB field, if the transaction output corresponding to the outputA field is input1, then the output of the previous transaction message I corresponding to the input1 The field is specifically the outputA field, so in this transaction message, the outputA field of the input1 corresponding to the previous transaction message I can be obtained through the TxOutIndex value in the input field corresponding to the input1; ScriptLen under each input field The value is used to indicate the field length of the Sign&PubKey value in the input field; Sign&Pubkey under each input field is the transaction signature and transaction public key of this transaction.
如图2所示,对于每个output字段,均包括有金额Value值、脚本长度ScriptLen值以及PKScript值。每个output字段下的Value值用于指示对应的output的金额大小;每个output字段下的ScriptLen值用于指示该output字段中PKScript值的字段长度;每个output字段下的PKScript值用于指示收款方的账户公钥或账户地址(该账号地址即为收款方账号)。若output字段下的PKScript用于指示收款方的账户公钥,则区块链交易平台可通过该账户公钥计算出收款方的账户地址,从而进行转账交易。As shown in FIG. 2 , each output field includes an amount Value value, a script length ScriptLen value, and a PKScript value. The Value value under each output field is used to indicate the amount of the corresponding output; the ScriptLen value under each output field is used to indicate the field length of the PKScript value in the output field; the PKScript value under each output field is used to indicate The payee's account public key or account address (the account address is the payee's account number). If the PKScript under the output field is used to indicate the account public key of the payee, the blockchain trading platform can calculate the account address of the payee through the account public key, so as to carry out the transfer transaction.
本申请所提供的基于区块链网络交易的签名方法可以应用在使用如图2所示的交易报文格式的区块链网络中,比如可以应用在以比特币为币种的区块链网络中。但是,请本领域技术人员注意,本申请所提供的基于区块链网络交易的签名方法并非必须应用在使用如图2所示的交易报文格式的区块链网络中,具体可参见本申请实施例一以及实施例二的描述。The signature method based on blockchain network transactions provided by this application can be applied to blockchain networks using the transaction message format shown in Figure 2, for example, it can be applied to blockchain networks using Bitcoin as currency middle. However, those skilled in the art should note that the signature method based on blockchain network transactions provided by this application does not have to be applied to blockchain networks using the transaction message format shown in Figure 2. For details, please refer to this application Description of
实施例一Embodiment one
下面对本申请实施例一提供的一种基于区块链网络交易的签名方法进行描述,该签名方法应用在如下区块链网络中:The following describes a signature method based on blockchain network transactions provided by
该区块链网络的交易报文中包括有各个交易输入input分别对应的input字段以及各个交易输出output分别对应的output字段,每个input字段中均包括TxOutHash值,每个合法的input均对应有前次交易报文,每个合法的input对应的前次交易报文为存在有一output字段,该output字段对应的output为该合法的input,每个合法的input对应的TxOutHash值与该合法的input对应的前次交易报文的哈希Hash值相同(这里之所以将input限定为“合法”的主要原因是:当交易报文中嵌入非法的input对应的input字段时,该非法的input不一定对应有前次交易报文,即便对应有前次交易报文,该非法的input对应的TxOutHash值也与其前次交易报文的Hash值不一定相同)。The transaction message of the blockchain network includes the input field corresponding to each transaction input input and the output field corresponding to each transaction output output. Each input field includes a TxOutHash value, and each legal input corresponds to a In the previous transaction message, the previous transaction message corresponding to each legal input has an output field, and the output corresponding to the output field is the legal input, and the TxOutHash value corresponding to each legal input is the same as the legal input The hash value of the corresponding previous transaction message is the same (the main reason why the input is limited to "legal" here is: when the input field corresponding to the illegal input is embedded in the transaction message, the illegal input is not necessarily Corresponding to a previous transaction message, even if there is a previous transaction message, the TxOutHash value corresponding to the illegal input is not necessarily the same as the Hash value of the previous transaction message).
申请实施例一所限定的区块链网络的交易报文格式具体可参见附图2以及相应的文字描述部分。但是,请本领域技术人员注意,本申请实施例一提供的签名方法所应用的区块链网络的报文格式中,不一定包含有Input-Counter字段、Output-Counter字段、input字段下也不一定包含ScriptLen值、output字段下也不一定有Value值以及ScriptLen值等。此外,由于本申请实施例一所提供的签名方法需要对本次交易报文进行签名,因此,可以与图2相同,交易报文中每个input字段下可以包括Sign&PubKey,但是请本领域技术人员注意,本申请实施例中对本次交易报文进行签名所对应的字段并不一定与图2完全相同。For the transaction message format of the blockchain network defined in
本申请实施例一提供的签名方法如图3所示,包括:The signature method provided in
在步骤S101中,在本次交易报文中,获取本次交易所需的各个input分别对应的input字段下的TxOutHash值,上述本次交易报文为本次交易的交易报文;In step S101, in the current transaction message, obtain the TxOutHash value under the input field corresponding to each input required for the current transaction, and the above-mentioned current transaction message is the transaction message of this transaction;
在本次交易中,为了避免本次交易报文中非法插入多个input而导致用户需支付较多的手续费,需要首先执行本申请所提供的步骤S101-S105,在判断出本次交易报文中所需的各个input均合法时,才对本次交易报文进行签名。In this transaction, in order to avoid the illegal insertion of multiple inputs in this transaction message and cause the user to pay more fees, it is necessary to first execute the steps S101-S105 provided in this application, and after judging the transaction report Only when all the inputs required in the text are legal can the transaction message be signed.
为了详细描述本申请实施例一所述的技术方案,下面利用附图4来说明。In order to describe the technical solution described in
如图4所示,本次交易报文中包括3个input字段,分别为input字段1、input字段2以及input字段3,则在该步骤S101中,从本次交易报文中读取input字段1中的TxOutHash值、input字段2中的TxOutHash值以及input字段3中的TxOutHash值。As shown in Figure 4, this transaction message includes 3 input fields, namely input
此外,在本申请实施例中,该步骤S101可以包括:判断上述本次交易报文是否符合预设报文格式,若符合,则再在该本次交易报文中,获取本次交易所需的各个input分别对应的input字段下的TxOutHash值。也即是,首先检查本次交易报文是否符合预设报文格式,比如,查看本次交易报文是否包括预设的各个字段,以及各个字段的长度是否符合预设长度等,只有在本次交易报文符合预设报文格式后,再来读取各个input字段下的TxOutHash值。In addition, in the embodiment of the present application, the step S101 may include: judging whether the above-mentioned current transaction message conforms to the preset message format, and if yes, then in the current transaction message, obtain the The TxOutHash value under the input field corresponding to each input of . That is to say, first check whether the transaction message conforms to the preset message format, for example, check whether the transaction message includes the preset fields, and whether the length of each field conforms to the preset length, etc. After the transaction message conforms to the preset message format, read the TxOutHash value under each input field.
在步骤S102中,获取本次交易所需的各个input分别对应的前次交易报文;In step S102, obtain the previous transaction message corresponding to each input required for this transaction;
在本申请实施例中,前次交易报文可以通过与预设服务器通信获得,该步骤S102可以包括以下步骤S1021-S1022:In the embodiment of this application, the previous transaction message can be obtained by communicating with the preset server, and this step S102 can include the following steps S1021-S1022:
在步骤S1021中,获取本次交易所需的各个input的标识信息,将各个input的标识信息发送至预设服务器,以指示该预设服务器执行查找各个input对应的前次交易报文的操作;In step S1021, the identification information of each input required for this transaction is obtained, and the identification information of each input is sent to the default server to instruct the default server to perform the operation of searching for the previous transaction message corresponding to each input;
其中,每个input的标识信息可以为该input的入账时间、入账金额、入账账号和/或发款账号等等,比如,对于某一inputX来说,该inputX的标识信息可以包括:2018年10月30日下午5:10入账、5比特币、入款账号为X、发款账号为Y。上述预设服务器在接收到各个input的标识信息之后,就根据各个input的标识信息,查找各个input对应的前次交易报文,比如,对于上述inputX来说,该预设服务器就查找对应有一交易输出outputX的交易报文,该outputX为2018年10月30日下午5:10转出、金额大小5比特币、收款账号为X且发款账号为Y的交易输出,对应有该outputX的交易报文即为inputX的前次交易报文。Wherein, the identification information of each input can be the entry time, entry amount, entry account number and/or payment account number of the input, etc. For example, for a certain inputX, the identification information of the inputX can include: 2018 October At 5:10 p.m. on March 30, the account is credited, 5 bitcoins, the deposit account is X, and the sending account is Y. After receiving the identification information of each input, the above-mentioned preset server searches for the previous transaction message corresponding to each input according to the identification information of each input. For example, for the above-mentioned inputX, the preset server searches for a corresponding transaction Output the transaction message of outputX, the outputX is the transaction output transferred out at 5:10 pm on October 30, 2018, the amount is 5 bitcoins, the receiving account is X, and the sending account is Y, corresponding to the transaction with this outputX The message is the previous transaction message of inputX.
在步骤S1022中,接收上述预设服务器发送的各个input分别对应的前次交易报文;In step S1022, receiving the previous transaction message corresponding to each input sent by the preset server;
此外,该步骤S1022可以包括:在将各个input的标识信息发送至上述预设服务器之后,判断在预设时间段内是否接收到上述预设服务器返回的各个input分别对应的前次交易报文;若接收到各个input分别对应的前次交易报文,则执行后续步骤S103;若未接收到各个input分别对应的前次交易报文,则认为本次交易中存在非法的input,此时,可以输出用于提示用户本次交易不合法的提示信息,提醒用户是否对本次交易报文进行签名;或者,可以输出用于提示用户本次交易不合法的提示信息,并终止对本次交易报文的签名操作;或者,可以直接终止本次签名,或者,还可以直接终止本次交易,即不将本次交易报文发送至区块链交易平台。In addition, the step S1022 may include: after sending the identification information of each input to the preset server, judging whether the previous transaction message corresponding to each input returned by the preset server is received within a preset time period; If the previous transaction message corresponding to each input is received, the subsequent step S103 is performed; if the previous transaction message corresponding to each input is not received, it is considered that there is an illegal input in this transaction. At this time, you can Output a prompt message to remind the user that this transaction is illegal, and remind the user whether to sign the transaction message; or, output a prompt message to remind the user that the transaction is illegal, and terminate the transaction report The signature operation of the text; or, the signature can be terminated directly, or the transaction can be terminated directly, that is, the transaction message of this transaction will not be sent to the blockchain trading platform.
如图4所示,本次交易报文的input1对应的前次交易报文为前次交易报文A,input2对应的前次交易报文为前次交易报文B,input3对应的前次交易报文为前次交易报文C。As shown in Figure 4, the previous transaction message corresponding to input1 of this transaction message is the previous transaction message A, the previous transaction message corresponding to input2 is the previous transaction message B, and the previous transaction message corresponding to input3 is The message is the previous transaction message C.
在步骤S103中,计算每个前次交易报文的Hash值,得到每个input对应的Hash值;In step S103, calculate the Hash value of each previous transaction message, and obtain the Hash value corresponding to each input;
在本申请实施例中,对报文的哈希值计算方法可以采用目前常用的方法,比如SHA256算法等,本申请对哈希值计算方法不作限定。如图4所示,在该步骤S103中,需要计算前次交易报文A的Hash值(该前次交易报文A的Hash值即为input1对应的Hash值)、前次交易报文B的Hash值(该前次交易报文B的Hash值即为input2对应的Hash值)以及前次交易报文C的Hash值(该前次交易报文C的Hash值即为input3对应的Hash值)。In the embodiment of the present application, the method for calculating the hash value of the message may adopt a currently commonly used method, such as the SHA256 algorithm, and the present application does not limit the method for calculating the hash value. As shown in Figure 4, in this step S103, it is necessary to calculate the Hash value of the previous transaction message A (the Hash value of the previous transaction message A is the Hash value corresponding to input1), the previous transaction message B Hash value (the Hash value of the previous transaction message B is the Hash value corresponding to input2) and the Hash value of the previous transaction message C (the Hash value of the previous transaction message C is the Hash value corresponding to input3) .
此外,在该步骤S103之前,还可以包括步骤:判断是否获取到本次交易所需的各个input分别对应的前次交易报文。与步骤S102所述的相同,若未接收到各个input分别对应的前次交易报文,则认为本次交易中存在非法的input,此时,可以输出用于提示用户本次交易不合法的提示信息,提醒用户是否对本次交易报文进行签名;或者,可以输出用于提示用户本次交易不合法的提示信息,并终止对本次交易报文的签名操作;或者,可以直接终止本次签名;或者,还可以直接终止本次交易,即不将本次交易报文发送至区块链交易平台。相应地,该步骤S103具体为:若获取本次交易所需的各个input分别对应的前次交易报文,则计算每个前次交易报文的哈希Hash值,得到每个input对应的Hash值。In addition, before the step S103, a step may also be included: judging whether the previous transaction message corresponding to each input required for the current transaction has been obtained. The same as described in step S102, if the previous transaction message corresponding to each input is not received, it is considered that there is an illegal input in this transaction, and at this time, a prompt for prompting the user that this transaction is illegal can be output information to remind the user whether to sign the transaction message; or, it can output a prompt message to remind the user that the transaction is illegal, and terminate the signing operation of the transaction message; or, it can directly terminate the transaction signature; or, the transaction can be terminated directly, that is, the transaction message will not be sent to the blockchain trading platform. Correspondingly, this step S103 is specifically: if the previous transaction message corresponding to each input required for this transaction is obtained, calculate the hash Hash value of each previous transaction message, and obtain the Hash value corresponding to each input value.
此外,该步骤S103也可以包括:In addition, this step S103 may also include:
判断各个前次交易报文的报文格式是否符合预设报文格式;Judging whether the message format of each previous transaction message conforms to the preset message format;
若符合该预设报文格式,则计算每个前次交易报文的哈希Hash值,得到每个input对应的Hash值。If it conforms to the preset message format, calculate the Hash value of each previous transaction message to obtain the Hash value corresponding to each input.
由于本申请实施例需要对本次交易报文进行签名,因此本次交易报文中可以包括如附图2所示的Sign&PubKey,在这种情况下,该步骤S103也可以包括:在获取到各个前次交易报文之后,根据每个前次交易报文中的签名值和公钥(可以为Sign&PubKey)来判断每个前次交易报文是否为合法报文;当判断出各个前次交易报文均为合法报文时,计算每个每个前次交易报文的哈希Hash值,得到每个input对应的Hash值。Since this embodiment of the application needs to sign this transaction message, this transaction message can include Sign&PubKey as shown in Figure 2, in this case, this step S103 can also include: after obtaining each After the previous transaction message, judge whether each previous transaction message is a legal message according to the signature value and public key (can be Sign&PubKey) in each previous transaction message; When the texts are all legitimate messages, calculate the Hash value of each previous transaction message to obtain the Hash value corresponding to each input.
若判断出某一前次交易报文不合法(不符合预设的报文格式,或者根据签名值以及公钥判断出不为合法报文)时,可以输出用于提示用户本次交易不合法的提示信息,提醒用户是否对本次交易报文进行签名;或者,可以输出用于提示用户本次交易不合法的提示信息,并终止对本次交易报文的签名操作;或者,可以直接终止本次签名,或者,还可以直接终止本次交易,即不将本次交易报文发送至区块链交易平台。If it is judged that a previous transaction message is illegal (does not conform to the preset message format, or judges that it is not a legal message based on the signature value and public key), it can output to remind the user that this transaction is illegal prompt information to remind the user whether to sign the transaction message; or, it can output a prompt message to remind the user that the transaction is illegal, and terminate the signing operation of the transaction message; or, it can be terminated directly This signature, or, can also directly terminate this transaction, that is, not send this transaction message to the blockchain trading platform.
在步骤S104中,判断计算得到的每个input对应的Hash值与该input对应的input字段下的TxOutHash值是否一致;In step S104, it is judged whether the calculated Hash value corresponding to each input is consistent with the TxOutHash value under the input field corresponding to the input;
如图4所示,即是判断input字段1下的TxOutHash与前次交易报文A的Hash值是否一致、input字段2下的TxOutHash与前次交易报文B的Hash值是否一致以及input字段3下的TxOutHash与前次交易报文C的Hash值是否一致,若均一致,则可以认为本次交易报文中的各个input均是合法的,否则,若在本次交易所需的各个input中,存在有一个或多个input对应的Hash值与对应的input字段下的TxOutHash值不一致(比如,input字段2下的TxOutHash与前次交易报文B的Hash值不相同),则可以输出用于提示用户本次交易不合法的提示信息,提醒用户是否对本次交易报文进行签名;或者,可以输出用于提示用户本次交易不合法的提示信息,并终止对本次交易报文的签名操作;或者,可以直接终止本次签名,或者,还可以直接终止本次交易,即不将本次交易报文发送至区块链交易评。As shown in Figure 4, it is to judge whether the TxOutHash under
在步骤S105中,若计算得到的每个input对应的Hash值与该input对应的input字段下的TxOutHash值均一致,则对本次交易报文进行签名;In step S105, if the calculated Hash value corresponding to each input is consistent with the TxOutHash value under the input field corresponding to the input, then sign the transaction message;
如图4所示,若input字段1下的TxOutHash与前次交易报文A的Hash值一致、input字段2下的TxOutHash与前次交易报文B的Hash值一致并且input字段3下的TxOutHash与前次交易报文C的Hash值一致,则认为本次交易报文的所有input均合法,则对本次交易报文进行签名(若本申请实施例所限定的交易报文的input字段下包括Sign&PubKey,则可以将本次交易的交易签名和交易公钥写入交易报文中input字段中的Sign&PubKey中),以使区块链交易平台协助完成本次交易。As shown in Figure 4, if the TxOutHash under
由上可见,本申请实施例一所提供的技术方案可以判断本次交易的各个交易输入是否合法,能够在一定程度上检查出本次交易报文中所嵌入的非法交易输入,只有当判断出所有交易输入均合法时,才会执行签名操作,即才认定本次交易报文合法,进而使得区块链交易平台执行本次转账操作,能够在一定程度上避免在用户转账时,由于交易报文中被非法嵌入多个交易输入,而造成用户需缴纳更多手续费的问题,因此,本申请所提供的签名方法能够在一定程度更好的保障用户的资金安全。It can be seen from the above that the technical solution provided by
实施例二Embodiment two
下面对本申请实施例二提供的另一种基于区块链网络交易的签名方法进行描述,本申请实施例二所述的签名方法应用在如下区块链网络中:The following describes another signature method based on blockchain network transactions provided by
该区块链网络的交易报文中包括各个input字段以及各个output字段,每个input字段中包括TxOutHash值,每个output字段中包括金额Value值,该Value值用于指示对应的output的金额大小,每个input字段下还包括发送输出索引TxOutIndex值,每个input字段下的TxOutIndex值用于指示对应的input所对应的output字段在对应的前次交易报文中的位置。申请实施例一所限定的区块链网络的交易报文格式具体可参见附图2以及相应的文字描述部分。此外,与实施例一相同,由于本申请实施例二所提供的签名方法需要对本次交易报文进行签名,因此,可以与图2相同,交易报文中每个input字段下可以包括Sign&PubKey,但是请本领域技术人员注意,本申请实施例中对本次交易报文进行签名所对应的字段并不一定与图2完全相同。The transaction message of the blockchain network includes each input field and each output field, each input field includes a TxOutHash value, each output field includes an amount Value value, and the Value value is used to indicate the amount of the corresponding output , each input field also includes a sending output index TxOutIndex value, and the TxOutIndex value under each input field is used to indicate the position of the output field corresponding to the corresponding input in the corresponding previous transaction message. For the transaction message format of the blockchain network defined in
本申请实施例二所述的签名方法如图5所示,包括:The signature method described in
在步骤S201中,在本次交易报文中,获取本次交易所需的各个input分别对应的input字段下的TxOutHash值,上述本次交易报文为本次交易的交易报文;In step S201, in the current transaction message, obtain the TxOutHash value under the input field corresponding to each input required for the current transaction, the above-mentioned current transaction message is the transaction message of this transaction;
在步骤S202中,获取本次交易所需的各个input分别对应的前次交易报文;In step S202, obtain the previous transaction message corresponding to each input required for this transaction;
在步骤S203中,计算每个前次交易报文的Hash值,得到每个input对应的Hash值;In step S203, calculate the Hash value of each previous transaction message, and obtain the Hash value corresponding to each input;
在步骤S204中,判断计算得到的每个input对应的Hash值与该input对应的input字段下的TxOutHash值是否一致;In step S204, it is judged whether the calculated Hash value corresponding to each input is consistent with the TxOutHash value under the input field corresponding to the input;
在本申请实施例二中,上述步骤S201-S204与实施例一中的步骤S101-S104执行方式相同,具体可参见实施例一的描述,此处不再赘述。In the second embodiment of the present application, the above-mentioned steps S201-S204 are performed in the same manner as the steps S101-S104 in the first embodiment. For details, please refer to the description of the first embodiment, which will not be repeated here.
在步骤S205中,若计算得到的每个input对应的Hash值与该input对应的input字段下的TxOutHash值均一致,则根据上述本次交易报文,获取上述本次交易报文的各个output字段下的Value值,得到本次交易中每个output对应的金额大小;In step S205, if the calculated Hash value corresponding to each input is consistent with the TxOutHash value under the input field corresponding to the input, then according to the above-mentioned current transaction message, obtain each output field of the above-mentioned current transaction message Value value below to get the amount corresponding to each output in this transaction;
在本申请实施例二中,若通过步骤S201-S204,判断出本次交易报文的各个交易输入是合法的,则可以进一步将本次交易需要缴纳的手续费计算并显示出来,以便于用户知晓本次交易的手续费,并可以使用户根据本次交易的手续费来确定是否继续进行交易。In the second embodiment of the present application, if it is judged through steps S201-S204 that each transaction input of this transaction message is legal, the transaction fee that needs to be paid for this transaction can be further calculated and displayed, so that the user can Know the handling fee of this transaction, and enable the user to determine whether to continue the transaction according to the handling fee of this transaction.
为了更清楚的描述本申请实施例二所述的技术方案,下面利用附图6进行说明。如图6所示,在该步骤S205中,通过读取本次交易报文中各个output字段下的Value值来确定各个交易输出的金额大小,比如,output字段1下的Value值用于指示交易输出output1的金额大小,output字段2下的Value值用于指示交易输出output2的金额大小。In order to describe the technical solution described in
在步骤S206中,在本次交易所需的各个input中,选取一input作为目标input;In step S206, among the inputs required for this transaction, select an input as the target input;
如图6所示,本次交易需要三个input,分别为input1、input2以及input3,可以从input1、input2以及input3中选取任意一input作为目标input,比如选取input1作为目标input。As shown in Figure 6, this transaction requires three inputs, namely input1, input2, and input3. You can select any input from input1, input2, and input3 as the target input, for example, select input1 as the target input.
在步骤S207中,根据上述目标input对应的input字段下TxOutIndex值,在该目标input对应的前次交易报文中,查找目标output字段,该目标output字段对应的output为该目标input;In step S207, according to the TxOutIndex value under the input field corresponding to the above-mentioned target input, search the target output field in the previous transaction message corresponding to the target input, and the output corresponding to the target output field is the target input;
若在步骤S206中,选取input1为目标input,则在本次交易报文中,获取该input1对应的input字段1中的TxOutIndex值,该input字段1中的TxOutIndex值用于指示该input1对应前次交易报文A中的哪一个output字段,如图6所示,可以得出,该input1对应前次交易报文A中的第一个output字段,即output字段A1,从而得到目标output字段即为output字段A1。If in step S206, input1 is selected as the target input, then in this transaction message, the TxOutIndex value in the
在步骤S208中,获取上述目标output字段下的Value值,得到该目标input的金额大小;In step S208, the Value value under the above-mentioned target output field is obtained to obtain the amount of the target input;
如图6所示,将前次交易报文A中,output字段A1下的Value值作为input1的金额大小。As shown in Figure 6, the Value under the output field A1 in the previous transaction message A is used as the amount of input1.
在步骤S209中,判断所选取的input是否遍历完本次交易所需的所有input,若否,则执行步骤S210,若是,则执行步骤S211;In step S209, it is judged whether the selected input has traversed all the inputs required for this transaction, if not, execute step S210, if yes, execute step S211;
在步骤S210中,除去已选取的input,在本次交易的各个input中,在选取一input作为目标input,返回步骤S207;In step S210, remove the selected input, select an input as the target input among each input in this transaction, and return to step S207;
在上述步骤S209中,判断是否获取到本次交易报文的每一个input的金额大小,若没有,则再选取一input作为目标input,并返回执行步骤S207;In the above step S209, it is judged whether the amount of each input of this transaction message has been obtained, if not, then select another input as the target input, and return to execute step S207;
在步骤S211中,根据本次交易中各个input对应的金额大小,以及本次交易中各个output对应的金额大小,确定本次交易的手续费;In step S211, according to the amount corresponding to each input in this transaction and the amount corresponding to each output in this transaction, determine the handling fee for this transaction;
在该步骤中,手续费的计算方式可以利用现有技术,可以计算各个input的金额大小之和,以及,各个output的金额大小之和,将各个input的金额大小之和减去各个output的金额大小之和,得到本次交易的手续费。In this step, the calculation method of the handling fee can use the existing technology to calculate the sum of the amount of each input, and the sum of the amount of each output, and subtract the sum of the amount of each input from the amount of each output The sum of the sizes is the handling fee for this transaction.
在步骤S212中,向用户展示上述手续费,以便用户确认是否愿意继续交易;In step S212, the above-mentioned handling fee is displayed to the user, so that the user can confirm whether he is willing to continue the transaction;
在步骤S213中,若接收到用于指示用户愿意继续交易的指令,则对本次交易报文进行签名。In step S213, if an instruction indicating that the user is willing to continue the transaction is received, the current transaction message is signed.
在本申请实施例中,向用户展示该手续费的大小,当接收到用户愿意继续交易的指令时,则对本次交易报文进行签名;当接收到用户拒绝继续交易的指令时,则可以终止本次签名。In the embodiment of this application, the size of the handling fee is shown to the user, and when the user is willing to continue the transaction is received, the transaction message is signed; when the user refuses to continue the transaction is received, the user can Terminate this signature.
本申请实施例二相比于实施例一,可以进一步将本次交易的手续费告知用户,因此,相比于实施例一,本申请实施例二可以使用户知晓每次交易的手续费大小,能够保证用户的知情权,并进一步提高用户体验。此外,本申请实施例二与实施例一相同,能够在一定程度上检查出本次交易报文中所嵌入的非法交易输入,从而能够避免在用户转账时,由于交易报文中被非法嵌入多个交易输入,而造成用户需缴纳更多手续费的问题。Compared with
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the sequence numbers of the steps in the above embodiments do not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiment of the present application.
实施例三Embodiment Three
本申请实施例三提供了一种基于区块链网络交易的签名装置,上述区块链网络的交易报文中包括有各个交易输入input分别对应的input字段以及各个交易输出output分别对应的output字段,每个input字段中均包括有发送输出哈希TxOutHash值,每个合法的input均对应有前次交易报文,每个合法的input对应的前次交易报文为存在有一output字段,该output字段对应的output为该合法的input,每个合法的input对应的TxOutHash值与该合法的input对应的前次交易报文的哈希Hash值相同;
如图7所示,该签名装置300包括:As shown in Figure 7, the
TxOutHash获取模块301,用于在本次交易报文中,获取本次交易所需的各个input分别对应的input字段下的TxOutHash值,上述本次交易报文为本次交易的交易报文;The
前次报文获取模块302,用于获取本次交易所需的各个input分别对应的前次交易报文;The previous
哈希值计算模块303,用于计算每个前次交易报文的哈希Hash值,得到每个input对应的Hash值;Hash
判断模块304,用于判断计算得到的每个input对应的Hash值与该input对应的input字段下的TxOutHash值是否一致;
签名模块305,用于若计算得到的每个input对应的Hash值与该input对应的input字段下的TxOutHash值均一致,则对本次交易报文进行签名。The
可选地,上述区块链网络的交易报文中每个output字段中均包括金额Value值,上述Value值用于指示对应的output的金额大小,每个input字段下还包括发送输出索引TxOutIndex值,每个input字段下的TxOutIndex值用于指示对应的input所对应的output字段在对应的前次交易报文中的位置;Optionally, each output field in the transaction message of the above-mentioned blockchain network includes an amount Value value, the above-mentioned Value value is used to indicate the amount of the corresponding output, and each input field also includes a sending output index TxOutIndex value , the TxOutIndex value under each input field is used to indicate the position of the output field corresponding to the corresponding input in the corresponding previous transaction message;
相应地,上述签名模块305包括:Correspondingly, the
输出金额确定单元,用于若计算得到的每个input对应的Hash值与该input对应的input字段下的TxOutHash值均一致,则根据上述本次交易报文,获取上述本次交易报文的各个output字段下的Value值,得到本次交易中每个output对应的金额大小;The output amount determination unit is used to obtain each of the above-mentioned current transaction messages according to the above-mentioned current transaction message if the calculated Hash value corresponding to each input is consistent with the TxOutHash value under the input field corresponding to the input. Value value under the output field to get the amount corresponding to each output in this transaction;
目标输入选取单元,用于在本次交易所需的各个input中,选取任一input作为目标input;The target input selection unit is used to select any input as the target input among the various inputs required for this transaction;
目标输出确定单元,用于根据上述目标input对应的input字段下的TxOutIndex值,在上述目标input对应的前次交易报文中,查找目标output字段,其中,上述目标output字段对应的output为上述目标input;The target output determination unit is used to search for the target output field in the previous transaction message corresponding to the above target input according to the TxOutIndex value under the input field corresponding to the above target input, wherein the output corresponding to the above target output field is the above target input;
目标输入金额确定单元,用于获取上述目标output字段下的Value值,得到上述目标input的金额大小;The target input amount determination unit is used to obtain the Value value under the above target output field, and obtain the amount of the above target input;
遍历判断单元,用于判断所选取的input是否遍历完本次交易所需的所有input;The traversal judgment unit is used to judge whether the selected input has traversed all the inputs required for this transaction;
目标输入再选单元,用于若所选取的input没有遍历完本次交易所需的所有input,则除去已选取的input,在本次交易的各个input中,再选取一input作为目标input;The target input reselection unit is used to remove the selected input if the selected input has not traversed all the inputs required for this transaction, and select another input as the target input from each input in this transaction;
手续费确定单元,用于若所选取的input遍历完本次交易所需的所有input,则根据本次交易中各个input对应的金额大小,以及本次交易中各个output对应的金额大小,确定本次交易的手续费;The fee determination unit is used to determine the transaction fee according to the amount corresponding to each input in this transaction and the amount corresponding to each output in this transaction if the selected input has traversed all the inputs required for this transaction. transaction fee;
手续费展示单元,用于向用户展示上述手续费,以便用户确认是否愿意继续交易;The handling fee display unit is used to display the above-mentioned handling fee to the user, so that the user can confirm whether he is willing to continue the transaction;
签名单元,用于若接收到用于指示用户愿意继续交易的指令,则对本次交易报文进行签名。The signing unit is configured to sign the transaction message if an instruction indicating that the user is willing to continue the transaction is received.
可选地,上述TxOutHash获取模块301包括:Optionally, the above-mentioned
第一格式判断单元,用于判断上述本次交易报文的报文格式是否符合预设报文格式;The first format judging unit is used to judge whether the message format of the above-mentioned transaction message conforms to the preset message format;
TxOutHash获取单元,用于若符合上述预设报文格式,则在本次交易报文中,获取本次交易所需的各个input分别对应的input字段下的TxOutHash值。The TxOutHash acquisition unit is configured to obtain the TxOutHash values under the input fields corresponding to the respective inputs required for this transaction in the current transaction message if the above preset message format is met.
可选地,上述签名装置300还包括:Optionally, the
前次报文判断模块,用于判断是否获取到本次交易所需的各个input分别对应的前次交易报文;The previous message judging module is used to judge whether to obtain the previous transaction message corresponding to each input required for this transaction;
相应地,上述哈希值计算模块303具体用于:Correspondingly, the above-mentioned hash
若获取本次交易所需的各个input分别对应的前次交易报文,则计算每个前次交易报文的哈希Hash值,得到每个input对应的Hash值。If the previous transaction message corresponding to each input required for this transaction is obtained, the Hash value of each previous transaction message is calculated to obtain the Hash value corresponding to each input.
可选地,上述哈希值计算模块303,包括:Optionally, the above-mentioned hash
第二格式判断单元,用于判断各个前次交易报文的报文格式是否符合预设报文格式;The second format judging unit is used to judge whether the message format of each previous transaction message conforms to the preset message format;
哈希值计算单元,用于若符合上述预设报文格式,则计算每个前次交易报文的哈希Hash值,得到每个input对应的Hash值。The hash value calculation unit is used to calculate the hash Hash value of each previous transaction message to obtain the Hash value corresponding to each input if it conforms to the above preset message format.
可选地,上述前次报文获取模块302,包括:Optionally, the above-mentioned previous
通信发送单元,用于获取本次交易所需的各个input的标识信息,将各个input的标识信息发送至预设服务器,以指示上述预设服务器执行查找各个input对应的前次交易报文的操作;The communication sending unit is used to obtain the identification information of each input required for this transaction, and send the identification information of each input to the preset server, so as to instruct the aforementioned preset server to perform the operation of searching for the previous transaction message corresponding to each input ;
通信接收单元,用于接收上述预设服务器发送的各个input分别对应的前次交易报文。The communication receiving unit is configured to receive the previous transaction message respectively corresponding to each input sent by the preset server.
可选地,上述签名装置300还包括:Optionally, the
签名终止模块,用于在本次交易所需的各个input中,若存在有一个或多个input对应的Hash值与对应的input字段下的TxOutHash值不一致,则终止本次签名。The signature termination module is used for terminating the signature if the Hash value corresponding to one or more inputs is inconsistent with the TxOutHash value under the corresponding input field among the various inputs required for this transaction.
需要说明的是,上述装置/单元之间的信息交互、执行过程等内容,由于与本申请方法实施例基于同一构思,其具体功能及带来的技术效果,具体可参见方法实施例部分,此处不再赘述。It should be noted that the information interaction and execution process between the above-mentioned devices/units are based on the same concept as the method embodiment of the present application, and its specific functions and technical effects can be found in the method embodiment section. I won't repeat them here.
实施例四Embodiment four
图8是本申请实施例四提供的终端设备的示意图,该终端设备为一应用在区块链网络中的区块链节点,其中,该区块链网络的交易报文中包括有各个交易输入input分别对应的input字段以及各个交易输出output分别对应的output字段,每个input字段中均包括有发送输出哈希TxOutHash值,每个合法的input均对应有前次交易报文,每个合法的input对应的前次交易报文为存在有一output字段,该output字段对应的output为该合法的input,每个合法的input对应的TxOutHash值与该合法的input对应的前次交易报文的哈希Hash值相同。Fig. 8 is a schematic diagram of a terminal device provided in
如图8所示,该实施例的终端设备4包括:处理器40、存储器41以及存储在上述存储器41中并可在上述处理器40上运行的计算机程序42。上述处理器40执行上述计算机程序42时实现上述方法实施例中的步骤,例如图1所示的步骤S101至S105。或者,上述处理器40执行上述计算机程序42时实现上述装置实施例中各模块/单元的功能,例如图7所示模块301至305的功能。As shown in FIG. 8 , the
示例性的,上述计算机程序42可以被分割成一个或多个模块/单元,上述一个或者多个模块/单元被存储在上述存储器41中,并由上述处理器40执行,以完成本申请。上述一个或多个模块/单元可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述上述计算机程序42在上述终端设备4中的执行过程。例如,上述计算机程序42可以被分割成TxOutHash获取模块、前次报文获取模块、哈希值计算模块、判断模块以及签名模块,各模块具体功能如下:Exemplarily, the above-mentioned
在本次交易报文中,获取本次交易所需的各个input分别对应的input字段下的TxOutHash值,上述本次交易报文为本次交易的交易报文;In this transaction message, obtain the TxOutHash value under the input field corresponding to each input required for this transaction, and the above-mentioned current transaction message is the transaction message of this transaction;
获取本次交易所需的各个input分别对应的前次交易报文;Obtain the previous transaction message corresponding to each input required for this transaction;
计算每个前次交易报文的哈希Hash值,得到每个input对应的Hash值;Calculate the Hash value of each previous transaction message to obtain the Hash value corresponding to each input;
判断计算得到的每个input对应的Hash值与该input对应的input字段下的TxOutHash值是否一致;Determine whether the calculated Hash value corresponding to each input is consistent with the TxOutHash value under the input field corresponding to the input;
若计算得到的每个input对应的Hash值与该input对应的input字段下的TxOutHash值均一致,则对上述本次交易报文进行签名。If the calculated Hash value corresponding to each input is consistent with the TxOutHash value under the input field corresponding to the input, the above-mentioned transaction message is signed.
上述终端设备4可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。上述终端设备可包括,但不仅限于,处理器40、存储器41。本领域技术人员可以理解,图8仅仅是终端设备4的示例,并不构成对终端设备4的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如上述终端设备还可以包括输入输出设备、网络接入设备、总线等。The above-mentioned
所称处理器40可以是中央处理单元(Central Processing Unit,CPU),还可以是其它通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其它可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The so-called
上述存储器41可以是上述终端设备4的内部存储单元,例如终端设备4的硬盘或内存。上述存储器41也可以是上述终端设备4的外部存储设备,例如上述终端设备4上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,上述存储器41还可以既包括上述终端设备4的内部存储单元也包括外部存储设备。上述存储器41用于存储上述计算机程序以及上述终端设备所需的其它程序和数据。上述存储器41还可以用于暂时地存储已经输出或者将要输出的数据。The above-mentioned
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将上述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used for illustration. In practical applications, the above-mentioned functions can be assigned to different functional units, Module completion means that the internal structure of the above-mentioned device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment may be integrated into one processing unit, or each unit may exist separately physically, or two or more units may be integrated into one unit, and the above-mentioned integrated units may adopt hardware It can also be implemented in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the present application. For the specific working process of the units and modules in the above system, reference may be made to the corresponding process in the foregoing method embodiments, and details will not be repeated here.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the above-mentioned embodiments, the descriptions of each embodiment have their own emphases, and for parts that are not detailed or recorded in a certain embodiment, refer to the relevant descriptions of other embodiments.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those skilled in the art can appreciate that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.
在本申请所提供的实施例中,应该理解到,所揭露的装置/终端设备和方法,可以通过其它的方式实现。例如,以上所描述的装置/终端设备实施例仅仅是示意性的,例如,上述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the device/terminal device embodiments described above are only illustrative. For example, the division of the above-mentioned modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or Components may be combined or integrated into another system, or some features may be omitted, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
上述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
上述集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,上述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,上述计算机程序包括计算机程序代码,上述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。上述计算机可读介质可以包括:能够携带上述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,上述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括电载波信号和电信信号。If the above-mentioned integrated modules/units are realized in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the present application realizes all or part of the processes in the methods of the above-mentioned embodiments, and can also be completed by instructing related hardware through computer programs. The above-mentioned computer programs can be stored in a computer-readable storage medium. The computer program When executed by a processor, the steps in the above-mentioned various method embodiments can be realized. Wherein, the above-mentioned computer program includes computer program code, and the above-mentioned computer program code may be in the form of source code, object code, executable file or some intermediate form. The above-mentioned computer-readable medium may include: any entity or device capable of carrying the above-mentioned computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random Access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the above computer-readable media may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, computer-readable media may not Including electrical carrier signals and telecommunication signals.
以上上述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it can still apply to the foregoing embodiments Modifications to the technical solutions described, or equivalent replacement of some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the application, and should be included in this application. within the scope of the application.
Claims (10)
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811390264.7A CN111210345B (en) | 2018-11-21 | 2018-11-21 | Signature method and device based on block chain network transaction and terminal equipment |
PCT/CN2019/108540 WO2020103573A1 (en) | 2018-11-21 | 2019-09-27 | Block chain-based network transaction signature method and device, and terminal equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811390264.7A CN111210345B (en) | 2018-11-21 | 2018-11-21 | Signature method and device based on block chain network transaction and terminal equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111210345A CN111210345A (en) | 2020-05-29 |
CN111210345B true CN111210345B (en) | 2023-02-17 |
Family
ID=70773071
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811390264.7A Expired - Fee Related CN111210345B (en) | 2018-11-21 | 2018-11-21 | Signature method and device based on block chain network transaction and terminal equipment |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN111210345B (en) |
WO (1) | WO2020103573A1 (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11601787B2 (en) | 2018-12-31 | 2023-03-07 | T-Mobile Usa, Inc. | Using a blockchain to determine trustworthiness of messages between vehicles over a telecommunications network |
US11039317B2 (en) * | 2018-12-31 | 2021-06-15 | T-Mobile Usa, Inc. | Using a blockchain to determine trustworthiness of messages within a telecommunications network for a smart city |
CN118365452B (en) * | 2024-06-20 | 2024-09-10 | 杭州宇信数字科技有限公司 | Transaction method of hot spot account based on Redis apparatus, medium, and device |
CN118410342B (en) * | 2024-07-02 | 2024-09-13 | 恒生电子股份有限公司 | Message processing method and device |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7882036B1 (en) * | 2006-05-01 | 2011-02-01 | Data-Pac Mailing Systems Corp. | System and method for postal indicia printing evidencing and accounting |
CN104992329A (en) * | 2015-05-14 | 2015-10-21 | 飞天诚信科技股份有限公司 | Method for safely issuing transaction message |
CN105956923A (en) * | 2016-04-20 | 2016-09-21 | 上海如鸽投资有限公司 | Asset transaction platform and digital certification and transaction method for assets |
CN107947935A (en) * | 2017-11-09 | 2018-04-20 | 深圳市文鼎创数据科技有限公司 | A kind of endorsement method of message, system and terminal device |
CN107994995A (en) * | 2017-11-29 | 2018-05-04 | 深圳市文鼎创数据科技有限公司 | A kind of method of commerce, system and the terminal device of lower security medium |
CN108009810A (en) * | 2017-12-27 | 2018-05-08 | 光载无限(北京)科技有限公司 | A kind of Trusted Digital transaction in assets method |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106385319B (en) * | 2016-09-29 | 2020-11-27 | 江苏通付盾科技有限公司 | Method and system for verifying information in block chain network |
CN106789920A (en) * | 2016-11-25 | 2017-05-31 | 深圳前海微众银行股份有限公司 | The joint connecting method and device of block chain |
CN107180353B (en) * | 2017-06-29 | 2021-04-06 | 飞天诚信科技股份有限公司 | Method and device for realizing revocable intelligent contract transaction |
CN108805571B (en) * | 2018-06-11 | 2021-02-26 | 北京京东尚科信息技术有限公司 | Data protection method, platform, block chain node, system and storage medium |
CN108712263B (en) * | 2018-06-11 | 2021-05-25 | 北京京东尚科信息技术有限公司 | Information verification method, device, system and computer readable storage medium |
-
2018
- 2018-11-21 CN CN201811390264.7A patent/CN111210345B/en not_active Expired - Fee Related
-
2019
- 2019-09-27 WO PCT/CN2019/108540 patent/WO2020103573A1/en active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7882036B1 (en) * | 2006-05-01 | 2011-02-01 | Data-Pac Mailing Systems Corp. | System and method for postal indicia printing evidencing and accounting |
CN104992329A (en) * | 2015-05-14 | 2015-10-21 | 飞天诚信科技股份有限公司 | Method for safely issuing transaction message |
CN105956923A (en) * | 2016-04-20 | 2016-09-21 | 上海如鸽投资有限公司 | Asset transaction platform and digital certification and transaction method for assets |
CN107947935A (en) * | 2017-11-09 | 2018-04-20 | 深圳市文鼎创数据科技有限公司 | A kind of endorsement method of message, system and terminal device |
CN107994995A (en) * | 2017-11-29 | 2018-05-04 | 深圳市文鼎创数据科技有限公司 | A kind of method of commerce, system and the terminal device of lower security medium |
CN108009810A (en) * | 2017-12-27 | 2018-05-08 | 光载无限(北京)科技有限公司 | A kind of Trusted Digital transaction in assets method |
Also Published As
Publication number | Publication date |
---|---|
CN111210345A (en) | 2020-05-29 |
WO2020103573A1 (en) | 2020-05-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111210345B (en) | Signature method and device based on block chain network transaction and terminal equipment | |
CN109064334B (en) | Intelligent contract accounting method, computer device and readable storage medium | |
TWI772654B (en) | Escrowing system for cross-blockchain third-party settlement and method thereof | |
KR20180014534A (en) | Verification system and method for transaction based block chain | |
CN112184240A (en) | Refund request processing method and device | |
CN111709777A (en) | Recommended method, system, terminal device and storage medium for payment method | |
CN111161071A (en) | Data processing method, device, equipment and storage medium based on block chain | |
WO2022262527A1 (en) | Digital currency-based payment method, platform, terminal, and payment system | |
CN109785145B (en) | Fixed-point drugstore financing method based on block chain, storage medium and computer equipment | |
CN113011879B (en) | Related transaction data processing method, device and server | |
CN116029825B (en) | Block chain transaction method, device and system, electronic equipment and storage medium | |
KR20190108666A (en) | Apparatus and method for automated deposit and withdrawal of funds for cryptocurrency transactions and computer program for the same | |
CN115471305A (en) | Block chain-based electric charge reconciliation method, system, medium and electronic device | |
CN107590731A (en) | A kind of recording method, device and the equipment of bill expense | |
CN111198763B (en) | Method for detecting reuse of resources, terminal and computer-readable storage medium | |
CN107464334A (en) | Recognition methods, identification device and the terminal device of bank note | |
CN111932255B (en) | Method and device for realizing transaction reconciliation based on encrypted currency | |
CN113297594A (en) | Cross-chain transaction method and device, electronic equipment and storage medium | |
KR20150110422A (en) | System and method for electronic money transfer of fractional amounts | |
CN109919767B (en) | Transaction risk management method, device and equipment | |
CN110599274A (en) | Bill processing method, device, processing equipment and computer storage medium | |
CN112712353B (en) | Digital currency zero-payment method, system and terminal | |
CN107368337A (en) | Using method for down loading, device and terminal device | |
CN108921490A (en) | A kind of sending method of notification information, storage medium and server | |
CN111127006A (en) | Transaction processing method and system based on block chain |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20230217 |
|
CF01 | Termination of patent right due to non-payment of annual fee |