Digital currency withdrawal systems, methods and devices
By facilitating information exchange between the user terminal application and the hardware wallet application, the problem of the hardware wallet application being unable to meet both manual and automatic withdrawal needs has been solved. This enables secure and reliable digital currency withdrawal functionality, supports multiple withdrawal paths and conditions, and meets the diverse needs of users.
Patent Information
- Application Number
- CN202111506707.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-10
- Publication Date
- 2026-11-10
- Estimated Expiration
- 2041-12-10
AI Technical Summary
Existing hardware wallet applications based on security chips cannot meet users' needs for functions such as manual and automatic withdrawals, and also have issues with security and lightweight requirements.
By enabling information exchange between the user's terminal application and the hardware wallet application, the terminal application monitors the automatic withdrawal conditions and generates withdrawal instructions, while the hardware wallet application selects the target digital currency and exchanges or transfers it with the target operating institution, supporting withdrawals to bank cards or other wallet applications.
It implements secure and reliable withdrawal functionality for hardware wallet applications, supporting both manual and automatic withdrawals. It meets the automatic withdrawal requirements for regular, excessive, and abnormal transactions, satisfying business needs in various real-world scenarios.
Smart Images

Figure CN116258487B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital currency technology, and in particular to a digital currency withdrawal system, method and apparatus. Background Technology
[0002] A digital yuan hardware wallet is a secure chip-based digital yuan wallet used to store digital yuan cryptocurrency strings and transaction records, and is applied in various transaction modes. In real-world scenarios, it may be necessary to withdraw digital yuan from the hardware wallet application to a bank card or other wallet applications of the same user. It also needs to implement functions such as manual withdrawal and automatic withdrawal to meet users' needs for withdrawals at any time, scheduled automatic withdrawals, automatic withdrawals for exceeding limits, and automatic withdrawals to handle abnormal transactions. However, secure chip-based hardware wallet applications have high requirements for security and lightweight operation, meaning that currently there is no hardware wallet application withdrawal solution that can solve all these needs. Summary of the Invention
[0003] In view of this, embodiments of the present invention provide a digital currency withdrawal system, method, and apparatus that can realize manual and automatic withdrawal functions of hardware wallet applications, while ensuring the security and lightweight nature of hardware wallet applications.
[0004] To achieve the above objectives, according to one aspect of the present invention, a digital currency withdrawal system is provided.
[0005] The digital currency withdrawal system of this invention includes: a hardware wallet application installed on a security chip of a user terminal, a terminal application installed on the user terminal, and a target operating institution associated with the hardware wallet application; the terminal application, in response to a user inputting a withdrawal command or detecting that pre-configured automatic withdrawal conditions are met, generates a withdrawal instruction carrying a withdrawal amount and sends it to the hardware wallet application; the hardware wallet application selects at least one target digital currency from the currently stored digital currencies with a total amount not less than the withdrawal amount and returns it to the terminal application; the terminal application generates a withdrawal request carrying the target digital currency, the withdrawal amount, and a withdrawal path and sends it to the target operating institution, so that the target operating institution can exchange or transfer the digital currency with the withdrawal amount according to the withdrawal path.
[0006] Optionally, the withdrawal command includes the withdrawal amount and the withdrawal path; when the terminal application generates a withdrawal instruction by monitoring automatic withdrawal conditions, the withdrawal amount and withdrawal path in the withdrawal request are determined by the automatic withdrawal strategy pre-configured in the terminal application.
[0007] Optionally, the withdrawal path includes: withdrawal to the user's bank card account and / or withdrawal to another wallet application of the user that is different from the hardware wallet application; the automatic withdrawal conditions include at least one of the following: the current time point reaches a preset automatic withdrawal time point, the total amount of digital currency currently stored in the hardware wallet application is greater than a preset first amount threshold, the number of abnormal transactions occurring in the hardware wallet application within a preset first time interval is greater than a preset number threshold, and the total amount of abnormal transactions generated by the hardware wallet application within a preset second time interval is greater than a preset second amount threshold.
[0008] Optionally, after receiving the withdrawal instruction, the hardware wallet application may: determine all currently stored digital currencies as the target digital currency; or, determine at least one digital currency among the currently stored digital currencies whose total amount is not less than the withdrawal amount and whose total amount is the smallest as the target digital currency; or, determine at least one digital currency among the currently stored digital currencies whose total amount is not less than the withdrawal amount and whose total amount is closest to the withdrawal amount as the target digital currency.
[0009] Optionally, if the withdrawal path is: withdrawal to the user's bank card account opened with the target operator: after receiving the withdrawal request, the target operator obtains the target digital currency carried in the withdrawal request; when the total amount of the target digital currency is equal to the withdrawal amount, the operator generates digital currency owned by the target operator and with an amount equal to the withdrawal amount, based on the target digital currency, through the management institution, and stores it locally, and adds an amount equal to the withdrawal amount to the bank card account; when the total amount of the target digital currency is greater than the withdrawal amount: the target operator further generates a difference digital currency through the management institution and based on the target digital currency and returns it to the terminal application; wherein, the owner of the difference digital currency is the user, and the amount of the difference digital currency is equal to the difference between the total amount of the target digital currency and the withdrawal amount; the terminal application sends the received difference digital currency to the hardware wallet application for storage.
[0010] Optionally, the system further includes: another operating institution different from the target operating institution; and, in the case where the withdrawal path is: withdrawal to the user's bank card account opened in the other operating institution: after receiving the withdrawal request, the target operating institution obtains the target digital currency carried in the withdrawal request; when the total amount of the target digital currency equals the withdrawal amount, it generates digital currency owned by the other operating institution and with an amount equal to the withdrawal amount through the management institution based on the target digital currency, and sends it to the other operating institution; upon receiving the digital currency... After the cryptocurrency is withdrawn, it is stored locally and an amount equal to the withdrawal amount is added to the user's bank card account opened at the other operating institution. When the total amount of the target cryptocurrency exceeds the withdrawal amount, the target operating institution further generates a difference cryptocurrency through the management institution and based on the target cryptocurrency, and returns it to the terminal application. The owner of the difference cryptocurrency is the user, and the amount of the difference cryptocurrency is equal to the difference between the total amount of the target cryptocurrency and the withdrawal amount. The terminal application sends the received difference cryptocurrency to the hardware wallet application for storage.
[0011] Optionally, if the withdrawal path is to withdraw to another wallet application that is different from the hardware wallet application and associated with the target operating institution: after receiving the withdrawal request, the target operating institution obtains the target digital currency carried in the withdrawal request; when the total amount of the target digital currency is equal to the withdrawal amount, the target operating institution transfers the target digital currency to the other wallet application; when the total amount of the target digital currency is greater than the withdrawal amount: the target operating institution, through the management institution and based on the target digital currency, generates an equivalent amount of digital currency owned by the user and with an amount equal to the withdrawal amount, and a difference amount of digital currency owned by the user and with an amount equal to the difference between the total amount of the target digital currency and the withdrawal amount, and transfers the equivalent amount of digital currency to the other wallet application, and returns the difference amount of digital currency to the terminal application; the terminal application sends the received difference amount of digital currency to the hardware wallet application for storage.
[0012] Optionally, the system further includes: another operating institution different from the target operating institution; and, in the case where the withdrawal path is: withdrawal to the user, a wallet application different from the hardware wallet application, and associated with another operating institution different from the target operating institution: after receiving the withdrawal request, the target operating institution obtains the target digital currency carried in the withdrawal request; when the total amount of the target digital currency equals the withdrawal amount, the target operating institution sends the target digital currency to the other operating institution; after receiving the target digital currency, the other operating institution transfers the target digital currency to the other wallet application; when the total amount of the target digital currency equals the withdrawal amount, the target operating institution sends the target digital currency to the other operating institution; after receiving the target digital currency, the other operating institution transfers the target digital currency to the other wallet application; when the total amount of the target digital currency equals the withdrawal amount, the target operating institution transfers the target digital currency to the other operating institution ... When the total amount of cryptocurrency exceeds the withdrawal amount: the target operating institution, through its management organization and based on the target cryptocurrency, generates an equivalent amount of cryptocurrency owned by the user and equal to the withdrawal amount, and a difference amount of cryptocurrency owned by the user and equal to the difference between the total amount of the target cryptocurrency and the withdrawal amount. The equivalent amount of cryptocurrency is then sent to the other operating institution, and the difference amount of cryptocurrency is returned to the terminal application. Upon receiving the equivalent amount of cryptocurrency, the other operating institution transfers it to the other wallet application. Upon receiving the difference amount of cryptocurrency, the terminal application sends it to the hardware wallet application for storage.
[0013] Optionally, the user's other wallet application, which is different from the hardware wallet application and associated with the target operator, includes: the parent wallet of the hardware wallet application; before the hardware wallet application transmits digital currency between the target operator and the target operator, and before the target operator transmits digital currency to the other operator, the sender generates a session key according to a preset rule to encrypt the digital currency to be sent, and the receiver generates the session key according to the rule to decrypt the received encrypted digital currency.
[0014] To achieve the above objectives, according to another aspect of the present invention, a method for withdrawing digital currency is provided.
[0015] The digital currency withdrawal method of this invention is executed by a terminal application installed on a user terminal, the user terminal having a security chip; the method includes: in response to a user inputting a withdrawal command, or detecting that pre-configured automatic withdrawal conditions are met, generating a withdrawal instruction carrying a withdrawal amount and sending it to a hardware wallet application installed on the security chip; receiving at least one target digital currency returned by the hardware wallet application; wherein the target digital currency is selected by the hardware wallet application from currently stored digital currencies, and the total amount of the target digital currencies is not less than the withdrawal amount; generating a withdrawal request carrying the target digital currency, the withdrawal amount, and a withdrawal path and sending it to a target operating institution associated with the hardware wallet application, so that the target operating institution can exchange or transfer the digital currency with the withdrawal amount according to the withdrawal path.
[0016] Optionally, the withdrawal command includes the withdrawal amount and the withdrawal path; when the terminal application generates a withdrawal instruction by monitoring automatic withdrawal conditions, the withdrawal amount and withdrawal path in the withdrawal request are determined by the automatic withdrawal strategy pre-configured in the terminal application.
[0017] Optionally, the withdrawal path includes: withdrawal to the user's bank card account and / or withdrawal to another wallet application of the user that is different from the hardware wallet application; the automatic withdrawal conditions include at least one of the following: the current time point reaches a preset automatic withdrawal time point, the total amount of digital currency currently stored in the hardware wallet application is greater than a preset first amount threshold, the number of abnormal transactions occurring in the hardware wallet application within a preset first time interval is greater than a preset number threshold, and the total amount of abnormal transactions generated by the hardware wallet application within a preset second time interval is greater than a preset second amount threshold.
[0018] Optionally, the target digital currency is determined according to the following steps: After receiving the withdrawal instruction, the hardware wallet application determines all currently stored digital currencies as the target digital currency; or, determines at least one digital currency among the currently stored digital currencies whose total amount is not less than the withdrawal amount and whose total amount is the smallest as the target digital currency; or, determines at least one digital currency among the currently stored digital currencies whose total amount is not less than the withdrawal amount and whose total amount is closest to the withdrawal amount as the target digital currency.
[0019] Optionally, the method further includes: when the total amount of the target digital currency is greater than the withdrawal amount, receiving the difference digital currency returned by the target operating institution, and sending the difference digital currency to the hardware wallet application for storage; wherein, the difference digital currency is generated by the target operating institution through the management institution and based on the target digital currency, the owner of the difference digital currency is the user, and the amount of the difference digital currency is equal to the difference between the total amount of the target digital currency and the withdrawal amount.
[0020] Optionally, the user may have another wallet application that is different from the hardware wallet application, including: the parent wallet of the hardware wallet application; before the digital currency is transmitted between the hardware wallet application and the target operating institution, the sender generates a session key according to a preset rule to encrypt the digital currency to be sent, and the receiver generates the session key according to the rule to decrypt the received encrypted digital currency.
[0021] To achieve the above objectives, according to another aspect of the present invention, a digital currency withdrawal device is provided.
[0022] The digital currency withdrawal device of this invention is installed in a terminal application on a user terminal, the user terminal having a security chip; the device may include: a front-end response unit, configured to: in response to a user inputting a withdrawal command or detecting that pre-configured automatic withdrawal conditions are met, generate a withdrawal instruction carrying a withdrawal amount and send it to a hardware wallet application installed on the security chip; a receiving unit, configured to: receive at least one target digital currency returned by the hardware wallet application; wherein the target digital currency is selected by the hardware wallet application from currently stored digital currencies, and the total amount of the target digital currencies is not less than the withdrawal amount; and a request unit, configured to: generate a withdrawal request carrying the target digital currency, the withdrawal amount, and a withdrawal path and send it to a target operating institution associated with the hardware wallet application, so that the target operating institution may exchange or transfer the digital currency with the withdrawal amount according to the withdrawal path.
[0023] To achieve the above objectives, according to another aspect of the present invention, an electronic device is provided.
[0024] An electronic device according to the present invention includes: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the digital currency withdrawal method provided by the present invention.
[0025] To achieve the above objectives, according to another aspect of the present invention, a computer-readable storage medium is provided.
[0026] The present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the digital currency withdrawal method provided by the present invention.
[0027] According to the technical solution of the present invention, the embodiments described above have the following advantages or beneficial effects: Because hardware wallet applications installed on security chips have high requirements for security and lightweight operation, this invention uses a terminal application on the same user terminal to perform withdrawal information input, automatic withdrawal condition monitoring, and information forwarding with the operating institution during the hardware wallet application withdrawal process. In manual withdrawal scenarios, the terminal application sends a withdrawal instruction to the hardware wallet application based on the withdrawal amount entered by the user, and sends the target cryptocurrency returned by the hardware wallet application to the corresponding operating institution to complete the withdrawal. In automatic withdrawal scenarios, the terminal application monitors in real time whether the user's pre-configured automatic withdrawal conditions are met. Once met, it sends a withdrawal instruction to the hardware wallet application based on the pre-determined withdrawal amount, and sends the target cryptocurrency returned by the hardware wallet application to the corresponding operating institution to complete the withdrawal. This achieves a highly available hardware wallet withdrawal solution. In this process, the hardware wallet application only needs to perform steps such as selecting the target cryptocurrency, thus meeting the security, reliability, and lightweight requirements of both the security chip and the hardware wallet application. Furthermore, the withdrawal path can be configured to withdraw to a bank card or to another wallet application of the same user. Automatic withdrawal conditions can be flexibly configured to achieve scheduled automatic withdrawals, automatic withdrawals exceeding limits, and automatic withdrawals to handle abnormal transactions. The hardware wallet application can use various methods such as full selection, minimum currency quantity selection, and closest amount selection to select the appropriate digital currency for withdrawal operations, thereby meeting the needs of various practical scenarios. In addition, this invention also designs reasonable withdrawal schemes for situations involving the same operating institution and cross-operating institutions, further meeting business requirements.
[0028] The further effects of the aforementioned unconventional alternative methods will be explained below in conjunction with specific implementation methods. Attached Figure Description
[0029] The accompanying drawings are provided to better understand the invention and are not intended to unduly limit the scope of the invention. Wherein: Figure 1 This is a schematic diagram of the architecture of the digital currency withdrawal system in an embodiment of the present invention; Figure 2 This is a schematic diagram of the manual withdrawal interaction of the digital currency withdrawal system in an embodiment of the present invention; Figure 3 This is a schematic diagram of the automatic withdrawal interaction of the digital currency withdrawal system in an embodiment of the present invention; Figure 4 This is a schematic diagram illustrating the composition of the terminal application and the hardware wallet application in an embodiment of the present invention; Figure 5 This is a schematic diagram of the main steps of the digital currency withdrawal method in an embodiment of the present invention; Figure 6 This is a schematic diagram of the components of the digital currency withdrawal device in an embodiment of the present invention; Figure 7 This is an exemplary system architecture diagram that can be applied thereto according to embodiments of the present invention; Figure 8 This is a schematic diagram of the electronic device structure used to implement the digital currency withdrawal method in the embodiments of the present invention. Detailed Implementation
[0030] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of the present invention, including various details to aid understanding. These details should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0031] The technical solution of this invention relates to digital currency withdrawal in hardware wallet applications. In this embodiment, the digital currency can be the digital RMB, guaranteed by national credit and issued by the People's Bank of China (i.e., the regulatory authority). This digital currency can achieve controlled anonymity (i.e., front-end anonymity, back-end real-name registration), traceability, support for the expression of attributes as currency itself, meet currency management needs, and has scalability. Simultaneously, this digital currency can coexist and be used with existing account systems, supporting various value-added service requirements in different application scenarios. The digital currency of this invention can be in the form of an encrypted string (hereinafter referred to as an encrypted coin string or coin string), which is essentially an encrypted processing of the main attributes and ownership of the currency. The string consists of multiple scalable variable-length fields, including one or more of the following: issuer identifier, owner identifier, currency management attributes, currency security attributes, currency application attributes, currency amount, and currency number. Among them, the owner identifier can be matched with real users through the system backend; the currency management attribute is a field that supports monetary authorities in managing the issuance and circulation of currency; the currency security attribute is a set of fields related to the security encryption of digital currency, which can realize functions such as digital currency being unforgeable, unalterable, non-repudiable, protecting privacy, and protecting transaction security; the currency application attribute is a set of fields that meet the needs of digital currency application scenarios and value-added services, which can realize functions such as controlling the flow of funds and executing smart contracts.
[0032] The wallets described above are used to store the aforementioned cryptocurrencies. The hardware wallet application is an application installed on the security chip. The hardware wallet application and the terminal applications described below can be adapted applications (e.g., PC applications, mobile apps) installed on various user terminals (e.g., personal computers, PCs, mobile terminals). The security chip (SecureElement, abbreviated as SE) is generally in chip form and typically has encryption / decryption logic circuits to prevent external malicious parsing attacks and protect data security. When used to store cryptocurrencies, it employs a dedicated environment independent of the operating system to store the data, thereby ensuring that the cryptocurrencies are not maliciously read or modified.
[0033] Hardware wallet applications can be associated with cryptocurrency operators (such as commercial banks). The operator associated with the hardware wallet application can be called the target operator, thereby facilitating currency transfers between the hardware wallet application and the target operator. It's understood that the hardware wallet application and the target operator remain relatively independent. The hardware wallet application only transfers currency and synchronizes certain information with the same user's cryptocurrency wallet account within the target operator's account; the hardware wallet application does not serve as the access point to the target operator's cryptocurrency wallet account. In practical applications, besides hardware wallet applications, the target operator can also be associated with other wallet applications (called software wallet applications) installed on the user's terminal but not on the security chip. These software wallet applications serve as the access point to the target operator's cryptocurrency wallet account, and the cryptocurrency amount on the software wallet application generally matches the amount in the target cryptocurrency wallet account.
[0034] It should be noted that multiple wallet applications installed on a user terminal, corresponding to the same user and the same operating institution, can have a hierarchical relationship. For example, the software wallet application associated with the target operating institution can be the root wallet on the user terminal corresponding to the target operating institution. The hardware wallet application and the application wallet associated with the target operating institution (an application that provides digital currency application services to users by a non-bank entity) can be the next-level wallets of the software wallet application. The software wallet application, in turn, serves as the next-level wallet of the hardware wallet application and the application wallet. It should be pointed out that, unless otherwise specified, the embodiments of the present invention and the technical features in the embodiments can be combined with each other.
[0035] Figure 1 This is a schematic diagram of the architecture of a digital currency withdrawal system according to an embodiment of the present invention. Figure 2 This is a schematic diagram of the manual withdrawal interaction of the digital currency withdrawal system in an embodiment of the present invention. Figure 3 This is a schematic diagram of the automatic withdrawal interaction of the digital currency withdrawal system in an embodiment of the present invention. Figure 1-3As shown, the digital currency withdrawal system of this embodiment of the invention may include: a hardware wallet application installed on the security chip of the user terminal, a terminal application installed on the user terminal (not installed on the security chip mentioned above), and a target operating institution associated with the hardware wallet application.
[0036] The digital currency withdrawal system of this invention supports two withdrawal methods: manual withdrawal and automatic withdrawal. In the manual withdrawal scenario, the user enters the withdrawal amount and withdrawal path (or selects a withdrawal path from the history) on the user interface (UI) of the terminal application and clicks the corresponding button on the interface to input the withdrawal command. The terminal application responds to the user's input withdrawal command by generating a withdrawal instruction carrying the withdrawal amount and sending it to the hardware wallet application. Generally, the withdrawal command may include the withdrawal amount and the withdrawal path, which may include: withdrawal to the same user's bank card account, or withdrawal to another wallet application for the same user that is different from the aforementioned hardware wallet application.
[0037] Withdrawals to the above bank card accounts can proceed in two ways: to a bank card account opened by the same user at the target operating institution (same operating institution); or to a bank card account opened by the same user at a different operating institution (different from the target operating institution) (cross-operating institution). Withdrawals to another wallet account also have two possibilities: to a wallet application belonging to the same user, different from the above hardware wallet applications, but associated with the target operating institution (same operating institution); or to a wallet application belonging to the same user, different from the above hardware wallet applications, but associated with a different operating institution (cross-operating institution). The specific withdrawal schemes for each withdrawal path will be explained below. In essence, after withdrawing to the user's bank card account, the user can withdraw cash through the bank card, thus realizing the exchange from cryptocurrency to cash.
[0038] In automatic withdrawal scenarios, users can pre-sign a contract with the target operator, specifying the automatic withdrawal strategy, including the automatic withdrawal conditions and the methods for determining the withdrawal amount and withdrawal path. For example, the automatic withdrawal condition could be: the current time point reaches a preset automatic withdrawal time point. These current time points and automatic withdrawal time points can be configured to various granularities, such as precise dates, hours, minutes, and seconds. The automatic withdrawal time point can be a fixed point in time (e.g., automatic withdrawal on a specific day of a specific month of a specific year), multiple periodic time points (e.g., automatic withdrawal on the first day of each month), or other types of time points. These automatic withdrawal conditions can meet the needs of recurring automatic withdrawal scenarios.
[0039] Automatic withdrawal conditions can be: the total amount of digital currency currently stored in the hardware wallet application is greater than a preset first amount threshold. For example, when the amount of digital currency in the hardware wallet application is greater than one thousand yuan, automatic withdrawal will be executed. The above automatic withdrawal conditions can meet the needs of the over-limit automatic withdrawal scenario.
[0040] Automatic withdrawal conditions can be as follows: The number of abnormal transactions occurring in the hardware wallet application within a preset first time interval exceeds a preset threshold. This scenario requires the terminal application to have abnormal transaction identification capabilities or to call and analyze the real-time detection results of an abnormal transaction identification application. For example, if the terminal application detects more than two abnormal transactions in the hardware wallet application within the past month, automatic withdrawal will be executed. Another automatic withdrawal condition is: The total amount of abnormal transactions generated by the hardware wallet application within a preset second time interval (which may be the same as or different from the first time interval) exceeds a preset second amount threshold. This scenario also requires the terminal application to have abnormal transaction identification capabilities or to call and analyze the real-time detection results of an abnormal transaction identification application. For example, if the terminal application detects that the total amount of abnormal transactions generated by the hardware wallet application within the past month exceeds 1,000 yuan, automatic withdrawal will be executed. These two automatic withdrawal conditions effectively address the impact of abnormal transactions on users and prevent further losses of funds in the hardware wallet application.
[0041] In automatic withdrawal scenarios, the withdrawal amount and withdrawal path can be determined based on the automatic withdrawal policy negotiated between the user and the operating institution. The withdrawal path can also include the four scenarios mentioned above, which will not be repeated here. In automatic withdrawal scenarios, the terminal application, upon detecting that the pre-configured automatic withdrawal conditions are met, generates a withdrawal instruction carrying the withdrawal amount and sends it to the hardware wallet application. That is, the terminal application generates a withdrawal instruction and sends it to the hardware wallet application when it detects that the automatic withdrawal conditions are met. In the following steps, there is no difference between manual and automatic withdrawal scenarios, so no distinction will be made.
[0042] After receiving a withdrawal instruction from the terminal application, the hardware wallet application first determines whether the total amount of current digital currency is not less than the withdrawal amount. If it is less, the process ends and a response is returned to the terminal application; otherwise, it selects at least one target digital currency from the currently stored digital currency with a total amount not less than the withdrawal amount and returns it to the terminal application. Unlike traditional currency withdrawal methods, digital currency withdrawal cannot simply subtract the withdrawal amount from the balance; instead, it requires searching for a suitable digital currency from the current digital currency for the withdrawal operation. In this embodiment of the invention, three methods for selecting target digital currencies are provided.
[0043] The first method involves the hardware wallet application directly identifying all currently stored cryptocurrencies as the target cryptocurrency. This method has simpler code and faster execution speed, but requires a larger amount of cryptocurrency data to be transferred. The second method involves the hardware wallet application identifying at least one cryptocurrency among the currently stored cryptocurrencies whose total amount is not less than the withdrawal amount and whose total amount is the smallest. This method requires some searching within the current cryptocurrency pool, but requires the smallest amount of cryptocurrency data to be transferred. The third method involves the hardware wallet application identifying at least one cryptocurrency among the currently stored cryptocurrencies whose total amount is not less than the withdrawal amount and whose total amount is closest to the withdrawal amount. This method also requires some searching within the current cryptocurrency pool, but requires less cryptocurrency data to be transferred than the first method. The target cryptocurrency's total amount being close to the withdrawal amount improves the reliability of user funds during the transfer process. After identifying the target cryptocurrency, the hardware wallet application can generate a session key based on preset rules (pre-agreed security mechanisms) between itself and the target operating institution, and then use the session key to encrypt the target cryptocurrency before sending it to the terminal application.
[0044] After receiving the encrypted target cryptocurrency from the hardware wallet application, the terminal application generates a withdrawal request containing the encrypted target cryptocurrency, the withdrawal amount, and the withdrawal path, and sends it to the target operator. The target operator then exchanges or transfers the cryptocurrency with the withdrawal amount according to the withdrawal path. In other words, the exchange refers to converting the cryptocurrency from the hardware wallet application into a bank card account deposit, and the transfer refers to converting the cryptocurrency from the hardware wallet application into the cryptocurrency of another wallet application.
[0045] The following details the specific execution steps of the target operating institution for each withdrawal path. When the withdrawal path is: withdrawal to the same user's bank card account opened with the target operating institution: After receiving the withdrawal request, the target operating institution first calculates the session key according to the preset rules above, and uses the session key to decrypt the encrypted target digital currency in the withdrawal request, thereby obtaining the aforementioned target digital currency (after obtaining the target digital currency, the target operating institution needs to verify the legitimacy of each digital currency through certificate verification, etc. Generally, each operating institution and hardware wallet application will perform legitimacy verification after receiving the digital currency; this step will not be repeated below). Then, the target operating institution determines whether the total amount of the target digital currency is greater than or equal to the withdrawal amount: If the total amount of the target digital currency is equal to the withdrawal amount, then through the management institution and based on the target digital currency, a digital currency account is generated locally, with the target operating institution as the owner and the amount equal to the withdrawal amount, and stored there (the owner of this account is the target operating institution). An amount equal to the withdrawal amount is added to the user's bank card account, and finally, a withdrawal success response is returned to the terminal application.
[0046] It should be noted that the process of generating digital currency through a management institution is as follows: the target operating institution sends a request to the management institution to cancel the original digital currency and issue a new digital currency. The target operating institution can execute the above request process for each transaction or execute it for multiple transactions in a concentrated manner. The above steps conform to the following two-tier operating system of digital currency: the management institution occupies a central position in the digital currency operating system, responsible for issuing digital currency to designated operating institutions and managing the entire lifecycle of digital currency; the designated operating institutions and related commercial institutions are responsible for providing digital currency exchange and circulation services to the public.
[0047] If the total amount of the target cryptocurrency exceeds the withdrawal amount, the target operating institution, through its management body and based on the target cryptocurrency, generates not only cryptocurrency owned by the target operating institution and with an amount equal to the withdrawal amount, but also difference cryptocurrency. This difference cryptocurrency is owned by the user and its amount equal to the difference between the total amount of the target cryptocurrency and the withdrawal amount. Subsequently, the target operating institution stores the generated cryptocurrency, with an amount equal to the withdrawal amount, in its local cryptocurrency account (owned by the target operating institution), and adds an amount equal to the withdrawal amount to the user's bank card account. The difference cryptocurrency is then encrypted (using a mechanism similar to the aforementioned session key) and returned to the terminal application.
[0048] After receiving the encrypted difference in digital currency, the terminal application sends it to the hardware wallet application. The hardware wallet application decrypts the encrypted difference in digital currency, stores it locally, and updates the current balance.
[0049] When the withdrawal path is: withdrawal to a bank card account opened by the same user at another operating institution (different from the target operating institution): After receiving the withdrawal request, the target operating institution first decrypts the target digital currency carried in the withdrawal request; then, the target operating institution determines whether the total amount of the target digital currency is greater than or equal to the withdrawal amount: if the total amount of the target digital currency is equal to the withdrawal amount, it generates digital currency owned by the other operating institution and with an amount equal to the withdrawal amount through the management institution based on the target digital currency, and sends it to the other operating institution (the digital currency generally needs to be encrypted before sending, and the encryption method is similar to the aforementioned session key). After receiving the digital currency, the other operating institution decrypts the digital currency, stores it locally, and adds an amount equal to the withdrawal amount to the user's bank card account opened at the other operating institution.
[0050] If the total amount of the target cryptocurrency exceeds the withdrawal amount, the target operating institution, through its management body and based on the target cryptocurrency, generates not only cryptocurrency owned by another operating institution with an amount equal to the withdrawal amount, but also difference cryptocurrency. This difference cryptocurrency is owned by the user and its amount equal to the difference between the total amount of the target cryptocurrency and the withdrawal amount. Subsequently, the target operating institution sends the cryptocurrency owned by another operating institution with an amount equal to the withdrawal amount to that other operating institution, and encrypts the difference cryptocurrency before returning it to the terminal application.
[0051] After receiving the cryptocurrency, the other operator decrypts it, stores it locally, and adds an amount equal to the withdrawal amount to the user's bank account opened with that operator. Upon receiving the encrypted difference in cryptocurrency, the terminal application sends it to the hardware wallet application, which decrypts it, stores it locally, and updates the current balance.
[0052] When the withdrawal path is: withdrawal to another wallet application belonging to the same user, but different from the hardware wallet application, and associated with the target operator: After receiving the withdrawal request, the target operator first decrypts the target digital currency carried in the withdrawal request; when the total amount of the target digital currency equals the withdrawal amount, the target operator transfers the target digital currency to the other wallet application. It should be noted that if the other wallet application is the aforementioned software wallet application, the target operator directly transfers the target digital currency to the digital currency wallet account associated with the other wallet application to achieve the transfer; if the other wallet application is a different hardware wallet application on a different user's terminal, the target operator needs to send the digital currency to be transferred to the other hardware wallet application on the other user's terminal (this can be done through another terminal application installed on the other user's terminal) to achieve the transfer. After the transfer is complete, the target operator returns a successful withdrawal response to the terminal application.
[0053] When the total amount of the target cryptocurrency exceeds the withdrawal amount: The target operating institution, through the management institution and based on the target cryptocurrency, generates an equivalent amount of cryptocurrency owned by the user and equal to the withdrawal amount, and a difference amount of cryptocurrency owned by the user and equal to the difference between the total amount of the target cryptocurrency and the withdrawal amount. The equivalent amount of cryptocurrency is then transferred to another wallet application (the specific transfer method is the same as described above). The difference amount of cryptocurrency is then encrypted and returned to the terminal application. After receiving the encrypted difference amount of cryptocurrency, the terminal application sends it to the hardware wallet application. The hardware wallet application decrypts the encrypted difference amount of cryptocurrency, stores it locally, and updates the current balance.
[0054] It should be noted that the other wallet application mentioned above can be the parent wallet of the aforementioned hardware wallet application (such as a software wallet application associated with the target operating institution). It can be understood that by transferring the digital currency in the hardware wallet application and other lower-level wallets (such as the next-level application wallet of the aforementioned software wallet application) to a common parent wallet, the digital currency of multiple wallets can be centralized and summarized, thereby meeting the business needs of the corresponding scenario.
[0055] In cases where the withdrawal path is: to a wallet application belonging to the same user, but different from the hardware wallet application, and associated with a different operating institution than the target operating institution: Upon receiving the withdrawal request, the target operating institution first decrypts the target cryptocurrency carried in the withdrawal request; when the total amount of the target cryptocurrency equals the withdrawal amount, the target operating institution encrypts the target cryptocurrency and sends it to the other operating institution. Upon receiving the encrypted target cryptocurrency, the other operating institution first decrypts it, and then transfers the decrypted target cryptocurrency to the other wallet application (the specific transfer method is the same as described above).
[0056] When the total amount of the target digital currency exceeds the withdrawal amount, the target operating institution, through the management institution and based on the target digital currency, generates an equivalent amount of digital currency owned by the user and with an amount equal to the withdrawal amount, and a difference amount of digital currency owned by the user and with an amount equal to the difference between the total amount of the target digital currency and the withdrawal amount. The equivalent amount of digital currency is encrypted and sent to another operating institution, and the difference amount of digital currency is encrypted and returned to the terminal application.
[0057] After receiving an equivalent amount of digital currency, another operating institution decrypts it and transfers it to another wallet application. Upon receiving the encrypted difference in digital currency, the terminal application sends it to the hardware wallet application, which decrypts the encrypted difference, stores it locally, and updates the current balance.
[0058] Figure 4 This is a schematic diagram illustrating the composition of the terminal application and the hardware wallet application in an embodiment of the present invention, as shown below. Figure 4 The terminal application can include four modules: a UI module, a monitoring module, a control module, and a communication module. The UI module enables interaction with the user, allowing the user to input withdrawal commands. The monitoring module monitors the status of the hardware wallet application and whether automatic withdrawal conditions are met. The control module organizes withdrawal instructions. The communication module enables communication with the hardware wallet application and the target operating institution. The hardware wallet application includes three modules: a control module, a storage module, and a communication module. The control module processes withdrawal commands and performs operations such as searching for target cryptocurrencies. The storage module stores cryptocurrency information. The communication module enables communication with the terminal application.
[0059] The following describes a specific embodiment of the present invention. In this embodiment, the user terminal is a mobile terminal, which includes a terminal application (APP). The APP includes a UI interface, where the user can select the withdrawal amount and withdrawal path. The APP includes a monitoring function, which can monitor the transaction status and transaction information of the hardware wallet application and monitor whether the automatic withdrawal conditions are met.
[0060] This embodiment's hardware wallet application uses a secure chip as a carrier to securely store digital currency information. The hardware wallet application has a communication interface for information exchange with the terminal application. The hardware wallet currently contains the following denominations of digital currency: 200 yuan, 150 yuan, 140 yuan, 120 yuan, 80 yuan, and 30 yuan. In this embodiment, the user has signed a contract with the target operating institution: on the last day of each month, if the balance exceeds 500 yuan, the amount exceeding 500 yuan will be withdrawn to the user's designated bank card number.
[0061] First, let's introduce the manual withdrawal scenario. If a user needs to withdraw 100 yuan from the hardware wallet application to the parent wallet, they first enter the withdrawal amount of 100 yuan and the withdrawal path as the parent wallet in the terminal application's UI, then click the withdrawal button. After receiving the withdrawal command, the terminal application organizes the withdrawal instruction based on the entered withdrawal amount and path, and sends it to the hardware wallet application via the communication module.
[0062] Upon receiving the withdrawal instruction, the hardware wallet application generates a set of session keys according to the agreed security mechanism to protect the confidentiality and integrity of the sent data. Based on the withdrawal amount, it selects a third target cryptocurrency selection method, choosing the cryptocurrency information closest to the withdrawal amount (i.e., cryptocurrencies with a face value of 80 yuan and 30 yuan) and sends it to the terminal application in encrypted form.
[0063] The terminal application sends the digital currency information to the target operator's backend. The target operator's backend generates a session key using an agreed-upon security mechanism, thereby decrypting and obtaining the digital currency information, and verifying the correctness and legality of the digital currency. After successful verification, the withdrawal amount of 100 yuan is transferred to the upstream wallet account. Since the total amount of the target digital currency information is 110 yuan, the remaining 10 yuan is used by the management institution to generate new 10 yuan denomination digital currency information, which is then sent to the terminal application in an encrypted manner.
[0064] The terminal application sends the new 10-yuan digital currency information to the hardware wallet application. After decryption and verification, the hardware wallet application stores the 10-yuan digital currency information within itself. At this time, the hardware wallet application contains the following digital currency information: 200 yuan, 150 yuan, 140 yuan, 120 yuan, and 10 yuan.
[0065] Next, we'll introduce the automatic withdrawal scenario. The terminal application monitors relevant information. When the agreed-upon time arrives, it detects that the hardware wallet application balance is 620 yuan, exceeding 500 yuan. According to the contract, it initiates a withdrawal operation: after calculation, the withdrawal amount is 120 yuan, and the withdrawal path is a transfer to a bank card. Based on the withdrawal amount and path, it organizes the withdrawal instruction and sends it to the hardware wallet application via the communication module.
[0066] Upon receiving the withdrawal command, the hardware wallet application generates a set of session keys according to the agreed security mechanism to protect the confidentiality and integrity of the sent data. Based on the withdrawal amount, it selects the first target cryptocurrency selection method and sends all cryptocurrency information (i.e., denominations of 200 yuan, 150 yuan, 140 yuan, 120 yuan, and 10 yuan) to the terminal application in encrypted form.
[0067] The terminal application sends the digital currency information to the target operator's backend. The target operator's backend generates a session key using an agreed-upon security mechanism, obtains the digital currency information, and verifies the correctness and legality of the digital currency. Upon successful verification, the withdrawal amount of 120 is transferred to the designated bank card. Since the total uploaded digital currency amount is 620 yuan, the remaining 500 yuan is used to generate a new 500 yuan denomination digital currency message, which is then sent to the terminal application in an encrypted manner.
[0068] The terminal application sends the new 500 yuan digital currency information to the hardware wallet application. After decryption and verification, the hardware wallet application stores the 500 yuan digital currency information within itself. At this point, the hardware wallet application contains 500 yuan in digital currency.
[0069] In the technical solution of this invention embodiment, since the hardware wallet application installed on the security chip has high requirements for security and lightweightness, this invention uses a terminal application on the same user terminal to execute the withdrawal information input, automatic withdrawal condition monitoring, and interaction information forwarding with the operating institution during the hardware wallet application withdrawal process. In the manual withdrawal scenario, the terminal application sends a withdrawal instruction to the hardware wallet application according to the withdrawal amount entered by the user, and sends the target digital currency returned by the hardware wallet application to the corresponding operating institution to complete the withdrawal. In the automatic withdrawal scenario, the terminal application monitors in real time whether the user's pre-configured automatic withdrawal conditions are met. Once met, it sends a withdrawal instruction to the hardware wallet application according to the pre-determined withdrawal amount, and sends the target digital currency returned by the hardware wallet application to the corresponding operating institution to complete the withdrawal. Thus, a highly available hardware wallet withdrawal solution can be achieved. In this process, the hardware wallet application only needs to perform steps such as target digital currency selection, thereby meeting the security, reliability, and lightweight requirements of the security chip and the hardware wallet application. Furthermore, the withdrawal path can be configured to withdraw to a bank card or to another wallet application of the same user. Automatic withdrawal conditions can be flexibly configured to achieve scheduled automatic withdrawals, automatic withdrawals exceeding limits, and automatic withdrawals to handle abnormal transactions. The hardware wallet application can use various methods such as full selection, minimum currency quantity selection, and closest amount selection to select the appropriate digital currency for withdrawal operations, thereby meeting the needs of various practical scenarios. In addition, this invention also designs reasonable withdrawal schemes for situations involving the same operating institution and cross-operating institutions, further meeting business requirements.
[0070] Figure 5 This is a schematic diagram illustrating the main steps of the digital currency withdrawal method in an embodiment of the present invention, as shown below. Figure 5 As shown, the digital currency withdrawal method of this embodiment of the invention is executed by a terminal application installed on a user terminal, the user terminal having a security chip; the method includes: Step S101: In response to a user inputting a withdrawal command or detecting that pre-configured automatic withdrawal conditions are met, generate a withdrawal instruction carrying the withdrawal amount and send it to the hardware wallet application installed on the security chip; Step S102: Receive at least one target digital currency returned by the hardware wallet application; wherein the target digital currency is selected by the hardware wallet application from the currently stored digital currencies, and the total amount of the target digital currencies is not less than the withdrawal amount; Step S103: Generate a withdrawal request carrying the target digital currency, the withdrawal amount, and the withdrawal path and send it to the target operating institution associated with the hardware wallet application, so that the target operating institution can exchange or transfer the digital currency with the withdrawal amount according to the withdrawal path.
[0071] In this embodiment of the invention, the withdrawal command includes the withdrawal amount and the withdrawal path; when the terminal application generates a withdrawal instruction by monitoring automatic withdrawal conditions, the withdrawal amount and withdrawal path in the withdrawal request are determined by the automatic withdrawal strategy pre-configured in the terminal application.
[0072] In specific applications, the withdrawal path includes: withdrawal to the user's bank card account and / or withdrawal to another wallet application of the user that is different from the hardware wallet application; the automatic withdrawal conditions include at least one of the following: the current time point reaches a preset automatic withdrawal time point, the total amount of digital currency currently stored in the hardware wallet application is greater than a preset first amount threshold, the number of abnormal transactions occurring in the hardware wallet application within a preset first time interval is greater than a preset number threshold, and the total amount of abnormal transactions generated by the hardware wallet application within a preset second time interval is greater than a preset second amount threshold.
[0073] As a preferred embodiment, the target digital currency is determined according to the following steps: After receiving the withdrawal instruction, the hardware wallet application determines all currently stored digital currencies as the target digital currency; or, determines at least one digital currency among the currently stored digital currencies whose total amount is not less than the withdrawal amount and whose total amount is the smallest as the target digital currency; or, determines at least one digital currency among the currently stored digital currencies whose total amount is not less than the withdrawal amount and whose total amount is closest to the withdrawal amount as the target digital currency.
[0074] Preferably, the method further includes: when the total amount of the target digital currency is greater than the withdrawal amount, receiving the difference digital currency returned by the target operating institution, and sending the difference digital currency to the hardware wallet application for storage; wherein, the difference digital currency is generated by the target operating institution through the management institution and based on the target digital currency, the owner of the difference digital currency is the user, and the amount of the difference digital currency is equal to the difference between the total amount of the target digital currency and the withdrawal amount.
[0075] The specific execution steps of the target operating institution are described below for each withdrawal path. When the withdrawal path is: withdrawal to the user's bank card account opened with the target operating institution: After receiving the withdrawal request, the target operating institution obtains the target digital currency carried in the withdrawal request; when the total amount of the target digital currency equals the withdrawal amount, the target operating institution, through the management institution and based on the target digital currency, generates digital currency owned by the target operating institution and with an amount equal to the withdrawal amount, stores it locally, and adds an amount equal to the withdrawal amount to the bank card account; when the total amount of the target digital currency is greater than the withdrawal amount: the target operating institution further generates difference digital currency through the management institution and based on the target digital currency, and returns it to the terminal application; wherein, the owner of the difference digital currency is the user, and the amount of the difference digital currency is equal to the difference between the total amount of the target digital currency and the withdrawal amount; the terminal application sends the received difference digital currency to the hardware wallet application for storage.
[0076] When the withdrawal path is: withdrawal to the user's bank card account opened with the other operating institution: After receiving the withdrawal request, the target operating institution obtains the target digital currency carried in the withdrawal request; when the total amount of the target digital currency equals the withdrawal amount, the target operating institution, through the management institution and based on the target digital currency, generates digital currency owned by the other operating institution and with an amount equal to the withdrawal amount, and sends it to the other operating institution; after receiving the digital currency, the other operating institution stores the digital currency locally and adds an amount equal to the withdrawal amount to the user's bank card account opened with the other operating institution; when the total amount of the target digital currency is greater than the withdrawal amount: the target operating institution further generates a difference digital currency through the management institution and based on the target digital currency and returns it to the terminal application; wherein, the owner of the difference digital currency is the user, and the amount of the difference digital currency is equal to the difference between the total amount of the target digital currency and the withdrawal amount; the terminal application sends the received difference digital currency to the hardware wallet application for storage.
[0077] In the case where the withdrawal path is to withdraw to another wallet application that is different from the hardware wallet application and associated with the target operating institution: after receiving the withdrawal request, the target operating institution obtains the target digital currency carried in the withdrawal request; when the total amount of the target digital currency is equal to the withdrawal amount, the target operating institution transfers the target digital currency to the other wallet application; when the total amount of the target digital currency is greater than the withdrawal amount: the target operating institution, through the management institution and based on the target digital currency, generates an equivalent amount of digital currency owned by the user and with an amount equal to the withdrawal amount, and a difference amount of digital currency owned by the user and with an amount equal to the difference between the total amount of the target digital currency and the withdrawal amount, and transfers the equivalent amount of digital currency to the other wallet application, and returns the difference amount of digital currency to the terminal application; the terminal application sends the received difference amount of digital currency to the hardware wallet application for storage.
[0078] In the case where the withdrawal path is: withdrawal to another wallet application that is different from the user's hardware wallet application and associated with another operating institution different from the target operating institution: after receiving the withdrawal request, the target operating institution obtains the target digital currency carried in the withdrawal request; when the total amount of the target digital currency is equal to the withdrawal amount, the target operating institution sends the target digital currency to the other operating institution; after receiving the target digital currency, the other operating institution transfers the target digital currency to the other wallet application; when the total amount of the target digital currency is greater than the withdrawal amount: the target... The target operator, through its management body and based on the target digital currency, generates an equivalent amount of digital currency owned by the user and equal to the withdrawal amount, and a difference amount of digital currency owned by the user and equal to the difference between the total amount of the target digital currency and the withdrawal amount. The equivalent amount of digital currency is sent to the other operator, and the difference amount of digital currency is returned to the terminal application. Upon receiving the equivalent amount of digital currency, the other operator transfers it to the other wallet application. Upon receiving the difference amount of digital currency, the terminal application sends it to the hardware wallet application for storage.
[0079] Furthermore, in this embodiment of the invention, the user's other wallet application, different from the hardware wallet application, includes: the parent wallet of the hardware wallet application; before the hardware wallet application transmits digital currency between the target operating institution, the sender generates a session key according to a preset rule to encrypt the digital currency to be sent, and the receiver generates the session key according to the rule to decrypt the received encrypted digital currency.
[0080] It should be noted that, for the sake of ease of description, the foregoing method embodiments are described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions, and some steps may actually be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential for implementing the present invention.
[0081] To facilitate better implementation of the above-described solutions of the embodiments of the present invention, related apparatus for implementing the above-described solutions is also provided below.
[0082] Please see Figure 6 As shown, the digital currency withdrawal device 600 provided in this embodiment of the invention is installed in a terminal application on a user terminal, and the user terminal has a security chip; the device 600 may include: a front-end response unit 601, a receiving unit 602, and a request unit 603.
[0083] The pre-response unit 601 can be used to: generate a withdrawal instruction carrying the withdrawal amount and send it to the hardware wallet application installed on the security chip in response to a user input withdrawal command or the detection that pre-configured automatic withdrawal conditions are met; the receiving unit 602 can be used to: receive at least one target digital currency returned by the hardware wallet application; wherein the target digital currency is selected by the hardware wallet application from the currently stored digital currencies, and the total amount of the target digital currency is not less than the withdrawal amount; the request unit 603 can be used to: generate a withdrawal request carrying the target digital currency, the withdrawal amount, and the withdrawal path and send it to the target operating institution associated with the hardware wallet application, so that the target operating institution can exchange or transfer the digital currency with the withdrawal amount according to the withdrawal path.
[0084] It is understood that the functions of the aforementioned front-end response unit 601 can be implemented by the aforementioned UI module, monitoring module, control module, and communication module in the terminal application; the functions of the receiving unit 602 can be implemented by the aforementioned communication module in the terminal application; and the functions of the request unit 603 can be implemented by the aforementioned control module and communication module in the terminal application.
[0085] In this embodiment of the invention, the withdrawal command includes the withdrawal amount and the withdrawal path; when the terminal application generates a withdrawal instruction by monitoring automatic withdrawal conditions, the withdrawal amount and withdrawal path in the withdrawal request are determined by the automatic withdrawal strategy pre-configured in the terminal application.
[0086] As a preferred embodiment, the withdrawal path includes: withdrawal to the user's bank card account and / or withdrawal to another wallet application of the user that is different from the hardware wallet application; the automatic withdrawal conditions include at least one of the following: the current time point reaches a preset automatic withdrawal time point, the total amount of digital currency currently stored in the hardware wallet application is greater than a preset first amount threshold, the number of abnormal transactions occurring in the hardware wallet application within a preset first time interval is greater than a preset number threshold, and the total amount of abnormal transactions generated by the hardware wallet application within a preset second time interval is greater than a preset second amount threshold.
[0087] Preferably, the target digital currency is determined according to the following steps: after receiving the withdrawal instruction, the hardware wallet application determines all currently stored digital currencies as the target digital currency; or, determines at least one digital currency among the currently stored digital currencies whose total amount is not less than the withdrawal amount and whose total amount is the smallest as the target digital currency; or, determines at least one digital currency among the currently stored digital currencies whose total amount is not less than the withdrawal amount and whose total amount is closest to the withdrawal amount as the target digital currency.
[0088] In a specific application, the receiving unit 602 can be further configured to: receive the difference in digital currency returned by the target operating institution when the total amount of the target digital currency is greater than the withdrawal amount, and send the difference in digital currency to the hardware wallet application for storage; wherein, the difference in digital currency is generated by the target operating institution through the management institution and based on the target digital currency, the owner of the difference in digital currency is the user, and the amount of the difference in digital currency is equal to the difference between the total amount of the target digital currency and the withdrawal amount.
[0089] Furthermore, in this embodiment of the invention, the user's other wallet application, different from the hardware wallet application, includes: the parent wallet of the hardware wallet application; before the hardware wallet application transmits digital currency between the target operating institution, the sender generates a session key according to a preset rule to encrypt the digital currency to be sent, and the receiver generates the session key according to the rule to decrypt the received encrypted digital currency.
[0090] According to the technical solution of this invention, since hardware wallet applications installed on security chips have high requirements for security and lightweightness, this invention uses a terminal application on the same user terminal to perform withdrawal information input, automatic withdrawal condition monitoring, and information forwarding with the operating institution during the hardware wallet application withdrawal process. In manual withdrawal scenarios, the terminal application sends a withdrawal instruction to the hardware wallet application based on the withdrawal amount entered by the user, and sends the target digital currency returned by the hardware wallet application to the corresponding operating institution to complete the withdrawal. In automatic withdrawal scenarios, the terminal application monitors in real time whether the user's pre-configured automatic withdrawal conditions are met. Once met, it sends a withdrawal instruction to the hardware wallet application based on the pre-determined withdrawal amount, and sends the target digital currency returned by the hardware wallet application to the corresponding operating institution to complete the withdrawal. Thus, a highly available hardware wallet withdrawal solution can be achieved. In this process, the hardware wallet application only needs to perform steps such as target digital currency selection, thereby meeting the security, reliability, and lightweight requirements of both the security chip and the hardware wallet application. Furthermore, the withdrawal path can be configured to withdraw to a bank card or to another wallet application of the same user. Automatic withdrawal conditions can be flexibly configured to achieve scheduled automatic withdrawals, automatic withdrawals exceeding limits, and automatic withdrawals to handle abnormal transactions. The hardware wallet application can use various methods such as full selection, minimum currency quantity selection, and closest amount selection to select the appropriate digital currency for withdrawal operations, thereby meeting the needs of various practical scenarios. In addition, this invention also designs reasonable withdrawal schemes for situations involving the same operating institution and cross-operating institutions, further meeting business requirements.
[0091] Figure 7 An exemplary system architecture 700 is provided that can be applied to the digital currency withdrawal method or digital currency withdrawal device of the present invention embodiments.
[0092] like Figure 7 As shown, system architecture 700 may include terminal devices 701, 702, and 703, network 704, and server 705 (this architecture is merely an example; the components included in a specific architecture may be adjusted according to the specific application). Network 704 serves as the medium for providing a communication link between terminal devices 701, 702, and 703 and server 705. Network 704 may include various connection types, such as wired or wireless communication links or fiber optic cables.
[0093] Users can use terminal devices 701, 702, and 703 to interact with server 705 via network 704 to receive or send messages, etc. Various client applications can be installed on terminal devices 701, 702, and 703, such as terminal applications (for example only).
[0094] Terminal devices 701, 702, and 703 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0095] Server 705 can be a server that provides various services, such as an operator's back-end server (for example only) that supports the terminal applications operated by users using terminal devices 701, 702, and 703. The operator's back-end server can process the received withdrawal requests and feed back the processing results (such as the withdrawal processing result and the difference in digital currency - for example only) to terminal devices 701, 702, and 703.
[0096] It should be noted that the digital currency withdrawal method provided in this embodiment of the invention is generally executed by server 705, and correspondingly, the digital currency withdrawal device is generally set in server 705.
[0097] It should be understood that Figure 7 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0098] The present invention also provides an electronic device. The electronic device according to an embodiment of the present invention includes: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the digital currency withdrawal method provided by the present invention.
[0099] The following is for reference. Figure 8 It shows a schematic diagram of the structure of a computer system 800 suitable for implementing an electronic device according to embodiments of the present invention. Figure 8 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.
[0100] like Figure 8 As shown, the computer system 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 802 or programs loaded from storage section 808 into random access memory (RAM) 803. The RAM 803 also stores various programs and data required for the operation of the computer system 800. The CPU 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0101] The following components are connected to I / O interface 805: an input section 806 including a keyboard, mouse, etc.; an output section 807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to I / O interface 805 as needed. A removable medium 811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 810 as needed so that computer programs read from it can be installed into storage section 808 as needed.
[0102] In particular, according to the embodiments disclosed in this invention, the processes described in the above main step diagrams can be implemented as computer software programs. For example, embodiments of this invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the main step diagrams. In the above embodiments, the computer program can be downloaded and installed from a network via communication section 809, and / or installed from removable medium 811. When the computer program is executed by central processing unit 801, it performs the functions defined in the system of this invention.
[0103] It should be noted that the computer-readable medium shown in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0104] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0105] The units described in the embodiments of the present invention can be implemented in software or hardware. The described units can also be housed in a processor; for example, a processor can be described as including a front-end response unit, a receiving unit, and a request unit. The names of these units do not necessarily limit the specific unit; for example, the front-end response unit can also be described as "a unit that provides the withdrawal amount and withdrawal path to the request unit."
[0106] In another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs, which, when executed by the device, cause the device to perform the following steps: in response to a user inputting a withdrawal command or detecting that pre-configured automatic withdrawal conditions are met, generating a withdrawal instruction carrying a withdrawal amount and sending it to a hardware wallet application installed on a security chip; receiving at least one target digital currency returned by the hardware wallet application; wherein the target digital currency is selected by the hardware wallet application from currently stored digital currencies, and the total amount of the target digital currency is not less than the withdrawal amount; generating a withdrawal request carrying the target digital currency, the withdrawal amount, and a withdrawal path and sending it to a target operating institution associated with the hardware wallet application, so that the target operating institution may exchange or transfer the digital currency with the withdrawal amount according to the withdrawal path.
[0107] In the technical solution of this invention embodiment, since the hardware wallet application installed on the security chip has high requirements for security and lightweightness, this invention uses a terminal application on the same user terminal to execute the withdrawal information input, automatic withdrawal condition monitoring, and interaction information forwarding with the operating institution during the hardware wallet application withdrawal process. In the manual withdrawal scenario, the terminal application sends a withdrawal instruction to the hardware wallet application according to the withdrawal amount entered by the user, and sends the target digital currency returned by the hardware wallet application to the corresponding operating institution to complete the withdrawal. In the automatic withdrawal scenario, the terminal application monitors in real time whether the user's pre-configured automatic withdrawal conditions are met. Once met, it sends a withdrawal instruction to the hardware wallet application according to the pre-determined withdrawal amount, and sends the target digital currency returned by the hardware wallet application to the corresponding operating institution to complete the withdrawal. Thus, a highly available hardware wallet withdrawal solution can be achieved. In this process, the hardware wallet application only needs to perform steps such as target digital currency selection, thereby meeting the security, reliability, and lightweight requirements of the security chip and the hardware wallet application. Furthermore, the withdrawal path can be configured to withdraw to a bank card or to another wallet application of the same user. Automatic withdrawal conditions can be flexibly configured to achieve scheduled automatic withdrawals, automatic withdrawals exceeding limits, and automatic withdrawals to handle abnormal transactions. The hardware wallet application can use various methods such as full selection, minimum currency quantity selection, and closest amount selection to select the appropriate digital currency for withdrawal operations, thereby meeting the needs of various practical scenarios. In addition, this invention also designs reasonable withdrawal schemes for situations involving the same operating institution and cross-operating institutions, further meeting business requirements.
[0108] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A digital currency withdrawal system, characterized in that, include: The hardware wallet application installed on the security chip of the user terminal, the terminal application installed on the user terminal, and the target operating institution associated with the hardware wallet application; The terminal application, in response to the user's input of a withdrawal command or the detection that the pre-configured automatic withdrawal conditions are met, generates a withdrawal instruction carrying the withdrawal amount and sends it to the hardware wallet application. The hardware wallet application selects at least one target digital currency from the currently stored digital currencies, with a total amount not less than the withdrawal amount, and returns it to the terminal application. The terminal application generates a withdrawal request carrying the target digital currency, the withdrawal amount, and the withdrawal path and sends it to the target operating institution, so that the target operating institution can exchange or transfer the digital currency with the withdrawal amount according to the withdrawal path. The withdrawal path is as follows: withdrawal to another wallet application of the user, different from the hardware wallet application, and associated with the target operating institution, and / or withdrawal to another wallet application of the user, different from the hardware wallet application, and associated with another operating institution different from the target operating institution; before the digital currency is transferred between the hardware wallet application and the target operating institution, and before the target operating institution transfers the digital currency to the other operating institution, the sender generates a session key according to a preset rule to encrypt the digital currency to be sent, and the receiver generates the session key according to the rule to decrypt the received encrypted digital currency.
2. The system according to claim 1, characterized in that, The withdrawal command includes the withdrawal amount and the withdrawal path; When the terminal application generates a withdrawal instruction by monitoring automatic withdrawal conditions, the withdrawal amount and withdrawal path in the withdrawal request are determined by the automatic withdrawal strategy pre-configured in the terminal application.
3. The system according to claim 2, characterized in that, The withdrawal path includes: withdrawal to the user's bank card account; The automatic withdrawal conditions include at least one of the following: the current time point reaches a preset automatic withdrawal time point, the total amount of digital currency currently stored in the hardware wallet application is greater than a preset first amount threshold, the number of abnormal transactions occurring in the hardware wallet application within a preset first time interval is greater than a preset number threshold, and the total amount of abnormal transactions generated by the hardware wallet application within a preset second time interval is greater than a preset second amount threshold.
4. The system according to claim 1, characterized in that, After receiving the withdrawal instruction, the hardware wallet application: Define all currently stored digital currencies as the target digital currency; or... The target digital currency is defined as the digital currency whose total amount in the currently stored digital currency is not less than the withdrawal amount and whose total amount of currency is the smallest. or, The target digital currency is determined by identifying at least one digital currency whose total amount is not less than the withdrawal amount and whose total amount is closest to the withdrawal amount.
5. The system according to claim 3 or 4, characterized in that, In the case where the withdrawal path is: withdrawal to the user's bank card account opened at the target operating institution: After receiving the withdrawal request, the target operating institution obtains the target digital currency carried in the withdrawal request; When the total amount of the target digital currency equals the withdrawal amount, the management institution generates digital currency with the target operating institution as the owner and an amount equal to the withdrawal amount, based on the target digital currency, and stores it locally, and adds an amount equal to the withdrawal amount to the bank card account; When the total amount of the target digital currency is greater than the withdrawal amount, the target operating institution further generates a difference digital currency and returns it to the terminal application through the management institution and based on the target digital currency; wherein, the owner of the difference digital currency is the user, and the amount of the difference digital currency is equal to the difference between the total amount of the target digital currency and the withdrawal amount; The terminal application sends the received difference in digital currency to the hardware wallet application for storage.
6. The system according to claim 3 or 4, characterized in that, The system further includes: another operating institution different from the target operating institution; and, in the case where the withdrawal path is: withdrawal to the user's bank card account opened in the other operating institution: After receiving the withdrawal request, the target operating institution obtains the target digital currency carried in the withdrawal request; When the total amount of the target digital currency equals the withdrawal amount, the management agency generates digital currency owned by the other operating agency and with an amount equal to the withdrawal amount, based on the target digital currency, and sends it to the other operating agency; after receiving the digital currency, the other operating agency stores the digital currency locally and adds an amount equal to the withdrawal amount to the user's bank card account opened in the other operating agency; When the total amount of the target digital currency exceeds the withdrawal amount, the target operating institution further generates a difference digital currency and returns it to the terminal application through the management institution based on the target digital currency; wherein, the owner of the difference digital currency is the user, and the amount of the difference digital currency is equal to the difference between the total amount of the target digital currency and the withdrawal amount; the terminal application sends the received difference digital currency to the hardware wallet application for storage.
7. The system according to claim 3, characterized in that, In the case where the withdrawal path is: withdrawal to another wallet application belonging to the user, different from the hardware wallet application, and associated with the target operating institution: After receiving the withdrawal request, the target operating institution obtains the target digital currency carried in the withdrawal request; When the total amount of the target digital currency equals the withdrawal amount, the target operating institution will transfer the target digital currency to the other wallet application; When the total amount of the target digital currency is greater than the withdrawal amount, the target operating institution, through the management institution and based on the target digital currency, generates an equivalent digital currency owned by the user and with an amount equal to the withdrawal amount, and a difference digital currency owned by the user and with an amount equal to the difference between the total amount of the target digital currency and the withdrawal amount. The equivalent digital currency is then transferred to the other wallet application, and the difference digital currency is returned to the terminal application. The terminal application sends the received difference in digital currency to the hardware wallet application for storage.
8. The system according to claim 7, characterized in that, The system further includes: another operating institution different from the target operating institution; and, in the case where the withdrawal path is: withdrawal to the user, a different wallet application from the hardware wallet application, and associated with another operating institution different from the target operating institution: After receiving the withdrawal request, the target operating institution obtains the target digital currency carried in the withdrawal request; When the total amount of the target digital currency equals the withdrawal amount, the target operating institution sends the target digital currency to the other operating institution; after receiving the target digital currency, the other operating institution transfers the target digital currency to the other wallet application. When the total amount of the target digital currency exceeds the withdrawal amount, the target operating institution, through its management organization and based on the target digital currency, generates an equivalent amount of digital currency owned by the user and equal to the withdrawal amount, and a difference amount of digital currency owned by the user and equal to the difference between the total amount of the target digital currency and the withdrawal amount. The equivalent amount of digital currency is then sent to the other operating institution, and the difference amount of digital currency is returned to the terminal application. Upon receiving the equivalent amount of digital currency, the other operating institution transfers it to the other wallet application. Upon receiving the difference amount of digital currency, the terminal application sends it to the hardware wallet application for storage.
9. The system according to claim 7 or 8, characterized in that, The user's other wallet application, which is different from the hardware wallet application and associated with the target operating institution, includes the parent wallet of the hardware wallet application.
10. A method for withdrawing digital currency, characterized in that, The method is executed by a terminal application installed on a user terminal, the user terminal having a security chip; the method includes: In response to a user inputting a withdrawal command or detecting that pre-configured automatic withdrawal conditions are met, a withdrawal instruction carrying the withdrawal amount is generated and sent to the hardware wallet application installed on the security chip; Receive at least one target digital currency returned by the hardware wallet application; wherein the target digital currency is selected by the hardware wallet application from the currently stored digital currencies, and the total amount of the target digital currency is not less than the withdrawal amount; A withdrawal request carrying the target digital currency, the withdrawal amount, and the withdrawal path is generated and sent to the target operating institution associated with the hardware wallet application, so that the target operating institution can exchange or transfer the digital currency with the withdrawal amount according to the withdrawal path; The withdrawal path is as follows: withdrawal to another wallet application of the user, different from the hardware wallet application, and associated with the target operating institution, and / or withdrawal to another wallet application of the user, different from the hardware wallet application, and associated with another operating institution different from the target operating institution; before the digital currency is transferred between the hardware wallet application and the target operating institution, and before the target operating institution transfers the digital currency to the other operating institution, the sender generates a session key according to a preset rule to encrypt the digital currency to be sent, and the receiver generates the session key according to the rule to decrypt the received encrypted digital currency.
11. The method according to claim 10, characterized in that, The withdrawal command includes the withdrawal amount and the withdrawal path; When the terminal application generates a withdrawal instruction by monitoring automatic withdrawal conditions, the withdrawal amount and withdrawal path in the withdrawal request are determined by the automatic withdrawal strategy pre-configured in the terminal application.
12. The method according to claim 11, characterized in that, The withdrawal path includes: withdrawal to the user's bank card account; The automatic withdrawal conditions include at least one of the following: the current time point reaches a preset automatic withdrawal time point, the total amount of digital currency currently stored in the hardware wallet application is greater than a preset first amount threshold, the number of abnormal transactions occurring in the hardware wallet application within a preset first time interval is greater than a preset number threshold, and the total amount of abnormal transactions generated by the hardware wallet application within a preset second time interval is greater than a preset second amount threshold.
13. The method according to claim 10, characterized in that, The target digital currency is determined according to the following steps: After receiving the withdrawal instruction, the hardware wallet application: Define all currently stored digital currencies as the target digital currency; or... The target digital currency is defined as the digital currency whose total amount in the currently stored digital currency is not less than the withdrawal amount and whose total amount of currency is the smallest. or, The target digital currency is determined by identifying at least one digital currency whose total amount is not less than the withdrawal amount and whose total amount is closest to the withdrawal amount.
14. The method according to claim 12, characterized in that, The method further includes: When the total amount of the target digital currency exceeds the withdrawal amount, the system receives the difference in digital currency returned by the target operating institution and sends the difference in digital currency to the hardware wallet application for storage; wherein... The difference digital currency is generated by the target operating institution through the management institution and based on the target digital currency. The owner of the difference digital currency is the user, and the amount of the difference digital currency is equal to the difference between the total amount of the target digital currency and the withdrawal amount.
15. The method according to claim 12 or 14, characterized in that, The user's other wallet application, different from the hardware wallet application, includes: the parent wallet of the hardware wallet application.
16. A digital currency withdrawal device, characterized in that, A terminal application configured and installed on a user terminal, the user terminal having a security chip; the device includes: The front-end response unit is used to: generate a withdrawal instruction carrying the withdrawal amount and send it to the hardware wallet application installed on the security chip in response to the user input withdrawal command or the detection that the pre-configured automatic withdrawal conditions are met; A receiving unit is configured to: receive at least one target digital currency returned by the hardware wallet application; wherein the target digital currency is selected by the hardware wallet application from the currently stored digital currencies, and the total amount of the target digital currency is not less than the withdrawal amount; The request unit is configured to: generate a withdrawal request carrying the target digital currency, the withdrawal amount, and the withdrawal path, and send it to the target operating institution associated with the hardware wallet application, so that the target operating institution can exchange or transfer the digital currency with the withdrawal amount according to the withdrawal path; The withdrawal path is as follows: withdrawal to another wallet application of the user, different from the hardware wallet application, and associated with the target operating institution, and / or withdrawal to another wallet application of the user, different from the hardware wallet application, and associated with another operating institution different from the target operating institution; before the digital currency is transferred between the hardware wallet application and the target operating institution, and before the target operating institution transfers the digital currency to the other operating institution, the sender generates a session key according to a preset rule to encrypt the digital currency to be sent, and the receiver generates the session key according to the rule to decrypt the received encrypted digital currency.
17. An electronic device, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 10-15.
18. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 10-15.
Citation Information
Patent Citations
Method and system for performing digital currency payment by using digital currency chip card
CN107230069A
Method and system for exchanging actual cash by means of digital cash chip card
CN107230300A
Digital currency wallet-based currency storage method and system
CN108229954A
IDA-based digital wallet initialization method and system and IDA-based digital wallet use method and system
CN111144879A
Digital currency hardware wallet based on mobile terminal
CN112669021A
