[go: up one dir, main page]

CN115564413A - Payment method, platform, terminal and payment system based on digital currency - Google Patents

Payment method, platform, terminal and payment system based on digital currency Download PDF

Info

Publication number
CN115564413A
CN115564413A CN202110668332.7A CN202110668332A CN115564413A CN 115564413 A CN115564413 A CN 115564413A CN 202110668332 A CN202110668332 A CN 202110668332A CN 115564413 A CN115564413 A CN 115564413A
Authority
CN
China
Prior art keywords
digital currency
prepayment
request
payment
account
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110668332.7A
Other languages
Chinese (zh)
Inventor
穆长春
狄刚
钱友才
吕远
杜金钊
李长礼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Institute of Printing Science and Technology Peoples Bank of China
Original Assignee
Institute of Printing Science and Technology Peoples Bank of China
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 Institute of Printing Science and Technology Peoples Bank of China filed Critical Institute of Printing Science and Technology Peoples Bank of China
Priority to CN202110668332.7A priority Critical patent/CN115564413A/en
Priority to EP22824009.9A priority patent/EP4358000A4/en
Priority to PCT/CN2022/094113 priority patent/WO2022262527A1/en
Priority to US18/571,214 priority patent/US20240281802A1/en
Publication of CN115564413A publication Critical patent/CN115564413A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • G06Q20/065Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/10Payment architectures specially adapted for electronic funds transfer [EFT] systems; specially adapted for home banking systems
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Engineering & Computer Science (AREA)
  • Finance (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention discloses a payment method, a payment platform, a payment terminal and a payment system based on digital currency, and relates to the technical field of computers. One embodiment of the method comprises: receiving a target payment request for a first digital currency in a frozen state, the frozen first digital currency generated based on a prepayment request and a preconfigured prepayment payment intelligent contract; generating a second digital currency corresponding to the target payment amount according to the target payment amount indicated by the target payment request, the first digital currency and a pre-configured pre-payment underwriting intelligent contract; and sending the second digital currency to a first account corresponding to the first digital currency. The implementation mode improves the transaction safety and is beneficial to guaranteeing the rights and interests of the user.

Description

一种基于数字货币的支付方法、平台、终端及支付系统A payment method, platform, terminal and payment system based on digital currency

技术领域technical field

本发明涉及计算机技术领域,尤其涉及一种基于数字货币的支付方法、平台、终端及支付系统。The present invention relates to the field of computer technology, in particular to a digital currency-based payment method, platform, terminal and payment system.

背景技术Background technique

预支付是一种常见的支付场景,例如,各个线上电子平台的会员预充值活动、线下的健身场所和培训机构的预充值活动等。Pre-payment is a common payment scenario, for example, membership pre-recharge activities on various online electronic platforms, offline fitness venues and training institutions pre-recharge activities, etc.

在现有的预支付场景下,用户预支付的货币直接支付至了服务提供方的账户中,无论服务提供方是否已提供了相应的服务,服务提供方可直接使用预支付的货币。这可能导致在用户还未使用完已购买的服务、服务提供方即终止服务的情况下,用户也无法针对预支付的货币进行退款,这降低了预支付场景的交易安全性,难以保障用户权益。In the existing prepayment scenario, the currency prepaid by the user is directly paid into the service provider's account, and the service provider can directly use the prepaid currency regardless of whether the service provider has provided the corresponding service. This may lead to the user being unable to refund the prepaid currency even if the user has not used up the purchased service and the service provider terminates the service, which reduces the transaction security of the prepayment scenario and makes it difficult to protect the user rights and interests.

发明内容Contents of the invention

有鉴于此,本发明实施例提供一种基于数字货币的支付方法、平台、终端及支付系统,能够基于预配置的预支付缴存智能合约,使得与预支付金额对应的第一数字货币处于冻结状态,此时发起预支付请求的第一用户以及服务提供方对应的第二用户无法使用该第二数字货币。当接收到针对处于冻结状态的第一数字货币对应的目标支付请求时,根据预支付核销智能合约,对处于冻结状态的第一数字货币进行核销,生成与目标支付金额对应的第二数字货币,并将第二数字货币发送给服务提供方对应的第一账户,使得服务提供方可使用第二数字货币。由此,通过预支付智能合约,避免了服务提供方提前使用预支付的数字货币,提高了预支付场景的交易安全性。进一步地,还能撤销或取消未使用的预支付数字货币,使得未使用的预支付数字货币返回至第一用户对应的第二账户中,解决了现有的预支付场景下,用户无法针对预支付的货币进行退款的问题,从而进一步提高了预支付场景的交易安全性,保障了用户权益。In view of this, the embodiment of the present invention provides a payment method, platform, terminal and payment system based on digital currency, which can make the first digital currency corresponding to the prepaid amount be frozen based on the pre-configured prepayment deposit smart contract. At this time, the first user who initiates the prepayment request and the second user corresponding to the service provider cannot use the second digital currency. When the target payment request corresponding to the first digital currency in the frozen state is received, the first digital currency in the frozen state is written off according to the prepayment write-off smart contract, and the second number corresponding to the target payment amount is generated Currency, and send the second digital currency to the first account corresponding to the service provider, so that the service provider can use the second digital currency. Therefore, through the prepayment smart contract, the service provider is prevented from using the prepaid digital currency in advance, and the transaction security of the prepayment scenario is improved. Furthermore, it is also possible to revoke or cancel the unused prepaid digital currency, so that the unused prepaid digital currency is returned to the second account corresponding to the first user, which solves the problem that in the existing prepayment scenario, the user cannot target the prepaid digital currency. The problem of refunding the paid currency further improves the transaction security of the pre-payment scenario and protects the rights and interests of users.

为实现上述目的,根据本发明实施例的一个方面,提供了一种基于数字货币的支付方法。To achieve the above object, according to an aspect of the embodiments of the present invention, a payment method based on digital currency is provided.

本发明实施例的一种基于数字货币的支付方法应用于支付平台时,包括:When a payment method based on digital currency in an embodiment of the present invention is applied to a payment platform, it includes:

接收针对处于冻结状态的第一数字货币的目标支付请求,所述冻结状态的第一数字货币是基于预支付请求以及预配置的预支付缴存智能合约生成的;receiving a target payment request for the first digital currency in the frozen state, the first digital currency in the frozen state is generated based on the prepayment request and the pre-configured prepayment deposit smart contract;

根据所述目标支付请求所指示的目标支付金额、所述第一数字货币以及预配置的预支付核销智能合约,生成与所述目标支付金额对应的第二数字货币;Generate a second digital currency corresponding to the target payment amount according to the target payment amount indicated by the target payment request, the first digital currency, and the pre-configured prepayment write-off smart contract;

将所述第二数字货币发送给所述第一数字货币对应的第一账户。Send the second digital currency to the first account corresponding to the first digital currency.

可选地,根据所述第一数字货币与所述第二数字货币的差额、以及所述预支付核销智能合约,生成新的处于冻结状态的第一数字货币。Optionally, a new frozen first digital currency is generated according to the difference between the first digital currency and the second digital currency and the prepayment write-off smart contract.

可选地,该方法还包括:Optionally, the method also includes:

在接收到针对所述第一数字货币的取消请求的情况下,获取所述第一账户的第一签名信息和所述预支付请求对应的第二账户的第二签名信息;In the case of receiving a cancellation request for the first digital currency, acquiring first signature information of the first account and second signature information of a second account corresponding to the prepayment request;

在获取到所述第一签名信息和所述第二签名信息的情况下,将所述第一数字货币的状态设置为可用状态,并将所述第一数字货币发送给所述第二账户。When the first signature information and the second signature information are obtained, the state of the first digital currency is set to an available state, and the first digital currency is sent to the second account.

可选地,在所述接收针对处于冻结状态的第一数字货币的目标支付请求之前,还包括:Optionally, before receiving the target payment request for the first digital currency in the frozen state, it also includes:

接收第一终端的预支付请求,所述预支付请求指示了第二账户以及预支付金额;receiving a prepayment request from the first terminal, the prepayment request indicating the second account and the prepayment amount;

根据所述预支付请求、所述第二账户所对应的第三数字货币以及预配置的预支付缴存智能合约,生成与所述预支付金额对应的第一数字货币,所述第一数字货币的状态为冻结状态。According to the prepayment request, the third digital currency corresponding to the second account, and the pre-configured prepayment deposit smart contract, a first digital currency corresponding to the prepayment amount is generated, and the first digital currency status is Frozen.

可选地,所述预支付请求还指示了所述第一账户;Optionally, the prepayment request also indicates the first account;

将所述预支付缴存智能合约和/或所述第一账户作为所述第一数字货币的字段写入所述第一数字货币。Writing the prepayment deposit smart contract and/or the first account into the first digital currency as a field of the first digital currency.

可选地,确定所述目标支付请求本次指示的账户是否与所述第一账户相同;Optionally, determine whether the account indicated by the target payment request this time is the same as the first account;

如果是,生成与所述目标支付金额对应的第二数字货币;If so, generating a second digital currency corresponding to the target payment amount;

如果否,拒绝所述目标支付请求。If not, deny the target payment request.

可选地,所述预支付请求还指示了支付期限以及与所述支付期限对应的支付额度;该方法还包括:Optionally, the prepayment request also indicates a payment term and a payment amount corresponding to the payment term; the method also includes:

在监测到当前时间满足所述支付期限的情况下,根据所述支付额度以及所述预支付核销智能合约,生成与所述支付额度对应的第二数字货币,并将与所述支付额度对应的第二数字货币发送给所述第一账户。When it is detected that the current time meets the payment deadline, according to the payment amount and the prepayment write-off smart contract, a second digital currency corresponding to the payment amount is generated and will be corresponding to the payment amount The second digital currency of is sent to the first account.

可选地,将所述预支付核销智能合约作为所述新的处于冻结状态的第一数字货币的字段写入所述第一数字货币。Optionally, the prepayment write-off smart contract is written into the first digital currency as a field of the new first digital currency in a frozen state.

可选地,在所述取消请求为第一终端发送的撤销请求的情况下,还包括:Optionally, in the case where the cancellation request is a cancellation request sent by the first terminal, it further includes:

根据预配置的预支付撤销智能合约,确定所述第一数字货币是否可撤销;determining whether the first digital currency is revocable according to the pre-configured pre-payment revocation smart contract;

如果是,获取所述第一签名信息和所述第二签名信息;If yes, acquiring the first signature information and the second signature information;

如果否,拒绝所述撤销请求。If not, the revocation request is denied.

可选地,在生成所述第二数字货币之后,还包括:Optionally, after generating the second digital currency, it also includes:

利用自身的第三签名信息,对所述第一数字货币进行签名,并根据签名后的所述第一数字货币、所述第二签名信息以及所述预支付缴存智能合约,生成并存储第一预支付交易信息。Use its own third signature information to sign the first digital currency, and generate and store the first digital currency according to the signed first digital currency, the second signature information and the prepayment deposit smart contract 1. Prepaid transaction information.

可选地,所述预支付请求还指示了场景标识和/或业务标识;Optionally, the prepayment request also indicates a scene identifier and/or a service identifier;

根据所述第一数字货币和所述第二签名信息、所述预支付缴存智能合约以及所述场景标识和/或业务标识,生成所述第一预支付交易信息。The first prepayment transaction information is generated according to the first digital currency and the second signature information, the prepayment deposit smart contract, and the scenario identifier and/or service identifier.

可选地,在所述目标支付请求还指示场景标识和/或业务标识的情况下,还包括:Optionally, in the case where the target payment request also indicates a scene identifier and/or a service identifier, it further includes:

确定所述目标支付请求本次指示的场景标识和/或业务标识是否分别与所述第一预支付交易信息指示的场景标识和/或业务标识相同;Determine whether the scenario identifier and/or service identifier indicated by the target payment request this time are the same as the scenario identifier and/or service identifier indicated by the first prepayment transaction information;

如果是,生成与所述目标支付金额对应的第二数字货币;If so, generating a second digital currency corresponding to the target payment amount;

如果否,拒绝所述目标支付请求。If not, deny the target payment request.

可选地,还包括:Optionally, also include:

确定所述目标支付请求是否包括所述目标支付请求的发送端的签名信息,如果是,生成与所述目标支付金额对应的第二数字货币。Determine whether the target payment request includes the signature information of the sender of the target payment request, and if yes, generate a second digital currency corresponding to the target payment amount.

可选地,还包括:Optionally, also include:

根据所述预支付核销智能合约、所述发送端的签名信息、自身的第三签名信息以及所述第一数字货币和第二数字货币的差额,生成第二预支付交易信息。Generate second prepayment transaction information according to the prepayment write-off smart contract, the signature information of the sender, its own third signature information, and the difference between the first digital currency and the second digital currency.

可选地,所述根据所述预支付请求、所述第二账户所对应的第三数字货币以及预配置的预支付缴存智能合约,生成与所述预支付金额对应的第一数字货币,包括:Optionally, generating the first digital currency corresponding to the prepayment amount according to the prepayment request, the third digital currency corresponding to the second account, and the pre-configured prepayment deposit smart contract, include:

确定所述第二账户中的第三数字货币以及所述第三数字货币的可用面额;determining a third digital currency in the second account and an available denomination of the third digital currency;

根据所述可用面额与所述预支付金额的大小,确定所述第一数字货币的生成方式,并根据所述生成方式生成与所述预支付金额对应的第一数字货币。A generation method of the first digital currency is determined according to the available denomination and the prepayment amount, and the first digital currency corresponding to the prepayment amount is generated according to the generation method.

可选地,当所述可用面额大于所述预支付金额时,确定所述生成方式为拆分所述第三数字货币;Optionally, when the available denomination is greater than the prepaid amount, it is determined that the generation method is to split the third digital currency;

将所述第三数字货币拆分为所述第一数字货币和第四数字货币,所述第一数字货币的面额和所述第四数字货币的面额之和与所述可用面额相等,且所述第四数字货币的状态为可用状态,并注销所述第三数字货币。Splitting the third digital currency into the first digital currency and the fourth digital currency, the sum of the denominations of the first digital currency and the fourth digital currency is equal to the available denomination, and the The status of the fourth digital currency is usable, and the third digital currency is canceled.

可选地,还包括:Optionally, also include:

将所述第一数字货币冻结于所述第一账户或所述预支付请求对应的第二账户或支付平台中;freezing the first digital currency in the first account or the second account or payment platform corresponding to the prepayment request;

可选地,将所述第二数字货币设置为可用状态之后,将处于可用状态的第二数字货币发送给所述第一账户。Optionally, after the second digital currency is set to be available, the second digital currency in the available state is sent to the first account.

可选地,还包括:Optionally, also include:

当确定出所述第一数字货币的面额小于所述目标支付金额的情况下,向发起所述预支付请求的第一终端发送预支付追缴提示。When it is determined that the denomination of the first digital currency is less than the target payment amount, a prepayment recovery reminder is sent to the first terminal that initiated the prepayment request.

可选地,还包括:Optionally, also include:

当接收到所述第一终端根据所述预支付追缴提示发送的预支付追缴请求时,校验所述预支付追缴请求所指示的第一账户、第二账户是否为空,如果否,获取所述第一账户的第一签名信息以及所述第二账户的第二签名信息;When receiving the prepayment recovery request sent by the first terminal according to the prepayment recovery prompt, check whether the first account and the second account indicated by the prepayment recovery request are empty, and if not, obtain the The first signature information of the first account and the second signature information of the second account;

在获取到所述第一签名信息和所述第二签名信息的情况下,根据预配置的预支付追缴智能合约、所述预支付追缴请求所指示的金额、所述第一数字货币,生成新的处于冻结状态的第一数字货币。When the first signature information and the second signature information are acquired, according to the pre-configured prepayment recovery smart contract, the amount indicated by the prepayment recovery request, and the first digital currency, a new The first digital currency in a frozen state.

可选地,还包括:Optionally, also include:

接收终止指令;receive termination instructions;

根据所述终止指令以及预配置的预支付终止智能合约,将所述第一数字货币的状态设置为可用状态,并将所述第一数字货币发送给所述预支付请求对应的第二账户;以及According to the termination instruction and the pre-configured pre-payment termination smart contract, the state of the first digital currency is set to an available state, and the first digital currency is sent to the second account corresponding to the pre-payment request; as well as

向发起所述预支付请求的第一终端以及所述第一账户对应的第二终端发送预支付终止提示信息。Sending prepayment termination prompt information to the first terminal that initiated the prepayment request and the second terminal corresponding to the first account.

可选地,通过冻结支付接口接收所述预支付请求;还包括:Optionally, the prepayment request is received through a freezing payment interface; further comprising:

当通过所述冻结支付接口接收到第一反交易请求时,获取所述第一账户的第一签名信息和所述预支付请求对应的第二账户的第二签名信息;When a first reverse transaction request is received through the frozen payment interface, acquiring first signature information of the first account and second signature information of a second account corresponding to the prepayment request;

在获取到所述第一签名信息和所述第二签名信息的情况下,将所述第一数字货币的状态设置为可用状态,并将所述第一数字货币发送给所述第二账户。When the first signature information and the second signature information are obtained, the state of the first digital currency is set to an available state, and the first digital currency is sent to the second account.

可选地,通过解冻支付接口接收所述目标支付请求;还包括:Optionally, receiving the target payment request through an unfreezing payment interface; further comprising:

当通过所述解冻支付接口接收到第二反交易请求时,获取所述第一账户对应的第一签名信息和所述预支付请求对应的第二账户的第二签名信息;When a second reverse transaction request is received through the unfreezing payment interface, acquiring the first signature information corresponding to the first account and the second signature information of the second account corresponding to the prepayment request;

在获取到所述第一签名信息和所述第二签名信息的情况下,注销所述第二数字货币,并根据所述目标支付金额,更新所述第一数字货币。When the first signature information and the second signature information are obtained, cancel the second digital currency, and update the first digital currency according to the target payment amount.

为实现上述目的,根据本发明实施例的另一个方面,提供了另一种基于数字货币的支付方法。To achieve the above object, according to another aspect of the embodiments of the present invention, another payment method based on digital currency is provided.

本发明实施例的一种基于数字货币的支付方法应用于第一终端时,包括:When a payment method based on digital currency in an embodiment of the present invention is applied to the first terminal, it includes:

响应于第一触发,生成预支付请求,并向支付平台发送所述预支付请求;所述预支付请求指示了第二账户以及预支付金额;In response to the first trigger, generate a prepayment request, and send the prepayment request to the payment platform; the prepayment request indicates the second account and the prepayment amount;

接收与所述预支付金额对应的第一数字货币,并将处于冻结状态的第一数字货币存储于所述第二账户中;receiving the first digital currency corresponding to the prepaid amount, and storing the frozen first digital currency in the second account;

响应于第二触发,生成针对于所述第一数字货币的目标支付请求,并向所述支付平台发送所述目标支付请求。In response to the second trigger, generate a target payment request for the first digital currency, and send the target payment request to the payment platform.

可选地,还包括:Optionally, also include:

根据所述第二账户的第二签名信息,生成所述预支付请求和/或所述目标支付请求。Generate the prepayment request and/or the target payment request according to the second signature information of the second account.

可选地,响应于所述支付平台对所述预支付请求和/或所述目标支付请求的反馈,向所述支付平台发送所述第二账户的第二签名信息。Optionally, in response to the payment platform's feedback on the prepayment request and/or the target payment request, sending the second signature information of the second account to the payment platform.

可选地,还包括:Optionally, also include:

获取与第一账户对应的支付标识或支付图像,以确定所述第一账户;Obtaining a payment identification or a payment image corresponding to the first account to determine the first account;

根据所述第一账户以及所述第二触发,生成所述目标支付请求。Generate the target payment request according to the first account and the second trigger.

可选地,还包括:Optionally, also include:

接收所述支付平台发送的预支付追缴提示,并展示所述预支付追缴提示;receiving the prepayment recovery prompt sent by the payment platform, and displaying the prepayment recovery prompt;

当接收到根据所述预支付追缴提示输入的追缴信息时,根据所述追缴信息包括的第一账户和第二账户,生成预支付追缴请求,并将所述预支付追缴请求发送给所述支付平台。When receiving the recovery information input according to the prompt for recovery of prepayment, generate a request for recovery of prepayment according to the first account and second account included in the recovery information, and send the request for recovery of prepayment to the payment platform.

为实现上述目的,根据本发明实施例的又一方面,提供了一种基于数字货币的支付平台。To achieve the above object, according to yet another aspect of the embodiments of the present invention, a payment platform based on digital currency is provided.

本发明实施例的一种基于数字货币的支付平台,包括:请求接收模块、核销模块以及货币发送模块;其中,A digital currency-based payment platform according to an embodiment of the present invention includes: a request receiving module, a verification module, and a currency sending module; wherein,

所述请求接收模块,用于接收针对处于冻结状态的第一数字货币的目标支付请求,所述冻结状态的第一数字货币是基于预支付请求以及预配置的预支付缴存智能合约生成的;The request receiving module is configured to receive a target payment request for the first digital currency in the frozen state, the first digital currency in the frozen state is generated based on the prepayment request and the pre-configured prepayment deposit smart contract;

所述核销模块,用于根据所述目标支付请求所指示的目标支付金额、所述第一数字货币以及预配置的预支付核销智能合约,生成与所述目标支付金额对应的第二数字货币;The write-off module is configured to generate a second number corresponding to the target payment amount according to the target payment amount indicated by the target payment request, the first digital currency, and the pre-configured pre-payment write-off smart contract currency;

所述货币发送模块,用于将所述第二数字货币发送给所述第一数字货币对应的第一账户。The currency sending module is configured to send the second digital currency to the first account corresponding to the first digital currency.

为实现上述目的,根据本发明实施例的又一方面,提供了一种基于数字货币支付的第一终端。To achieve the above purpose, according to yet another aspect of the embodiments of the present invention, a first terminal for payment based on digital currency is provided.

本发明实施例的一种基于数字货币支付的第一终端,包括:预支付请求发送模块、冻结货币存储模块和目标支付请求发送模块;其中,A first terminal based on digital currency payment according to an embodiment of the present invention includes: a prepayment request sending module, a frozen currency storage module, and a target payment request sending module; wherein,

所述预支付请求发送模块,用于响应于第一触发,生成预支付请求,并向支付平台发送所述预支付请求;所述预支付请求指示了第二账户以及预支付金额;The prepayment request sending module is configured to generate a prepayment request in response to the first trigger, and send the prepayment request to the payment platform; the prepayment request indicates the second account and the prepayment amount;

所述冻结货币存储模块,用于接收与所述预支付金额对应的第一数字货币,并将处于冻结状态的第一数字货币存储于所述第二账户中;The frozen currency storage module is configured to receive the first digital currency corresponding to the prepaid amount, and store the frozen first digital currency in the second account;

所述目标请求发送模块,用于响应于第二触发,生成针对于所述第一数字货币的目标支付请求,并向所述支付平台发送所述目标支付请求。The target request sending module is configured to generate a target payment request for the first digital currency in response to a second trigger, and send the target payment request to the payment platform.

为实现上述目的,根据本发明实施例的又一方面,提供了一种基于数字货币的支付系统。To achieve the above purpose, according to yet another aspect of the embodiments of the present invention, a payment system based on digital currency is provided.

本发明实施例的一种基于数字货币的支付系统,包括:上述任一所述的支付平台以及上述任一所述的第一终端。A digital currency-based payment system according to an embodiment of the present invention includes: any of the above-mentioned payment platforms and any of the above-mentioned first terminals.

可选地,该支付系统还包括:第二终端;其中,Optionally, the payment system also includes: a second terminal; wherein,

所述第二终端,用于接收第二数字货币,并将所述第二数字货币存储于第一账户中。The second terminal is configured to receive a second digital currency and store the second digital currency in the first account.

可选地,所述第二终端,用于响应于第三触发,生成针对于所述第一数字货币的目标支付请求,并向所述支付平台发送所述目标支付请求。Optionally, the second terminal is configured to generate a target payment request for the first digital currency in response to a third trigger, and send the target payment request to the payment platform.

可选地,所述第二终端,用于接收所述支付平台发送的关于预支付追缴请求的支付信息,所述支付信息指示了第一账户、第二账户以及所述预支付追缴请求所指示的金额;Optionally, the second terminal is configured to receive payment information about the prepayment recovery request sent by the payment platform, the payment information indicating the first account, the second account and the prepayment recovery request indicated the amount;

根据所述支付信息,对所述预支付追缴请求进行校验,当校验通过时,向所述支付平台发送与第一账户对应的第一签名信息。According to the payment information, the prepayment recovery request is verified, and when the verification is passed, the first signature information corresponding to the first account is sent to the payment platform.

为实现上述目的,根据本发明实施例的又一方面,提供了一种基于数字货币支付的电子设备。To achieve the above purpose, according to yet another aspect of the embodiments of the present invention, an electronic device based on digital currency payment is provided.

本发明实施例的一种基于数字货币支付的电子设备包括:一个或多个处理器;存储装置,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现本发明实施例的一种基于数字货币的支付方法。An electronic device based on digital currency payment in an embodiment of the present invention includes: one or more processors; a storage device for storing one or more programs, when the one or more programs are used by the one or more The processor executes, so that the one or more processors implement a payment method based on digital currency in the embodiment of the present invention.

为实现上述目的,根据本发明实施例的再一方面,提供了一种计算机可读存储介质。To achieve the above purpose, according to still another aspect of the embodiments of the present invention, a computer-readable storage medium is provided.

本发明实施例的一种计算机可读存储介质,其上存储有计算机程序,所述程序被处理器执行时实现本发明实施例的一种基于数字货币的支付方法。A computer-readable storage medium according to an embodiment of the present invention stores a computer program thereon, and when the program is executed by a processor, a digital currency-based payment method according to an embodiment of the present invention is implemented.

上述发明中的一个实施例具有如下优点或有益效果:能够基于预配置的预支付缴存智能合约,使得与预支付金额对应的第一数字货币处于冻结状态,此时发起预支付请求的第一用户以及服务提供方对应的第二用户无法使用该第二数字货币。当接收到针对处于冻结状态的第一数字货币对应的目标支付请求时,根据预支付核销智能合约,对处于冻结状态的第一数字货币进行核销,生成与目标支付金额对应的第二数字货币,并将第二数字货币发送给服务提供方对应的第一账户,使得服务提供方可使用第二数字货币。由此,通过预支付智能合约,避免了服务提供方提前使用预支付的数字货币,提高了预支付场景的交易安全性。进一步地,还能撤销或取消未使用的预支付数字货币,使得未使用的预支付数字货币返回至第一用户对应的第二账户中,解决了现有的预支付场景下,用户无法针对预支付的货币进行退款的问题,从而进一步提高了预支付场景的交易安全性,保障了用户权益。An embodiment of the above invention has the following advantages or beneficial effects: based on the pre-configured pre-payment deposit smart contract, the first digital currency corresponding to the pre-payment amount is in a frozen state. At this time, the first digital currency that initiates the pre-payment request The second user corresponding to the user and the service provider cannot use the second digital currency. When the target payment request corresponding to the first digital currency in the frozen state is received, the first digital currency in the frozen state is written off according to the prepayment write-off smart contract, and the second number corresponding to the target payment amount is generated Currency, and send the second digital currency to the first account corresponding to the service provider, so that the service provider can use the second digital currency. Therefore, through the prepayment smart contract, the service provider is prevented from using the prepaid digital currency in advance, and the transaction security of the prepayment scenario is improved. Furthermore, it is also possible to revoke or cancel the unused prepaid digital currency, so that the unused prepaid digital currency is returned to the second account corresponding to the first user, which solves the problem that in the existing prepayment scenario, the user cannot target the prepaid digital currency. The problem of refunding the paid currency further improves the transaction security of the pre-payment scenario and protects the rights and interests of users.

上述的非惯用的可选方式所具有的进一步效果将在下文中结合具体实施方式加以说明。The further effects of the above-mentioned non-conventional alternatives will be described below in conjunction with specific embodiments.

附图说明Description of drawings

附图用于更好地理解本发明,不构成对本发明的不当限定。其中:The accompanying drawings are used to better understand the present invention, and do not constitute improper limitations to the present invention. in:

图1是根据本发明实施例的一种基于数字货币的支付方法的主要步骤的示意图;Fig. 1 is a schematic diagram of the main steps of a digital currency-based payment method according to an embodiment of the present invention;

图2是根据本发明实施例的另一种基于数字货币的支付方法的主要步骤的示意图;Fig. 2 is a schematic diagram of the main steps of another digital currency-based payment method according to an embodiment of the present invention;

图3是根据本发明实施例的一种基于数字货币的支付平台的主要模块的示意图;Fig. 3 is a schematic diagram of the main modules of a digital currency-based payment platform according to an embodiment of the present invention;

图4是根据本发明实施例的一种基于数字货币支付的第一终端的主要模块的示意图;Fig. 4 is a schematic diagram of main modules of a first terminal based on digital currency payment according to an embodiment of the present invention;

图5是根据本发明实施例的一种基于数字货币的支付系统的主要模块的示意图;5 is a schematic diagram of the main modules of a digital currency-based payment system according to an embodiment of the present invention;

图6是根据本发明实施例的又一种基于数字货币的支付方法的主要步骤的示意图;6 is a schematic diagram of the main steps of another digital currency-based payment method according to an embodiment of the present invention;

图7是根据本发明实施例的一种数字货币生成过程示意图;Fig. 7 is a schematic diagram of a digital currency generation process according to an embodiment of the present invention;

图8是根据本发明实施例的再一种基于数字货币的支付方法的主要步骤的示意图;Fig. 8 is a schematic diagram of the main steps of another digital currency-based payment method according to an embodiment of the present invention;

图9是本发明实施例可以应用于其中的示例性系统架构图;FIG. 9 is an exemplary system architecture diagram to which the embodiment of the present invention can be applied;

图10是适于用来实现本发明实施例的终端设备或服务器的计算机系统的结构示意图。Fig. 10 is a schematic structural diagram of a computer system suitable for implementing a terminal device or a server according to an embodiment of the present invention.

具体实施方式detailed description

以下结合附图对本发明的示范性实施例做出说明,其中包括本发明实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本发明的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。Exemplary embodiments of the present invention are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present invention to facilitate understanding, and they should be regarded as exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.

需要指出的是,在不冲突的情况下,本发明的实施例以及实施例中的技术特征可以相互结合。It should be noted that, in the case of no conflict, the embodiments of the present invention and the technical features in the embodiments can be combined with each other.

图1是根据本发明实施例的一种基于数字货币的支付方法应用于支付平台时的主要步骤的示意图。Fig. 1 is a schematic diagram of main steps when a digital currency-based payment method is applied to a payment platform according to an embodiment of the present invention.

如图1所示,本发明实施例的一种基于数字货币的支付方法应用于支付平台时,主要包括以下步骤:As shown in Figure 1, when a payment method based on digital currency in an embodiment of the present invention is applied to a payment platform, it mainly includes the following steps:

步骤S101:接收针对处于冻结状态的第一数字货币的目标支付请求,所述冻结状态的第一数字货币是基于预支付请求以及预配置的预支付缴存智能合约生成的。Step S101: Receive a target payment request for the first digital currency in the frozen state, the first digital currency in the frozen state is generated based on the prepayment request and the pre-configured prepayment deposit smart contract.

在本发明一个实施例中,可以通过如下方式根据预支付请求以及预配置的预支付缴存智能合约生成第一数字货币:接收第一终端的预支付请求,所述预支付请求指示了第二账户以及预支付金额;根据所述预支付请求、所述第二账户所对应的第三数字货币以及预配置的预支付缴存智能合约,生成与所述预支付金额对应的第一数字货币,所述第一数字货币的状态为冻结状态。In one embodiment of the present invention, the first digital currency can be generated according to the prepayment request and the pre-configured prepayment deposit smart contract in the following manner: receiving the prepayment request from the first terminal, the prepayment request indicating the second account and prepayment amount; according to the prepayment request, the third digital currency corresponding to the second account, and the pre-configured prepayment deposit smart contract, generate the first digital currency corresponding to the prepayment amount, The state of the first digital currency is a frozen state.

当第一用户需要进行预支付缴存时,可对第一终端上的预支付缴存界面进行触发,然后,第一终端响应于第一用户的第一触发,生成预支付请求,该预支付请求指示了第二账户以及预支付金额。其中,第二账户即第一用户的账户,预支付金额即对应本次预支付时待缴存的金额。When the first user needs to make a prepayment deposit, the prepayment deposit interface on the first terminal can be triggered, and then, the first terminal generates a prepayment request in response to the first trigger of the first user, and the prepayment The request indicates the second account and the prepaid amount. Wherein, the second account is the account of the first user, and the prepayment amount corresponds to the amount to be deposited during this prepayment.

值得一提的是,在本发明实施例中,“第一”、“第二”等术语并不构成对本方案的限定,也并非有绝对的对应关系,如“第一用户”并不对应于“第一账户”,这些术语仅是为了便于区分不同主体,以更清楚阐述本发明实施例。在本发明实施例中,消费者对应于第一用户,其对应的终端为第一终端,其对应的账户为第二账户,其对应的签名信息为第二签名信息。服务提供方对应于第二用户,其对应的终端为第二终端,其对应的账户为第一账户,其对应的签名信息为第一签名信息。另外,在本发明实施例中,数字货币既包括通常指代的央行发行的法定数字货币,也可以适用于其他电子形式、数字形式的货币或资产,如各类电子货币、加密货币、加密资产等。It is worth mentioning that, in the embodiment of the present invention, terms such as "first" and "second" do not constitute limitations on this solution, nor do they have an absolute correspondence. For example, "first user" does not correspond to "First account", these terms are only for the convenience of distinguishing between different subjects, so as to more clearly explain the embodiment of the present invention. In the embodiment of the present invention, the consumer corresponds to the first user, its corresponding terminal is the first terminal, its corresponding account is the second account, and its corresponding signature information is the second signature information. The service provider corresponds to the second user, its corresponding terminal is the second terminal, its corresponding account is the first account, and its corresponding signature information is the first signature information. In addition, in the embodiment of the present invention, digital currency includes not only legal digital currency issued by the central bank, but also applicable to other electronic and digital currencies or assets, such as various electronic currencies, encrypted currencies, encrypted assets Wait.

在生成第一数字货币时,需要得到资金来源方的签名。在本发明一个实施例中,在接收到与所述第二账户对应的第二签名信息的情况下,根据预支付缴存智能合约和第二账户中的第三数字货币,生成与所述预支付金额对应的第一数字货币,并确定所述第一数字货币所对应的第一账户。When generating the first digital currency, the signature of the source of funds is required. In one embodiment of the present invention, when the second signature information corresponding to the second account is received, according to the prepayment deposit smart contract and the third digital currency in the second account, a digital currency corresponding to the prepayment deposit is generated. The first digital currency corresponding to the payment amount is paid, and the first account corresponding to the first digital currency is determined.

其中,可以通过将所述预支付缴存智能合约和/或所述第一账户作为所述第一数字货币的字段写入所述第一数字货币,来生成第一数字货币,从而确定第一数字货币对应的第一账户,并且,由于预支付缴存智能合约的强制性,使得第一数字货币和第一账户的对应关系不可更改。Wherein, the first digital currency may be generated by writing the prepayment deposit smart contract and/or the first account into the first digital currency field as the first digital currency, thereby determining the first The first account corresponding to the digital currency, and due to the mandatory nature of the prepayment deposit smart contract, the corresponding relationship between the first digital currency and the first account cannot be changed.

在这里,资金来源方即为发起预支付请求的第一终端所对应的第二账户,在接收到第二账户对应的第二签名信息后,说明资金来源方承认预支付请求指示的预支付金额可以被冻结,以作为特定账户(第一账户)对应的预支付数字货币,在此情况下,才根据预支付缴存智能合约和所述第三数字货币,生成与预支付金额对应的第一数字货币,以保证预支付过程的交易安全性。Here, the source of funds is the second account corresponding to the first terminal that initiates the prepayment request. After receiving the second signature information corresponding to the second account, it means that the source of funds acknowledges the prepayment amount indicated by the prepayment request It can be frozen as the prepaid digital currency corresponding to a specific account (first account). In this case, the first digital currency corresponding to the prepaid amount is generated according to the prepaid deposit smart contract and the third digital currency. Digital currency to ensure the transaction security of the prepayment process.

第二签名信息由第一终端发送给支付平台,其可以由预支付请求携带着发送给支付平台,也可以是支付平台在收到预支付请求之后,准备生成第一数字货币时,向第一终端发送相应的反馈信息,而第一终端根据该反馈信息向支付平台发送第二签名信息。第二签名信息可以是第一用户的认证信息,也可以是第一用户的支付密码等。The second signature information is sent to the payment platform by the first terminal, which can be carried by the prepayment request and sent to the payment platform, or it can be sent to the first digital currency by the payment platform after receiving the prepayment request and preparing to generate the first digital currency. The terminal sends corresponding feedback information, and the first terminal sends the second signature information to the payment platform according to the feedback information. The second signature information may be the authentication information of the first user, or the payment password of the first user, or the like.

在此过程中,作为预付款的第一数字货币本身的价值是未被转移到服务提供方的,其只是被预支付缴存智能合约进行了价值锁定,也即,第一数字货币的状态为冻结状态。并且,根据预支付缴存智能合约生成第一数字货币,由于预支付缴存智能合约的强制性,使得第一数字货币只能用于特定的服务提供方进行支付,也即,确定了第一数字货币所对应的第一账户(服务提供方的账户),只有第一数字货币用于支付给第一账户时,第一数字货币才能被第一用户正常支付。During this process, the value of the first digital currency itself as an advance payment is not transferred to the service provider, it is only locked in value by the prepayment deposit smart contract, that is, the state of the first digital currency is frozen state. Moreover, the first digital currency is generated according to the prepayment and deposit smart contract. Due to the mandatory nature of the prepayment and deposit smart contract, the first digital currency can only be used for payment by a specific service provider, that is, the first The first account corresponding to the digital currency (the account of the service provider), only when the first digital currency is used to pay the first account, the first digital currency can be normally paid by the first user.

基于此,在本发明一个实施例中,确定所述目标支付请求本次指示的账户是否与所述第一账户相同;如果是,根据所述目标支付请求所指示的目标支付金额、所述第一数字货币以及预配置的预支付核销智能合约,生成与所述目标支付金额对应的第二数字货币;如果否,拒绝所述目标支付请求。Based on this, in one embodiment of the present invention, it is determined whether the account indicated by the target payment request this time is the same as the first account; if yes, according to the target payment amount indicated by the target payment request, the second account A digital currency and a pre-configured prepayment write-off smart contract, generating a second digital currency corresponding to the target payment amount; if not, rejecting the target payment request.

在此实施例中,只有当目标支付请求本次指示的账户与预支付缴存智能合约所确定的第一数字货币对应的第一账户相同时,支付平台才响应目标支付请求,并根据预支付核销智能合约生成与目标支付金额相对应的第二数字货币。在目标支付请求本次指示的账户与第一账户不同时,说明目标支付请求并非请求将预支付的第一数字货币用于预支付缴存智能合约所约定的服务提供方,此时支付平台拒绝目标支付请求,以保障交易安全性以及服务提供方的权益。In this embodiment, only when the account indicated by the target payment request this time is the same as the first account corresponding to the first digital currency determined by the prepayment deposit smart contract, the payment platform responds to the target payment request, and according to the prepayment deposit The write-off smart contract generates a second digital currency corresponding to the target payment amount. When the account indicated by the target payment request this time is different from the first account, it means that the target payment request is not a request to use the prepaid first digital currency for the service provider stipulated in the prepayment deposit smart contract. At this time, the payment platform refuses Target payment requests to ensure transaction security and the rights and interests of service providers.

另外,在本发明一个实施例中,在生成第一数字货币之后,支付平台还可以利用自身的第三签名信息,对所述第一数字货币进行签名,并根据签名后的所述第一数字货币、第二账户的第二签名信息以及所述预支付缴存智能合约,生成并存储第一预支付交易信息。In addition, in an embodiment of the present invention, after the first digital currency is generated, the payment platform can also use its own third signature information to sign the first digital currency, and according to the signed first digital currency The currency, the second signature information of the second account, and the prepayment deposit smart contract generate and store the first prepayment transaction information.

根据前述实施例,支付平台在获取到第二账户对应的第二签名信息后,才生成第一数字货币。在这里,在生成数字货币之后,支付平台利用自身的第三签名信息对第一数字货币进行签名,以根据第一签名信息、第二签名信息以及预支付缴存智能合约,生成第一预支付交易信息,在第一预支付交易信息中,可以记录预支付的余额为本次预支付过程中所缴存的金额(第一数字货币的面额),以及预付款变更次数为0。According to the foregoing embodiments, the payment platform generates the first digital currency only after obtaining the second signature information corresponding to the second account. Here, after the digital currency is generated, the payment platform uses its own third signature information to sign the first digital currency, so as to generate the first prepayment deposit smart contract according to the first signature information, the second signature information and the prepayment deposit smart contract. Transaction information, in the first prepayment transaction information, it can be recorded that the prepayment balance is the amount deposited during this prepayment process (the denomination of the first digital currency), and the number of prepayment changes is 0.

在本发明一个实施例中,预支付的金额(第一数字货币)可以用于支付给某个特定的服务提供方;也可以用于支付给一个商户集合中的特定商户,例如用于支付给某个电商平台中的某个特定商户,或者用于支付给某个大型商超中的某个特定商户;其也可以用于支付给某个场景下中的特定商户,如用于支付给交通出行场景下某个特定商户,或者用于支付给娱乐场景下某个特定商户。In one embodiment of the present invention, the prepaid amount (the first digital currency) can be used to pay to a specific service provider; it can also be used to pay to a specific merchant in a merchant collection, for example, to pay to A specific merchant in an e-commerce platform, or used to pay to a specific merchant in a large supermarket; it can also be used to pay to a specific merchant in a certain scenario, such as for payment to A specific merchant in the transportation scenario, or used to pay to a specific merchant in the entertainment scenario.

当预支付金额用于支付给某个场景中的特定商户时,预支付请求还指示了场景标识和/或业务标识;在此情况下,支付平台可以根据所述第一数字货币和所述第二签名信息、所述预支付缴存智能合约以及所述场景标识和/或业务标识,生成所述第一预支付交易信息。When the prepayment amount is used to pay to a specific merchant in a certain scenario, the prepayment request also indicates the scenario identifier and/or business identifier; in this case, the payment platform may Two signature information, the prepayment deposit smart contract and the scene identifier and/or business identifier are used to generate the first prepayment transaction information.

其中,场景标识与特定场景相对应,不同的场景具有不同的场景标识,例如,交通出行场景和娱乐场景具有不同的场景标识。当预支付金额用于支付给某个场景中的特定商户时,在发送预支付请求时即携带相应的场景标识,以便后续在使用预支付金额(被冻结的第一数字货币)时,可便于根据场景标识确定目标支付请求是否正确针对相应的预支付金额,从而提高交易安全性。另外,业务标识可以为本次预支付过程(即本次预支付业务)对应的流水号,其可以在第一终端发送预支付请求时即携带着发送给支付平台,也可以由支付平台在接收到预支付请求之后再生成,也即,业务标识可以由第一终端生成,也可以由支付平台生成。Wherein, the scene identifier corresponds to a specific scene, and different scenes have different scene identifiers, for example, a traffic travel scene and an entertainment scene have different scene identifiers. When the prepayment amount is used to pay to a specific merchant in a certain scene, the corresponding scene identification is carried when sending the prepayment request, so that when the prepayment amount (the frozen first digital currency) is used later, it can be convenient Determine whether the target payment request is correct for the corresponding prepayment amount according to the scene identification, thereby improving transaction security. In addition, the service identifier can be the serial number corresponding to the prepayment process (that is, the prepayment service), which can be carried and sent to the payment platform when the first terminal sends the prepayment request, or can be received by the payment platform. It is generated after the prepayment request, that is, the service identifier can be generated by the first terminal or by the payment platform.

在支付平台在生成第一预支付交易信息时,不仅根据第一数字货币和所述第一签名信息、所述预支付缴存智能合约,也根据场景标识和业务标识来生成,因此,第一预支付交易信息不仅记录有预支付的余额为本次预支付过程中所缴存的金额(第一数字货币的面额),以及预付款变更次数为0,还可以记录有相应的场景标识和业务标识。When the payment platform generates the first prepayment transaction information, it is not only generated based on the first digital currency, the first signature information, and the prepayment deposit smart contract, but also based on the scene identifier and business identifier. Therefore, the first The prepayment transaction information not only records that the prepayment balance is the amount deposited in this prepayment process (the denomination of the first digital currency), and the number of prepayment changes is 0, but also records the corresponding scene identification and business logo.

可以理解的是,在支付平台生成相应的第一预支付交易之后,可以向第一用户的第一终端以及服务提供方(第二用户)的第二终端发送相应的反馈信息,使得第一终端或第二终端在发送目标支付请求时,携带正确的信息。例如,在预支付请求指示了场景标识和/或业务标识时,使得第一终端或第二终端发送的目标支付请求也指示场景标识和/或业务标识。It can be understood that after the payment platform generates the corresponding first prepayment transaction, it can send corresponding feedback information to the first terminal of the first user and the second terminal of the service provider (second user), so that the first terminal Or the second terminal carries correct information when sending the target payment request. For example, when the prepayment request indicates the scenario identifier and/or the service identifier, the target payment request sent by the first terminal or the second terminal also indicates the scenario identifier and/or the service identifier.

另外,在本发明一个实施例中,可以根据下述方式来生成第一数字货币:确定所述第二账户中的第三数字货币以及所述第三数字货币的可用面额;根据所述可用面额与所述预支付金额的大小,确定所述第一数字货币的生成方式,并根据所述生成方式生成与所述预支付金额对应的第一数字货币。In addition, in an embodiment of the present invention, the first digital currency can be generated in the following manner: determine the third digital currency in the second account and the available denomination of the third digital currency; A generation method of the first digital currency is determined based on the size of the prepayment amount, and the first digital currency corresponding to the prepayment amount is generated according to the generation method.

在本发明一个实施方式中,当所述可用面额大于所述预支付金额时,确定所述生成方式为拆分所述第三数字货币;那么,在生成第一数字货币时,即可将所述第三数字货币拆分为所述第一数字货币和第四数字货币,所述第一数字货币的面额和所述第四数字货币的面额之和与所述可用面额相等,且所述第四数字货币的状态为可用状态,并注销所述第三数字货币。In one embodiment of the present invention, when the available denomination is greater than the prepayment amount, it is determined that the generation method is to split the third digital currency; then, when the first digital currency is generated, the The third digital currency is split into the first digital currency and the fourth digital currency, the sum of the denomination of the first digital currency and the denomination of the fourth digital currency is equal to the available denomination, and the second The status of the four digital currencies is available, and the third digital currency is canceled.

例如,当第二账户中的第三数字货币的可用面额为100,而预支付金额为10,则生成所请求的第一数字货币的生成方式为拆分可用数字货币。在这里,即将可用面额为100的第三数字货币拆分成面额为10的第一数字货币以及面额为90的第四数字货币,该第一数字货币的面额与所请求的预支付金额相等,且第一数字货币处于冻结状态,第四数字货币处于可用状态,同时注销第二账户中原有的第三数字货币,即实现了将原有的第三数字货币拆分为处于冻结状态的第一数字货币以及处于可用状态的第四数字货币。For example, when the available denomination of the third digital currency in the second account is 100, and the prepaid amount is 10, the method of generating the requested first digital currency is to split the available digital currency. Here, the third digital currency with a denomination of 100 is split into the first digital currency with a denomination of 10 and the fourth digital currency with a denomination of 90. The denomination of the first digital currency is equal to the requested prepayment amount, And the first digital currency is in a frozen state, the fourth digital currency is in a usable state, and the original third digital currency in the second account is canceled at the same time, that is, the original third digital currency is split into the frozen first digital currency. A digital currency and a fourth digital currency in an available state.

在本发明另一个实施方式中,当第二账户中的第三数字货币的可用面额与所述预支付金额相等时,第一数字货币的生成方式为将可用面额等于预支付金额的第三数字货币标识为第一数字货币,也就是说,将第三数字货币中可用面额与预支付相等的第三数字货币标识为第一数字货币。In another embodiment of the present invention, when the available denomination of the third digital currency in the second account is equal to the prepaid amount, the first digital currency is generated in such a way that the available denomination is equal to the third digit of the prepaid amount The currency is identified as the first digital currency, that is, the third digital currency whose available denomination is equal to the prepayment in the third digital currency is identified as the first digital currency.

当支付平台确定出第二账户中存储多个处于可用状态的第三数字货币,且多个第三数字货币的可用面额与预支付金额相等时,可从与预支付金额相等的多个第三数字货币中任选一个第三数字货币标识为第一数字货币。When the payment platform determines that a plurality of third digital currencies in a usable state are stored in the second account, and the available denominations of the plurality of third digital currencies are equal to the amount of prepayment, the payment platform can use the plurality of third digital currencies equal to the amount of prepayment. A third digital currency is selected as the first digital currency among the digital currencies.

其中,对数字货币的标识主要为对数字货币的状态进行标识,例如,当支付平台确定出其可用面额与预支付金额相等的第三数字货币后,可将该第三数字货币的状态标识为“冻结”状态或者“预支付”状态。已标识的数字货币不可再用于其他通用场景的市场流通,而仅可用于特定的预支付场景。Among them, the identification of the digital currency is mainly to identify the status of the digital currency. For example, when the payment platform determines the third digital currency whose usable denomination is equal to the prepaid amount, the status of the third digital currency can be identified as "Frozen" status or "Prepaid" status. The identified digital currency can no longer be used for market circulation in other general scenarios, but can only be used in specific prepayment scenarios.

另外,当第二账户中存在多个可用面额小于预支付金额的第三数字货币时,可通过将可用面额小于预支付金额的多个第三数字货币进行组合的方式生成第一数字货币。In addition, when there are multiple third digital currencies with available denominations smaller than the prepaid amount in the second account, the first digital currency can be generated by combining multiple third digital currencies with available denominations smaller than the prepaid amount.

例如,当支付平台确定出第二账户中的第三数字货币为可用数字货币A和可用数字货币B,其中,可用数字货币A的可用面额为2,可用数字货币B的可用面额为8,预支付金额为10,则可将可用数字货币A和可用货币数字B进行组合,以生成第一数字货币。For example, when the payment platform determines that the third digital currency in the second account is the available digital currency A and the available digital currency B, wherein the available denomination of the available digital currency A is 2, and the available denomination of the available digital currency B is 8. If the payment amount is 10, the available digital currency A and the available digital currency B can be combined to generate the first digital currency.

当然,可用面额小于预支付金额的多个第三数字货币组合后的面额可能大于预支付金额,也就是说,多个可用面额之和可能大于预支付金额。例如,当支付平台确定出与第二账户中的多个第三数字货币为可用数字货币C和可用数字货币D,其中,可用数字货币C的可用面额为4,可用数字货币D的可用面额为8,预支付金额10,此时可用数字货币C和可用数字货币D组合后的面额为12,即组合后的面额大于预支付金额10。Of course, the combined denomination of multiple third digital currencies whose available denominations are smaller than the prepaid amount may be greater than the prepaid amount, that is, the sum of multiple available denominations may be greater than the prepaid amount. For example, when the payment platform determines that multiple third digital currencies in the second account are the available digital currency C and the available digital currency D, wherein the available denomination of the available digital currency C is 4, and the available denomination of the available digital currency D is 8. The prepayment amount is 10. At this time, the denomination after combining the available digital currency C and the available digital currency D is 12, that is, the denomination after the combination is greater than the prepayment amount of 10.

在此情况下,可先将可用数字货币C和可用数字货币D组成生成面额为12的数字货币后,再将面额为12的数字货币拆分成面额为10的数字货币和面额为2的数字货币,该拆分过程与将可用面额大于预支付金额的可用数字货币进行拆分的过程相同,在此不再赘述。然后将面额为10的数字货币标识为第一数字货币。另外,也可直接根据可用数字货币C和可用数字货币D生成面额为10的数字货币和面额为2的数字货币。或者,先对第三数字货币中的一个或多个进行拆分,然后将拆分后的第三数字货币与其他第三数字货币进行组合,以生成与预支付金额对应的第一数字货币,例如,先将可用数字货币D拆分为面额为6的数字货币和面额为2的数字货币,然后将面额为6的数字货币与第二账户中面额为4的可用数字货币D进行组合,生成与预支付金额10相应的第一数字货币。In this case, the available digital currency C and the available digital currency D can be combined to generate a digital currency with a denomination of 12, and then the digital currency with a denomination of 12 can be split into a digital currency with a denomination of 10 and a digital currency with a denomination of 2 Currency, the splitting process is the same as the splitting process of the available digital currency whose denomination is greater than the prepaid amount, and will not be repeated here. Then identify the digital currency with a denomination of 10 as the first digital currency. In addition, the digital currency with a denomination of 10 and the digital currency with a denomination of 2 can also be generated directly according to the available digital currency C and the available digital currency D. Alternatively, first split one or more of the third digital currencies, and then combine the split third digital currencies with other third digital currencies to generate the first digital currency corresponding to the prepaid amount, For example, the available digital currency D is first split into a digital currency with a denomination of 6 and a digital currency with a denomination of 2, and then the digital currency with a denomination of 6 is combined with the available digital currency D with a denomination of 4 in the second account to generate The first digital currency corresponding to the prepaid amount 10.

值得一提的是,第二账户中的第三数字货币可能同时包括处于可用状态的第三数字货币以及处于冻结状态的冻结数字货币,此时的冻结数字货币是预先生成的、与在先预支付请求所对应的预支付款项,由于冻结数字货币仅可用于与其预支付请求相对应的特定预支付场景,因此此处在生成第一数字货币时,仅根据处于可用状态的第三数字货币来生成,即根据第二账户中处于可用状态的第三数字货币来生成第一数字货币。It is worth mentioning that the third digital currency in the second account may include the third digital currency in the usable state and the frozen digital currency in the frozen state. For the prepayment corresponding to the payment request, since the frozen digital currency can only be used in the specific prepayment scenario corresponding to its prepayment request, when the first digital currency is generated here, it is only based on the third digital currency that is in an available state. Generate, that is, generate the first digital currency according to the third digital currency that is available in the second account.

生成第一数字货币之后,处于冻结状态的第一数字货币可以仍冻结于第二账户中,也就是说,根据预支付缴存智能合约生成的第一数字货币仍存储于消费者的第二账户中,其价值是未被转移到服务提供方的,而只是被预支付缴存智能合约锁定了价值,使得该第一数字货币只能到预支付对应的服务提供方进行消费,即仅可用于转移至特定的第一账户。After the first digital currency is generated, the frozen first digital currency can still be frozen in the second account, that is, the first digital currency generated according to the prepayment deposit smart contract is still stored in the consumer's second account Among them, its value is not transferred to the service provider, but is only locked by the prepayment deposit smart contract, so that the first digital currency can only be consumed at the service provider corresponding to the prepayment, that is, it can only be used for Transfer to a specific primary account.

当然,处于冻结状态的第一数字货币也可以冻结于第一账户(服务方对应的账户)或者其他第三方(如支付平台或其他可信第三方)。可以理解的是,即使将第一数字货币冻结于第一账户中,也即,将第一数字货币存储在服务提供方的账户,由于第一数字货币处于冻结状态,服务提供方也无法随意使用第一数字货币,因此仍可保证交易安全性,保障消费者权益。Of course, the frozen first digital currency can also be frozen in the first account (the account corresponding to the service provider) or other third parties (such as payment platforms or other trusted third parties). It can be understood that even if the first digital currency is frozen in the first account, that is, the first digital currency is stored in the account of the service provider, since the first digital currency is in a frozen state, the service provider cannot freely use it The first digital currency, so it can still guarantee the security of transactions and protect the rights and interests of consumers.

步骤S102:根据所述目标支付请求所指示的目标支付金额、所述第一数字货币以及预配置的预支付核销智能合约,生成与所述目标支付金额对应的第二数字货币。Step S102: Generate a second digital currency corresponding to the target payment amount according to the target payment amount indicated by the target payment request, the first digital currency, and the pre-configured prepayment write-off smart contract.

根据前述实施例,在预支付请求指示了场景标识和/或业务标识时,第一终端或第二终端发送的目标支付请求也会指示场景标识和/或业务标识。在此情况下,由于预支付金额是用于针对特定场景下商户的支付,因此会对场景标识进行校验;或者,若预支付金额未指定特定的场景,那么就仅对相应的业务标识进行校验。在此实施方式中,可以确定所述目标支付请求指示的场景标识和/或业务标识是否分别与所述第一预支付交易信息指示的场景标识和/或业务标识相同;According to the foregoing embodiments, when the prepayment request indicates the scene ID and/or the service ID, the target payment request sent by the first terminal or the second terminal will also indicate the scenario ID and/or the service ID. In this case, since the prepayment amount is used to pay for merchants in a specific scenario, the scenario identifier will be verified; or, if the prepayment amount does not specify a specific scenario, then only the corresponding business identifier will be verified. check. In this embodiment, it may be determined whether the scenario identifier and/or service identifier indicated by the target payment request are the same as the scenario identifier and/or service identifier indicated by the first prepayment transaction information;

如果是,根据所述目标支付请求所指示的目标支付金额、所述第一数字货币以及预配置的预支付核销智能合约,生成与所述目标支付金额对应的第二数字货币;If so, generate a second digital currency corresponding to the target payment amount according to the target payment amount indicated by the target payment request, the first digital currency, and the pre-configured prepayment write-off smart contract;

如果否,拒绝所述目标支付请求。If not, deny the target payment request.

在这里,当第一预支付交易信息中包括场景标识和业务标识时,若目标支付请求中携带的场景标识和业务标识与第一预支付交易信息中的场景标识和业务标识相同,那么即可根据目标支付请求生成第二数字货币,否则支付平台直接拒绝所述目标支付请求,即无需根据目标支付请求生成第二数字货币。或者,当第一预支付交易信息中包括业务标识时,若目标支付请求中携带的业务标识与第一预支付交易信息中的业务标识相同,那么也可根据目标支付请求生成第二数字货币,否则支付平台直接拒绝所述目标支付请求,即无需根据目标支付请求生成第二数字货币。或者,当第一预支付交易信息中包括场景标识时,若目标支付请求中携带的场景标识与第一预支付交易信息中的场景标识相同,那么也可根据目标支付请求生成第二数字货币,否则支付平台直接拒绝所述目标支付请求,即无需根据目标支付请求生成第二数字货币。Here, when the first prepayment transaction information includes the scenario identifier and the service identifier, if the scenario identifier and the service identifier carried in the target payment request are the same as the scenario identifier and the service identifier in the first prepayment transaction information, then The second digital currency is generated according to the target payment request, otherwise the payment platform directly rejects the target payment request, that is, there is no need to generate the second digital currency according to the target payment request. Or, when the first prepayment transaction information includes the service identifier, if the service identifier carried in the target payment request is the same as the service identifier in the first prepayment transaction information, then the second digital currency can also be generated according to the target payment request, Otherwise, the payment platform directly rejects the target payment request, that is, there is no need to generate the second digital currency according to the target payment request. Or, when the first pre-payment transaction information includes the scenario identifier, if the scenario identifier carried in the target payment request is the same as the scenario identifier in the first pre-payment transaction information, then the second digital currency can also be generated according to the target payment request, Otherwise, the payment platform directly rejects the target payment request, that is, there is no need to generate the second digital currency according to the target payment request.

在本发明一个实施例中,在生成第二数字货币时,支付平台也会确定所述目标支付请求是否包括所述目标支付请求的发送端的签名信息,如果是,生成与所述目标支付金额对应的第二数字货币。In one embodiment of the present invention, when generating the second digital currency, the payment platform will also determine whether the target payment request includes the signature information of the sender of the target payment request, and if so, generate a digital currency corresponding to the target payment amount the second digital currency.

其中,目标支付请求可以由第一终端发起,也可以由第二终端发起,也即,目标支付请求可以由消费者发起,也可以由服务提供方发起,那么,目标支付请求的发送端可以为第一终端,也可以为第二终端。Wherein, the target payment request can be initiated by the first terminal or by the second terminal, that is, the target payment request can be initiated by the consumer or the service provider, then the sender of the target payment request can be The first terminal may also be the second terminal.

当目标支付请求的发送端为第一终端时,发送端的签名信息即为第二账户信息的第二签名信息,在生成第二数字货币时,势必需获取第二签名信息,以表征第一用户对本次使用预支付金额的认证。当然,若发送端为第一终端时,支付平台还可以从第二终端获取第一签名信息,以得到服务提供方对可提供服务的认证。When the sender of the target payment request is the first terminal, the signature information of the sender is the second signature information of the second account information. When generating the second digital currency, it is necessary to obtain the second signature information to represent the first user Authentication of the prepaid amount used this time. Of course, if the sending end is the first terminal, the payment platform can also obtain the first signature information from the second terminal, so as to obtain the service provider's certification that the service can be provided.

当目标支付请求的发送端为第二终端时,发送端的签名信息即为第一账户信息的第一签名信息,支付平台则根据第一签名信息确定服务提供方可提供相应的服务,另外,支付平台还需向第一终端获取第二签名信息,得到第一用户对本次使用预支付金额的认证。When the sender of the target payment request is the second terminal, the signature information of the sender is the first signature information of the first account information, and the payment platform determines that the service provider can provide corresponding services according to the first signature information. In addition, the payment The platform also needs to obtain the second signature information from the first terminal to obtain the authentication of the prepaid amount for this use by the first user.

在得到目标支付请求的发送端的签名信息,并生成第二数字货币之后,在本发明一个实施例中,可根据所述预支付核销智能合约、所述发送端的签名信息、自身的第三签名信息以及所述第一数字货币和第二数字货币的差额,生成第二预支付交易信息。After obtaining the signature information of the sender of the target payment request and generating the second digital currency, in one embodiment of the present invention, the prepayment write-off smart contract, the signature information of the sender, and its own third signature Information and the difference between the first digital currency and the second digital currency to generate second prepayment transaction information.

在这里,在使用预支付金额时,可以根据目标支付请求中携带的业务标识、场景标识、第一账户和/或第二账户等信息查找到与目标支付请求对应的第一预支付交易信息,然后根据预支付核销智能合约以及第一预支付信息所对应的第一数字货币,生成与目标支付金额对应的第二数字货币。生成第二数字货币的过程与前述第一数字货币的生成过程基本相同,例如对第一数字货币进行拆分,即可得到与目标支付金额对应的第二数字货币、以及面额等于第一数字货币与第二数字货币的差额的新的第一数字货币,该新的第一数字货币仍处于冻结状态,以用于相同预支付场景下的下一次预支付。Here, when using the prepayment amount, the first prepayment transaction information corresponding to the target payment request can be found according to information such as the business identifier, the scene identifier, the first account and/or the second account carried in the target payment request, Then, according to the prepayment write-off smart contract and the first digital currency corresponding to the first prepayment information, a second digital currency corresponding to the target payment amount is generated. The process of generating the second digital currency is basically the same as that of the aforementioned first digital currency. For example, by splitting the first digital currency, the second digital currency corresponding to the target payment amount and the denomination equal to the first digital currency can be obtained. The difference between the new first digital currency and the second digital currency, the new first digital currency is still in a frozen state, so as to be used for the next prepayment under the same prepayment scenario.

也就是说,在本发明一个实施例中,每一次接收到针对第一数字货币的目标支付请求时,可以根据所述第一数字货币与所述第二数字货币的差额、以及所述预支付核销智能合约,生成新的处于冻结状态的第一数字货币。新的处于冻结状态的第一数字货币可用于下一次的预支付场景。That is to say, in an embodiment of the present invention, each time a target payment request for the first digital currency is received, the difference between the first digital currency and the second digital currency, and the prepayment Write off the smart contract and generate a new frozen No. 1 digital currency. The new frozen No. 1 digital currency can be used for the next prepayment scenario.

另外,在本发明一个实施例中,也可以采用约定预付款期限,并根据预付款期限按期支付的方式来进行预付款,在此情况下,所述预支付请求还指示了支付期限以及与所述支付期限对应的支付额度;在监测到当前时间满足所述支付期限的情况下,根据所述支付额度以及所述预支付核销智能合约,生成与所述支付额度对应的第二数字货币,并将与所述支付额度对应的第二数字货币发送给所述第一账户。In addition, in an embodiment of the present invention, the prepayment can also be made by agreeing on the prepayment period and paying on schedule according to the prepayment period. In this case, the prepayment request also indicates the payment period and the The payment amount corresponding to the payment period; when it is detected that the current time meets the payment period, according to the payment amount and the prepayment write-off smart contract, a second digital currency corresponding to the payment amount is generated, and sending the second digital currency corresponding to the payment amount to the first account.

例如,预支付请求指示的支付期限为每月支付,与支付期限对应的支付额度为1,那么,在支付平台监测到当前时间与预支付请求的接收时间之间的间隔为1个月时,则根据处于冻结状态的第一数字货币生成面额为1的第二数字货币,并将面额为1的第二数字货币发送给服务提供方的第一账户。或者,预支付请求指示的支付期限为具体的年月日,在当前时间满足相应年月日的情况下,支付平台可以根据处于冻结状态的第一数字货币生成与支付额度对应的第二数字货币。其中,生成与支付额度对应第二数字的过程与上述生成与目标支付金额对应的数字货币的过程相同,在此不再赘述。For example, if the payment period indicated by the prepayment request is monthly payment, and the payment amount corresponding to the payment period is 1, then when the payment platform detects that the interval between the current time and the receiving time of the prepayment request is 1 month, Then generate a second digital currency with a denomination of 1 according to the first digital currency in a frozen state, and send the second digital currency with a denomination of 1 to the first account of the service provider. Alternatively, the payment period indicated by the prepayment request is a specific year, month, and day. If the current time meets the corresponding year, month, and day, the payment platform can generate a second digital currency corresponding to the payment amount based on the frozen first digital currency. . Wherein, the process of generating the second number corresponding to the payment amount is the same as the above-mentioned process of generating the digital currency corresponding to the target payment amount, and will not be repeated here.

在生成第二数字货币后,原有的第一预支付信息已无法表征当前的支付状态,因此,可以根据预支付核销智能合约、第一签名信息和/或第二签名信息、以及支付平台自身的第三签名信息以及新的第一数字货币,生成第二预支付交易信息。第二预支付信息中的预支付余额已经扣减了本次支付的金额(目标支付金额),即第二预支付信息中的预支付金额为第一数字货币与目标支付金额的差额(新的第一数字货币的面额),并且第二预支付信息中的预支付变更次数更新为1。在生成第二预支付信息之后,支付平台同时还将原有的第一预支付信息记录为失效。After the second digital currency is generated, the original first prepayment information can no longer represent the current payment status. Therefore, the smart contract, first signature information and/or second signature information, and payment platform can be written off according to the prepayment own third signature information and new first digital currency to generate second prepaid transaction information. The prepayment balance in the second prepayment information has deducted the amount of this payment (target payment amount), that is, the prepayment amount in the second prepayment information is the difference between the first digital currency and the target payment amount (new denomination of the first digital currency), and the number of prepayment changes in the second prepayment information is updated to 1. After generating the second prepayment information, the payment platform also records the original first prepayment information as invalid.

可以理解的是,当下一次再接收到对应于相同预支付场景的目标支付请求时,支付平台可查找到当前有效的第二预支付信息,并根据第二预支付信息中的第一数字货币,响应目标支付请求,以完成预支付,之后还将继续更新第二预支付信息,该更新第二预支付信息的操作与第二预支付信息替换第一预支付信息的操作基本相同,在此不再赘述。换句话说,每一次接收到针对预支付数字货币的目标支付请求时,均根据当前有效的预支付信息,响应该目标支付请求,以完成预支付,并在之后更新有效的预支付信息。It can be understood that when a target payment request corresponding to the same prepayment scenario is received next time, the payment platform can find out the currently valid second prepayment information, and according to the first digital currency in the second prepayment information, Respond to the target payment request to complete the prepayment, and then continue to update the second prepayment information. The operation of updating the second prepayment information is basically the same as the operation of replacing the first prepayment information with the second prepayment information. Let me repeat. In other words, each time a target payment request for prepaid digital currency is received, the target payment request is responded to according to the currently valid prepayment information to complete the prepayment, and then the valid prepayment information is updated.

另外,根据预支付核销智能合约生成新的第一数字货币时,可以将预支付核销智能合约也作为字段写入新的第一数字货币中,以保证交易安全性。In addition, when generating a new first digital currency according to the prepayment write-off smart contract, the prepayment write-off smart contract can also be written as a field into the new first digital currency to ensure transaction security.

在持续使用过程中,剩余的预支付余额可能不足以实现当前次的目标支付请求,即预支付余额可能小于目标支付金额,在此情况下,可根据预先配置的预支付追缴智能合约,实现预支付余额的追缴。在本发明一个实施例中,当确定出所述第二数字货币的面额小于所述目标支付金额的情况下,向发起预支付请求的第一终端发送预支付追缴提示。由此,可使得第一用户根据第一终端展示的预支付追缴提示,知晓预支付余额不足,从而通过第一终端发起相应的预支付追缴请求。In the process of continuous use, the remaining prepayment balance may not be enough to realize the current target payment request, that is, the prepayment balance may be less than the target payment amount. Recovery of payment balance. In an embodiment of the present invention, when it is determined that the denomination of the second digital currency is less than the target payment amount, a prepayment recovery reminder is sent to the first terminal that initiated the prepayment request. Thus, the first user can know that the prepayment balance is insufficient according to the prepayment recovery prompt displayed by the first terminal, and thus initiate a corresponding prepayment recovery request through the first terminal.

当支付平台接收到所述第一终端根据所述预支付追缴提示发送的预支付追缴请求时,校验所述预支付追缴请求所指示的第一账户、第二账户是否为空,如果否,获取所述第一账户的第一签名信息以及所述第二账户的第二签名信息;When the payment platform receives the prepayment recovery request sent by the first terminal according to the prepayment recovery prompt, check whether the first account and the second account indicated by the prepayment recovery request are empty, if not, Obtain first signature information of the first account and second signature information of the second account;

在获取到所述第一签名信息和所述第二签名信息的情况下,根据预配置的预支付追缴智能合约、所述预支付追缴请求所指示的金额、所述第一数字货币,生成新的处于冻结状态的第一数字货币。When the first signature information and the second signature information are acquired, according to the pre-configured prepayment recovery smart contract, the amount indicated by the prepayment recovery request, and the first digital currency, a new The first digital currency in a frozen state.

在这里,生成新的处于冻结状态的第一数字货币时,也可将预支付追缴智能合约作为字段写入新的第一数字货币中。Here, when generating a new first digital currency that is in a frozen state, the prepayment recovery smart contract can also be written into the new first digital currency as a field.

其中,预支付追缴智能合约用于在已有的预支付条款项目下,增加充值款项。因此,第一用户在发起预支付追缴请求时,应该通过第一终端输入已有预支付条款项目所对应的第二账户(付款账户)和第一账户(收款账户)。那么,支付平台在接收到预支付追缴请求时,会校验所述预支付追缴请求所指示的第一账户、第二账户是否为空,若第一账户或第二账户为空,则拒绝预支付追缴请求。在第一账户和第二用户不为空的情况下,支付平台还可对预支付追缴请求所指示的追缴金额进行校验,该追缴金额应该大于等于0,若校验通过,则支付平台获取第一签名信息和第二签名信息。Among them, the prepayment recovery smart contract is used to increase the recharge amount under the existing prepayment clause project. Therefore, when the first user initiates a prepayment recovery request, he should input the second account (payment account) and the first account (payment account) corresponding to the existing prepayment item through the first terminal. Then, when the payment platform receives the prepayment recovery request, it will check whether the first account and the second account indicated by the prepayment recovery request are empty, and if the first account or the second account is empty, the prepayment recovery request will be rejected. Pay the recovery request. In the case that the first account and the second user are not empty, the payment platform can also verify the recovery amount indicated in the prepayment recovery request. The recovery amount should be greater than or equal to 0. If the verification is passed, the payment platform will obtain First signature information and second signature information.

其中,第二签名信息可以由预支付追缴请求携带着发送给支付平台,也可以是支付平台对第一账户、第二账户是否为空以及追缴金额的校验通过后,再提示第一终端输入。第一签名信息可以是支付平台在校验通过后,提示第二终端输入。当支付平台接收到第二签名信息时,说明第一用户对本次的预支付追缴请求认证通过,同理,当支付平台接收到第一签名信息时,说明服务提供方(第二用户)确认可继续针对追缴请求提供相应的服务。因此,若支付平台获取到第一签名信息和第二签名信息,说明追缴请求对应的付款方和服务提供方均认可本次追缴,此时支付平台才根据预支付追缴智能合约、所述预支付追缴请求所指示的金额、第二账户中处于可用状态的数字货币以及当前预支付余额对应的第一数字货币,生成新的第一数字货币,该第一数字货币仍处于冻结状态。Among them, the second signature information can be sent to the payment platform with the prepayment recovery request, or the payment platform can prompt the first terminal to input . The first signature information may be that the payment platform prompts the second terminal to input after the verification is passed. When the payment platform receives the second signature information, it means that the first user has passed the authentication of this prepayment recovery request. Similarly, when the payment platform receives the first signature information, it means that the service provider (second user) has confirmed You can continue to provide corresponding services for recovery requests. Therefore, if the payment platform obtains the first signature information and the second signature information, it means that both the payer and the service provider corresponding to the recovery request agree to the recovery. The amount indicated in the recovery request, the available digital currency in the second account, and the first digital currency corresponding to the current prepaid balance generate a new first digital currency, which is still in a frozen state.

可以理解的是,新的第一数字货币的面额与上次支付后生成的第一数字货币的面额与追缴金额之和相等。通过预支付追缴智能合约,实现了预支付金额的追缴,支付平台还可在追缴后,生成新的预支付交易信息,以更新预支付交易信息中的预支付余额。It can be understood that the denomination of the new first digital currency is equal to the sum of the denomination of the first digital currency generated after the last payment and the recovered amount. Through the prepayment recovery smart contract, the recovery of the prepayment amount is realized. After the recovery, the payment platform can also generate new prepayment transaction information to update the prepayment balance in the prepayment transaction information.

另外,消费者或者服务提供方可通过预配置的预支付查询智能合约,根据场景标识、业务标识、第一账户和第二账户等信息查询预支付余额,也可查询预支付过程的支付明细数据,还可根据核销时间顺序对支付明细数据进行排序和分页操作等。In addition, consumers or service providers can query the smart contract through the pre-configured pre-payment, query the pre-payment balance according to the scene ID, business ID, first account and second account and other information, and also query the payment details of the pre-payment process , and can also sort and paginate the payment detail data according to the write-off time sequence.

步骤S103:将所述第二数字货币发送给所述第一数字货币对应的第一账户。Step S103: Send the second digital currency to the first account corresponding to the first digital currency.

在本发明一个实施例中,若目标支付请求为通用支付操作,可通过支付平台将第二数字货币的状态设置为可用状态之后,将处于可用状态的第二数字货币发送给所述第一账户,也即将处于可用状态的第二数字货币发送至服务提供方的第一账户中,则服务提供方可将该第二数字货币使用于任意数字货币的支付场景。In one embodiment of the present invention, if the target payment request is a general payment operation, the second digital currency in the usable state can be sent to the first account after the second digital currency is set to an available state through the payment platform , that is, sending the available second digital currency to the first account of the service provider, then the service provider can use the second digital currency in any digital currency payment scenario.

若目标支付请求仍对应预支付操作,可支付平台可直接将处于冻结状态的第二数字货币发送给第一账户,第一账户在得到处于冻结状态的第二数字货币后,仍无法将第二数字货币作为通用数字货币使用于其他支付场景,而仅能将该第二数字货币应用于与第一数字货币相同的特定预支付场景。If the target payment request still corresponds to the prepayment operation, the payable platform can directly send the frozen second digital currency to the first account. After the first account obtains the frozen second digital currency, it still cannot send the second The digital currency is used as a general digital currency in other payment scenarios, but the second digital currency can only be applied to the same specific prepayment scenario as the first digital currency.

在生成第二数字货币时,支付平台也根据所述第一数字货币与所述第二数字货币的差额、以及所述预支付核销智能合约,生成新的第一数字货币,所述新的第一数字货币处于冻结状态;该新的第一数字货币的面额即本次响应目标支付请求后剩余的预支付金额。When generating the second digital currency, the payment platform also generates a new first digital currency according to the difference between the first digital currency and the second digital currency and the prepayment write-off smart contract, and the new The first digital currency is in a frozen state; the denomination of the new first digital currency is the remaining prepaid amount after this response to the target payment request.

若消费者或者服务提供方因故需取消该剩余预支付金额,则消费者通过第一终端、服务提供方可通过第二终端向支付平台发送针对第一数字货币的取消请求。可以理解的是,此处针对的第一数字货币即上一次支付后所生成的第一数字货币。支付平台在接收到针对所述第一数字货币的取消请求的情况下,获取所述第一账户的第一签名信息和所述预支付请求对应的第二账户的第二签名信息;在获取到所述第一签名信息和所述第二签名信息的情况下,将所述第一数字货币的状态设置为可用状态,并将所述第一数字货币发送给所述第二账户。If the consumer or the service provider needs to cancel the remaining prepaid amount for some reason, the consumer can send a cancellation request for the first digital currency to the payment platform through the first terminal and the service provider through the second terminal. It can be understood that the first digital currency mentioned here is the first digital currency generated after the last payment. When the payment platform receives the cancellation request for the first digital currency, it acquires the first signature information of the first account and the second signature information of the second account corresponding to the prepayment request; In the case of the first signature information and the second signature information, the state of the first digital currency is set to an available state, and the first digital currency is sent to the second account.

若支付平台获取到第一签名信息和第二签名信息,说明消费者和服务提供方均认可针对当前预支付款项的取消操作,此时支付平台可将冻结的第一数字货币恢复为可用状态,并将第一数字货币发送给第二账户,以将未使用的预付款返回给第一用户,使得第一用户可将预付款应用于其他通用支付场景。If the payment platform obtains the first signature information and the second signature information, it means that both the consumer and the service provider agree to cancel the current prepayment. At this time, the payment platform can restore the frozen first digital currency to an available state. And send the first digital currency to the second account to return the unused advance payment to the first user, so that the first user can apply the advance payment to other general payment scenarios.

若支付平台仅收到一方的签名信息,如支付平台仅收到第一签名信息或第二签名信息,说明消费者和服务方中至少有一方不认可针对当前预支付款项的取消操作,此时支付平台可作为第三方对取消请求进行校验,并可根据校验结果确定是否响应取消请求。If the payment platform only receives the signature information of one party, such as the payment platform only receives the first signature information or the second signature information, it means that at least one of the consumer and the service provider does not approve the cancellation of the current prepayment. The payment platform can verify the cancellation request as a third party, and can determine whether to respond to the cancellation request according to the verification result.

其中,取消请求可以由服务提供方发起,也可以由消费者发起。对于消费者主动发起的撤销请求,即在所述取消请求为所述第一终端发送的撤销请求的情况下,支付平台可以根据预配置的预支付撤销智能合约,确定所述第一数字货币是否可撤销;如果是,获取所述第一账户对应的第一签名信息和所述第二账户对应的第二签名信息;如果否,拒绝所述撤销请求。Wherein, the cancellation request can be initiated by the service provider or by the consumer. For a cancellation request initiated by the consumer, that is, if the cancellation request is sent by the first terminal, the payment platform can determine whether the first digital currency is based on the pre-configured prepayment cancellation smart contract. Revocable; if yes, acquire the first signature information corresponding to the first account and the second signature information corresponding to the second account; if no, reject the revocation request.

在这里,如果在创建预付款时,指定此笔预付款为可撤销合约,则可以针对这笔预付款执行撤销,否则无法撤销此笔合约。具体操作时,支付平台可查询此笔预支付撤销智能合约,以确定预付款是否为可撤销合约,如果不是,则拒绝撤销请求;如果是,则在获取到第一签名信息和第二签名信息后,将款项原路退回,并更新预支付余额为0。还可通知第一终端和第二终端撤销合约已完成,并更改预支付交易信息。可以理解的是,在正常使用预付款的情况下,也即,根据目标支付请求以及第一数字货币生成与目标支付金额对应的第二数字货币,并将第二数字货币发送给第一账户之后,也可以通知第一终端和第二终端本次所消费的金额。Here, if the advance payment is specified as a revocable contract when the advance payment is created, the advance payment can be revoked, otherwise the contract cannot be revoked. During specific operations, the payment platform can query the prepayment revocation smart contract to determine whether the prepayment is a revocable contract, if not, reject the revocation request; After that, the money will be returned to the original route, and the prepaid balance will be updated to 0. The first terminal and the second terminal may also be notified that the cancellation of the contract has been completed, and the prepayment transaction information may be changed. It can be understood that, in the case of normal use of prepayment, that is, after generating the second digital currency corresponding to the target payment amount according to the target payment request and the first digital currency, and sending the second digital currency to the first account , and may also notify the first terminal and the second terminal of the amount consumed this time.

另外,取消请求可以由服务提供方发起,例如服务方根据服务条款,取消消费者的预支付服务,此时支付平台在获取到第一签名信息和第二签名信息后,将款项原路退回,并更新预支付余额为0。还可通知第一终端和第二终端撤销合约已完成,并更改预支付交易信息。In addition, the cancellation request can be initiated by the service provider. For example, the service provider cancels the consumer’s prepayment service according to the terms of service. At this time, the payment platform will refund the original payment after obtaining the first signature information and the second signature information. And update the prepaid balance to 0. The first terminal and the second terminal may also be notified that the cancellation of the contract has been completed, and the prepayment transaction information may be changed.

此外,服务提供方可能会根据内部交易异常、或者服务提供方由于店铺倒闭而无法继续提供服务、或者行政指令等强制指令强制关停预支付所对应的服务,此时需终止预支付服务并退回预支付款项。在此实施例中,支付平台接收终止指令;根据所述终止指令以及预配置的预支付终止智能合约,将所述第一数字货币的状态设置为可用状态,并将所述第一数字货币发送给所述第二账户;以及向发起预支付请求的第一终端以及所述第一账户对应的第二终端发送预支付终止提示信息,以通知第一终端和第二终端预支付服务已停止。另外,支付平台还可根据退回的款项,更改预支付交易信息,如将预支付余额更改为0。In addition, the service provider may forcibly shut down the service corresponding to the prepayment based on abnormal internal transactions, or the service provider is unable to continue to provide services due to store closures, or administrative orders and other mandatory instructions. At this time, the prepayment service needs to be terminated and returned. advance payment. In this embodiment, the payment platform receives a termination instruction; according to the termination instruction and the pre-configured pre-payment termination smart contract, the state of the first digital currency is set to an available state, and the first digital currency is sent to to the second account; and sending prepayment termination prompt information to the first terminal that initiated the prepayment request and the second terminal corresponding to the first account, so as to notify the first terminal and the second terminal that the prepayment service has stopped. In addition, the payment platform can also change the prepayment transaction information according to the returned money, such as changing the prepayment balance to 0.

在本发明一个实施例中,支付平台可以提供多个接口用以接收不同的请求,如冻结支付接口和解冻支付接口等。冻结支付接口对应于缴存和追缴等操作,解冻支付接口对应于核销和撤销等操作。In an embodiment of the present invention, the payment platform may provide multiple interfaces for receiving different requests, such as freezing the payment interface and unfreezing the payment interface. The freezing payment interface corresponds to operations such as deposit and recovery, and the unfreezing payment interface corresponds to operations such as verification and cancellation.

在本发明一个实施方式中,通过冻结支付接口接收所述预支付请求;当通过所述冻结支付接口接收到第一反交易请求时,获取所述第一账户的第一签名信息和所述预支付请求对应的第二账户的第二签名信息;在获取到所述第一签名信息和所述第二签名信息的情况下,将所述第一数字货币的状态设置为可用状态,并将所述第一数字货币发送给所述第二账户。In one embodiment of the present invention, the prepayment request is received through the frozen payment interface; when the first reverse transaction request is received through the frozen payment interface, the first signature information of the first account and the prepayment request are obtained. The second signature information of the second account corresponding to the payment request; when the first signature information and the second signature information are obtained, the status of the first digital currency is set to an available status, and the The first digital currency is sent to the second account.

在这里,冻结支付接口除了可接收预支付请求,以使支付平台实现缴存操作,还可接收对应于预支付请求的第一反交易请求,在响应第一反交易请求时,数字货币的流向与预支付请求的响应过程相反,也就是说,在响应第一反交易请求的过程中,是将所述第一数字货币的状态设置为可用状态,并将所述第一数字货币发送给所述第二账户。例如,用户在发起错误的预支付请求之后,可通过第一终端向业务平台发起第一反交易请求,支付平台在获取到第一签名信息和第二签名信息后,即可针对第一反交易请求进行响应,以退回根据错误的预支付请求而冻结的第一数字货币。Here, in addition to receiving the prepayment request to enable the payment platform to realize the deposit operation, the frozen payment interface can also receive the first reverse transaction request corresponding to the prepayment request. When responding to the first reverse transaction request, the flow of digital currency Contrary to the response process of the prepayment request, that is to say, in the process of responding to the first reverse transaction request, the state of the first digital currency is set to an available state, and the first digital currency is sent to the the second account. For example, after a user initiates a wrong prepayment request, he can initiate a first reverse transaction request to the business platform through the first terminal, and the payment platform can then issue a request for the first reverse transaction after obtaining the first signature information and the second signature information. Requesting a response to return the first digital currency that was frozen in response to the erroneous prepayment request.

类似地,在本发明一个实施方式中,通过解冻支付接口接收所述目标支付请求;当通过所述解冻支付接口接收到第二反交易请求时,获取所述第一账户对应的第一签名信息和所述预支付请求对应的第二账户的第二签名信息;在获取到所述第一签名信息和所述第二签名信息的情况下,注销所述第二数字货币,并根据所述目标支付金额,更新所述第一数字货币。Similarly, in one embodiment of the present invention, the target payment request is received through the unfreezing payment interface; when the second reverse transaction request is received through the unfreezing payment interface, the first signature information corresponding to the first account is obtained The second signature information of the second account corresponding to the prepayment request; if the first signature information and the second signature information are obtained, cancel the second digital currency, and according to the target The payment amount is used to update the first digital currency.

解冻支付接口除了可接收目标支付请求,以使支付平台实现核销操作,还可接收对应于目标支付请求的第二反交易请求,在响应第二反交易请求时,数字货币的流向与目标支付请求的响应过程相反。也就是说,在响应第二反交易请求的过程中,是注销第二数字货币,并根据第二数字货币和已生成的新的第一数字货币,重新生成处于冻结状态的第一数字货币。例如,用户在发起错误的目标支付请求之后,可通过第一终端向业务平台发起第二反交易请求,或者,由于商家内部交易错误,其也可以通过第二终端向业务平台发起第二反交易请求。支付平台在获取到第一签名信息和第二签名信息后,即可针对第二反交易请求进行响应,以注销根据错误的目标支付请求而生成的新的第一数字货币。例如,业务平台在根据目标交易请求,根据面额为10的第一数字货币生成了面额为3的第二数字货币以及仍处于冻结状态的面额为7的新的第一数字货币,并注销了原面额为10的第一数字货币。那么,在响应针对该目标交易请求的第二反交易请求时,支付平台根据面额为3的第二数字货币以及仍处于冻结状态的面额为7的第一数字货币重新生成面额为10的第一数字货币,并注销面额为3的第二数字货币以及面额为7的第一数字货币。In addition to receiving the target payment request to enable the payment platform to implement the verification operation, the unfreezing payment interface can also receive the second reverse transaction request corresponding to the target payment request. When responding to the second reverse transaction request, the flow of digital currency is consistent with the target payment The response process for requests is reversed. That is to say, in the process of responding to the second anti-transaction request, the second digital currency is canceled and the frozen first digital currency is regenerated according to the second digital currency and the generated new first digital currency. For example, after the user initiates a wrong target payment request, he can initiate a second reverse transaction request to the service platform through the first terminal, or, due to an internal transaction error of the merchant, he can also initiate a second reverse transaction request to the service platform through the second terminal ask. After the payment platform obtains the first signature information and the second signature information, it can respond to the second reverse transaction request to cancel the new first digital currency generated according to the wrong target payment request. For example, according to the target transaction request, the business platform generates a second digital currency with a denomination of 3 and a new first digital currency with a denomination of 7 that are still in a frozen state based on the first digital currency with a denomination of 10, and cancels the original digital currency. The first digital currency with a denomination of 10. Then, when responding to the second reverse transaction request for the target transaction request, the payment platform regenerates the first digital currency with a denomination of 10 based on the second digital currency with a denomination of 3 and the first digital currency with a denomination of 7 that is still in a frozen state. digital currency, and cancel the second digital currency with a denomination of 3 and the first digital currency with a denomination of 7.

根据本发明实施例的一种基于数字货币的支付方法可以看出,能够基于预配置的预支付缴存智能合约,使得与预支付金额对应的第一数字货币处于冻结状态,此时发起预支付请求的第一用户以及服务提供方对应的第二用户无法使用该第二数字货币。当接收到针对处于冻结状态的第一数字货币对应的目标支付请求时,根据预支付核销智能合约,对处于冻结状态的第一数字货币进行核销,生成与目标支付金额对应的第二数字货币,并将第二数字货币发送给服务提供方对应的第一账户,使得服务提供方可使用第二数字货币。由此,通过预支付智能合约,避免了服务提供方提前使用预支付的数字货币,提高了预支付场景的交易安全性。进一步地,还能撤销或取消未使用的预支付数字货币,使得未使用的预支付数字货币返回至第一用户对应的第二账户中,解决了现有的预支付场景下,用户无法针对预支付的货币进行退款的问题,从而进一步提高了预支付场景的交易安全性,保障了用户权益。According to a digital currency-based payment method according to an embodiment of the present invention, it can be seen that based on the pre-configured pre-payment deposit smart contract, the first digital currency corresponding to the pre-payment amount is frozen, and the pre-payment is initiated at this time The first requesting user and the second user corresponding to the service provider cannot use the second digital currency. When the target payment request corresponding to the first digital currency in the frozen state is received, the first digital currency in the frozen state is written off according to the prepayment write-off smart contract, and the second number corresponding to the target payment amount is generated Currency, and send the second digital currency to the first account corresponding to the service provider, so that the service provider can use the second digital currency. Therefore, through the prepayment smart contract, the service provider is prevented from using the prepaid digital currency in advance, and the transaction security of the prepayment scenario is improved. Furthermore, it is also possible to revoke or cancel the unused prepaid digital currency, so that the unused prepaid digital currency is returned to the second account corresponding to the first user, which solves the problem that in the existing prepayment scenario, the user cannot target the prepaid digital currency. The problem of refunding the paid currency further improves the transaction security of the pre-payment scenario and protects the rights and interests of users.

图2是根据本发明实施例的一种基于数字货币的支付方法应用于第一终端时的主要步骤的示意图。Fig. 2 is a schematic diagram of main steps when a digital currency-based payment method is applied to a first terminal according to an embodiment of the present invention.

如图2所示,本发明实施例的一种基于数字货币的支付方法应用于第一终端时,主要包括以下步骤:As shown in Figure 2, when a payment method based on digital currency in the embodiment of the present invention is applied to the first terminal, it mainly includes the following steps:

步骤S201:响应于第一触发,生成预支付请求,并向支付平台发送所述预支付请求;所述预支付请求指示了第二账户以及预支付金额;Step S201: In response to the first trigger, generate a prepayment request, and send the prepayment request to the payment platform; the prepayment request indicates the second account and the prepayment amount;

步骤S202:接收与所述预支付金额对应的第一数字货币,并将处于冻结状态的第一数字货币存储于所述第二账户中;Step S202: receiving the first digital currency corresponding to the prepaid amount, and storing the frozen first digital currency in the second account;

步骤S203:响应于第二触发,生成针对于所述第一数字货币的目标支付请求,并向所述支付平台发送所述目标支付请求。Step S203: In response to the second trigger, generate a target payment request for the first digital currency, and send the target payment request to the payment platform.

可以理解的是,第一触发和第二触发一般是由消费者发起的。It can be understood that the first trigger and the second trigger are generally initiated by consumers.

在本发明一个实施例中,第一终端可以根据所述第二账户的第二签名信息,生成所述预支付请求和/或所述目标支付请求。In an embodiment of the present invention, the first terminal may generate the prepayment request and/or the target payment request according to the second signature information of the second account.

在本发明一个实施例中,第一终端可以响应于所述支付平台对所述预支付请求和/或所述目标支付请求的反馈,向所述支付平台发送所述第二账户的第二签名信息。In an embodiment of the present invention, the first terminal may send the second signature of the second account to the payment platform in response to the payment platform's feedback on the prepayment request and/or the target payment request information.

在本发明一个实施例中,第一终端获取与第一账户对应的支付标识或支付图像,以确定所述第一账户;根据所述第一账户以及所述第二触发,生成所述目标支付请求。In an embodiment of the present invention, the first terminal obtains the payment identification or payment image corresponding to the first account to determine the first account; generates the target payment according to the first account and the second trigger ask.

在这里,第一终端可以通过获取第一账户的支付标识(如支付编码等),或者扫描第一账户对应的支付图像(如收款二维码或支付条码等),获取到服务提供方对应的第一账户,然后根据第一账户生成预支付请求、目标支付请求和预支付追缴请求等多种请求。Here, the first terminal can acquire the payment identification (such as payment code, etc.) According to the first account, various requests such as prepayment request, target payment request and prepayment recovery request are generated according to the first account.

在本发明一个实施例中,第一终端还可以接收所述支付平台发送的预支付追缴提示,并展示所述预支付追缴提示;当接收到根据所述预支付追缴提示输入的追缴信息时,根据所述追缴信息包括的第一账户和第二账户,生成预支付追缴请求,并将所述预支付追缴请求发送给所述支付平台。In an embodiment of the present invention, the first terminal may also receive the prepayment recovery prompt sent by the payment platform, and display the prepayment recovery prompt; when receiving the recovery information input according to the prepayment recovery prompt, A prepayment recovery request is generated according to the first account and the second account included in the recovery information, and the prepayment recovery request is sent to the payment platform.

图3是根据本发明实施例的一种基于数字货币的支付平台的示意图。Fig. 3 is a schematic diagram of a digital currency-based payment platform according to an embodiment of the present invention.

如图3所示,本发明实施例的一种基于数字货币的支付平台300包括:请求接收模块301、核销模块302以及货币发送模块303;其中,As shown in Figure 3, a payment platform 300 based on digital currency in the embodiment of the present invention includes: a request receiving module 301, a verification module 302, and a currency sending module 303; wherein,

所述请求接收模块301,用于接收针对处于冻结状态的第一数字货币的目标支付请求,所述冻结状态的第一数字货币是基于预支付请求以及预配置的预支付缴存智能合约生成的;The request receiving module 301 is configured to receive a target payment request for the first digital currency in the frozen state, the first digital currency in the frozen state is generated based on the prepayment request and the pre-configured prepayment deposit smart contract ;

所述核销模块302,用于根据所述目标支付请求所指示的目标支付金额、所述第一数字货币以及预配置的预支付核销智能合约,生成与所述目标支付金额对应的第二数字货币;The write-off module 302 is configured to generate a second payment corresponding to the target payment amount according to the target payment amount indicated by the target payment request, the first digital currency, and the pre-configured pre-payment write-off smart contract. digital currency;

所述货币发送模块303,用于将所述第二数字货币发送给所述第一数字货币对应的第一账户。The currency sending module 303 is configured to send the second digital currency to the first account corresponding to the first digital currency.

在本发明一个实施例中,所述核销模块302,还用于根据所述第一数字货币与所述第二数字货币的差额、以及所述预支付核销智能合约,生成新的处于冻结状态的第一数字货币。In one embodiment of the present invention, the write-off module 302 is further configured to generate a new frozen payment based on the difference between the first digital currency and the second digital currency and the prepayment write-off smart contract. The state's first digital currency.

在本发明一个实施例中,如图3所示,所述支付平台还包括处理模块304;其中,In one embodiment of the present invention, as shown in FIG. 3 , the payment platform further includes a processing module 304; wherein,

所述处理模块304,还用于在接收到针对所述第一数字货币的取消请求的情况下,获取所述第一账户的第一签名信息和所述预支付请求对应的第二账户的第二签名信息;在获取到所述第一签名信息和所述第二签名信息的情况下,将所述第一数字货币的状态设置为可用状态,并将所述第一数字货币发送给所述第二账户。The processing module 304 is further configured to obtain the first signature information of the first account and the first signature information of the second account corresponding to the prepayment request when the cancellation request for the first digital currency is received. Two signature information; when the first signature information and the second signature information are obtained, set the state of the first digital currency to an available state, and send the first digital currency to the second account.

在本发明一个实施例中,所述处理模块304,还用于接收第一终端的预支付请求,所述预支付请求指示了第二账户以及预支付金额;根据所述预支付请求、所述第二账户所对应的第三数字货币以及预配置的预支付缴存智能合约,生成与所述预支付金额对应的第一数字货币,所述第一数字货币的状态为冻结状态。In an embodiment of the present invention, the processing module 304 is further configured to receive a prepayment request from the first terminal, the prepayment request indicating the second account and the prepayment amount; according to the prepayment request, the The third digital currency corresponding to the second account and the pre-configured prepayment deposit smart contract generate the first digital currency corresponding to the prepayment amount, and the state of the first digital currency is frozen.

在本发明一个实施例中,所述预支付请求还指示了所述第一账户;所述处理模块304,用于将所述预支付缴存智能合约和/或所述第一账户作为所述第一数字货币的字段写入所述第一数字货币In an embodiment of the present invention, the prepayment request also indicates the first account; the processing module 304 is configured to use the prepayment deposit smart contract and/or the first account as the The field of the first digital currency is written to the first digital currency

在本发明一个实施例中,所述核销模块302,用于确定所述目标支付请求本次指示的账户是否与所述第一账户相同;如果是,生成与所述目标支付金额对应的第二数字货币;如果否,拒绝所述目标支付请求。In an embodiment of the present invention, the write-off module 302 is configured to determine whether the account indicated by the target payment request this time is the same as the first account; if yes, generate the second account corresponding to the target payment amount Two digital currency; if not, deny the target payment request.

在本发明一个实施例中,预支付缴存模块302,用于在生成所述第二数字货币之后,利用自身的第二第三签名信息,对所述第二数字货币进行签名,并根据签名后的所述第二数字货币、所述第一签名信息以及所述预支付缴存智能合约,生成并存储第一预支付交易信息。In one embodiment of the present invention, the prepayment deposit module 302 is configured to use its second and third signature information to sign the second digital currency after generating the second digital currency, and to After the second digital currency, the first signature information and the prepayment deposit smart contract, the first prepayment transaction information is generated and stored.

在本发明一个实施例中,所述核销模块302,用于将所述预支付核销智能合约作为所述新的处于冻结状态的第一数字货币的字段写入所述第一数字货币In one embodiment of the present invention, the write-off module 302 is configured to write the prepayment write-off smart contract into the first digital currency as a field of the new first digital currency in a frozen state

在本发明一个实施例中,在所述取消请求为第一终端发送的撤销请求的情况下,所述处理模块304,还用于根据预配置的预支付撤销智能合约,确定所述第一数字货币是否可撤销;如果是,获取所述第一签名信息和所述第二签名信息;如果否,拒绝所述撤销请求。In an embodiment of the present invention, in the case that the cancellation request is a cancellation request sent by the first terminal, the processing module 304 is further configured to determine the first number according to the pre-configured prepayment cancellation smart contract Whether the currency is revocable; if yes, acquire the first signature information and the second signature information; if no, reject the revocation request.

在本发明一个实施例中,所述核销模块302,还用于利用自身的第三签名信息,对所述第一数字货币进行签名,并根据签名后的所述第一数字货币、所述第二签名信息以及所述预支付缴存智能合约,生成并存储第一预支付交易信息。In an embodiment of the present invention, the verification module 302 is further configured to use its own third signature information to sign the first digital currency, and according to the signed first digital currency, the The second signature information and the prepayment deposit smart contract generate and store the first prepayment transaction information.

在本发明一个实施例中,所述预支付请求还指示了场景标识和/或业务标识;所述处理模块304,用于根据所述第一数字货币和所述第二签名信息、所述预支付缴存智能合约以及所述场景标识和/或业务标识,生成所述第一预支付交易信息。In an embodiment of the present invention, the prepayment request also indicates a scene identifier and/or a business identifier; the processing module 304 is configured to, according to the first digital currency and the second signature information, the prepayment The payment and deposit smart contract and the scene identifier and/or business identifier are used to generate the first prepayment transaction information.

在本发明一个实施例中,在所述目标支付请求还指示场景标识和/或业务标识的情况下,所述核销模块302,用于确定所述目标支付请求本次指示的场景标识和/或业务标识是否分别与所述第一预支付交易信息指示的场景标识和/或业务标识相同;如果是,生成与所述目标支付金额对应的第二数字货币;如果否,拒绝所述目标支付请求。In an embodiment of the present invention, when the target payment request also indicates a scenario ID and/or a business ID, the write-off module 302 is configured to determine the scenario ID and/or business ID indicated by the target payment request this time Or whether the business identifier is the same as the scene identifier and/or business identifier indicated by the first prepayment transaction information; if yes, generate the second digital currency corresponding to the target payment amount; if not, reject the target payment ask.

在本发明一个实施例中,所述预支付请求还指示了支付期限以及与所述支付期限对应的支付额度;所述核销模块302,还用于在监测到当前时间满足所述支付期限的情况下,根据所述支付额度以及所述预支付核销智能合约,生成与所述支付额度对应的第二数字货币,并将与所述支付额度对应的第二数字货币发送给所述第一账户。In an embodiment of the present invention, the prepayment request also indicates the payment term and the payment amount corresponding to the payment term; the verification module 302 is also configured to meet the payment term at the current time In this case, according to the payment amount and the prepayment write-off smart contract, the second digital currency corresponding to the payment amount is generated, and the second digital currency corresponding to the payment amount is sent to the first account.

在本发明一个实施例中,所述核销模块302,用于确定所述目标支付请求是否包括所述目标支付请求的发送端的签名信息,如果是,生成与所述目标支付金额对应的第二数字货币。In an embodiment of the present invention, the verification module 302 is configured to determine whether the target payment request includes the signature information of the sender of the target payment request, and if so, generate a second payment corresponding to the target payment amount. digital currency.

在本发明一个实施例中,所述核销模块302,用于根据所述预支付核销智能合约、所述发送端的签名信息、自身的第三签名信息以及所述第一数字货币和第二数字货币的差额,生成第二预支付交易信息。。In an embodiment of the present invention, the write-off module 302 is configured to write off the smart contract according to the prepayment, the signature information of the sender, its own third signature information, and the first digital currency and the second digital currency. The difference of the digital currency generates the second prepayment transaction information. .

在本发明一个实施例中,处理模块304,用于确定所述第二账户中的第三数字货币以及所述第三数字货币的可用面额;根据所述可用面额与所述预支付金额的大小,确定所述第一数字货币的生成方式,并根据所述生成方式生成与所述预支付金额对应的第一数字货币。In one embodiment of the present invention, the processing module 304 is configured to determine the third digital currency in the second account and the available denomination of the third digital currency; according to the size of the available denomination and the prepaid amount , determine the generation method of the first digital currency, and generate the first digital currency corresponding to the prepayment amount according to the generation method.

在本发明一个实施例中,处理模块304,用于当所述可用面额大于所述预支付金额时,确定所述生成方式为拆分所述第三数字货币;将所述第三数字货币拆分为所述第一数字货币和第四数字货币,所述第一数字货币的面额和所述第四数字货币的面额之和与所述可用面额相等,且所述第四数字货币的状态为可用状态,并注销所述第三数字货币。In one embodiment of the present invention, the processing module 304 is configured to determine that the generating method is to split the third digital currency when the available denomination is greater than the prepaid amount; split the third digital currency Divided into the first digital currency and the fourth digital currency, the sum of the denomination of the first digital currency and the denomination of the fourth digital currency is equal to the available denomination, and the state of the fourth digital currency is usable state, and cancel the third digital currency.

在本发明一个实施例中,处理模块304,用于将所述第一数字货币冻结于所述第一账户或所述预支付请求对应的第二账户或支付平台中。In one embodiment of the present invention, the processing module 304 is configured to freeze the first digital currency in the first account or the second account or payment platform corresponding to the prepayment request.

在本发明一个实施例中,货币发送模块303,用于将所述第二数字货币设置为可用状态之后,将处于可用状态的第二数字货币发送给所述第一账户。In one embodiment of the present invention, the currency sending module 303 is configured to send the second digital currency in an available state to the first account after setting the second digital currency in an available state.

在本发明一个实施例中,所述核销模块302,还用于当确定出所述第一数字货币的面额小于所述目标支付金额的情况下,向发起所述预支付请求的第一终端发送预支付追缴提示。In an embodiment of the present invention, the write-off module 302 is further configured to, when it is determined that the denomination of the first digital currency is less than the target payment amount, send a request to the first terminal that initiated the prepayment request Send a prepayment recovery reminder.

在本发明一个实施例中,所述核销模块302,还用于当接收到所述第一终端根据所述预支付追缴提示发送的预支付追缴请求时,校验所述预支付追缴请求所指示的第一账户、第二账户是否为空,如果否,获取所述第一账户的第一签名信息以及所述第二账户的第二签名信息;在获取到所述第一签名信息和所述第二签名信息的情况下,根据预配置的预支付追缴智能合约、所述预支付追缴请求所指示的金额、所述第一数字货币,生成新的处于冻结状态的第一数字货币。In an embodiment of the present invention, the write-off module 302 is further configured to, when receiving the prepayment recovery request sent by the first terminal according to the prepayment recovery prompt, verify the prepayment recovery request. Whether the indicated first account and the second account are empty, if not, obtain the first signature information of the first account and the second signature information of the second account; after obtaining the first signature information and the In the case of the second signature information, a new frozen first digital currency is generated according to the pre-configured prepayment recovery smart contract, the amount indicated by the prepayment recovery request, and the first digital currency.

在本发明一个实施例中,所述处理模块304,还用于接收终止指令;In an embodiment of the present invention, the processing module 304 is also configured to receive a termination instruction;

根据所述终止指令以及预配置的预支付终止智能合约,将所述第一数字货币的状态设置为可用状态,并将所述第一数字货币发送给所述预支付请求对应的第二账户;以及向发起所述预支付请求的第一终端以及所述第一账户对应的第二终端发送预支付终止提示信息。According to the termination instruction and the pre-configured pre-payment termination smart contract, the state of the first digital currency is set to an available state, and the first digital currency is sent to the second account corresponding to the pre-payment request; And sending prepayment termination prompt information to the first terminal that initiated the prepayment request and the second terminal corresponding to the first account.

在本发明一个实施例中,通过冻结支付接口接收所述预支付请求;所述处理模块304,还用于当通过所述冻结支付接口接收到第一反交易请求时,获取所述第一账户的第一签名信息和所述预支付请求对应的第二账户的第二签名信息;在获取到所述第一签名信息和所述第二签名信息的情况下,将所述第一数字货币的状态设置为可用状态,并将所述第一数字货币发送给所述第二账户。In an embodiment of the present invention, the prepayment request is received through the frozen payment interface; the processing module 304 is further configured to acquire the first account when receiving the first reverse transaction request through the frozen payment interface the first signature information of the prepayment request and the second signature information of the second account corresponding to the prepayment request; when the first signature information and the second signature information are obtained, the first digital currency’s The state is set to an available state, and the first digital currency is sent to the second account.

在本发明一个实施例中,通过解冻支付接口接收所述目标支付请求;所述处理模块304,还用于当通过所述解冻支付接口接收到第二反交易请求时,获取所述第一账户对应的第一签名信息和所述预支付请求对应的第二账户的第二签名信息;在获取到所述第一签名信息和所述第二签名信息的情况下,注销所述第二数字货币,并根据所述目标支付金额,更新所述第一数字货币。In an embodiment of the present invention, the target payment request is received through the unfreezing payment interface; the processing module 304 is further configured to acquire the first account when receiving the second reverse transaction request through the unfreezing payment interface The corresponding first signature information and the second signature information of the second account corresponding to the prepayment request; when the first signature information and the second signature information are obtained, cancel the second digital currency , and update the first digital currency according to the target payment amount.

根据本发明实施例的一种基于数字货币的支付平台可以看出,能够基于预配置的预支付缴存智能合约,使得与预支付金额对应的第一数字货币处于冻结状态,此时发起预支付请求的第一用户以及服务提供方对应的第二用户无法使用该第二数字货币。当接收到针对处于冻结状态的第一数字货币对应的目标支付请求时,根据预支付核销智能合约,对处于冻结状态的第一数字货币进行核销,生成与目标支付金额对应的第二数字货币,并将第二数字货币发送给服务提供方对应的第一账户,使得服务提供方可使用第二数字货币。由此,通过预支付智能合约,避免了服务提供方提前使用预支付的数字货币,提高了预支付场景的交易安全性。进一步地,还能撤销或取消未使用的预支付数字货币,使得未使用的预支付数字货币返回至第一用户对应的第二账户中,解决了现有的预支付场景下,用户无法针对预支付的货币进行退款的问题,从而进一步提高了预支付场景的交易安全性,保障了用户权益。According to a payment platform based on digital currency according to the embodiment of the present invention, it can be seen that based on the pre-configured pre-payment deposit smart contract, the first digital currency corresponding to the pre-payment amount is in a frozen state, and the pre-payment is initiated at this time The first requesting user and the second user corresponding to the service provider cannot use the second digital currency. When the target payment request corresponding to the first digital currency in the frozen state is received, the first digital currency in the frozen state is written off according to the prepayment write-off smart contract, and the second number corresponding to the target payment amount is generated Currency, and send the second digital currency to the first account corresponding to the service provider, so that the service provider can use the second digital currency. Therefore, through the prepayment smart contract, the service provider is prevented from using the prepaid digital currency in advance, and the transaction security of the prepayment scenario is improved. Furthermore, it is also possible to revoke or cancel the unused prepaid digital currency, so that the unused prepaid digital currency is returned to the second account corresponding to the first user, which solves the problem that in the existing prepayment scenario, the user cannot target the prepaid digital currency. The problem of refunding the paid currency further improves the transaction security of the pre-payment scenario and protects the rights and interests of users.

图4是根据本发明实施例的基于数字货币支付的第一终端的示意图。Fig. 4 is a schematic diagram of a first terminal based on digital currency payment according to an embodiment of the present invention.

如图4所示,本发明实施例的基于数字货币支付的第一终端400包括:预支付请求发送模块401、冻结货币存储模块402和目标支付请求发送模块403;其中,As shown in Figure 4, the first terminal 400 based on digital currency payment in the embodiment of the present invention includes: a prepayment request sending module 401, a frozen currency storage module 402 and a target payment request sending module 403; wherein,

所述预支付请求发送模块401,用于响应于第一触发,生成预支付请求,并向支付平台发送所述预支付请求;所述预支付请求指示了第二账户以及预支付金额;The prepayment request sending module 401 is configured to generate a prepayment request in response to the first trigger, and send the prepayment request to the payment platform; the prepayment request indicates a second account and a prepayment amount;

所述冻结货币存储模块402,用于接收与所述预支付金额对应的第一数字货币,并将处于冻结状态的第一数字货币存储于所述第二账户中;The frozen currency storage module 402 is configured to receive the first digital currency corresponding to the prepaid amount, and store the frozen first digital currency in the second account;

所述目标请求发送模块403,用于响应于第二触发,生成针对于所述第一数字货币的目标支付请求,并向所述支付平台发送所述目标支付请求。The target request sending module 403 is configured to generate a target payment request for the first digital currency in response to a second trigger, and send the target payment request to the payment platform.

在本发明一个实施例中,所述第一终端根据所述第二账户的第二签名信息,生成所述预支付请求和/或所述目标支付请求。In an embodiment of the present invention, the first terminal generates the prepayment request and/or the target payment request according to the second signature information of the second account.

在本发明一个实施例中,所述第一终端响应于所述支付平台对所述预支付请求和/或所述目标支付请求的反馈,向所述支付平台发送所述第二账户的第二签名信息。In an embodiment of the present invention, the first terminal sends the second account information of the second account to the payment platform in response to the payment platform's feedback on the prepayment request and/or the target payment request. signature information.

在本发明一个实施例中,所述第一终端获取与第一账户对应的支付标识或支付图像,以确定所述第一账户;根据所述第一账户以及所述第二触发,生成所述目标支付请求。In an embodiment of the present invention, the first terminal obtains the payment identification or payment image corresponding to the first account to determine the first account; according to the first account and the second trigger, the Target payment request.

在本发明一个实施例中,所述第一终端接收所述支付平台发送的预支付追缴提示,并展示所述预支付追缴提示;当接收到根据所述预支付追缴提示输入的追缴信息时,根据所述追缴信息包括的第一账户和第二账户,生成预支付追缴请求,并将所述预支付追缴请求发送给所述支付平台。In an embodiment of the present invention, the first terminal receives the prepayment recovery prompt sent by the payment platform, and displays the prepayment recovery prompt; when receiving the recovery information input according to the prepayment recovery prompt, A prepayment recovery request is generated according to the first account and the second account included in the recovery information, and the prepayment recovery request is sent to the payment platform.

图5是根据本发明实施例的一种基于数字货币的支付系统的示意图。Fig. 5 is a schematic diagram of a digital currency-based payment system according to an embodiment of the present invention.

如图5所示,本发明实施例的一种基于数字货币的支付系统500包括:上述任一实施例提供的支付平台300以及上述任一实施例提供的第一终端400。As shown in FIG. 5 , a payment system 500 based on digital currency in an embodiment of the present invention includes: the payment platform 300 provided in any of the above embodiments and the first terminal 400 provided in any of the above embodiments.

在本发明一个实施例中,该支付系统500还可以包括:第二终端501;其中,In an embodiment of the present invention, the payment system 500 may further include: a second terminal 501; wherein,

所述第二终端501,用于接收第二数字货币,并将所述第二数字货币存储于第一账户中。The second terminal 501 is configured to receive the second digital currency and store the second digital currency in the first account.

在本发明一个实施例中,所述第二终端501,用于响应于第三触发,生成针对于所述第一数字货币的目标支付请求,并向所述支付平台发送所述目标支付请求。可以理解的是,第三触发一般是由服务提供方(商户方)发起的。In an embodiment of the present invention, the second terminal 501 is configured to generate a target payment request for the first digital currency in response to a third trigger, and send the target payment request to the payment platform. It can be understood that the third trigger is generally initiated by the service provider (merchant side).

在本发明一个实施例中,所述第二终端501,用于接收所述支付平台发送的关于预支付追缴请求的支付信息,所述支付信息指示了第一账户、第二账户以及所述预支付追缴请求所指示的金额;根据所述支付信息,对所述预支付追缴请求进行校验,当校验通过时,向所述支付平台发送与第一户信息对应的第一签名信息。In an embodiment of the present invention, the second terminal 501 is configured to receive the payment information about the prepayment recovery request sent by the payment platform, and the payment information indicates the first account, the second account and the prepaid account. Pay the amount indicated by the recovery request; verify the prepayment recovery request according to the payment information, and send the first signature information corresponding to the first account information to the payment platform when the verification is passed.

下面将以支付系统的应用为例,对本发明实施例提供的基于数字货币的支付方法进行详细说明,如图6示出了该方法包括的主要步骤,图7示出了支付过程中数字货币的生成过程。如图6所示,该方法主要包括以下步骤:The following will take the application of the payment system as an example to describe the payment method based on digital currency provided by the embodiment of the present invention in detail. Figure 6 shows the main steps included in the method, and Figure 7 shows the payment method of digital currency in the payment process. build process. As shown in Figure 6, the method mainly includes the following steps:

步骤S601:第一终端根据消费者的第一触发,生成预支付请求,并将预支付请求发送给支付平台,所述预支付请求指示了第二账户以及预支付金额。Step S601: The first terminal generates a prepayment request according to the first trigger of the consumer, and sends the prepayment request to the payment platform. The prepayment request indicates the second account and the prepayment amount.

例如,预支付金额为10,第二账户中的数字货币均为可用状态的第三数字货币,该第三数字货币的可用面额为100。For example, the prepayment amount is 10, the digital currency in the second account is the third digital currency in available state, and the available denomination of the third digital currency is 100.

步骤S602,支付平台根据预支付请求、所述第二账户所对应的第三数字货币以及预配置的预支付缴存智能合约,生成与所述预支付金额对应的第一数字货币,所述第一数字货币的状态为冻结状态。Step S602, the payment platform generates the first digital currency corresponding to the prepayment amount according to the prepayment request, the third digital currency corresponding to the second account, and the pre-configured prepayment deposit smart contract, and the first digital currency corresponding to the prepayment amount. The status of a digital currency is frozen.

在此例中,支付平台将第二账户中面额为100的第三数字货币拆分为面额为10的第一数字货币以及面额为90的第四数字货币,其中,第一数字货币处于冻结状态,第四数字货币处于可用状态。In this example, the payment platform splits the third digital currency with a denomination of 100 in the second account into the first digital currency with a denomination of 10 and the fourth digital currency with a denomination of 90, wherein the first digital currency is in a frozen state , the fourth digital currency is available.

步骤S603:支付平台将第一数字货币发送给第一终端,使得第一终端将处于冻结状态的第一数字货币存储于第二账户中。Step S603: the payment platform sends the first digital currency to the first terminal, so that the first terminal stores the frozen first digital currency in the second account.

步骤S604:第一终端根据第一用户的第二触发,生成针对处于冻结状态的第一数字货币的目标支付请求,并将目标支付请求发送给支付平台,所述目标支付请求指示了目标支付金额。Step S604: The first terminal generates a target payment request for the frozen first digital currency according to the second trigger of the first user, and sends the target payment request to the payment platform, the target payment request indicating the target payment amount .

例如,目标支付金额为3。For example, the target payout amount is 3.

步骤S605:支付平台根据目标支付金额、所述第一数字货币以及预配置的预支付核销智能合约,生成与所述目标支付金额对应的第二数字货币。Step S605: The payment platform generates a second digital currency corresponding to the target payment amount according to the target payment amount, the first digital currency, and the pre-configured prepayment write-off smart contract.

在这里,支付平台根据预支付核销智能合约,根据面额为10的第一数字货币,生成面额为3的第二数字货币以及面额为7的新的第一数字货币,并可将第二数字货币的状态设置为通用状态,而新的第一数字货币仍保持冻结状态。Here, the payment platform generates a second digital currency with a denomination of 3 and a new first digital currency with a denomination of 7 based on the first digital currency with a denomination of 10 according to the prepayment verification smart contract, and can transfer the second digital currency The currency's status is set to Universal, while the new first digital currency remains frozen.

步骤S606:支付平台将第二数字货币发送给第二终端,使得第二终端将第二数字货币保存在第一账户中。Step S606: the payment platform sends the second digital currency to the second terminal, so that the second terminal stores the second digital currency in the first account.

可以理解的是,支付平台也会将新的第一数字货币发送给第一终端,使得处于冻结状态的第一数字货币仍然存储于第二账户中。当再次接收到新的目标支付请求时,该目标支付请求即针对新的第一数字货币,则可基于上述过程,继续对第一数字货币进行拆分,以根据预支付的数字货币进行消费。It can be understood that the payment platform will also send the new first digital currency to the first terminal, so that the frozen first digital currency is still stored in the second account. When a new target payment request is received again, the target payment request is for a new first digital currency, and based on the above process, the first digital currency can continue to be split to be consumed according to the prepaid digital currency.

在本发明实施例中,处于冻结状态的第一数字货币也可以存储在支付平台上或者第一账户中,在预付款的核销过程中,目标支付请求也可以由服务提供方发起,下面仍然参考图7所示的数字货币生成过程,对上述过程进行详细描述。如图8所示,该方法主要包括以下步骤:In the embodiment of the present invention, the frozen first digital currency may also be stored on the payment platform or in the first account, and during the write-off process of the prepayment, the target payment request may also be initiated by the service provider, the following is still The above process will be described in detail with reference to the digital currency generation process shown in FIG. 7 . As shown in Figure 8, the method mainly includes the following steps:

步骤S801:第一终端根据消费者的第一触发,生成预支付请求,并将预支付请求发送给支付平台,所述预支付请求指示了第二账户以及预支付金额。Step S801: The first terminal generates a prepayment request according to the first trigger of the consumer, and sends the prepayment request to the payment platform. The prepayment request indicates the second account and the prepayment amount.

例如,预支付金额为10,第二账户中的数字货币均为可用状态的第三数字货币,该第三数字货币的可用面额为100。For example, the prepayment amount is 10, the digital currency in the second account is the third digital currency in available state, and the available denomination of the third digital currency is 100.

步骤S802:支付平台根据预支付请求、所述第二账户所对应的第三数字货币以及预配置的预支付缴存智能合约,生成与所述预支付金额对应的第一数字货币,所述第一数字货币的状态为冻结状态。Step S802: The payment platform generates the first digital currency corresponding to the prepayment amount according to the prepayment request, the third digital currency corresponding to the second account, and the pre-configured prepayment deposit smart contract. The status of a digital currency is frozen.

在此例中,支付平台将第二账户中面额为100的第三数字货币拆分为面额为10的第一数字货币以及面额为90的第四数字货币,其中,第一数字货币处于冻结状态,第四数字货币处于可用状态。In this example, the payment platform splits the third digital currency with a denomination of 100 in the second account into the first digital currency with a denomination of 10 and the fourth digital currency with a denomination of 90, wherein the first digital currency is in a frozen state , the fourth digital currency is available.

步骤S803:支付平台将第一数字货币发送给第二终端,使得第二终端将处于冻结状态的第一数字货币存储于第一账户中。Step S803: the payment platform sends the first digital currency to the second terminal, so that the second terminal stores the frozen first digital currency in the first account.

可以理解的是,在生成第一数字货币之后,支付平台也可以将第一数字货币存储在本地,并向第一终端和/或第二终端发送已生成第一数字货币的通知。It can be understood that after the first digital currency is generated, the payment platform may also store the first digital currency locally, and send a notification that the first digital currency has been generated to the first terminal and/or the second terminal.

步骤S804:第二终端根据服务提供方的第三触发,生成针对处于冻结状态的第一数字货币的目标支付请求,并将目标支付请求发送给支付平台,所述目标支付请求指示了目标支付金额。Step S804: The second terminal generates a target payment request for the frozen first digital currency according to the third trigger of the service provider, and sends the target payment request to the payment platform, and the target payment request indicates the target payment amount .

例如,目标支付金额为3。For example, the target payout amount is 3.

步骤S805:支付平台根据目标支付金额、所述第一数字货币以及预配置的预支付核销智能合约,生成与所述目标支付金额对应的第二数字货币。Step S805: The payment platform generates a second digital currency corresponding to the target payment amount according to the target payment amount, the first digital currency, and the pre-configured prepayment write-off smart contract.

在这里,支付平台根据预支付核销智能合约,根据面额为10的第一数字货币,生成面额为3的第二数字货币以及面额为7的新的第一数字货币,并可将第二数字货币的状态设置为通用状态,而新的第一数字货币仍保持冻结状态。Here, the payment platform generates a second digital currency with a denomination of 3 and a new first digital currency with a denomination of 7 based on the first digital currency with a denomination of 10 according to the prepayment verification smart contract, and can transfer the second digital currency The currency's status is set to Universal, while the new first digital currency remains frozen.

步骤S806:支付平台将第二数字货币发送给第二终端,使得第二终端将第二数字货币保存在第一账户中。Step S806: the payment platform sends the second digital currency to the second terminal, so that the second terminal stores the second digital currency in the first account.

可以理解的是,支付平台也会将新的第一数字货币发送给第二终端,使得处于冻结状态的第二数字货币仍然存储于第一账户中。当再次接收到新的目标支付请求时,该目标支付请求即针对新的第一数字货币,则可基于上述过程,继续对第一数字货币进行拆分,以根据预支付的数字货币进行消费。It can be understood that the payment platform will also send the new first digital currency to the second terminal, so that the frozen second digital currency is still stored in the first account. When a new target payment request is received again, the target payment request is for a new first digital currency, and based on the above process, the first digital currency can continue to be split to be consumed according to the prepaid digital currency.

另外,在本发明实施例中,第一数字货币的存储方与目标支付请求的发起端之间不存在对应关系,例如,可以采用图6和图8所示的实施例实现预付款。除了图6和图8所示的实施例,在实现本发明实施例提供的支付方法时,当第一数字货币存储于第一终端时,也可由第二终端发起目标支付请求;当第一数字货币存储于第二终端时,也可以由第一终端发起目标支付请求;或者,当第一数字货币存储于支付平台时,可以又第一终端发起目标支付请求,也可以由第二终端发起目标支付请求。In addition, in the embodiment of the present invention, there is no corresponding relationship between the depositor of the first digital currency and the originator of the target payment request. For example, the embodiments shown in FIG. 6 and FIG. 8 can be used to realize prepayment. In addition to the embodiments shown in Figure 6 and Figure 8, when implementing the payment method provided by the embodiment of the present invention, when the first digital currency is stored in the first terminal, the second terminal can also initiate a target payment request; when the first digital currency When the currency is stored in the second terminal, the target payment request can also be initiated by the first terminal; or, when the first digital currency is stored in the payment platform, the target payment request can be initiated by the first terminal, or the target payment request can be initiated by the second terminal Payment request.

图9示出了可以应用本发明实施例的基于数字货币的支付方法或基于数字货币的支付系统的示例性系统架构900。FIG. 9 shows an exemplary system architecture 900 of a digital currency-based payment method or a digital currency-based payment system to which an embodiment of the present invention can be applied.

如图9所示,系统架构900可以包括终端设备901、902、903,网络904和服务器905。网络904用以在终端设备901、902、903和服务器905之间提供通信链路的介质。网络904可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。As shown in FIG. 9 , a system architecture 900 may include terminal devices 901 , 902 , and 903 , a network 904 and a server 905 . The network 904 is used as a medium for providing communication links between the terminal devices 901 , 902 , 903 and the server 905 . Network 904 may include various connection types, such as wires, wireless communication links, or fiber optic cables, among others.

用户可以使用终端设备901、902、903通过网络904与服务器905交互,以接收或发送消息等。终端设备901、902、903上可以安装有各种通讯客户端应用,例如购物类应用、网页浏览器应用、搜索类应用、即时通信工具、邮箱客户端、社交平台软件等。Users can use terminal devices 901, 902, 903 to interact with server 905 through network 904 to receive or send messages and the like. Various communication client applications can be installed on the terminal devices 901, 902, and 903, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, and the like.

终端设备901、902、903可以是具有显示屏并且支持网页浏览的各种电子设备,包括但不限于智能手机、平板电脑、膝上型便携计算机和台式计算机等等。The terminal devices 901, 902, and 903 may be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

服务器905可以是提供各种服务的服务器,例如对用户利用终端设备901、902、903所浏览的购物类网站提供支持的后台管理服务器。后台管理服务器可以对接收到的产品信息查询请求等数据进行分析等处理,并将处理结果反馈给终端设备。The server 905 may be a server that provides various services, such as a background management server that provides support for shopping websites browsed by users using the terminal devices 901 , 902 , and 903 . The background management server can analyze and process the received data such as product information query requests, and feed back the processing results to the terminal device.

应该理解,图9中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。It should be understood that the numbers of terminal devices, networks and servers in FIG. 9 are only illustrative. According to the implementation needs, there can be any number of terminal devices, networks and servers.

下面参考图10,其示出了适于用来实现本发明实施例的终端设备的计算机系统1000的结构示意图。图10示出的终端设备仅仅是一个示例,不应对本发明实施例的功能和使用范围带来任何限制。Referring now to FIG. 10 , it shows a schematic structural diagram of a computer system 1000 suitable for implementing a terminal device according to an embodiment of the present invention. The terminal device shown in FIG. 10 is only an example, and should not limit the functions and scope of use of this embodiment of the present invention.

如图10所示,计算机系统1000包括中央处理单元(CPU)1001,其可以根据存储在只读存储器(ROM)1002中的程序或者从存储部分1008加载到随机访问存储器(RAM)1003中的程序而执行各种适当的动作和处理。在RAM 1003中,还存储有系统1000操作所需的各种程序和数据。CPU 1001、ROM 1002以及RAM 1003通过总线1004彼此相连。输入/输出(I/O)接口1005也连接至总线1004。As shown in FIG. 10 , a computer system 1000 includes a central processing unit (CPU) 1001, which can operate according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage section 1008 into a random-access memory (RAM) 1003 Instead, various appropriate actions and processes are performed. In the RAM 1003, various programs and data necessary for the operation of the system 1000 are also stored. The CPU 1001 , ROM 1002 , and RAM 1003 are connected to each other via a bus 1004 . An input/output (I/O) interface 1005 is also connected to the bus 1004 .

以下部件连接至I/O接口1005:包括键盘、鼠标等的输入部分1006;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分1007;包括硬盘等的存储部分1008;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分1009。通信部分1009经由诸如因特网的网络执行通信处理。驱动器1010也根据需要连接至I/O接口1005。可拆卸介质1011,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器1010上,以便于从其上读出的计算机程序根据需要被安装入存储部分1008。The following components are connected to the I/O interface 1005: an input section 1006 including a keyboard, a mouse, etc.; an output section 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 1008 including a hard disk, etc. and a communication section 1009 including a network interface card such as a LAN card, a modem, or the like. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I/O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is mounted on the drive 1010 as necessary so that a computer program read therefrom is installed into the storage section 1008 as necessary.

特别地,根据本发明公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本发明公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分1009从网络上被下载和安装,和/或从可拆卸介质1011被安装。在该计算机程序被中央处理单元(CPU)1001执行时,执行本发明的系统中限定的上述功能。In particular, according to the disclosed embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the disclosed embodiments of the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, where the computer program includes program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication portion 1009 and/or installed from removable media 1011 . When this computer program is executed by a central processing unit (CPU) 1001, the above-described functions defined in the system of the present invention are performed.

需要说明的是,本发明所示的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本发明中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本发明中,计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、电线、光缆、RF等等,或者上述的任意合适的组合。It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. A computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present invention, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, in which computer-readable program codes are carried. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. . Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

附图中的流程图和框图,图示了按照本发明各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,上述模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图或流程图中的每个方框、以及框图或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or portion of code that includes one or more logical functions for implementing specified executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. It is also to be noted that each block in the block diagrams or flowchart illustrations, and combinations of blocks in the block diagrams or flowchart illustrations, can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a A combination of dedicated hardware and computer instructions.

描述于本发明实施例中所涉及到的模块可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的模块也可以设置在处理器中,例如,可以描述为:一种处理器包括预支付请求发送模块、冻结货币存储模块和目标支付请求发送模块。其中,这些模块的名称在某种情况下并不构成对该模块本身的限定,例如,请求接收模块还可以被描述为“接收针对处于冻结状态的第一数字货币的目标支付请求的模块”。The modules involved in the embodiments described in the present invention may be realized by software or by hardware. The described modules can also be set in a processor, for example, it can be described as: a processor includes a prepayment request sending module, a frozen currency storage module and a target payment request sending module. Wherein, the names of these modules do not constitute a limitation of the module itself under certain circumstances, for example, the request receiving module may also be described as "a module that receives a target payment request for the first digital currency that is in a frozen state".

作为另一方面,本发明还提供了一种计算机可读介质,该计算机可读介质可以是上述实施例中描述的设备中所包含的;也可以是单独存在,而未装配入该设备中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被一个该设备执行时,使得该设备包括:接收针对处于冻结状态的第一数字货币的目标支付请求,所述冻结状态的第一数字货币是基于预支付请求以及预配置的预支付缴存智能合约生成的;根据所述目标支付请求所指示的目标支付金额、所述第一数字货币以及预配置的预支付核销智能合约,生成与所述目标支付金额对应的第二数字货币;将所述第二数字货币发送给所述第一数字货币对应的第一账户。As another aspect, the present invention also provides a computer-readable medium. The computer-readable medium may be contained in the device described in the above embodiments, or it may exist independently without being assembled into the device. The above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by one of the devices, the device includes: receiving a target payment request for the first digital currency in a frozen state, the freezing The first digital currency in the state is generated based on the pre-payment request and the pre-configured pre-payment deposit smart contract; according to the target payment amount indicated by the target payment request, the first digital currency and the pre-configured pre-payment core Sell the smart contract to generate a second digital currency corresponding to the target payment amount; send the second digital currency to the first account corresponding to the first digital currency.

根据本发明实施例的技术方案,能够基于预配置的预支付缴存智能合约,使得与预支付金额对应的第一数字货币处于冻结状态,此时发起预支付请求的第一用户以及服务提供方对应的第二用户无法使用该第二数字货币。当接收到针对处于冻结状态的第一数字货币对应的目标支付请求时,根据预支付核销智能合约,对处于冻结状态的第一数字货币进行核销,生成与目标支付金额对应的第二数字货币,并将第二数字货币发送给服务提供方对应的第一账户,使得服务提供方可使用第二数字货币。由此,通过预支付智能合约,避免了服务提供方提前使用预支付的数字货币,提高了预支付场景的交易安全性。进一步地,还能撤销或取消未使用的预支付数字货币,使得未使用的预支付数字货币返回至第一用户对应的第二账户中,解决了现有的预支付场景下,用户无法针对预支付的货币进行退款的问题,从而进一步提高了预支付场景的交易安全性,保障了用户权益。According to the technical solution of the embodiment of the present invention, based on the pre-configured pre-payment deposit smart contract, the first digital currency corresponding to the pre-payment amount is in a frozen state. At this time, the first user who initiates the pre-payment request and the service provider The corresponding second user cannot use the second digital currency. When the target payment request corresponding to the first digital currency in the frozen state is received, the first digital currency in the frozen state is written off according to the prepayment write-off smart contract, and the second number corresponding to the target payment amount is generated Currency, and send the second digital currency to the first account corresponding to the service provider, so that the service provider can use the second digital currency. Therefore, through the prepayment smart contract, the service provider is prevented from using the prepaid digital currency in advance, and the transaction security of the prepayment scenario is improved. Furthermore, it is also possible to revoke or cancel the unused prepaid digital currency, so that the unused prepaid digital currency is returned to the second account corresponding to the first user, which solves the problem that in the existing prepayment scenario, the user cannot target the prepaid digital currency. The problem of refunding the paid currency further improves the transaction security of the pre-payment scenario and protects the rights and interests of users.

上述具体实施方式,并不构成对本发明保护范围的限制。本领域技术人员应该明白的是,取决于设计要求和其他因素,可以发生各种各样的修改、组合、子组合和替代。任何在本发明的精神和原则之内所作的修改、等同替换和改进等,均应包含在本发明保护范围之内。The above specific implementation methods do not constitute a limitation to the protection scope of the present invention. It should be apparent to those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims (33)

1.一种基于数字货币的支付方法,其特征在于,应用于支付平台;包括:1. A digital currency-based payment method, characterized in that it is applied to a payment platform; comprising: 接收针对处于冻结状态的第一数字货币的目标支付请求,所述冻结状态的第一数字货币是基于预支付请求以及预配置的预支付缴存智能合约生成的;receiving a target payment request for the first digital currency in the frozen state, the first digital currency in the frozen state is generated based on the prepayment request and the pre-configured prepayment deposit smart contract; 根据所述目标支付请求所指示的目标支付金额、所述第一数字货币以及预配置的预支付核销智能合约,生成与所述目标支付金额对应的第二数字货币;Generate a second digital currency corresponding to the target payment amount according to the target payment amount indicated by the target payment request, the first digital currency, and the pre-configured prepayment write-off smart contract; 将所述第二数字货币发送给所述第一数字货币对应的第一账户。Send the second digital currency to the first account corresponding to the first digital currency. 2.根据权利要求1所述的方法,其特征在于,2. The method of claim 1, wherein, 根据所述第一数字货币与所述第二数字货币的差额、以及所述预支付核销智能合约,生成新的处于冻结状态的第一数字货币。According to the difference between the first digital currency and the second digital currency and the prepayment write-off smart contract, a new frozen first digital currency is generated. 3.根据权利要求1或2所述的方法,其特征在于,还包括:3. The method according to claim 1 or 2, further comprising: 在接收到针对所述第一数字货币的取消请求的情况下,获取所述第一账户的第一签名信息和所述预支付请求对应的第二账户的第二签名信息;In the case of receiving a cancellation request for the first digital currency, acquiring first signature information of the first account and second signature information of a second account corresponding to the prepayment request; 在获取到所述第一签名信息和所述第二签名信息的情况下,将所述第一数字货币的状态设置为可用状态,并将所述第一数字货币发送给所述第二账户。When the first signature information and the second signature information are obtained, the state of the first digital currency is set to an available state, and the first digital currency is sent to the second account. 4.根据权利要求1所述的方法,其特征在于,在所述接收针对处于冻结状态的第一数字货币的目标支付请求之前,还包括:4. The method according to claim 1, further comprising: before receiving the target payment request for the first digital currency in a frozen state: 接收第一终端的预支付请求,所述预支付请求指示了第二账户以及预支付金额;receiving a prepayment request from the first terminal, the prepayment request indicating the second account and the prepayment amount; 根据所述预支付请求、所述第二账户所对应的第三数字货币以及预配置的预支付缴存智能合约,生成与所述预支付金额对应的第一数字货币,所述第一数字货币的状态为冻结状态。According to the prepayment request, the third digital currency corresponding to the second account, and the pre-configured prepayment deposit smart contract, a first digital currency corresponding to the prepayment amount is generated, and the first digital currency status is Frozen. 5.根据权利要求4所述的方法,其特征在于,所述预支付请求还指示了所述第一账户;5. The method according to claim 4, wherein the prepayment request also indicates the first account; 将所述预支付缴存智能合约和/或所述第一账户作为所述第一数字货币的字段写入所述第一数字货币。Writing the prepayment deposit smart contract and/or the first account into the first digital currency as a field of the first digital currency. 6.根据权利要求5所述的方法,其特征在于,6. The method of claim 5, wherein, 确定所述目标支付请求本次指示的账户是否与所述第一账户相同;Determine whether the account indicated by the target payment request this time is the same as the first account; 如果是,生成与所述目标支付金额对应的第二数字货币;If so, generating a second digital currency corresponding to the target payment amount; 如果否,拒绝所述目标支付请求。If not, deny the target payment request. 7.根据权利要求4所述的方法,其特征在于,所述预支付请求还指示了支付期限以及与所述支付期限对应的支付额度;还包括:7. The method according to claim 4, wherein the prepayment request also indicates a payment term and a payment amount corresponding to the payment term; further comprising: 在监测到当前时间满足所述支付期限的情况下,根据所述支付额度以及所述预支付核销智能合约,生成与所述支付额度对应的第二数字货币,并将与所述支付额度对应的第二数字货币发送给所述第一账户。When it is detected that the current time meets the payment deadline, according to the payment amount and the prepayment write-off smart contract, a second digital currency corresponding to the payment amount is generated and will be corresponding to the payment amount The second digital currency of is sent to the first account. 8.根据权利要求2所述的方法,其特征在于,8. The method of claim 2, wherein, 将所述预支付核销智能合约作为所述新的处于冻结状态的第一数字货币的字段写入所述第一数字货币。Writing the prepayment write-off smart contract into the first digital currency as a field of the new first digital currency in a frozen state. 9.根据权利要求3所述的方法,其特征在于,在所述取消请求为第一终端发送的撤销请求的情况下,还包括:9. The method according to claim 3, further comprising: when the cancellation request is a cancellation request sent by the first terminal: 根据预配置的预支付撤销智能合约,确定所述第一数字货币是否可撤销;determining whether the first digital currency is revocable according to the pre-configured pre-payment revocation smart contract; 如果是,获取所述第一签名信息和所述第二签名信息;If yes, acquiring the first signature information and the second signature information; 如果否,拒绝所述撤销请求。If not, the revocation request is denied. 10.根据权利要求9所述的方法,其特征在于,在生成所述第二数字货币之后,还包括:10. The method according to claim 9, further comprising: after generating the second digital currency: 利用自身的第三签名信息,对所述第一数字货币进行签名,并根据签名后的所述第一数字货币、所述第二签名信息以及所述预支付缴存智能合约,生成并存储第一预支付交易信息。Use its own third signature information to sign the first digital currency, and generate and store the first digital currency according to the signed first digital currency, the second signature information and the prepayment deposit smart contract 1. Prepaid transaction information. 11.根据权利要求10所述的方法,其特征在于,所述预支付请求还指示了场景标识和/或业务标识;11. The method according to claim 10, wherein the prepayment request also indicates a scene ID and/or a service ID; 根据所述第一数字货币和所述第二签名信息、所述预支付缴存智能合约以及所述场景标识和/或业务标识,生成所述第一预支付交易信息。The first prepayment transaction information is generated according to the first digital currency and the second signature information, the prepayment deposit smart contract, and the scenario identifier and/or service identifier. 12.根据权利要求11所述的方法,其特征在于,在所述目标支付请求还指示场景标识和/或业务标识的情况下,还包括:12. The method according to claim 11, further comprising: when the target payment request also indicates a scene ID and/or a service ID: 确定所述目标支付请求本次指示的场景标识和/或业务标识是否分别与所述第一预支付交易信息指示的场景标识和/或业务标识相同;Determine whether the scenario identifier and/or service identifier indicated by the target payment request this time are the same as the scenario identifier and/or service identifier indicated by the first prepayment transaction information; 如果是,生成与所述目标支付金额对应的第二数字货币;If so, generating a second digital currency corresponding to the target payment amount; 如果否,拒绝所述目标支付请求。If not, deny the target payment request. 13.根据权利要求1所述的方法,其特征在于,还包括:13. The method of claim 1, further comprising: 确定所述目标支付请求是否包括所述目标支付请求的发送端的签名信息,如果是,生成与所述目标支付金额对应的第二数字货币。Determine whether the target payment request includes the signature information of the sender of the target payment request, and if yes, generate a second digital currency corresponding to the target payment amount. 14.根据权利要求10所述的方法,其特征在于,还包括:14. The method of claim 10, further comprising: 根据所述预支付核销智能合约、所述发送端的签名信息、自身的第三签名信息以及所述第一数字货币和第二数字货币的差额,生成第二预支付交易信息。Generate second prepayment transaction information according to the prepayment write-off smart contract, the signature information of the sender, its own third signature information, and the difference between the first digital currency and the second digital currency. 15.根据权利要求4所述的方法,其特征在于,所述根据所述预支付请求、所述第二账户所对应的第三数字货币以及预配置的预支付缴存智能合约,生成与所述预支付金额对应的第一数字货币,包括:15. The method according to claim 4, characterized in that, according to the prepayment request, the third digital currency corresponding to the second account, and the pre-configured prepayment deposit smart contract, a The first digital currency corresponding to the above prepaid amount, including: 确定所述第二账户中的第三数字货币以及所述第三数字货币的可用面额;determining a third digital currency in the second account and an available denomination of the third digital currency; 根据所述可用面额与所述预支付金额的大小,确定所述第一数字货币的生成方式,并根据所述生成方式生成与所述预支付金额对应的第一数字货币。A generation method of the first digital currency is determined according to the available denomination and the prepayment amount, and the first digital currency corresponding to the prepayment amount is generated according to the generation method. 16.根据权利要求15所述的方法,其特征在于,当所述可用面额大于所述预支付金额时,确定所述生成方式为拆分所述第三数字货币;16. The method according to claim 15, characterized in that, when the available denomination is greater than the prepaid amount, it is determined that the generation method is to split the third digital currency; 将所述第三数字货币拆分为所述第一数字货币和第四数字货币,所述第一数字货币的面额和所述第四数字货币的面额之和与所述可用面额相等,且所述第四数字货币的状态为可用状态,并注销所述第三数字货币。Splitting the third digital currency into the first digital currency and the fourth digital currency, the sum of the denominations of the first digital currency and the fourth digital currency is equal to the available denomination, and the The status of the fourth digital currency is usable, and the third digital currency is canceled. 17.根据权利要求1所述的方法,其特征在于,还包括:17. The method of claim 1, further comprising: 将所述第一数字货币冻结于所述第一账户或所述预支付请求对应的第二账户或支付平台中;freezing the first digital currency in the first account or the second account or payment platform corresponding to the prepayment request; 和/或,and / or, 将所述第二数字货币设置为可用状态之后,将处于可用状态的第二数字货币发送给所述第一账户。After the second digital currency is set to be available, the second digital currency in the available state is sent to the first account. 18.根据权利要求1所述的方法,其特征在于,还包括:18. The method of claim 1, further comprising: 当确定出所述第一数字货币的面额小于所述目标支付金额的情况下,向发起所述预支付请求的第一终端发送预支付追缴提示。When it is determined that the denomination of the first digital currency is less than the target payment amount, a prepayment recovery reminder is sent to the first terminal that initiated the prepayment request. 19.根据权利要求18所述的方法,其特征在于,还包括:19. The method of claim 18, further comprising: 当接收到所述第一终端根据所述预支付追缴提示发送的预支付追缴请求时,校验所述预支付追缴请求所指示的第一账户、第二账户是否为空,如果否,获取所述第一账户的第一签名信息以及所述第二账户的第二签名信息;When receiving the prepayment recovery request sent by the first terminal according to the prepayment recovery prompt, check whether the first account and the second account indicated by the prepayment recovery request are empty, and if not, obtain the The first signature information of the first account and the second signature information of the second account; 在获取到所述第一签名信息和所述第二签名信息的情况下,根据预配置的预支付追缴智能合约、所述预支付追缴请求所指示的金额、所述第一数字货币,生成新的处于冻结状态的第一数字货币。When the first signature information and the second signature information are acquired, according to the pre-configured prepayment recovery smart contract, the amount indicated by the prepayment recovery request, and the first digital currency, a new The first digital currency in a frozen state. 20.根据权利要求1所述的方法,其特征在于,还包括:20. The method of claim 1, further comprising: 接收终止指令;receive termination instructions; 根据所述终止指令以及预配置的预支付终止智能合约,将所述第一数字货币的状态设置为可用状态,并将所述第一数字货币发送给所述预支付请求对应的第二账户;以及According to the termination instruction and the pre-configured pre-payment termination smart contract, the state of the first digital currency is set to an available state, and the first digital currency is sent to the second account corresponding to the pre-payment request; as well as 向发起所述预支付请求的第一终端以及所述第一账户对应的第二终端发送预支付终止提示信息。Sending prepayment termination prompt information to the first terminal that initiated the prepayment request and the second terminal corresponding to the first account. 21.根据权利要求1所述的方法,其特征在于,通过冻结支付接口接收所述预支付请求;还包括:21. The method according to claim 1, wherein the prepayment request is received through a freezing payment interface; further comprising: 当通过所述冻结支付接口接收到第一反交易请求时,获取所述第一账户的第一签名信息和所述预支付请求对应的第二账户的第二签名信息;When a first reverse transaction request is received through the frozen payment interface, acquiring first signature information of the first account and second signature information of a second account corresponding to the prepayment request; 在获取到所述第一签名信息和所述第二签名信息的情况下,将所述第一数字货币的状态设置为可用状态,并将所述第一数字货币发送给所述第二账户。When the first signature information and the second signature information are obtained, the state of the first digital currency is set to an available state, and the first digital currency is sent to the second account. 22.根据权利要求1所述的方法,其特征在于,通过解冻支付接口接收所述目标支付请求;还包括:22. The method according to claim 1, wherein the target payment request is received through the unfreezing payment interface; further comprising: 当通过所述解冻支付接口接收到第二反交易请求时,获取所述第一账户对应的第一签名信息和所述预支付请求对应的第二账户的第二签名信息;When a second reverse transaction request is received through the unfreezing payment interface, acquiring the first signature information corresponding to the first account and the second signature information of the second account corresponding to the prepayment request; 在获取到所述第一签名信息和所述第二签名信息的情况下,注销所述第二数字货币,并根据所述目标支付金额,更新所述第一数字货币。When the first signature information and the second signature information are obtained, cancel the second digital currency, and update the first digital currency according to the target payment amount. 23.一种基于数字货币的支付方法,其特征在于,应用于第一终端;包括:23. A payment method based on digital currency, characterized in that it is applied to the first terminal; comprising: 响应于第一触发,生成预支付请求,并向支付平台发送所述预支付请求;所述预支付请求指示了第二账户以及预支付金额;In response to the first trigger, generate a prepayment request, and send the prepayment request to the payment platform; the prepayment request indicates the second account and the prepayment amount; 接收与所述预支付金额对应的第一数字货币,并将处于冻结状态的第一数字货币存储于所述第二账户中;receiving the first digital currency corresponding to the prepaid amount, and storing the frozen first digital currency in the second account; 响应于第二触发,生成针对于所述第一数字货币的目标支付请求,并向所述支付平台发送所述目标支付请求。In response to the second trigger, generate a target payment request for the first digital currency, and send the target payment request to the payment platform. 24.根据权利要求23所述的方法,其特征在于,还包括:24. The method of claim 23, further comprising: 根据所述第二账户的第二签名信息,生成所述预支付请求和/或所述目标支付请求;generating the prepayment request and/or the target payment request according to the second signature information of the second account; 和/或,and / or, 响应于所述支付平台对所述预支付请求和/或所述目标支付请求的反馈,向所述支付平台发送所述第二账户的第二签名信息。In response to the payment platform's feedback on the prepayment request and/or the target payment request, send the second signature information of the second account to the payment platform. 25.根据权利要求23所述的方法,其特征在于,还包括:25. The method of claim 23, further comprising: 获取与第一账户对应的支付标识或支付图像,以确定所述第一账户;Obtaining a payment identification or a payment image corresponding to the first account to determine the first account; 根据所述第一账户以及所述第二触发,生成所述目标支付请求。Generate the target payment request according to the first account and the second trigger. 26.根据权利要求25所述的方法,其特征在于,还包括:26. The method of claim 25, further comprising: 接收所述支付平台发送的预支付追缴提示,并展示所述预支付追缴提示;receiving the prepayment recovery prompt sent by the payment platform, and displaying the prepayment recovery prompt; 当接收到根据所述预支付追缴提示输入的追缴信息时,根据所述追缴信息包括的第一账户和第二账户,生成预支付追缴请求,并将所述预支付追缴请求发送给所述支付平台。When receiving the recovery information input according to the prompt for recovery of prepayment, generate a request for recovery of prepayment according to the first account and second account included in the recovery information, and send the request for recovery of prepayment to the payment platform. 27.一种基于数字货币的支付平台,其特征在于,包括:请求接收模块、核销模块以及货币发送模块;其中,27. A payment platform based on digital currency, characterized in that it includes: a request receiving module, a verification module and a currency sending module; wherein, 所述请求接收模块,用于接收针对处于冻结状态的第一数字货币的目标支付请求,所述冻结状态的第一数字货币是基于预支付请求以及预配置的预支付缴存智能合约生成的;The request receiving module is configured to receive a target payment request for the first digital currency in the frozen state, the first digital currency in the frozen state is generated based on the prepayment request and the pre-configured prepayment deposit smart contract; 所述核销模块,用于根据所述目标支付请求所指示的目标支付金额、所述第一数字货币以及预配置的预支付核销智能合约,生成与所述目标支付金额对应的第二数字货币;The write-off module is configured to generate a second number corresponding to the target payment amount according to the target payment amount indicated by the target payment request, the first digital currency, and the pre-configured pre-payment write-off smart contract currency; 所述货币发送模块,用于将所述第二数字货币发送给所述第一数字货币对应的第一账户。The currency sending module is configured to send the second digital currency to the first account corresponding to the first digital currency. 28.一种基于数字货币支付的第一终端,其特征在于,包括:预支付请求发送模块、冻结货币存储模块和目标支付请求发送模块;其中,28. A first terminal based on digital currency payment, characterized in that it includes: a prepayment request sending module, a frozen currency storage module and a target payment request sending module; wherein, 所述预支付请求发送模块,用于响应于第一触发,生成预支付请求,并向支付平台发送所述预支付请求;所述预支付请求指示了第二账户以及预支付金额;The prepayment request sending module is configured to generate a prepayment request in response to the first trigger, and send the prepayment request to the payment platform; the prepayment request indicates the second account and the prepayment amount; 所述冻结货币存储模块,用于接收与所述预支付金额对应的第一数字货币,并将处于冻结状态的第一数字货币存储于所述第二账户中;The frozen currency storage module is configured to receive the first digital currency corresponding to the prepaid amount, and store the frozen first digital currency in the second account; 所述目标请求发送模块,用于响应于第二触发,生成针对于所述第一数字货币的目标支付请求,并向所述支付平台发送所述目标支付请求。The target request sending module is configured to generate a target payment request for the first digital currency in response to a second trigger, and send the target payment request to the payment platform. 29.一种基于数字货币的支付系统,其特征在于,包括:权利要求27所述的支付平台以及权利要求28所述的第一终端。29. A payment system based on digital currency, comprising: the payment platform as claimed in claim 27 and the first terminal as claimed in claim 28. 30.根据权利要求29所述的支付系统,其特征在于,还包括:第二终端;其中,30. The payment system according to claim 29, further comprising: a second terminal; wherein, 所述第二终端,用于接收第二数字货币,并将所述第二数字货币存储于第一账户中;The second terminal is used to receive a second digital currency and store the second digital currency in the first account; 和/或,and / or, 所述第二终端,用于响应于第三触发,生成针对于所述第一数字货币的目标支付请求,并向所述支付平台发送所述目标支付请求。The second terminal is configured to generate a target payment request for the first digital currency in response to a third trigger, and send the target payment request to the payment platform. 31.根据权利要求30所述的支付系统,其特征在于,31. The payment system of claim 30, wherein: 所述第二终端,用于接收所述支付平台发送的关于预支付追缴请求的支付信息,所述支付信息指示了第一账户、第二账户以及所述预支付追缴请求所指示的金额;The second terminal is configured to receive payment information about the prepayment recovery request sent by the payment platform, the payment information indicating the first account, the second account, and the amount indicated in the prepayment recovery request; 根据所述支付信息,对所述预支付追缴请求进行校验,当校验通过时,向所述支付平台发送与第一账户的第一签名信息。According to the payment information, the prepayment recovery request is verified, and when the verification is passed, the first signature information with the first account is sent to the payment platform. 32.一种基于数字货币支付的电子设备,其特征在于,包括:32. An electronic device based on digital currency payment, comprising: 一个或多个处理器;one or more processors; 存储装置,用于存储一个或多个程序,storage means for storing one or more programs, 当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-22、23-26中任一所述的方法。When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1-22, 23-26. 33.一种计算机可读介质,其上存储有计算机程序,其特征在于,所述程序被处理器执行时实现如权利要求1-22、23-26任一所述的方法。33. A computer-readable medium, on which a computer program is stored, wherein, when the program is executed by a processor, the method according to any one of claims 1-22, 23-26 is implemented.
CN202110668332.7A 2021-06-16 2021-06-16 Payment method, platform, terminal and payment system based on digital currency Pending CN115564413A (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN202110668332.7A CN115564413A (en) 2021-06-16 2021-06-16 Payment method, platform, terminal and payment system based on digital currency
EP22824009.9A EP4358000A4 (en) 2022-05-20 Digital currency-based payment method, platform, terminal, and payment system
PCT/CN2022/094113 WO2022262527A1 (en) 2021-06-16 2022-05-20 Digital currency-based payment method, platform, terminal, and payment system
US18/571,214 US20240281802A1 (en) 2021-06-16 2022-05-20 Digital Currency-Based Payment Method, Platform and System, and Terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110668332.7A CN115564413A (en) 2021-06-16 2021-06-16 Payment method, platform, terminal and payment system based on digital currency

Publications (1)

Publication Number Publication Date
CN115564413A true CN115564413A (en) 2023-01-03

Family

ID=84737845

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110668332.7A Pending CN115564413A (en) 2021-06-16 2021-06-16 Payment method, platform, terminal and payment system based on digital currency

Country Status (1)

Country Link
CN (1) CN115564413A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105096118A (en) * 2015-08-21 2015-11-25 廖小谦 Electronic currency transfer payment system and method
US20190205870A1 (en) * 2017-12-29 2019-07-04 Ebay Inc. Stored value smart contracts on a blockchain
CN110163595A (en) * 2019-04-24 2019-08-23 吉林大学珠海学院 Pre-payment consumption management method, system and storage medium based on block chain
KR20190118090A (en) * 2018-04-09 2019-10-17 주식회사 제니엘맥 Product payment system that provides prepayment function using electronic cash
CN110533410A (en) * 2019-07-30 2019-12-03 河南兄弟科技发展有限公司 A kind of method of payment
CN111325538A (en) * 2020-02-19 2020-06-23 福建瑞达精工股份有限公司 A payment method and digital watch payment system based on blockchain digital currency

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105096118A (en) * 2015-08-21 2015-11-25 廖小谦 Electronic currency transfer payment system and method
US20190205870A1 (en) * 2017-12-29 2019-07-04 Ebay Inc. Stored value smart contracts on a blockchain
KR20190118090A (en) * 2018-04-09 2019-10-17 주식회사 제니엘맥 Product payment system that provides prepayment function using electronic cash
CN110163595A (en) * 2019-04-24 2019-08-23 吉林大学珠海学院 Pre-payment consumption management method, system and storage medium based on block chain
CN110533410A (en) * 2019-07-30 2019-12-03 河南兄弟科技发展有限公司 A kind of method of payment
CN111325538A (en) * 2020-02-19 2020-06-23 福建瑞达精工股份有限公司 A payment method and digital watch payment system based on blockchain digital currency

Similar Documents

Publication Publication Date Title
US12407518B2 (en) Transactions between services in a multi-tenant architecture
CN110612546B (en) Methods and devices for digital asset account management
US10592985B2 (en) Systems and methods for a commodity contracts market using a secure distributed transaction ledger
US8856043B2 (en) Method and system for managing data and enabling payment transactions between multiple entities
US20200258152A1 (en) Systems and methods for storage of cryptocurrencies and transactions thereof
US20230222463A1 (en) Transfers using credit accounts
CN112334933A (en) Blockchain transaction processing
US20170078493A1 (en) Cryptographically managing telecommunications settlement
JP2019523495A (en) Digital goods management in a distributed transaction consensus network
US20250055683A1 (en) Systems and methods for dynamically updating metadata during blockchain functions
WO2022262527A1 (en) Digital currency-based payment method, platform, terminal, and payment system
US12141793B2 (en) Systems and methods for generating variable non-fungible tokens linked to designated off-chain computer resources for use in secure encrypted, communications across disparate computer network
CN111784341A (en) Block chain transaction method and device, electronic equipment and storage medium
CN105474244A (en) Payment unification service
EP4562881A1 (en) Systems and methods for transacting over a network
US12256029B2 (en) Systems and methods for integrating blockchain functions and external systems for use in secure encrypted, communications across disparate computer network
JP7550402B2 (en) Escrow processing method, system, and program using virtual currency
CN115564413A (en) Payment method, platform, terminal and payment system based on digital currency
CN116012006A (en) Digital currency-based payment method, platform and payment system
US20240311811A1 (en) Web3 transfer protocol
US20240311810A1 (en) Web3 transfer protocol
CN111127006A (en) Transaction processing method and system based on block chain
US20250232272A1 (en) Person-to-person transfers
US20250200560A1 (en) Single cash balance
US20140201059A1 (en) Prepaid multinational program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination