TWI770585B - Transaction method, device, and storage medium based on blockchain - Google Patents

Transaction method, device, and storage medium based on blockchain Download PDF

Info

Publication number
TWI770585B
TWI770585B TW109128321A TW109128321A TWI770585B TW I770585 B TWI770585 B TW I770585B TW 109128321 A TW109128321 A TW 109128321A TW 109128321 A TW109128321 A TW 109128321A TW I770585 B TWI770585 B TW I770585B
Authority
TW
Taiwan
Prior art keywords
asset
transaction
user
blockchain
account address
Prior art date
Application number
TW109128321A
Other languages
Chinese (zh)
Other versions
TW202209210A (en
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 鴻海精密工業股份有限公司
Priority to TW109128321A priority Critical patent/TWI770585B/en
Publication of TW202209210A publication Critical patent/TW202209210A/en
Application granted granted Critical
Publication of TWI770585B publication Critical patent/TWI770585B/en

Links

Images

Landscapes

  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Storage Device Security (AREA)

Abstract

The present invention provides a transaction method, device, and storage medium based on blockchain. The method includes receiving an asset transferring request initiated by a first user; generating an asset transferring permission according to the asset transferring request; if a current blockchain time satisfies a first time condition, allowing to transfer an asset specified by an asset transferring content from the first account address to the second account address; receiving an asset transaction request initiated by a second user; generating an asset transaction permission according to the asset transaction request, wherein the asset transaction permission includes the second account address, a third account address corresponding to a third user, a transaction asset content, and a second time condition; if the current blockchain time satisfies the second time condition, allowing the second user and the third user to trade according to the transaction asset content.

Description

基於區塊鏈的交易方法、裝置及可讀存儲介質 Blockchain-based transaction method, device and readable storage medium

本發明涉及區塊鏈技術領域,尤其涉及一種基於區塊鏈基於區塊鏈的交易方法、裝置及可讀存儲介質。 The present invention relates to the technical field of blockchain, and in particular, to a blockchain-based transaction method, device and readable storage medium.

習知區塊鏈在進行交易時,通過批准介面授權使用者A從使用者B獲取一定數量的代幣(token),然而,在上述代幣的轉移過程中,缺少時間上的限制,因此,支付方式不夠靈活。 In the conventional blockchain, when conducting transactions, user A is authorized to obtain a certain amount of tokens from user B through the approval interface. However, in the process of transferring the above tokens, there is no time limit. Therefore, Payment methods are not flexible enough.

有鑒於此,有必要提供一種基於區塊鏈的交易方法、裝置及電腦可讀存儲介質,其可對交易過程中的時間進行限制,增加支付方式的靈活性。 In view of this, it is necessary to provide a blockchain-based transaction method, device and computer-readable storage medium, which can limit the time in the transaction process and increase the flexibility of payment methods.

本發明一實施方式提供一種基於區塊鏈的交易方法,所述方法包括:接收第一使用者發起的資產移轉請求; 根據所述資產移轉請求生成資產移轉許可,所述資產移轉許可包括與所述第一使用者對應的第一帳戶地址、與第二使用者對應的第二帳戶地址、移轉資產內容以及第一時間條件;如果當前區塊鏈的時間滿足所述第一時間條件時,允許從所述第一帳戶地址移轉所述移轉資產內容所指定的資產至所述第二帳戶地址;接收所述第二使用者發起的資產交易請求;根據所述資產交易請求生成資產交易許可,所述資產交易許可包括所述第二帳戶地址、與第三使用者對應的第三帳戶地址、交易資產內容及第二時間條件;如果當前區塊鏈的時間滿足所述第二時間條件時,允許所述第二使用者與所述第三使用者根據所述交易資產內容進行交易。 An embodiment of the present invention provides a blockchain-based transaction method, the method includes: receiving an asset transfer request initiated by a first user; An asset transfer license is generated according to the asset transfer request, where the asset transfer license includes a first account address corresponding to the first user, a second account address corresponding to the second user, and the content of the transferred assets and the first time condition; if the time of the current blockchain satisfies the first time condition, it is allowed to transfer the assets specified by the content of the transferred assets from the first account address to the second account address; Receive an asset transaction request initiated by the second user; generate an asset transaction permission according to the asset transaction request, where the asset transaction permission includes the second account address, the third account address corresponding to the third user, and the transaction Asset content and second time condition; if the time of the current blockchain meets the second time condition, the second user and the third user are allowed to conduct transactions according to the transaction asset content.

優選地,所述第一使用者與所述第三使用者為同一使用者,所述第一帳戶地址與所述第三帳戶地址相同。 Preferably, the first user and the third user are the same user, and the first account address and the third account address are the same.

優選地,所述方法還包括:如果當前區塊鏈的時間不滿足所述第一時間條件時,不允許將所述資產從第一帳戶地址移轉至所述第二帳戶地址;以及如果當前區塊鏈的時間不滿足所述第二時間條件時,不允許所述第二使用者與所述第三使用者根據所述交易資產內容進行交易。 Preferably, the method further comprises: if the time of the current blockchain does not satisfy the first time condition, disallowing the transfer of the asset from the first account address to the second account address; and if the current time When the time of the blockchain does not meet the second time condition, the second user and the third user are not allowed to conduct transactions according to the content of the transaction assets.

優選地,所述方法還包括: 如果當前區塊鏈的時間不滿足所述第一時間條件時,接收所述第一使用者發起的撤銷資產移轉請求;以及根據所述撤銷資產移轉請求撤銷從所述第一帳戶地址移轉所述移轉資產內容所指定的資產至所述第二帳戶地址的許可。 Preferably, the method further includes: If the time of the current blockchain does not meet the first time condition, receiving a request for revocation of asset transfer initiated by the first user; and revoking the transfer from the first account address according to the revocation of the asset transfer request Permission to transfer the asset specified by the transfer asset content to the second account address.

優選地,所述方法還包括:如果當前區塊鏈的時間不滿足所述第一時間條件時,接收所述第一使用者發起的修改資產移轉請求;以及根據所述修改資產移轉請求修改所述移轉資產內容或者所述第一時間條件中至少一項。 Preferably, the method further comprises: if the time of the current blockchain does not meet the first time condition, receiving a request for modifying the asset transfer initiated by the first user; and according to the modifying the asset transfer request At least one of the transfer asset content or the first time condition is modified.

優選地,所述方法還包括:如果當前區塊鏈的時間不滿足所述第二時間條件時,接收所述第二使用者發起的撤銷資產交易請求;以及根據所述撤銷資產交易請求撤銷所述第二使用者與所述第三使用者根據所述交易資產內容進行交易的許可。 Preferably, the method further comprises: if the time of the current blockchain does not meet the second time condition, receiving a request for revoking an asset transaction initiated by the second user; the permission of the second user and the third user to conduct transactions according to the content of the transaction assets.

優選地,所述方法還包括:如果當前區塊鏈的時間不滿足所述第二時間條件時,接收所述第二使用者發起的修改資產交易請求;以及根據所述修改資產交易請求修改所述資產交易內容或者所述第二時間條件中至少一項。 Preferably, the method further comprises: if the time of the current blockchain does not meet the second time condition, receiving a request for modifying an asset transaction initiated by the second user; and modifying the asset transaction request according to the modification of the asset transaction. at least one of the asset transaction content or the second time condition.

優選地,所述資產移轉請求及所述資產交易請求通過映射的形成存儲,通過所述第一帳戶地址可以獲取所述第二帳戶地址、所述移轉資產內容以及所述第一時間條件,通過所述第二帳戶地址可以獲取所述第三帳戶地址、所述交易資產內容及所述第二時間條件。 Preferably, the asset transfer request and the asset transaction request are stored by mapping, and the second account address, the transferred asset content and the first time condition can be obtained through the first account address , the third account address, the transaction asset content and the second time condition can be obtained through the second account address.

本發明一實施方式提供一種基於區塊鏈的交易裝置,所述裝置包括處理器及記憶體,所述記憶體上存儲有若干電腦程式,所述處理器用於執行記憶體中存儲的電腦程式時實現上述的基於區塊鏈的交易方法的步驟。 An embodiment of the present invention provides a blockchain-based transaction device, the device includes a processor and a memory, the memory stores a number of computer programs, and the processor is used for executing the computer programs stored in the memory. Steps to implement the blockchain-based transaction method described above.

本發明一實施方式提供一種電腦可讀存儲介質,所述電腦可讀存儲介質存儲有多條指令,多條所述指令可被一個或者多個處理器執行,以實現上述的基於區塊鏈的交易方法的步驟。 An embodiment of the present invention provides a computer-readable storage medium. The computer-readable storage medium stores a plurality of instructions, and a plurality of the instructions can be executed by one or more processors, so as to realize the above-mentioned blockchain-based storage medium. The steps of the trading method.

與習知技術相比,上述基於區塊鏈的交易裝置、方法及電腦可讀存儲介質,在區塊鏈網路中進行交易時,可對交易的時間進行限制,實現類似支票簽發、兌換等功能,更具靈活性。 Compared with the conventional technology, the above-mentioned blockchain-based transaction device, method and computer-readable storage medium can limit the time of the transaction when conducting transactions in the blockchain network, and realize similar check issuance, exchange, etc. function and more flexibility.

100:基於區塊鏈的交易裝置 100: Blockchain-based transaction device

10:記憶體 10: Memory

20:處理器 20: Processor

30:基於區塊鏈的交易程式 30: Blockchain-based transaction programs

101:生成模組 101: Generating Mods

102:許可模組 102: Licensed Mods

103:撤銷模組 103: Undo Mods

104:更新模組 104: Update Mods

圖1是本發明一實施方式的基於區塊鏈的交易裝置的功能模組圖。 FIG. 1 is a functional block diagram of a blockchain-based transaction device according to an embodiment of the present invention.

圖2是本發明一實施方式的基於區塊鏈的交易程式的功能模組圖。 FIG. 2 is a functional module diagram of a blockchain-based transaction program according to an embodiment of the present invention.

圖3是本發明一實施方式的基於區塊鏈的交易方法的流程圖。 FIG. 3 is a flowchart of a blockchain-based transaction method according to an embodiment of the present invention.

為了使本發明的目的、技術方案及優點更加清楚明白,以下結合附圖及實施例,對本發明進行進一步詳細說明。應當理解,此處所描述的具體實施例僅用以解釋本發明,並不用於限定本發明。基於本發明中的實施例,本領域普通技術人員在沒有做出創造性勞動前提下所獲得的所有其他實施例,都屬於本發明保護的範圍。 In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

進一步需要說明的是,在本文中,術語“包括”、“包含”或者其任何其他變體意在涵蓋非排他性的包含,從而使得包括一系列要素的過程、方法、物品或者裝置不僅包括那些要素,而且還包括沒有明確列出的其他要素,或者是還包括為這種過程、方法、物品或者裝置所固有的要素。在沒有更多限制的情況下,由語句“包括一個……”限定的要素,並不排除在包括該要素的過程、方法、物品或者裝置中還存在另外的相同要素。 It should be further noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements , but also other elements not expressly listed or inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.

請同時參閱圖1,為本發明基於區塊鏈的交易裝置較佳實施例的示意圖。 Please also refer to FIG. 1 , which is a schematic diagram of a preferred embodiment of the blockchain-based transaction device of the present invention.

所述交易裝置100可以是區塊鏈交易平臺的伺服器。所述交易裝置100包括記憶體10、處理器20以及存儲在所述記憶體10中並可在所述處理器20上運行的交易程式30。所述處理器20執行所述交易程式30時實現交易方法實施例中的步驟,例如圖3所示的步驟S1~S4。或者,所述處理器20執行所述交易程式30時實現交易程式實施例中各模組的功能,例如圖2中的模組101~104。 The transaction device 100 may be a server of a blockchain transaction platform. The transaction device 100 includes a memory 10 , a processor 20 , and a transaction program 30 stored in the memory 10 and executable on the processor 20 . When the processor 20 executes the transaction program 30 , the steps in the transaction method embodiment are implemented, for example, steps S1 to S4 shown in FIG. 3 . Alternatively, when the processor 20 executes the transaction program 30 , the functions of each module in the embodiment of the transaction program, such as modules 101 to 104 in FIG. 2 , are implemented.

所述交易程式30可以被分割成一個或多個模組,所述一個或者多個模組被存儲在所述記憶體10中,並由所述處理器20執行,以完成本發明。所 述一個或多個模組可以是能夠完成特定功能的一系列電腦程式指令段,所述指令段用於描述所述交易程式30在所述交易裝置100中的執行過程。例如,所述交易程式30可以被分割成圖2中的生成模組101、許可模組102、撤銷模組103、及更新模組104。各模組具體功能參見下圖2中各模組的功能。 The transaction program 30 can be divided into one or more modules, and the one or more modules are stored in the memory 10 and executed by the processor 20 to complete the present invention. Place The one or more modules may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the transaction program 30 in the transaction device 100 . For example, the transaction program 30 can be divided into a generation module 101, a license module 102, a revocation module 103, and an update module 104 in FIG. 2 . For the specific functions of each module, please refer to the function of each module in Figure 2 below.

本領域技術人員可以理解,所述示意圖僅是交易裝置100的示例,並不構成對交易裝置100的限定,可以包括比圖示更多或更少的部件,或者組合某些部件,或者不同的部件,例如所述交易裝置100還可以包括網路接入設備、匯流排等。 Those skilled in the art can understand that the schematic diagram is only an example of the transaction device 100, and does not constitute a limitation on the transaction device 100, and may include more or less components than the one shown, or combine some components, or different Components, for example, the transaction apparatus 100 may also include network access equipment, bus bars, and the like.

所稱處理器20可以是中央處理單元(Central Processing Unit,CPU),還可以是其他通用處理器、數位訊號處理器(Digital Signal Processor,DSP)、專用積體電路(Application Specific Integrated Circuit,ASIC)、現成可程式設計閘陣列(Field-Programmable Gate Array,FPGA)或者其他可程式設計邏輯器件、分立門或者電晶體邏輯器件、分立硬體元件等。通用處理器可以是微處理器或者所述處理器20也可以是任何常規的處理器等,所述處理器20可以利用各種介面和匯流排連接交易裝置100的各個部分。 The so-called processor 20 may be a central processing unit (Central Processing Unit, CPU), and may also be other general-purpose processors, digital signal processors (Digital Signal Processors, DSP), dedicated integrated circuits (Application Specific Integrated Circuit, ASIC) , Off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor 20 may be any conventional processor, etc. The processor 20 may utilize various interfaces and busbars to connect various parts of the transaction device 100 .

所述記憶體10可用於存儲所述交易程式30和/或模組,所述處理器20通過運行或執行存儲在所述記憶體10內的電腦程式和/或模組,以及調用存儲在記憶體10內的資料,實現所述交易裝置100的各種功能。所述記憶體10可以包括高速隨機存取記憶體,還可以包括非易失性記憶體,例如硬碟、記憶體、插接式硬碟,智慧存儲卡(Smart Media Card,SMC),安全數位(Secure Digital,SD) 卡,快閃記憶體卡(Flash Card)、至少一個磁碟記憶體件、快閃記憶體器件、或其他非易失性固態記憶體件。 The memory 10 can be used to store the transaction programs 30 and/or modules, and the processor 20 executes or executes the computer programs and/or modules stored in the memory 10, and calls the The data in the body 10 can realize various functions of the transaction device 100 . The memory 10 may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, Smart Media Card (SMC), Secure Digital (Secure Digital, SD) Card, Flash Card, at least one disk memory device, flash memory device, or other non-volatile solid state memory device.

圖2為本發明交易程式較佳實施例的功能模組圖。 FIG. 2 is a functional module diagram of a preferred embodiment of the transaction program of the present invention.

參閱圖2所示,交易程式30可以包括生成模組101、許可模組102、撤銷模組103、及更新模組104。在一實施方式中,上述模組可以為存儲於所述記憶體10中且可被所述處理器20調用執行的可程式化軟體指令。可以理解的是,在其他實施方式中,上述模組也可為固化於所述處理器20中的程式指令或固件(firmware)。 Referring to FIG. 2 , the transaction program 30 may include a generation module 101 , a license module 102 , a revocation module 103 , and an update module 104 . In one embodiment, the above-mentioned modules may be programmable software instructions stored in the memory 10 and invoked by the processor 20 for execution. It can be understood that, in other embodiments, the above-mentioned module can also be a program instruction or firmware solidified in the processor 20 .

所述生成模組101,用於接收第一使用者發起的資產移轉請求,並根據所述資產移轉請求生成資產移轉許可,所述資產移轉許可包括與所述第一使用者對應的第一帳戶地址、與第二使用者對應的第二帳戶地址、移轉資產內容以及第一時間條件,所述資產移轉許可表明在當前區塊鏈的時間滿足所述第一時間條件時,允許從所述第一帳戶地址移轉所述移轉資產內容所指定的資產至所述第二帳戶地址。 The generating module 101 is configured to receive an asset transfer request initiated by a first user, and generate an asset transfer license according to the asset transfer request, where the asset transfer license includes a corresponding asset transfer license corresponding to the first user. The first account address, the second account address corresponding to the second user, the content of the transferred assets, and the first time condition, the asset transfer permission indicates that when the current blockchain time satisfies the first time condition , allowing the asset specified by the transfer asset content to be transferred from the first account address to the second account address.

在本較佳實施例中,所述資產移轉許可通過映射的形式存儲,通過所述第一帳戶地址可以獲取所述第二帳戶地址、所述移轉資產內容以及所述第一時間條件。所述移轉資產內容所指定的資產為第一代幣(Token)數量。所述第一時間條件為晚於預設第一時間、早於預設第一時間或者在預設第一時間範圍內。例如,所述移轉資產許可為「帳戶地址A=>帳戶地址B=>第一時間點=> 第一Token數量」,表明帳戶地址A允許帳戶地址B在所述第一時間點之後移轉所述帳戶地址A中指定的第一Token數量。如此,可實現類似簽發支票的功能。 In this preferred embodiment, the asset transfer permission is stored in the form of mapping, and the second account address, the content of the transferred asset and the first time condition can be acquired through the first account address. The asset specified by the content of the transferred asset is the quantity of the first token (Token). The first time condition is later than the preset first time, earlier than the preset first time or within the preset first time range. For example, the asset transfer permission is "account address A=>account address B=>first time point=> "Number of First Tokens", indicating that account address A allows account address B to transfer the first number of tokens specified in account address A after the first time point. In this way, a function similar to issuing a check can be achieved.

如果當前區塊鏈的時間滿足所述第一時間條件時,所述許可模組102允許從所述第一帳戶地址移轉所述移轉資產內容所指定的資產至所述第二帳戶地址。 If the time of the current blockchain satisfies the first time condition, the permission module 102 allows the asset specified by the transfer asset content to be transferred from the first account address to the second account address.

如果當前區塊鏈的時間不滿足所述第一時間條件時,所述許可模組102不允許從所述第一帳戶地址移轉所述移轉資產內容所指定的資產至所述第二帳戶地址。 If the time of the current blockchain does not meet the first time condition, the permission module 102 does not allow the transfer of the asset specified by the transfer asset content from the first account address to the second account address.

可以理解,如果當前區塊鏈的時間不滿足所述第一時間條件時,所述生成模組101還用於接收所述第一使用者發起的撤銷資產移轉請求,所述撤銷模組103,用於根據所述撤銷資產移轉請求撤銷從所述第一帳戶地址移轉所述移轉資產內容所指定的資產至所述第二帳戶地址的許可。 It can be understood that if the time of the current blockchain does not meet the first time condition, the generation module 101 is further configured to receive a revocation asset transfer request initiated by the first user, and the revocation module 103 is used to revoke the permission to transfer the asset specified by the content of the transferred asset from the first account address to the second account address according to the asset transfer revocation request.

可以理解,如果當前區塊鏈的時間不滿足所述第一時間條件時,所述生成模組101還接收所述第一使用者發起的修改資產移轉請求,所述更新模組104,用於根據所述修改資產移轉請求修改所移轉資產內容或者所述第一時間條件中至少一項。 It can be understood that if the time of the current blockchain does not meet the first time condition, the generation module 101 also receives the modification asset transfer request initiated by the first user, and the update module 104 uses at least one of the content of the transferred asset or the first time condition is modified according to the modified asset transfer request.

所述生成模組101,還用於接收所述第二使用者發起的資產交易請求,並根據所述資產交易請求生成資產交易許可,所述資產交易許可包括所述第二帳戶地址、與第三使用者對應的第三帳戶地址、交易資產內容及第二時間 條件。所述資產交易許可表明在當前區塊鏈的時間滿足所述第二時間條件時,允許所述第二使用者與所述第三使用者根據所述交易資產內容進行交易。 The generating module 101 is further configured to receive an asset transaction request initiated by the second user, and generate an asset transaction license according to the asset transaction request, where the asset transaction license includes the second account address, and the first The third account address, transaction asset content and second time corresponding to the three users condition. The asset transaction permission indicates that when the current blockchain time meets the second time condition, the second user and the third user are allowed to conduct transactions according to the transaction asset content.

可以理解,所述第一使用者與所述第三使用者可以為同一使用者,所述第一帳戶地址與所述第三帳戶地址相同,此時,所述第二使用者與所述第一使用者直接進行交易。所述第一使用者與所述第三使用者也可以為不同的使用者,所述第一帳戶地址與所述第三帳戶地址也可以不相同。此時,所述第二使用者與不同於所述第一使用者的第三使用者進行交易。 It can be understood that the first user and the third user may be the same user, and the first account address and the third account address are the same. In this case, the second user and the third account address A user conducts transactions directly. The first user and the third user may also be different users, and the first account address and the third account address may also be different. At this time, the second user conducts a transaction with a third user different from the first user.

在本較佳實施例中,所述資產交易許可通過映射的形式存儲,通過所述第二帳戶地址可以獲取所述第三帳戶地址、所述交易資產內容以及所述第二時間條件。所述交易資產內容為第二Token數量。所述第二時間條件為晚於預設第二時間、早於預設第二時間或者在預設第二時間範圍內。例如,所述交易資產許可為「帳戶地址B=>帳戶地址C=>第二時間點=>第二Token數量」,表明帳戶地址B允許帳戶地址C在所述第二時間點之後交易指定的第二Token數量。如此,可實現類似兌現支票功能。 In this preferred embodiment, the asset transaction permission is stored in the form of a map, and the third account address, the transaction asset content and the second time condition can be obtained through the second account address. The content of the transaction asset is the quantity of the second Token. The second time condition is later than the preset second time, earlier than the preset second time, or within the preset second time range. For example, the transaction asset permission is "account address B=>account address C=>second time point=>second token quantity", indicating that account address B allows account address C to trade specified assets after the second time point Number of second tokens. In this way, a function similar to cashing a check can be achieved.

如果當前區塊鏈的時間滿足所述第二時間條件時,所述許可模組102允許所述第二使用者與所述第三使用者根據所述交易資產內容進行交易。 If the time of the current blockchain satisfies the second time condition, the permission module 102 allows the second user and the third user to conduct transactions according to the content of the transaction assets.

可以理解,如果當前區塊鏈的時間不滿足所述第二時間條件時,所述許可模組102不允許所述第二使用者與所述第三使用者根據所述交易資產內容進行交易。 It can be understood that, if the time of the current blockchain does not meet the second time condition, the permission module 102 does not allow the second user and the third user to conduct transactions according to the content of the transaction assets.

可以理解,如果當前區塊鏈的時間不滿足所述第二時間條件時,所述撤銷模組103還接收所述第二使用者發起的撤銷資產交易請求,並根據所述撤銷資產交易請求撤銷所述第二使用者與所述第三使用者根據所述交易資產內容進行交易的許可。 It can be understood that, if the time of the current blockchain does not meet the second time condition, the revocation module 103 also receives the request for revoking the asset transaction initiated by the second user, and revokes the request for revoking the asset transaction according to the revocation request. Permission to conduct transactions between the second user and the third user according to the transaction asset content.

可以理解,如果當前區塊鏈的時間不滿足所述第二時間條件時,所述更新模組104還接收所述第二使用者發起的修改資產交易請求,並根據所述修改資產交易請求修改所述資產交易內容或者所述第二時間條件中至少一項。 It can be understood that, if the time of the current blockchain does not meet the second time condition, the update module 104 also receives the modification asset transaction request initiated by the second user, and modifies the asset transaction request according to the modification asset transaction request. At least one of the asset transaction content or the second time condition.

圖3為本發明一實施方式中交易方法的流程圖。根據不同的需求,所述流程圖中步驟的順序可以改變,某些步驟可以省略。 FIG. 3 is a flowchart of a transaction method in an embodiment of the present invention. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.

步驟S1,所述生成模組101接收第一使用者發起的資產移轉請求,並根據所述資產移轉請求生成資產移轉許可,所述資產移轉許可包括與所述第一使用者對應的第一帳戶地址、與第二使用者對應的第二帳戶地址、移轉資產內容以及第一時間條件,所述資產移轉許可表明在當前區塊鏈的時間滿足所述第一時間條件時,允許從所述第一帳戶地址移轉所述移轉資產內容所指定的資產至所述第二帳戶地址。 In step S1, the generation module 101 receives an asset transfer request initiated by a first user, and generates an asset transfer license according to the asset transfer request, and the asset transfer license includes a corresponding asset transfer license corresponding to the first user. The first account address, the second account address corresponding to the second user, the content of the transferred assets, and the first time condition, the asset transfer permission indicates that when the current blockchain time satisfies the first time condition , allowing the asset specified by the transfer asset content to be transferred from the first account address to the second account address.

在本較佳實施例中,所述資產移轉許可通過映射的形式存儲,通過所述第一帳戶地址可以獲取所述第二帳戶地址、所述移轉資產內容以及所述第一時間條件。所述移轉資產內容所指定的資產為第一代幣(Token)數量。所述第一時間條件為晚於預設第一時間、早於預設第一時間或者在預設第一時間範圍內。例如,所述移轉資產許可為「帳戶地址A=>帳戶地址B=>第一時間點=> 第一Token數量」,表明帳戶地址A允許帳戶地址B在所述第一時間點之後移轉所述帳戶地址A中指定的第一Token數量。如此,可實現類似簽發支票的功能。 In this preferred embodiment, the asset transfer permission is stored in the form of mapping, and the second account address, the content of the transferred asset and the first time condition can be acquired through the first account address. The asset specified by the content of the transferred asset is the quantity of the first token (Token). The first time condition is later than the preset first time, earlier than the preset first time or within the preset first time range. For example, the asset transfer permission is "account address A=>account address B=>first time point=> "Number of First Tokens", indicating that account address A allows account address B to transfer the first number of tokens specified in account address A after the first time point. In this way, a function similar to issuing a check can be achieved.

步驟S2,如果當前區塊鏈的時間滿足所述第一時間條件時,所述許可模組102允許從所述第一帳戶地址移轉所述移轉資產內容所指定的資產至所述第二帳戶地址。 Step S2, if the time of the current blockchain satisfies the first time condition, the permission module 102 allows the asset specified by the transfer asset content to be transferred from the first account address to the second. account address.

可以理解,如果當前區塊鏈的時間不滿足所述第一時間條件時,所述許可模組102不允許從所述第一帳戶地址移轉所述移轉資產內容所指定的資產至所述第二帳戶地址。 It can be understood that if the time of the current blockchain does not meet the first time condition, the permission module 102 does not allow the transfer of the assets specified by the content of the transferred assets from the first account address to the Second account address.

可以理解,如果當前區塊鏈的時間不滿足所述第一時間條件時,所述生成模組101接收所述第一使用者發起的撤銷資產移轉請求,所述撤銷模組103根據所述撤銷資產移轉請求撤銷從所述第一帳戶地址移轉所述移轉資產內容所指定的資產至所述第二帳戶地址的許可。 It can be understood that if the time of the current blockchain does not meet the first time condition, the generation module 101 receives the revocation asset transfer request initiated by the first user, and the revocation module 103 according to the The revocation asset transfer request revokes permission to transfer the asset specified by the transfer asset content from the first account address to the second account address.

可以理解,如果當前區塊鏈的時間不滿足所述第一時間條件時,所述生成模組101還接收所述第一使用者發起的修改資產移轉請求,所述更新模組104根據所述修改資產移轉請求修改所移轉資產內容或者所述第一時間條件中至少一項。 It can be understood that, if the time of the current blockchain does not meet the first time condition, the generation module 101 also receives the modification asset transfer request initiated by the first user, and the update module 104 The modified asset transfer request modifies at least one of the transferred asset content or the first time condition.

步驟S3,所述生成模組101接收所述第二使用者發起的資產交易請求,並根據所述資產交易請求生成資產交易許可,所述資產交易許可包括所述第二帳戶地址、與第三使用者對應的第三帳戶地址、交易資產內容及第二時間 條件。所述資產交易許可表明在當前區塊鏈的時間滿足所述第二時間條件時,允許所述第二使用者與所述第三使用者根據所述交易資產內容進行交易。 Step S3, the generation module 101 receives the asset transaction request initiated by the second user, and generates an asset transaction license according to the asset transaction request, and the asset transaction license includes the second account address, and the third account address. User's corresponding third account address, transaction asset content and second time condition. The asset transaction permission indicates that when the current blockchain time meets the second time condition, the second user and the third user are allowed to conduct transactions according to the transaction asset content.

在本較佳實施例中,所述資產交易許可通過映射的形式存儲,通過所述第二帳戶地址可以獲取所述第三帳戶地址、所述交易資產內容以及所述第二時間條件。所述交易資產內容為第二Token數量。所述第二時間條件為晚於預設第二時間、早於預設第二時間或者在預設第二時間範圍內。例如,所述交易資產許可為「帳戶地址B=>帳戶地址C=>第二時間點=>第二Token數量」,表明帳戶地址B允許帳戶地址C在所述第二時間點之後交易指定的第二Token數量。如此,可實現類似兌現支票功能。 In this preferred embodiment, the asset transaction permission is stored in the form of a map, and the third account address, the transaction asset content and the second time condition can be obtained through the second account address. The content of the transaction asset is the quantity of the second Token. The second time condition is later than the preset second time, earlier than the preset second time, or within the preset second time range. For example, the transaction asset permission is "account address B=>account address C=>second time point=>second token quantity", indicating that account address B allows account address C to trade specified assets after the second time point Number of second tokens. In this way, a function similar to cashing a check can be achieved.

可以理解,所述第一使用者與所述第三使用者可以為同一使用者,所述第一帳戶與所述第三帳戶相同。此時,所述第二使用者與所述第一使用者直接進行交易。所述第一使用者與所述第三使用者也可以為不同的使用者,所述第一帳戶地址與所述第三帳戶地址也可以不相同。此時,所述第二使用者與不同於所述第一使用者的第三使用者進行交易。 It can be understood that the first user and the third user may be the same user, and the first account and the third account are the same. At this time, the second user conducts transactions directly with the first user. The first user and the third user may also be different users, and the first account address and the third account address may also be different. At this time, the second user conducts a transaction with a third user different from the first user.

步驟S4,如果當前區塊鏈的時間滿足所述第二時間條件時,所述許可模組102允許所述第二使用者與所述第三使用者根據所述交易資產內容進行交易。 Step S4, if the time of the current blockchain satisfies the second time condition, the permission module 102 allows the second user and the third user to conduct transactions according to the content of the transaction assets.

可以理解,如果當前區塊鏈的時間不滿足所述第二時間條件時,所述許可模組102不允許所述第二使用者與所述第三使用者根據所述交易資產內容進行交易。 It can be understood that, if the time of the current blockchain does not meet the second time condition, the permission module 102 does not allow the second user and the third user to conduct transactions according to the content of the transaction assets.

可以理解,如果當前區塊鏈的時間不滿足所述第二時間條件時,所述生成模組101還接收所述第二使用者發起的撤銷資產交易請求,所述撤銷模組103根據所述撤銷資產交易請求撤銷所述第二使用者與所述第三使用者根據所述交易資產內容進行交易的許可。 It can be understood that if the time of the current blockchain does not meet the second time condition, the generation module 101 also receives a request for revocation of an asset transaction initiated by the second user, and the revocation module 103 according to the The asset transaction revocation request revokes the permission of the second user and the third user to conduct transactions according to the transaction asset content.

可以理解,如果當前區塊鏈的時間不滿足所述第二時間條件時,所述生成模組101還接收所述第二使用者發起的修改資產交易請求,所述更新模組104根據所述修改資產交易請求修改所述資產交易內容或者所述第二時間條件中至少一項。 It can be understood that if the time of the current blockchain does not meet the second time condition, the generation module 101 also receives a request to modify the asset transaction initiated by the second user, and the update module 104 according to the Modifying the asset transaction requests to modify at least one of the asset transaction content or the second time condition.

上述基於區塊鏈的交易裝置、方法及可讀存儲介質,在區塊鏈網路中進行交易時,可對交易的時間進行限制,實現類似支票簽發、兌換等功能,更具靈活性。 The above-mentioned blockchain-based transaction device, method and readable storage medium can limit the time of the transaction when conducting transactions in the blockchain network, and realize functions such as check issuance and exchange, which are more flexible.

對本領域的技術人員來說,可以根據本發明的發明方案和發明構思結合生產的實際需要做出其他相應的改變或調整,而這些改變和調整都應屬於本發明所公開的範圍。 For those skilled in the art, other corresponding changes or adjustments can be made according to the inventive solution and inventive concept of the present invention combined with the actual needs of production, and these changes and adjustments should all belong to the scope disclosed by the present invention.

100:基於區塊鏈的交易裝置 100: Blockchain-based transaction device

10:記憶體 10: Memory

20:處理器 20: Processor

30:基於區塊鏈的交易程式 30: Blockchain-based transaction programs

Claims (9)

一種基於區塊鏈的交易方法,其改良在於,所述方法包括:接收第一使用者發起的資產移轉請求;根據所述資產移轉請求生成資產移轉許可,所述資產移轉許可包括與所述第一使用者對應的第一帳戶地址、與第二使用者對應的第二帳戶地址、移轉資產內容以及第一時間條件;如果當前區塊鏈的時間滿足所述第一時間條件時,允許從所述第一帳戶地址移轉所述移轉資產內容所指定的資產至所述第二帳戶地址;如果當前區塊鏈的時間不滿足所述第一時間條件時,不允許將所述資產從第一帳戶地址移轉至所述第二帳戶地址;接收所述第二使用者發起的資產交易請求;根據所述資產交易請求生成資產交易許可,所述資產交易許可包括所述第二帳戶地址、與所述第三使用者對應的第三帳戶地址、交易資產內容及第二時間條件;如果當前區塊鏈的時間滿足所述第二時間條件時,允許所述第二使用者與所述第三使用者根據所述交易資產內容進行交易;如果當前區塊鏈的時間不滿足所述第二時間條件時,不允許所述第二使用者與所述第三使用者根據所述交易資產內容進行交易。 A transaction method based on blockchain, the improvement is that the method comprises: receiving an asset transfer request initiated by a first user; generating an asset transfer license according to the asset transfer request, wherein the asset transfer license includes The address of the first account corresponding to the first user, the address of the second account corresponding to the second user, the content of the transferred assets, and the first time condition; if the current blockchain time satisfies the first time condition is allowed to transfer the assets specified by the content of the transferred assets from the first account address to the second account address; if the current blockchain time does not meet the first time condition, it is not allowed to transfer the assets specified by the transfer asset content to the second account address; The asset is transferred from the first account address to the second account address; an asset transaction request initiated by the second user is received; an asset transaction permission is generated according to the asset transaction request, and the asset transaction permission includes the The second account address, the third account address corresponding to the third user, the content of the transaction assets and the second time condition; if the time of the current blockchain meets the second time condition, the second use is allowed The user and the third user conduct transactions according to the content of the transaction assets; if the time of the current blockchain does not meet the second time condition, the second user and the third user are not allowed to The transaction asset content is traded. 如請求項1所述的基於區塊鏈的交易方法,其中所述第一使用者與所述第三使用者為同一使用者,所述第一帳戶地址與所述第三帳戶地址相同。 The blockchain-based transaction method according to claim 1, wherein the first user and the third user are the same user, and the first account address and the third account address are the same. 如請求項1所述的基於區塊鏈的交易方法,其中所述方法還包括:如果當前區塊鏈的時間不滿足所述第一時間條件時,接收所述第一使用者發起的撤銷資產移轉請求;以及根據所述撤銷資產移轉請求撤銷從所述第一帳戶地址移轉所述移轉資產內容所指定的資產至所述第二帳戶地址的許可。 The blockchain-based transaction method according to claim 1, wherein the method further comprises: if the time of the current blockchain does not meet the first time condition, receiving a withdrawal of assets initiated by the first user a transfer request; and revoking permission to transfer the asset specified by the transfer asset content from the first account address to the second account address according to the revocation asset transfer request. 如請求項1所述的基於區塊鏈的交易方法,其中所述方法還包括:如果當前區塊鏈的時間不滿足所述第一時間條件時,接收所述第一使用者發起的修改資產移轉請求;以及根據所述修改資產移轉請求修改所述移轉資產內容或者所述第一時間條件中至少一項。 The blockchain-based transaction method according to claim 1, wherein the method further comprises: if the time of the current blockchain does not meet the first time condition, receiving a modified asset initiated by the first user a transfer request; and modifying at least one of the transferred asset content or the first time condition according to the modified asset transfer request. 如請求項1所述的基於區塊鏈的交易方法,其中所述方法還包括:如果當前區塊鏈的時間不滿足所述第二時間條件時,接收所述第二使用者發起的撤銷資產交易請求;以及根據所述撤銷資產交易請求撤銷所述第二使用者與所述第三使用者根據所述交易資產內容進行交易的許可。 The blockchain-based transaction method according to claim 1, wherein the method further comprises: if the time of the current blockchain does not meet the second time condition, receiving a withdrawal of assets initiated by the second user a transaction request; and revoking the permission of the second user and the third user to conduct transactions according to the transaction asset content according to the revocation asset transaction request. 如請求項1所述的基於區塊鏈的交易方法,其中所述方法還包括:如果當前區塊鏈的時間不滿足所述第二時間條件時,接收所述第二使用者發起的修改資產交易請求;以及根據所述修改資產交易請求修改所述資產交易內容或者所述第二時間條件中至少一項。 The blockchain-based transaction method according to claim 1, wherein the method further comprises: if the time of the current blockchain does not meet the second time condition, receiving a modified asset initiated by the second user a transaction request; and modifying at least one of the asset transaction content or the second time condition according to the modification asset transaction request. 如請求項1所述的基於區塊鏈的交易方法,其中所述資產移轉請求及所述資產交易請求通過映射的形成存儲,通過所述第一帳戶地址可以獲取所述第二帳戶地址、所述移轉資產內容以及所述第一時間條件,通過所述第二帳戶地址可以獲取所述第三帳戶地址、所述交易資產內容及所述第二時間條件。 The blockchain-based transaction method according to claim 1, wherein the asset transfer request and the asset transaction request are stored through mapping, and the second account address, The content of the transferred asset and the first time condition can be obtained through the second account address, the third account address, the content of the transaction asset and the second time condition. 一種基於區塊鏈的交易裝置,所述裝置包括處理器及記憶體,所述記憶體上存儲有若干電腦程式,其改良在於,所述處理器用於執行記憶體中存儲的電腦程式時實現如請求項1至7任一項所述的基於區塊鏈的交易方法的步驟。 A transaction device based on block chain, the device includes a processor and a memory, and a number of computer programs are stored on the memory. The improvement is that when the processor is used to execute the computer program stored in the memory, the The steps of the blockchain-based transaction method described in any one of claim items 1 to 7. 一種電腦可讀存儲介質,其改良在於,所述電腦可讀存儲介質存儲有多條指令,多條所述指令可被一個或者多個處理器執行,以實現如請求項1至7任一項所述的基於區塊鏈的交易方法的步驟。 A computer-readable storage medium, which is improved in that the computer-readable storage medium stores a plurality of instructions, and a plurality of the instructions can be executed by one or more processors, so as to realize any one of claim 1 to 7 The steps of the blockchain-based transaction method.
TW109128321A 2020-08-19 2020-08-19 Transaction method, device, and storage medium based on blockchain TWI770585B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW109128321A TWI770585B (en) 2020-08-19 2020-08-19 Transaction method, device, and storage medium based on blockchain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW109128321A TWI770585B (en) 2020-08-19 2020-08-19 Transaction method, device, and storage medium based on blockchain

Publications (2)

Publication Number Publication Date
TW202209210A TW202209210A (en) 2022-03-01
TWI770585B true TWI770585B (en) 2022-07-11

Family

ID=81747088

Family Applications (1)

Application Number Title Priority Date Filing Date
TW109128321A TWI770585B (en) 2020-08-19 2020-08-19 Transaction method, device, and storage medium based on blockchain

Country Status (1)

Country Link
TW (1) TWI770585B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160275461A1 (en) * 2015-03-20 2016-09-22 Rivetz Corp. Automated attestation of device integrity using the block chain
TW201842476A (en) * 2017-04-18 2018-12-01 安地卡及巴布達商區塊鏈控股有限公司 Computer-implemented system and method for performing transaction mixing on a blockchain
CN111275422A (en) * 2020-01-22 2020-06-12 腾讯科技(深圳)有限公司 Data transfer method, device and equipment based on block chain
CN111369259A (en) * 2020-03-10 2020-07-03 北京意锐新创科技有限公司 Payment method and device suitable for block chain support

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160275461A1 (en) * 2015-03-20 2016-09-22 Rivetz Corp. Automated attestation of device integrity using the block chain
TW201842476A (en) * 2017-04-18 2018-12-01 安地卡及巴布達商區塊鏈控股有限公司 Computer-implemented system and method for performing transaction mixing on a blockchain
CN111275422A (en) * 2020-01-22 2020-06-12 腾讯科技(深圳)有限公司 Data transfer method, device and equipment based on block chain
CN111369259A (en) * 2020-03-10 2020-07-03 北京意锐新创科技有限公司 Payment method and device suitable for block chain support

Also Published As

Publication number Publication date
TW202209210A (en) 2022-03-01

Similar Documents

Publication Publication Date Title
TWI735820B (en) Asset management method and device, electronic equipment
TWI705346B (en) Transaction method and system based on centralized settlement and blockchain deposit certificate
TWI713840B (en) Digital certificate management method, device and electronic equipment
TWI759563B (en) Asset management method and device, electronic equipment
TWI715916B (en) Method and device for credit evaluation of copyright users based on blockchain
TW202022857A (en) Invoice creating method and device based on block chain and electronic device
AU2019272129A1 (en) Blockchain-based copyright revenue allocation methods and apparatuses
TW202008207A (en) Method, apparatus and electronic device for blockchain-based asset issuance
TWI706663B (en) Data storage method and system based on multiple blockchain networks
TW202008235A (en) Transaction method and system based on centralized settlement and block chain storage
TW202008195A (en) Benefit distribution method and device, electronic device
TW201822033A (en) Resource processing method and apparatus
US11790119B2 (en) Application integrity attestation
US20190095910A1 (en) Secure cryptocurrency exchange
CN110135993B (en) Method, equipment and storage medium for adapting UTXO model to intelligent contract account model
TWI706664B (en) Data storage method and system based on multiple blockchain networks
TW202036441A (en) Data reading method based on a plurality of block chain networks and system
WO2020019792A1 (en) Block release method and apparatus, and electronic device
CN114078007A (en) Transaction method and device based on block chain and readable storage medium
US11816251B2 (en) Method for managing data asset in data bank and data bank system
TWI770585B (en) Transaction method, device, and storage medium based on blockchain
CN107517256B (en) Information distribution method and device
CN112529647B (en) Block chain-based commodity transaction method, device and computer equipment
CN112907245A (en) Key management method and device in block chain, electronic equipment and storage medium
TW202020687A (en) Data reading method and system based on plurality of block chain networks