CN116151812A - Offline transaction method and device based on digital currency - Google Patents

Offline transaction method and device based on digital currency Download PDF

Info

Publication number
CN116151812A
CN116151812A CN202111392906.9A CN202111392906A CN116151812A CN 116151812 A CN116151812 A CN 116151812A CN 202111392906 A CN202111392906 A CN 202111392906A CN 116151812 A CN116151812 A CN 116151812A
Authority
CN
China
Prior art keywords
transaction
character string
offline
state
confirmation information
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
CN202111392906.9A
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.)
Bank of China Ltd
Digital Currency Institute of the Peoples Bank of China
Original Assignee
Bank of China Ltd
Digital Currency Institute of the 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 Bank of China Ltd, Digital Currency Institute of the Peoples Bank of China filed Critical Bank of China Ltd
Priority to CN202111392906.9A priority Critical patent/CN116151812A/en
Publication of CN116151812A publication Critical patent/CN116151812A/en
Pending legal-status Critical Current

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/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; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • 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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

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)
  • Marketing (AREA)
  • Technology Law (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention discloses an offline transaction method and device based on digital currency, and relates to the technical field of computers. One embodiment of the method comprises the following steps: responding to the operation of off-line transaction, generating a transaction character string according to the digital currency encryption character string corresponding to the off-line transaction and recording the state of the transaction character string; transmitting the transaction character string to a payee for offline transaction; under the condition that transaction confirmation information returned by a payee is not received, performing transaction retry operation; if the transaction retry times reach the set threshold value and the transaction confirmation information returned by the payee is not received yet, ending the offline transaction and updating the state of the transaction character string to be the appointed state; and in the networking state, sending the transaction character string in the appointed state to the server so that the server judges the party to which the transaction amount belongs. The embodiment avoids the fund loss caused by the loss of the transaction character string, and improves the safety and success rate of the off-line transaction of the digital currency.

Description

Offline transaction method and device based on digital currency
Technical Field
The invention relates to the technical field of computers, in particular to an offline transaction method and device based on digital currency.
Background
With the gradual popularization of digital currency, the transaction scene of the digital currency is more and more abundant, but at present, no effective control method exists for the offline transaction scene based on the digital currency encryption character string. In the process of offline transaction, the terminal of the payer transmits offline transaction information to the terminal of the payee for offline transaction, and simultaneously deducts the available balance of the digital currency encryption character string of the payer. However, when the offline transaction information is transmitted, if the communication channel is interrupted, the offline transaction information sent by the payer is not received by the payee, so that the risk of funds loss is brought, and the offline transaction safety and success rate of the digital currency are greatly reduced. Therefore, how to avoid the occurrence of funds loss and improve the safety and success rate of offline transactions when offline transactions of digital currency are performed is a technical problem to be solved urgently.
Disclosure of Invention
In view of the above, the embodiment of the invention provides an offline transaction method and device based on digital currency, which can avoid the fund loss caused by the loss of the transaction character string through the state control and retry mechanism of the transaction character string of the offline transaction and the intervention processing mechanism of the server in the networking state, thereby improving the security and success rate of the offline transaction of the digital currency.
To achieve the above object, according to one aspect of the embodiments of the present invention, there is provided an offline transaction method based on digital money.
An offline transaction method based on digital currency, comprising:
responding to the operation of off-line transaction, generating a transaction character string according to the digital currency encryption character string corresponding to the off-line transaction and recording the state of the transaction character string;
transmitting the transaction string to a payee for offline transactions;
under the condition that transaction confirmation information returned by the payee is not received, performing transaction retry operation;
if the transaction retry number reaches a set retry number threshold, and transaction confirmation information returned by the payee is not received yet, ending the offline transaction and updating the state of the transaction character string to be a specified state;
and in the networking state, the transaction character string in the appointed state is sent to a server side so that the server side judges the party to which the transaction amount belongs.
Optionally, the transaction string further includes a transaction amount, the digital currency encryption string has an available balance, and after generating the transaction string according to the digital currency encryption string corresponding to the offline transaction, the method further includes:
deducting the transaction amount from the available balance of the digital currency encryption string.
Optionally, the transaction confirmation information includes transaction success confirmation information and transaction failure confirmation information; the method further comprises the steps of:
if the transaction success confirmation information returned by the payee is received, deleting the transaction character string to end the offline transaction;
and if the transaction failure confirmation information returned by the payee is received, performing transaction rollback operation, and deleting the transaction character string to end the offline transaction.
Optionally, performing the transaction rollback operation includes: and adding the available balance of the digital currency encryption character string to the transaction amount to perform a transaction rollback operation.
Optionally, the method further comprises: if the transaction confirmation information returned by the payee is not received after the offline transaction is overtime, ending the offline transaction and updating the state of the transaction character string to be the appointed state.
Optionally, the transaction string further includes a transaction time, and whether the offline transaction has timed out is determined according to the transaction time.
According to another aspect of an embodiment of the present invention, there is provided an offline transaction device based on digital money.
An offline transaction device based on digital currency, comprising:
the character string generation module is used for responding to the operation of offline transaction, generating a transaction character string according to the digital currency encryption character string corresponding to the offline transaction and recording the state of the transaction character string;
the character string sending module is used for sending the transaction character string to a payee for offline transaction;
the transaction retry module is used for performing transaction retry operation under the condition that the transaction confirmation information returned by the payee is not received;
the state updating module is used for ending the offline transaction and updating the state of the transaction character string to be a specified state if the transaction retry number reaches a set retry number threshold and transaction confirmation information returned by the payee is not received yet;
and the networking judgment module is used for sending the transaction character string in the appointed state to a server under the networking state so that the server judges the party to which the transaction amount belongs.
Optionally, the transaction string further comprises a transaction amount, the digital currency encryption string has an available balance, and the apparatus further comprises an amount deduction module for:
after generating a transaction character string according to the digital currency encryption character string corresponding to the offline transaction, deducting the transaction amount from the available balance of the digital currency encryption character string.
Optionally, the transaction confirmation information includes transaction success confirmation information and transaction failure confirmation information;
the apparatus further comprises a transaction confirmation module for:
if the transaction success confirmation information returned by the payee is received, deleting the transaction character string to end the offline transaction;
and if the transaction failure confirmation information returned by the payee is received, performing transaction rollback operation, and deleting the transaction character string to end the offline transaction.
Optionally, the transaction confirmation module is further configured to:
and adding the available balance of the digital currency encryption character string to the transaction amount to perform a transaction rollback operation.
Optionally, the status updating module is further configured to:
if the transaction confirmation information returned by the payee is not received after the offline transaction is overtime, ending the offline transaction and updating the state of the transaction character string to be the appointed state.
Optionally, the transaction string further includes a transaction time, and whether the offline transaction has timed out is determined according to the transaction time.
According to yet another aspect of an embodiment of the present invention, there is provided an offline transaction electronic device based on digital money.
An offline transaction electronic device based on digital currency, comprising: one or more processors; and the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are enabled to realize the offline transaction method based on digital currency.
According to yet another aspect of an embodiment of the present invention, a computer-readable medium is provided.
A computer readable medium having stored thereon a computer program which when executed by a processor implements the digital money based offline transaction method provided by embodiments of the present invention.
One embodiment of the above invention has the following advantages or benefits: generating a transaction character string according to the digital currency encryption character string corresponding to the offline transaction and recording the state of the transaction character string; transmitting the transaction character string to a payee for offline transaction; under the condition that transaction confirmation information returned by a payee is not received, performing transaction retry operation; if the transaction retry number reaches the set retry number threshold, and transaction confirmation information returned by the payee is not received yet, ending the offline transaction and updating the state of the transaction character string to be the appointed state; in the networking state, the transaction character string in the appointed state is sent to the server side, so that the server side judges the technical scheme of the party to which the transaction amount belongs, the state control and retry mechanism of the transaction character string of the offline transaction and the intervention processing mechanism of the server side in the networking state are realized, the fund loss caused by the loss of the transaction character string is avoided, and the safety and success rate of the offline transaction of the digital currency are improved.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of the main steps of a digital currency based offline transaction method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an offline transaction processing flow according to one embodiment of the present invention;
FIG. 3 is a schematic diagram of the main modules of an offline digital money-based transaction device according to an embodiment of the present invention;
FIG. 4 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;
fig. 5 is a schematic diagram of a computer system suitable for use in implementing an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. 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.
In order to solve the technical problems in the prior art, the invention provides an offline transaction method based on digital currency, which avoids the fund risk caused by losing the transaction character string and improves the safety and success rate of the offline transaction of the digital currency through the state control and retry mechanisms of the transaction character string of the offline transaction and the intervention processing mechanism of a background system. Specifically, in one embodiment of the present invention, after an offline transaction is initiated, a transaction string is generated, and its status may be set to "in-transit"; after the payee returns the successful transaction confirmation information, deleting the transaction character string; if the transaction is rejected, the payer rolls back the transaction; if the transaction confirmation information of the payee is not received, initiating a transaction retry, and re-executing the original transaction; if the transaction confirmation information of the payee is not received after retrying for a certain number of times, terminating the transaction, reserving the transaction character string, and uploading the transaction character string to a background system for judging the affiliated party of the transaction amount when the terminal of the payee is in a networking state.
According to the technical scheme of the invention, the execution subject comprises a terminal and a server, wherein the terminal refers to terminal equipment of a user and comprises a payer terminal and a payee terminal. The payer terminal is responsible for safely storing the digital currency encryption character string; processing the digital currency encryption character string during transaction, generating a transaction character string, and performing state control on the transaction character string; when the transaction is refused, judging the authenticity of the refusing instruction, and performing transaction rollback operation; when the transaction is unknown (the transaction confirmation information of the payee is not received), the transaction character string of the unknown transaction is sent to the server and a judgment request is sent. The receiving side terminal needs to receive and process the transaction character string and correctly returns the transaction confirmation result according to the rule. The server is used for processing the transaction information (including the transaction character strings generated in the transaction process) sent by all the terminals and judging the ownership of the digital currency encryption character string corresponding to the transaction amount.
FIG. 1 is a schematic diagram of the main steps of a digital currency based offline transaction method according to an embodiment of the present invention. As shown in fig. 1, the execution subject of the offline transaction method based on digital currency according to the embodiment of the present invention is a payer, and the method mainly includes steps S101 to S105 as follows.
Step S101: responding to the operation of off-line transaction, generating a transaction character string according to the digital currency encryption character string corresponding to the off-line transaction and recording the state of the transaction character string;
step S102: transmitting the transaction string to a payee for offline transactions;
step S103: under the condition that transaction confirmation information returned by the payee is not received, performing transaction retry operation;
step S104: if the transaction retry number reaches a set retry number threshold, and transaction confirmation information returned by the payee is not received yet, ending the offline transaction and updating the state of the transaction character string to be a specified state;
step S105: and in the networking state, the transaction character string in the appointed state is sent to a server side so that the server side judges the party to which the transaction amount belongs.
According to the steps S101 to S105, the state control and retry mechanism of the transaction string of the offline transaction and the intervention processing mechanism of the server in the networking state can avoid the funds loss caused by the loss of the transaction string, and improve the security and success rate of the offline transaction of the digital currency.
According to one embodiment of the present invention, the transaction string may further include a transaction amount, and the digital currency encryption string has an available balance, and after generating the transaction string according to the digital currency encryption string corresponding to the offline transaction, further includes: deducting the transaction amount from the available balance of the digital currency encryption string. When the user exchanges digital currency through the terminal, the server generates a string of uniquely identified digital currency encryption character strings, returns the string to the terminal, and records the available balance of the digital currency encryption character strings, wherein the available balance at the moment is the exchange amount. After the digital currency transaction is performed to generate a transaction string, a deduction of the corresponding amount is performed to update the available balance of the digital currency encryption string.
According to another embodiment of the invention, the transaction confirmation information includes transaction success confirmation information and transaction failure confirmation information. If the transaction success confirmation information returned by the payee is received, deleting the transaction character string to end the offline transaction; and if the transaction failure confirmation information returned by the payee is received, performing transaction rollback operation, and deleting the transaction character string to end the offline transaction. Wherein, when the transaction rollback operation is performed, specifically, the available balance of the digital currency encryption character string is added to the transaction amount to perform the transaction rollback operation. According to the embodiment of the invention, after the transaction character string is generated, the available balance of the digital currency encryption character string of the payer is deducted, but after the transaction fails, the payer increases the transaction amount deducted before to the available balance of the digital currency encryption character string again so as to execute the transaction rollback operation. Thus, the capital loss can be avoided.
According to another embodiment of the present invention, if the transaction confirmation information returned by the payee is not received after the timeout of the offline transaction, the offline transaction is ended, and the state of the transaction string is updated to be the designated state. The transaction character string further comprises transaction time, and whether the offline transaction is overtime or not is judged according to the transaction time. According to the embodiment of the invention, a transaction duration threshold can be preset, the transaction time can be included when the transaction character string is generated, so that the transaction duration of the offline transaction can be calculated according to the transaction time and the current time, and if the transaction duration exceeds the transaction duration threshold, the offline transaction timeout is judged. And after the offline transaction is overtime, the transaction confirmation information returned by the payee is not received, and the transaction character string of the offline transaction is considered to be lost or the transaction confirmation information is considered to be lost, and the transaction character string is reserved and the state of the transaction character string is updated. Specifically, when generating the transaction string, the state of the transaction string may be set to an intermediate state "in-transit" to indicate that the transaction string is being processed in an offline transaction; when the offline transaction is overtime or the transaction retry times reach the preset retry times threshold and transaction confirmation information returned by the payee is not received, setting the state of the transaction character string to be 'frozen' (namely, the appointed state) so as to indicate that the transaction character string can not be subjected to transaction processing any more, uploading the transaction character string to a server after the payer is required to be connected with the network, and judging the affiliated party of the transaction amount by the server.
FIG. 2 is a schematic diagram of an offline transaction processing flow according to one embodiment of the invention. When the user exchanges digital currency through the terminal, the server-side background system generates an encrypted character string with a unique identifier, and the encrypted character string has available amount information and is issued to the terminal of the user so that the user can use the encrypted character string to conduct transactions. As shown in fig. 2, the process flow of off-line transaction using digital currency mainly includes the following steps:
1. in an off-line scenario, the payer terminal appends transaction information and a payer signature to the digital currency encryption string according to the transaction element, thereby generating a transaction string for the transaction, the transaction string including, for example, the digital currency encryption string, payee information, transaction amount, transaction time, and transaction random number. Meanwhile, deducting the available balance of the payer digital currency encryption character string, and setting the state of the transaction character string as an intermediate state 'in-transit'; then transmitting the transaction character string to the payee;
2. if the payee terminal successfully receives the transaction character string and successfully completes the offline transaction, returning transaction success confirmation information (one of the transaction confirmation information), and deleting the generated transaction character string by the payer terminal to finish the transaction;
3. if the transaction of the payee terminal fails, returning transaction failure confirmation information (one of the transaction confirmation information), carrying out transaction rollback operation by the payer terminal according to the transaction failure confirmation information, adding the current transaction amount to the available balance of the payer digital currency encryption character string, deleting the generated transaction character string, and ending the transaction;
4. if the payment terminal does not receive the transaction confirmation information of the payment terminal, the payment terminal initiates transaction retry, resends the generated transaction character string, and retries the transaction of the transaction character string by +1;
5. if the retry number of the transaction character string reaches a preset retry number threshold, or the transaction confirmation information of the payee terminal is not received after the offline transaction is overtime, the payer ends the transaction, reserves the transaction character string, and updates the state of the transaction character string to be the intermediate state 'frozen', so that the transaction character string can not conduct offline transaction any more;
6. when the payer terminal is connected with the network, the transaction character string in the frozen state is sent to the background of the server system, and the background of the server system judges the party to which the transaction amount belongs.
Fig. 3 is a schematic diagram of main modules of an offline transaction device based on digital money according to an embodiment of the present invention. As shown in fig. 3, the offline transaction device 300 based on digital currency according to the embodiment of the present invention mainly includes a character string generating module 301, a character string transmitting module 302, a transaction retrying module 303, a status updating module 304, and a networking judging module 305.
The character string generation module 301 is configured to generate a transaction character string according to a digital currency encryption character string corresponding to the offline transaction and record a state of the transaction character string in response to an offline transaction operation;
a character string sending module 302, configured to send the transaction character string to a payee for offline transaction;
a transaction retry module 303, configured to perform a transaction retry operation when the transaction confirmation information returned by the payee is not received;
the state updating module 304 is configured to end the offline transaction if the transaction retry number reaches a set retry number threshold and the transaction confirmation information returned by the payee is not received yet, and update the state of the transaction string to a specified state;
the networking judgment module 305 is configured to send the transaction string in the specified state to a server in a networking state, so that the server judges the party to which the transaction amount belongs.
According to one embodiment of the present invention, the transaction string further includes a transaction amount, the digital currency encryption string has an available balance, and the digital currency-based off-line transaction device 300 of the embodiment of the present invention may further include an amount deduction module (not shown) for deducting the amount of the transaction amount:
after generating a transaction character string according to the digital currency encryption character string corresponding to the offline transaction, deducting the transaction amount from the available balance of the digital currency encryption character string.
According to another embodiment of the present invention, the transaction confirmation information includes transaction success confirmation information and transaction failure confirmation information; the digital currency-based offline transaction device 300 of an embodiment of the present invention may further include a transaction confirmation module (not shown) for:
if the transaction success confirmation information returned by the payee is received, deleting the transaction character string to end the offline transaction;
and if the transaction failure confirmation information returned by the payee is received, performing transaction rollback operation, and deleting the transaction character string to end the offline transaction.
According to yet another embodiment of the present invention, a transaction confirmation module (not shown) may also be used to: and adding the available balance of the digital currency encryption character string to the transaction amount to perform a transaction rollback operation.
According to yet another embodiment of the present invention, the status update module 304 may also be configured to:
if the transaction confirmation information returned by the payee is not received after the offline transaction is overtime, ending the offline transaction and updating the state of the transaction character string to be the appointed state.
According to a further embodiment of the present invention, the transaction string further includes a transaction time, and whether the offline transaction has timed out is determined according to the transaction time.
According to the technical scheme of the embodiment of the invention, the transaction character string is generated according to the digital currency encryption character string corresponding to the offline transaction and the state of the transaction character string is recorded; transmitting the transaction character string to a payee for offline transaction; under the condition that transaction confirmation information returned by a payee is not received, performing transaction retry operation; if the transaction retry number reaches the set retry number threshold, and transaction confirmation information returned by the payee is not received yet, ending the offline transaction and updating the state of the transaction character string to be the appointed state; in the networking state, the transaction character string in the appointed state is sent to the server side, so that the server side judges the technical scheme of the party to which the transaction amount belongs, the state control and retry mechanism of the transaction character string of the offline transaction and the intervention processing mechanism of the server side in the networking state are realized, the fund loss caused by the loss of the transaction character string is avoided, and the safety and success rate of the offline transaction of the digital currency are improved.
FIG. 4 illustrates an exemplary system architecture 400 of a digital currency based off-line transaction method or digital currency based off-line transaction device to which embodiments of the present invention may be applied.
As shown in fig. 4, the system architecture 400 may include terminal devices 401, 402, 403, a network 404, and a server 405. The network 404 is used as a medium to provide communication links between the terminal devices 401, 402, 403 and the server 405. The network 404 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server 405 via the network 404 using the terminal devices 401, 402, 403 to receive or send messages or the like. Various communication client applications, such as a banking application, a digital money wallet application, etc. (by way of example only) may be installed on the terminal devices 401, 402, 403.
The terminal devices 401, 402, 403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 405 may be a server providing various services, such as a background management server (by way of example only) providing support for digital money transaction requests made by users using the terminal devices 401, 402, 403. The background management server may perform processing of determining the party to which the transaction amount belongs on the received data such as the transaction string in the specified state, and feedback the processing result (for example, the party to which the transaction amount belongs—merely an example) to the terminal device.
It should be noted that, the offline transaction method based on digital currency according to the embodiment of the present invention is generally executed by the server 405, and accordingly, the offline transaction device based on digital currency is generally disposed in the server 405.
It should be understood that the number of terminal devices, networks and servers in fig. 4 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 5, there is illustrated a schematic diagram of a computer system 500 suitable for use in implementing a terminal device or server in accordance with an embodiment of the present invention. The terminal device or server shown in fig. 5 is only an example, and should not impose any limitation on the functions and scope of use of the embodiments of the present invention.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input section 506 including a keyboard, a mouse, and the like; an output portion 507 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker, and the like; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The drive 510 is also connected to the I/O interface 505 as needed. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as needed so that a computer program read therefrom is mounted into the storage section 508 as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 509, and/or installed from the removable media 511. The above-described functions defined in the system of the present invention are performed when the computer program is executed by a Central Processing Unit (CPU) 501.
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 two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection 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, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts 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 the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). 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 the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules involved in the embodiments of the present invention may be implemented in software or in hardware. The described units or modules may also be provided in a processor, for example, as: a processor includes a string generation module, a string transmission module, a transaction retry module, a status update module, and a networking determination module. The names of the units or modules do not limit the units or modules themselves in some cases, for example, the character string generating module may also be described as "a module for generating a transaction character string from a digital currency encryption character string corresponding to the offline transaction and recording the state of the transaction character string" in response to an operation of performing the offline transaction.
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to include: responding to the operation of off-line transaction, generating a transaction character string according to the digital currency encryption character string corresponding to the off-line transaction and recording the state of the transaction character string; transmitting the transaction string to a payee for offline transactions; under the condition that transaction confirmation information returned by the payee is not received, performing transaction retry operation; if the transaction retry number reaches a set retry number threshold, and transaction confirmation information returned by the payee is not received yet, ending the offline transaction and updating the state of the transaction character string to be a specified state; and in the networking state, the transaction character string in the appointed state is sent to a server side so that the server side judges the party to which the transaction amount belongs.
According to the technical scheme of the embodiment of the invention, the transaction character string is generated according to the digital currency encryption character string corresponding to the offline transaction and the state of the transaction character string is recorded; transmitting the transaction character string to a payee for offline transaction; under the condition that transaction confirmation information returned by a payee is not received, performing transaction retry operation; if the transaction retry number reaches the set retry number threshold, and transaction confirmation information returned by the payee is not received yet, ending the offline transaction and updating the state of the transaction character string to be the appointed state; in the networking state, the transaction character string in the appointed state is sent to the server side, so that the server side judges the technical scheme of the party to which the transaction amount belongs, the state control and retry mechanism of the transaction character string of the offline transaction and the intervention processing mechanism of the server side in the networking state are realized, the fund loss caused by the loss of the transaction character string is avoided, and the safety and success rate of the offline transaction of the digital currency are improved.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (14)

1. An offline transaction method based on digital currency, comprising:
responding to the operation of off-line transaction, generating a transaction character string according to the digital currency encryption character string corresponding to the off-line transaction and recording the state of the transaction character string;
transmitting the transaction string to a payee for offline transactions;
under the condition that transaction confirmation information returned by the payee is not received, performing transaction retry operation;
if the transaction retry number reaches a set retry number threshold, and transaction confirmation information returned by the payee is not received yet, ending the offline transaction and updating the state of the transaction character string to be a specified state;
and in the networking state, the transaction character string in the appointed state is sent to a server side so that the server side judges the party to which the transaction amount belongs.
2. The method of claim 1, wherein the transaction string further comprises a transaction amount, the digital currency encryption string has an available balance, and further comprising, after generating the transaction string from the digital currency encryption string corresponding to the current offline transaction:
deducting the transaction amount from the available balance of the digital currency encryption string.
3. The method according to claim 1 or 2, wherein the transaction confirmation information comprises transaction success confirmation information and transaction failure confirmation information;
the method further comprises the steps of:
if the transaction success confirmation information returned by the payee is received, deleting the transaction character string to end the offline transaction;
and if the transaction failure confirmation information returned by the payee is received, performing transaction rollback operation, and deleting the transaction character string to end the offline transaction.
4. The method of claim 3, wherein performing a transaction rollback operation comprises: and adding the available balance of the digital currency encryption character string to the transaction amount to perform a transaction rollback operation.
5. The method according to claim 1, wherein the method further comprises:
if the transaction confirmation information returned by the payee is not received after the offline transaction is overtime, ending the offline transaction and updating the state of the transaction character string to be the appointed state.
6. The method of claim 5, wherein the transaction string further comprises a transaction time, and wherein determining whether the offline transaction has timed out is based on the transaction time.
7. An off-line transaction device based on digital currency, comprising:
the character string generation module is used for responding to the operation of offline transaction, generating a transaction character string according to the digital currency encryption character string corresponding to the offline transaction and recording the state of the transaction character string;
the character string sending module is used for sending the transaction character string to a payee for offline transaction;
the transaction retry module is used for performing transaction retry operation under the condition that the transaction confirmation information returned by the payee is not received;
the state updating module is used for ending the offline transaction and updating the state of the transaction character string to be a specified state if the transaction retry number reaches a set retry number threshold and transaction confirmation information returned by the payee is not received yet;
and the networking judgment module is used for sending the transaction character string in the appointed state to a server under the networking state so that the server judges the party to which the transaction amount belongs.
8. The apparatus of claim 7, wherein the transaction string further comprises a transaction amount, the digital currency encryption string has an available balance, and the apparatus further comprises an amount deduction module to:
after generating a transaction character string according to the digital currency encryption character string corresponding to the offline transaction, deducting the transaction amount from the available balance of the digital currency encryption character string.
9. The apparatus according to claim 7 or 8, wherein the transaction confirmation information includes transaction success confirmation information and transaction failure confirmation information;
the apparatus further comprises a transaction confirmation module for:
if the transaction success confirmation information returned by the payee is received, deleting the transaction character string to end the offline transaction;
and if the transaction failure confirmation information returned by the payee is received, performing transaction rollback operation, and deleting the transaction character string to end the offline transaction.
10. The apparatus of claim 9, wherein the transaction confirmation module is further configured to:
and adding the available balance of the digital currency encryption character string to the transaction amount to perform a transaction rollback operation.
11. The apparatus of claim 7, wherein the status update module is further configured to:
if the transaction confirmation information returned by the payee is not received after the offline transaction is overtime, ending the offline transaction and updating the state of the transaction character string to be the appointed state.
12. The apparatus of claim 11, wherein the transaction string further comprises a transaction time, and wherein determining whether the offline transaction has timed out is based on the transaction time.
13. An offline transaction electronic device based on digital money, comprising:
one or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-6.
14. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-6.
CN202111392906.9A 2021-11-23 2021-11-23 Offline transaction method and device based on digital currency Pending CN116151812A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111392906.9A CN116151812A (en) 2021-11-23 2021-11-23 Offline transaction method and device based on digital currency

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111392906.9A CN116151812A (en) 2021-11-23 2021-11-23 Offline transaction method and device based on digital currency

Publications (1)

Publication Number Publication Date
CN116151812A true CN116151812A (en) 2023-05-23

Family

ID=86372348

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111392906.9A Pending CN116151812A (en) 2021-11-23 2021-11-23 Offline transaction method and device based on digital currency

Country Status (1)

Country Link
CN (1) CN116151812A (en)

Similar Documents

Publication Publication Date Title
CN112334933B (en) Blockchain transaction processing
CN108596619B (en) Transaction method, device, central node and system for blockchain system
WO2023066040A1 (en) Digital currency payment method and apparatus
CN108734452B (en) Internet resource transfer method, account transfer method and device
CN111857888B (en) Transaction processing method and device
CN112884181A (en) Quota information processing method and device
CN112101923A (en) Transaction information processing method and device
WO2023051736A1 (en) Digital currency-based transaction method and apparatus
CN116151812A (en) Offline transaction method and device based on digital currency
JP7273241B2 (en) Intelligent contract execution method and apparatus
CN112580975A (en) Business process processing method and device
CN114037446A (en) Transaction method, transaction management method, device and system for digital currency
CN114186999A (en) Method and device for verifying digital currency transaction abnormity
CN111210349A (en) Virtual asset transfer hosting method and device, electronic equipment and storage medium
CN113763646A (en) Device control method, device, electronic device and computer readable medium
CN111861746A (en) Method and device for processing transaction data
CN111415245A (en) Account opening method and device
CN112950380B (en) Block chain-based transaction consistency processing method and device
CN111127006A (en) Transaction processing method and system based on block chain
CN116187988A (en) Offline transaction method and device based on digital currency
CN110659889B (en) Circulation method and system of digital currency
CN116415940A (en) Method, management platform and system for adjusting digital currency in hardware wallet account
CN113837734B (en) Method and device for off-line loss reporting of digital currency chip card
CN113452771B (en) Interface calling method, device and system
WO2023072115A1 (en) Digital currency transaction method and system, and related transaction terminals

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