WO2020253682A1 - Coupon management method, apparatus and device, and storage medium - Google Patents

Coupon management method, apparatus and device, and storage medium Download PDF

Info

Publication number
WO2020253682A1
WO2020253682A1 PCT/CN2020/096380 CN2020096380W WO2020253682A1 WO 2020253682 A1 WO2020253682 A1 WO 2020253682A1 CN 2020096380 W CN2020096380 W CN 2020096380W WO 2020253682 A1 WO2020253682 A1 WO 2020253682A1
Authority
WO
WIPO (PCT)
Prior art keywords
code
coupon
card
redemption
mapping
Prior art date
Application number
PCT/CN2020/096380
Other languages
French (fr)
Chinese (zh)
Inventor
黄蓝天
陈朝亮
卢道和
黄叶飞
汪俊
许林
Original Assignee
深圳前海微众银行股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳前海微众银行股份有限公司 filed Critical 深圳前海微众银行股份有限公司
Publication of WO2020253682A1 publication Critical patent/WO2020253682A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3821Electronic credentials
    • G06Q20/38215Use of certificates or encrypted proofs of transaction rights
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0207Discounts or incentives, e.g. coupons or rebates
    • G06Q30/0208Trade or exchange of goods or services in exchange for incentives or rewards

Definitions

  • This application relates to the blockchain technology field of Fintech, in particular to card management methods, devices, equipment and storage media.
  • the redemption codes are kept by the card and coupon suppliers themselves and are not chained. Although this method of management is simple, it cannot realize the life cycle management of coupons and coupons on the chain. The issuance and verification of coupons and coupons are done unilaterally by the supplier. If the supplier has false verification, it will cause the purchaser Loss; 2) The redemption code is on the chain. Although this method is more open and transparent, because of the sensitivity of the redemption code, the chain means that encryption must be performed. The encryption requires the management of key pairs for each merchant, and both the chaining and pulling data from the chain need to be performed Encryption and decryption, the process is complicated, and the management difficulty is greatly increased.
  • the main purpose of this application is to propose a card and coupon management method, device, equipment and storage medium, which aims to reduce the management difficulty of on-chain life cycle management of cards and coupons, and at the same time ensure the security of card and coupon redemption codes.
  • this application provides a card and coupon management method, which includes the following steps:
  • the method further includes:
  • the created coupons, the distributed redemption codes, and the code corresponding to each redemption code are encrypted and stored locally.
  • the method before the step of associating the code mapping code, the status of the code mapping code, and the coupon purchase order and sending them to the blockchain for storage, the method further includes:
  • the code is sent to the buyer node, so that the buyer node issues the code to the client of the buyer node.
  • the card and coupon management method further includes:
  • a pre-saved redemption code corresponding to the code carried in the card and coupon redemption request is obtained, and the obtained redemption code is returned to the client.
  • the card and coupon management method further includes:
  • the redemption code and the code status corresponding to the target code mapping code stored locally are marked as the verification status.
  • the present application also provides a card and coupon management device, which includes:
  • the first obtaining module is configured to obtain the redemption code of the card and coupon purchased by the card and coupon purchase order when it is detected that the card and coupon purchase order is created;
  • the first generation module is configured to obtain a pre-stored code code corresponding to the redemption code, and generate a code mapping code corresponding to the code, wherein the redemption code, the code, and the code mapping code are one by one correspond;
  • a setting module configured to obtain the current state of the coupon in the preset full life cycle, and set the state to the state of the code mapping code
  • the first sending module is configured to associate the code mapping code, the state of the code mapping code, and the card purchase order, and then send them to the blockchain for storage.
  • the card and coupon management device further includes:
  • the first receiving module is configured to receive the card coupon creation request and the redemption code import request sent by the supplier node;
  • a creation module configured to create a corresponding card and coupon according to the card and coupon creation request, and assign a corresponding redemption code to the created card and coupon according to the redemption code import request;
  • the second generation module is used to generate the code corresponding to each redemption code
  • the saving module is used to encrypt and save the created coupons, the redemption codes allocated, and the code corresponding to each redemption code locally.
  • the card and coupon management device further includes:
  • the second sending module is configured to send the code to the buyer node, so that the buyer node can issue the code to the client of the buyer node.
  • the card and coupon management device further includes:
  • the second obtaining module is configured to obtain the code carried in the card and coupon exchange request when the card and coupon exchange request sent by the client is received;
  • the return module is configured to obtain a pre-saved redemption code corresponding to the code carried in the card and coupon redemption request, and return the obtained redemption code to the client.
  • the card and coupon management device further includes:
  • the second receiving module is configured to receive a card and coupon verification request, where the card and coupon verification request carries the redemption code or code of the coupon to be verified;
  • the third obtaining module is configured to obtain a pre-stored target code mapping code corresponding to the redemption code or code of the coupon to be verified;
  • the initiation module is used to initiate a verification request based on the target code mapping code to the blockchain, so that the participating nodes of the blockchain can perform a verification consensus on the target code mapping code and reach a consensus Afterwards, mark the state of the target code mapping code on the blockchain as a verified state;
  • the marking module is used to mark the status of the redemption code and code corresponding to the target code mapping code stored locally as the verified status when the verification completion information returned by the blockchain is received.
  • this application also provides a coupon management device, the coupon management device includes: a memory, a processor, and a coupon management stored in the memory and running on the processor A program, when the coupon management program is executed by the processor, the steps of the coupon management method described above are implemented.
  • the present application also provides a storage medium, the storage medium stores a coupon management program, and the coupon management program is executed by a processor to realize the steps of the coupon management method described above .
  • the redemption code of the card and coupon purchased by the card and coupon purchase order is obtained; the pre-stored code corresponding to the redemption code is obtained, and the code corresponding to the code is generated code mapping code, wherein the redemption code, the code, and the code mapping code are in one-to-one correspondence; obtain the current state of the coupon during the preset full life cycle, and set the state to The status of the code mapping code; after associating the code mapping code, the status of the code mapping code and the coupon purchase order, they are sent to the blockchain for storage. In this way, by uploading the code mapping code and its status to the chain, it realizes the on-chain life cycle management of cards and coupons without disclosing the redemption code.
  • FIG. 1 is a schematic diagram of a device structure of a hardware operating environment involved in a solution of an embodiment of the present application
  • FIG. 2 is a schematic flowchart of the first embodiment of the application card management method
  • FIG. 3 is a schematic diagram of the system architecture of the card management method in an embodiment of the application.
  • FIG. 1 is a schematic diagram of the device structure of the hardware operating environment involved in the solution of the embodiment of the present application.
  • the card and coupon management device in the embodiment of the present application may be a PC, a server, and other devices.
  • the card management device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002.
  • the communication bus 1002 is used to realize the connection and communication between these components.
  • the user interface 1003 may include a display screen (Display) and an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface.
  • the network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).
  • the memory 1005 may be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as a magnetic disk memory.
  • the memory 1005 may also be a storage device independent of the foregoing processor 1001.
  • FIG. 1 does not constitute a limitation on the device, and may include more or fewer components than those shown in the figure, or a combination of certain components, or different component arrangements.
  • the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a coupon management program.
  • the network interface 1004 is mainly used to connect to a back-end server and communicate with the back-end server;
  • the user interface 1003 is mainly used to connect to a client (user side) and communicate with the client;
  • the processor 1001 can be used to call a coupon management program stored in the memory 1005, and perform operations in the following coupon management method embodiments.
  • Fig. 2 is a schematic flowchart of a first embodiment of a card and coupon management method according to this application. The method includes:
  • Step S10 when it is detected that the coupon purchase order is created, the redemption code of the coupon purchased by the coupon purchase order is obtained;
  • coupons refer to electronic coupons such as coupons, group purchase coupons, and vouchers.
  • the application scenario of this embodiment may be: a certain company wants to issue benefits to employees in the form of issuing cards and coupons, or wants to provide points redemption on its own mall by purchasing cards and coupons from other companies to provide more for its own customers.
  • multi-equity value is exchanged, it can be used as a card purchaser to purchase cards and coupons on the card and coupon trading platform, and then distribute the purchased cards and coupons to client users who meet the issuance conditions for client users to use.
  • the life cycle of a coupon refers to the entire process of a coupon from being created, to being activated, and to verification or invalidation.
  • the card and coupon management method of this embodiment is applied to a card and coupon trading platform built with a blockchain as the bottom layer. Card and coupon suppliers and card and coupon purchasers are matched through the card and coupon trading platform. , And use blockchain as the bottom layer to realize card and coupon life cycle management and clearing and reconciliation.
  • the coupon trading platform detects that the coupon purchase order has been created, the coupon purchase order can be obtained.
  • the redemption code refers to a character string that can be directly exchanged for a commodity, and it is anonymous. Different suppliers have their own generation rules, such as a mixed character string of 16 letters and numbers.
  • Step S20 Obtain a pre-stored code code corresponding to the redemption code, and generate a code mapping code corresponding to the code, wherein the redemption code, the code, and the code mapping code correspond one-to-one;
  • the code corresponding to the redemption code preset and stored locally on the coupon trading platform is further obtained, and a code mapping code corresponding to the code is generated.
  • the redemption code, code and code mapping code correspond one-to-one.
  • the code is a character string generated by the coupon trading platform itself. There will be no repeated activation codes for the same type of coupons, and the code after verification can be reused; code
  • the mapping code is a character string generated by numbering the code according to the relationship between the coupon purchase order and the code.
  • Step S30 Obtain the current state of the coupon during the preset full life cycle, and set the state to the state of the code mapping code;
  • the status of the coupons purchased can be changed from the original created Marked as activated means that the coupon can be used by the user; when the coupon is used and verified, the status of the coupon can be marked as verified.
  • the card and coupon trading platform after generating the code mapping code, the card and coupon trading platform further obtains the state of the currently purchased card and coupon in the preset full life cycle, and sets the obtained state as the generated code mapping code status. Since the redemption code, code, and code mapping code have a one-to-one correspondence, the status of the code mapping code can also be regarded as the status of the redemption code and code, that is, the status of the redemption code, code, and code mapping code remains the same.
  • Step S40 After associating the code mapping code, the status of the code mapping code, and the coupon purchase order, they are sent to the blockchain for storage.
  • FIG. 3 is a schematic diagram of the system architecture of the card management method in an embodiment of the application.
  • the card and coupon trading platform can interact with the blockchain.
  • the redemption code and code are not directly linked to the chain, but the code mapping code is uploaded.
  • the status of the code mapping code on the chain is the actual redemption code and the status of the code.
  • the current order in the figure corresponds to the three code mapping codes code1, code2 and code3.
  • the statuses are activated, activated, and written off respectively.
  • the status of the code changes, correspondingly modify the status of the code mapping code on the chain to realize the card coupon life cycle management on the blockchain.
  • the on-chain life cycle management of cards and coupons is realized without disclosing the redemption code. Since the code mapping code is double-mapped for the redemption code It is obtained that even if the code mapping code on the chain is public, it is difficult to steal the corresponding card and coupon redemption code, which fully guarantees the security of the card and coupon redemption code, and also makes the code mapping code need not be encrypted when it is chained, thereby saving Going to set up key pair, encryption and decryption management procedures, greatly reducing the difficulty of card management.
  • step S10 it may further include: receiving a coupon creation request and a redemption code import request sent by a supplier node; creating a corresponding coupon according to the coupon creation request, and importing a coupon according to the redemption code Request to assign a corresponding redemption code to the created coupons; generate a code corresponding to each redemption code; place the created coupons, the assigned redemption codes, and the code corresponding to each redemption code locally Save it encrypted.
  • the supplier can first create the coupons to be sold on the coupon trading platform and import the redemption code corresponding to the coupons.
  • the coupon trading platform receives the coupon creation request and the coupon creation request sent by the supplier node.
  • the redemption code import request create the corresponding card and coupon, and assign the corresponding redemption code to the created card and coupon.
  • the specific generation method can be to generate a string according to preset rules, such as generating a 30-digit decimal code (16-digit 62-digit converted to decimal, the longest is 29 digits), and guarantee The code corresponding to different redemption codes is different; after that, the coupon, redemption code and code are associated and encrypted and stored locally.
  • the encryption algorithm can be a symmetric encryption algorithm or a hash encryption algorithm such as MD5.
  • a prerequisite guarantee is provided for subsequent acquisition of the redemption code and code corresponding to the card and voucher, and a prerequisite guarantee for the verification of the card and voucher based on the redemption code and code.
  • the method may further include: sending the code to a buyer node, so that the buyer node can issue the code to the client of the buyer node.
  • the code can be encrypted and sent to the buyer node, so that the buyer node can
  • the client user obtains the code, which means that they have the rights to exchange cards and coupons.
  • the platform user uses points to redeem cards and coupons.
  • the card and coupon code can be sent to the user, and the user obtains the card and coupon redemption rights.
  • the card and coupon management method may further include: when a card and coupon exchange request sent by the client is received, obtaining a code carried in the card and coupon exchange request; and obtaining a pre-saved exchange code with the card and coupon The redemption code corresponding to the code carried in the request is returned to the client.
  • the card and coupon transaction platform when the card and coupon transaction platform receives the card and coupon redemption request sent by the client, it obtains the code carried in the card and coupon redemption request, then obtains the pre-stored redemption code corresponding to the code, and exchanges it The code is returned to the client. This method of pulling the corresponding redemption code through the code ensures that the client user can use the coupons corresponding to the redemption code normally.
  • the card and coupon management method may further include: receiving a card and coupon verification request, the card and coupon verification request carrying the redemption code or code of the coupon to be verified; The redemption code of the card or coupon to be verified or the target code mapping code corresponding to the code; a verification request based on the target code mapping code is initiated to the blockchain, so that the participating nodes of the blockchain can respond to the target
  • the code mapping code performs the verification of the consensus, and after the consensus is reached, the status of the target code mapping code on the blockchain is marked as the verified state; when the verification is completed, the verification returned by the blockchain is received When sending information, mark the redemption code and code status corresponding to the target code mapping code stored locally as the written-off status.
  • the voucher verification request may be initiated by the supplier or the purchaser.
  • the voucher verification request When initiated by the supplier, the voucher verification request carries the redemption code of the voucher to be verified.
  • the voucher verification request When initiated by the purchaser, the voucher verification request carries the code of the voucher to be verified; when the voucher verification request is received by the voucher verification request, the card and voucher transaction platform obtains the pre-saved redemption code or the voucher to be verified.
  • the target code mapping code corresponding to the target code mapping code, and then initiates a verification request based on the target code mapping code to the blockchain, so that the participating nodes of the blockchain can perform a verification consensus on the target code mapping code, and the consensus is reached After that, the status of the target code mapping code on the blockchain is marked as the verified state, which means that the coupon corresponding to the target code mapping code has been verified.
  • the verification of the card and coupon based on the blockchain is realized.
  • the redemption code of the verification process is always encrypted and stored locally on the card and coupon trading platform, thereby ensuring the security of the redemption code while managing the life cycle on the chain.
  • the application also provides a card and coupon management device.
  • the card and coupon management device includes:
  • the first obtaining module is configured to obtain the redemption code of the card and coupon purchased by the card and coupon purchase order when it is detected that the card and coupon purchase order is created;
  • the first generation module is configured to obtain a pre-stored code code corresponding to the redemption code, and generate a code mapping code corresponding to the code, wherein the redemption code, the code, and the code mapping code are one by one correspond;
  • a setting module configured to obtain the current state of the coupon in the preset full life cycle, and set the state to the state of the code mapping code
  • the first sending module is configured to associate the code mapping code, the state of the code mapping code, and the card purchase order, and then send them to the blockchain for storage.
  • the card and coupon management device further includes:
  • the first receiving module is configured to receive the card coupon creation request and the redemption code import request sent by the supplier node;
  • a creation module configured to create a corresponding card and coupon according to the card and coupon creation request, and assign a corresponding redemption code to the created card and coupon according to the redemption code import request;
  • the second generation module is used to generate the code corresponding to each redemption code
  • the saving module is used to encrypt and save the created coupons, the redemption codes allocated, and the code corresponding to each redemption code locally.
  • the card and coupon management device further includes:
  • the second sending module is configured to send the code to the buyer node, so that the buyer node can issue the code to the client of the buyer node.
  • the card and coupon management device further includes:
  • the second obtaining module is configured to obtain the code carried in the card and coupon exchange request when the card and coupon exchange request sent by the client is received;
  • the return module is configured to obtain a pre-saved redemption code corresponding to the code carried in the card and coupon redemption request, and return the obtained redemption code to the client.
  • the card and coupon management device further includes:
  • the second receiving module is configured to receive a card and coupon verification request, where the card and coupon verification request carries the redemption code or code of the coupon to be verified;
  • the third obtaining module is configured to obtain a pre-stored target code mapping code corresponding to the redemption code or code of the coupon to be verified;
  • the initiation module is used to initiate a verification request based on the target code mapping code to the blockchain, so that the participating nodes of the blockchain can perform a verification consensus on the target code mapping code and reach a consensus Afterwards, mark the state of the target code mapping code on the blockchain as a verified state;
  • the marking module is used to mark the redemption code and code status corresponding to the target code mapping code stored locally as the written-off state when the verification completion information returned by the blockchain is received.
  • the application also provides a storage medium.
  • a coupon management program is stored on the storage medium of the present application, and when the coupon management program is executed by a processor, the steps of the coupon management method described above are realized.

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Engineering & Computer Science (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Development Economics (AREA)
  • Computer Security & Cryptography (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Game Theory and Decision Science (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

A coupon management method, apparatus and device, and a storage medium. The method comprises: when detecting that a coupon purchase order is created, obtaining a redeem code of a coupon purchased by the coupon purchase order (S10); obtaining a prestored code corresponding to the redeem code, and generating a code mapping code corresponding to the code, wherein the redeem code, the code, and the code mapping code have one-to-one correspondence (S20); obtaining the current state of the coupon in a preset full lifecycle, and setting the state as the state of the code mapping code (S30); and associating the code mapping code and the state of the code mapping code with the coupon purchase order, and then sending same to a blockchain for storage (S40). The present invention can reduce the management difficulty in the on-chain lifecycle management on coupons and ensure the security of redeem codes of the coupons.

Description

卡券管理方法、装置、设备及存储介质Card coupon management method, device, equipment and storage medium
本申请要求于2019年6月18日提交中国专利局、申请号为201910530226.5、发明名称为“卡券管理方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on June 18, 2019, the application number is 201910530226.5, and the invention title is "card management method, device, equipment and storage medium", the entire content of which is incorporated by reference In application.
技术领域Technical field
本申请涉及金融科技(Fintech)的区块链技术领域,尤其涉及卡券管理方法、装置、设备及存储介质。This application relates to the blockchain technology field of Fintech, in particular to card management methods, devices, equipment and storage media.
背景技术Background technique
随着计算机技术的发展,越来越多的技术(大数据、分布式、区块链Blockchain、人工智能等)应用在金融领域,传统金融业正在逐步向金融科技(Fintech)转变,但由于金融行业的安全性、实时性要求,也对技术提出了更高的要求。With the development of computer technology, more and more technologies (big data, distributed, blockchain, artificial intelligence, etc.) are applied in the financial field. The traditional financial industry is gradually transforming to Fintech. However, due to financial The industry's security and real-time requirements also place higher requirements on technology.
在零售行业,越来越多的商家通过互联网发送电子卡券(如优惠券、团购券、代金券等),以电子卡券作为载体进行各种营销活动。为了解决线下零售行业卡券互换存在的信任问题、成本问题、效率问题和合作问题,现推出了一种以区块链为底层构建的卡券交易平台,卡券供应商和卡券采购商通过卡券交易平台进行撮合,并以区块链为底层实现卡券生命周期管理和清算对账。由于目前市面上的卡券有相当一部分是采用不记名兑换码的模式,直接使用兑换码就可以兑换商品,而卡券交易平台基于区块链,链上信息公开透明,所以需要对敏感的兑换码建立相应的保护机制。In the retail industry, more and more merchants send electronic coupons (such as coupons, group purchase coupons, vouchers, etc.) through the Internet, and use electronic coupons as carriers for various marketing activities. In order to solve the problems of trust, cost, efficiency and cooperation in the exchange of cards and coupons in the offline retail industry, a card and coupon trading platform built on the bottom of the blockchain has been launched, with card and coupon suppliers and card and coupon purchases. Merchants use the card and coupon trading platform to match, and use the blockchain as the bottom layer to realize card and coupon life cycle management and clearing and reconciliation. Since a considerable part of the cards and coupons on the market currently adopt the mode of bearer redemption codes, the products can be exchanged directly by using the redemption codes, and the card and coupon trading platform is based on the blockchain and the information on the chain is open and transparent, so sensitive redemption is required Code to establish a corresponding protection mechanism.
目前,卡券兑换码的保护机制主要包括两种:1)兑换码由卡券供应商自行保存,不上链。这种方式管理虽然简单,但是无法实现在链上进行卡券的生命周期管理,卡券的发放、核销都是由供应商单方面完成,如果供应商存在虚假核销就会给采购商造成损失;2)兑换码上链。这种方式虽然更加公开透明,但由于兑换码的敏感性,上链就意味着必须加密,加密需要针对每个商户进行密钥对的管理,而且上链和从链上拉取数据都需要进行加解密,流程复杂,管理难度大大增加。At present, there are mainly two protection mechanisms for card and coupon redemption codes: 1) The redemption codes are kept by the card and coupon suppliers themselves and are not chained. Although this method of management is simple, it cannot realize the life cycle management of coupons and coupons on the chain. The issuance and verification of coupons and coupons are done unilaterally by the supplier. If the supplier has false verification, it will cause the purchaser Loss; 2) The redemption code is on the chain. Although this method is more open and transparent, because of the sensitivity of the redemption code, the chain means that encryption must be performed. The encryption requires the management of key pairs for each merchant, and both the chaining and pulling data from the chain need to be performed Encryption and decryption, the process is complicated, and the management difficulty is greatly increased.
发明概述Summary of the invention
技术问题technical problem
问题的解决方案The solution to the problem
技术解决方案Technical solutions
本申请的主要目的在于提出一种卡券管理方法、装置、设备及存储介质,旨在降低对卡券进行链上生命周期管理的管理难度,同时保证卡券兑换码的安全性。The main purpose of this application is to propose a card and coupon management method, device, equipment and storage medium, which aims to reduce the management difficulty of on-chain life cycle management of cards and coupons, and at the same time ensure the security of card and coupon redemption codes.
为实现上述目的,本申请提供一种卡券管理方法,所述卡券管理方法包括如下步骤:In order to achieve the above objective, this application provides a card and coupon management method, which includes the following steps:
当检测到卡券采购订单被创建时,获取所述卡券采购订单所采购的卡券的兑换码;When it is detected that the coupon purchase order is created, acquiring the redemption code of the coupon purchased by the coupon purchase order;
获取预先保存的与所述兑换码对应的编码code,生成与所述code对应的code映射码,其中,所述兑换码、所述code和所述code映射码一一对应;Obtain a pre-stored code code corresponding to the redemption code, and generate a code mapping code corresponding to the code, wherein the redemption code, the code, and the code mapping code have a one-to-one correspondence;
获取当前所述卡券在预设的全生命周期中所处的状态,将所述状态设置为所述code映射码的状态;Acquiring the current state of the coupon during the preset full life cycle, and setting the state to the state of the code mapping code;
将所述code映射码、所述code映射码的状态和所述卡券采购订单进行关联后,发送至区块链进行保存。After associating the code mapping code, the status of the code mapping code, and the coupon purchase order, they are sent to the blockchain for storage.
可选地,所述当检测到卡券采购订单被创建时,获取所述卡券采购订单所采购的卡券的兑换码的步骤之前,还包括:Optionally, before the step of obtaining the redemption code of the card and coupon purchased by the card and coupon purchase order when it is detected that the card and coupon purchase order is created, the method further includes:
接收供应商节点发送的卡券创建请求和兑换码导入请求;Receive card coupon creation request and redemption code import request sent by the supplier node;
根据所述卡券创建请求创建对应的卡券,根据所述兑换码导入请求为创建的所述卡券分配对应的兑换码;Create a corresponding card and coupon according to the card and coupon creation request, and assign a corresponding redemption code to the created card and coupon according to the redemption code import request;
生成与每个兑换码对应的code;Generate code corresponding to each redemption code;
将创建的所述卡券、分配的所述兑换码,以及与每个兑换码对应的code在本地进行加密保存。The created coupons, the distributed redemption codes, and the code corresponding to each redemption code are encrypted and stored locally.
可选地,所述将所述code映射码、所述code映射码的状态和所述卡券采购订单进行关联后,发送至区块链进行保存的步骤之前,还包括:Optionally, before the step of associating the code mapping code, the status of the code mapping code, and the coupon purchase order and sending them to the blockchain for storage, the method further includes:
将所述code发送至采购商节点,以使所述采购商节点将所述code发放至所述采 购商节点的客户端。The code is sent to the buyer node, so that the buyer node issues the code to the client of the buyer node.
可选地,所述卡券管理方法还包括:Optionally, the card and coupon management method further includes:
当接收到所述客户端发送的卡券兑换请求时,获取所述卡券兑换请求中携带的code;When receiving the card and coupon redemption request sent by the client, obtain the code carried in the card and coupon redemption request;
获取预先保存的与所述卡券兑换请求中携带的code对应的兑换码,将获取到的所述兑换码返回给所述客户端。A pre-saved redemption code corresponding to the code carried in the card and coupon redemption request is obtained, and the obtained redemption code is returned to the client.
可选地,所述卡券管理方法还包括:Optionally, the card and coupon management method further includes:
接收卡券核销请求,所述卡券核销请求中携带有待核销卡券的兑换码或code;Receiving a coupon verification request, where the coupon verification request carries the redemption code or code of the coupon to be verified;
获取预先保存的与所述待核销卡券的兑换码或code对应的目标code映射码;Obtaining a pre-saved target code mapping code corresponding to the redemption code or code of the coupon to be verified;
向所述区块链发起基于所述目标code映射码的核销请求,以使所述区块链的参与节点对所述目标code映射码进行核销共识,并在共识达成后,将所述区块链上的所述目标code映射码的状态标记为已核销状态;Initiate a verification request based on the target code mapping code to the blockchain, so that the participating nodes of the blockchain will perform a verification consensus on the target code mapping code, and after the consensus is reached, the The state of the target code mapping code on the blockchain is marked as a written-off state;
当接收到所述区块链返回的核销完成信息时,将本地保存的与所述目标code映射码对应的兑换码和code的状态标记为已核销状态。When receiving the verification completion information returned by the blockchain, the redemption code and the code status corresponding to the target code mapping code stored locally are marked as the verification status.
此外,为实现上述目的,本申请还提供一种卡券管理装置,所述卡券管理装置包括:In addition, in order to achieve the above-mentioned object, the present application also provides a card and coupon management device, which includes:
第一获取模块,用于当检测到卡券采购订单被创建时,获取所述卡券采购订单所采购的卡券的兑换码;The first obtaining module is configured to obtain the redemption code of the card and coupon purchased by the card and coupon purchase order when it is detected that the card and coupon purchase order is created;
第一生成模块,用于获取预先保存的与所述兑换码对应的编码code,生成与所述code对应的code映射码,其中,所述兑换码、所述code和所述code映射码一一对应;The first generation module is configured to obtain a pre-stored code code corresponding to the redemption code, and generate a code mapping code corresponding to the code, wherein the redemption code, the code, and the code mapping code are one by one correspond;
设置模块,用于获取当前所述卡券在预设的全生命周期中所处的状态,将所述状态设置为所述code映射码的状态;A setting module, configured to obtain the current state of the coupon in the preset full life cycle, and set the state to the state of the code mapping code;
第一发送模块,用于将所述code映射码、所述code映射码的状态和所述卡券采购订单进行关联后,发送至区块链进行保存。The first sending module is configured to associate the code mapping code, the state of the code mapping code, and the card purchase order, and then send them to the blockchain for storage.
可选地,所述卡券管理装置还包括:Optionally, the card and coupon management device further includes:
第一接收模块,用于接收供应商节点发送的卡券创建请求和兑换码导入请求;The first receiving module is configured to receive the card coupon creation request and the redemption code import request sent by the supplier node;
创建模块,用于根据所述卡券创建请求创建对应的卡券,根据所述兑换码导入 请求为创建的所述卡券分配对应的兑换码;A creation module, configured to create a corresponding card and coupon according to the card and coupon creation request, and assign a corresponding redemption code to the created card and coupon according to the redemption code import request;
第二生成模块,用于生成与每个兑换码对应的code;The second generation module is used to generate the code corresponding to each redemption code;
保存模块,用于将创建的所述卡券、分配的所述兑换码,以及与每个兑换码对应的code在本地进行加密保存。The saving module is used to encrypt and save the created coupons, the redemption codes allocated, and the code corresponding to each redemption code locally.
可选地,所述卡券管理装置还包括:Optionally, the card and coupon management device further includes:
第二发送模块,用于将所述code发送至采购商节点,以使所述采购商节点将所述code发放至所述采购商节点的客户端。The second sending module is configured to send the code to the buyer node, so that the buyer node can issue the code to the client of the buyer node.
可选地,所述卡券管理装置还包括:Optionally, the card and coupon management device further includes:
第二获取模块,用于当接收到所述客户端发送的卡券兑换请求时,获取所述卡券兑换请求中携带的code;The second obtaining module is configured to obtain the code carried in the card and coupon exchange request when the card and coupon exchange request sent by the client is received;
返回模块,用于获取预先保存的与所述卡券兑换请求中携带的code对应的兑换码,将获取到的所述兑换码返回给所述客户端。The return module is configured to obtain a pre-saved redemption code corresponding to the code carried in the card and coupon redemption request, and return the obtained redemption code to the client.
可选地,所述卡券管理装置还包括:Optionally, the card and coupon management device further includes:
第二接收模块,用于接收卡券核销请求,所述卡券核销请求中携带有待核销卡券的兑换码或code;The second receiving module is configured to receive a card and coupon verification request, where the card and coupon verification request carries the redemption code or code of the coupon to be verified;
第三获取模块,用于获取预先保存的与所述待核销卡券的兑换码或code对应的目标code映射码;The third obtaining module is configured to obtain a pre-stored target code mapping code corresponding to the redemption code or code of the coupon to be verified;
发起模块,用于向所述区块链发起基于所述目标code映射码的核销请求,以使所述区块链的参与节点对所述目标code映射码进行核销共识,并在共识达成后,将所述区块链上的所述目标code映射码的状态标记为已核销状态;The initiation module is used to initiate a verification request based on the target code mapping code to the blockchain, so that the participating nodes of the blockchain can perform a verification consensus on the target code mapping code and reach a consensus Afterwards, mark the state of the target code mapping code on the blockchain as a verified state;
标记模块,用于当接收到所述区块链返回的核销完成信息时,将本地保存的与所述目标code映射码对应的兑换码和code的状态标记为已核销状态。The marking module is used to mark the status of the redemption code and code corresponding to the target code mapping code stored locally as the verified status when the verification completion information returned by the blockchain is received.
此外,为实现上述目的,本申请还提供一种卡券管理设备,所述卡券管理设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的卡券管理程序,所述卡券管理程序被所述处理器执行时实现如上所述的卡券管理方法的步骤。In addition, in order to achieve the above object, this application also provides a coupon management device, the coupon management device includes: a memory, a processor, and a coupon management stored in the memory and running on the processor A program, when the coupon management program is executed by the processor, the steps of the coupon management method described above are implemented.
此外,为实现上述目的,本申请还提供一种存储介质,所述存储介质上存储有卡券管理程序,所述卡券管理程序被处理器执行时实现如上所述的卡券管理方 法的步骤。In addition, in order to achieve the above object, the present application also provides a storage medium, the storage medium stores a coupon management program, and the coupon management program is executed by a processor to realize the steps of the coupon management method described above .
本申请当检测到卡券采购订单被创建时,获取所述卡券采购订单所采购的卡券的兑换码;获取预先保存的与所述兑换码对应的编码code,生成与所述code对应的code映射码,其中,所述兑换码、所述code和所述code映射码一一对应;获取当前所述卡券在预设的全生命周期中所处的状态,将所述状态设置为所述code映射码的状态;将所述code映射码、所述code映射码的状态和所述卡券采购订单进行关联后,发送至区块链进行保存。这种方式通过将code映射码及其状态上链,实现了在不公开兑换码的前提下,对卡券进行链上生命周期管理,由于code映射码是将兑换码进行双重映射后得到的,即使链上的code映射码是公开的,也难以窃取与其对应的卡券兑换码,从而充分保证了卡券兑换码的安全性,也使得code映射码上链时无需加密,从而省去了设置密钥对、加解密等管理流程,大大降低了卡券管理难度。In this application, when it is detected that the card and coupon purchase order is created, the redemption code of the card and coupon purchased by the card and coupon purchase order is obtained; the pre-stored code corresponding to the redemption code is obtained, and the code corresponding to the code is generated code mapping code, wherein the redemption code, the code, and the code mapping code are in one-to-one correspondence; obtain the current state of the coupon during the preset full life cycle, and set the state to The status of the code mapping code; after associating the code mapping code, the status of the code mapping code and the coupon purchase order, they are sent to the blockchain for storage. In this way, by uploading the code mapping code and its status to the chain, it realizes the on-chain life cycle management of cards and coupons without disclosing the redemption code. Since the code mapping code is obtained after double mapping the redemption code, Even if the code mapping code on the chain is public, it is difficult to steal the corresponding card and coupon redemption code, which fully guarantees the security of the card and coupon redemption code, and also makes the code mapping code need not be encrypted when it is chained, thus eliminating the need for settings The management process of key pairing, encryption and decryption greatly reduces the difficulty of card and coupon management.
发明的有益效果The beneficial effects of the invention
对附图的简要说明Brief description of the drawings
附图说明Description of the drawings
图1是本申请实施例方案涉及的硬件运行环境的设备结构示意图;FIG. 1 is a schematic diagram of a device structure of a hardware operating environment involved in a solution of an embodiment of the present application;
图2为本申请卡券管理方法第一实施例的流程示意图;FIG. 2 is a schematic flowchart of the first embodiment of the application card management method;
图3为本申请实施例中卡券管理方法的系统架构示意图。FIG. 3 is a schematic diagram of the system architecture of the card management method in an embodiment of the application.
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization, functional characteristics, and advantages of the purpose of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings.
发明实施例Invention embodiment
本发明的实施方式Embodiments of the invention
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。It should be understood that the specific embodiments described here are only used to explain the application, and are not used to limit the application.
如图1所示,图1是本申请实施例方案涉及的硬件运行环境的设备结构示意图。As shown in FIG. 1, FIG. 1 is a schematic diagram of the device structure of the hardware operating environment involved in the solution of the embodiment of the present application.
本申请实施例卡券管理设备可以是PC机、服务器等设备。The card and coupon management device in the embodiment of the present application may be a PC, a server, and other devices.
如图1所示,该卡券管理设备可以包括:处理器1001,例如CPU,网络接口1004,用户接口1003,存储器1005,通信总线1002。其中,通信总线1002用于实现 这些组件之间的连接通信。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储装置。As shown in FIG. 1, the card management device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display) and an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as a magnetic disk memory. Optionally, the memory 1005 may also be a storage device independent of the foregoing processor 1001.
本领域技术人员可以理解,图1中示出的设备结构并不构成对设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art can understand that the structure of the device shown in FIG. 1 does not constitute a limitation on the device, and may include more or fewer components than those shown in the figure, or a combination of certain components, or different component arrangements.
如图1所示,作为一种计算机存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及卡券管理程序。As shown in FIG. 1, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a coupon management program.
在图1所示的设备中,网络接口1004主要用于连接后台服务器,与后台服务器进行数据通信;用户接口1003主要用于连接客户端(用户端),与客户端进行数据通信;而处理器1001可以用于调用存储器1005中存储的卡券管理程序,并执行下述卡券管理方法实施例中的操作。In the device shown in FIG. 1, the network interface 1004 is mainly used to connect to a back-end server and communicate with the back-end server; the user interface 1003 is mainly used to connect to a client (user side) and communicate with the client; and the processor 1001 can be used to call a coupon management program stored in the memory 1005, and perform operations in the following coupon management method embodiments.
基于上述硬件结构,提出本申请卡券管理方法实施例。Based on the above hardware structure, an embodiment of the card management method of this application is proposed.
参照图2,图2为本申请卡券管理方法第一实施例的流程示意图,所述方法包括:Referring to Fig. 2, Fig. 2 is a schematic flowchart of a first embodiment of a card and coupon management method according to this application. The method includes:
步骤S10,当检测到卡券采购订单被创建时,获取所述卡券采购订单所采购的卡券的兑换码;Step S10, when it is detected that the coupon purchase order is created, the redemption code of the coupon purchased by the coupon purchase order is obtained;
在本实施例中,卡券指的是优惠券、团购券、代金券等电子卡券。本实施例的应用场景可以为:某一企业想要以发放卡券的形式向员工发放福利,或者想要通过采购其他企业的卡券在自有商城上提供积分兑换,为自有客户提供更多权益价值兑换时,可以作为卡券采购商在卡券交易平台上进行卡券的采购,然后将采购的卡券发放给满足发放条件的客户端用户,以供客户端用户使用。In this embodiment, coupons refer to electronic coupons such as coupons, group purchase coupons, and vouchers. The application scenario of this embodiment may be: a certain company wants to issue benefits to employees in the form of issuing cards and coupons, or wants to provide points redemption on its own mall by purchasing cards and coupons from other companies to provide more for its own customers. When multi-equity value is exchanged, it can be used as a card purchaser to purchase cards and coupons on the card and coupon trading platform, and then distribute the purchased cards and coupons to client users who meet the issuance conditions for client users to use.
上述过程中,卡券的生命周期指的是卡券从被创建,到被激活,再到核销或者失效的整个过程。为了实现卡券生命周期管理的公开透明化,本实施例卡券管理方法应用于以区块链为底层构建的卡券交易平台,卡券供应商和卡券采购商通过卡券交易平台进行撮合,并以区块链为底层实现卡券生命周期管理和清算 对账。In the above process, the life cycle of a coupon refers to the entire process of a coupon from being created, to being activated, and to verification or invalidation. In order to realize the openness and transparency of card and coupon life cycle management, the card and coupon management method of this embodiment is applied to a card and coupon trading platform built with a blockchain as the bottom layer. Card and coupon suppliers and card and coupon purchasers are matched through the card and coupon trading platform. , And use blockchain as the bottom layer to realize card and coupon life cycle management and clearing and reconciliation.
具体实施时,可以首先获取卡券供应商在卡券交易平台上创建的卡券及其兑换码,然后将创建的卡券及其兑换码保存在一个卡券兑换码池中;采购商采购卡券时,可以基于想要采购的卡券面额、卡券种类和卡券数量等信息在卡券交易平台上下单,当卡券交易平台检测到卡券采购订单被创建时,获取该卡券采购订单所采购的卡券并查找卡券兑换码池,即可得到所采购的卡券的兑换码。其中,兑换码指的是可以直接兑换到商品的一个字符串,不记名,不同供应商有自己的生成规则,比如可以是16位字母和数字的混合字符串等。During specific implementation, you can first obtain the coupons and coupons and redemption codes created by the coupon supplier on the coupon trading platform, and then save the created coupons and coupons and redemption codes in a card coupon redemption code pool; purchasers purchase cards When purchasing coupons, you can place an order on the coupon trading platform based on the denomination of the coupons you want to purchase, the type of coupons, and the number of coupons. When the coupon trading platform detects that the coupon purchase order has been created, the coupon purchase order can be obtained. Order the purchased coupons and find the redemption code pool to get the redemption codes of the purchased coupons. Among them, the redemption code refers to a character string that can be directly exchanged for a commodity, and it is anonymous. Different suppliers have their own generation rules, such as a mixed character string of 16 letters and numbers.
步骤S20,获取预先保存的与所述兑换码对应的编码code,生成与所述code对应的code映射码,其中,所述兑换码、所述code和所述code映射码一一对应;Step S20: Obtain a pre-stored code code corresponding to the redemption code, and generate a code mapping code corresponding to the code, wherein the redemption code, the code, and the code mapping code correspond one-to-one;
该步骤中,在获取到所采购的卡券的兑换码后,进一步获取预设保存在卡券交易平台本地的与该兑换码对应的编码code,并生成与code对应的code映射码。其中,兑换码、code和code映射码一一对应,code是卡券交易平台自身生成的一个字符串,同一类卡券不会有重复的激活的code,核销之后的code可以重复使用;code映射码是根据卡券采购订单和code之间的关系,对code进行编号所生成的字符串。In this step, after the redemption code of the purchased coupons is obtained, the code corresponding to the redemption code preset and stored locally on the coupon trading platform is further obtained, and a code mapping code corresponding to the code is generated. Among them, the redemption code, code and code mapping code correspond one-to-one. The code is a character string generated by the coupon trading platform itself. There will be no repeated activation codes for the same type of coupons, and the code after verification can be reused; code The mapping code is a character string generated by numbering the code according to the relationship between the coupon purchase order and the code.
步骤S30,获取当前所述卡券在预设的全生命周期中所处的状态,将所述状态设置为所述code映射码的状态;Step S30: Obtain the current state of the coupon during the preset full life cycle, and set the state to the state of the code mapping code;
该步骤中,以预设卡券的全生命周期为已创建-已激活-已核销为例,当卡券采购订单被创建后,可以将其所采购的卡券的状态由原来的已创建标记为已激活,代表该卡券可以被用户使用;当卡券被使用并进行核销之后,可以将卡券的状态标记为已核销。In this step, take the preset full life cycle of the coupons and coupons as created-activated-written off as an example. After the coupon purchase order is created, the status of the coupons purchased can be changed from the original created Marked as activated means that the coupon can be used by the user; when the coupon is used and verified, the status of the coupon can be marked as verified.
本实施例中,卡券交易平台在生成code映射码后,进一步获取当前所采购的卡券在预设的全生命周期中所处的状态,将该获取到的状态设置为生成的code映射码的状态。由于兑换码、code和code映射码一一对应,因此该code映射码的状态也可以看成是兑换码和code的状态,也即,兑换码、code和code映射码的状态保持一致。In this embodiment, after generating the code mapping code, the card and coupon trading platform further obtains the state of the currently purchased card and coupon in the preset full life cycle, and sets the obtained state as the generated code mapping code status. Since the redemption code, code, and code mapping code have a one-to-one correspondence, the status of the code mapping code can also be regarded as the status of the redemption code and code, that is, the status of the redemption code, code, and code mapping code remains the same.
步骤S40,将所述code映射码、所述code映射码的状态和所述卡券采购订单进 行关联后,发送至区块链进行保存。Step S40: After associating the code mapping code, the status of the code mapping code, and the coupon purchase order, they are sent to the blockchain for storage.
在设置了code映射码的状态后,将code映射码、code映射码的状态和卡券采购订单进行关联后,发送至区块链进行保存。由此,可以基于区块链对卡券的生命周期进行管理。After setting the status of the code mapping code, associate the code mapping code, the status of the code mapping code and the card purchase order, and then send them to the blockchain for storage. As a result, the life cycle of coupons can be managed based on the blockchain.
参照图3,图3为本申请实施例中卡券管理方法的系统架构示意图。其中,卡券交易平台可以与区块链进行数据交互,在卡券交易平台中,兑换码、code和code映射码一一对应,兑换码和code不直接上链,而是将code映射码上链,链上code映射码的状态即实际兑换码和code的状态,图中当前订单对应3个code映射码code1、code2和code3,状态分别为已激活、已激活、已核销,当后续兑换码的状态发生改变时,对应修改链上code映射码的状态,即可实现在区块链上进行卡券生命周期管理。Referring to FIG. 3, FIG. 3 is a schematic diagram of the system architecture of the card management method in an embodiment of the application. Among them, the card and coupon trading platform can interact with the blockchain. In the card and coupon trading platform, there is a one-to-one correspondence between the redemption code, code and code mapping code. The redemption code and code are not directly linked to the chain, but the code mapping code is uploaded. The status of the code mapping code on the chain is the actual redemption code and the status of the code. The current order in the figure corresponds to the three code mapping codes code1, code2 and code3. The statuses are activated, activated, and written off respectively. When the status of the code changes, correspondingly modify the status of the code mapping code on the chain to realize the card coupon life cycle management on the blockchain.
在本实施例中,通过将code映射码及其状态上链,实现了在不公开兑换码的前提下,对卡券进行链上生命周期管理,由于code映射码是将兑换码进行双重映射后得到的,即使链上的code映射码是公开的,也难以窃取与其对应的卡券兑换码,从而充分保证了卡券兑换码的安全性,也使得code映射码上链时无需加密,从而省去了设置密钥对、加解密等管理流程,大大降低了卡券管理难度。In this embodiment, by uploading the code mapping code and its status to the chain, the on-chain life cycle management of cards and coupons is realized without disclosing the redemption code. Since the code mapping code is double-mapped for the redemption code It is obtained that even if the code mapping code on the chain is public, it is difficult to steal the corresponding card and coupon redemption code, which fully guarantees the security of the card and coupon redemption code, and also makes the code mapping code need not be encrypted when it is chained, thereby saving Going to set up key pair, encryption and decryption management procedures, greatly reducing the difficulty of card management.
进一步地,基于本申请卡券管理方法第一实施例,提出本申请卡券管理方法第二实施例。Further, based on the first embodiment of the card and coupon management method of the present application, a second embodiment of the card and coupon management method of the present application is proposed.
在本实施例中,上述步骤S10之前,还可以包括:接收供应商节点发送的卡券创建请求和兑换码导入请求;根据所述卡券创建请求创建对应的卡券,根据所述兑换码导入请求为创建的所述卡券分配对应的兑换码;生成与每个兑换码对应的code;将创建的所述卡券、分配的所述兑换码,以及与每个兑换码对应的code在本地进行加密保存。In this embodiment, before the above step S10, it may further include: receiving a coupon creation request and a redemption code import request sent by a supplier node; creating a corresponding coupon according to the coupon creation request, and importing a coupon according to the redemption code Request to assign a corresponding redemption code to the created coupons; generate a code corresponding to each redemption code; place the created coupons, the assigned redemption codes, and the code corresponding to each redemption code locally Save it encrypted.
在本实施例中,供应商可以首先在卡券交易平台创建想要销售的卡券,并导入与卡券对应的兑换码,卡券交易平台在接收到供应商节点发送的卡券创建请求和兑换码导入请求时,创建对应的卡券,并为创建的卡券分配对应的兑换码,对于兑换码,不同供应商有自己的生成规则,本实施例对此不作限定;然后,生成与每个兑换码对应的code,具体的生成方式可以是按照预设规则生成一个字 符串,比如生成30位10进制编码(16位62进制转化为10进制最长为29位),并保证不同兑换码对应的code不同;之后,将卡券、兑换码和code关联后在本地进行加密保存,其中加密算法可以为对称加密算法,也可以是MD5等哈希加密算法。In this embodiment, the supplier can first create the coupons to be sold on the coupon trading platform and import the redemption code corresponding to the coupons. The coupon trading platform receives the coupon creation request and the coupon creation request sent by the supplier node. When the redemption code import request, create the corresponding card and coupon, and assign the corresponding redemption code to the created card and coupon. For the redemption code, different suppliers have their own generation rules, which are not limited in this embodiment; then, the generation is related to each The code corresponding to each redemption code, the specific generation method can be to generate a string according to preset rules, such as generating a 30-digit decimal code (16-digit 62-digit converted to decimal, the longest is 29 digits), and guarantee The code corresponding to different redemption codes is different; after that, the coupon, redemption code and code are associated and encrypted and stored locally. The encryption algorithm can be a symmetric encryption algorithm or a hash encryption algorithm such as MD5.
通过上述方式,为后续获取与卡券对应的兑换码及code提供了前提保证,也为根据兑换码及code对卡券进行核销提供了前提保证。Through the above method, a prerequisite guarantee is provided for subsequent acquisition of the redemption code and code corresponding to the card and voucher, and a prerequisite guarantee for the verification of the card and voucher based on the redemption code and code.
进一步地,基于本申请卡券管理方法第一实施例,提出本申请卡券管理方法第三实施例。Further, based on the first embodiment of the card and coupon management method of the present application, a third embodiment of the card and coupon management method of the present application is proposed.
在本实施例中,上述步骤S40之前,还可以包括:将所述code发送至采购商节点,以使所述采购商节点将所述code发放至所述采购商节点的客户端。In this embodiment, before step S40, the method may further include: sending the code to a buyer node, so that the buyer node can issue the code to the client of the buyer node.
具体地,在将code映射码、code映射码的状态和卡券采购订单进行关联后并发送至区块链进行保存之前,可以首先将code加密发送至采购商节点,以使采购商节点将code发放至客户端,客户端用户获得code,即代表拥有了卡券兑换权益。比如,当采购商节点上部署有积分平台时,平台用户使用积分兑换卡券,此时可以将卡券code发送至用户,用户即获得卡券兑换权益。Specifically, after associating the code mapping code, the status of the code mapping code, and the card purchase order and sending it to the blockchain for storage, the code can be encrypted and sent to the buyer node, so that the buyer node can When the code is issued to the client, the client user obtains the code, which means that they have the rights to exchange cards and coupons. For example, when a point platform is deployed on the purchaser node, the platform user uses points to redeem cards and coupons. At this time, the card and coupon code can be sent to the user, and the user obtains the card and coupon redemption rights.
进一步地,所述卡券管理方法还可以包括:当接收到所述客户端发送的卡券兑换请求时,获取所述卡券兑换请求中携带的code;获取预先保存的与所述卡券兑换请求中携带的code对应的兑换码,将获取到的所述兑换码返回给所述客户端。Further, the card and coupon management method may further include: when a card and coupon exchange request sent by the client is received, obtaining a code carried in the card and coupon exchange request; and obtaining a pre-saved exchange code with the card and coupon The redemption code corresponding to the code carried in the request is returned to the client.
在本实施例中,当卡券交易平台接收到客户端发送的卡券兑换请求时,获取该卡券兑换请求中携带的code,然后获取预先保存的与该code对应的兑换码,并将兑换码返回给客户端,这种通过code拉取对应的兑换码的方式,保证了客户端用户能够正常使用与兑换码对应的卡券。In this embodiment, when the card and coupon transaction platform receives the card and coupon redemption request sent by the client, it obtains the code carried in the card and coupon redemption request, then obtains the pre-stored redemption code corresponding to the code, and exchanges it The code is returned to the client. This method of pulling the corresponding redemption code through the code ensures that the client user can use the coupons corresponding to the redemption code normally.
进一步地,基于本申请卡券管理方法第一、第二和第三实施例,提出本申请卡券管理方法第四实施例。Further, based on the first, second and third embodiments of the card and coupon management method of this application, a fourth embodiment of the card and coupon management method of this application is proposed.
在本实施例中,所述卡券管理方法还可以包括:接收卡券核销请求,所述卡券核销请求中携带有待核销卡券的兑换码或code;获取预先保存的与所述待核销卡券的兑换码或code对应的目标code映射码;向所述区块链发起基于所述目标code映射码的核销请求,以使所述区块链的参与节点对所述目标code映射码进行核销 共识,并在共识达成后,将所述区块链上的所述目标code映射码的状态标记为已核销状态;当接收到所述区块链返回的核销完成信息时,将本地保存的与所述目标code映射码对应的兑换码和code的状态标记为已核销状态。In this embodiment, the card and coupon management method may further include: receiving a card and coupon verification request, the card and coupon verification request carrying the redemption code or code of the coupon to be verified; The redemption code of the card or coupon to be verified or the target code mapping code corresponding to the code; a verification request based on the target code mapping code is initiated to the blockchain, so that the participating nodes of the blockchain can respond to the target The code mapping code performs the verification of the consensus, and after the consensus is reached, the status of the target code mapping code on the blockchain is marked as the verified state; when the verification is completed, the verification returned by the blockchain is received When sending information, mark the redemption code and code status corresponding to the target code mapping code stored locally as the written-off status.
具体地,在本实施例中,卡券核销请求可以由供应商发起,也可以由采购商发起,当由供应商发起时,卡券核销请求中携带有待核销卡券的兑换码,当由采购商发起时,卡券核销请求中携带有待核销卡券的code;当卡券交易平台接收到卡券核销请求时,获取预先保存的与待核销卡券的兑换码或code对应的目标code映射码,然后向区块链发起基于该目标code映射码的核销请求,以使所述区块链的参与节点对该目标code映射码进行核销共识,并在共识达成后,将区块链上的目标code映射码的状态标记为已核销状态,表示该目标code映射码对应的卡券已核销。Specifically, in this embodiment, the voucher verification request may be initiated by the supplier or the purchaser. When initiated by the supplier, the voucher verification request carries the redemption code of the voucher to be verified. When initiated by the purchaser, the voucher verification request carries the code of the voucher to be verified; when the voucher verification request is received by the voucher verification request, the card and voucher transaction platform obtains the pre-saved redemption code or the voucher to be verified. code corresponding to the target code mapping code, and then initiates a verification request based on the target code mapping code to the blockchain, so that the participating nodes of the blockchain can perform a verification consensus on the target code mapping code, and the consensus is reached After that, the status of the target code mapping code on the blockchain is marked as the verified state, which means that the coupon corresponding to the target code mapping code has been verified.
由此,实现了基于区块链对卡券进行核销,该核销过程兑换码始终加密保存在卡券交易平台本地,从而在链上生命周期的管理的同时也保证了兑换码的安全。As a result, the verification of the card and coupon based on the blockchain is realized. The redemption code of the verification process is always encrypted and stored locally on the card and coupon trading platform, thereby ensuring the security of the redemption code while managing the life cycle on the chain.
本申请还提供一种卡券管理装置。所述卡券管理装置包括:The application also provides a card and coupon management device. The card and coupon management device includes:
第一获取模块,用于当检测到卡券采购订单被创建时,获取所述卡券采购订单所采购的卡券的兑换码;The first obtaining module is configured to obtain the redemption code of the card and coupon purchased by the card and coupon purchase order when it is detected that the card and coupon purchase order is created;
第一生成模块,用于获取预先保存的与所述兑换码对应的编码code,生成与所述code对应的code映射码,其中,所述兑换码、所述code和所述code映射码一一对应;The first generation module is configured to obtain a pre-stored code code corresponding to the redemption code, and generate a code mapping code corresponding to the code, wherein the redemption code, the code, and the code mapping code are one by one correspond;
设置模块,用于获取当前所述卡券在预设的全生命周期中所处的状态,将所述状态设置为所述code映射码的状态;A setting module, configured to obtain the current state of the coupon in the preset full life cycle, and set the state to the state of the code mapping code;
第一发送模块,用于将所述code映射码、所述code映射码的状态和所述卡券采购订单进行关联后,发送至区块链进行保存。The first sending module is configured to associate the code mapping code, the state of the code mapping code, and the card purchase order, and then send them to the blockchain for storage.
进一步地,所述卡券管理装置还包括:Further, the card and coupon management device further includes:
第一接收模块,用于接收供应商节点发送的卡券创建请求和兑换码导入请求;The first receiving module is configured to receive the card coupon creation request and the redemption code import request sent by the supplier node;
创建模块,用于根据所述卡券创建请求创建对应的卡券,根据所述兑换码导入请求为创建的所述卡券分配对应的兑换码;A creation module, configured to create a corresponding card and coupon according to the card and coupon creation request, and assign a corresponding redemption code to the created card and coupon according to the redemption code import request;
第二生成模块,用于生成与每个兑换码对应的code;The second generation module is used to generate the code corresponding to each redemption code;
保存模块,用于将创建的所述卡券、分配的所述兑换码,以及与每个兑换码对应的code在本地进行加密保存。The saving module is used to encrypt and save the created coupons, the redemption codes allocated, and the code corresponding to each redemption code locally.
进一步地,所述卡券管理装置还包括:Further, the card and coupon management device further includes:
第二发送模块,用于将所述code发送至采购商节点,以使所述采购商节点将所述code发放至所述采购商节点的客户端。The second sending module is configured to send the code to the buyer node, so that the buyer node can issue the code to the client of the buyer node.
进一步地,所述卡券管理装置还包括:Further, the card and coupon management device further includes:
第二获取模块,用于当接收到所述客户端发送的卡券兑换请求时,获取所述卡券兑换请求中携带的code;The second obtaining module is configured to obtain the code carried in the card and coupon exchange request when the card and coupon exchange request sent by the client is received;
返回模块,用于获取预先保存的与所述卡券兑换请求中携带的code对应的兑换码,将获取到的所述兑换码返回给所述客户端。The return module is configured to obtain a pre-saved redemption code corresponding to the code carried in the card and coupon redemption request, and return the obtained redemption code to the client.
进一步地,所述卡券管理装置还包括:Further, the card and coupon management device further includes:
第二接收模块,用于接收卡券核销请求,所述卡券核销请求中携带有待核销卡券的兑换码或code;The second receiving module is configured to receive a card and coupon verification request, where the card and coupon verification request carries the redemption code or code of the coupon to be verified;
第三获取模块,用于获取预先保存的与所述待核销卡券的兑换码或code对应的目标code映射码;The third obtaining module is configured to obtain a pre-stored target code mapping code corresponding to the redemption code or code of the coupon to be verified;
发起模块,用于向所述区块链发起基于所述目标code映射码的核销请求,以使所述区块链的参与节点对所述目标code映射码进行核销共识,并在共识达成后,将所述区块链上的所述目标code映射码的状态标记为已核销状态;The initiation module is used to initiate a verification request based on the target code mapping code to the blockchain, so that the participating nodes of the blockchain can perform a verification consensus on the target code mapping code and reach a consensus Afterwards, mark the state of the target code mapping code on the blockchain as a verified state;
标记模块,用于当接收到所述区块链返回的核销完成信息时,将本地保存的与所述目标code映射码对应的兑换码和code的状态标记为已核销状态。The marking module is used to mark the redemption code and code status corresponding to the target code mapping code stored locally as the written-off state when the verification completion information returned by the blockchain is received.
上述各程序模块所执行的方法可参照本申请卡券管理方法各个实施例,此处不再赘述。For the methods executed by the above-mentioned program modules, please refer to the various embodiments of the card management method of this application, which will not be repeated here.
本申请还提供一种存储介质。The application also provides a storage medium.
本申请存储介质上存储有卡券管理程序,所述卡券管理程序被处理器执行时实现如上所述的卡券管理方法的步骤。A coupon management program is stored on the storage medium of the present application, and when the coupon management program is executed by a processor, the steps of the coupon management method described above are realized.
其中,在所述处理器上运行的卡券管理程序被执行时所实现的方法可参照本申请卡券管理方法各个实施例,此处不再赘述。For the method implemented when the coupon management program running on the processor is executed, please refer to the various embodiments of the coupon management method of this application, which will not be repeated here.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个......”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。It should be noted that in this article, the terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements not only includes those elements, It also includes other elements that are not explicitly listed, or elements inherent to the process, method, article, or system. If there are no more restrictions, the element defined by the sentence "including a..." does not exclude the existence of other identical elements in the process, method, article or system that includes the element.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the foregoing embodiments of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method of the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is better.的实施方式。 Based on this understanding, the technical solution of this application essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM) as described above. , Magnetic disk, optical disk), including several instructions to make a terminal device (can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the method described in each embodiment of the present application.
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above are only preferred embodiments of this application, and do not limit the scope of this application. Any equivalent structure or equivalent process transformation made using the content of the description and drawings of this application, or directly or indirectly used in other related technical fields , The same reason is included in the scope of patent protection of this application.

Claims (20)

  1. 一种卡券管理方法,其中,所述卡券管理方法包括如下步骤:A card and coupon management method, wherein the card and coupon management method includes the following steps:
    当检测到卡券采购订单被创建时,获取所述卡券采购订单所采购的卡券的兑换码;When it is detected that the coupon purchase order is created, acquiring the redemption code of the coupon purchased by the coupon purchase order;
    获取预先保存的与所述兑换码对应的编码code,生成与所述code对应的code映射码,其中,所述兑换码、所述code和所述code映射码一一对应;Obtain a pre-stored code code corresponding to the redemption code, and generate a code mapping code corresponding to the code, wherein the redemption code, the code, and the code mapping code have a one-to-one correspondence;
    获取当前所述卡券在预设的全生命周期中所处的状态,将所述状态设置为所述code映射码的状态;Acquiring the current state of the coupon during the preset full life cycle, and setting the state to the state of the code mapping code;
    将所述code映射码、所述code映射码的状态和所述卡券采购订单进行关联后,发送至区块链进行保存。After associating the code mapping code, the status of the code mapping code, and the coupon purchase order, they are sent to the blockchain for storage.
  2. 如权利要求1所述的卡券管理方法,其中,所述当检测到卡券采购订单被创建时,获取所述卡券采购订单所采购的卡券的兑换码的步骤之前,还包括:5. The card and coupon management method according to claim 1, wherein, before the step of obtaining the redemption code of the card and coupon purchased by the card and coupon purchase order when it is detected that the card and coupon purchase order is created, the method further comprises:
    接收供应商节点发送的卡券创建请求和兑换码导入请求;Receive card coupon creation request and redemption code import request sent by the supplier node;
    根据所述卡券创建请求创建对应的卡券,根据所述兑换码导入请求为创建的所述卡券分配对应的兑换码;Create a corresponding card and coupon according to the card and coupon creation request, and assign a corresponding redemption code to the created card and coupon according to the redemption code import request;
    生成与每个兑换码对应的code;Generate code corresponding to each redemption code;
    将创建的所述卡券、分配的所述兑换码,以及与每个兑换码对应的code在本地进行加密保存。The created coupons, the distributed redemption codes, and the code corresponding to each redemption code are encrypted and stored locally.
  3. 如权利要求1所述的卡券管理方法,其中,所述将所述code映射码、所述code映射码的状态和所述卡券采购订单进行关联后,发送至区块链进行保存的步骤之前,还包括:The card and coupon management method according to claim 1, wherein the step of associating the code mapping code, the status of the code mapping code and the card and coupon purchase order, and then sending them to the blockchain for storage Before, it also included:
    将所述code发送至采购商节点,以使所述采购商节点将所述code发放至所述采购商节点的客户端。The code is sent to the buyer node, so that the buyer node issues the code to the client of the buyer node.
  4. 如权利要求3所述的卡券管理方法,其中,所述卡券管理方法还包括:3. The card and coupon management method according to claim 3, wherein the card and coupon management method further comprises:
    当接收到所述客户端发送的卡券兑换请求时,获取所述卡券兑换 请求中携带的code;When receiving the card coupon redemption request sent by the client terminal, obtain the code carried in the card coupon redemption request;
    获取预先保存的与所述卡券兑换请求中携带的code对应的兑换码,将获取到的所述兑换码返回给所述客户端。A pre-saved redemption code corresponding to the code carried in the card and coupon redemption request is obtained, and the obtained redemption code is returned to the client.
  5. 如权利要求1所述的卡券管理方法,其中,所述卡券管理方法还包括:The card and coupon management method according to claim 1, wherein the card and coupon management method further comprises:
    接收卡券核销请求,所述卡券核销请求中携带有待核销卡券的兑换码或code;Receiving a coupon verification request, where the coupon verification request carries the redemption code or code of the coupon to be verified;
    获取预先保存的与所述待核销卡券的兑换码或code对应的目标code映射码;Obtaining a pre-saved target code mapping code corresponding to the redemption code or code of the coupon to be verified;
    向所述区块链发起基于所述目标code映射码的核销请求,以使所述区块链的参与节点对所述目标code映射码进行核销共识,并在共识达成后,将所述区块链上的所述目标code映射码的状态标记为已核销状态;Initiate a verification request based on the target code mapping code to the blockchain, so that the participating nodes of the blockchain will perform a verification consensus on the target code mapping code, and after the consensus is reached, the The state of the target code mapping code on the blockchain is marked as a written-off state;
    当接收到所述区块链返回的核销完成信息时,将本地保存的与所述目标code映射码对应的兑换码和code的状态标记为已核销状态。When receiving the verification completion information returned by the blockchain, the redemption code and the code status corresponding to the target code mapping code stored locally are marked as the verification status.
  6. 一种卡券管理装置,其中,所述卡券管理装置包括:A card and coupon management device, wherein the card and coupon management device includes:
    第一获取模块,用于当检测到卡券采购订单被创建时,获取所述卡券采购订单所采购的卡券的兑换码;The first obtaining module is configured to obtain the redemption code of the card and coupon purchased by the card and coupon purchase order when it is detected that the card and coupon purchase order is created;
    第一生成模块,用于获取预先保存的与所述兑换码对应的编码code,生成与所述code对应的code映射码,其中,所述兑换码、所述code和所述code映射码一一对应;The first generation module is configured to obtain a pre-stored code code corresponding to the redemption code, and generate a code mapping code corresponding to the code, wherein the redemption code, the code, and the code mapping code are one by one correspond;
    设置模块,用于获取当前所述卡券在预设的全生命周期中所处的状态,将所述状态设置为所述code映射码的状态;A setting module, configured to obtain the current state of the coupon in the preset full life cycle, and set the state to the state of the code mapping code;
    第一发送模块,用于将所述code映射码、所述code映射码的状态和所述卡券采购订单进行关联后,发送至区块链进行保存。The first sending module is configured to associate the code mapping code, the state of the code mapping code, and the card purchase order, and then send them to the blockchain for storage.
  7. 如权利要求6所述的卡券管理装置,其中,所述卡券管理装置还包括:7. The card and coupon management device of claim 6, wherein the card and coupon management device further comprises:
    第一接收模块,用于接收供应商节点发送的卡券创建请求和兑换 码导入请求;The first receiving module is configured to receive the card coupon creation request and the redemption code import request sent by the supplier node;
    创建模块,用于根据所述卡券创建请求创建对应的卡券,根据所述兑换码导入请求为创建的所述卡券分配对应的兑换码;A creation module, configured to create a corresponding card and coupon according to the card and coupon creation request, and assign a corresponding redemption code to the created card and coupon according to the redemption code import request;
    第二生成模块,用于生成与每个兑换码对应的code;The second generation module is used to generate the code corresponding to each redemption code;
    保存模块,用于将创建的所述卡券、分配的所述兑换码,以及与每个兑换码对应的code在本地进行加密保存。The saving module is used to encrypt and save the created coupons, the redemption codes allocated, and the code corresponding to each redemption code locally.
  8. 如权利要求6所述的卡券管理装置,其中,所述卡券管理装置还包括:7. The card and coupon management device of claim 6, wherein the card and coupon management device further comprises:
    第二发送模块,用于将所述code发送至采购商节点,以使所述采购商节点将所述code发放至所述采购商节点的客户端。The second sending module is configured to send the code to the buyer node, so that the buyer node can issue the code to the client of the buyer node.
  9. 如权利要求8所述的卡券管理装置,其中,所述卡券管理装置还包括:8. The card and coupon management device of claim 8, wherein the card and coupon management device further comprises:
    第二获取模块,用于当接收到所述客户端发送的卡券兑换请求时,获取所述卡券兑换请求中携带的code;The second obtaining module is configured to obtain the code carried in the card and coupon exchange request when the card and coupon exchange request sent by the client is received;
    返回模块,用于获取预先保存的与所述卡券兑换请求中携带的code对应的兑换码,将获取到的所述兑换码返回给所述客户端。The return module is configured to obtain a pre-saved redemption code corresponding to the code carried in the card and coupon redemption request, and return the obtained redemption code to the client.
  10. 如权利要求6所述的卡券管理装置,其中,所述卡券管理装置还包括:7. The card and coupon management device of claim 6, wherein the card and coupon management device further comprises:
    第二接收模块,用于接收卡券核销请求,所述卡券核销请求中携带有待核销卡券的兑换码或code;The second receiving module is configured to receive a card and coupon verification request, where the card and coupon verification request carries the redemption code or code of the coupon to be verified;
    第三获取模块,用于获取预先保存的与所述待核销卡券的兑换码或code对应的目标code映射码;The third obtaining module is configured to obtain a pre-stored target code mapping code corresponding to the redemption code or code of the coupon to be verified;
    发起模块,用于向所述区块链发起基于所述目标code映射码的核销请求,以使所述区块链的参与节点对所述目标code映射码进行核销共识,并在共识达成后,将所述区块链上的所述目标code映射码的状态标记为已核销状态;The initiation module is used to initiate a verification request based on the target code mapping code to the blockchain, so that the participating nodes of the blockchain can perform a verification consensus on the target code mapping code and reach a consensus Afterwards, mark the state of the target code mapping code on the blockchain as a verified state;
    标记模块,用于当接收到所述区块链返回的核销完成信息时,将本地保存的与所述目标code映射码对应的兑换码和code的状态标记 为已核销状态。The marking module is used to mark the status of the redemption code and code corresponding to the target code mapping code stored locally as the verified status when the verification completion information returned by the blockchain is received.
  11. 一种卡券管理设备,其中,所述卡券管理设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的卡券管理程序,所述卡券管理程序被所述处理器执行时实现如下步骤:A card and coupon management device, wherein the card and coupon management device includes a memory, a processor, and a card and coupon management program stored on the memory and running on the processor, and the card and coupon management program is The processor implements the following steps when executing:
    当检测到卡券采购订单被创建时,获取所述卡券采购订单所采购的卡券的兑换码;When it is detected that the coupon purchase order is created, acquiring the redemption code of the coupon purchased by the coupon purchase order;
    获取预先保存的与所述兑换码对应的编码code,生成与所述code对应的code映射码,其中,所述兑换码、所述code和所述code映射码一一对应;Obtain a pre-stored code code corresponding to the redemption code, and generate a code mapping code corresponding to the code, wherein the redemption code, the code, and the code mapping code have a one-to-one correspondence;
    获取当前所述卡券在预设的全生命周期中所处的状态,将所述状态设置为所述code映射码的状态;Acquiring the current state of the coupon during the preset full life cycle, and setting the state to the state of the code mapping code;
    将所述code映射码、所述code映射码的状态和所述卡券采购订单进行关联后,发送至区块链进行保存。After associating the code mapping code, the status of the code mapping code, and the coupon purchase order, they are sent to the blockchain for storage.
  12. 如权利要求11所述的卡券管理设备,其中,所述卡券管理程序被所述处理器执行时还实现如下步骤:The card and coupon management device according to claim 11, wherein the following steps are further implemented when the card and coupon management program is executed by the processor:
    接收供应商节点发送的卡券创建请求和兑换码导入请求;Receive card coupon creation request and redemption code import request sent by the supplier node;
    根据所述卡券创建请求创建对应的卡券,根据所述兑换码导入请求为创建的所述卡券分配对应的兑换码;Create a corresponding card and coupon according to the card and coupon creation request, and assign a corresponding redemption code to the created card and coupon according to the redemption code import request;
    生成与每个兑换码对应的code;Generate code corresponding to each redemption code;
    将创建的所述卡券、分配的所述兑换码,以及与每个兑换码对应的code在本地进行加密保存。The created coupons, the distributed redemption codes, and the code corresponding to each redemption code are encrypted and stored locally.
  13. 如权利要求11所述的卡券管理设备,其中,所述卡券管理程序被所述处理器执行时还实现如下步骤:The card and coupon management device according to claim 11, wherein the following steps are further implemented when the card and coupon management program is executed by the processor:
    将所述code发送至采购商节点,以使所述采购商节点将所述code发放至所述采购商节点的客户端。The code is sent to the buyer node, so that the buyer node issues the code to the client of the buyer node.
  14. 如权利要求13所述的卡券管理设备,其中,所述卡券管理程序被所述处理器执行时还实现如下步骤:The card and coupon management device according to claim 13, wherein the following steps are further implemented when the card and coupon management program is executed by the processor:
    当接收到所述客户端发送的卡券兑换请求时,获取所述卡券兑换 请求中携带的code;When receiving the card coupon redemption request sent by the client terminal, obtain the code carried in the card coupon redemption request;
    获取预先保存的与所述卡券兑换请求中携带的code对应的兑换码,将获取到的所述兑换码返回给所述客户端。A pre-saved redemption code corresponding to the code carried in the card and coupon redemption request is obtained, and the obtained redemption code is returned to the client.
  15. 如权利要求11所述的卡券管理设备,其中,所述卡券管理程序被所述处理器执行时还实现如下步骤:The card and coupon management device according to claim 11, wherein the following steps are further implemented when the card and coupon management program is executed by the processor:
    接收卡券核销请求,所述卡券核销请求中携带有待核销卡券的兑换码或code;Receiving a coupon verification request, where the coupon verification request carries the redemption code or code of the coupon to be verified;
    获取预先保存的与所述待核销卡券的兑换码或code对应的目标code映射码;Obtaining a pre-saved target code mapping code corresponding to the redemption code or code of the coupon to be verified;
    向所述区块链发起基于所述目标code映射码的核销请求,以使所述区块链的参与节点对所述目标code映射码进行核销共识,并在共识达成后,将所述区块链上的所述目标code映射码的状态标记为已核销状态;Initiate a verification request based on the target code mapping code to the blockchain, so that the participating nodes of the blockchain will perform a verification consensus on the target code mapping code, and after the consensus is reached, the The state of the target code mapping code on the blockchain is marked as a written-off state;
    当接收到所述区块链返回的核销完成信息时,将本地保存的与所述目标code映射码对应的兑换码和code的状态标记为已核销状态。When receiving the verification completion information returned by the blockchain, the redemption code and the code status corresponding to the target code mapping code stored locally are marked as the verification status.
  16. 一种存储介质,其中,所述存储介质上存储有卡券管理程序,所述卡券管理程序被处理器执行时实现如下步骤:A storage medium, wherein a coupon management program is stored on the storage medium, and when the coupon management program is executed by a processor, the following steps are implemented:
    当检测到卡券采购订单被创建时,获取所述卡券采购订单所采购的卡券的兑换码;When it is detected that the coupon purchase order is created, acquiring the redemption code of the coupon purchased by the coupon purchase order;
    获取预先保存的与所述兑换码对应的编码code,生成与所述code对应的code映射码,其中,所述兑换码、所述code和所述code映射码一一对应;Obtain a pre-stored code code corresponding to the redemption code, and generate a code mapping code corresponding to the code, wherein the redemption code, the code, and the code mapping code have a one-to-one correspondence;
    获取当前所述卡券在预设的全生命周期中所处的状态,将所述状态设置为所述code映射码的状态;Acquiring the current state of the coupon during the preset full life cycle, and setting the state to the state of the code mapping code;
    将所述code映射码、所述code映射码的状态和所述卡券采购订单进行关联后,发送至区块链进行保存。After associating the code mapping code, the status of the code mapping code, and the coupon purchase order, they are sent to the blockchain for storage.
  17. 如权利要求16所述的存储介质,其中,所述卡券管理程序被处理器执行时还实现如下步骤:15. The storage medium of claim 16, wherein the following steps are further implemented when the coupon management program is executed by the processor:
    接收供应商节点发送的卡券创建请求和兑换码导入请求;Receive card coupon creation request and redemption code import request sent by the supplier node;
    根据所述卡券创建请求创建对应的卡券,根据所述兑换码导入请求为创建的所述卡券分配对应的兑换码;Create a corresponding card and coupon according to the card and coupon creation request, and assign a corresponding redemption code to the created card and coupon according to the redemption code import request;
    生成与每个兑换码对应的code;Generate code corresponding to each redemption code;
    将创建的所述卡券、分配的所述兑换码,以及与每个兑换码对应的code在本地进行加密保存。The created coupons, the distributed redemption codes, and the code corresponding to each redemption code are encrypted and stored locally.
  18. 如权利要求16所述的存储介质,其中,所述卡券管理程序被处理器执行时还实现如下步骤:15. The storage medium of claim 16, wherein the following steps are further implemented when the coupon management program is executed by the processor:
    将所述code发送至采购商节点,以使所述采购商节点将所述code发放至所述采购商节点的客户端。The code is sent to the buyer node, so that the buyer node issues the code to the client of the buyer node.
  19. 如权利要求18所述的存储介质,其中,所述卡券管理程序被处理器执行时还实现如下步骤:17. The storage medium of claim 18, wherein the following steps are further implemented when the coupon management program is executed by the processor:
    当接收到所述客户端发送的卡券兑换请求时,获取所述卡券兑换请求中携带的code;When receiving the card and coupon redemption request sent by the client, obtain the code carried in the card and coupon redemption request;
    获取预先保存的与所述卡券兑换请求中携带的code对应的兑换码,将获取到的所述兑换码返回给所述客户端。A pre-saved redemption code corresponding to the code carried in the card and coupon redemption request is obtained, and the obtained redemption code is returned to the client.
  20. 如权利要求16所述的存储介质,其中,所述卡券管理程序被处理器执行时还实现如下步骤:15. The storage medium of claim 16, wherein the following steps are further implemented when the coupon management program is executed by the processor:
    接收卡券核销请求,所述卡券核销请求中携带有待核销卡券的兑换码或code;Receiving a coupon verification request, where the coupon verification request carries the redemption code or code of the coupon to be verified;
    获取预先保存的与所述待核销卡券的兑换码或code对应的目标code映射码;Obtaining a pre-saved target code mapping code corresponding to the redemption code or code of the coupon to be verified;
    向所述区块链发起基于所述目标code映射码的核销请求,以使所述区块链的参与节点对所述目标code映射码进行核销共识,并在共识达成后,将所述区块链上的所述目标code映射码的状态标记为已核销状态;Initiate a verification request based on the target code mapping code to the blockchain, so that the participating nodes of the blockchain will perform a verification consensus on the target code mapping code, and after the consensus is reached, the The state of the target code mapping code on the blockchain is marked as a written-off state;
    当接收到所述区块链返回的核销完成信息时,将本地保存的与所述目标code映射码对应的兑换码和code的状态标记为已核销状态。When receiving the verification completion information returned by the blockchain, the redemption code and the code status corresponding to the target code mapping code stored locally are marked as the verification status.
PCT/CN2020/096380 2019-06-18 2020-06-16 Coupon management method, apparatus and device, and storage medium WO2020253682A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910530226.5 2019-06-18
CN201910530226.5A CN110232601A (en) 2019-06-18 2019-06-18 Card certificate management method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2020253682A1 true WO2020253682A1 (en) 2020-12-24

Family

ID=67856203

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/096380 WO2020253682A1 (en) 2019-06-18 2020-06-16 Coupon management method, apparatus and device, and storage medium

Country Status (2)

Country Link
CN (1) CN110232601A (en)
WO (1) WO2020253682A1 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110232601A (en) * 2019-06-18 2019-09-13 深圳前海微众银行股份有限公司 Card certificate management method, device, equipment and storage medium
CN111260411B (en) * 2020-01-21 2021-06-08 拉扎斯网络科技(上海)有限公司 Resource processing method and device
CN111325583B (en) * 2020-03-20 2023-05-02 贵阳块数据城市建设有限公司 Design method for recording life cycle of electronic ticket based on blockchain technology
CN111768229B (en) * 2020-06-23 2023-10-13 北京思特奇信息技术股份有限公司 Forward rule control system based on card
CN112015758B (en) * 2020-08-27 2023-07-28 中国平安财产保险股份有限公司 Product code-fetching method, device, computer equipment and storage medium
CN112200576B (en) * 2020-12-04 2021-03-02 支付宝(杭州)信息技术有限公司 Block chain-based electronic certificate processing method and device
CN112669062B (en) * 2020-12-23 2023-12-22 中国银联股份有限公司 Electronic card management method, server, system and storage medium
CN114548987B (en) * 2022-02-25 2023-11-28 北京天德科技有限公司 Anti-cheating and supervision NFR rights and interests circulation exchange intelligent contract and method thereof

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104091275A (en) * 2013-04-01 2014-10-08 上海深聚信息科技有限公司 Method and system used for matching coupon with suitable goods
KR101763082B1 (en) * 2016-11-14 2017-07-28 이철규 Online ticket publishing method and system thereof
CN109191194A (en) * 2018-08-22 2019-01-11 腾讯科技(深圳)有限公司 A kind of card certificate data processing method, equipment, system and storage medium
CN109409960A (en) * 2018-11-01 2019-03-01 广州品唯软件有限公司 A kind of the electronics code management system and platform of electronic card certificate
CN109741147A (en) * 2019-01-04 2019-05-10 深圳前海微众银行股份有限公司 Card certificate management method, device, equipment and computer readable storage medium
CN110232601A (en) * 2019-06-18 2019-09-13 深圳前海微众银行股份有限公司 Card certificate management method, device, equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103838753B (en) * 2012-11-23 2018-04-27 腾讯科技(北京)有限公司 A kind of storage of redemption code, verification method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104091275A (en) * 2013-04-01 2014-10-08 上海深聚信息科技有限公司 Method and system used for matching coupon with suitable goods
KR101763082B1 (en) * 2016-11-14 2017-07-28 이철규 Online ticket publishing method and system thereof
CN109191194A (en) * 2018-08-22 2019-01-11 腾讯科技(深圳)有限公司 A kind of card certificate data processing method, equipment, system and storage medium
CN109409960A (en) * 2018-11-01 2019-03-01 广州品唯软件有限公司 A kind of the electronics code management system and platform of electronic card certificate
CN109741147A (en) * 2019-01-04 2019-05-10 深圳前海微众银行股份有限公司 Card certificate management method, device, equipment and computer readable storage medium
CN110232601A (en) * 2019-06-18 2019-09-13 深圳前海微众银行股份有限公司 Card certificate management method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN110232601A (en) 2019-09-13

Similar Documents

Publication Publication Date Title
WO2020253682A1 (en) Coupon management method, apparatus and device, and storage medium
US11769186B2 (en) Use verification code for validating an exchange item use request
US11461784B2 (en) Merchant verification in an exchange item marketplace network
US11694207B2 (en) Securing an exchange item associated with fraud
US11176584B2 (en) Cross-brand redemption in an exchange item marketplace network
CN101978646B (en) For performing the system and method for file distributing and purchase
AU2016414611A1 (en) Digital asset distribution by transaction device
JP2020526052A (en) Product promotion using smart contracts within the blockchain network
AU2015308090B2 (en) System and method for electronic payments
JP6904002B2 (en) Information processing device and information processing method
CN108074131A (en) Customized content in mobile device application program integrates
CN113723951A (en) Rights and interests transfer system based on block chain
KR20070065852A (en) Method for certificating qualifying goods by using certification number
CN110266686A (en) Data sharing method, device, equipment and computer readable storage medium
WO2021204042A1 (en) Registration of organization identification number
WO2019203982A2 (en) Server and method for sending a transaction receipt via a push notification
US20240143721A1 (en) Techniques for establishing trusted environments within a metaverse
TWM494363U (en) Member card system for shopping with mobile device
TW202343478A (en) Blockchain-based membership card issuance platform
KR20220133532A (en) System and method to support services for integrated management of identity and electronic payments online and offline
TW202109407A (en) Method and device for point management and voucher invoicing
KR20210125803A (en) Method for Authenticating Ownership of Products
CN114565384A (en) NFT privacy transaction method, computer device and storage medium

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

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

Country of ref document: EP

Kind code of ref document: A1