Offline electronic currency transaction method and system

Through methods and systems for electronic currency transactions in offline states, the problem that existing technology cannot realize electronic currency transactions is solved, and the security and convenient transactions of electronic currency are realized, ensuring the reliability and user experience of transactions.

CN111915431BActive Publication Date: 2025-01-07TENDYRON CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN201910383684.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-05-09
Publication Date
2025-01-07
Estimated Expiration
2039-05-09

AI Technical Summary

Technical Problem

The existing electronic trading methods cannot be applied to electronic currency transactions, and the secure and convenient transactions of electronic currency cannot be achieved offline.

Method used

Provide an offline electronic currency trading method and system, establish a wireless connection between the first device and the second device in an offline state, send wallet information and conduct transaction verification, and conduct background confirmation and update electronic currency when online after completing the transaction. , ensure the security and reliability of transactions.

Benefits of technology

The offline transaction method of electronic currency is realized, allowing users to easily conduct electronic currency transactions, while ensuring the security and reliability of transactions, avoiding the restrictions on online transactions in traditional transaction methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111915431B_ABST
    Figure CN111915431B_ABST
Patent Text Reader

Abstract

The present invention provides an offline electronic currency transaction method and system, wherein the method comprises: a first device sends the wallet information of the first device to a second device via a first wireless connection, without deleting the first electronic currency; the second device verifies that the first offline account information is not included in the offline transaction blacklist stored in the second device, verifies that the first electronic currency is legal, and verifies that the first available balance is less than or equal to the total face value of the first electronic currency, and sends the first payment information to the first device; the first device verifies that the second offline account information is not included in the offline transaction blacklist stored in the first device, digitally signs the first transaction information, and sends the first transaction data to the second device; the second device verifies the first signature information according to the first transaction information and the public key of the first device, and if the verification passes, sets the current in-transit balance of the second device as the first in-transit balance of the second device, and stores the first transaction record of the second device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electronic currency transaction, and in particular to an offline electronic currency transaction method and system. Background Art

[0002] With the development of the Internet, electronic transactions have become more and more popular. There are many forms of electronic transactions, such as bank transfers, WeChat payments, and Alipay payments. However, the above payment methods all require both parties or one party to be online to complete the transaction. Based on account transfers, it is necessary to connect to the bank backend to complete the transaction.

[0003] However, with the development of electronic currency, the above-mentioned electronic transaction method cannot be applied to the transaction of electronic currency. Therefore, providing a transaction method of electronic currency has become a technical problem that needs to be solved urgently. Summary of the invention

[0004] The present invention aims to solve the above-mentioned problems.

[0005] The main purpose of the present invention is to provide an electronic currency transaction method;

[0006] Another object of the present invention is to provide an electronic currency transaction system.

[0007] To achieve the above object, the technical solution of the present invention is specifically implemented as follows:

[0008] On one hand, the present invention provides an offline electronic currency transaction method, comprising: a first device establishes a first wireless connection with a second device; the first device sends first device wallet information to the second device through the first wireless connection, wherein the first device and the second device are both in an offline state, the first device wallet information includes: first offline account information, first device available balance and first electronic currency, the first electronic currency is the electronic currency of the first device owner stored locally, and the first device does not delete the first electronic currency after sending the first device wallet information to the second device; the second device receives the first device wallet information, verifies whether the first offline account information is included in the offline transaction blacklist stored in the second device, and verifies The first device verifies whether the first electronic currency is legal, and verifies whether the first available balance is less than or equal to the total face value of the first electronic currency; the second device verifies that the first offline account information is not included in the offline transaction blacklist stored in the second device, and verifies that the first electronic currency is legal, and verifies that the first available balance is less than or equal to the total face value of the first electronic currency, and sends the first payment information to the first device, wherein the first payment information at least includes the second offline account information; the first device verifies whether the second offline account information is included in the offline transaction blacklist stored in the first device; the first device verifies that the second offline account information is not included in the offline transaction blacklist stored in the first device, digitally signs the first transaction information, and sends the first transaction digital signature to the first device. The first transaction data is sent to the second device, wherein the first transaction information at least includes: the first offline account information, the second offline account information, the first transaction time and the first transaction amount, and the first transaction data at least includes the first transaction information and the first signature information obtained by digitally signing the first transaction information; the first device stores the transaction record of the first device, and the transaction record of the first device includes: the first transaction data, and the current available balance of the first device is set to the balance obtained by deducting the first transaction amount from the available balance of the first device; the second device receives the first transaction data, verifies the first signature information according to the first transaction information and the public key of the first device, and if the verification passes, sets the current in-transit balance of the second device to the first in-transit balance of the second device. In-transit balance, storing the first transaction record of the second device, the first transaction record of the second device includes: the first transaction data, wherein the first in-transit balance of the second device is the balance obtained by adding the first transaction amount to the original first in-transit balance of the second device; the first device is online, sending the transaction record of the first device and the current available balance of the first device to the background, after the background confirms that the transaction record of the first device and the current available balance of the first device are correct, receiving the new electronic currency of the owner of the first device issued by the background according to the current available balance of the first device, and storing the new electronic currency of the owner of the first device, deleting the first electronic currency, wherein the face value of the new electronic currency of the owner of the first device is the available balance of the first device;and / or the second device is online, the transaction record of the second device, the current in-transit balance of the second device and the available balance of the second device are sent to the background, after the background confirms that the transaction record of the second device, the current in-transit balance of the second device and the available balance of the second device are correct, the new electronic currency of the second device owner issued by the background is received, the face value of the new electronic currency of the second device owner is equal to the sum of the current in-transit balance of the second device and the available balance of the second device, and the new electronic currency of the second device owner is stored, all electronic currencies stored locally on the second device are deleted, the current in-transit balance of the second device is set to 0, and the current available balance of the second device is set to the face value of the electronic currency of the new second device owner, wherein the transaction record of the second device includes the first transaction record of the second device. ;

[0009] Wherein, after the second device receives the first transaction data and before the second device is online, the method further includes: the second device stores the first electronic currency; the second device establishes a second wireless connection with the third device; the second device sends the second device wallet information to the third device through the second wireless connection, wherein the second device and the third device are both in an offline state, and the second device wallet information includes: second offline account information, the first transaction record of the second device, the first in-transit balance of the second device and the first electronic currency, and the second device does not delete the first electronic currency after sending the second device wallet information to the third device; the third device receives the second device wallet information, verifies Whether the second offline account information is included in the offline transaction blacklist stored in the third device, and whether the first electronic currency is legal, and whether the first in-transit balance of the second device is less than or equal to the total face value of the first electronic currency, and the first signature information is verified according to the first transaction information and the public key of the first device; the third device verifies that the second offline account information is not included in the offline transaction blacklist stored in the third device, and verifies that the first electronic currency is legal, and verifies that the first in-transit balance of the second device is less than or equal to the total face value of the first electronic currency, and the first signature information is verified, and the second receipt information is sent to the second device, wherein the second receipt information is at least The second device verifies whether the third offline account information is included in the offline transaction blacklist stored in the second device; the second device verifies that the third offline account information is not included in the offline transaction blacklist stored in the second device, digitally signs the second transaction information, and sends the second transaction data to the third device, wherein the second transaction information at least includes: the second offline account information, the third offline account information, the second transaction time, the second transaction amount, and the first transaction record of the second device, and the second transaction data at least includes the second transaction information and the second signature information obtained by digitally signing the second transaction information; the second device sends the second transaction information to the third device. The previous in-transit balance of the second device is set as the second in-transit balance of the second device, and the second transaction record of the second device is stored, and the second transaction record of the second device includes: second transaction data, wherein the second in-transit balance of the second device is the balance obtained by deducting the second transaction amount from the first in-transit balance of the second device; the third device receives the second transaction data, verifies the second signature information according to the second transaction information and the public key of the second device, and if the verification is passed, sets the current in-transit balance of the third device to the balance obtained by adding the second transaction amount to the original first in-transit balance of the third device, and stores the transaction record of the third device, and the transaction record of the third device includes: second transaction data.

[0010] Among them, when the second device is online, the transaction record of the second device also includes: the second transaction record of the second device; and / or the method also includes: the third device is online, the transaction record of the third device, the current in-transit balance of the third device and the available balance of the third device are sent to the background, after the background confirms that the transaction record of the third device, the current in-transit balance of the third device and the available balance of the third device are correct, the new electronic currency of the owner of the third device issued by the background is received, the face value of the electronic currency of the new owner of the third device is equal to the sum of the current in-transit balance of the third device and the available balance of the third device, and the electronic currency of the new owner of the third device is stored, all electronic currencies stored locally on the third device are deleted, the current in-transit balance of the third device is set to 0, and the current available balance of the third device is set to the face value of the electronic currency of the new owner of the third device.

[0011] Wherein, before the first device digitally signs the first transaction information, the method also includes: the first device obtains the first transaction amount, wherein the manner of obtaining the first transaction amount includes: inputting the first transaction amount through the keyboard of the first device; or receiving the first transaction amount carried in the first payment receipt sent by the second device; and / or before the second device digitally signs the second transaction information, the method also includes: the second device obtains the second transaction amount, wherein the manner of obtaining the second transaction amount includes: inputting the second transaction amount through the keyboard of the second device; or receiving the second transaction amount carried in the second payment receipt sent by the third device.

[0012] Wherein, before the first device digitally signs the first transaction information, the method also includes: the first device determines that the first transaction amount is less than or equal to the available balance of the first device; and / or before the second device digitally signs the second transaction information, the method also includes: the second device determines that the second transaction amount is less than or equal to the first in-transit balance of the second device.

[0013] Another aspect of the present invention provides an offline electronic currency transaction system, comprising: a first device and a second device; wherein: the first device is used to establish a first wireless connection with the second device; the first device wallet information is sent to the second device via the first wireless connection, wherein the first device and the second device are both in an offline state, the first device wallet information includes: first offline account information, first device available balance and first electronic currency, the first electronic currency is the electronic currency of the first device owner stored locally, and the first device does not delete the first electronic currency after sending the first device wallet information to the second device; the second device is used to receive the first device wallet information, verify whether the first offline account information is included in the first device stored in the second device The first device verifies that the first electronic currency is included in the offline transaction blacklist stored in the first device, and verifies whether the first electronic currency is legal, and verifies whether the first available balance is less than or equal to the total face value of the first electronic currency; verifies that the first offline account information is not included in the offline transaction blacklist stored in the second device, and verifies that the first electronic currency is legal, and verifies that the first available balance is less than or equal to the total face value of the first electronic currency, and sends the first receipt information to the first device, wherein the first receipt information at least includes the second offline account information; the first device is also used to verify whether the second offline account information is included in the offline transaction blacklist stored in the first device; verifies that the second offline account information is not included in the offline transaction blacklist stored in the first device, digitally signs the first transaction information, and sends the first receipt information to the first device. a transaction data is sent to a second device, wherein the first transaction information at least includes: first offline account information, second offline account information, first transaction time and first transaction amount, and the first transaction data at least includes the first transaction information and first signature information obtained by digitally signing the first transaction information; the transaction record of the first device is stored, and the transaction record of the first device includes: the first transaction data, and the current available balance of the first device is set to the balance obtained by deducting the first transaction amount from the available balance of the first device; the second device is also used to receive the first transaction data, verify the first signature information according to the first transaction information and the public key of the first device, and if the verification is passed, set the current in-transit balance of the second device to the first in-transit balance of the second device. The in-transit balance stores the first transaction record of the second device, wherein the first transaction record of the second device includes: the first transaction data, wherein the first in-transit balance of the second device is the balance obtained by adding the first transaction amount to the original first in-transit balance of the second device; the first device is also used to connect online, send the transaction record of the first device and the current available balance of the first device to the background, and after the background confirms that the transaction record of the first device and the current available balance of the first device are correct, receive the new electronic currency of the owner of the first device issued by the background according to the current available balance of the first device, and store the new electronic currency of the owner of the first device, and delete the first electronic currency, wherein the face value of the new electronic currency of the owner of the first device is the available balance of the first device;and / or the second device, further used to connect online, send the transaction record of the second device, the current in-transit balance of the second device and the available balance of the second device to the background, after the background confirms that the transaction record of the second device, the current in-transit balance of the second device and the available balance of the second device are correct, receive the new electronic currency of the owner of the second device issued by the background, the face value of the new electronic currency of the owner of the second device is equal to the sum of the current in-transit balance of the second device and the available balance of the second device, store the new electronic currency of the owner of the second device, delete all electronic currencies stored locally on the second device, set the current in-transit balance of the second device to 0, and set the current available balance of the second device to the face value of the electronic currency of the new owner of the second device, wherein the transaction record of the second device includes the first transaction record of the second device. ;

[0014] The system further includes: a third device; the second device is further used to store the first electronic currency after the second device receives the first transaction data and before the second device is online; establish a second wireless connection with the third device; send the second device wallet information to the third device through the second wireless connection, wherein the second device and the third device are both in an offline state, and the second device wallet information includes: second offline account information, the first transaction record of the second device, the first in-transit balance of the second device and the first electronic currency, and the second device does not delete the first electronic currency after sending the second device wallet information to the third device; the third device is used to receive the second device wallet information information, verify whether the second offline account information is included in the offline transaction blacklist stored in the third device, and verify whether the first electronic currency is legal, and verify whether the first in-transit balance of the second device is less than or equal to the total face value of the first electronic currency, and verify the first signature information according to the first transaction information and the public key of the first device; verify that the second offline account information is not included in the offline transaction blacklist stored in the third device, and verify that the first electronic currency is legal, and verify that the first in-transit balance of the second device is less than or equal to the total face value of the first electronic currency, and the first signature information is verified, and the second receipt information is sent to the second device, wherein the second receipt information is at least The second device is further used to verify whether the third offline account information is included in the offline transaction blacklist stored in the second device; verify that the third offline account information is not included in the offline transaction blacklist stored in the second device, digitally sign the second transaction information, and send the second transaction data to the third device, wherein the second transaction information at least includes: the second offline account information, the third offline account information, the second transaction time, the second transaction amount and the first transaction record of the second device, and the second transaction data at least includes the second transaction information and the second signature information obtained by digitally signing the second transaction information; the current second device The in-transit balance is set to the second in-transit balance of the second device, and the second transaction record of the second device is stored, and the second transaction record of the second device includes: second transaction data, wherein the second in-transit balance of the second device is the balance obtained by deducting the second transaction amount from the first in-transit balance of the second device; the third device is also used to receive the second transaction data, verify the second signature information according to the second transaction information and the public key of the second device, if the verification is passed, set the current in-transit balance of the third device to the balance obtained by adding the second transaction amount to the original first in-transit balance of the third device, and store the transaction record of the third device, and the transaction record of the third device includes: second transaction data.

[0015] Among them, the transaction record of the second device also includes: the second transaction record of the second device; and / or the third device, which is also used to connect online, send the transaction record of the third device, the current in-transit balance of the third device and the available balance of the third device to the background, and after confirming that the transaction record of the third device, the current in-transit balance of the third device and the available balance of the third device are correct in the background, receive the new electronic currency of the owner of the third device issued by the background, the face value of the electronic currency of the new owner of the third device is equal to the sum of the current in-transit balance of the third device and the available balance of the third device, and store the electronic currency of the new owner of the third device, delete all electronic currencies stored locally on the third device, set the current in-transit balance of the third device to 0, and set the current available balance of the third device to the face value of the electronic currency of the new owner of the third device.

[0016] Among them, the first device is also used to obtain the first transaction amount before the first device digitally signs the first transaction information, wherein the method for obtaining the first transaction amount includes: entering the first transaction amount through the keyboard of the first device; or receiving the first transaction amount carried in the first receipt information sent by the second device; and / or the second device is also used to obtain the second transaction amount before the second device digitally signs the second transaction information, wherein the method for obtaining the second transaction amount includes: entering the second transaction amount through the keyboard of the second device; or receiving the second transaction amount carried in the second receipt information sent by the third device.

[0017] Among them, the first device is also used to determine that the first transaction amount is less than or equal to the available balance of the first device before the first device digitally signs the first transaction information; and / or the second device is also used to determine that the second transaction amount is less than or equal to the first in-transit balance of the second device before the second device digitally signs the second transaction information.

[0018] It can be seen from the technical solution provided by the present invention that the offline electronic currency transaction method and system provided by the embodiment of the present invention realize an offline transaction method of electronic currency. The user only needs to use his own hardware wallet to perform a tap operation to complete the offline transaction of electronic currency, which makes the user's operation convenient while ensuring the security of offline transaction of electronic currency. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0020] Figure 1 A flow chart of an electronic currency transaction method provided by an embodiment of the present invention;

[0021] Figure 2 Another flow chart of the electronic currency transaction method provided by the embodiment of the present invention;

[0022] Figure 3 A schematic diagram of the structure of an electronic currency transaction system provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0023] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of the present invention.

[0024] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first" and "second" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance, quantity or position.

[0025] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0026] The embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.

[0027] Figure 1 A flowchart of an offline electronic currency transaction method provided by an embodiment of the present invention is shown. Figure 1 The offline electronic currency transaction method provided by the embodiment of the present invention includes:

[0028] S101: A first device establishes a first wireless connection with a second device.

[0029] In the embodiment of the present invention, the payment is explained by taking the first device as the payee device and the second device as the payee device as an example. Of course, the first device can also be used as the payee device and the second device can also be used as the payee device at the same time.

[0030] Specifically, in an embodiment of the present invention, the first device and the second device can be various consumer terminals such as hardware wallets and smart phones, among which the hardware wallet can be a carrier of legal digital currency (electronic currency), a payment tool based on the digital currency circulation system, and can store digital currency value codes and user identity authentication information. It is a hardware product with a unique identifiable number, including but not limited to card wallets, special-shaped wallets, SIM cards, bracelets, etc.

[0031] The first device and the second device can establish a wireless connection to make an electronic currency payment. The electronic currency payment through the wireless connection can be convenient for users to use, so that when the user uses the first device to pay the second device, the operation can be performed remotely, thereby improving the user experience. Of course, in actual applications, the first device and the second device can also establish a wired connection. In the embodiment of the present invention, only the wireless connection between the first device and the second device is used as an example for explanation.

[0032] The first wireless connection established between the first device and the second device may be an NFC connection, a Bluetooth connection, a WIFI connection, an infrared connection, etc., which is not specifically limited in the present invention. As an optional implementation of an embodiment of the present invention, the first device and the second device establish a first wireless connection including: the first device and the second device establish a first NFC connection; the first device and the second device transmit first Bluetooth pairing information through the first NFC connection; the first device and the second device establish a first Bluetooth connection using the first Bluetooth pairing information. In the application, the user can perform a touch operation with the first device and the second device, that is, the Bluetooth pairing information can be transmitted through the NFC connection, and then the first device can be separated from the second device, avoiding the problem that the user can only pay with the first device and the second device at close range, thereby improving the user experience. By transmitting Bluetooth pairing information through the NFC connection, the device to be connected can be quickly found, the speed of the Bluetooth connection can be improved, and the problem of slow speed caused by Bluetooth broadcasting each information and searching for the other party for pairing in the traditional Bluetooth connection can be avoided, and the problem of the device to be connected connecting to other Bluetooth devices but unable to connect to this device can be further avoided.

[0033] In order to ensure the transaction security between the first device and the second device, as an optional implementation of the embodiment of the present invention, after the first device and the second device establish the first Bluetooth connection using the first Bluetooth pairing information, the first device and the second device authenticate each other using the first Bluetooth connection. The authentication method may include but is not limited to verifying the other party's certificate, verifying the other party's identification, etc. This authentication method can adopt an existing authentication method, which will not be repeated here.

[0034] S102, the first device sends the first device wallet information to the second device via the first wireless connection, wherein the first device and the second device are both in an offline state, the first device wallet information includes: first offline account information, the first device available balance and first electronic currency, the first electronic currency is the electronic currency of the first device owner stored locally, and the first device does not delete the first electronic currency after sending the first device wallet information to the second device.

[0035] Specifically, the offline state of the first device refers to a state in which the first device is used independently and is not connected to the background; the offline state of the second device refers to a state in which the second device is used independently and is not connected to the background.

[0036] The first wallet information refers to the relevant information stored in the first device itself, which may include but is not limited to the electronic currency exchanged by the user of the first device from the issuer, the offline account information of the user of the first device, the available balance of the first device, etc. As an optional method for practical application, the first wallet information may also include the following content: user information of the user of the first device, the digital certificate, key and transaction information of the first device, etc.

[0037] Among them, in the embodiment of the present invention, the available balance of the first device is the balance that can still be used by the first device, and the available balance of the first device is equal to the face value of the first electronic currency. For example, after the first device exchanges the electronic currency from the People's Bank of China, the available balance of the first device is set to the face value of the electronic currency. The available balance of the first device may also be less than the face value of the first electronic currency. For example, after the first device exchanges the electronic currency from the People's Bank of China, it pays a transaction. For the embodiment of the present invention, since the first device is in an offline state, after paying a transaction, the available balance needs to deduct the paid amount, but the electronic currency exchanged from the People's Bank of China is not deleted. At this time, the available balance of the first device is less than the face value of the electronic currency exchanged from the People's Bank of China.

[0038] In an embodiment of the present invention, the first device does not delete the first electronic currency after sending the first device wallet information to the second device. This is because the first device is in an offline state and cannot perform background accounting. Therefore, only the value of the available balance of the first device is changed, and the first electronic currency is not deleted, thereby avoiding the problem of deleting the electronic currency and causing the remaining amount of the electronic currency to be unavailable.

[0039] The electronic currency mentioned in the embodiment of the present invention may also be called digital currency, which is a currency in the form of data issued by the central bank. The electronic currency in the present invention includes at least the currency face value, owner identification and issuer signature.

[0040] Among them, the first electronic currency only includes one electronic currency, the face value of which is equal to the face value to be exchanged and determined according to the exchange requirements, or the first electronic currency includes one or more electronic currencies, the face value of which is the same as the face value of existing paper currency.

[0041] When the first electronic currency includes only one electronic currency, for example, the People's Bank of China issues an electronic currency corresponding to the amount to be exchanged according to the amount to be exchanged by the user, for example, XX needs to exchange 153 yuan of electronic currency, and the face value of the electronic currency exchanged by the People's Bank of China for XX is 153 yuan. When the first electronic currency includes only one electronic currency with an uncertain face value, the amount of data storage is reduced, and the amount of data transmitted during each transaction can also be reduced, and the problem of change can also be avoided.

[0042] When the first electronic currency includes one or more electronic currencies, the first electronic currency can refer to the existing paper currency system and be one or more currencies with different fixed denominations, such as 1 yuan, 10 yuan, 20 yuan, 50 yuan and 100 yuan, etc. For example, XX needs to exchange 153 yuan of electronic currency, and the electronic currency exchanged by the People's Bank of China for XX can include one 100 yuan, one 50 yuan and three 1 yuan, or three 50 yuan and three 1 yuan, etc., which can be exchanged according to specific actual needs. When the first electronic currency is a plurality of currencies with different fixed denominations, it can be used in common with the existing currency system.

[0043] The owner ID is used to indicate the electronic currency exchanged by the People's Bank of China for the user corresponding to the owner ID, indicating the source of the electronic currency.

[0044] The issuer's signature can be the signature data obtained by signing the electronic currency with the private key of the People's Bank of China, which is used to prove the legitimacy of the electronic currency.

[0045] Of course, as an embodiment of the present invention, the data format of electronic currency that can be used for implementation is as shown in Table 1 below:

[0046]

[0047] Table 1

[0048] S103, the second device receives the wallet information of the first device, verifies whether the first offline account information is included in the offline transaction blacklist stored in the second device, verifies whether the first electronic currency is legal, and verifies whether the first available balance is less than or equal to the total face value of the first electronic currency.

[0049] S104, the second device verifies that the first offline account information is not included in the offline transaction blacklist stored in the second device, and verifies that the first electronic currency is legal, and verifies that the first available balance is less than or equal to the total face value of the first electronic currency, and sends the first payment information to the first device, wherein the first payment information at least includes the second offline account information.

[0050] Specifically, the second device stores an offline transaction blacklist, which is a list of devices that are defined as illegal users after the background finds problems with the devices of offline transactions after online settlement. Each time the second device is online, the background will update the offline transaction blacklist for it. After the second device updates the offline transaction blacklist, it stores the offline transaction blacklist. The second device verifies that the first device is not in the offline transaction blacklist to ensure that the first device is a safe device.

[0051] The second device verifies the legality of the first electronic currency, which can ensure that the first device does have legal electronic currency and ensure the security of subsequent transactions. As an optional implementation of an embodiment of the present invention, the second device verifies the legality of the first electronic currency, including: obtaining the issuer's public key, using the issuer's public key to verify the issuer's signature of the first electronic currency, and verifying the owner's identification. If the verification of the issuer's signature passes and the verification of the owner's identification passes, the first electronic currency is determined to be legal. By verifying the issuer's signature, it is determined that the electronic currency is indeed legal currency issued by the People's Bank of China, and by verifying the owner's identification, it is determined that the electronic currency is indeed legal electronic currency exchanged for the user.

[0052] The second device verifies that the first available balance is less than or equal to the total face value of the first electronic currency, thereby determining that the first device is operating normally and has not been illegally attacked, thereby ensuring that the first device trading with the second device is a secure device.

[0053] After all verifications are passed by the second device, the first payment information will be sent to the first device. The first payment information includes the offline account information of the second device, so as to notify the first device to pay the second device.

[0054] As an optional implementation of the embodiment of the present invention, the first transaction amount may be carried in the first payment information and sent to the first device so that the first device learns the transaction amount.

[0055] S105, the first device verifies whether the second offline account information is included in the offline transaction blacklist stored in the first device;

[0056] S106, the first device verifies that the second offline account information is not included in the offline transaction blacklist stored in the first device, digitally signs the first transaction information, and sends the first transaction data to the second device, wherein the first transaction information at least includes: the first offline account information, the second offline account information, the first transaction time and the first transaction amount, and the first transaction data at least includes the first transaction information and the first signature information obtained by digitally signing the first transaction information.

[0057] Specifically, the first device also stores an offline transaction blacklist, which is a list of devices that are defined as illegal users after the background finds problems with the devices in offline transactions after online settlement. Each time the first device is online, the background will update the offline transaction blacklist for it. After the first device updates the offline transaction blacklist, it stores the offline transaction blacklist. The first device verifies that the second device is not in the offline transaction blacklist to ensure that the second device is a safe device.

[0058] After the first device ensures the security of the second device, it will send the first transaction data to the second device to complete the payment of the first device. The first device signs the first transaction information to ensure the non-repudiation of the first transaction information. The first offline account information and the second offline account information are used to identify the two parties of the transaction, the first transaction time is used to identify the time of the transaction, and the first transaction amount is the amount of this transaction. For each transaction, the transaction information will include the above content to determine the uniqueness of each transaction.

[0059] As an optional implementation of the embodiment of the present invention, before the first device digitally signs the first transaction information, the offline electronic currency transaction method provided by the embodiment of the present invention further includes: the first device obtains the first transaction amount, wherein the method of obtaining the first transaction amount includes: inputting the first transaction amount through the keyboard of the first device; or receiving the first transaction amount carried in the first payment information sent by the second device. Specifically, the transaction amount can be input on the payee device or on the payee device, and then the payee device sends the transaction amount to the payee device for payment.

[0060] As an optional implementation of the embodiment of the present invention, before the first device digitally signs the first transaction information, the offline electronic currency transaction method provided by the embodiment of the present invention further includes: the first device determines that the first transaction amount is less than or equal to the available balance of the first device. Thus, the first device can determine whether it has the ability to pay for the transaction.

[0061] S107, the first device stores the transaction record of the first device, the transaction record of the first device including: first transaction data, and sets the current available balance of the first device to the balance obtained by deducting the first transaction amount from the available balance of the first device.

[0062] Specifically, after the payment is completed, the first device stores the transaction record so that it can be settled later when online. In addition, the first device also modifies the current available balance of the first device to ensure subsequent payment capabilities.

[0063] S108, the second device receives the first transaction data, verifies the first signature information according to the first transaction information and the public key of the first device, if the verification passes, sets the current in-transit balance of the second device as the first in-transit balance of the second device, and stores the first transaction record of the second device, the first transaction record of the second device including: the first transaction data, wherein the first in-transit balance of the second device is the balance obtained by adding the first transaction amount to the original first in-transit balance of the second device.

[0064] Specifically, after receiving the first transaction data sent by the first device, the second device records the transaction and adds the first transaction amount corresponding to the transaction to the in-transit balance of the second device. The second device also verifies the first signature information to ensure that the first transaction information is authentic and valid, and the transaction is indeed recognized by the first device.

[0065] As an optional implementation of the embodiment of the present invention, the in-transit balance of the second device may be used for subsequent offline payment or may not be used for subsequent offline payment, which may be set according to actual needs. In the case where the in-transit balance of the second device can be used for subsequent offline payment, the second device also needs to store the first electronic currency to prove the payment ability of the second device.

[0066] S109, the first device is online, and the transaction record of the first device and the current available balance of the first device are sent to the background. After the background confirms that the transaction record of the first device and the current available balance of the first device are correct, the background receives the new electronic currency of the first device owner issued by the background according to the current available balance of the first device, stores the new electronic currency of the first device owner, and deletes the first electronic currency, wherein the face value of the new electronic currency of the first device owner is the available balance of the first device; and / or

[0067] The second device is online, and the transaction record of the second device, the current in-transit balance of the second device and the available balance of the second device are sent to the background. After the background confirms that the transaction record of the second device, the current in-transit balance of the second device and the available balance of the second device are correct, the background receives the new electronic currency of the second device owner issued by the background, the face value of the new electronic currency of the second device owner is equal to the sum of the current in-transit balance of the second device and the available balance of the second device, and stores the new electronic currency of the second device owner, deletes all electronic currencies locally stored in the second device, sets the current in-transit balance of the second device to 0, and sets the current available balance of the second device to the face value of the electronic currency of the new second device owner, wherein the transaction record of the second device includes the first transaction record of the second device.

[0068] Specifically, the first device and the second device can perform online settlement respectively. Online means that the first device or the second device directly establishes a connection with the background through the network, or establishes a connection with the background through other devices (such as computers, mobile phones, etc.), which is not limited in the present invention. In the case of online settlement of the first device, the background needs to re-exchange new electronic currency for the first device. The face value of the new electronic currency is the current available balance of the first device, ensuring that after the online settlement, the face value of the electronic currency of the first device is the same as the available balance. In the case of online settlement of the second device, the background also needs to re-exchange new electronic currency for the second device. The face value of the new electronic currency is the sum of the current available balance of the second device and the in-transit balance. The in-transit balance of the second device is set to 0, ensuring that after the online settlement, the electronic currency of the second device corresponds to the available balance, avoiding the problem of unavailable balance.

[0069] It can be seen that the offline electronic currency transaction method provided by the embodiment of the present invention realizes an offline transaction method of electronic currency. The user only needs to use his own hardware wallet to perform a tap operation to complete the offline transaction of electronic currency, which makes the user's operation convenient while ensuring the security of offline transaction of electronic currency.

[0070] As an optional implementation of the embodiment of the present invention, the second device can also be connected to other payment devices as a payment device to perform payment operations while serving as a payment device. Specifically, after the second device receives the first transaction data in S108, before the second device is online in S109, see Figure 2 The offline electronic currency transaction method provided by the embodiment of the present invention further includes:

[0071] S201, the second device stores the first electronic currency.

[0072] Specifically, the second device stores the first electronic currency, which can be used to make payments, and at the same time proves the payment ability of the second device.

[0073] S202: The second device establishes a second wireless connection with a third device.

[0074] Specifically, the second device is used as the payee device, and the third device is used as the payee device. Of course, the second device can also establish a connection with other devices and serve as a payee device or a payee device; the third device can also serve as a payee device to pay, and the payment process can be performed with reference to S201-S209.

[0075] The manner in which the second device establishes the second wireless connection with the third device may be the same as or different from the manner in which the first device establishes the first wireless connection with the second device, and details thereof will not be repeated herein.

[0076] As an optional implementation of an embodiment of the present invention, the second device and the third device establish a second wireless connection including: the second device and the third device establish a second NFC connection; the second device and the third device transmit second Bluetooth pairing information through the second NFC connection; the second device and the third device establish a second Bluetooth connection using the second Bluetooth pairing information. In the application, the user can perform a touch operation on the second device and the third device, that is, transmit Bluetooth pairing information through the NFC connection, and then the second device can be separated from the third device, avoiding the problem that the user can only pay with the second device and the third device at close range, thereby improving the user experience. By transmitting Bluetooth pairing information through an NFC connection, the device to be connected can be found quickly, the speed of the Bluetooth connection can be improved, and the problem of slow speed caused by Bluetooth broadcasting each information and searching for the other party for pairing in the traditional Bluetooth connection can be avoided, and the problem of the device to be connected connecting to other Bluetooth devices but unable to connect to this device can be further avoided.

[0077] In order to ensure the transaction security between the second device and the third device, as an optional implementation of the embodiment of the present invention, after the second device and the third device establish the second Bluetooth connection using the second Bluetooth pairing information, the second device and the third device authenticate each other using the second Bluetooth connection. The authentication method may include but is not limited to verifying the other party's certificate, verifying the other party's identification, etc. This authentication method can adopt the existing authentication method, which will not be repeated here.

[0078] S203, the second device sends the second device wallet information to the third device via the second wireless connection, wherein the second device and the third device are both in an offline state, and the second device wallet information includes: second offline account information, a first transaction record of the second device, a first in-transit balance of the second device, and a first electronic currency, and the second device does not delete the first electronic currency after sending the second device wallet information to the third device.

[0079] Specifically, the offline state of the third device refers to a state in which the third device is used independently and is not connected to the background.

[0080] When the second device sends the second device wallet information to the third device, it carries the transaction record between the first device and the second device. At the same time, the second device also sends the first electronic currency received from the first device and its own in-transit balance to the third device, so that the third device can verify whether the transaction record between the second device and the first device is correct, and the third device can verify the payment ability of the second device. The other information contained in the second device wallet information can refer to the relevant description in step S102, which will not be repeated here.

[0081] S204, the third device receives the wallet information of the second device, verifies whether the second offline account information is included in the offline transaction blacklist stored in the third device, verifies whether the first electronic currency is legal, verifies whether the first in-transit balance of the second device is less than or equal to the total face value of the first electronic currency, and verifies the first signature information according to the first transaction information and the public key of the first device;

[0082] S205, the third device verifies that the second offline account information is not included in the offline transaction blacklist stored in the third device, and verifies that the first electronic currency is legal, and verifies that the first in-transit balance of the second device is less than or equal to the total face value of the first electronic currency, and the first signature information is verified and passed, and sends the second receipt information to the second device, wherein the second receipt information at least includes the third offline account information.

[0083] Specifically, the third device also verifies the first signature information in the first transaction record of the second device, thereby ensuring that the first transaction record of the second device is authentic and valid, that is, the transaction record is indeed recognized by the first device. Other information verified by the third device can refer to the description of the relevant operations performed by the second device in S103-S104, which will not be repeated here.

[0084] S206, the second device verifies whether the third offline account information is included in the offline transaction blacklist stored in the second device;

[0085] S207, the second device verifies that the third offline account information is not included in the offline transaction blacklist stored in the second device, digitally signs the second transaction information, and sends the second transaction data to the third device, wherein the second transaction information at least includes: the second offline account information, the third offline account information, the second transaction time, the second transaction amount, and the first transaction record of the second device, and the second transaction data at least includes the second transaction information and the second signature information obtained by digitally signing the second transaction information.

[0086] Specifically, when the second device signs the second transaction information, it uses the first transaction record of the second device as part of the second transaction information, thereby ensuring that the first transaction record of the second device is authentic and valid, that is, the transaction record is indeed recognized by the second device. The second transaction information at least includes the accounts of the two parties in this transaction, that is, the second offline account information and the third offline account information. For other operations performed by the second device, refer to the relevant description of the operations performed by the first device in S105-S106, which will not be repeated here.

[0087] As an optional implementation of the embodiment of the present invention, before the second device digitally signs the second transaction information, the offline electronic currency transaction method provided by the embodiment of the present invention further includes: the second device obtains the second transaction amount, wherein the method of obtaining the second transaction amount includes: inputting the second transaction amount through the keyboard of the second device; or receiving the second transaction amount carried in the second payment information sent by the third device. Specifically, the transaction amount can be input on the payee device or on the payee device, and then the payee device sends the transaction amount to the payee device for payment.

[0088] As an optional implementation of the embodiment of the present invention, before the second device digitally signs the second transaction information, the offline electronic currency transaction method provided by the embodiment of the present invention further includes: the second device determines that the second transaction amount is less than or equal to the first in-transit balance of the second device. Thus, the second device can determine whether it has the ability to pay for the transaction.

[0089] S208, the second device sets the current in-transit balance of the second device as the second in-transit balance of the second device, and stores the second transaction record of the second device, wherein the second transaction record of the second device includes: second transaction data, wherein the second in-transit balance of the second device is the balance obtained by deducting the second transaction amount from the first in-transit balance of the second device.

[0090] Specifically, after the payment is completed, the second device stores the transaction record so that it can be settled later when online. In addition, the second device also modifies the current in-transit balance of the second device to ensure the payment capability of the second device when it is offline later.

[0091] S209, the third device receives the second transaction data, verifies the second signature information according to the second transaction information and the public key of the second device, if the verification passes, sets the current in-transit balance of the third device to the balance obtained by adding the second transaction amount to the original first in-transit balance of the third device, and stores the transaction record of the third device, which includes: the second transaction data.

[0092] Specifically, after receiving the second transaction data sent by the second device, the third device records the transaction and adds the second transaction amount corresponding to the transaction to the in-transit balance of the third device. The third device also verifies the second signature information to ensure that the second transaction information is authentic and valid, and the transaction is indeed recognized by the second device.

[0093] As an optional implementation of the embodiment of the present invention, the second device and the third device may perform online clearing respectively;

[0094] When the second device is online, the transaction record of the second device also includes: a second transaction record of the second device.

[0095] Specifically, when the second device is online, the transaction records between the second device and the third device and the transaction records between the second device and the first device will be sent to the background so that the background can perform settlement. In the case of online settlement of the second device, the background needs to exchange new electronic currency for the second device again. The face value of the new electronic currency is the sum of the available balance of the second device and the current in-transit balance, ensuring that after online settlement, the face value of the electronic currency of the second device is the same as the available balance. The in-transit balance of the second device is set to 0 to ensure that after online settlement, the electronic currency of the second device corresponds to the available balance, avoiding the problem of unavailable balance.

[0096] and / or

[0097] The offline electronic currency transaction method provided by the embodiment of the present invention also includes: the third device is online, the transaction record of the third device, the current in-transit balance of the third device and the available balance of the third device are sent to the background, after the background confirms that the transaction record of the third device, the current in-transit balance of the third device and the available balance of the third device are correct, the new electronic currency of the third device owner issued by the background is received, the face value of the new electronic currency of the third device owner is equal to the sum of the current in-transit balance of the third device and the available balance of the third device, and the new electronic currency of the third device owner is stored, all electronic currencies stored locally on the third device are deleted, the current in-transit balance of the third device is set to 0, and the current available balance of the third device is set to the face value of the electronic currency of the new third device owner. In the case of online settlement of the third device, the background needs to re-exchange new electronic currency for the third device, the face value of the new electronic currency is the sum of the current in-transit balance and the available balance of the third device, and the in-transit balance of the third device is set to 0, so as to ensure that after online settlement, the electronic currency of the third device corresponds to the available balance, and avoid the problem of unavailable balance. Online means that the third device directly establishes a connection with the background through the network, or establishes a connection with the background through other devices (such as computers, mobile phones, etc.), which is not limited in the present invention.

[0098] Figure 3The offline electronic currency transaction system provided by the embodiment of the present invention is shown. The system adopts the offline electronic currency transaction method. The structure of the offline electronic currency transaction system is briefly described below. For other matters not covered, please refer to the relevant description of the offline electronic currency transaction method. Figure 3 The offline electronic money transaction system provided by the embodiment of the present invention includes: a first device and a second device; wherein:

[0099] A first device is used to establish a first wireless connection with a second device; and send wallet information of the first device to the second device through the first wireless connection, wherein both the first device and the second device are in an offline state, and the wallet information of the first device includes: first offline account information, an available balance of the first device, and first electronic currency, wherein the first electronic currency is electronic currency of an owner of the first device stored locally, and the first device does not delete the first electronic currency after sending the wallet information of the first device to the second device;

[0100] The second device is used to receive the wallet information of the first device, verify whether the first offline account information is included in the offline transaction blacklist stored in the second device, verify whether the first electronic currency is legal, and verify whether the first available balance is less than or equal to the total face value of the first electronic currency; verify that the first offline account information is not included in the offline transaction blacklist stored in the second device, verify that the first electronic currency is legal, and verify that the first available balance is less than or equal to the total face value of the first electronic currency, and send the first payment information to the first device, wherein the first payment information at least includes the second offline account information;

[0101] The first device is further used to verify whether the second offline account information is included in the offline transaction blacklist stored in the first device; verify that the second offline account information is not included in the offline transaction blacklist stored in the first device, digitally sign the first transaction information, and send the first transaction data to the second device, wherein the first transaction information at least includes: the first offline account information, the second offline account information, the first transaction time, and the first transaction amount, and the first transaction data at least includes the first transaction information and the first signature information obtained by digitally signing the first transaction information; store the transaction record of the first device, the transaction record of the first device includes: the first transaction data, and set the current available balance of the first device to the balance obtained by deducting the first transaction amount from the available balance of the first device;

[0102] The second device is further used to receive the first transaction data, verify the first signature information according to the first transaction information and the public key of the first device, and if the verification is successful, set the current in-transit balance of the second device as the first in-transit balance of the second device, and store the first transaction record of the second device, wherein the first transaction record of the second device includes: the first transaction data, wherein the first in-transit balance of the second device is the balance obtained by adding the first transaction amount to the original first in-transit balance of the second device;

[0103] The first device is further used to connect online, send the transaction record of the first device and the current available balance of the first device to the background, and after the background confirms that the transaction record of the first device and the current available balance of the first device are correct, receive the new electronic currency of the first device owner issued by the background according to the current available balance of the first device, store the new electronic currency of the first device owner, and delete the first electronic currency, wherein the face value of the new electronic currency of the first device owner is the available balance of the first device; and / or

[0104] The second device is also used to go online, send the transaction record of the second device, the current in-transit balance of the second device and the available balance of the second device to the background, and after the background confirms that the transaction record of the second device, the current in-transit balance of the second device and the available balance of the second device are correct, receive the new electronic currency of the second device owner issued by the background, the face value of the new electronic currency of the second device owner is equal to the sum of the current in-transit balance of the second device and the available balance of the second device, store the new electronic currency of the second device owner, delete all electronic currencies locally stored in the second device, set the current in-transit balance of the second device to 0, and set the current available balance of the second device to the face value of the electronic currency of the new second device owner, wherein the transaction record of the second device includes the first transaction record of the second device.

[0105] As an optional implementation of the embodiment of the present invention, the offline electronic currency transaction system provided by the embodiment of the present invention further includes: a third device;

[0106] The second device is further used to store the first electronic currency after the second device receives the first transaction data and before the second device is online; establish a second wireless connection with a third device; send the second device wallet information to the third device through the second wireless connection, wherein the second device and the third device are both in an offline state, and the second device wallet information includes: second offline account information, the first transaction record of the second device, the first in-transit balance of the second device and the first electronic currency, and the second device does not delete the first electronic currency after sending the second device wallet information to the third device;

[0107] The third device is used to receive the wallet information of the second device, verify whether the second offline account information is included in the offline transaction blacklist stored in the third device, verify whether the first electronic currency is legal, and verify whether the first in-transit balance of the second device is less than or equal to the total face value of the first electronic currency, and verify the first signature information according to the first transaction information and the public key of the first device; verify that the second offline account information is not included in the offline transaction blacklist stored in the third device, and verify that the first electronic currency is legal, and verify that the first in-transit balance of the second device is less than or equal to the total face value of the first electronic currency, and the first signature information is verified, and the second payment information is sent to the second device, wherein the second payment information at least includes the third offline account information;

[0108] The second device is further used to verify whether the third offline account information is included in the offline transaction blacklist stored in the second device; verify that the third offline account information is not included in the offline transaction blacklist stored in the second device, digitally sign the second transaction information, and send the second transaction data to the third device, wherein the second transaction information at least includes: the second offline account information, the third offline account information, the second transaction time, the second transaction amount and the first transaction record of the second device, and the second transaction data at least includes the second transaction information and the second signature information obtained by digitally signing the second transaction information; set the current in-transit balance of the second device to the second in-transit balance of the second device, store the second transaction record of the second device, and the second transaction record of the second device includes: the second transaction data, wherein the second in-transit balance of the second device is the balance obtained by deducting the second transaction amount from the first in-transit balance of the second device;

[0109] The third device is also used to receive the second transaction data, verify the second signature information according to the second transaction information and the public key of the second device, and if the verification is passed, set the current in-transit balance of the third device to the balance obtained by adding the second transaction amount to the original first in-transit balance of the third device, and store the transaction record of the third device, which includes: the second transaction data.

[0110] As an optional implementation of an embodiment of the present invention, the transaction record of the second device also includes: the second transaction record of the second device; and / or the third device, which is also used to connect online, send the transaction record of the third device, the current in-transit balance of the third device and the available balance of the third device to the background, and after confirming that the transaction record of the third device, the current in-transit balance of the third device and the available balance of the third device are correct in the background, receive the new electronic currency of the owner of the third device issued by the background, the face value of the electronic currency of the new owner of the third device is equal to the sum of the current in-transit balance of the third device and the available balance of the third device, store the electronic currency of the new owner of the third device, delete all electronic currency stored locally on the third device, set the current in-transit balance of the third device to 0, and set the current available balance of the third device to the face value of the electronic currency of the new owner of the third device.

[0111] As an optional implementation manner of an embodiment of the present invention, the first device is also used to obtain a first transaction amount before the first device digitally signs the first transaction information, wherein the method for obtaining the first transaction amount includes: entering the first transaction amount through the keyboard of the first device; or receiving the first transaction amount carried in the first payment receipt sent by the second device; and / or the second device is also used to obtain the second transaction amount before the second device digitally signs the second transaction information, wherein the method for obtaining the second transaction amount includes: entering the second transaction amount through the keyboard of the second device; or receiving the second transaction amount carried in the second payment receipt sent by the third device.

[0112] As an optional implementation manner of an embodiment of the present invention, the first device is also used to determine that the first transaction amount is less than or equal to the available balance of the first device before the first device digitally signs the first transaction information; and / or the second device is also used to determine that the second transaction amount is less than or equal to the first in-transit balance of the second device before the second device digitally signs the second transaction information.

[0113] As an optional implementation of an embodiment of the present invention, the first electronic currency includes at least the currency face value, the owner identification and the issuer signature; the second device is specifically used to obtain the issuer public key, use the issuer public key to verify the issuer signature of the first electronic currency, and verify the owner identification. If the verification of the issuer signature passes and the verification of the owner identification passes, the first electronic currency is determined to be legal; and / or the third device is specifically used to obtain the issuer public key, use the issuer public key to verify the issuer signature of the first electronic currency, and verify the owner identification. If the verification of the issuer signature passes and the verification of the owner identification passes, the first electronic currency is determined to be legal.

[0114] As an optional implementation manner of an embodiment of the present invention, the first device establishes a first wireless connection with the second device in the following manner: the first device establishes a first NFC connection with the second device; the first device and the second device transmit first Bluetooth pairing information through the first NFC connection; the first device and the second device establish a first Bluetooth connection using the first Bluetooth pairing information; and / or the second device establishes a second wireless connection with the third device in the following manner: the second device and the third device establish a second NFC connection; the second device and the third device transmit second Bluetooth pairing information through the second NFC connection; the second device and the third device establish a second Bluetooth connection using the second Bluetooth pairing information.

[0115] As an optional implementation manner of an embodiment of the present invention, after the first device and the second device establish a first Bluetooth connection using the first Bluetooth pairing information, the first device and the second device use the first Bluetooth connection to authenticate each other; and / or after the second device and the third device establish a second Bluetooth connection using the second Bluetooth pairing information, the second device and the third device use the second Bluetooth connection to authenticate each other.

[0116] It can be seen that the offline electronic currency transaction system provided by the embodiment of the present invention realizes an offline transaction method of electronic currency. The user only needs to use his own hardware wallet to perform a tap operation to complete the offline transaction of electronic currency, which makes the user's operation convenient while ensuring the security of offline transaction of electronic currency.

[0117] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.

[0118] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0119] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0120] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0121] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.

[0122] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0123] Although the embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and cannot be understood as limiting the present invention. Those skilled in the art may change, modify, replace and modify the above embodiments within the scope of the present invention without departing from the principles and purpose of the present invention. The scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. An offline electronic currency transaction method, characterized in that: include: The first device establishes a first wireless connection with the second device; The first device sends first device wallet information to the second device through the first wireless connection, wherein the first device and the second device are both in an offline state, the first device wallet information includes: first offline account information, first device available balance and first electronic currency, the first electronic currency is the electronic currency of the first device owner stored locally, and the first device does not delete the first electronic currency after sending the first device wallet information to the second device; The second device receives the wallet information of the first device, stores the first electronic currency, verifies whether the first offline account information is included in the offline transaction blacklist stored in the second device, verifies whether the first electronic currency is legal, and verifies whether the available balance of the first device is less than or equal to the total face value of the first electronic currency; The second device verifies that the first offline account information is not included in the offline transaction blacklist stored in the second device, verifies that the first electronic currency is legal, and verifies that the available balance of the first device is less than or equal to the total face value of the first electronic currency, and sends first payment information to the first device, wherein the first payment information at least includes the second offline account information; The first device verifies whether the second offline account information is included in the offline transaction blacklist stored in the first device; The first device verifies that the second offline account information is not included in the offline transaction blacklist stored in the first device, digitally signs the first transaction information, and sends the first transaction data to the second device, wherein the first transaction information at least includes: the first offline account information, the second offline account information, the first transaction time, and the first transaction amount, and the first transaction data at least includes the first transaction information and the first signature information obtained by digitally signing the first transaction information; The first device stores a transaction record of the first device, wherein the transaction record of the first device includes: the first transaction data, and setting the current available balance of the first device to a balance obtained by deducting the first transaction amount from the available balance of the first device; The second device receives the first transaction data, verifies the first signature information according to the first transaction information and the public key of the first device, and if the verification is successful, sets the current in-transit balance of the second device as the first in-transit balance of the second device, and stores the first transaction record of the second device, wherein the first transaction record of the second device includes: the first transaction data, wherein the first in-transit balance of the second device is the balance obtained by adding the first transaction amount to the original first in-transit balance of the second device; The first device is online, and the transaction record of the first device and the current available balance of the first device are sent to the background. After the background confirms that the transaction record of the first device and the current available balance of the first device are correct, the background receives the new electronic currency of the first device owner issued by the background according to the current available balance of the first device, stores the new electronic currency of the first device owner, and deletes the first electronic currency, wherein the face value of the new electronic currency of the first device owner is the available balance of the first device; and / or The second device is online, and the transaction record of the second device, the current in-transit balance of the second device and the available balance of the second device are sent to the background. After the background confirms that the transaction record of the second device, the current in-transit balance of the second device and the available balance of the second device are correct, the background receives the new electronic currency of the second device owner issued by the background, the face value of the new electronic currency of the second device owner is equal to the sum of the current in-transit balance of the second device and the available balance of the second device, stores the new electronic currency of the second device owner, deletes all electronic currencies locally stored in the second device, sets the current in-transit balance of the second device to 0, and sets the current available balance of the second device to the face value of the electronic currency of the new second device owner, wherein the transaction record of the second device includes the first transaction record of the second device.

2. The method according to claim 1, characterized in that After the second device receives the first transaction data and before the second device goes online, the method further includes: The second device stores the first electronic currency; The second device establishes a second wireless connection with a third device; The second device sends the second device wallet information to the third device through the second wireless connection, wherein the second device and the third device are both in an offline state, and the second device wallet information includes: the second offline account information, the first transaction record of the second device, the first in-transit balance of the second device, and the first electronic currency, and the second device does not delete the first electronic currency after sending the second device wallet information to the third device; The third device receives the wallet information of the second device, verifies whether the second offline account information is included in the offline transaction blacklist stored in the third device, verifies whether the first electronic currency is legal, verifies whether the first in-transit balance of the second device is less than or equal to the total face value of the first electronic currency, and verifies the first signature information according to the first transaction information and the public key of the first device; The third device verifies that the second offline account information is not included in the offline transaction blacklist stored in the third device, verifies that the first electronic currency is legal, verifies that the first in-transit balance of the second device is less than or equal to the total face value of the first electronic currency, and verifies that the first signature information is passed, and sends the second payment information to the second device, wherein the second payment information at least includes the third offline account information; The second device verifies whether the third offline account information is included in the offline transaction blacklist stored in the second device; The second device verifies that the third offline account information is not included in the offline transaction blacklist stored in the second device, digitally signs the second transaction information, and sends the second transaction data to the third device, wherein the second transaction information at least includes: the second offline account information, the third offline account information, the second transaction time, the second transaction amount, and the first transaction record of the second device, and the second transaction data at least includes the second transaction information and the second signature information obtained by digitally signing the second transaction information; The second device sets the current second device in-transit balance as the second device second in-transit balance, and stores a second transaction record of the second device, wherein the second transaction record of the second device includes: the second transaction data, wherein the second device second in-transit balance is a balance obtained by deducting the second transaction amount from the first device in-transit balance; The third device receives the second transaction data, verifies the second signature information according to the second transaction information and the public key of the second device, and if the verification passes, sets the current in-transit balance of the third device to the balance obtained by adding the second transaction amount to the original first in-transit balance of the third device, and stores the transaction record of the third device, where the transaction record of the third device includes: the second transaction data.

3. The method according to claim 2, characterized in that In the case where the second device is online, the transaction record of the second device further includes: a second transaction record of the second device; and / or The method further comprises: The third device is online, and the transaction record of the third device, the current in-transit balance of the third device and the available balance of the third device are sent to the background. After the background confirms that the transaction record of the third device, the current in-transit balance of the third device and the available balance of the third device are correct, the background receives the new electronic currency of the third device owner issued by the background, the face value of the electronic currency of the new third device owner is equal to the sum of the current in-transit balance of the third device and the available balance of the third device, stores the electronic currency of the new third device owner, deletes all electronic currency locally stored in the third device, sets the current in-transit balance of the third device to 0, and sets the current available balance of the third device to the face value of the electronic currency of the new third device owner.

4. The method according to claim 2, characterized in that: Before the first device digitally signs the first transaction information, the method further includes: The first device obtains the first transaction amount, wherein a method of obtaining the first transaction amount includes: Enter the first transaction amount through the keyboard of the first device; or receiving the first transaction amount carried in the first payment information sent by the second device; and / or Before the second device digitally signs the second transaction information, the method further includes: The second device obtains the second transaction amount, wherein a method of obtaining the second transaction amount includes: Enter the second transaction amount through the keyboard of the second device; or Receive the second transaction amount carried in the second payment information sent by the third device.

5. The method according to claim 2, characterized in that: Before the first device digitally signs the first transaction information, the method further includes: The first device determines that the first transaction amount is less than or equal to the available balance of the first device; and / or Before the second device digitally signs the second transaction information, the method further includes: The second device determines that the second transaction amount is less than or equal to the first in-transit balance of the second device.

6. An offline electronic currency transaction system, characterized in that: include: A first device and a second device; wherein: The first device is used to establish a first wireless connection with the second device; and send first device wallet information to the second device through the first wireless connection, wherein the first device and the second device are both in an offline state, and the first device wallet information includes: first offline account information, first device available balance and first electronic currency, the first electronic currency is the electronic currency of the first device owner stored locally, and the first device does not delete the first electronic currency after sending the first device wallet information to the second device; The second device is used to receive the wallet information of the first device, store the first electronic currency, verify whether the first offline account information is included in the offline transaction blacklist stored in the second device, verify whether the first electronic currency is legal, and verify whether the available balance of the first device is less than or equal to the total face value of the first electronic currency; verify that the first offline account information is not included in the offline transaction blacklist stored in the second device, verify that the first electronic currency is legal, and verify that the available balance of the first device is less than or equal to the total face value of the first electronic currency, and send first payment information to the first device, wherein the first payment information at least includes the second offline account information; The first device is further used to verify whether the second offline account information is included in the offline transaction blacklist stored in the first device; verify that the second offline account information is not included in the offline transaction blacklist stored in the first device, digitally sign the first transaction information, and send the first transaction data to the second device, wherein the first transaction information at least includes: the first offline account information, the second offline account information, the first transaction time, and the first transaction amount, and the first transaction data at least includes the first transaction information and the first signature information obtained by digitally signing the first transaction information; store the transaction record of the first device, the transaction record of the first device includes: the first transaction data, and set the current first device available balance to the balance obtained by deducting the first transaction amount from the first device available balance; The second device is further configured to receive the first transaction data, verify the first signature information according to the first transaction information and the public key of the first device, and if the verification is successful, set the current in-transit balance of the second device as the first in-transit balance of the second device, and store the first transaction record of the second device, wherein the first transaction record of the second device includes: the first transaction data, wherein the first in-transit balance of the second device is a balance obtained by adding the first transaction amount to the original first in-transit balance of the second device; The first device is further used to connect online, send the transaction record of the first device and the current available balance of the first device to the background, and after the background confirms that the transaction record of the first device and the current available balance of the first device are correct, receive the new electronic currency of the first device owner issued by the background according to the current available balance of the first device, store the new electronic currency of the first device owner, and delete the first electronic currency, wherein the face value of the new electronic currency of the first device owner is the available balance of the first device; and / or The second device is also used to go online, send the transaction record of the second device, the current in-transit balance of the second device and the available balance of the second device to the background, and after the background confirms that the transaction record of the second device, the current in-transit balance of the second device and the available balance of the second device are correct, receive the new electronic currency of the second device owner issued by the background, the face value of the new electronic currency of the second device owner is equal to the sum of the current in-transit balance of the second device and the available balance of the second device, store the new electronic currency of the second device owner, delete all electronic currencies locally stored in the second device, set the current in-transit balance of the second device to 0, and set the current available balance of the second device to the face value of the electronic currency of the new second device owner, wherein the transaction record of the second device includes the first transaction record of the second device.

7. The system according to claim 6, characterized in that Also includes: Third equipment; The second device is further configured to store the first electronic currency after the second device receives the first transaction data and before the second device is online; Establishing a second wireless connection with a third device; sending the second device wallet information to the third device through the second wireless connection, wherein the second device and the third device are both in an offline state, and the second device wallet information includes: the second offline account information, the first transaction record of the second device, the first in-transit balance of the second device, and the first electronic currency, and the second device does not delete the first electronic currency after sending the second device wallet information to the third device; The third device is used to receive the wallet information of the second device, verify whether the second offline account information is included in the offline transaction blacklist stored in the third device, verify whether the first electronic currency is legal, and verify whether the first in-transit balance of the second device is less than or equal to the total face value of the first electronic currency, and verify the first signature information according to the first transaction information and the public key of the first device; verify that the second offline account information is not included in the offline transaction blacklist stored in the third device, verify that the first electronic currency is legal, and verify that the first in-transit balance of the second device is less than or equal to the total face value of the first electronic currency, and verify the first signature information, and send the second payment information to the second device, wherein the second payment information at least includes the third offline account information; The second device is further used to verify whether the third offline account information is included in the offline transaction blacklist stored in the second device; verify that the third offline account information is not included in the offline transaction blacklist stored in the second device, digitally sign the second transaction information, and send the second transaction data to the third device, wherein the second transaction information at least includes: the second offline account information, the third offline account information, the second transaction time, the second transaction amount and the first transaction record of the second device, and the second transaction data at least includes the second transaction information and the second signature information obtained by digitally signing the second transaction information; set the current second device in-transit balance as the second device second in-transit balance, store the second transaction record of the second device, and the second transaction record of the second device includes: the second transaction data, wherein the second device second in-transit balance is the balance obtained by deducting the second transaction amount from the first in-transit balance of the second device; The third device is further used to receive the second transaction data, verify the second signature information according to the second transaction information and the public key of the second device, and if the verification is successful, set the current in-transit balance of the third device to the balance obtained by adding the second transaction amount to the original first in-transit balance of the third device, and store the transaction record of the third device, where the transaction record of the third device includes: the second transaction data.

8. The system according to claim 7, characterized in that The transaction record of the second device further includes: a second transaction record of the second device; and / or The third device is also used to go online, send the transaction record of the third device, the current in-transit balance of the third device and the available balance of the third device to the background, and after the background confirms that the transaction record of the third device, the current in-transit balance of the third device and the available balance of the third device are correct, receive the new electronic currency of the third device owner issued by the background, the face value of the electronic currency of the new third device owner is equal to the sum of the current in-transit balance of the third device and the available balance of the third device, store the electronic currency of the new third device owner, delete all electronic currencies locally stored in the third device, set the current in-transit balance of the third device to 0, and set the current available balance of the third device to the face value of the electronic currency of the new third device owner.

9. The system according to claim 7, characterized in that The first device is further configured to obtain the first transaction amount before the first device digitally signs the first transaction information, wherein the method of obtaining the first transaction amount includes: inputting the first transaction amount through a keyboard of the first device; or receiving the first transaction amount carried in the first payment information sent by the second device; and / or The second device is also used to obtain the second transaction amount before the second device digitally signs the second transaction information, wherein the method of obtaining the second transaction amount includes: entering the second transaction amount through the keyboard of the second device; or receiving the second transaction amount carried in the second payment information sent by the third device.

10. The system according to claim 7, characterized in that The first device is further configured to determine that the first transaction amount is less than or equal to the available balance of the first device before the first device digitally signs the first transaction information; and / or The second device is further used to determine whether the second transaction amount is less than or equal to the first in-transit balance of the second device before the second device digitally signs the second transaction information.

Citation Information

Patent Citations

  • Digital currency trading method, device and system and mobile terminal

    CN108985928A