Method for online settlement of interest by hardware wallet

By using an online interest settlement method between terminal devices and hardware wallets, the problem of interest rate information not updating when hardware wallets are offline is solved, enabling accurate interest calculation and timely redemption, thus improving the usability of hardware wallets.

CN121581980BActive Publication Date: 2026-05-12FEITIAN TECHNOLOGIES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
FEITIAN TECHNOLOGIES CO LTD
Filing Date
2026-01-23
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing hardware wallets cannot update interest rate information in real time when offline, resulting in inaccurate interest calculations and inability to accurately redeem interest when online settlement is required.

Method used

The terminal device establishes a connection with the hardware wallet, uploads wallet information and transaction records to the backend service, generates and verifies the interest settlement command, uses a pre-set verification key and protection key for encryption and authentication, clears the transaction and interest details file, and ensures the accuracy of interest calculation.

Benefits of technology

This ensures the accuracy of interest payments, enhances the usability of the hardware wallet, and guarantees the timely and accurate updating of interest calculations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121581980B_ABST
    Figure CN121581980B_ABST
Patent Text Reader

Abstract

The application relates to the field of information technology, in particular to a method for online settlement of interest of a hardware wallet, which comprises the following steps: a terminal device acquires transaction records in the hardware wallet and sends the transaction records to a background service; the background service calculates interest according to the transaction records in the hardware wallet; the terminal device is used to issue an interest settlement initialization command to the hardware wallet, and terminal random number ciphertext and wallet random number returned by the hardware wallet are acquired; if the terminal random number ciphertext is verified, the terminal device is used to issue an interest settlement command to the hardware wallet; after the hardware wallet verifies the integrity of the interest settlement command, the transaction details information file and the interest details information file are emptied, and the terminal device is prompted that the interest settlement is successful. The application realizes the settlement of interest in the hardware wallet, and the technical scheme for online settlement of interest of the hardware wallet can guarantee the accuracy of interest redemption and improve the practicability of the hardware wallet.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of information technology, and in particular to a method for online interest settlement using a hardware wallet. Background Technology

[0002] Hardware wallets, as the physical carrier of digital yuan, achieve hardware-level protection through security chip technology. However, existing hardware wallets do not support interest calculation for digital yuan. In order to realize a hardware wallet that can support interest calculation for digital yuan, the applicant found in the process that if the interest rate of digital yuan is dynamically updated like the deposit interest rate, then in the offline state, the interest rate information in the hardware wallet may not be up-to-date, and the interest calculated by the hardware wallet based on this may be inaccurate. When users need to cash out the interest, they need to settle the interest online. Summary of the Invention

[0003] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method for online interest settlement using a hardware wallet.

[0004] Firstly, this application provides a method for online interest settlement using a hardware wallet, the method comprising:

[0005] Step S11: The terminal device obtains the wallet information and transaction records of the hardware wallet and uploads them to the background service.

[0006] Step S12: The background service calculates interest based on the transaction record, generates a terminal random number, generates an interest settlement initialization command containing the terminal random number, and sends the interest settlement initialization command to the hardware wallet through the terminal device;

[0007] Step S13: The hardware wallet uses a preset verification key to encrypt the terminal random number in the interest settlement initialization command to obtain the terminal random number ciphertext, generates a wallet random number, and uploads the terminal random number ciphertext and the wallet random number to the background service through the terminal device.

[0008] Step S14: The background service obtains a verification key based on the wallet information, uses the obtained verification key and the terminal random number to verify the terminal random number ciphertext. If the verification passes, it organizes an interest settlement command, obtains a protection key based on the wallet information, uses the wallet random number and the obtained protection key to calculate the message authentication code of the interest settlement command, and sends the interest settlement command and the message authentication code to the hardware wallet through the terminal device. Otherwise, it returns a prompt message to the terminal device and executes step S16.

[0009] Step S15: The hardware wallet uses a preset protection key, the wallet random number, and the message authentication code to verify the integrity of the interest settlement command. If the verification passes, the transaction details file and the interest details file are cleared, and the terminal device is notified that the interest settlement is successful. Step S16 is then executed. Otherwise, the terminal device is notified that the interest settlement has failed. Step S16 is then executed.

[0010] Step S16: The terminal device displays the corresponding information and the process ends.

[0011] Furthermore, before step S11, the method also includes: the terminal device activating the contactless module and establishing a connection with the hardware wallet;

[0012] Specifically, the process by which the terminal device obtains the wallet information and transaction records of the hardware wallet includes:

[0013] Step S11-1: The terminal device sends a command to the hardware wallet to select a wallet application. The hardware wallet returns a response to the terminal device, which contains the wallet information of the hardware wallet.

[0014] In step S11-2, the terminal device sends a command to the hardware wallet to read wallet records, and the hardware wallet returns the transaction records from the transaction details file to the terminal device.

[0015] Secondly, this application provides a method for online interest settlement using a hardware wallet, the method comprising:

[0016] Step S21: The terminal device obtains the wallet information and interest rate information of the hardware wallet and uploads them to the background service.

[0017] Step S22: The background service determines whether the interest rate information of the hardware wallet has expired. If so, it sends interest rate update data to the hardware wallet through the terminal device and executes step S23; otherwise, it executes step S24.

[0018] Step S23: The hardware wallet rolls back and updates the interest records in the interest details file according to the interest rate update data, updates the interest rate information recorded in the interest rate information file with the latest interest rate information in the interest rate update data, and returns interest rate update success information to the background service through the terminal device;

[0019] Step S24: The background service generates a terminal random number, generates an interest settlement initialization command containing the terminal random number, and sends the interest settlement initialization command to the hardware wallet through the terminal device;

[0020] Step S25: The hardware wallet uses a preset verification key to encrypt the terminal random number in the interest settlement initialization command to obtain the terminal random number ciphertext, generates a wallet random number, reads the cumulative interest in the latest interest record in the interest details file, and returns the terminal random number ciphertext, wallet random number, and cumulative interest to the background service through the terminal device.

[0021] Step S26: The background service obtains the verification key and protection key corresponding to the wallet based on the wallet information, verifies the terminal random number ciphertext based on the verification key corresponding to the wallet and the terminal random number, and if the verification passes, organizes an interest settlement command, calculates the message authentication code of the interest settlement command using the wallet random number and the protection key corresponding to the wallet, and sends the interest settlement command and the generated message authentication code to the hardware wallet through the terminal device.

[0022] Step S27: The hardware wallet uses a preset protection key, the wallet random number, and the received message authentication code to verify the integrity of the interest settlement command. If the verification passes, the transaction details file and the interest details file are cleared, and the terminal device is prompted that the interest settlement is successful. Then, step S28 is executed. Otherwise, the terminal device is prompted that the interest settlement has failed. Then, step S28 is executed.

[0023] Step S28: The terminal device displays the corresponding information and the process ends.

[0024] Furthermore, before step S21, the method also includes: the terminal device activating the contactless module and establishing a connection with the hardware wallet;

[0025] Specifically, the terminal device obtains wallet information and interest rate information from the hardware wallet, including:

[0026] Step S21-1: The terminal device sends a command to the hardware wallet to select a wallet application, and the hardware wallet returns a response to the terminal device to select a wallet application, which contains the wallet information of the hardware wallet.

[0027] In step S21-2, the terminal device sends a command to the hardware wallet to read the wallet interest rate information. The hardware wallet reads the interest rate information from the interest rate information file and returns the hardware wallet's interest rate information to the terminal device.

[0028] Thirdly, this application provides a computer system including a memory, a processor, and a computer program stored in the memory, characterized in that the processor executes the computer program to implement the steps of the above-described method.

[0029] This application provides a technical solution for realizing online interest settlement of hardware wallets. The technical solution provided by this application can ensure the accuracy of interest payment and improve the practicality of hardware wallets. Attached Figure Description

[0030] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of specific embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the embodiments of the invention. Furthermore, throughout the drawings, the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions. In the drawings:

[0031] Figures 1a-1b This invention provides a method for online interest settlement using a hardware wallet, as described in Embodiment 1.

[0032] Figures 2a-2c This invention provides a method for online interest settlement using a hardware wallet, as described in Embodiment 2 of the present invention. Detailed Implementation

[0033] This application proposes a method for online interest settlement using a hardware wallet. The embodiments of this application are further described in detail below with reference to the accompanying drawings. The described embodiments are exemplary and are only used to explain this application, and should not be construed as limiting this application.

[0034] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this application means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.

[0035] Those skilled in the art will understand that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.

[0036] The embodiments of this application can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. Example 1

[0037] Embodiment 1 of the present invention provides a method for online interest settlement using a hardware wallet, such as... Figures 1a-1b As shown, it includes the following steps:

[0038] Step 101: The terminal device activates the contactless module and establishes a connection with the hardware wallet;

[0039] Specifically, the method provided in this application can be initiated and executed manually by the user or automatically. Specifically, when the terminal device receives the user-triggered settlement wallet interest instruction, it executes the method provided in this application.

[0040] And / or, when a user tops up their hardware wallet via a terminal device, the method provided in this application is executed;

[0041] In this application, depending on the different application scenarios, the terminal device may specifically be a customer self-service terminal, a user mobile terminal, etc.

[0042] Preferably, after the user triggers the button on the hardware wallet to start the hardware wallet, the hardware wallet can be detected by the terminal device;

[0043] In one feasible approach, after the terminal device finds the hardware wallet, it also includes verifying the legitimacy of the hardware wallet and / or performing two-way authentication between the terminal device and the hardware wallet.

[0044] Step 102: The terminal device sends a command to the hardware wallet to select a wallet application;

[0045] Step 103: The hardware wallet returns a wallet application selection response to the terminal device, which contains the wallet information of the hardware wallet.

[0046] In this embodiment, the wallet information of the hardware wallet specifically refers to the basic information of the hardware wallet, including at least information that can uniquely identify the hardware wallet, such as the hardware wallet ID.

[0047] Step 104: The terminal device sends a command to the hardware wallet to read wallet records;

[0048] Step 105: The hardware wallet returns the transaction records from the transaction details file to the terminal device;

[0049] In this embodiment, the hardware wallet stores a transaction details file to record transaction records. The transaction records include at least: transaction amount, wallet balance after the transaction, transaction type identifier, transaction date, and transaction time.

[0050] In one possible implementation, the transaction details file is a fixed-length record file, and the data structure of the transaction record is shown in Table 1:

[0051]

[0052] Table 1

[0053] Step 106: The terminal device uploads the wallet information and transaction records of the hardware wallet to the backend service;

[0054] Step 107: The backend service calculates interest based on the transaction records of the hardware wallet uploaded by the terminal device, generates a terminal random number, generates an interest settlement initialization command containing the terminal random number, and sends the interest settlement initialization command to the terminal device.

[0055] Step 108: The terminal device sends the interest settlement initialization command to the hardware wallet;

[0056] Step 109: After receiving the interest settlement initialization command, the hardware wallet determines whether the command contains a terminal random number. If yes, proceed to step 111; otherwise, return a message indicating interest settlement failure to the terminal device and proceed to step 110.

[0057] Step 110: The terminal device indicates that the interest settlement has failed, and the interest settlement process ends.

[0058] Step 111: The hardware wallet encrypts the terminal random number using the preset verification key to obtain the terminal random number ciphertext, generates the wallet random number, and returns the terminal random number ciphertext and the wallet random number to the terminal device.

[0059] Step 112: The terminal device uploads the terminal random number ciphertext and the wallet random number to the backend service;

[0060] Step 113: The background service obtains the corresponding verification key based on the wallet information, and uses the obtained verification key to verify the terminal random number ciphertext. If the verification is successful, proceed to step 115; otherwise, return a message indicating that interest settlement failed to the terminal device and proceed to step 114.

[0061] Step 114: The terminal device indicates that the interest settlement has failed, and the interest settlement process ends.

[0062] Step 115: The background service organizes the interest settlement command, obtains the corresponding protection key based on the wallet information, calculates the message authentication code (MAC) of the interest settlement command using the obtained protection key and the wallet random number, and sends the interest settlement command and the message authentication code to the terminal device.

[0063] Preferably, the backend service stores the root key and distributes the corresponding verification key and protection key according to the wallet information;

[0064] In this embodiment, the background service is specifically the background service of the hardware wallet or a background service group, such as a background service group consisting of the background service of the user self-service terminal and the background service of the hardware wallet, or a background service group consisting of the unified management background service of digital RMB and the background service of the hardware wallet, etc.

[0065] Step 116: The terminal device sends the interest settlement command and message authentication code to the hardware wallet;

[0066] Step 117: After receiving the interest settlement command and message authentication code, the hardware wallet verifies the integrity of the interest settlement command based on the preset protection key, wallet random number and received message authentication code. If the verification passes, proceed to step 119; otherwise, return a message indicating interest settlement failure to the terminal device and proceed to step 118.

[0067] Step 118: The terminal device indicates that the interest settlement has failed, and the interest settlement process ends.

[0068] Step 119: The hardware wallet clears the transaction details file and interest details file, and returns a message to the terminal device indicating that the interest settlement was successful.

[0069] In this embodiment, the hardware wallet enters a low-power mode after completing the interaction with the terminal device.

[0070] Step 120: The terminal device indicates that the interest settlement was successful, and the interest settlement process is complete.

[0071] In one possible implementation, after the terminal device receives the prompt message from the hardware wallet indicating whether the interest settlement was successful or failed, the process further includes: the terminal device uploading the interest settlement result to the background service for storage.

[0072] In one possible implementation, after the hardware wallet clears the transaction details file and the interest details file, it also includes:

[0073] Step a1: The hardware wallet reads the wallet balance, confirms that the accumulated interest is zero, and displays the read wallet balance and accumulated interest;

[0074] In one possible implementation, the wallet balance is recorded in a wallet-specific file within the hardware wallet;

[0075] Step a2: Start the timer on the hardware wallet, and refresh the display to the initial state after the timer ends;

[0076] Furthermore, if the hardware wallet detects an exit signal triggered by the user via a button before the timer expires, it stops the timer and refreshes the display to its initial state.

[0077] In this embodiment, the display screen of the hardware wallet is preferably an e-ink screen, which can display screen-off information; the initial state of the display screen is, for example, displaying information such as "Power on" and "Digital RMB Wallet".

[0078] In one possible implementation, the interest settlement command includes an interest settlement method. When the interest settlement method is "recharge to wallet balance," the hardware wallet further includes the following steps before executing step a1:

[0079] Step a0: The hardware wallet updates the wallet balance according to the amount in the interest settlement command, and generates the transaction record corresponding to this interest settlement and writes it to the transaction details file;

[0080] Furthermore, interest settlement methods can also include paying users in cash or via bank transfer.

[0081] One possible implementation:

[0082] Step 105 also includes: the hardware wallet returning the interest record from the interest details file to the terminal device;

[0083] Specifically, the hardware wallet stores an interest detail information file to record interest records, preferably a fixed-length record file;

[0084] In one possible implementation, each interest record in the interest details file is used to record daily interest. The interest record includes at least: interest calculation date, wallet balance, recorded interest, and accumulated interest. The recorded interest is the interest generated by the hardware wallet on the interest calculation date, and the accumulated interest is the accumulated interest in the hardware wallet up to the interest calculation date.

[0085] Furthermore, the interest record can also include the annualized interest rate. For example, the data structure of the interest record is shown in Table 2:

[0086]

[0087] Table 2

[0088] In another possible implementation, each interest record in the interest details file is used to record the interest for the same wallet balance over multiple consecutive days (i.e., when the hardware wallet has not had any transactions for several days, only one interest record is recorded for the unchanged wallet balance; after a transaction occurs, a new interest record is recorded based on the wallet balance after the transaction). The interest record in the interest details file also includes at least: the number of days of interest accrual, where the interest accrual date indicates the start date of interest accrual.

[0089] Furthermore, the interest record can also include the annualized interest rate. For example, the data structure of the interest record is shown in Table 3:

[0090]

[0091] Table 3

[0092] Step 106 also includes: the terminal device uploading the interest records of the hardware wallet to the backend service;

[0093] Step 107 can also include: the backend service calculating interest based on the transaction and interest records of the hardware wallet uploaded by the terminal device;

[0094] Furthermore, when the terminal device reads the transaction records and / or interest records of the hardware wallet, it sends multiple commands to read the wallet records in a loop until the reading is complete;

[0095] In one possible implementation, step 107, when the backend service calculates interest, also includes confirming whether the interest rate information in the hardware wallet has expired based on the annualized interest rate in the interest record. If it has expired, the interest settlement command also contains the latest interest rate information. After the hardware wallet verifies the completeness of the interest settlement command, it also includes updating the interest rate information in the interest settlement command to the interest rate information file.

[0096] Specifically, the interest rate information recorded in the interest rate information file includes at least: the annualized interest rate and the start date, where the start date is the date on which the interest rate information begins to be implemented; in one possible implementation, the interest rate information file is a binary file, and the interest rate information recorded in the interest rate information file is shown in Table 4 for example:

[0097]

[0098] Table 4 Example 2

[0099] Embodiment 2 of the present invention provides a method for online interest settlement using a hardware wallet, such as... Figures 2a-2c As shown, it includes the following steps:

[0100] Step 201: The terminal device activates the contactless module and establishes a connection with the hardware wallet;

[0101] Step 202: The terminal device sends a command to the hardware wallet to select a wallet application;

[0102] Step 203: The hardware wallet returns a wallet application selection response to the terminal device, which contains the wallet information of the hardware wallet.

[0103] Step 204: The terminal device sends a command to the hardware wallet to read the wallet interest rate information;

[0104] Step 205: The hardware wallet reads the interest rate information from the interest rate information file and returns the hardware wallet's interest rate information to the terminal device.

[0105] Step 206: The terminal device uploads the wallet information and interest rate information of the hardware wallet to the backend service;

[0106] Step 207: The background service determines whether the interest rate information of the hardware wallet has expired. If yes, proceed to step 208; otherwise, proceed to step 223.

[0107] Step 208: The background service generates a first terminal random number, organizes an update rate initialization command containing the first terminal random number, and sends the update rate initialization command to the terminal device.

[0108] Step 209: The terminal device sends the updated interest rate initialization command to the hardware wallet;

[0109] Step 210: The hardware wallet determines whether the update interest rate initialization command contains a terminal random number. If yes, proceed to step 212; otherwise, return a prompt message to the terminal device and proceed to step 211.

[0110] Step 211: The terminal device indicates that the interest settlement has failed, and the interest settlement process ends.

[0111] Step 212: The hardware wallet encrypts the terminal random number in the command according to the preset verification key to obtain the first terminal random number ciphertext, generates the first wallet random number, and returns the first terminal random number ciphertext and the first wallet random number to the terminal device.

[0112] Step 213: The terminal device uploads the encrypted first terminal random number and the first wallet random number to the background service;

[0113] Step 214: The background service obtains the verification key corresponding to the hardware wallet based on the wallet information, and uses the verification key corresponding to the wallet to verify the random number ciphertext of the first terminal. If the verification is successful, proceed to step 216; otherwise, return a prompt message to the terminal device.

[0114] Step 215: The terminal device indicates that the interest settlement has failed, and the interest settlement process ends.

[0115] Step 216: The backend service organizes the interest rate update command, which contains interest rate update data. It obtains the protection key corresponding to the wallet based on the wallet information, calculates the message authentication code of the interest rate update command using the protection key corresponding to the wallet and the first wallet random number, and sends the interest rate update command and its message authentication code to the terminal device.

[0116] Specifically, the interest rate update data contains at least one interest rate information, which includes at least the annualized interest rate and the start date;

[0117] Step 217: The terminal device sends the updated interest rate command and message authentication code to the hardware wallet;

[0118] Step 218: The hardware wallet verifies the integrity of the interest rate update command based on the preset protection key, the first wallet random number, and the received message authentication code. If the verification is successful, proceed to step 220; otherwise, return a prompt message to the terminal device and proceed to step 219.

[0119] Step 219: The terminal device indicates that the interest settlement has failed, and the interest settlement process ends.

[0120] Step 220: The hardware wallet rolls back and updates the interest records in the interest details file according to the interest rate update data in the interest rate update command, and updates the interest rate information recorded in the interest rate information file with the latest interest rate information in the interest rate update data.

[0121] Specifically, the hardware wallet determines the interest records that need to be rolled back based on the interest rate information in the interest rate update data, recalculates the recorded interest and accumulated interest in the interest records that need to be rolled back, and updates the interest records that need to be rolled back based on the calculation results.

[0122] Alternatively, the hardware wallet can determine the interest records that need to be rolled back based on the interest rate information in the interest rate update data, and recalculate the interest days, record interest and accumulated interest based on the wallet balance, number of interest days, annualized interest rate and start date in the interest rate information in the interest record. Based on the calculation results, a new interest record is generated to replace the interest record that needs to be rolled back and updated.

[0123] Specifically, for interest records whose time span includes the start date in the interest rate information, the hardware wallet recalculates the number of interest days, recorded interest, and accumulated interest based on the interest accrual date in the interest record and the start date in the interest rate information, and regenerates multiple interest records based on the calculation results; for interest records whose interest accrual date is later than the start date in the interest rate information, the hardware wallet recalculates the recorded interest and accumulated interest in the interest record, and regenerates one interest record based on the calculation results.

[0124] Step 221: The hardware wallet returns a message to the terminal device indicating that the interest rate update was successful;

[0125] Step 222: The terminal device uploads the information indicating that the interest rate has been successfully updated to the backend service;

[0126] Step 223: The background service generates a second terminal random number, generates an interest settlement initialization command containing the second terminal random number, and sends the interest settlement initialization command to the terminal device;

[0127] Step 224: The terminal device sends the interest settlement initialization command to the hardware wallet;

[0128] Step 225: After receiving the interest settlement initialization command, the hardware wallet determines whether the command contains a terminal random number. If yes, proceed to step 227; otherwise, return a prompt message to the terminal device and proceed to step 226.

[0129] Step 226: The terminal device indicates that the interest settlement has failed, and the interest settlement process ends.

[0130] Step 227: The hardware wallet encrypts the terminal random number in the command according to the preset verification key to obtain the second terminal random number ciphertext, generates the second wallet random number, reads the cumulative interest from the latest interest record in the interest details file, and returns the second terminal random number ciphertext, the second wallet random number, and the cumulative interest to the terminal device.

[0131] Furthermore, step 227 also includes: the hardware wallet reading the wallet balance and displaying the read wallet balance and accumulated interest;

[0132] Preferably, when the hardware wallet displays the wallet balance and accumulated interest, it also includes displaying information indicating that the accumulated interest is a reference value;

[0133] In this embodiment, the display screen of the hardware wallet is preferably an e-ink screen, which can display screen-off information; the initial state of the display screen is, for example, displaying information such as "Power on" and "Digital RMB Wallet";

[0134] Furthermore, in step 227, before the hardware wallet reads the accumulated interest from the latest interest record in the interest details file, it may also include:

[0135] Step c1: The hardware wallet determines the latest interest calculation date from the latest interest record in the interest details file. It then checks if the latest interest calculation date is the last interest calculation date corresponding to the current time. If yes, it continues to read the accumulated interest from the latest interest record in the interest details file; otherwise, it proceeds to step c2.

[0136] Specifically, the hardware wallet obtains the current time based on the built-in clock. The hardware wallet calculates interest daily, and the last interest calculation date corresponding to the current time is yesterday. In step c1, the hardware wallet determines whether the latest interest calculation date, i.e. the latest interest record in the interest details file, is yesterday. If yes, it continues to read the accumulated interest in the latest interest record in the interest details file; otherwise, it executes step c2.

[0137] Step c2: The hardware wallet calculates the interest generated by the hardware wallet after the latest interest calculation date based on the transaction records and interest in the transaction details file, and generates the corresponding interest record and writes it into the interest details file. Then, it continues to read the cumulative interest in the latest interest record in the interest details file.

[0138] In one possible implementation, each interest record in the interest details file is used to record daily interest. In this possible implementation, the hardware wallet determines the daily wallet balance after the latest interest calculation date based on the post-transaction wallet balance in the transaction record, determines the annualized interest rate used for daily interest calculation after the latest interest calculation date based on the start date of each interest rate information (including the original interest rate information and the interest rate information in the updated interest rate command), calculates the daily interest and cumulative interest in sequence, and generates the corresponding daily interest record and writes it to the interest details file.

[0139] In another possible implementation, the daily interest record in the interest details file is used to record the interest of the same wallet balance for multiple consecutive days. In this possible implementation, step c2 above is replaced by: the hardware wallet calculates the interest generated by the hardware wallet after the latest interest calculation date based on the transaction records in the transaction details file, and updates the interest records in the interest details file and / or generates corresponding interest records and writes them into the interest details file, and continues to read the accumulated interest in the latest interest record in the interest details file.

[0140] Step 228: The terminal device uploads the encrypted random number of the second terminal, the random number of the second wallet, and the accumulated interest to the backend service;

[0141] Step 229: The background service verifies the random number ciphertext of the second terminal based on the verification key corresponding to the wallet. If the verification is successful, proceed to step 231; otherwise, return a prompt message to the terminal device and proceed to step 230.

[0142] Step 230: The terminal device indicates that the interest settlement has failed, and the interest settlement process ends.

[0143] Step 231: The background service organizes the interest settlement command, calculates the message authentication code of the interest settlement command based on the protection key corresponding to the wallet and the random number of the second wallet, and sends the interest settlement command and its message authentication code to the terminal device.

[0144] Step 232: The terminal device sends the interest settlement command and its message authentication to the hardware wallet;

[0145] Step 233: The hardware wallet verifies the integrity of the interest settlement command based on the preset protection key, the second wallet random number, and the received message authentication code. If the verification is successful, proceed to step 235; otherwise, return a prompt message to the terminal device and proceed to step 234.

[0146] Step 234: The terminal device indicates that the interest settlement has failed, and the interest settlement process ends.

[0147] Step 235: The hardware wallet clears the transaction details file and interest details file, and returns a message to the terminal device indicating successful interest settlement.

[0148] Step 236: The terminal device indicates that the interest settlement was successful, and the interest settlement process is complete.

[0149] In one possible implementation, after the terminal device receives the prompt message from the hardware wallet indicating whether the interest settlement was successful or failed, the process further includes: the terminal device uploading the interest settlement result to the background service for storage.

[0150] In one possible implementation, after the hardware wallet clears the transaction details file and the interest details file, it also includes:

[0151] Step a1: The hardware wallet reads the wallet balance, confirms that the accumulated interest is zero, and displays the read wallet balance and accumulated interest;

[0152] Step a2: Start the timer on the hardware wallet, and refresh the display to the initial state after the timer ends;

[0153] Furthermore, if the hardware wallet detects an exit signal triggered by the user via a button before the timer expires, it stops the timer and refreshes the display to its initial state.

[0154] In one possible implementation, the interest settlement command includes an interest settlement method. When the interest settlement method is "recharge to wallet balance," the hardware wallet further includes the following steps before executing step a1:

[0155] Step a0: The hardware wallet updates the wallet balance according to the interest settlement command and generates the transaction record corresponding to this interest settlement, which is then written to the transaction details file.

[0156] Furthermore, interest settlement methods can also include paying users in cash or via bank transfer.

[0157] In one possible implementation, before step 231, the following steps are included: the background service reads the interest records and / or transaction records in the hardware wallet through the terminal device, calculates the interest based on the read interest records and / or transaction records, and performs exception handling or continues to execute step 231 based on the calculation result.

[0158] This embodiment is based on the same inventive concept as Embodiment 1. The specific or further implementation of the corresponding technical features can be referred to Embodiment 1, and will not be repeated in this embodiment. Example 3

[0159] This embodiment provides a method for online interest settlement using a hardware wallet, comprising the following steps:

[0160] Step 301: The hardware wallet establishes a connection with the terminal device;

[0161] Preferably, in this embodiment, after the user triggers the button of the hardware wallet to start the hardware wallet, the hardware wallet can be detected by the terminal device and a connection is established with the terminal device. Before the user triggers the button of the hardware wallet to start the hardware wallet, the hardware wallet is in a low power mode.

[0162] Step 302: The hardware wallet receives the wallet application selection command sent by the terminal device and returns a wallet application selection response to the terminal device, which contains the wallet information of the hardware wallet.

[0163] Step 303: The hardware wallet receives the command to read wallet records sent by the terminal device, reads the transaction records recorded in the transaction details file, and returns the transaction records of the hardware wallet to the terminal.

[0164] Step 304: The hardware wallet receives the interest settlement initialization command sent by the terminal device, and determines whether the interest settlement initialization command contains a terminal random number. If yes, proceed to step 305; otherwise, return a message indicating interest settlement failure to the terminal device, and the process ends.

[0165] Step 305: The hardware wallet encrypts the terminal random number according to the preset verification key, generates a wallet random number, and returns the terminal random number ciphertext and the wallet random number to the terminal device, waiting to receive the interest settlement command. If the interest settlement command is received, step 306 is executed; otherwise, the process ends.

[0166] Step 306: The hardware wallet verifies the integrity of the interest settlement command based on the preset protection key, the wallet random number, and the message authentication code sent along with the interest settlement command. If the verification is successful, proceed to step 307; otherwise, return a message indicating that the interest settlement failed to the terminal device, and the process ends.

[0167] Step 307: Clear the transaction details file and interest details file of the hardware wallet;

[0168] Step 308: The hardware wallet returns a message to the terminal device indicating that the interest settlement was successful.

[0169] In this embodiment, the hardware wallet enters a low-power mode after completing the interaction with the terminal device.

[0170] After the hardware wallet clears the transaction details file and interest details file, it also includes:

[0171] Step a1: The hardware wallet reads the wallet balance, confirms that the accumulated interest is zero, and displays the read wallet balance and accumulated interest;

[0172] Step a2: Start the timer on the hardware wallet, and refresh the display to the initial state after the timer ends;

[0173] Furthermore, if the hardware wallet detects an exit signal triggered by the user via a button before the timer expires, it stops the timer and refreshes the display to its initial state.

[0174] In this embodiment, the display screen of the hardware wallet is preferably an e-ink screen, which can display screen-off information; the initial state of the display screen is, for example, displaying information such as "Power on" and "Digital RMB Wallet".

[0175] In one possible implementation, the interest settlement command includes an interest settlement method. When the interest settlement method is "recharge to wallet balance," the hardware wallet further includes the following steps before executing step a1:

[0176] Step a0: The hardware wallet updates the wallet balance according to the interest settlement command and generates the transaction record corresponding to this interest settlement, which is then written to the transaction details file.

[0177] In one possible implementation, step 303 further includes: reading the interest records recorded in the interest details file and returning the interest records of the hardware wallet to the terminal;

[0178] In one possible implementation, after the hardware wallet verifies the completeness of the interest settlement command, it further includes: determining whether the interest settlement command contains interest rate information, and updating the interest rate information in the interest settlement command to the interest rate information file if it is determined to contain interest rate information.

[0179] This embodiment is based on Embodiment 1, and the implementation of the corresponding technical features is as described in Embodiment 1, and will not be repeated here.

[0180] This embodiment also provides a hardware wallet, which includes: an antenna module, a power module, a security module, a control module, a display module, and a button module, wherein:

[0181] The antenna module, connected to the power module and security module, is used to establish a connection between the hardware wallet and the terminal device for data interaction, and also to supply power to the power module in a contactless environment.

[0182] The power module, connected to the control module and the antenna module, is used to power the safety module, control module and display module, and also to draw power from the antenna module in a non-contact environment;

[0183] The security module, connected to the antenna module and control module, is used to store wallet-specific files, interest rate information files, transaction detail information files, and interest detail information files. It is used to process wallet transactions, interest calculations, interest rate updates, interest settlements, etc.

[0184] Furthermore, the security module is also used to store wallet keys, basic information about the hardware wallet, etc.

[0185] The control module is connected to the power module, safety module, display module, and button module. It contains a clock to provide clock information to the safety module, receive button trigger signals sent by the button module, call the safety module according to the processing logic, and control the display module to display information.

[0186] The display module, connected to the control module, is used to display information such as prompts, wallet balance, and interest earnings.

[0187] The button module, connected to the control module, is used to receive user triggers and send trigger signals to the control module.

[0188] In this embodiment, the preferred operating frequency of the antenna module is 13.56MHz, for NFC communication with the terminal device;

[0189] In this embodiment, the power module preferably includes a battery;

[0190] In this embodiment, the security module preferably includes an SE chip.

[0191] In this embodiment, the display module preferably includes an electronic ink screen.

[0192] Optionally, embodiments of this application also provide an electronic device, which includes at least one processor, a memory, and instructions stored in the memory and executable by the at least one processor. The at least one processor executes the instructions to implement the methods described in the above embodiments. Of course, the memory may not be present in the electronic device. The electronic device can be a standalone device or a chip, chip system, or processor that supports the implementation of the above methods. When the electronic device is a chip system, it can be composed of chips or may include chips and other discrete devices; embodiments of this application do not specifically limit this. The chip is coupled to the memory and is used to execute the computer program stored in the memory to perform the methods described in the above embodiments.

[0193] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software programs, implementation can be, in whole or in part, in the form of a computer program product. This computer program product includes one or more computer programs. When the computer program is loaded and executed, it generates, in whole or in part, the processes or functions described in the embodiments of this application. The computer program can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one base station, registration device, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to the registration device or a data storage device including one or more servers, data centers, etc., that can be integrated with the medium. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).

[0194] Although this application has been described in conjunction with specific features and embodiments, it is obvious that various modifications and combinations can be made therein without departing from the spirit and scope of this application. Accordingly, this specification and drawings are merely exemplary illustrations of the application as defined by the appended claims and are to be considered as covering any and all modifications, variations, combinations, or equivalents within the scope of this application. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude multiple instances. A single processor or other unit can implement several functions listed in the claims. Although certain measures are recited in mutually different dependent claims, this does not mean that these measures cannot be combined to produce good results.

Claims

1. A method for online interest settlement using a hardware wallet, characterized in that, include: Step S11: The terminal device obtains the wallet information and transaction records of the hardware wallet and uploads them to the backend service; Step S12: The background service calculates interest based on the transaction record, generates a terminal random number, generates an interest settlement initialization command containing the terminal random number, and sends the interest settlement initialization command to the hardware wallet through the terminal device; Step S13: The hardware wallet uses a preset verification key to encrypt the terminal random number in the interest settlement initialization command to obtain the terminal random number ciphertext, generates a wallet random number, and uploads the terminal random number ciphertext and the wallet random number to the background service through the terminal device. Step S14: The background service obtains a verification key based on the wallet information, uses the obtained verification key and the terminal random number to verify the terminal random number ciphertext. If the verification passes, it organizes an interest settlement command, obtains a protection key based on the wallet information, uses the wallet random number and the obtained protection key to calculate the message authentication code of the interest settlement command, and sends the interest settlement command and the message authentication code to the hardware wallet through the terminal device. Otherwise, it returns a prompt message to the terminal device and executes step S16. Step S15: The hardware wallet uses a preset protection key, the wallet random number, and the message authentication code to verify the integrity of the interest settlement command. If the verification passes, the transaction details file and the interest details file are cleared, and the terminal device is notified that the interest settlement is successful. Step S16 is then executed. Otherwise, the terminal device is notified that the interest settlement has failed. Step S16 is then executed. Step S16: The terminal device displays the corresponding information and the process ends.

2. The method for online interest settlement using a hardware wallet as described in claim 1, characterized in that: When the terminal device receives a user-triggered instruction to settle wallet interest, it executes the method. And / or, when a user uses the hardware wallet to recharge through the terminal device, the method is executed.

3. The method for online interest settlement using a hardware wallet as described in claim 1, characterized in that: Step S11 further includes: the terminal device obtaining the interest records of the hardware wallet and uploading them to the background service; The backend service calculates interest based on the transaction records, specifically by calculating interest based on the transaction and interest records of the hardware wallet.

4. The method for online interest settlement using a hardware wallet as described in claim 3, characterized in that: When the backend service calculates interest based on the transaction records and interest records of the hardware wallet, it also includes: confirming whether the interest rate information in the hardware wallet has expired based on the annualized interest rate in the interest records; In step S15, when the verification is successful, the hardware wallet further includes updating the interest rate information in the interest settlement command to the interest rate information file.

5. A method for online interest settlement using a hardware wallet, characterized in that, include: Step S21: The terminal device obtains the wallet information and interest rate information of the hardware wallet and uploads them to the background service. Step S22: The background service determines whether the interest rate information of the hardware wallet has expired. If so, it sends interest rate update data to the hardware wallet through the terminal device and executes step S23; otherwise, it executes step S24. Step S23: The hardware wallet rolls back and updates the interest records in the interest details file according to the interest rate update data, updates the interest rate information recorded in the interest rate information file with the latest interest rate information in the interest rate update data, and returns interest rate update success information to the background service through the terminal device; Step S24: The background service generates a terminal random number, generates an interest settlement initialization command containing the terminal random number, and sends the interest settlement initialization command to the hardware wallet through the terminal device; Step S25: The hardware wallet uses a preset verification key to encrypt the terminal random number in the interest settlement initialization command to obtain the terminal random number ciphertext, generates a wallet random number, reads the cumulative interest in the latest interest record in the interest details file, and returns the terminal random number ciphertext, wallet random number, and cumulative interest to the background service through the terminal device. Step S26: The background service obtains the verification key and protection key corresponding to the wallet based on the wallet information, verifies the terminal random number ciphertext based on the verification key corresponding to the wallet and the terminal random number, and if the verification passes, organizes an interest settlement command, calculates the message authentication code of the interest settlement command using the wallet random number and the protection key corresponding to the wallet, and sends the interest settlement command and the generated message authentication code to the hardware wallet through the terminal device. Step S27: The hardware wallet uses a preset protection key, the wallet random number, and the received message authentication code to verify the integrity of the interest settlement command. If the verification passes, the transaction details file and the interest details file are cleared, and the terminal device is prompted that the interest settlement is successful. Then, step S28 is executed. Otherwise, the terminal device is prompted that the interest settlement has failed. Then, step S28 is executed. Step S28: The terminal device displays the corresponding information and the process ends.

6. The method for online interest settlement using a hardware wallet as described in claim 5, characterized in that, Step S25 further includes: the hardware wallet reads the wallet balance and displays the read wallet balance and the accumulated interest on the display screen.

7. The method for online interest settlement using a hardware wallet as described in claim 5, characterized in that, In step S25, before reading the cumulative interest from the latest interest record in the interest details file, the method further includes: Step z1: The hardware wallet determines the latest interest calculation date by checking the latest interest record in the interest details file. It then determines whether the latest interest calculation date is the last interest calculation date corresponding to the current time. If yes, it continues to read the accumulated interest from the latest interest record in the interest details file; otherwise, it proceeds to step z2. Step z2: The hardware wallet calculates the interest generated by the hardware wallet after the latest interest calculation date based on the transaction records in the transaction details file and the interest rate information recorded in the interest rate information file, and generates the corresponding interest record and writes it into the interest details file. Then, it continues to read the cumulative interest from the latest interest record in the interest details file.

8. The method for online interest settlement using a hardware wallet as described in claim 5, characterized in that, In step S25, before reading the cumulative interest from the latest interest record in the interest details file, the method further includes: Step z1`: The hardware wallet determines the latest interest calculation date by judging the latest interest record in the interest details file. It then determines whether the latest interest calculation date is the last interest calculation date corresponding to the current time. If yes, it continues to read the accumulated interest from the latest interest record in the interest details file; otherwise, it executes step z2`. Step z2`: The hardware wallet calculates the interest generated by the hardware wallet after the latest interest calculation date based on the transaction records in the transaction details file, updates the interest records in the interest details file and / or generates corresponding interest records and writes them into the interest details file, and continues to read the accumulated interest in the latest interest record in the interest details file.

9. The method for online interest settlement using a hardware wallet as described in claim 5, characterized in that, In step S26, before the organization interest settlement command, the following steps are also included: the background service reads the interest records and / or transaction records in the hardware wallet through the terminal device, calculates the interest based on the read interest records and / or transaction records, and if the calculation is consistent, the organization interest settlement command is executed; otherwise, an exception is handled.

10. The method for online interest settlement using a hardware wallet as described in claim 1 or 5, characterized in that, Before the hardware wallet encrypts the terminal random number in the interest settlement initialization command using a preset verification key, the hardware wallet further includes: determining whether the interest settlement initialization command contains a terminal random number; if so, continuing to encrypt the terminal random number in the interest settlement initialization command using the preset verification key; otherwise, prompting the terminal device that the interest settlement has failed, and the terminal device displays the corresponding information and the process ends.

11. The method for online interest settlement using a hardware wallet as described in claim 1 or 5, characterized in that, After clearing the transaction details file and interest details file, the following is also included: Step x1: The hardware wallet reads the wallet balance and confirms that the accumulated interest is zero; Step x2: The hardware wallet displays the read wallet balance and accumulated interest on the screen, starts a timer, and refreshes the screen to the initial state after the timer ends.

12. The method for online interest settlement using a hardware wallet as described in claim 11, characterized in that, Before step x1, the hardware wallet updates its balance according to the amount in the interest settlement command and generates a transaction record corresponding to this interest settlement, which is then written into the transaction details file.

13. A computer system comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1-12.