A method of updating interest rate information in a hardware wallet

By working collaboratively between terminal devices and backend services, and utilizing encryption and authentication mechanisms to update interest rate information in the hardware wallet, the issue of hardware wallets not supporting interest calculation for digital RMB has been resolved. This has improved the accuracy and flexibility of interest calculation and enhanced the applicability of hardware wallets.

CN121581981BActive 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 do not support interest calculation for digital RMB, resulting in inflexible updates to interest rate information and affecting the accuracy of interest calculations.

Method used

By working in tandem with the terminal device, hardware wallet, and backend services, the system uses pre-set verification and protection keys for encryption and authentication, generates commands to update interest rates, and rolls back and updates interest detail information files to ensure the accuracy and consistency of interest rate information.

Benefits of technology

It improves the accuracy and flexibility of interest calculation in hardware wallets, enhances the applicability of hardware wallets, and supports dynamic updates of interest calculation for digital RMB.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121581981B_ABST
    Figure CN121581981B_ABST
Patent Text Reader

Abstract

The application relates to the field of information technology, in particular to a method for updating interest rate information in a hardware wallet, which comprises the following steps: a terminal device acquires interest rate information in a hardware wallet and sends the interest rate information to a background service; when the background service judges that the interest rate information in the hardware wallet is expired, the background service sends an update interest rate initialization command and an update interest rate command to the hardware wallet through the terminal device; after the hardware wallet verifies the completeness of the update interest rate command, the hardware wallet updates interest record in an interest detail information file according to interest update data in the update interest rate command, and simultaneously updates interest rate information recorded in an interest rate information file. The application realizes the updating of the interest rate information in the hardware wallet, and the provided technical scheme for updating the interest rate information in the hardware wallet can improve the accuracy and flexibility of interest calculation of the hardware wallet, and improve the applicability 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 updating interest rate information in 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. To develop a hardware wallet that supports interest calculation for digital yuan, the applicant discovered during the development process that if the interest rate of digital yuan is dynamically updated like deposit interest rates, further updates to the interest rate information in the hardware wallet are needed to improve the accuracy and flexibility of interest calculation. Summary of the Invention

[0003] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method for updating interest rate information in a hardware wallet.

[0004] In a first aspect, this application provides a method for updating interest rate information in a hardware wallet, the method comprising:

[0005] Step S11: The terminal device obtains the wallet information and interest rate information of the hardware wallet and uploads them to the background service;

[0006] Step S12: The background service determines whether the interest rate information of the hardware wallet has expired. If so, it generates a terminal random number, organizes an update interest rate initialization command containing the terminal random number, and sends it to the hardware wallet through the terminal device, and executes step S13; otherwise, it prompts the terminal device that no update is needed, and executes step S16.

[0007] Step S13: The hardware wallet uses the preset verification key to encrypt the terminal random number in the interest rate initialization command to obtain the terminal random number ciphertext, generates the wallet random number, and sends 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 the 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 the interest rate update command, obtains the 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 rate update command, and sends the interest rate update command and message authentication code to the hardware wallet through the terminal device. Step S15 is executed. Otherwise, the update fails to be prompted to the terminal device, and step S16 is executed.

[0009] Step S15: The hardware wallet uses a preset protection key, wallet random number and message authentication code to verify the integrity of the interest rate update command. If the verification passes, the interest records in the interest details file are rolled back and updated according to the interest rate update data in the interest rate update command. The interest rate information recorded in the interest rate information file is updated with the latest interest rate information in the interest rate update data. The terminal device is prompted that the update is successful and step S16 is executed. Otherwise, the terminal device is prompted that the update failed and step S16 is executed.

[0010] In step S16, the terminal device displays the corresponding information, and the interest rate update process ends.

[0011] Secondly, 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.

[0012] Thirdly, this application provides a method for updating interest rate information in a hardware wallet, the method comprising:

[0013] Step S21: The hardware wallet establishes a connection with the terminal device;

[0014] Step S22: The hardware wallet receives the wallet application selection command sent by the terminal device and returns the wallet information of the hardware wallet to the terminal device.

[0015] Step S23: The hardware wallet receives the command to read the wallet interest rate information sent by the terminal device, reads the interest rate information recorded in the interest rate information file, and returns the hardware wallet interest rate information to the terminal device.

[0016] Step S24: The hardware wallet receives the update rate initialization command sent by the terminal device, encrypts the terminal random number in the update rate initialization command 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. It waits to receive the update rate command and message authentication code. If received, it executes step S25; otherwise, the process ends.

[0017] In step S25, the hardware wallet uses a preset protection key, wallet random number, and message authentication code to verify the integrity of the interest rate update command. If the verification passes, step S26 is executed; otherwise, the terminal device is prompted that the update failed and the process ends.

[0018] Step S26: 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, updates the interest rate information recorded in the interest rate information file with the latest interest rate information in the interest rate update data, prompts the terminal device that the update is successful, and the process ends.

[0019] Fourthly, this application provides a computer device, 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.

[0020] This application provides a technical solution for updating interest rate information in a wallet, which can improve the accuracy and flexibility of interest calculation in hardware wallets and enhance the applicability of hardware wallets. Attached Figure Description

[0021] 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:

[0022] Figure 1 This application provides a method for updating interest rate information in a hardware wallet, as described in Embodiment 1.

[0023] Figures 2a-2c This application provides a method for updating interest rate information in a hardware wallet. Detailed Implementation

[0024] This application proposes a method for updating interest rate information in 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.

[0025] 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.

[0026] 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.

[0027] 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

[0028] This embodiment provides a method for updating interest rate information in a hardware wallet, such as... Figure 1 As shown, it includes the following steps:

[0029] Step S11: The terminal device obtains the wallet information and interest rate information of the hardware wallet and uploads them to the background service;

[0030] Step S12: The background service determines whether the interest rate information of the hardware wallet has expired. If so, it generates a terminal random number, organizes an update interest rate initialization command containing the terminal random number, and sends it to the hardware wallet through the terminal device, and executes step S13; otherwise, it prompts the terminal device that no update is needed, and executes step S16.

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

[0032] Step S14: The background service obtains the verification key based on the wallet information of the hardware wallet, uses the obtained verification key and the terminal random number to verify the terminal random number ciphertext. If the verification passes, it organizes the interest rate update command, obtains the protection key based on the wallet information of the hardware wallet, uses the wallet random number and the obtained protection key to calculate the message authentication code of the interest rate update command, and sends the interest rate update command and message authentication code to the hardware wallet through the terminal device. Step S15 is executed. Otherwise, the update fails to be prompted to the terminal device, and step S16 is executed.

[0033] Step S15: The hardware wallet uses a preset protection key, wallet random number and message authentication code to verify the integrity of the interest rate update command. If the verification passes, the interest records in the interest details file are rolled back and updated according to the interest rate update data in the interest rate update command. The interest rate information recorded in the interest rate information file is updated with the latest interest rate information in the interest rate update data. The terminal device is prompted that the update is successful and step S16 is executed. Otherwise, the terminal device is prompted that the update failed and step S16 is executed.

[0034] In this embodiment, the interest records in the interest details file are rolled back and updated according to the interest rate update data in the interest rate update command, specifically including:

[0035] Based on the interest rate information in the update interest rate command, determine the interest records that need to be rolled back, recalculate the recorded interest and accumulated interest in the interest records, and update the interest records based on the calculation results;

[0036] Alternatively, the interest record that needs to be rolled back can be determined based on the interest rate information in the interest rate update command. The interest record's wallet balance, number of interest days, annualized interest rate and start date can be recalculated based on the interest record's annualized interest rate and start date. A new interest record can be generated based on the calculation results to replace the interest record that needs to be rolled back.

[0037] In step S16, the terminal device displays the corresponding information, and the interest rate update process ends.

[0038] Optionally, in this embodiment, after rolling back and updating the interest records in the interest details file according to the interest rate update data in the interest rate update command, the method further includes:

[0039] Step x1: The hardware wallet reads the wallet balance and the accumulated interest from the latest interest record in the interest details file;

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

[0041] 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.

[0042] Furthermore, step x1 is preceded by:

[0043] Step y1: The hardware wallet obtains the latest interest calculation date from 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 executes step x1; ​​otherwise, it executes step y2.

[0044] Step y2: 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, generates the corresponding interest record and writes it into the interest details file, and then executes step x1.

[0045] Alternatively, step x1 may include:

[0046] Step z1: The hardware wallet obtains the latest interest calculation date from 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, proceed to step x1; ​​otherwise, proceed to step z2.

[0047] 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 updates the interest records in the interest details file and / or generates corresponding interest records and writes them into the interest details file, thus executing step x1. Example 2

[0048] This embodiment provides a method for updating interest rate information in a hardware wallet, such as... Figures 2a-2c As shown, it includes the following steps:

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

[0050] Specifically, the method in this embodiment can be initiated manually by the user or executed automatically.

[0051] This method is executed when the terminal device receives a user-triggered interest rate update command;

[0052] And / or, this method is executed when a user makes an online purchase using a hardware wallet via a terminal device;

[0053] And / or, this method is executed when a user tops up their hardware wallet via a terminal device;

[0054] In this embodiment, depending on the different application scenarios, the terminal device can specifically be a merchant payment terminal, a customer self-service terminal, a user mobile terminal, etc.

[0055] 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;

[0056] 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.

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

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

[0059] 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.

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

[0061] Step 105: The hardware wallet reads the interest rate information recorded in the interest rate information file and returns the hardware wallet's interest rate information to the terminal device.

[0062] In this embodiment, the hardware wallet stores an interest rate information file, which is used to record the interest rate information of the hardware wallet. The hardware wallet calculates interest based on the interest rate information recorded in the interest rate information file and generates interest records which are stored in the interest detail information file.

[0063] The interest rate information returned by the hardware wallet to the terminal device includes at least the annualized interest rate and start date stored in the interest rate information file;

[0064] 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 1, for example:

[0065]

[0066] Table 1

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

[0068] Step 107: The background service determines whether the interest rate information of the hardware wallet has expired. If yes, proceed to step 109; otherwise, return a message to the terminal device indicating that the interest rate information does not need to be updated and proceed to step 108.

[0069] Step 108: The terminal device indicates that the interest rate information does not need to be updated, and the interest rate update process ends.

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

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

[0072] Step 111: After receiving the interest rate initialization command, the hardware wallet determines whether the command contains a terminal random number. If yes, proceed to step 113; otherwise, return a message indicating that the interest rate update failed to the terminal device and proceed to step 112.

[0073] Step 112: The terminal device displays a message indicating that the interest rate update failed, and the interest rate update process ends.

[0074] Step 113: 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.

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

[0076] Step 115: The background service obtains the corresponding verification key based on the wallet information of the hardware wallet, and uses the obtained verification key to verify the terminal random number ciphertext. If the verification passes, proceed to step 117; otherwise, return a message indicating that the interest rate update failed to the terminal device and proceed to step 116.

[0077] Step 116: The terminal device displays a message indicating that the interest rate update failed, and the interest rate update process ends.

[0078] Step 117: The background service organizes the interest rate update command, which contains interest rate update data. It obtains the corresponding protection key based on the wallet information of the hardware wallet, calculates the message authentication code (MAC) of the interest rate update command using the obtained protection key and the wallet random number, and sends the interest rate update command and the message authentication code to the terminal device.

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

[0080] In this embodiment, the back-end service is specifically the back-end service of the hardware wallet or a group of back-end services, such as a group of back-end services composed of the back-end services of the merchant payment terminal or user self-service terminal and the back-end services of the hardware wallet, or a group of back-end services composed of the unified management back-end service of digital RMB and the back-end services of the hardware wallet, etc.

[0081] In this embodiment, the interest rate update data includes at least one interest rate information, which includes at least the annualized interest rate and the start date;

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

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

[0084] Step 120: The terminal device displays a message indicating that the interest rate update failed, and the interest rate update process ends.

[0085] Step 121: 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.

[0086] In this embodiment, the interest detail information file is used to store interest records, and is preferably a fixed-length record file;

[0087] In one possible implementation, each interest record in the interest details file is used to record daily interest. The interest record in the interest details file includes at least: the interest accrual date, the annualized interest rate, the wallet balance, the recorded interest, and the accumulated interest. The wallet balance is the wallet balance on the interest accrual date, the recorded interest is calculated by the hardware wallet based on the wallet balance on the interest accrual date and the annualized interest rate in the interest rate information file, and the accumulated interest is the accumulated interest in the hardware wallet up to the interest accrual date. The data structure of the interest record is shown in Table 2.

[0088]

[0089] Table 2

[0090] The hardware wallet rolls back and updates the interest records in the interest details file based on the interest rate update data in the interest rate update command, including:

[0091] Step a1: The hardware wallet obtains the interest rate information from the interest rate update command and determines the interest records that need to be rolled back and updated in the interest details file based on the start date in the interest rate information.

[0092] Specifically, interest records in the interest details file whose interest accrual date is the start date in the interest rate information, and interest records whose interest accrual date is later than the start date in the interest rate information, are interest records that need to be rolled back and updated;

[0093] Step a2: The hardware wallet recalculates the recorded interest and accumulated interest in the interest record based on the annualized interest rate in the interest rate information, and updates the interest record based on the calculation result;

[0094] Specifically, the hardware wallet recalculates the recorded interest in each interest record that needs to be rolled back and updated based on the annualized interest rate in the interest rate information and the wallet balance in each interest record that needs to be rolled back and updated. Then, it adds the accumulated interest in the previous interest record to the recalculated recorded interest in each interest record that needs to be rolled back and updated to obtain the accumulated interest in each interest record that needs to be rolled back and updated.

[0095] 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 interest accrual days, where the interest accrual date indicates the start date of interest accrual. The data structure of the interest record is shown in Table 3.

[0096]

[0097] Table 3

[0098] In this possible implementation, the hardware wallet rolls back and updates the interest records in the interest details file based on the interest rate update data in the interest rate update command, including:

[0099] Step a1`: The hardware wallet obtains the interest rate information from the interest rate update command and determines the interest records that need to be rolled back and updated in the interest details file based on the start date in the interest rate information.

[0100] Specifically, the hardware wallet determines the interest records that need to be rolled back based on the start date in the interest rate information in the interest rate update command and the interest accrual date and number of interest accrual days in the interest records. Interest records with an interest accrual date later than the start date in the interest rate information, as well as interest records whose time span includes the start date in the interest rate information, are the interest records that need to be rolled back.

[0101] Step a2`: The hardware wallet recalculates the number of interest days, records the 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, and generates a new interest record based on the calculation result, replacing the interest record that needs to be rolled back and updated;

[0102] 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.

[0103] Furthermore, if there are multiple interest rate information entries in the interest rate update command, the corresponding interest records in the interest details file will be rolled back and updated according to each interest rate information entry.

[0104] For example, for an interest record whose time span includes the start date of two interest rate information entries, the hardware wallet regenerates three interest records during the rollback update, replacing the original interest record whose time span includes the start date of two interest rate information entries.

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

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

[0107] Step 123: The terminal device displays a message indicating that the interest rate update was successful, and the interest rate update process is complete.

[0108] In one possible implementation, after the terminal device receives the prompt information returned by the hardware wallet and indicates the interest rate update result (including interest rate update success and interest rate update failure), it also includes: the terminal device uploading the interest rate update result to the background service for storage.

[0109] In one possible implementation, after 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, it also includes:

[0110] Step b1: The hardware wallet reads the wallet balance, reads the cumulative interest from the latest interest record in the interest details file, and displays the read wallet balance and cumulative interest.

[0111] Furthermore, when displaying the wallet balance and accumulated interest, the hardware wallet also includes a message indicating that the accumulated interest is a reference value;

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

[0113] 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.

[0114] 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".

[0115] In yet another possible implementation, the hardware wallet further includes the following steps before performing step b1:

[0116] Step c1: The hardware wallet reads the latest interest record from the interest details file;

[0117] Step c2: The hardware wallet obtains the latest interest calculation date from the latest interest record in the interest details file, and determines whether it is the last interest calculation date corresponding to the current time. If yes, proceed to step b1; otherwise, proceed to step c3.

[0118] In this embodiment, the hardware wallet obtains the current time according to the built-in clock. The hardware wallet calculates interest daily. The last interest calculation date corresponding to the current time is yesterday. In step c2, 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, step b1 is executed; otherwise, step c3 is executed.

[0119] Step c3: 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, generates the corresponding interest record and writes it into the interest details file, and then executes step b1.

[0120] A transaction record must include at least: transaction amount, wallet balance after the transaction, transaction type identifier, transaction date, and transaction time. 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 4.

[0121]

[0122] Table 4

[0123] 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.

[0124] 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 c3 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 then executes step b1. Example 3

[0125] This embodiment provides a method for updating interest rate information in a hardware wallet, including the following steps:

[0126] Step 201: The hardware wallet establishes a connection with the terminal device;

[0127] 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.

[0128] Step 202: The hardware wallet receives the command to select a wallet application sent by the terminal device, and returns a response to the terminal device containing the wallet information of the hardware wallet.

[0129] Step 203: The hardware wallet receives the command to read the wallet interest rate information sent by the terminal device, reads the interest rate information recorded in the interest rate information file, returns the hardware wallet interest rate information to the terminal, and waits to receive the update interest rate initialization command. If the update interest rate initialization command is received, step 204 is executed; otherwise, the process ends.

[0130] Step 204: The hardware wallet determines whether the interest rate update initialization command contains a terminal random number. If yes, it proceeds to step 205; otherwise, it returns a message to the terminal device indicating that the interest rate update failed, and the process ends.

[0131] Step 205: 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 rate update command. If the interest rate update command is received, step 206 is executed; otherwise, the process ends.

[0132] Step 206: The hardware wallet verifies the integrity of the interest rate update command based on the preset protection key, the wallet random number, and the message authentication code sent along with the interest rate update command. If the verification passes, proceed to step 207; otherwise, return a message indicating that the interest rate update failed to the terminal device, and the process ends.

[0133] Step 207: 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.

[0134] Step 208: The hardware wallet returns a message to the terminal device indicating that the interest rate update was successful.

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

[0136] In one possible implementation, after 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, it also includes:

[0137] Step b1: The hardware wallet reads the wallet balance, reads the cumulative interest from the latest interest record in the interest details file, and displays the read wallet balance and cumulative interest.

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

[0139] 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.

[0140] In yet another possible implementation, the hardware wallet further includes the following steps before performing step b1:

[0141] Step c1: The hardware wallet reads the latest interest record from the interest details file;

[0142] Step c2: The hardware wallet obtains the latest interest calculation date from the latest interest record in the interest details file, and determines whether it is the last interest calculation date corresponding to the current time. If yes, proceed to step b1; otherwise, proceed to step c3.

[0143] Step c3: 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, generates the corresponding interest record and writes it into the interest details file, and then executes step b1.

[0144] The above method applies to each interest record in the interest details file used to record daily interest. If the daily interest record in the interest details file is used to record the interest of the same wallet balance for multiple consecutive days, then step c3 needs to be replaced with: 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 then executes step b1.

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

[0146] 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:

[0147] 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.

[0148] 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;

[0149] 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, and is used to process wallet transactions, interest calculations, interest rate updates, etc.

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

[0151] 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.

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

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

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

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

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

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

[0158] 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.

[0159] 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)).

[0160] 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 updating interest rate information in a hardware wallet, characterized in that, include: Step S11: The terminal device obtains the wallet information and interest rate information of the hardware wallet and uploads them to the background service; Step S12: The background service determines whether the interest rate information of the hardware wallet has expired. If so, it generates a terminal random number, organizes an update interest rate initialization command containing the terminal random number, and sends it to the hardware wallet through the terminal device, and then executes step S13. Otherwise, prompt the terminal device that no update is needed and proceed to step S16; Step S13: The hardware wallet uses a preset verification key to encrypt the terminal random number in the rate update initialization command to obtain the terminal random number ciphertext, generates a wallet random number, and sends 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 rate update 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 rate update command, and sends the interest rate update command and the message authentication code to the hardware wallet through the terminal device. Step S15 is then executed. Otherwise, the update fails to the terminal device, and step S16 is executed. 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 rate update command. If the verification passes, the interest records in the interest details file are rolled back and updated according to the interest rate update data in the interest rate update command, and the interest rate information recorded in the interest rate information file is updated with the latest interest rate information in the interest rate update data. The terminal device is notified that the update is successful, and step S16 is executed. Otherwise, the terminal device is notified that the update has failed, and step S16 is executed. In step S16, the terminal device displays the corresponding information, and the interest rate update process ends.

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

3. The method for updating interest rate information in a hardware wallet as described in claim 1, characterized in that, Before performing step S11, the method further includes: the terminal device activating the contactless module and establishing a connection with the hardware wallet.

4. The method for updating interest rate information in a hardware wallet as described in claim 1, characterized in that, Before step S13, the hardware wallet determines whether the update rate initialization command contains a terminal random number. If yes, it executes step S13; otherwise, it prompts the terminal device that the update failed and executes step S16.

5. The method for updating interest rate information in a hardware wallet as described in claim 1, characterized in that, The step of rolling back and updating the interest records in the interest details file according to the interest rate update data in the interest rate update command specifically includes: determining the interest records that need to be rolled back and updated according to the interest rate information in the interest rate update command, recalculating the recorded interest and accumulated interest in the interest records, and updating the interest records according to the calculation results.

6. The method for updating interest rate information in a hardware wallet as described in claim 1, characterized in that, The step of rolling back and updating the interest records in the interest details file according to the interest rate update data in the interest rate update command specifically includes: determining the interest records that need to be rolled back and updated according to the interest rate information in the interest rate update command; recalculating the interest accrual days, recorded interest, and accumulated interest according to the wallet balance, number of interest accrual days, annualized interest rate and start date in the interest rate information of the interest records; generating new interest records according to the calculation results; and replacing the interest records that need to be rolled back and updated.

7. The method for updating interest rate information in a hardware wallet as described in claim 1, characterized in that, After updating the interest records in the interest details file according to the interest rate update data in the interest rate update command, the process further includes: Step x1: The hardware wallet reads the wallet balance and the accumulated interest from the latest interest record in the interest details file; 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.

8. The method for updating interest rate information in a hardware wallet as described in claim 7, characterized in that, The process preceding step x1 also includes: Step y1: The hardware wallet obtains the latest interest calculation date from the latest interest record in the interest details file, and determines whether the latest interest calculation date is the last interest calculation date corresponding to the current time. If yes, step x1 is executed; otherwise, step y2 is executed. Step y2: 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, generates the corresponding interest record and writes it into the interest details file, and then executes step x1.

9. The method for updating interest rate information in a hardware wallet as described in claim 7, characterized in that, The process preceding step x1 also includes: Step z1: The hardware wallet obtains the latest interest calculation date from the latest interest record in the interest details file, and determines whether the latest interest calculation date is the last interest calculation date corresponding to the current time. If yes, step x1 is executed; otherwise, step z2 is executed. 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 updates the interest records in the interest details file and / or generates corresponding interest records and writes them into the interest details file, thus executing step x1.

10. 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-9.

11. A method for updating interest rate information in a hardware wallet, characterized in that, include: Step S21: The hardware wallet establishes a connection with the terminal device; Step S22: The hardware wallet receives the wallet application selection command sent by the terminal device and returns the wallet information of the hardware wallet to the terminal device. Step S23: The hardware wallet receives the command to read wallet interest rate information sent by the terminal device, reads the interest rate information recorded in the interest rate information file, and returns the hardware wallet interest rate information to the terminal device. Step S24: The hardware wallet receives the update rate initialization command sent by the terminal device, encrypts the terminal random number in the update rate initialization command using a preset verification key to obtain the terminal random number ciphertext, 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 update rate command and message authentication code. If received, step S25 is executed; otherwise, the process ends. Step S25: The hardware wallet uses a preset protection key, the wallet random number, and the message authentication code to verify the integrity of the interest rate update command. If the verification passes, step S26 is executed; otherwise, the terminal device is prompted that the update failed and the process ends. Step S26: 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, updates the interest rate information recorded in the interest rate information file with the latest interest rate information in the interest rate update data, prompts the terminal device that the update is successful, and the process ends.

12. A computer device, 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 of claim 11.