WO2020134930A1 - 一种基于区块链的数字资产有效期处理的方法及装置 - Google Patents
一种基于区块链的数字资产有效期处理的方法及装置 Download PDFInfo
- Publication number
- WO2020134930A1 WO2020134930A1 PCT/CN2019/123103 CN2019123103W WO2020134930A1 WO 2020134930 A1 WO2020134930 A1 WO 2020134930A1 CN 2019123103 W CN2019123103 W CN 2019123103W WO 2020134930 A1 WO2020134930 A1 WO 2020134930A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- validity period
- asset
- time stamp
- blockchain
- transaction information
- Prior art date
Links
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
- G06Q10/00—Administration; Management
- G06Q10/10—Office automation; Time management
- G06Q10/109—Time management, e.g. calendars, reminders, meetings or time accounting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/64—Protecting data integrity, e.g. using checksums, certificates or 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
Definitions
- Embodiments of the present invention relate to the field of blockchain technology, and in particular, to a method and device for processing the validity period of digital assets based on blockchain.
- the authentication of the validity period of the existing digital assets is carried out in the database, which results in the corresponding operation being tamperable and low reliability. Because only the issuance record is stored in the blockchain, and there is no single digital asset issuance time and expiration time attribute, it is impossible to track the expiry record of the validity period of the single digital asset on the blockchain. Therefore, other institutions or users cannot query the entire record of digital assets from generation to expiration on the blockchain, and cannot ensure the reliability of digital asset expiration operations.
- Embodiments of the present invention provide a method and device for processing the validity period of digital assets based on a blockchain, to implement the management of the validity period of digital assets on the blockchain, and to ensure the reliability of the expiration operation of digital assets.
- the validity period management of digital assets is recorded on the blockchain, ensuring the complete life cycle of digital assets in the blockchain. Is checkable, ensuring credibility.
- the generating transaction information with the validity period attribute based on the asset validity period and the issue date time stamp and the expiration date time stamp includes:
- the issuance date time stamp is also set with a priority determined according to the asset issuance date.
- the method further includes:
- the method further includes:
- an embodiment of the present invention also provides a block-based digital asset validity period processing device, including:
- the acquisition unit is used to acquire the validity period of the asset as well as the issuance date time stamp and the expiration date time stamp when the digital asset is issued;
- the processing unit is used to determine the transaction information with the validity period attribute according to the asset validity period, the issuance date time stamp and the expiration date time stamp;
- processing unit is specifically used to:
- the issuance date time stamp is also set with a priority determined according to the asset issuance date.
- processing unit is also used to:
- processing unit is also used to:
- the transaction information with the validity period attribute is uploaded to the blockchain, it is verified whether the expiration date has reached the asset validity period, and if so, the expiration operation is performed and the digital asset transaction information storage is deleted To the blockchain.
- an embodiment of the present invention also provides a computer-readable storage medium that stores computer-executable instructions, and the computer-executable instructions are used to cause the computer to execute the above-described blockchain-based The method of dealing with the validity of digital assets.
- an embodiment of the present invention also provides a computing device, including:
- Memory used to store program instructions
- the processor is configured to call the program instructions stored in the memory and execute the method for processing the validity period of the digital asset based on the blockchain according to the obtained program.
- FIG. 1 is a schematic diagram of a system architecture provided by an embodiment of the present invention
- FIG. 2 is a schematic flowchart of a digital asset validity period processing based on a blockchain provided by an embodiment of the present invention
- FIG. 3 is a schematic structural diagram of a block provided by an embodiment of the present invention.
- FIG. 4 is a schematic structural diagram of a block provided by an embodiment of the present invention.
- FIG. 5 is a schematic diagram of a system architecture provided by an embodiment of the present invention.
- FIG. 6 is a schematic structural diagram of a blockchain-based digital asset validity period processing device according to an embodiment of the present invention.
- FIG. 7 is a schematic diagram of a hardware structure of a computing device according to an embodiment of the present invention.
- FIG. 1 is a system architecture applicable to an embodiment of the present invention.
- the system architecture may include a client 100, a server 200, and a blockchain platform 300.
- the client 100 and the server 200 may be connected to the blockchain platform through the network.
- FIG. 1 the structure shown in FIG. 1 above is just an example, which is not limited by the embodiment of the present invention.
- FIG. 2 exemplarily shows a flow of a method for processing the validity period of a digital asset based on a blockchain provided by an embodiment of the present invention, and the flow may be executed by a device for processing the validity period of a digital asset based on a blockchain .
- the process specifically includes:
- step 201 when the digital asset is issued, the asset validity period, the issuance date time stamp and the expiration date time stamp are obtained.
- NTP Network Time Protocol
- Institutions set asset validity periods when digital assets are issued, and automatically generate issue date time stamps and expiration date time stamps when generating transaction information.
- Step 202 Generate transaction information with the validity period attribute according to the asset validity period, the issuance date time stamp and the expiration date time stamp.
- the asset validity period, issuance date time stamp and expiration date time stamp can be written into the transaction information of the digital asset, where the transaction information also includes the modification date time stamp.
- the modification date timestamp attribute is reserved in the transaction information, and the timestamp is the standard time obtained from the National Time Service Center.
- the above asset validity period, as well as the issue date time stamp and expiration date time stamp are written into the transaction information, that is, the blocks in the blockchain.
- the difference from the existing block storage records of transaction information is that the block body adds the release time, expiration time and change time, as shown in Figure 4.
- the issuance time indicates the start time of the asset life cycle and the priority of the asset consumption operation.
- the expiration time marks the time when the points are due to be used for smart contract verification.
- the change time stores the time when the validity period changes.
- Step 203 Store the transaction information with the validity period attribute to the blockchain.
- the transaction information After generating the transaction information with the validity period attribute, the transaction information can be stored in the blockchain after consensus.
- the institution calls the smart contract that implements the written update operation through the client, adds the modification date time stamp to the transaction information, and modifies the corresponding validity period time stamp .
- the corresponding blockchain nodes conduct consensus, that is, each node runs a smart contract to verify the relevant information of the expiration operation of the digital asset. By verifying whether the expiration date is met, the expiration operation is agreed.
- the corresponding expiry operation record When the corresponding expiry operation record generates a block, it is connected to the blockchain, and the digital asset in the hands of the corresponding user is declared invalid, and the user cannot use it.
- priority for each transaction information, that is, issue date and time stamp with priority.
- the priority is marked by the validity period of the release date. If the asset release date is earlier, the priority is higher. In other words, the priority is determined based on the asset release date.
- this embodiment uses Fabric as the underlying blockchain platform for digital integration, deploying a smart contract for digital integration expiration operations, modifying the smart contract for the validity period of the integration, using Go language to verify the expiration date, Corresponding points due operation record, on-chain and other functions.
- the transaction information adopts the record with the validity period shown in Figure 4.
- the SDK uses tools independently developed based on the open source Fabric SDK, which is more convenient and faster to use than the original SDK.
- the timer program in the server is written in Java language.
- the steps for expiring digital points and modifying the validity period are as follows:
- the SDK calls the smart contract in the blockchain network that is responsible for the verification of the validity period of the points.
- the smart contract verifies the information of the transaction information and verifies whether the expiration date of the points has arrived. If the expiration verification is met, the relevant deletion operation is completed.
- deleting refers to adding corresponding deletion operation records to the blockchain, rather than deleting records in the original blockchain.
- step 4 Each node conducts consensus. If the verification is completed, the transaction information generated in step 3 is packaged into blocks and connected to the blockchain.
- the platform will set priorities according to the point issuance time of points in the transaction information, and give priority to the points that will be issued first and will expire.
- Each node of the blockchain performs verification. If the verification is passed, the transaction information with the modification date attribute will be uploaded to the blockchain for storage.
- the embodiment of the present invention also provides another process for processing the validity period of digital assets in the implementation scenario.
- Ethereum is adopted as the underlying blockchain platform for the network member's term deposit, and the network member is deployed on it to expire Smart contracts for operations, smart contracts for modifying the validity period of members, and the use of solidity language to implement functions such as checking the expiration date of network members, corresponding member expiration operation records, and on-chain.
- the transaction information adopts a member record with the validity period attribute as shown in FIG. 4, but since it is a network member, the corresponding field should be "how many days to open a website member for a certain user".
- the SDK uses the Ethereum SDK.
- the timer program in the server is written in Java language.
- the SDK calls a smart contract in the blockchain network that is responsible for checking the validity period of network members.
- the smart contract verifies the transaction information and verifies whether the member validity period has expired. If the relevant deletion operation is completed, the deletion refers to the deletion Refers to adding corresponding deletion operation records in the blockchain, not deleting the records in the original blockchain.
- step 4 Each node of the blockchain conducts consensus. If the verification is completed, the transaction information generated in step 3 is packaged into blocks and connected to the blockchain.
- the organization needs to submit an application to modify the membership validity period through its own command-line client.
- the corresponding certificate verification system of the blockchain checks the client who initiated the application If it is satisfied, if it is satisfied, the smart contract for modifying the validity period is called to perform the relevant modification validity period operation.
- Each node of the blockchain performs verification. If the verification passes, the transaction information with the modification date attribute will be uploaded to the blockchain for storage.
- the embodiment of the present invention can ensure the reliability of the operation of the digital asset issued to the user due to the expiration of the institution. Because the expiration operation is completed by setting a scheduled task to operate the smart contract in the blockchain network, human intervention is avoided; each digital asset has the validity period attribute from the time it is issued to the user, avoiding arbitrary tampering by the issuer in the process of points circulation The possibility of the validity period of digital assets; if the institution needs to modify the corresponding validity period halfway, the corresponding modification record will also be recorded on the blockchain. In addition, because the expiration of digital assets is completed in the blockchain, it ensures that the complete life cycle of digital assets can be checked in the ledger, ensuring trustworthiness.
- FIG. 6 exemplarily shows a block-based digital asset validity period processing device according to an embodiment of the present invention.
- the device can execute a block chain-based digital asset validity period processing process.
- the device specifically includes:
- the obtaining unit 601 is used to obtain the asset validity period, the issuance date time stamp and the expiration date time stamp when the digital asset is issued;
- the processing unit 602 is configured to determine the transaction information with the validity period attribute according to the asset validity period, the issuance date time stamp and the expiration date time stamp;
- processing unit 602 is specifically used to:
- the issuance date time stamp is also set with a priority determined according to the asset issuance date.
- processing unit 602 is also used to:
- processing unit 602 is also used to:
- the transaction information with the validity period attribute is uploaded to the blockchain, it is verified whether the expiration date has reached the asset validity period, and if so, the expiration operation is performed and the digital asset transaction information storage is deleted To the blockchain.
- An embodiment of the present invention provides a computing device, including at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program, and when the program is executed by the processing unit, the processing unit Steps of the method of executing the validity period processing of digital assets based on blockchain.
- FIG. 7 it is a schematic diagram of the hardware structure of a computing device according to an embodiment of the present invention.
- the computing device may specifically be a desktop computer, a portable computer, a smart phone, or a tablet computer.
- the computing device may include a memory 701, a processor 702, and a computer program stored on the memory, and when the processor 702 executes the program, any blockchain-based digital asset validity period processing in the above embodiments is implemented Steps of the method.
- the memory 701 may include a read-only memory (ROM) and a random access memory (RAM), and provide the processor 702 with program instructions and data stored in the memory 701.
- ROM read-only memory
- RAM random access memory
- the computing device described in the embodiment of the present invention may further include an input device 703 and an output device 704.
- the input device 703 may include a keyboard, a mouse, a touch screen, etc.;
- the output device 704 may include a display device, such as a liquid crystal display (Liquid Crystal Display, LCD), a cathode ray tube (Cathode Ray Tube, CRT), a touch screen, and the like.
- the memory 701, the processor 702, the input device 703, and the output device 704 may be connected through a bus or in other ways. In FIG. 7, connection through a bus is used as an example.
- the processor 702 calls the program instructions stored in the memory 701 and executes the method for processing the validity period of the digital assets based on the blockchain provided in the foregoing embodiment according to the obtained program instructions.
- An embodiment of the present invention also provides a computer-readable storage medium that stores a computer program that can be executed by a computing device, and when the program runs on the computing device, causes the computing device to execute a blockchain-based digital asset The steps of the expiration date method.
- each flow and/or block in the flowchart and/or block diagram and a combination of the flow and/or block in the flowchart and/or block diagram may be implemented by computer program instructions.
- These computer program instructions can be provided to the processor of a general-purpose computer, special-purpose computer, embedded processing machine, or other programmable data processing device to produce a machine that enables the generation of instructions executed by the processor of the computer or other programmable data processing device
- These computer program instructions may also be stored in a computer readable memory that can guide a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, the instructions
- the device implements the functions specified in one block or multiple blocks of the flowchart one flow or multiple flows and/or block diagrams.
- These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operating steps are performed on the computer or other programmable device to produce computer-implemented processing, which is executed on the computer or other programmable device
- the instructions provide steps for implementing the functions specified in one block or multiple blocks of the flowchart one flow or multiple flows and/or block diagrams.
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Theoretical Computer Science (AREA)
- Human Resources & Organizations (AREA)
- General Physics & Mathematics (AREA)
- Strategic Management (AREA)
- Physics & Mathematics (AREA)
- Marketing (AREA)
- Accounting & Taxation (AREA)
- Computer Security & Cryptography (AREA)
- Finance (AREA)
- Economics (AREA)
- General Business, Economics & Management (AREA)
- Entrepreneurship & Innovation (AREA)
- Technology Law (AREA)
- Bioethics (AREA)
- Tourism & Hospitality (AREA)
- Development Economics (AREA)
- Operations Research (AREA)
- Quality & Reliability (AREA)
- Health & Medical Sciences (AREA)
- Data Mining & Analysis (AREA)
- General Health & Medical Sciences (AREA)
- Computer Hardware Design (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
一种基于区块链的数字资产有效期处理的方法及装置,该方法包括在数字资产发放时,获取资产有效期以及发放日期时间戳和到期日期时间戳(201),根据资产有效期以及发放日期时间戳和到期日期时间戳,确定出具有有效期属性的交易信息(202);将具有有效期属性的交易信息存储至区块链(203)。通过在交易信息中设置资产有效期、发放日期和到期日期等时间戳,将数字资产的有效期管理记录在区块链上,保证了数字资产完整生命周期在区块链中都是可查的,确保了可信性。
Description
相关申请的交叉引用
本申请要求在2018年12月26日提交中国专利局、申请号为201811604736.4、申请名称为“一种基于区块链的数字资产有效期处理的方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本发明实施例涉及区块链技术领域,尤其涉及一种基于区块链的数字资产有效期处理的方法及装置。
现有的数字资产有效期认证在数据库中进行,导致相应的操作可篡改,可靠性低。由于区块链中存放的只有发放记录,而没有单笔数字资产的发放时间及到期时间属性,因此无法在区块链上追踪到单笔数字资产的有效期到期记录。因此,其他机构或用户无法在区块链上查询到数字资产从生成到到期的全程记录,无法确保数字资产到期操作的可靠性。
发明内容
本发明实施例提供一种基于区块链的数字资产有效期处理的方法及装置,用以实现在区块链上管理数字资产的有效期,确保数字资产到期操作的可靠性。
本发明实施例提供的一种基于区块链的数字资产有效期处理的方法,包括:
在数字资产发放时,获取资产有效期以及发放日期时间戳和到期日期时间戳;
根据所述资产有效期以及发放日期时间戳和到期日期时间戳,生成具有 有效期属性的交易信息;
将所述具有有效期属性的交易信息存储至区块链。
上述技术方案中,通过在交易信息中设置资产有效期、发放日期和到期日期等时间戳,将数字资产的有效期管理记录在区块链上,保证了数字资产完整生命周期在区块链中都是可查的,确保了可信性。
可选的,所述根据所述资产有效期以及发放日期时间戳和到期日期时间戳,生成具有有效期属性的交易信息,包括:
将所述资产有效期、所述发放日期时间戳和所述到期日期时间戳,写入所述数字资产的交易信息,其中,所述交易信息中还包括修改日期时间戳。
可选的,所述发放日期时间戳还设有根据资产发放日期确定的优先级。
可选的,在所述将所述具有有效期属性的交易信息上传至区块链之后,还包括:
获取修改所述资产有效期的指令;
根据所述修改所述资产有效期的指令,对所述资产有效期进行修改,并将所述修改日期时间戳存储至所述区块链。
可选的,在所述将所述具有有效期属性的交易信息上传至区块链之后,还包括:
校验所述到期日期是否已经到达所述资产有效期,若是,则执行到期操作,并将删除数字资产交易信息存储至所述区块链。
相应的,本发明实施例还提供了一种基于区块链的数字资产有效期处理的装置,包括:
获取单元,用于在数字资产发放时,获取资产有效期以及发放日期时间戳和到期日期时间戳;
处理单元,用于根据所述资产有效期以及发放日期时间戳和到期日期时间戳,确定出具有有效期属性的交易信息;
将所述具有有效期属性的交易信息存储至区块链。
可选的,所述处理单元具体用于:
将所述资产有效期、所述发放日期时间戳和所述到期日期时间戳,写入所述数字资产的交易信息,其中,所述交易信息中还包括修改日期时间戳。
可选的,所述发放日期时间戳还设有根据资产发放日期确定的优先级。
可选的,所述处理单元还用于:
在所述将所述具有有效期属性的交易信息上传至区块链之后,获取修改所述资产有效期的指令;
根据所述修改所述资产有效期的指令,对所述资产有效期进行修改,并将所述修改日期时间戳存储至所述区块链。
可选的,所述处理单元还用于:
在所述将所述具有有效期属性的交易信息上传至区块链之后,校验所述到期日期是否已经到达所述资产有效期,若是,则执行到期操作,并将删除数字资产交易信息存储至所述区块链。
相应的,本发明实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令用于使所述计算机执行上述基于区块链的数字资产有效期处理的方法。
相应的,本发明实施例还提供了一种计算设备,包括:
存储器,用于存储程序指令;
处理器,用于调用所述存储器中存储的程序指令,按照获得的程序执行上述基于区块链的数字资产有效期处理的方法。
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简要介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域的普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例提供的一种系统架构的示意图;
图2为本发明实施例提供的一种基于区块链的数字资产有效期处理的流 程示意图;
图3为本发明实施例提供的一种区块的结构示意图;
图4为本发明实施例提供的一种区块的结构示意图;
图5为本发明实施例提供的一种系统架构的示意图;
图6为本发明实施例提供的一种基于区块链的数字资产有效期处理的装置的结构示意图;
图7为本发明实施例提供的一种计算设备的硬件结构示意图。
为了使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明作进一步地详细描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。
图1为本发明实施例所适用的系统架构。参考图1所示,该系统架构可以包括客户端100、服务器200和区块链平台300。
客户端100和服务器200可以通过网络与区块链平台连接。
需要说明的是,上述图1所示的结构仅是一种示例,本发明实施例对此不做限定。
基于上述描述,图2示例性的示出了本发明实施例提供的一种基于区块链的数字资产有效期处理的方法的流程,该流程可以由基于区块链的数字资产有效期处理的装置执行。
如图2所示,该流程具体包括:
步骤201,在数字资产发放时,获取资产有效期以及发放日期时间戳和到期日期时间戳。
通过NTP(Network Time Protocol,网络时间协议)获取国家授时中心的时间同步区块链网络中各个节点的系统时间,以保证数据存放在区块链上的 时间具有可信性。
机构在数字资产发放时,设置资产有效期,在生成交易信息时自动生成发放日期时间戳及到期日期时间戳。
步骤202,根据所述资产有效期以及发放日期时间戳和到期日期时间戳,生成具有有效期属性的交易信息。
具体的,可以将资产有效期、发放日期时间戳和到期日期时间戳,写入该数字资产的交易信息,其中,交易信息中还包括修改日期时间戳。
在交易信息中预留了修改日期时间戳属性,该时间戳为从国家授时中心获取到的标准时间。
上述资产有效期以及发放日期时间戳和到期日期时间戳都写入交易信息,也就是区块链中的区块。
与现有的交易信息的区块存储记录(如图3所示)有区别的是,在区块体增加了发放时间、到期时间和更改时间,如图4所示。其中,发放时间标志资产生命周期开始时间,和资产消费操作时的优先级。到期时间标志积分到期时间,供智能合约校验。更改时间存储有效期发生更改的时间。
也就是说,为了在区块链中完成有效期的操作,需要对传统区块链上存储的交易信息内容进行设计,添加数字资产发放到用户时间、数字资产到期时间及修改时间。
步骤203,将所述具有有效期属性的交易信息存储至区块链。
在产生上述具有有效期属性的交易信息后,就可以将该交易信息进行共识后存储在区块链中。
在将具有有效期属性的交易信息存储至区块链之后,还可以获取修改资产有效期的指令,根据修改所述资产有效期的指令,对资产有效期进行修改,并将修改日期时间戳存储至所述区块链。
也就是说,若相应的机构需要对相应的资产进行修改有效期操作,则机构通过客户端调用实现编写好的更新操作的智能合约,在交易信息上添加修改日期时间戳,并修改相应有效期时间戳。
还可以定时校验到期日期是否已经到达资产有效期,若是,则执行到期操作,并将删除数字资产交易信息存储至所述区块链。
例如,可以设计相关智能合约,校验到期时间是否已经达到有效期限制,若达到则执行到期操作,添加删除资产交易信息。
相应的,可以在服务器中设计相应定时程序,通过SDK(Software development kit,软件开发工具)调用到期处理智能合约,定期执行到期数字资产的到期操作。
相应的区块链节点进行共识,即各个节点上运行智能合约对数字资产到期操作的相关信息进行验证,通过校验到期日期是否符合,则对到期操作进行共识。
在相应到期操作记录生成区块时,连接到区块链中,相应用户手中的数字资产也即宣告失效,用户无法使用。
为了保证用户能够在有效期之内尽可能的应用自己的积分,在设置时,为每笔交易信息设置优先级,也就是发放日期时间戳设有优先级。该优先级通过发放日期有效期进行标注,资产发放日期早的,则优先级高。也就是说,优先级是根据资产发放日期确定的。
为了更好的解释本发明实施例下面将通过具体的实施场景来描述基于区块链的数字资产有效期处理的流程。
如图5所示,该实施例采用以Fabric为数字积分底层区块链平台,其上部署数字积分到期操作的智能合约,修改积分有效期的智能合约,采用Go语言实现校验到期日期、相应积分到期操作记录、上链等功能。
交易信息采用图4中所示的具备有效期属性的记录,SDK采用基于开源Fabric SDK自主研发的工具,相比原始SDK,使用起来更加方便,快捷。服务器中的定时程序使用Java语言编写。
基于该系统架构,数字积分到期操作及修改有效期的步骤如下:
1、通过NTP获取国家授时中心的时间同步区块链网络中各个节点的系统时间。
2.启动服务器中的定时程序,调用连接区块链平台的SDK工具,校验相关证书完成调用;
3、SDK调用区块链网络中的负责积分有效期校验的智能合约,智能合约校验交易信息的信息,校验积分到期日期是否已到,若满足到期校验,完成相关的删除操作,此处所指删除指在区块链中增加相应删除操作记录,并非将原有区块链中的记录进行删除。
4、各节点进行共识,若校验完成,则步骤3中生成的交易信息,打包成区块,连接到区块链上。
5、用户在使用积分进行消费时,平台将会根据交易信息中的积分的发放时间先后设立优先级,优先使用先发放的将要到期的积分。
6、数字积分平台用户执行消费操作时,则不会再显示已过期积分记录。
7、机构需要进行展期操作时,需通过机构通过自己的客户端提出展期申请,区块链相应的证书校验系统,校验提起申请的客户端是否满足,若满足,则调用修改有效期智能合约,进行相关修改有效期操作。
8、区块链各节点进行校验,若校验通过,则具备修改日期属性的交易信息,将上传至区块链进行保存。
9、修改有效期后的积分,则按新的有效期进行相关积分有效期校验。
本发明实施例还提供了另一种实施场景下数字资产有效期处理的流程,在本发明实施例中,采用以以太坊为网络会员期限存证底层区块链平台,其上部署网络会员到期操作的智能合约,修改会员有效期的智能合约,采用solidity语言实现校验网络会员到期日期、相应会员到期操作记录、上链等功能。
交易信息采用结构如图4中所示的具备有效期属性的会员记录,但此处由于是网络会员,因此对应字段应为“给某用户开通某网站会员多少天”。SDK采用以太坊SDK。服务器中的定时程序使用Java语言编写。
基于此系统架构,网络会员到期操作及修改有效期的步骤如下:
1、通过NTP获取国家授时中心的时间同步区块链网络中各个节点的系统 时间。
2、启动服务器中的定时程序,调用连接以太坊区块链平台的SDK工具,校验相关证书完成调用;
3、SDK调用区块链网络中的负责网络会员有效期校验的智能合约,智能合约校验交易信息的信息,校验会员有效期是否已到,若到完成相关的删除操作,此处所指删除指在区块链中增加相应删除操作记录,并非将原有区块链中的记录进行删除。
4、区块链各节点进行共识,若校验完成,则将步骤3中生成的交易信息,打包成区块,连接到区块链上。
5、网络会员用户执行相应会员权限时,即步骤4中对应的会员权限,则用户将不再能使用。
6、如网站会员发行机构如视频网站需要进行修改会员有效期操作时,需机构通过自己的命令行客户端提出修改会员有效期申请,区块链相应的证书校验系统,校验提起申请的客户端是否满足,若满足,则调用修改有效期智能合约,进行相关修改有效期操作。
7、区块链各节点进行校验,若校验通过,则具备修改日期属性的交易信息,将上传至区块链进行保存。
8、修改会员有效期后的用户,则按新的会员有效期进行会员权限校验。
本发明实施例可以保证机构对于发放到用户手中的数字资产到期操作的可靠性。由于到期操作通过设置定时任务操作区块链网络内智能合约完成,避免了人为的干预;每笔数字资产从发放到用户手中起就具备了有效期属性,避免了积分流通过程中发行机构任意篡改数字资产有效期的可能;若是机构需要中途修改相应有效期,则相应的修改记录也会被记录在区块链上。另外由于数字资产的到期操作在区块链中完成,保证了数字资产完整生命周期在账本中都是可查的,确保了可信任性。
基于相同的技术构思,图6示例性的示出了本发明实施例提供的一种基于区块链的数字资产有效期处理的装置,该装置可以执行基于区块链的数字 资产有效期处理的流程。
如图6所示,该装置具体包括:
获取单元601,用于在数字资产发放时,获取资产有效期以及发放日期时间戳和到期日期时间戳;
处理单元602,用于根据所述资产有效期以及发放日期时间戳和到期日期时间戳,确定出具有有效期属性的交易信息;
将所述具有有效期属性的交易信息存储至区块链。
可选的,所述处理单元602具体用于:
将所述资产有效期、所述发放日期时间戳和所述到期日期时间戳,写入所述数字资产的交易信息,其中,所述交易信息中还包括修改日期时间戳。
可选的,所述发放日期时间戳还设有根据资产发放日期确定的优先级。
可选的,所述处理单元602还用于:
在所述将所述具有有效期属性的交易信息上传至区块链之后,获取修改所述资产有效期的指令;
根据所述修改所述资产有效期的指令,对所述资产有效期进行修改,并将所述修改日期时间戳存储至所述区块链。
可选的,所述处理单元602还用于:
在所述将所述具有有效期属性的交易信息上传至区块链之后,校验所述到期日期是否已经到达所述资产有效期,若是,则执行到期操作,并将删除数字资产交易信息存储至所述区块链。
本发明实施例提供了一种计算设备,包括至少一个处理单元以及至少一个存储单元,其中,所述存储单元存储有计算机程序,当所述程序被所述处理单元执行时,使得所述处理单元执行基于区块链的数字资产有效期处理的方法的步骤。如图7所示,为本发明实施例中所述的计算设备的硬件结构示意图,该计算设备具体可以为台式计算机、便携式计算机、智能手机、平板电脑等。具体地,该计算设备可以包括存储器701、处理器702及存储在存储器上的计算机程序,所述处理器702执行所述程序时实现上述实施例中的任 一基于区块链的数字资产有效期处理的方法的步骤。其中,存储器701可以包括只读存储器(ROM)和随机存取存储器(RAM),并向处理器702提供存储器701中存储的程序指令和数据。
进一步地,本发明实施例中所述的计算设备还可以包括输入装置703以及输出装置704等。输入装置703可以包括键盘、鼠标、触摸屏等;输出装置704可以包括显示设备,如液晶显示器(Liquid Crystal Display,LCD)、阴极射线管(Cathode Ray Tube,CRT),触摸屏等。存储器701,处理器702、输入装置703和输出装置704可以通过总线或者其他方式连接,图7中以通过总线连接为例。处理器702调用存储器701存储的程序指令并按照获得的程序指令执行上述实施例提供的基于区块链的数字资产有效期处理的方法。
本发明实施例还提供了一种计算机可读存储介质,其存储有可由计算设备执行的计算机程序,当所述程序在计算设备上运行时,使得所述计算设备执行基于区块链的数字资产有效期处理的方法的步骤。
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的 处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。
Claims (12)
- 一种基于区块链的数字资产有效期处理的方法,其特征在于,包括:在数字资产发放时,获取资产有效期以及发放日期时间戳和到期日期时间戳;根据所述资产有效期以及发放日期时间戳和到期日期时间戳,生成具有有效期属性的交易信息;将所述具有有效期属性的交易信息存储至区块链。
- 如权利要求1所述的方法,其特征在于,所述根据所述资产有效期以及发放日期时间戳和到期日期时间戳,生成具有有效期属性的交易信息,包括:将所述资产有效期、所述发放日期时间戳和所述到期日期时间戳,写入所述数字资产的交易信息,其中,所述交易信息中还包括修改日期时间戳。
- 如权利要求2所述的方法,其特征在于,所述发放日期时间戳还设有根据资产发放日期确定的优先级。
- 如权利要求2所述的方法,其特征在于,在所述将所述具有有效期属性的交易信息上传至区块链之后,还包括:获取修改所述资产有效期的指令;根据所述修改所述资产有效期的指令,对所述资产有效期进行修改,并将所述修改日期时间戳存储至所述区块链。
- 如权利要求1所述的方法,其特征在于,在所述将所述具有有效期属性的交易信息上传至区块链之后,还包括:校验所述到期日期是否已经到达所述资产有效期,若是,则执行到期操作,并将删除数字资产交易信息存储至所述区块链。
- 一种基于区块链的数字资产有效期处理的装置,其特征在于,包括:获取单元,用于在数字资产发放时,获取资产有效期以及发放日期时间戳和到期日期时间戳;处理单元,用于根据所述资产有效期以及发放日期时间戳和到期日期时间戳,确定出具有有效期属性的交易信息;将所述具有有效期属性的交易信息存储至区块链。
- 如权利要求6所述的装置,其特征在于,所述处理单元具体用于:将所述资产有效期、所述发放日期时间戳和所述到期日期时间戳,写入所述数字资产的交易信息,其中,所述交易信息中还包括修改日期时间戳。
- 如权利要求7所述的装置,其特征在于,所述发放日期时间戳还设有根据资产发放日期确定的优先级。
- 如权利要求7所述的装置,其特征在于,所述处理单元还用于:在所述将所述具有有效期属性的交易信息上传至区块链之后,获取修改所述资产有效期的指令;根据所述修改所述资产有效期的指令,对所述资产有效期进行修改,并将所述修改日期时间戳存储至所述区块链。
- 如权利要求6所述的装置,其特征在于,所述处理单元还用于:在所述将所述具有有效期属性的交易信息上传至区块链之后,校验所述到期日期是否已经到达所述资产有效期,若是,则执行到期操作,并将删除数字资产交易信息存储至所述区块链。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令用于使所述计算机执行如权利要求1至5中任一项所述的方法。
- 一种计算设备,其特征在于,包括:存储器,用于存储程序指令;处理器,用于调用所述存储器中存储的程序指令,按照获得的程序执行如权利要求1至5中任一项所述的方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811604736.4 | 2018-12-26 | ||
CN201811604736.4A CN109670793A (zh) | 2018-12-26 | 2018-12-26 | 一种基于区块链的数字资产有效期处理的方法及装置 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2020134930A1 true WO2020134930A1 (zh) | 2020-07-02 |
Family
ID=66146375
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2019/123103 WO2020134930A1 (zh) | 2018-12-26 | 2019-12-04 | 一种基于区块链的数字资产有效期处理的方法及装置 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN109670793A (zh) |
WO (1) | WO2020134930A1 (zh) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109670793A (zh) * | 2018-12-26 | 2019-04-23 | 中国银联股份有限公司 | 一种基于区块链的数字资产有效期处理的方法及装置 |
CN112966237A (zh) * | 2021-03-09 | 2021-06-15 | 安徽超清科技股份有限公司 | 一种基于区块链的数字资产处理方法 |
CN115471956B (zh) * | 2022-08-29 | 2024-04-02 | 拉扎斯网络科技(上海)有限公司 | 一种信息处理方法、装置、可读存储介质和电子设备 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7269733B1 (en) * | 2003-04-10 | 2007-09-11 | Cisco Technology, Inc. | Reliable embedded file content addressing |
CN105976231A (zh) * | 2016-06-24 | 2016-09-28 | 深圳前海微众银行股份有限公司 | 基于区块链智能合约的资产管理方法及节点 |
CN109064335A (zh) * | 2018-08-27 | 2018-12-21 | 深圳前海益链网络科技有限公司 | 一种基于智能合约的数据交易方法及装置 |
CN109670793A (zh) * | 2018-12-26 | 2019-04-23 | 中国银联股份有限公司 | 一种基于区块链的数字资产有效期处理的方法及装置 |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105719172A (zh) * | 2016-01-19 | 2016-06-29 | 布比(北京)网络技术有限公司 | 一种信息发布方法及装置 |
-
2018
- 2018-12-26 CN CN201811604736.4A patent/CN109670793A/zh active Pending
-
2019
- 2019-12-04 WO PCT/CN2019/123103 patent/WO2020134930A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7269733B1 (en) * | 2003-04-10 | 2007-09-11 | Cisco Technology, Inc. | Reliable embedded file content addressing |
CN105976231A (zh) * | 2016-06-24 | 2016-09-28 | 深圳前海微众银行股份有限公司 | 基于区块链智能合约的资产管理方法及节点 |
CN109064335A (zh) * | 2018-08-27 | 2018-12-21 | 深圳前海益链网络科技有限公司 | 一种基于智能合约的数据交易方法及装置 |
CN109670793A (zh) * | 2018-12-26 | 2019-04-23 | 中国银联股份有限公司 | 一种基于区块链的数字资产有效期处理的方法及装置 |
Also Published As
Publication number | Publication date |
---|---|
CN109670793A (zh) | 2019-04-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11770238B2 (en) | Decentralized computation system architecture based on node specialization | |
US20200210413A1 (en) | Method of generating globally verifiable unique identifiers using a scalable interlinked blockchain structure | |
JP7001843B2 (ja) | データバックアップ方法並びに、そのコンピュータプログラム及びコンピューティングデバイス | |
US20230100223A1 (en) | Transaction processing method and apparatus, computer device, and storage medium | |
WO2020134930A1 (zh) | 一种基于区块链的数字资产有效期处理的方法及装置 | |
WO2020220761A1 (zh) | 基于区块链的缴费代扣签约方法及装置、电子设备 | |
US11720545B2 (en) | Optimization of chaincode statements | |
KR102537774B1 (ko) | 기밀 지식의 특화된 증명을 제공하는 시스템들 및 방법들 | |
US20200082349A1 (en) | Blockchain Timeclock System | |
US20160048703A1 (en) | Securing integrity and consistency of a cloud storage service with efficient client operations | |
US10474506B1 (en) | Finite state machine driven workflows | |
TW202018644A (zh) | 基於區塊鏈的資料處理方法、裝置和伺服器 | |
WO2019033741A1 (zh) | 投资产品的资源处理方法、装置、存储介质和计算机设备 | |
CN111047327A (zh) | 一种智能合约的执行方法、装置及设备 | |
CN109542926A (zh) | 区块处理方法及计算机存储介质 | |
CN110597884A (zh) | 一种基于区块链网络的募捐方法、装置、设备及存储介质 | |
CN109586949A (zh) | 区块生成方法及计算机存储介质 | |
CN109614271A (zh) | 多个集群数据一致性的控制方法、装置、设备及存储介质 | |
CN110308926B (zh) | 软件信息展示方法、装置、计算机装置及计算机存储介质 | |
Nasirifard et al. | OrderlessChain: A CRDT-based BFT Coordination-free Blockchain Without Global Order of Transactions | |
CN110515970B (zh) | 业务处理方法、装置、计算机设备和存储介质 | |
CN109815428A (zh) | 一种在线表格缓存方法及装置 | |
US10936572B2 (en) | Method, apparatus, and computer program product for improved tracking of state data | |
Cachin et al. | Verifying the consistency of remote untrusted services with conflict-free operations | |
US10719425B2 (en) | Happens-before-based dynamic concurrency analysis for actor-based programs |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19901912 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19901912 Country of ref document: EP Kind code of ref document: A1 |