Digital currency transaction method and system based on mobile communication terminal
By generating and verifying offline payment codes in a secure, isolated execution environment on a mobile communication terminal, the security issues of digital currency transactions in offline scenarios are resolved, enabling secure transactions even without a network connection.
Patent Information
- Application Number
- PCT/CN2025/108409
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-07-31
- Filing Date
- 2025-07-14
- Publication Date
- 2026-02-05
AI Technical Summary
Existing mobile payment methods cannot conduct digital currency transactions offline or without internet access, and the transaction security is low.
By setting up secure and isolated first and second execution environments in a mobile communication terminal, an offline payment code is generated and displayed. The offline payment code is generated using key factors, challenge factors, event factors, and computation factors, and then transmitted to the digital currency back-end system for verification and transaction processing through a secure channel.
It achieves security and reliability for digital currency transactions in offline scenarios, reduces transaction risks, and improves transaction security.
Smart Images

Figure CN2025108409_05022026_PF_FP_ABST
Abstract
Description
A digital currency transaction method and system based on a mobile communication terminal
[0001] Cross-reference to Related Applications
[0002] This application claims priority to Chinese Patent Application No. 2024110466444, filed on July 31, 2024, entitled “A digital currency transaction method and system based on a mobile communication terminal”, the disclosure of which is hereby incorporated by reference in its entirety as part or all of the present application. TECHNICAL FIELD
[0003] Embodiments of the present disclosure relate to a digital currency transaction method and system based on a mobile communication terminal. BACKGROUND
[0004] With the popularity of mobile payment, especially the rapid expansion of mobile payment applications (such as Alipay or WeChat) installed on mobile communication terminals, a receiving terminal supporting a mobile payment application can perform a payment transaction by scanning a barcode displayed on a mobile communication terminal in order to realize cashless payment and avoid the inconvenience of carrying a wallet and a bank card.
[0005] However, the existing mobile payment method cannot meet the demand for digital currency transactions using a mobile communication terminal in an offline and offline network scenario, and the transaction security is very low. SUMMARY
[0006] At least one embodiment of the present disclosure provides a mobile communication terminal for digital currency transaction, comprising a digital currency payment application executable in a first execution environment and a digital currency trusted application executable in a second execution environment, the second execution environment being securely isolated from the first execution environment: the digital currency payment application is configured to generate a time factor for calculating an offline payment code and send it to the digital currency trusted application; and receive the offline payment code from the digital currency trusted application, control the offline payment code to be displayed on the user interface for the receiving terminal to scan, and then make the receiving terminal send digital currency transaction information to the digital currency background system to perform digital currency transaction processing, wherein the digital currency transaction information includes code information of the offline payment code; the digital currency trusted application is configured to generate the offline payment code according to the key factor, the challenge factor, the event factor, the operation factor and the time factor; wherein the key factor, the challenge factor, the event factor and the operation factor are information received from the digital currency background system through a secure channel between the digital currency background system and the mobile communication terminal and stored in the second execution environment in advance, and are the same as the information stored by the digital currency background system.
[0007] For example, the mobile communication terminal according to at least one of the embodiments of the present disclosure, the digital currency trusted application is configured to generate the offline payment code by performing the following operations: encrypting the challenge factor, the time factor and the event factor by using the key factor to obtain a check code; calculating the check code and the operation factor to obtain a digest value, and calculating the digest value and the event factor to obtain a user index; obtaining a string of the offline payment code based on the user index and the check code, as code information of the offline payment code.
[0008] For example, the mobile communication terminal according to at least one of the embodiments of the present disclosure, the digital currency payment application is further configured to start timing from displaying the offline payment code, and if the timing reaches a set time, regenerate the time factor and send it to the digital currency trusted application, so that the digital currency trusted application regenerates a new offline payment code, and update the display of the new offline payment code sent by the digital currency trusted application.
[0009] For example, the mobile communication terminal according to at least one of the embodiments of the present disclosure, the second execution environment is a trusted execution environment or a secure element, and when the second execution environment is a secure element, the digital currency trusted application is a digital currency card application.
[0010] At least one of the embodiments of the present disclosure provides a digital currency background system, comprising: a key generation module configured to generate a key factor used to calculate an offline payment code, and the user service data corresponding to the mobile communication terminal is stored in association; a factor generation module configured to generate a challenge factor, an event factor and an operation factor used to calculate the offline payment code, and the user service data is stored in association; a communication module configured to establish a secure channel with the mobile communication terminal, and send the corresponding key factor, challenge factor, event factor and operation factor to the mobile communication terminal through the secure channel; a service management module configured to maintain the mapping relationship between the key factor, challenge factor, event factor, operation factor and user service data, and use the mapping relationship and the time factor generated by the digital currency background system to verify the received digital currency transaction information and complete the digital currency transaction processing, the digital currency transaction information includes code information of the offline payment code.
[0011] For example, the digital currency background system according to at least one embodiment of the present disclosure, the business management module is further configured to parse the code information of the offline payment code to determine a user index and a check code; calculate a digest value from the check code and a local operation factor, and calculate an event factor from the digest value and the user index; query corresponding user business data according to the event factor, and determine a key factor and a challenge factor corresponding to the user business data by using a mapping relationship; encrypt the challenge factor, a time factor generated by the digital currency background system, and the event factor by using the key factor to obtain the check code; and compare the calculated check code with the check code in the offline payment code, and perform digital currency transaction processing after the comparison is passed.
[0012] For example, the digital currency background system according to at least one embodiment of the present disclosure, the business management module is further configured to determine whether the current digital currency transaction is a password-free transaction or a small-amount transaction according to the digital currency transaction information.
[0013] At least one embodiment of the present disclosure provides a digital currency transaction system, comprising the mobile communication terminal provided in at least one embodiment above and the digital currency background system provided in at least one embodiment above.
[0014] At least one embodiment of the present disclosure provides a digital currency transaction method based on a mobile communication terminal, the mobile communication terminal comprising a digital currency payment application executable in a first execution environment and a digital currency trusted application executable in a second execution environment, the second execution environment being securely isolated from the first execution environment. The method comprises: the digital currency payment application generates a time factor for calculating an offline payment code and sends it to the digital currency trusted application; the digital currency trusted application generates the offline payment code according to a pre-stored key factor, a challenge factor, an event factor, an operation factor, and the time factor, and sends it to the digital currency payment application; the digital currency payment application receives the offline payment code from the digital currency trusted application and controls the offline payment code to be displayed on a user interface for scanning by a receiving terminal, so that the receiving terminal sends digital currency transaction information to a digital currency background system to perform digital currency transaction processing, wherein the digital currency transaction information comprises code information of the offline payment code; wherein the key factor, the challenge factor, the event factor, and the operation factor are information pre-received from the digital currency background system through a secure channel between the digital currency background system and the mobile communication terminal and stored in the second execution environment, and are the same as information stored by the digital currency background system.
[0015] For example, according to the digital currency transaction method of at least one embodiment of the present disclosure, the digital currency card application generates the offline payment code by performing the following steps: encrypting the challenge factor, the time factor and the event factor by using the key factor to obtain a check code; calculating the check code and the operation factor to obtain a digest value, and calculating the digest value and the event factor to obtain a user index; and obtaining a string of the offline payment code based on the user index and the check code as code information of the offline payment code.
[0016] For example, according to the digital currency transaction method of at least one embodiment of the present disclosure, the method further comprises: the digital currency payment application starts timing from displaying the offline payment code, and if the timing reaches a set time, the time factor is regenerated and sent to the digital currency trusted application, so that the digital currency trusted application regenerates a new offline payment code, and the new offline payment code sent by the digital currency trusted application is updated and displayed.
[0017] For example, according to the digital currency transaction method of at least one embodiment of the present disclosure, the method further comprises: the digital currency background system verifies the digital currency transaction information by using the mapping relationship of the locally stored key factor, challenge factor, event factor, operation factor and user business data, and the time factor generated by the digital currency background system, and completes the digital currency transaction processing.
[0018] For example, according to the digital currency transaction method of at least one embodiment of the present disclosure, the digital currency background system verifies the digital currency transaction information by performing the following steps: analyzing the code information of the offline payment code to determine the user index and the check code; calculating the digest value by calculating the check code and the local operation factor, and calculating the event factor by calculating the digest value and the user index; querying the corresponding user business data according to the event factor, and determining the key factor and the challenge factor corresponding to the user business data by using the mapping relationship; encrypting the challenge factor, the time factor generated by the digital currency background system and the event factor by using the key factor to obtain the check code; comparing the calculated check code with the check code in the offline payment code, and performing the digital currency transaction processing after the comparison is passed.
[0019] At least one embodiment of the present disclosure provides an electronic device, comprising: one or more processors; a memory storing one or more computer program modules; wherein the one or more computer program modules are configured to be executed by the one or more processors to implement the digital currency transaction method provided by at least one embodiment of the present disclosure.
[0020] At least one embodiment of the present disclosure provides a computer readable medium storing computer executable instructions, wherein the computer executable instructions are executed by one or more processors to implement the digital currency transaction method provided by at least one embodiment of the present disclosure. BRIEF DESCRIPTION OF DRAWINGS
[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings of the embodiments of the present disclosure will be briefly introduced below. Obviously, the drawings in the following description are only related to some embodiments of the present disclosure, not limiting the present disclosure.
[0022] FIG. 1 shows a block diagram of a digital currency transaction system according to at least one embodiment of the present disclosure;
[0023] FIG. 2 shows a block diagram of an exemplary mobile communication terminal according to at least one embodiment of the present disclosure;
[0024] FIG. 3 shows a block diagram of an exemplary digital currency background system according to at least one embodiment of the present disclosure;
[0025] FIG. 4 shows a flowchart of a mobile communication terminal-based digital currency transaction method according to at least one embodiment of the present disclosure;
[0026] FIG. 5 shows a flowchart of an exemplary mobile communication terminal-based digital currency transaction method according to at least one embodiment of the present disclosure;
[0027] FIG. 6 shows a schematic diagram of an electronic device according to at least one embodiment of the present disclosure;
[0028] FIG. 7 shows a schematic diagram of a computer-readable medium according to at least one embodiment of the present disclosure. DETAILED DESCRIPTION
[0029] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings of the embodiments of the present disclosure will be briefly introduced below. Obviously, the drawings in the following description are only related to some embodiments of the present disclosure, not limiting the present disclosure.
[0030] Unless otherwise defined, technical terms or scientific terms used herein shall have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs. The terms "first", "second", and similar terms are used herein to distinguish one element from another, and are not necessarily used in a sequence. Also, the terms "include", "comprise", and the like are used herein not to limit the components listed after these terms but to encompass the components listed after these terms and equivalents thereof. The terms "connected" and "coupled" and the like are used herein to indicate an electrical connection, either direct or indirect, between two or more elements, and can encompass wired and / or wireless connections.
[0031] Note that the examples described below are merely specific examples and are not intended to limit the embodiments of the present disclosure to specific shapes, hardware, connection relationships, operations, values, conditions, data, sequences, etc. shown and described. Those skilled in the art can construct more embodiments not mentioned in the present specification by reading the present specification using the concept of the present disclosure.
[0032] The terms used in the present disclosure are those general terms currently widely used in the art in consideration of the functions in the present disclosure, but these terms can be changed according to the intention of those skilled in the art, precedents, or new technology in the art. Also, specific terms can be selected by the applicant, and in this case, the detailed meanings thereof will be described in the detailed description of the present disclosure. Therefore, the terms used in the specification should not be understood as simple names, but based on the meanings of the terms and the overall description of the present disclosure.
[0033] Flowcharts are used in the present disclosure to illustrate operations performed by a system according to embodiments of the present disclosure. It should be understood that the foregoing or following operations are not necessarily performed in sequence. Rather, various steps can be processed in reverse order or simultaneously, as desired. Also, other operations can be added to these processes, or one or more steps can be removed from these processes.
[0034] First, the abbreviations and related terms involved in the present disclosure are defined and explained.
[0035] Mobile communication terminal: The application field of the mobile communication terminal is very wide, including devices related to communication technology. Specifically, it includes any electronic device that a user can conveniently carry or operate, which can also provide remote communication capabilities with a network. The mobile communication terminal can communicate using a mobile phone (wireless) network, a wireless data network (for example, 3G, 4G, 5G or similar network), Wi-Fi, Bluetooth, Bluetooth Low Energy (BLE), Wi-Max, or any other communication medium that can provide access to a network such as the Internet or a private network. Examples of mobile communication terminals include mobile phones (also known as cell phone terminals), tablet computers, netbooks, laptops, wearable devices (such as smartwatches), and the like. The mobile communication terminal can include any suitable hardware and software for performing such functions, and can also include multiple devices or components.
[0036] It should be noted that in the technical solutions provided by the present disclosure, the collection, collection, updating, analysis, processing, use, transmission, storage, etc. of user personal information involved in the technical solutions comply with relevant laws and regulations, are used for legal purposes, and do not violate public order and good customs. Necessary measures are taken for user personal information to prevent illegal access to user personal information data, and the security of user personal information, network security and national security are maintained.
[0037] In the related art, users usually install a payment application on a mobile communication terminal, register a service, and in a networked scenario, can use the mobile payment application to display a barcode on the mobile communication terminal, and a receiving terminal performs a financial transaction by scanning the barcode. However, this method cannot be applied to digital currency transactions in offline scenarios, and in addition, the security of the barcode randomly generated by the mobile communication terminal online is poor and cannot meet the security requirements of digital currency transactions.
[0038] At least one embodiment of the present disclosure provides a mobile communication terminal-based digital currency transaction method, system, electronic device and storage medium, which can use a mobile communication terminal to perform a digital currency transaction in an offline scenario by generating an offline payment code. Since the execution environment of the generated offline payment code has high security, the transaction risk in the offline scenario is effectively reduced, and the transaction security is improved.
[0039] The embodiments of the present disclosure and some examples thereof will be described in detail below with reference to the accompanying drawings.
[0040] FIG. 1 shows a block diagram of a mobile communication terminal-based transaction system 100 according to at least one embodiment of the present disclosure. As shown in FIG. 1, the transaction system 100 mainly includes a mobile communication terminal 102, a receiving terminal 104, and a digital currency background system 108.
[0041] The mobile communication terminal 102 provides a first execution environment and a second execution environment which is securely isolated from the first execution environment, the first execution environment having an executable digital currency payment application therein, and the second execution environment having an executable digital currency trusted application therein. The first execution environment runs a main operating system and is an environment in which regular applications run on the mobile communication terminal 102, for example, a Rich Execution Environment (REE). The second execution environment is securely isolated from the first execution environment, and data exchange between the two environments is limited, and the second execution environment can be, for example, a Trusted Execution Environment (TEE) or a Secure Element. Sensitive data such as keys can be securely stored in the second execution environment without the risk of being leaked to the first execution environment, and even if the mobile communication terminal 102 is infected with malware, a third party cannot steal data stored in the second execution environment.
[0042] In one example, the data processing related to the digital currency transaction that is generally involved in the mobile communication terminal 102 is mainly the digital currency payment application running in the REE and the digital currency trusted application running in the second execution environment. The digital currency payment application displays a user interface during the digital currency transaction through the display screen of the mobile communication terminal, and can mainly display an offline payment code on the user interface so as to complete the digital currency transaction by scanning the code by a terminal. If the second execution environment is a secure element SE, the digital currency trusted application is a digital currency card application, which is responsible for providing management of digital currency payment behavior and has functions including, for example, wallet management, wallet transaction and wallet query, and its operation relies on a chip operating system COS in the secure element SE. Unlike the digital currency payment application, the digital currency card application generally does not have a user interface facing users. If the second execution environment is a trusted execution environment TEE, the digital currency trusted application can perform operations similar to those executable by the digital currency card application, i.e., at least generate an offline payment code. In the following specific description, the embodiments of the present disclosure will take the secure element as the second execution environment and the digital currency card application running in the secure element as an example to illustrate the method flow.
[0043] FIG. 2 shows a block diagram of an exemplary mobile communication terminal according to at least one embodiment of the present disclosure. As shown in FIG. 2, the mobile communication terminal 102 includes a digital currency payment application 1021 running in a REE, a secure element 102A (an example of a second execution environment) having a data storage area (not shown) and a digital currency card application 1023, and a communication module 1025.
[0044] For example, in some embodiments of the present disclosure, the digital currency payment application 1021 is configured to generate a time factor for calculating the offline payment code and send it to the digital currency card application 1023; and receive the offline payment code from the digital currency card application 1023, control the offline payment code to be displayed on the user interface (see the left side of FIG. 1) for scanning by the receiving terminal 104, so that the receiving terminal 104 sends the digital currency transaction information to the digital currency background system 108, wherein the digital currency transaction information includes the code information of the offline payment code.
[0045] In one example, the time factor can be the current time obtained from the mobile communication terminal (e.g. from other storage area than the data storage area), for example, the UTC (Coordinated Universal Time) time. The digital currency payment application 1021 sends the UTC time to the digital currency card application 1023 to calculate and generate the offline payment code. Considering the delay of information transmission, there is a time difference between the UTC time received by the background system 108 and the UTC time when the mobile communication terminal generates the offline payment code, so a time window can be set in advance to ensure that the time factor used by the background system 108 to verify the payment code is consistent with the time factor of the mobile communication terminal 102. For example, in other examples, after obtaining the UTC time, the digital currency payment application 1021 can process the UTC time and then send it to the digital currency card application 1023 for calculating the payment code, for example, the time window is set to 60 seconds, the result obtained by dividing the acquired UTC time in seconds by the time window is sent to the digital currency card application 1023 to calculate the payment code. When the payment code is verified by the digital currency background system 108, the system 108 will also divide the current UTC time of the system by the time window (60 seconds), and the result obtained by the calculation will be involved in the verification of the payment code. Although there will be a certain delay in the transmission process of the digital currency transaction information, by setting the time window, the current processed time factor of the system 108 and the mobile communication terminal can be consistent, and the verification pass rate can be improved. In addition, the processing of the UTC time can also be performed by the digital currency card application 1023, and the embodiments of the present disclosure are not limited.
[0046] For example, the offline payment code can include any image or symbol generated in an offline scenario that can be read by an electronic device for a mobile communication terminal to parse and manipulate. Some examples include a bar code, a quick response (QR) code, a military specification UID code, and any other suitable code. In one example, the code information of the offline payment code can include a string composed of a check code and a user index, which is used to be displayed to a terminal for code scanning when a user makes a payment by digital currency. Moreover, the offline payment code is preferably a dynamic offline QR code or bar code, which can be dynamically updated according to a set time during the display of the QR code or bar code to protect the safety of funds. When transmitted to the digital currency background system 108, the code information of the offline payment code can be part of the transaction information, which is used to implement the security check of the background system 108 on the transaction information.
[0047] In one example, the data storage area stores a wallet SEID, a wallet ID, wallet control information, wallet transaction related information, a key, and a plurality of factors for generating an offline payment code, etc. The wallet ID can be a real wallet account ID or an associated code of the wallet account, and the associated code is one-to-one corresponding to the wallet account to ensure the safety of the wallet data. The key includes a symmetric key (for example, a key factor for generating an offline payment code) and an asymmetric key. In this example, the factors for generating an offline payment code include a challenge factor, an event factor, and a calculation factor in addition to the key factor. Based on this, the digital currency card application 1023 is mainly configured to calculate and generate an offline payment code to be displayed in a code scanning payment mode according to the key factor, the challenge factor, the event factor, the calculation factor, and the current time factor.
[0048] For example, in some embodiments of the present disclosure, the digital currency card application 1023 is configured to generate an offline payment code by performing the following operations: encrypting the challenge factor, the time factor, and the event factor using the key factor to obtain a check code; calculating a digest value from the check code and the calculation factor, and calculating the digest value with the event factor to obtain a user index; and obtaining a string of the offline payment code based on the user index and the check code as the code information of the offline payment code.
[0049] In one example, the check code is calculated by operating and calculating the key factor, the challenge factor, the time factor, and the event factor through a symmetric key algorithm; the digest value is calculated from the check code and the calculation factor using a digest algorithm, and then the digest value is logically operated (such as XOR operation) with the event factor to obtain the user index; finally, the user index and the check code are spliced according to a fixed character splicing order to obtain an offline payment code string. In this way, the generation of an offline payment code is completed. The symmetric key algorithm can be replaced by other encryption algorithms, and the digest algorithm includes various existing algorithms, such as MD5 algorithm, SHA-2 algorithm, MAC algorithm, and SM3 algorithm, etc.
[0050] For example, in some embodiments of the present disclosure, the digital currency payment application 1021 is further configured to start timing from the display of the offline payment code, and if the timing reaches a set time, the time factor is regenerated and sent to the digital currency card application 1023, so that the digital currency card application 1023 regenerates a new offline payment code, and the new offline payment code sent by the digital currency card application 1023 is updated and displayed. For example, the set time can be 60 seconds, and such setting can effectively ensure the safety of the funds.
[0051] The communication module 1025 is mainly connected with the receiving terminal 104, and the communication method it follows can be Bluetooth, near field NFC radio frequency, WIFI, UWB, and mobile network, etc. In some examples, the communication module 1025 establishes a secure channel with the digital currency background system 108, and receives the same key factor, challenge factor, event factor, and operation factor stored in the background system 108 through the secure channel. Among them, the challenge factor can be a random number, the event factor can be wallet account information, and the operation factor is set for different operating agencies (digital currency background system).
[0052] It should be noted that the "secure channel" can be a network channel between two entities (such as the background and the mobile communication terminal), which can allow two entities to communicate with each other through the secure channel without being eavesdropped by a third entity or being disguised by a third entity as one of the two intended entities participating in the secure communication. The establishment of a secure channel can securely transmit sensitive information between two entities, such as key factors, challenge factors, event factors, and operation factors used to generate offline payment codes.
[0053] In some examples, the "secure channel" between the digital currency background system 108 and the mobile communication terminal 102 (communication module 1025) will perform integrity protection processing on the key factors, challenge factors, event factors, and operation factors used to generate offline payment codes when transmitting. For example, the digital currency background system 108 and the mobile communication terminal 102 will save the keys for encrypting and decrypting the transmitted data, and use the same encryption algorithm for encryption to prevent third parties from directly obtaining the offline payment code generation key and operation factor after stealing.
[0054] For example, the receiving terminal 104 can be a terminal device that receives DC / EP services, such as a point of sale (POS) terminal or a mobile communication terminal (such as a mobile phone) with a digital currency payment application APP. The DC / EP service refers to a digital currency / electronic payment service, which is a technical ecological system for supporting the operation of digital renminbi. In addition to being able to receive DC / EP services, the receiving terminal 104 can also receive other electronic payment services. The receiving terminal 104 can adjust the transaction mode according to the user's settings or the transaction counterpart. In the embodiments of the present disclosure, the receiving terminal 104 includes a sensor (such as a camera and / or a visual sensor), which scans the offline payment code generated by the mobile communication terminal 102 and transmits it to the background system 108 for processing to complete the digital currency transaction.
[0055] For example, messages between the receiving terminal 104 and the background system 108 can be sent through a communication network using a secure communication protocol, such as but not limited to: File Transfer Protocol (FTP), Hypertext Transfer Protocol (HTTP), Hypertext Transfer Protocol Secure (HTTPS), etc. The communication network can include any one and / or combination of the following: direct interconnection, the Internet, a local area network (LAN), a metropolitan area network (MAN), a secure custom connection, a wide area network (WAN), a wireless network, etc.
[0056] In the embodiments of the present disclosure, the digital currency background system 108 is a background system that supports digital currency payment functions, which can include a receiving and paying operation agency background server and an interconnection platform, supporting intra-agency and cross-agency digital currency transactions. The digital currency background system 108 can be conventional in terms of hardware, but can be controlled by software to facilitate its operation as described below. For example, the digital currency background system 108 can be composed of server computer hardware, which will not be described in detail.
[0057] In most cases, the digital currency background system 108 can include a receiving agency background and a payment agency background, which can both process digital currency transactions within the agency and generate transaction execution result information to return to the mobile communication terminal 104 for user confirmation after the mobile communication terminal 104 is connected. In order to facilitate information exchange between multiple operating agencies, in the embodiments of the present disclosure, the digital currency background system 108 also includes an interconnection system or server that communicates with the systems or servers corresponding to each operating agency.
[0058] For example, in the embodiments of the present disclosure, when the payer institution identifier, the payee institution identifier and the transaction amount in the transaction information are used to conduct a digital currency transaction, if the operating institutions corresponding to the payer institution identifier and the payee institution identifier belong to the same operating institution, the transaction is conducted as an intra-institution transaction; if the operating institutions corresponding to the payer institution identifier and the payee institution identifier do not belong to the same operating institution, a transaction request is sent through an interconnection platform to conduct a cross-institution transaction.
[0059] FIG. 3 shows a block diagram of an exemplary digital currency background system according to at least one embodiment of the present disclosure. For the digital currency background system being one of an accepting institution background and a payer institution background, the functions of each group of modules of the digital currency background system are described below with reference to FIG. 3.
[0060] As shown in FIG. 3, the digital currency background system 108 includes a key generation module 108A, a factor generation module 108B, a business management module 108C and a communication module 108D. The key generation module 108A is configured to generate a key factor used to calculate an offline payment code, and the user business data corresponding to the mobile communication terminal 102 is stored in association. The factor generation module 108B is configured to generate a challenge factor, an event factor and an operation factor used to calculate the offline payment code, and the user business data (such as the account information of the wallet ID) is stored in association. The communication module 108D is configured to establish a secure channel with a hardware wallet, and send the corresponding key factor, challenge factor, event factor and operation factor to the hardware wallet through the secure channel. The business management module 108C is configured to maintain a mapping relationship of the key factor, challenge factor, event factor, operation factor and user business data, and use the mapping relationship and a time factor generated by the digital currency background system to check the received digital currency transaction information of the scan code payment mode and complete the digital currency transaction processing. The digital currency transaction data includes the code information of the offline payment code.
[0061] In one example, as described above, the time factor generated by the digital currency background system is obtained by dividing the current system UTC time by a time window (such as 60 seconds), and then the time factor is used for the code verification operation described later.
[0062] For example, in at least one embodiment of the present disclosure, the business management module 108C is further configured to verify the digital currency transaction information by the following steps: parsing the code information of the offline payment code to determine the user index and the verification code; calculating the digest value of the verification code and the local operation factor, and calculating the event factor from the digest value and the user index; querying the corresponding user business data according to the event factor, and determining the key factor and the challenge factor corresponding to the user business data by using the mapping relationship; encrypting the challenge factor, the time factor generated by the digital currency background system, and the event factor by using the key factor to obtain the verification code; comparing the calculated verification code with the verification code in the offline payment code, and performing digital currency transaction processing after the comparison is passed. Then, return the execution result of the transaction success to the receiving terminal 104.
[0063] In one example, first, the string of the received offline payment code is decomposed into the user index and the verification code according to the fixed character splicing order. Then, the digest algorithm is performed on the verification code and the operation factor stored locally by the institution, and the event factor is obtained by performing XOR operation on the calculated digest value and the user index. The mapping relationship corresponding to the account information is obtained according to the event factor (such as the wallet account information), and the key factor, the challenge factor, etc. are determined therefrom; the verification code is obtained by performing symmetric key algorithm operation on the key factor, the challenge factor, the time factor, and the event factor. The calculated verification code is compared with the verification code in the offline payment code, and if they are consistent, it is considered that the comparison is passed, and the related deduction business is performed.
[0064] For example, in at least one embodiment of the present disclosure, the business management module 108C is further configured to determine whether the current digital currency transaction belongs to a password-free transaction or a small-amount transaction according to the digital currency transaction data. Specifically, the business management module 108C can determine whether the hard wallet defaults a password-free transaction or a small-amount transaction (or a limited-amount transaction) according to the hard wallet identifier in the digital currency transaction data, and if it is consistent, the corresponding transaction processing is performed, otherwise the result of the transaction execution failure is returned to the receiving terminal 104. In this way, transaction risk control can be performed.
[0065] The digital currency transaction scheme based on the mobile communication terminal of the embodiments of the present disclosure can realize the execution of the digital currency transaction by the mobile communication terminal in the offline scene, and has higher transaction security compared with the existing technical scheme.
[0066] FIG. 4 shows a flowchart of a transaction method based on a digital currency hard wallet according to at least one embodiment of the present disclosure. The steps of the method will be described below with reference to FIG. 4.
[0067] In step S401, the digital currency payment application generates a time factor for calculating an offline payment code and sends it to the digital currency trusted application;
[0068] In step S403, the digital currency trusted application generates the offline payment code according to the pre-stored key factor, challenge factor, event factor, operation factor and time factor, and sends the offline payment code to the digital currency payment application;
[0069] In step S405, the digital currency payment application receives the offline payment code from the digital currency trusted application, and controls the offline payment code to be displayed on the user interface for scanning by the receiving terminal, so that the receiving terminal sends the digital currency transaction information including the code information of the offline payment code to the digital currency background system to perform the digital currency transaction processing.
[0070] In the digital currency background system, when the digital currency transaction data in the scan code payment mode is received, the code information of the offline payment code is checked by using the mapping relationship between the key factor, challenge factor, event factor, operation factor and user business data maintained by the digital currency background system, and the digital currency transaction processing is completed after the checking is passed.
[0071] The embodiment of the method shown in FIG. 4 is basically similar to the foregoing embodiment of the transaction system based on the mobile communication terminal, and thus will not be described here again. For the relevant part, please refer to the description in the system embodiment part.
[0072] FIG. 5 shows a flowchart of an exemplary transaction method based on a mobile communication terminal according to at least one embodiment of the present disclosure.
[0073] First, the digital currency payment application 1024 receives the instruction of generating the offline QR code issued by the user through the user interface of the display screen 1022, obtains the current UTC time of the terminal 102, and processes the time to generate the time factor, which is sent to the digital currency card application 1021 of the security unit SE of the mobile communication terminal 102.
[0074] Then, the digital currency card application 1021 returns the offline QR code generated by the key factor, event factor, challenge factor, operation factor and time factor to the digital currency payment application 1024. Specifically, the symmetric key algorithm can be used to calculate the check code from the key factor, challenge factor, time factor and event factor, then the digest algorithm is used to calculate the check code and operation factor, and the calculation result is XORed with the event factor to obtain the user index; finally, the user index and the check code are spliced according to the fixed character splicing order to obtain the string of the offline payment code.
[0075] Then, the digital currency payment application 1024 supports offline QR code display for scanning code offline payment. The digital currency receiving terminal 104 scans the offline QR code to collect and send to the digital currency background system 108. The digital currency background system 108 shares the key factor, event factor, challenge factor and operation factor with the mobile communication terminal 102, and uses the current time factor of the system to perform offline QR code verification. After verification, the digital currency transaction is completed, the corresponding deduction processing is performed, and the execution result is returned to the receiving terminal 104. After the mobile communication terminal 104 is connected to the network, the execution result of the digital currency transaction is sent to the mobile communication terminal 104 for user confirmation.
[0076] It should be noted that during the display of the offline QR code, if more than 60S, the digital currency payment application 1024 reacquires the offline QR code and displays it, automatically acquires a new offline QR code, and ensures transaction security.
[0077] It should be noted that the above application scenario is only exemplary, so as to describe one or more aspects of the present disclosure in specific scenarios, but these aspects are not necessarily required, and various modifications can be made to the application scenario, and the embodiments of the present disclosure are not limited.
[0078] At least some embodiments of the present disclosure also provide an electronic device. FIG. 6 shows a schematic diagram of an electronic device 600 according to at least one embodiment of the present disclosure.
[0079] As shown in FIG. 6, the electronic device 600 includes one or more processors 610 and a memory 620. The memory 620 includes one or more computer program modules 621. The one or more computer program modules 621 are stored in the memory 620 and configured to be executed by the processor 610, and the one or more computer program modules 621 include instructions for executing the mobile communication terminal based digital currency transaction method and additional aspects thereof according to at least one embodiment of the present disclosure, which when executed by the processor 610, can perform one or more steps of the mobile communication terminal based digital currency transaction method and additional aspects thereof according to at least one embodiment of the present disclosure. The memory 620 and the processor 610 can be interconnected by a bus system and / or other forms of connection mechanism (not shown). For example, the bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc.
[0080] The processor 610 may, for example, be a central processing unit (CPU), a digital signal processor (DSP), or other form of processing unit having data processing and / or program execution capabilities, such as a field-programmable gate array (FPGA), etc. The processor 610 may be a general purpose processor or a special purpose processor, and can control other components in the electronic device 600 to perform desired functions.
[0081] The memory 620 may, for example, include any combination of one or more computer program products. The computer program product may include various forms of computer-readable storage media having computer-readable program instructions stored therein. The computer-readable storage media may, for example, include volatile memory and / or non-volatile memory. The volatile memory may, for example, include random access memory (RAM), cache memory, etc. The non-volatile memory may, for example, include read-only memory (ROM), hard disk, erasable programmable ROM (EPROM), compact disk ROM (CD-ROM), USB memory, flash memory, etc. One or more computer program modules 621 may be stored on the computer-readable storage media. The processor 610 may execute the one or more computer program modules 621 to implement various functions of the electronic device 600. The computer program modules include a plurality of computer-executable instructions. Various application programs and various data used and / or generated by the application programs, etc. may also be stored in the computer-readable storage media.
[0082] The electronic device 600 may, for example, further include an input device such as a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device such as a liquid crystal display, a speaker, a vibrator, etc.; a storage device such as a magnetic tape, a hard disk (HDD or SDD), etc.; and a communication device such as a LAN card, a modem, etc. The communication device may allow the electronic device 600 to perform wireless or wired communication with other devices to exchange data, perform communication processing via a network such as the Internet. A driver is connected to the I / O interface as needed. A removable storage medium such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is mounted on the driver as needed, so that a computer program read out from the removable storage medium is installed in the storage device as needed.
[0083] For example, the electronic device 600 can further include a peripheral interface (not shown in the figure) and the like. The peripheral interface can be various types of interfaces, such as a USB interface, a lighting interface, and the like. The communication device can communicate with a network and other devices through wireless communication, the network being, for example, the Internet, an intranet, and / or a wireless network such as a cellular telephone network, a wireless local area network (LAN), and / or a metropolitan area network (MAN). The wireless communication can use any of a plurality of communication standards, protocols, and technologies, including but not limited to Global System for Mobile Communications (GSM), Enhanced Data GSM Environment (EDGE), Wideband Code Division Multiple Access (W-CDMA), Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Bluetooth, Wi-Fi (e.g., based on IEEE 802.11a, IEEE 802.11b, IEEE 802.11g, and / or IEEE 802.11n standards), Voice over Internet Protocol (VoIP), Wi-MAX, protocols for email, instant messaging, and / or Short Message Service (SMS), or any other suitable communication protocol.
[0084] The electronic device 600 may, for example, be a system on chip (SOC) or a device including the SOC, such as, for example, a mobile phone, a tablet computer, a notebook computer, an e-book, a game console, a television, a digital photo frame, a navigator, a household appliance, a communication base station, an industrial controller, a server, or any device, and can also be any data processing apparatus and combination of hardware, and embodiments of the present disclosure are not limited thereto. The specific functions and technical effects of the electronic device 600 can be referred to the description of the method for digital currency transaction based on a mobile communication terminal and additional aspects thereof according to at least one embodiment of the present disclosure above, and will not be described here again.
[0085] FIG. 7 shows a schematic diagram of a computer readable medium 700 according to at least one embodiment of the present disclosure.
[0086] As shown in FIG. 7, the computer readable medium 700 stores computer instructions 710 which, when executed by a processor, perform one or more steps of the method for digital currency transaction based on a mobile communication terminal and additional aspects thereof as described above.
[0087] Exemplarily, when the program code is read by a computer, the computer can execute the program code stored in the computer storage medium to perform one or more steps to implement, for example, the method for digital currency transaction based on a mobile communication terminal and additional aspects thereof according to at least one embodiment of the present disclosure.
[0088] Exemplarily, the computer readable medium can include a memory card of a smart phone, a memory component of a tablet computer, a hard disk of a personal computer, a random access memory (RAM), a read only memory (ROM), an erasable programmable read only memory (EPROM), a compact disc read only memory (CD-ROM), a flash memory, and other computer readable medium or any combination thereof.
[0089] At least some embodiments in the present specification are described in a progressive manner, and each embodiment focuses on the difference from other embodiments, and the same or similar parts between embodiments can be referred to each other.
[0090] It should be noted that, in this document, the relationship terms such as first, second and the like are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. The terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements not only includes those elements, but also further includes other elements not explicitly listed, or further includes elements inherent to such process, method, article or equipment. Without more limitations, the elements defined by the statement "include" do not exclude the presence of other same elements in the process, method, article or equipment including the elements.
[0091] For the present disclosure, the following points need to be explained:
[0092] (1) The drawings of the embodiments of the present disclosure only involve the structures involved in the embodiments of the present disclosure, and other structures can refer to the general design.
[0093] (2) In the case of no conflict, the embodiments of the present disclosure and the features in the embodiments can be combined with each other to obtain new embodiments.
[0094] The above is only an exemplary embodiment of the present disclosure, not for limiting the protection scope of the present disclosure, and the protection scope of the present disclosure is determined by the appended claims. Industrial applicability:
[0095] The scheme provided by the embodiments of the present disclosure can be applied to the field of mobile payment. In the embodiments of the present disclosure, a mobile communication terminal for digital currency transaction includes a digital currency payment application executable in a first execution environment and a digital currency trusted application executable in a second execution environment, the second execution environment being securely isolated from the first execution environment. The digital currency payment application is configured to generate a time factor for calculating an offline payment code and send the time factor to the digital currency trusted application, and receive the offline payment code from the digital currency trusted application and control the offline payment code to be displayed on a user interface for scanning by a receiving terminal, so that the receiving terminal sends digital currency transaction information to a digital currency background system to perform digital currency transaction processing, wherein the digital currency transaction information includes code information of the offline payment code. The digital currency trusted application is configured to generate the offline payment code according to a key factor, a challenge factor, an event factor, an operation factor and the time factor. The key factor, the challenge factor, the event factor and the operation factor are information received from the digital currency background system through a secure channel between the digital currency background system and the mobile communication terminal and stored in the second execution environment in advance, and are the same as the information stored by the digital currency background system. The digital currency transaction scheme based on the mobile communication terminal according to the embodiments of the present disclosure can perform digital currency transaction by using the mobile communication terminal in an offline scenario, and the transaction security is higher compared with the existing technical scheme.
Claims
1. A mobile communication terminal for digital currency transaction, comprising a digital currency payment application executable in a first execution environment and a digital currency trusted application executable in a second execution environment, the second execution environment being securely isolated from the first execution environment, and the digital currency trusted application being configured to: generate an offline payment code based on a key factor, a challenge factor, an event factor, an operation factor and a time factor; and receive the offline payment code from the digital currency trusted application, and control the offline payment code to be displayed on a user interface for scanning by a receiving terminal, and further cause the receiving terminal to send digital currency transaction information to a digital currency background system to perform a digital currency transaction process, wherein the digital currency transaction information comprises code information of the offline payment code. The digital currency payment application is configured to generate a time factor for calculating an offline payment code and send to the digital currency trusted application. 2.The mobile communication terminal of claim 1, wherein the digital currency trusted application is configured to generate the offline payment code by performing the following operations: encrypting the challenge factor, the time factor and the event factor using the key factor to obtain a check code; calculating the check code and the operation factor to obtain a digest value, and calculating the digest value and the event factor to obtain a user index; and obtaining a string of the offline payment code based on the user index and the check code as the code information of the offline payment code. 3.The mobile communication terminal of claim 1, wherein the digital currency payment application is further configured to start timing from when the offline payment code is displayed, and if the timing reaches a set time, generate a new time factor and send it to the digital currency trusted application, so that the digital currency trusted application generates a new offline payment code, and the digital currency payment application updates and displays the new offline payment code sent by the digital currency trusted application. 4.The mobile communication terminal of any one of claims 1 to 3, wherein the second execution environment is a trusted execution environment or a secure element, and when the second execution environment is the secure element, the digital currency trusted application is a digital currency card application. 5.A digital currency background system, comprising: a key generation module configured to generate a key factor used to calculate an offline payment code, and store the key factor in association with user service data corresponding to a mobile communication terminal; a factor generation module configured to generate a challenge factor, an event factor and an operation factor used to calculate the offline payment code, and store the challenge factor, the event factor and the operation factor in association with the user service data; and a communication module configured to establish a secure channel with the mobile communication terminal, and send the corresponding key factor, challenge factor, event factor and operation factor to the mobile communication terminal through the secure channel. a business management module configured to maintain a mapping relationship of the key factor, the challenge factor, the event factor, the operation factor and the user business data, and to use the mapping relationship and a time factor generated by the digital currency background system to check received digital currency transaction information and complete digital currency transaction processing, the digital currency transaction information including code information of the offline payment code. 6.The digital currency background system of claim 5, wherein, the business management module is further configured to check the digital currency transaction information by performing the following operations: parsing the code information of the offline payment code to determine a user index and a check code; calculating a digest value from the check code and the local operation factor, and calculating an event factor from the digest value and the user index; querying corresponding user business data according to the event factor, and determining a key factor and a challenge factor corresponding to the user business data using the mapping relationship; encrypting the challenge factor, the time factor generated by the digital currency background system and the event factor using the key factor to obtain a check code; comparing the calculated check code with the check code in the offline payment code, and performing digital currency transaction processing after the comparison is passed. 7.The digital currency background system of claim 5, wherein, the business management module is further configured to determine whether the current digital currency transaction is a password-free transaction or a small-amount transaction according to the digital currency transaction information. 8.A digital currency transaction system, comprising: the mobile communication terminal of any one of claims 1-4, and the digital currency background system of any one of claims 5-7. 9.A digital currency transaction method based on a mobile communication terminal, the mobile communication terminal including a digital currency payment application executable in a first execution environment and a digital currency trusted application executable in a second execution environment, the second execution environment being securely isolated from the first execution environment, the method comprising: the digital currency payment application generating a time factor for calculating an offline payment code and sending to the digital currency trusted application; the digital currency trusted application generating an offline payment code according to a pre-stored key factor, challenge factor, event factor, operation factor and the time factor, and sending to the digital currency payment application; the digital currency payment application receiving the offline payment code from the digital currency trusted application, and controlling the offline payment code to be displayed on a user interface for scanning by a receiving terminal, so that the receiving terminal sends digital currency transaction information to a digital currency background system to perform digital currency transaction processing, wherein the digital currency transaction information includes code information of the offline payment code; wherein the key factor, the challenge factor, the event factor and the operation factor are information received from the digital currency background system through a secure channel between the digital currency background system and the mobile communication terminal and stored in the second execution environment in advance, and are the same as information stored by the digital currency background system.
10. The method of a digital currency transaction of claim 9, wherein, The digital currency card application generates the offline payment code by performing the following steps: The challenge factor, the time factor and the event factor are encrypted by the key factor to obtain a check code; The check code and the operation factor are calculated to obtain a digest value, and the digest value and the event factor are calculated to obtain a user index; Based on the user index and the check code, a string of the offline payment code is obtained as code information of the offline payment code.
11. The method of digital currency transaction of claim 9, wherein, Further comprising: The digital currency payment application starts timing from displaying the offline payment code, and if the timing reaches the set time, the time factor is regenerated and sent to the digital currency trusted application, so that the digital currency trusted application regenerates a new offline payment code, and the new offline payment code sent by the digital currency trusted application is updated and displayed.
12. The method of digital currency transaction of claim 9, wherein, Further comprising: The digital currency background system uses the mapping relationship of the key factor, the challenge factor, the event factor, the operation factor and the user business data stored locally, and the time factor generated by the digital currency background system to verify the digital currency transaction information and complete the digital currency transaction processing.
13. The method of digital currency transaction of claim 12, wherein, The digital currency background system verifies the digital currency transaction information by the following steps: The code information of the offline payment code is parsed to determine the user index and the check code; The check code and the local operation factor are calculated to obtain a digest value, and the digest value and the user index are calculated to obtain an event factor; According to the event factor, the corresponding user business data is queried, and the mapping relationship is used to determine the key factor and the challenge factor corresponding to the user business data; The challenge factor, the time factor generated by the digital currency background system and the event factor are encrypted by the key factor to obtain a check code; The calculated check code is compared with the check code in the offline payment code, and after the comparison is passed, the digital currency transaction processing is performed.
14. An electronic device comprising: one or more processors; a memory storing one or more computer program modules, wherein the one or more computer program modules are configured to be executed by the one or more processors to implement the method according to any one of claims 9-13.
15. A computer readable medium storing computer executable instructions, wherein, Computer executable instructions are executed by one or more processors to implement the method according to any one of claims 9-13.
Citation Information
Patent Citations
Method and device for generating payment code
CN109146470A
Offline payment method based on digital currency, terminal and agent delivery device
CN109493016A
Offline payment code generation method, an offline payment code scanning method, an offline payment code generation device and an offline payment code scanning device
CN112541761A
Digital wallet security framework system based on security unit and trusted execution environment
CN114465726A
Offline virtual currency transaction
US20150046337A1