CN108921542B - Offline payment method, payment end, collection end and storage medium for digital assets - Google Patents

Offline payment method, payment end, collection end and storage medium for digital assets Download PDF

Info

Publication number
CN108921542B
CN108921542B CN201810543449.0A CN201810543449A CN108921542B CN 108921542 B CN108921542 B CN 108921542B CN 201810543449 A CN201810543449 A CN 201810543449A CN 108921542 B CN108921542 B CN 108921542B
Authority
CN
China
Prior art keywords
utxo
payment
consumption record
offline
offline payment
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.)
Active
Application number
CN201810543449.0A
Other languages
Chinese (zh)
Other versions
CN108921542A (en
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.)
China Merchants Bank Co Ltd
Original Assignee
China Merchants Bank Co Ltd
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 China Merchants Bank Co Ltd filed Critical China Merchants Bank Co Ltd
Priority to CN201810543449.0A priority Critical patent/CN108921542B/en
Publication of CN108921542A publication Critical patent/CN108921542A/en
Application granted granted Critical
Publication of CN108921542B publication Critical patent/CN108921542B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/32Payment architectures, schemes or protocols characterised by the use of specific devices or networks using wireless devices
    • G06Q20/327Short range or proximity payments by means of M-devices
    • G06Q20/3276Short range or proximity payments by means of M-devices using a pictured code, e.g. barcode or QR-code, being read by the M-device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/32Payment architectures, schemes or protocols characterised by the use of specific devices or networks using wireless devices
    • G06Q20/327Short range or proximity payments by means of M-devices
    • G06Q20/3278RFID or NFC payments by means of M-devices

Abstract

The invention provides an offline payment method for digital assets, which comprises the following steps: when the payment end receives an offline payment instruction, generating a corresponding UTXO consumption record according to the offline payment instruction and the local UTXO; sending the UTXO consumption record to a collection end; when receiving the confirmation information returned by the collection end, updating the UTXO according to the UTXO consumption record to obtain a secondary UTXO, and storing the UTXO consumption record into an information base to be processed; and when the connection with the transaction server is successful, synchronizing the UTXO consumption record in the information base to be processed to the transaction server so as to update the personal digital asset account of the payment terminal. The invention also provides a payment end, a collection end and a storage medium. The invention solves the technical problem that the mobile terminal can not carry out off-line payment when the network state is poor or no network exists.

Description

Offline payment method, payment end, collection end and storage medium for digital assets
Technical Field
The invention relates to the technical field of terminals, in particular to an offline payment method, a payment end, a collection end and a storage medium for digital assets.
Background
With the development of terminal technology, mobile payment has become an important payment mode in daily life. At present, most mobile payment schemes in the market adopt an online payment mode, and the online payment can be used only by connecting terminal equipment with a network. However, the disadvantage of this payment method is obvious, and when the user is in an environment with poor network conditions, even without a network (such as a subway, a remote mountain area, etc.), the user cannot pay, which brings inconvenience to the user.
Disclosure of Invention
The invention mainly aims to provide an offline payment method, a payment end, a collection end and a storage medium for digital assets, and aims to solve the technical problem that mobile payment cannot be carried out when the network state is poor or no network exists.
In order to achieve the above object, the present invention provides an offline payment method for a digital asset, the offline payment method for a digital asset being applied to a payment terminal, the payment terminal locally storing at least one unconsumed transaction output UTXO, the offline payment method for a digital asset comprising the following steps:
when an offline payment instruction is received, generating a corresponding UTXO consumption record according to the offline payment instruction and the UTXO, wherein the offline payment instruction comprises a collection address of a collection end, and the UTXO consumption record comprises payment end identity information;
sending the UTXO consumption record to the payment receiving end according to the payment receiving address;
when receiving the confirmation information returned by the collection end, updating the UTXO according to the UTXO consumption record to obtain a secondary UTXO, and storing the UTXO consumption record into an information base to be processed;
and when the connection with the transaction server is successful, synchronizing the UTXO consumption record in the information base to be processed to the transaction server so as to update the personal digital asset account of the payment terminal.
Further, after the step of updating the UTXO according to the UTXO consumption record to obtain a secondary UTXO when receiving the confirmation information returned by the payee, and storing the UTXO consumption record in the information base to be processed, the method further includes:
when a secondary off-line payment instruction is received, judging whether the UTXO consumption record is synchronized to the transaction server;
if the UTXO consumption record is synchronized to the transaction server, allowing secondary offline payment by using the secondary UTXO;
and if the UTXO consumption record is not synchronized to the transaction server, refusing to use the secondary UTXO to carry out secondary off-line payment.
Further, the method for paying the digital assets offline further comprises the following steps:
when the connection with the transaction server is successful, if an online payment request is received, judging whether an unsynchronized UTXO consumption record exists in the information base to be processed;
and if the unsynchronized UTXO consumption record exists in the information base to be processed, synchronizing the unsynchronized UTXO consumption record to the transaction server, and performing online payment when synchronization is completed.
Further, the step of generating a corresponding UTXO consumption record according to the offline payment instruction and the UTXO when the offline payment instruction is received further includes:
when an offline payment instruction is received, judging whether the payment amount included in the offline payment instruction is smaller than a preset payment threshold value or not, and/or judging whether the receiving times of the offline payment instruction of the payment terminal in a preset period is smaller than a preset receiving threshold value or not;
and if the payment amount is smaller than a preset payment threshold value and/or the receiving times of the offline payment instruction are smaller than a preset receiving threshold value, generating a corresponding UTXO consumption record according to the offline payment instruction and the UTXO.
In addition, in order to achieve the above object, the present invention further provides an offline payment method for a digital asset, where the offline payment method for a digital asset is applied to a cash register, and the offline payment method for a digital asset includes the following steps:
when receiving a UTXO consumption record sent by a payment end, verifying whether the payment end is credible according to the payment end identity information included in the UTXO consumption record;
if the payment end is credible, returning corresponding confirmation information to the payment end, and storing the UTXO consumption record into an information base to be processed;
and when the connection with the transaction server is successful, synchronizing the UTXO consumption record in the information base to be processed to the transaction server so as to update the personal digital asset account of the cash register.
Further, after the step of synchronizing the UTXO consumption record in the to-be-processed information base to the transaction server for updating the personal digital asset account at the checkout terminal when the connection with the transaction server is successful, the method further includes:
and generating a corresponding billed UTXO according to the synchronized UTXO consumption record.
In addition, to achieve the above object, the present invention further provides a payer, where at least one UTXO is locally stored in the payer, and the payer further includes a processor, a memory, and an offline payment program stored in the memory and executable by the processor, where the offline payment program, when executed by the processor, implements the steps of the offline payment method applied to the digital asset of the payer.
In addition, in order to achieve the above object, the present invention further provides a payment receiving end, further comprising a processor, a memory, and an offline payment program stored on the memory and executable by the processor, wherein the offline payment program, when executed by the processor, implements the steps of the offline payment method applied to the digital asset at the payment receiving end as described above.
In addition, to achieve the above object, the present invention further provides a storage medium having an offline payment program stored thereon, wherein the offline payment program, when executed by a processor, implements the steps of the offline payment method applied to the digital asset at the payer end as described above.
In addition, to achieve the above object, the present invention further provides a storage medium having an offline payment program stored thereon, wherein the offline payment program, when executed by a processor, implements the steps of the offline payment method applied to the digital asset at the checkout.
The payment terminal can realize off-line payment operation and payment record through the locally stored asset information, and update and change the digital asset account according to the related payment record when the network is recovered, so that the problem that mobile payment cannot be carried out when the network state is poor or no network exists is solved, convenience is provided for the work and life of a user, and the use experience of the user is improved.
Drawings
Fig. 1 is a schematic diagram of a hardware structure of a payment terminal according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a first embodiment of the method for offline payment of digital assets in accordance with the present invention;
FIG. 3 is a diagrammatic illustration of local storage at the payor side prior to transfer as is contemplated by the embodiment of FIG. 2;
FIG. 4 is a schematic illustration of the local storage of the payor involved in the embodiment of FIG. 2 after transfer and prior to synchronization;
FIG. 5 is a schematic illustration of the local storage of the payor after synchronization according to the embodiment shown in FIG. 2;
FIG. 6 is a schematic flow chart of a second embodiment of the method for offline payment of digital assets in accordance with the present invention;
FIG. 7 is a schematic illustration of the local storage at the receiving end prior to transfer according to the embodiment of FIG. 6;
FIG. 8 is a schematic illustration of the local storage at the receiving end after transfer and before synchronization in accordance with the embodiment of FIG. 6;
fig. 9 is a schematic diagram of the local storage of the receiving end after synchronization according to the embodiment shown in fig. 6.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The offline payment method for the digital assets, provided by the embodiment of the invention, is mainly applied to a payment end, wherein the payment end can be a mobile terminal such as a mobile phone, an intelligent bracelet, a tablet personal computer and wearable equipment.
Referring to fig. 1, fig. 1 is a schematic diagram of a hardware structure of a payment terminal according to an embodiment of the present invention. In the embodiment of the present invention, the payment terminal may include a processor 1001 (e.g., a Central Processing Unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used for realizing connection communication among the components; the user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard); the network interface 1004 may optionally include a standard wired interface, a WIreless interface (e.g., a WI-FI interface, WI-FI interface); the memory 1005 may be a Random Access Memory (RAM) or a non-volatile memory (non-volatile memory), such as a magnetic disk memory, and the memory 1005 may optionally be a storage device independent of the processor 1001. Those skilled in the art will appreciate that the hardware configuration depicted in FIG. 1 is not intended to be limiting of the present invention, and may include more or less components than those shown, or some components in combination, or a different arrangement of components.
With continued reference to fig. 1, memory 1005 of fig. 1, which is one type of computer-readable storage medium, may include an operating system, a network communication module, and an offline payment program. In fig. 1, the network communication module is mainly used for connecting the transaction server and other mobile terminals for data communication; and the processor 1001 may call the offline payment program stored in the memory 1005 and perform the following steps:
when an offline payment instruction is received, generating a corresponding UTXO consumption record according to the offline payment instruction and a locally stored UTXO, wherein the offline payment instruction comprises a collection address of a collection end, and the UTXO consumption record comprises payment end identity information;
sending the UTXO consumption record to the payment receiving end according to the payment receiving address;
when receiving the confirmation information returned by the collection end, updating the UTXO according to the UTXO consumption record to obtain a secondary UTXO, and storing the UTXO consumption record into an information base to be processed;
and when the connection with the transaction server is successful, synchronizing the UTXO consumption record in the information base to be processed to the transaction server so as to update the personal digital asset account of the payment terminal.
Further, the processor 1001 may also call an offline payment program stored in the memory 1005, and perform the following steps:
when a secondary off-line payment instruction is received, judging whether the UTXO consumption record is synchronized to the transaction server;
if the UTXO consumption record is synchronized to the transaction server, allowing secondary offline payment by using the secondary UTXO;
and if the UTXO consumption record is not synchronized to the transaction server, refusing to use the secondary UTXO to carry out secondary off-line payment.
Further, the processor 1001 may also call an offline payment program stored in the memory 1005, and perform the following steps:
when the connection with the transaction server is successful, if an online payment request is received, judging whether an unsynchronized UTXO consumption record exists in the information base to be processed;
and if the unsynchronized UTXO consumption record exists in the information base to be processed, synchronizing the unsynchronized UTXO consumption record to the transaction server, and performing online payment when synchronization is completed.
Further, the step of generating a corresponding UTXO consumption record according to the offline payment instruction and the UTXO when the offline payment instruction is received includes:
when an offline payment instruction is received, judging whether the payment amount included in the offline payment instruction is smaller than a preset payment threshold value or not, and/or judging whether the receiving times of the offline payment instruction of the payment terminal in a preset period is smaller than a preset receiving threshold value or not;
and if the payment amount is smaller than a preset payment threshold value and/or the receiving times of the offline payment instruction are smaller than a preset receiving threshold value, generating a corresponding UTXO consumption record according to the offline payment instruction and the UTXO.
The insurance application method provided by the embodiment of the invention is also applied to a collection end, and the collection end can be a mobile phone, an intelligent bracelet, a tablet personal computer, wearable equipment and the like.
As for the hardware structure of the payment end, the above hardware structure of the payment end may be referred to, that is, the payment end may include a processor (e.g., CPU), a communication bus, a user interface, a network interface, and a memory. The functions of the processor (e.g., CPU), communication bus, user interface, network interface are similar to those of the corresponding parts in the payment terminal. For the memory part, an operating system, a network communication module and an offline payment program are included; the operating system of the collection end can be the same as that of the payment end, or different operating systems can be adopted; the network communication module is mainly used for connecting the transaction server and other mobile terminals to carry out data communication; and the processor may invoke an offline payment program stored in the memory 1005 and perform the following steps:
when receiving a UTXO consumption record sent by a payment end, verifying whether the payment end is credible according to the payment end identity information included in the UTXO consumption record;
if the payment end is credible, returning corresponding confirmation information to the payment end, and storing the UTXO consumption record into an information base to be processed;
and when the connection with the transaction server is successful, synchronizing the UTXO consumption record in the information base to be processed to the transaction server so as to update the personal digital asset account of the cash register.
Further, the processor may also invoke an offline payment program stored in the memory 1005 and perform the following steps:
and generating a corresponding billed UTXO according to the synchronized UTXO consumption record.
Based on the hardware structures of the payment end and the collection end, the invention provides various embodiments of the off-line payment method of the digital asset.
The embodiment of the invention provides an offline payment method for digital assets.
Referring to fig. 2, fig. 2 is a schematic flow chart of a first embodiment of the method for offline payment of digital assets according to the present invention.
In this embodiment, the offline payment method for digital assets is applied to a payment end, where at least one unconsumed transaction output UTXO is locally stored in the payment end, and the offline payment method for digital assets includes the following steps:
step S10, when receiving an off-line payment instruction, generating a corresponding UTXO consumption record according to the off-line payment instruction and the UTXO, wherein the off-line payment instruction comprises a collection address of a collection end, and the UTXO consumption record comprises payment end identity information.
With the development of terminal technology, mobile payment has become an important payment mode in daily life. At present, most mobile payment schemes in the market adopt an online payment mode, and the online payment can be used only by connecting terminal equipment with a network. However, the disadvantage of this payment method is obvious, and when the user is in an environment with poor network conditions, even without a network (such as a subway, a remote mountain area, etc.), the user cannot pay, which brings inconvenience to the user. In contrast, the present embodiment proposes an offline payment scheme for digital assets, in which a mobile terminal may locally store part of asset information, and perform offline payment using the local asset information to perform payment transaction.
In this embodiment, for convenience of description, the payment end for payment may be referred to as an a end, and the collection end for collection may be referred to as a B end; both the a-side and the B-side are described by taking a mobile phone as an example. When the A-side network is normal and the connection with the transaction server is successful, the personal digital asset account information of the A-side can be checked through the digital asset wallet client installed at the A-side, and the personal digital asset account information is synchronized in the whole network. Meanwhile, an unconsumed Transaction Output (UTXO) is also stored locally at the a end, and the UTXO represents a part of assets in the personal digital asset account; in the embodiment, when performing offline transaction, only the UTXO is used for performing offline transaction, that is, the UTXO may also be regarded as an offline transaction asset at the a-end. It should be noted that the a-side may store only one UTXO, or may store more than two UTXOs (where "more than" includes the same number, the same below), and the amount of money represented by each UTXO may be different; for example, as shown in fig. 3, fig. 3 is a schematic diagram of local storage before the end a transfers in this embodiment, and before the offline payment starts, 4 UTXOs, respectively denoted as UTXOs, are stored in the local UTXO list of the end aA1、UTXOA2、UTXOA3And UTXOA4The represented amounts are 1000 yuan, 2000 yuan, 3000 yuan and 4000 yuan respectively; in addition, a pending information base is also set in the a-side, and the pending information base can be used to store transaction records, wherein the functions of the UTXO and the pending information base are explained in the following embodiments.
In this embodiment, when the payment user needs to pay the B-side through the a-side in an offline state (i.e. without using a network or connecting to a transaction server), the payment user may operate at the a-side by scanning a two-dimensional code provided by the B-side or by NFC (Nea)r Field Communication, short-range wireless Communication technology), or bluetooth, wireless hotspot, etc., to establish a point-to-point Communication connection with the B-side, and trigger an offline payment instruction to input a related payment amount. When the B-side establishes a point-to-point communication connection, the a-side also acquires a communication address, namely a collection address, of the B-side, and the collection address exists in the offline payment instruction. When the A end receives the off-line payment instruction, a local UTXO table is inquired according to the payment amount in the off-line payment instruction so as to obtain the relevant information of the UTXO, and then one or more than two UTXOs are selected for transferring accounts; when one or more UTXOs are selected, the A end generates a corresponding UTXO consumption record according to the selected UTXOs and the off-line payment instruction, and the consumption record comprises the change condition of the selected UTXO after payment. For example, in this embodiment, when the a side wants to pay 3500 yuan to the B side offline, in the UTXO list shown in fig. 3, a selects to use the UTXOA4And generates UTXOA4May be represented in the form of a4 → B4+ a5 (i.e. representing 4 UTXO)A4→UTXOB4+UTXOA5) Wherein UTXOA5The representative amount is 500 yuan, UTXOB4The represented amount is 3500 yuan; meanwhile, for the consumption record, the a-side also adds identity information (such as a signature, a certificate and the like) of the a-side to prove the identity of the payer of the a-side. Of course, the consumption record can also be added with other contents according to the actual use condition.
Further, when the B-side establishes a peer-to-peer communication connection, the a-side may also obtain identity information (such as a certificate, a signature, etc.) of the B-side; the terminal A firstly verifies the terminal B according to the identity information and judges whether the terminal B is credible or not; and if the end B is credible, the end A can generate a corresponding UTXO consumption record according to the offline payment instruction and the UTXO.
Step S20, the UTXO consumption record is sent to the collection end according to the collection address;
in this embodiment, UTXO is obtainedA4When the consumption record is recorded, the A end obtains the collection address of the B end; the collection address can be the communication of the B end when the A end and the B end establish the point-to-point connectionAn address. When the collection address is obtained, the A end can make the UTXOA4The consumption record is sent to the B terminal for the B terminal to confirm. At this time, the UTXOA4The consumption record of (2) can also be regarded as a transaction request sent by the terminal a to the terminal B, so that part of the assets in the personal digital asset account of the terminal a are transferred to the personal digital asset account of the terminal B. The B terminal receives the UTXOA4When the consumption record is carried out, the identity of the A end is verified according to the identity information of the A end, and whether the A end is credible or not is judged; of course, for the operation user at the B-side, it can also be determined whether the payment amount meets the requirement of the agreement. When the terminal B confirms that the identity of the terminal a is authentic, corresponding confirmation information (the confirmation information also contains the identity information of the terminal B for the terminal a to verify the identity of the terminal B) is returned to the terminal a to indicate that payment is confirmed.
Step S30, when receiving the confirmation information returned by the collection end, updating the UTXO according to the UTXO consumption record, obtaining a secondary UTXO, and storing the UTXO consumption record into an information base to be processed;
in this embodiment, when the terminal a receives the confirmation information returned by the terminal B, the UTXO in the UTXO list may be updated according to the confirmation informationA4Replace it with UTXOA5(i.e. quadratic UTXO), where UTXOA5The represented amount is 500 yuan; at the same time, the A end can also convert UTXOA4The consumption record of the terminal a is stored in the information base to be processed of the terminal a, as shown in fig. 4 specifically, fig. 4 is a schematic view of local storage after the terminal a transfers and before synchronization in this embodiment. At this time, the UTXOs in the local UTXO list of the A terminal are UTXOs respectivelyA1、UTXOA2、UTXOA3And UTXOA5. At this time, it can be considered that the offline payment from the terminal a to the terminal B is completed, and both parties have met the payment acceptance and have performed corresponding records.
And step S40, when the connection with the transaction server is successful, synchronizing the UTXO consumption record in the information base to be processed to the transaction server so as to update the personal digital asset account of the payment terminal.
In this embodiment, although the agreement of payment between the a side and the B side is achieved and the corresponding record is made, the record is not madeThe personal asset condition of the transaction server (or the digital asset network) is not changed because the transaction server is not synchronized with the transaction server, and for this reason, when the A end recovers the connection with the transaction server, the A end needs to use the UTXO in the information base to be processedA4Synchronizing the consumption record to the transaction server such that the transaction server is responsive to the UTXOA4And updating the account condition of the personal digital assets at the A end by the consumption record. When the A end is completing UTXOA4The UTXO can be synchronized when consumption records are synchronizedA4Specifically, as shown in fig. 5, fig. 5 is a schematic diagram of local storage of the end a of this embodiment after UTXO consumption record synchronization; certainly, the A terminal does not need to use the UTXOA4The consumption record is deleted but its synchronization status is marked. In addition, the transaction server updates the personal digital asset account of the A end according to the UTXO, and simultaneously updates the personal digital asset of the B end; of course, it is also possible to update only the digital asset information of the a-side. In practice, in order to ensure the orderliness of the digital asset network and avoid the occurrence of fraud, when the end a is in UTXO synchronization with the transaction server, the identity information of the end a and the identity information of the end B are often required to be sent to the transaction server together; the transaction server will update the personal digital asset account only after verifying the identity of the receiving end, the validity of the identity of the paying end and the validity of the UTXO to be synchronized according to the identity information.
Further, if the A end is in UTXO state by consuming UTXOA4Make off-line payment and make UTXOA4Update replacement to UTXOA5Then, in order to reduce the potential danger caused by multiple off-line asset transactions and ensure the asset security of each user, the newly generated UTXO is usedA5(secondary UTXO) will have some off-line usage restrictions on it. Specifically, the A terminal obtains UTXOA5And UTXOA4After the consumption record is stored in the information base to be processed, if the off-line payment instruction is received again, the A end judges UTXO in the information base to be processed firstlyA4Whether the consumption record has been synchronized to the transaction server; if the UTXO is presentA4The consumption record has been synchronized to the transaction server,then the UTXO can be considered to beA5Has been approved and recorded by the transaction server, and is now permitted to use the UTXOA5Performing off-line payment, wherein the specific off-line payment process can refer to UTXOA4The consuming process is not described herein; if the UTXO is not presentA4If the consumption record is not synchronized to the transaction server, the UTXO is consideredA5Not approved and recorded by the transaction server, at this time, in order to ensure the asset security of each user, the A terminal refuses to use the UTXOA5Making payments offline, i.e. defining UTXOA5When the terminal A is used offline, the terminal A uses other UTXOs to carry out offline payment, or directly returns an offline payment function locking prompt.
Furthermore, in order to reduce the potential danger caused by offline payment and ensure the asset security of each user, after the A end recovers the network, the online payment function of the A end can be limited, so that the A end can synchronize the UTXO consumption records in time. Specifically, the A terminal obtains UTXOA5And UTXOA4After storing the consumption record into the information base to be processed, if the connection between the A end and the transaction server is successful and the online payment request is received under the condition of successful connection with the transaction server, the A end firstly judges whether any consumption record (including but not limited to UTXO) which is not synchronized to the server exists in the information base to be processedA4Consumption records); if any unsynchronized consumption records are stored in the information base to be processed, the A end firstly synchronizes the unsynchronized UTXO consumption records to the transaction server so as to update the personal account, and online payment is carried out according to the online payment request when synchronization is completed, so that the online payment function after offline payment is limited, and the safety of the digital asset account is protected.
In this embodiment, when receiving an offline payment instruction, a payer generates a corresponding UTXO consumption record according to the offline payment instruction and a local UTXO, where the offline payment instruction includes a payee address of a payee, and the UTXO consumption record includes payer identity information; sending the UTXO consumption record to the payment receiving end according to the payment receiving address; when receiving the confirmation information returned by the collection end, updating the UTXO according to the UTXO consumption record to obtain a secondary UTXO, and storing the UTXO consumption record into an information base to be processed; and when the connection with the transaction server is successful, synchronizing the UTXO consumption record in the information base to be processed to the transaction server so as to update the personal digital asset account of the payment terminal. Through the mode, the payment terminal can realize offline payment operation and payment records through locally stored asset information, update and change of a digital asset account are completed according to related payment records when a network is recovered, the problem that mobile payment cannot be carried out when the network state is poor or no network exists is solved, convenience is provided for work and life of a user, and use experience of the user is improved.
Further, in the first embodiment of the offline payment method for digital assets shown in fig. 2, the step S10 further includes:
step S11, when receiving an offline payment instruction, judging whether the payment amount included in the offline payment instruction is smaller than a preset payment threshold value, and/or judging whether the receiving times of the offline payment instruction of the payment terminal in a preset period is smaller than a preset receiving threshold value;
and step S12, if the payment amount is less than a preset payment threshold value and/or the number of times of receiving the offline payment instruction is less than a preset receiving threshold value, generating a corresponding UTXO consumption record according to the offline payment instruction and the UTXO.
In this embodiment, in order to reduce the potential risk caused by offline payment and ensure the asset security of each user, the read-write permission of the UTXO in the mobile payment terminal (a terminal) may be controlled, so as to limit the offline payment to a certain extent.
Specifically, in this embodiment, the amount of offline payment may be limited. When the end a receives an offline payment instruction, firstly, according to the payment amount included in the offline payment instruction, judging whether the payment amount is smaller than a preset payment threshold value, wherein the preset payment threshold value can be preset by a transaction server and synchronized to each payment end (of course, the transaction server can also set different preset payment threshold values for different payment ends), or can be set by an owner of the end a; if the payment amount is smaller than a preset payment threshold value, the terminal A considers that the offline payment meets the requirement, and the terminal A generates a corresponding UTXO consumption record according to the offline payment instruction and the local UTXO and performs subsequent offline payment steps; and if the payment amount is equal to or greater than the preset payment threshold, the terminal a considers that the offline payment does not meet the requirements, which may cause a dangerous situation, and at this time, the terminal a will not execute each step of the offline payment and perform a corresponding safety prompt. Of course, while the use of the offline payment function is controlled and limited by taking the payment amount as a dimension, the preset payment threshold may be a single safe payment threshold during single payment, or an accumulated safe payment threshold for multiple payments, or a combination of the safe payment threshold for single payment and the accumulated safe payment threshold for multiple payments, so as to control and limit the use of the offline payment function.
In addition, in this embodiment, the number of times of using the offline payment function may be limited. When the terminal a receives the offline payment instruction, firstly counting the number of times that the terminal a receives the offline payment instruction in a preset period, and then judging whether the number of times that the offline payment instruction is received is less than a preset receiving threshold, wherein the preset period and the preset receiving threshold can be preset by the transaction server and synchronized to each mobile payment terminal (of course, the transaction server can also set different preset periods and/or preset receiving thresholds for different mobile payment terminals), or can be set by the terminal a owner; if the receiving times of the offline payment instruction of the end A in the preset period is smaller than the preset receiving threshold, the end A considers that the offline payment meets the requirement, and the end A generates a corresponding UTXO consumption record according to the offline payment instruction and the local UTXO and carries out subsequent offline payment steps; and if the receiving times of the offline payment instruction of the end A in the preset period are equal to or greater than the preset receiving threshold, the end A considers that the offline payment does not meet the requirements, possibly causing dangerous conditions, and the end A does not execute each step of the offline payment at the moment and carries out corresponding safety prompt.
It should be noted that, in the implementation, the above two manners may be combined or combined with other offline payment limiting manners to protect the asset security of each user.
Referring to fig. 6, fig. 6 is a flowchart illustrating a second embodiment of the offline payment method for digital assets according to the present invention.
The offline payment method in this embodiment is applied to a payee, and the offline payment method for digital assets includes the following steps:
step S50, when receiving UTXO consumption record sent by the payment end, verifying whether the payment end is credible according to the payment end identity information included in the UTXO consumption record;
in this embodiment, the payment end for payment may be referred to as the a end, and the collection end for collection may be referred to as the B end; for the basic configuration of the a end and the description of the function thereof, reference may be made to the embodiment shown in fig. 2, which is not described herein again. Referring to fig. 7 for the B-side, fig. 7 is a schematic diagram illustrating the storage of the B-side before receiving the offline transfer of the a-side, where the B-side also locally stores a UTXO list, and the UTXO list is used to record UTXO information of the B-side, where the UTXO list includes UTXO informationB1、UTXOB2And UTXOB3(ii) a In addition, a pending information base is also arranged in the B terminal, and the pending information base can be used for storing transaction records. When the A end uses its local UTXOA4When the offline payment is started to the B-side (the offline payment process of the a-side may refer to the embodiment shown in fig. 2), the corresponding UTXO is sent to the B-sideA4Consumption record, wherein the UTXOA4The consumption record includes identity information of the a-side (e.g., signature, certificate, etc. of the a-side). The B terminal receives the UTXOA4When the record is consumed, whether the A end is credible (such as whether the signature of the A end is correct) is verified according to the identity information in the record; certainly, the B terminal can also be according to the UTXOA4And displaying the corresponding payment amount according to the consumption record so that an operation user at the B terminal can judge whether the payment amount meets the requirement of agreement.
Step S60, if the payment end is credible, returning corresponding confirmation information to the payment end, and storing the UTXO consumption record into a to-be-processed information base;
in this embodiment, when the terminal B determines that the terminal a is authentic, it returns corresponding confirmation information to the terminal a to indicate confirmation of payment; in addition, the B terminal can also use the UTXOA4The consumption record is stored in the local to-be-processed information base of the B-side, as shown in fig. 8 specifically, fig. 8 is a schematic view of local storage after the transfer and before the synchronization of the B-side in this embodiment. Certainly, the end B needs to judge UTXO while judging the identity of the end a is authenticA4The consumption record shows that the corresponding payment amount is correct, and the corresponding confirmation information is returned. At this time, it can be considered that the offline payment from the terminal a to the terminal B is completed, and both parties have met the payment acceptance and have performed corresponding records. The confirmation information returned by the B-side may further include identity information (such as a signature and a certificate of the B-side) of the B-side, so that the a-side can verify the identity of the B-side according to the identity information, or whether the confirmation information is sent by the B-side.
And step S70, synchronizing the UTXO consumption record in the information base to be processed to the transaction server when the connection with the transaction server is successful, so as to update the personal digital asset account of the cash register.
In this embodiment, although the end a and the end B have agreed the payment and performed the corresponding record, the record is not synchronized with the transaction server, so the personal digital asset condition of the transaction server (or the digital asset network) is not changed, and for this reason, when the end B recovers the connection with the transaction server, the end B needs to connect the UTXO in the information base to be processedA4Synchronizing the consumption record to the transaction server such that the transaction server is responsive to the UTXOA4And updating the personal digital asset account condition of the B terminal by the consumption record. In addition, the transaction server updates the personal digital asset account of the terminal B according to the UTXO, and simultaneously updates the personal digital asset of the terminal A; or only the digital asset information of the B terminal can be updated. In practice, in order to ensure the orderliness of the digital asset network and avoid the occurrence of fraud, when the a-side performs UTXO synchronization in the transaction server, the identity information of the a-side and the identity of the B-side often need to be trustedThe information is jointly sent to a transaction server; the transaction server will update the personal digital asset account after verifying the identity of the receiving end, the validity of the identity of the paying end and the validity of the UTXO to be synchronized according to the identity information.
Further, UTXO is completed at the B endA4Upon synchronization of the consumption records, a corresponding UTXO may also be generated in the local UTXO listB4(ii) a At the same time, for UTXO in the information base to be processedA4The consumption record may be deleted by the B-side, specifically as shown in fig. 9, and fig. 9 is a schematic diagram of the B-side locally storing the UTXO consumption record after synchronization. Of course, after the B-side synchronizes the UTXO consumption records, the synchronization status of the UTXO consumption records may be marked without deleting the UTXO consumption records.
It should be noted that, in the off-line payment process between the a side and the B side, after the UTXO consumption record is processed, the processing of the local UTXOs has certain differences. For the A end, which is used as a payment end, after the A end receives the confirmation information of the B end, even if the A end is not connected with the transaction server at present, the A end can update the local UTXO according to the UTXO consumption record (the original UTXO is used for updating the UTXO)A4Updated to UTXOA5) (ii) a For the B end, it is used as the receiving end, when the B end returns the confirmation information to the A end, the corresponding entry UTXO (UTXO) is not generated locally immediatelyB4) Instead, the UTXO needs to be synchronized to the transaction server to locally generate a corresponding posted UTXO. Therefore, if the end a is a cheating party and the end B is cheated, the end B can generate the corresponding posting UTXO after synchronization with the server and is used for offline payment, so that the cheating condition of the end a can be timely found when the server is synchronized, and the posting UTXO is immediately generated and is used for offline payment when the end B is not used for offline payment with the end a (a cheater), so that the multi-party victimization condition caused by single cheating is avoided, and the danger range caused by cheating is reduced.
In a specific implementation, the terminal a and the terminal B may exist as different roles in different offline payment occasions. For example, in the above off-line payment process between the terminal a and the terminal B, the terminal a is used as a payment terminal, and the terminal B is used as a payment terminal; when the terminal A carries out off-line payment with the terminal C of the other mobile terminal, the terminal A can be used as a collection terminal; similarly, when the terminal B performs offline payment with the terminal D of another mobile terminal, the terminal B may be used as a payment terminal.
In addition, the embodiment of the invention also provides a storage medium.
The storage medium of the present invention stores an offline payment program, wherein the offline payment program, when executed by a processor, implements the steps of the offline payment method applied to the digital assets of the payers as described above.
The method for implementing the offline payment program when executed may refer to various embodiments of the offline payment method for digital assets of the present invention, and will not be described herein again.
In addition, the embodiment of the invention also provides a storage medium.
The storage medium of the present invention stores an offline payment program, wherein the offline payment program, when executed by a processor, implements the steps of the offline payment method as applied to the digital asset at the checkout.
The method for implementing the offline payment program when executed may refer to various embodiments of the offline payment method for digital assets of the present invention, and will not be described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. An off-line payment method for a digital asset, wherein the off-line payment method for the digital asset is applied to a payment terminal, and at least one unconsumed transaction output UTXO is locally stored in the payment terminal, and the off-line payment method for the digital asset comprises the following steps:
when an offline payment instruction is received, generating a corresponding UTXO consumption record according to the offline payment instruction and the UTXO, wherein the offline payment instruction comprises a collection address of a collection end, and the UTXO consumption record comprises payment end identity information;
sending the UTXO consumption record to the payment receiving end according to the payment receiving address;
when receiving the confirmation information returned by the collection end, updating the UTXO according to the UTXO consumption record to obtain a secondary UTXO, and storing the UTXO consumption record into an information base to be processed;
and when the connection with the transaction server is successful, synchronizing the UTXO consumption record in the information base to be processed to the transaction server so as to update the personal digital asset account of the payment terminal.
2. The method for offline payment of a digital asset according to claim 1, wherein after the steps of updating said UTXO according to said UTXO consumption record, obtaining a secondary UTXO, and storing said UTXO consumption record in a pending information base upon receiving the confirmation information returned by said checkout terminal, further comprising:
when a secondary off-line payment instruction is received, judging whether the UTXO consumption record is synchronized to the transaction server;
if the UTXO consumption record is synchronized to the transaction server, allowing secondary offline payment by using the secondary UTXO;
and if the UTXO consumption record is not synchronized to the transaction server, refusing to use the secondary UTXO to carry out secondary off-line payment.
3. The method for offline payment of a digital asset according to claim 1, wherein said method for offline payment of a digital asset further comprises the steps of:
when the connection with the transaction server is successful, if an online payment request is received, judging whether an unsynchronized UTXO consumption record exists in the information base to be processed;
and if the unsynchronized UTXO consumption record exists in the information base to be processed, synchronizing the unsynchronized UTXO consumption record to the transaction server, and performing online payment when synchronization is completed.
4. A method of offline payment of a digital asset according to any of claims 1 to 3 wherein said step of generating a corresponding UTXO consumption record upon receipt of an offline payment instruction from said offline payment instruction and said UTXO comprises:
when an offline payment instruction is received, judging whether the payment amount included in the offline payment instruction is smaller than a preset payment threshold value or not, and/or judging whether the receiving times of the offline payment instruction of the payment terminal in a preset period is smaller than a preset receiving threshold value or not;
and if the payment amount is smaller than a preset payment threshold value and/or the receiving times of the offline payment instruction are smaller than a preset receiving threshold value, generating a corresponding UTXO consumption record according to the offline payment instruction and the UTXO.
5. An off-line payment method for a digital asset, which is applied to a cash receiving end, and comprises the following steps:
the local of the payment end at least stores one unconsumed transaction output UTXO;
when the payment end receives an off-line payment instruction, generating a corresponding UTXO consumption record according to the off-line payment instruction and the UTXO;
when receiving a UTXO consumption record sent by a payment end, verifying whether the payment end is credible according to the payment end identity information included in the UTXO consumption record;
if the payment end is credible, returning corresponding confirmation information to the payment end, and storing the UTXO consumption record into an information base to be processed;
and when the connection with the transaction server is successful, synchronizing the UTXO consumption record in the information base to be processed to the transaction server so as to update the personal digital asset account of the cash register.
6. The method for offline payment of digital assets according to claim 5, wherein said step of synchronizing the UTXO consumption record storage in said pending information base to said transaction server upon successful connection with said transaction server to update said payee's personal asset account further comprises:
and generating a corresponding billed UTXO according to the synchronized UTXO consumption record.
7. A payer, characterized in that at least one UTXO is locally stored at the payer, and that the payer further comprises a processor, a memory, and an offline payment program stored on the memory and executable by the processor, wherein the offline payment program, when executed by the processor, implements the steps of the offline payment method of the digital asset as claimed in any one of claims 1 to 4.
8. A checkout terminal further comprising a processor, a memory, and an offline payment program stored on the memory and executable by the processor, wherein the offline payment program, when executed by the processor, performs the steps of the method of offline payment of a digital asset as claimed in any one of claims 5 to 6.
9. A storage medium having stored thereon an offline payment program, wherein the offline payment program, when executed by a processor, implements the steps of the method of offline payment of a digital asset as claimed in any one of claims 1 to 4.
10. A storage medium having stored thereon an offline payment program, wherein the offline payment program, when executed by a processor, implements the steps of the method of offline payment of a digital asset as claimed in any one of claims 5 to 6.
CN201810543449.0A 2018-05-30 2018-05-30 Offline payment method, payment end, collection end and storage medium for digital assets Active CN108921542B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810543449.0A CN108921542B (en) 2018-05-30 2018-05-30 Offline payment method, payment end, collection end and storage medium for digital assets

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810543449.0A CN108921542B (en) 2018-05-30 2018-05-30 Offline payment method, payment end, collection end and storage medium for digital assets

Publications (2)

Publication Number Publication Date
CN108921542A CN108921542A (en) 2018-11-30
CN108921542B true CN108921542B (en) 2021-09-28

Family

ID=64419830

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810543449.0A Active CN108921542B (en) 2018-05-30 2018-05-30 Offline payment method, payment end, collection end and storage medium for digital assets

Country Status (1)

Country Link
CN (1) CN108921542B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109636383A (en) * 2018-12-19 2019-04-16 中移电子商务有限公司 A kind of digital asset off-network method of commerce, system, a kind of off line wallet and terminal
CN109783502B (en) * 2018-12-28 2021-03-23 汉海信息技术(上海)有限公司 Settlement method, device and system supporting multi-terminal login and server
CN110288337A (en) * 2019-06-11 2019-09-27 深圳市微付充科技有限公司 Method of mobile payment, mobile terminal, server and device
CN110428261A (en) * 2019-08-06 2019-11-08 广州市鑫澳康科技有限公司 The method quasi real time consumed is realized on device end, can be realized the device end quasi real time consumed and system
CN111062717B (en) * 2019-12-11 2023-11-03 财付通支付科技有限公司 Data transfer processing method, device and computer readable storage medium
CN111259022A (en) * 2020-01-13 2020-06-09 京东方科技集团股份有限公司 Information synchronization method, synchronization system, computer equipment and medium
CN111275430B (en) * 2020-01-16 2021-03-19 深圳市深圳通有限公司 Two-dimensional code display method and device, terminal and computer readable storage medium
CN112102050A (en) * 2020-02-10 2020-12-18 云池网络科技(上海)有限公司 Financial management system of Internet of things card platform
CN112232790B (en) * 2020-09-23 2023-10-20 中国银联股份有限公司 Data transfer processing method, device, equipment and medium
CN113052599A (en) * 2021-03-31 2021-06-29 中国人民银行数字货币研究所 Method, device, equipment and system for generating, verifying and storing transaction certificate
CN113627927A (en) * 2021-08-03 2021-11-09 支付宝(杭州)信息技术有限公司 Offline payment method and system
CN113807840A (en) * 2021-09-03 2021-12-17 刘高峰 Method, server and system for supporting local payment by multiple payment terminals of same user

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106980975A (en) * 2017-02-24 2017-07-25 济南汉泰信息科技有限公司 A kind of method of payment, system and intelligent terminal
CN107230079A (en) * 2016-03-25 2017-10-03 中国人民银行印制科学技术研究所 The method and system of offline electronic payment are carried out using digital cash chip card
WO2017187395A1 (en) * 2016-04-29 2017-11-02 nChain Holdings Limited A method and system for controlling the performance of a contract using a distributed hash table and a peer-to-peer distributed ledger
CN107578238A (en) * 2017-08-08 2018-01-12 阿里巴巴集团控股有限公司 A kind of risk control method and equipment
CN108090761A (en) * 2017-11-10 2018-05-29 杭州云象网络技术有限公司 Block chain token method of payment based on credible two-dimension code

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107230079A (en) * 2016-03-25 2017-10-03 中国人民银行印制科学技术研究所 The method and system of offline electronic payment are carried out using digital cash chip card
WO2017187395A1 (en) * 2016-04-29 2017-11-02 nChain Holdings Limited A method and system for controlling the performance of a contract using a distributed hash table and a peer-to-peer distributed ledger
CN106980975A (en) * 2017-02-24 2017-07-25 济南汉泰信息科技有限公司 A kind of method of payment, system and intelligent terminal
CN107578238A (en) * 2017-08-08 2018-01-12 阿里巴巴集团控股有限公司 A kind of risk control method and equipment
CN108090761A (en) * 2017-11-10 2018-05-29 杭州云象网络技术有限公司 Block chain token method of payment based on credible two-dimension code

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于UTXO 和区块链的资金穿透记账系统;张若雪等;《上海金融》;20180430(第4期);第42-47页 *

Also Published As

Publication number Publication date
CN108921542A (en) 2018-11-30

Similar Documents

Publication Publication Date Title
CN108921542B (en) Offline payment method, payment end, collection end and storage medium for digital assets
US11429947B2 (en) Systems and methods for transaction pre-authentication
CN110612546B (en) Method and apparatus for digital asset account management
JP5595434B2 (en) Information processing server, information processing method, information processing program, and recording medium on which information processing program is recorded
EP3079326B1 (en) Network payment method, apparatus and system
CN108596619B (en) Transaction method, device, central node and system for blockchain system
US20170221053A1 (en) Digital asset conversion
US20150081556A1 (en) Mobile Device Payments
CN106533690B (en) Digital asset processing method adopting block chain asset processing terminal
CN104718555A (en) Self-authenticating peer to peer transaction
TW201730819A (en) Credit payment method and device based on mobile terminal p2p
CN110880106A (en) Method and device for realizing double offline payment
JP2011503711A (en) Payment system and method using message transmission
CN109191194B (en) Method, device and system for processing card data and storage medium
CN110874742B (en) Payment method and device based on block chain and intelligent contract
CN107787502A (en) Method and system for the certification of ideal money instrument
US11151575B2 (en) Trusted pair authentication with edge-computing devices
CN103729760A (en) On-line payment method and system
KR20170074657A (en) Cloud payment system
WO2016086723A1 (en) Bank card transfer payment method
CN110400139B (en) Payment method, device and system based on public digital wallet
JP3905907B2 (en) Electronic value exchange system and electronic value exchange method
CN110348835A (en) A kind of fictitious assets transfer method, device, server and storage medium
CN105809548A (en) Method and system for controlling settlement of self-service card
KR101834755B1 (en) System and terminal for card payment, and method for processing card payment thereof

Legal Events

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