Digital currency offline transaction method, hardware wallet and medium

By dividing multiple account divisions on the same hardware wallet or security module and setting up independent processing and storage units for them, the problem of redundant information and information compliance in digital currency transactions is solved, and more efficient multi-account management is achieved and scalability.

CN119130448APending Publication Date: 2024-12-13CHINA CONSTRUCTION BANK +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411289248.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

In the existing digital currency trading technology, redundant information and information compliance problems arise during multi-account management, and the scalability is not high, making it difficult to effectively handle the transactions of multiple meter users' separate accounts.

Method used

Multiple sub-accounts are divided on the same hardware wallet or security module, and an independent processing unit and storage unit are set up for each sub-account to realize transactions between multiple sub-accounts and reduce redundant information and information compliance risks.

Benefits of technology

It reduces hardware costs, expands application scenarios, facilitates promotion, avoids information compliance issues, and improves the efficiency and scalability of multi-account transactions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119130448A_ABST
    Figure CN119130448A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of digital currency transaction, and discloses a digital currency offline transaction method, a hardware wallet and a medium. The method is applied to a hardware wallet, and the hardware wallet comprises a plurality of processing parts and a plurality of storage parts which are applied to the same security module and correspond to a plurality of individual households. The method comprises the following steps: acquiring a first service request by a first processing part of a first sub-family in a plurality of sub-families, and modifying first sub-family information in a first storage part of the first sub-family corresponding to the first service request; and a second processing part of a second family in the plurality of families obtains the second service request, and modifies second family information in a second storage part of the second family corresponding to the second service request. According to the embodiment of the invention, the transaction among the plurality of sub-households is realized on the same security module, the redundant information generated when the plurality of sub-households are managed is reduced, the application scene of a hardware wallet is expanded, the hardware cost is reduced, and the popularization is convenient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of digital currency transaction, and in particular to an offline transaction method, hardware wallet and medium for digital currency. Background Art

[0002] In the course of digital social development, the digital society and the real society have intersected, merged and influenced each other. To achieve the cross-integration of the digital society and the real society, digital currency has been included in the category of cash in circulation (i.e. M0), which is equivalent to cash banknotes, and realizes the equal exchange of digital society and the real society. Through digital currency, payments between people, people and things, and things and things can be realized, which can achieve a high degree of integration between the digital society and the real society. For example, the development of the Internet of Things and the Internet has realized the connection of all things, but without the addition of digital currency, the Internet of Things is just an information network and cannot form a complete Internet of Things economy.

[0003] In the prior art, the application of digital currency mostly only considers the payment mode between people, that is, including payment between people and payment between people and accounts. When managing digital currency accounts, for example, in the application scenario of smart meter fee management, the hardware wallet installed on the smart meter is usually set with multiple sub-accounts, each sub-account corresponds to a storage module, some sub-accounts correspond to meter users, and some sub-accounts correspond to power companies. The processor of the hardware wallet will generate the electricity bill of the meter user according to the electricity consumption, and then trade digital currency from the sub-account of the meter user to the sub-account of the power company. The establishment of sub-accounts is for the transfer and management of balances. This account management method will generate more redundant information, and there will be problems with whether the information is compliant or not. At the same time, when the processor manages transactions for multiple meter users' sub-accounts, it will occupy too much chip memory and the scalability is not high. Summary of the invention

[0004] In order to solve the above-mentioned technical problems of generating a lot of redundant information and whether the information is compliant when conducting offline transactions of digital currencies of multiple accounts, the first aspect of the embodiment of the present application provides an offline transaction method of digital currency, which is applied to a hardware wallet, wherein the hardware wallet includes multiple processing units and multiple storage units applied to the same security module and corresponding to multiple sub-accounts;

[0005] The method comprises:

[0006] The first processing unit of the first sub-account among the multiple sub-accounts obtains the first service request, and modifies the first sub-account information in the first storage unit of the first sub-account in response to the first service request;

[0007] The second processing unit of the second sub-account among the multiple sub-accounts obtains the second service request, and modifies the second sub-account information in the second storage unit of the second sub-account in response to the second service request.

[0008] The embodiment of the present application sets a corresponding relationship between the storage unit and the processing unit, giving each sub-account the function of storing digital currency and trading digital currency, and realizes transactions between multiple sub-accounts on the same hardware wallet or security module, rather than using multiple hardware wallets or multiple security modules to process transactions between multiple sub-accounts, reducing the redundant information generated when multiple sub-accounts are managed, expanding the application scenarios of hardware wallets, and because the transactions are between multiple sub-accounts on the same hardware wallet or security module, there will be no information compliance issues. The multiple sub-accounts in the embodiment of the present application are realized through a security module, which can reduce hardware costs, reduce user costs, and facilitate promotion.

[0009] It can be understood that the first business request can be a business request for conducting sub-account transactions, such as transferring digital currency from one sub-account to another, or transferring digital currency received by a hardware wallet to a certain sub-account. The second business request is similar and will not be repeated here. It can be understood that multiple sub-accounts can be accounts of different users, or the same user can have at least two sub-accounts. The modification of the sub-account information of the first storage by the first processing unit and the modification of the sub-account information of the second storage unit by the second processing unit can be: deleting digital currency, adding digital currency, modifying user information, modifying user transaction information, etc.

[0010] In some embodiments, the first business request and the second business request may be business transactions between multiple sub-accounts of the hardware wallet.

[0011] In an implementation manner of the first aspect above, the first service request is the same as the second service request.

[0012] In an implementation manner of the first aspect, the modification of the first sub-account information by the first sub-account includes updating the balance of the first sub-account to be reduced by a first amount; and

[0013] The modification of the second sub-account information by the second sub-account includes updating the balance of the second sub-account by increasing the first amount.

[0014] In an implementation manner of the first aspect above, the first service request is different from the second service request.

[0015] In an implementation of the first aspect, the modification of the first sub-account information by the first sub-account includes updating the balance of the first sub-account to be reduced by a second amount; and

[0016] The modification of the second sub-account information by the second sub-account includes updating the balance of the second sub-account by adding the third amount.

[0017] In one possible implementation of the first aspect above, the sub-account information includes digital currency information, user information; and / or: user transaction information.

[0018] In an implementation manner of the first aspect above, the digital currency information includes at least one of the following:

[0019] The corresponding amount of digital currency;

[0020] At least partial transaction details of digital currency.

[0021] The amount corresponding to the digital currency can be understood as the face value or denomination represented by each digital currency. At least part of the transaction details of the digital currency, that is, the transaction sub-chain of the digital currency, can be understood as when, where (or what device), and between which accounts the digital currency was traded.

[0022] In one possible implementation of the first aspect above, the digital currency is a DC coin string.

[0023] In an implementation manner of the first aspect, the modification of the first sub-household information by the first sub-household includes:

[0024] Dynamically adjust the space size of the first storage unit according to the modification result of the first household information; and

[0025] The modification of the second sub-account information by the second sub-account includes:

[0026] The space size of the second storage unit is dynamically adjusted according to the modification result of the second household information.

[0027] In an implementable manner of the first aspect described above, at least the control parameters of each household are different, and the control parameters represent the restrictions on the data modification of the corresponding household information by the household.

[0028] In an implementation manner of the first aspect above, the control parameter includes at least one of the following items:

[0029] The amount threshold for modifying the balance corresponding to any business request of the sub-account;

[0030] The threshold for the number of offline service requests that a user can process;

[0031] The time threshold for a user to continuously process business requests;

[0032] Other sub-accounts that can make the same business request as the sub-account;

[0033] A branch of other electronic devices that can make the same service request as the branch.

[0034] In an implementation manner of the first aspect above, the hardware wallet is applied to a billing device.

[0035] In an implementation manner of the first aspect above, the charging device includes at least one of the following devices:

[0036] Electricity meters, gas meters, water meters, and IoT vehicle payment systems.

[0037] In an implementation manner of the first aspect above, when the billing device is an electricity meter, a gas meter or a water meter, the first sub-household is a residential sub-household, and the second sub-household is a sub-household of an electric power company, a gas company or a water supply company; or

[0038] When the billing device is an Internet of Things vehicle-mounted payment system, the first sub-account is the car owner's sub-account, and the second sub-account is the charging station or gas station's sub-account.

[0039] A second aspect of an embodiment of the present application provides a hardware wallet, including a security module, wherein the security module includes multiple processing units and multiple storage units corresponding to multiple accounts, wherein:

[0040] The first processing unit of the first sub-account among the multiple sub-accounts is used to obtain a first service request and modify the sub-account information in the first storage unit of the first sub-account in response to the first service request;

[0041] The second processing unit of the second sub-account among the multiple sub-accounts is used to obtain a second service request and modify the sub-account information in the second storage unit of the second sub-account in response to the second service request.

[0042] A third aspect of the embodiments of the present application provides a hardware wallet, including a security module, wherein the security module includes:

[0043] A memory for storing instructions executed by one or more processors of the hardware wallet, digital currency information, and

[0044] The processor is one of the one or more processors of the hardware wallet, and is used to execute the offline transaction method of digital currency described in the first aspect above.

[0045] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, on which instructions are stored, which, when executed, cause a computer to execute the offline transaction method for digital currency described in the first aspect above.

[0046] A fourth aspect of an embodiment of the present application provides a computer program product, which includes instructions that, when executed, cause a computer to execute the offline transaction method for digital currency described in the first aspect above. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 According to some embodiments of the prior art, an application scenario diagram of digital currency transactions is shown;

[0048] Figure 2 According to some embodiments of the present application, an application scenario diagram of offline transaction of digital currency is shown;

[0049] Figure 3 According to some embodiments of the present application, an application scenario diagram of offline transaction of digital currency is shown;

[0050] Figure 4 According to some embodiments of the present application, a schematic diagram of the structure of a hardware wallet is shown;

[0051] Figure 5 According to some embodiments of the present application, a schematic diagram of the structure of a hardware wallet is shown;

[0052] Figure 6 According to some embodiments of the present application, a schematic diagram of a process of offline transaction of digital currency is shown;

[0053] Figure 7 According to some embodiments of the present application, a flowchart of a method for supervising household division is shown. DETAILED DESCRIPTION

[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0055] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.

[0056] The acquisition, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.

[0057] As mentioned above, in the current application scenarios of managing transactions between digital currency accounts, digital currencies are often transferred and managed by setting up multiple sub-accounts. Each sub-account corresponds to a hardware wallet or a security module. When digital currencies are traded offline, they are realized through transactions between hardware wallets or security modules. When multiple sub-accounts are managed, more redundant information will be generated, and transactions between electronic devices will have information compliance issues. In addition, in the application scenario where the same hardware wallet includes multiple security modules, managing multiple sub-accounts at the same time will take up too much memory of the hardware wallet and the scalability is not high.

[0058] In order to solve the above problems, the embodiment of the present application proposes an offline transaction method for digital currency, which is applied to a hardware wallet. The method divides multiple sub-accounts on a hardware wallet, that is, divides multiple storage units and multiple processing units corresponding to multiple sub-accounts on the same security module, and each sub-account has the function of independently storing digital currency and modifying the stored digital currency. When the first processing unit of the first sub-account among the multiple sub-accounts obtains the first business request, the first processing unit will modify the first sub-account information stored in the first storage unit in response to the first business request. When the second processing unit of the second sub-account among the multiple sub-accounts obtains the second business request, it will modify the second sub-account information stored in the second storage unit in response to the second business request. It can be understood that each processing unit will correspond to a storage unit to complete the modification of the sub-account information of the corresponding storage unit.

[0059] The embodiment of the present application sets a corresponding relationship between the storage unit and the processing unit, giving each sub-account the function of storing digital currency and trading digital currency, and realizes transactions between multiple sub-accounts on the same hardware wallet or security module, rather than using multiple hardware wallets or multiple security modules to process transactions between multiple sub-accounts, reducing the redundant information generated when multiple sub-accounts are managed, expanding the application scenarios of hardware wallets, and because the transactions are between multiple sub-accounts on the same hardware wallet or security module, there will be no information compliance issues. The multiple sub-accounts in the embodiment of the present application are realized through a security module, which can reduce hardware costs, reduce user costs, and facilitate promotion.

[0060] For example, in the application scenario of smart meter fee management, the security module of the hardware wallet installed on the smart meter will be divided into multiple sub-accounts, including multiple resident accounts and power company accounts. Each resident account can modify the stored sub-account information according to the deduction instruction of the smart meter, and the power company account can store the electricity fee according to the deduction instruction. The power company account can modify and delete the overpaid electricity fee of the resident account, and the corresponding resident account can add or modify the sub-account information and deposit the overpaid electricity fee back into the resident account; at the same time, the electricity fee can be transferred between resident accounts without the need for transactions between multiple hardware wallets or multiple security modules. The transaction function is assigned to each sub-account on the same security module, reducing redundant information and there will be no information compliance issues. In addition, since multiple sub-accounts are divided from the same security module, there is no need to increase the hardware cost of the hardware wallet, which is easy to promote.

[0061] Digital currency can be understood as any of the following: first, a completely closed currency that has nothing to do with the real economy and can only be used in a specific virtual community, such as game coins in the virtual world; second, a currency that can be purchased with real currency but cannot be exchanged back into real currency, and can be used to purchase virtual goods and services, such as Libra launched by Facebook; third, a currency that can be exchanged and redeemed with real currency at a certain rate, and can be used to purchase both virtual goods and services, as well as real goods and services, such as the legal digital currency issued by the central bank.

[0062] A hardware wallet can be understood as a legal digital currency carrier with a security module, that is, the private key of the digital asset is stored separately in a security module, isolated from the Internet, and can be used immediately after being connected. The connection can be understood as a wired connection through a USB cable, or a wireless connection for information exchange through Bluetooth and Near Field Communication (NFC). The form of the hardware wallet security module medium is not limited, and SIM cards, bank cards, and fully embedded terminal security elements can be used. As a carrier of the hardware wallet application, the hardware wallet security module medium must be tested by the testing agency designated by the People's Bank of China.

[0063] The application scenarios of the present application are further described below in conjunction with the accompanying drawings in the specification.

[0064] Please refer to Figure 1, which is an application scenario diagram of digital currency transactions in the prior art. User A1, user A2 and user A3 transfer digital currency to the corresponding hardware wallets respectively, that is, user A1 recharges hardware wallet A1 and transfers digital currency; user A2 recharges hardware wallet A2 and transfers digital currency; user A3 recharges hardware wallet A3 and transfers digital currency. When a transaction occurs, that is, when any one of the users consumes, hardware wallet A1, hardware wallet A2 or hardware wallet A3 transfers the corresponding digital currency to hardware wallet B1. It can be understood that when conducting digital currency transactions between multiple accounts, multiple hardware wallets are required to implement, each hardware wallet handles its own digital currency transaction chain, and hardware wallet A1, hardware wallet A2 and hardware wallet A3 are used for the transfer and management of digital currency when users trade. The hardware wallet B1 can be understood as the counterparty of the user's transaction, such as the power company account in the smart meter fee management application scenario, and the hardware wallet A1, hardware wallet A2 and hardware wallet A3 can be understood as the resident account using the smart meter.

[0065] Please refer to Figure 2 , is an application scenario diagram of offline transactions of digital currency in the embodiment of the present application. The security module of the hardware wallet B2 is divided into multiple sub-accounts: sub-account A1, sub-account A2, sub-account A3, sub-account B1, etc. User A1, user A2 and user A3 transfer digital currency to the corresponding sub-accounts in the hardware wallet respectively. Sub-accounts A1, sub-account A2 and sub-account A3 respond to the user's operation, and the processing unit corresponding to the sub-account will modify the sub-account information stored in the storage unit corresponding to the sub-account (such as sub-account balance and other information). When a transaction occurs, that is, when any one of the users makes a consumption, for example, when user A1 makes a consumption, the processing unit corresponding to sub-account A1 will delete the digital currency corresponding to the consumption in the storage unit corresponding to sub-account A1, and modify some of the sub-account information therein, and the processing unit corresponding to sub-account B1 will add the digital currency corresponding to the consumption to the storage unit corresponding to sub-account B1, and modify some of the sub-account information therein. It can be understood that each sub-account has the function of storing digital currency and processing digital currency transaction chains. The embodiment of the present application copies the storage and transaction chain processing functions of the hardware wallet to each sub-account. Each sub-account can control its own transactions independently, reducing the hardware cost of digital currency transactions between multiple accounts without generating too much redundant information or information compliance issues, thereby expanding the application scenarios of hardware wallets.

[0066] Please refer to Figure 3 , is an application scenario diagram of offline transactions of digital currency in an embodiment of the present application. This embodiment takes the fee management of a single user's smart meter as an example to further describe the application scenario of the present application.

[0067] The user recharges the digital currency to the hardware wallet 12 owned by the user through the electronic device, and can also withdraw the digital currency from the hardware wallet 12 owned by the user. After the user recharges successfully, the hardware wallets conduct transactions, and the user recharges the corresponding sub-account in the hardware wallet 11 installed on the smart meter 13 from the hardware wallet 12 owned by the user, that is, the digital currency is stored in the storage unit corresponding to the user, and part of the sub-account information in the storage unit is modified, such as the sub-account balance and other information. At this time, the sub-account corresponding to the user in the hardware wallet 11 installed on the smart meter 13 is the first sub-account, and the sub-account of the power company is the second sub-account. The processor 131 of the smart meter 13 will control its meter 132 to perform real-time billing and generate electricity bill information. Then the processor 131 of the smart meter 13 will send a deduction instruction to the hardware wallet 11, including the deduction amount, the first sub-account, and the second sub-account. When the first sub-account in the hardware wallet 11 receives the deduction instruction, it will delete the digital currency matching the deduction amount from the digital currency stored in it, while the second sub-account of the power company will increase this digital currency. At the same time, the processing units corresponding to the first sub-account of the user and the second sub-account of the power company will respectively modify the sub-account balance, transaction information, etc. stored in their storage units. At this point, cost management based on smart meters is realized.

[0068] In some embodiments, in the application scenario of offline transactions of digital currency, when the billing device is an IoT vehicle-mounted payment system, taking the IoT vehicle-mounted payment management of a single user as an example, the hardware wallet installed at the charging station or gas station includes the first sub-account of the car owner and the second sub-account of the charging station or gas station. The car owner will recharge the first sub-account of the hardware wallet installed at the charging station or gas station in advance through his own hardware wallet. When the owner's vehicle is charged or refueled at a charging station or a gas station, the meter at the charging station or the gas station will charge according to the charging time or the amount of refueling, and generate fee information. Then the charging station or the gas station will send a deduction instruction to the hardware wallet installed on it according to the fee information, including the amount of the deduction, the first sub-account, and the second sub-account. When the owner's first sub-account in the hardware wallet receives the deduction instruction, it will delete the digital currency matching the amount of the deduction from the digital currency stored in it, while the second sub-account of the charging station or the gas station will increase this digital currency. At the same time, the processing units corresponding to the owner's first sub-account and the second sub-account of the charging station or the gas station will respectively modify the sub-account balance, transaction information, etc. stored in their storage units. At this point, vehicle-mounted payment management based on the Internet of Things is realized.

[0069] The following will take the application scenario of smart meter fee management as an example to introduce the technical solution of this application in detail. It should be noted that the offline transaction method of digital currency in this application can be applied to any other scenario or system, such as an in-vehicle Internet of Things payment system, etc. This application does not limit this.

[0070] Please refer to Figure 4 , is a schematic diagram of the structure of the hardware wallet 11 in an embodiment of the present application. The hardware wallet 11 includes multiple processing units (e.g., a first processing unit 1111, a second processing unit 1112, a third processing unit 1113, etc.) and multiple storage units (e.g., a first storage unit 1121, a second storage unit 1122, a third storage unit 1123, etc.) applied to the same security module and corresponding to multiple sub-accounts. The storage unit is used to store sub-account information, and the processing unit is used to modify the sub-account information stored in the storage unit.

[0071] In some embodiments, the storage space of the plurality of storage units is dynamically changed, where the storage space can be understood as the amount of data that can be stored in the storage unit.

[0072] Furthermore, when the storage space of the storage unit changes, the control parameters of the processing unit will also change. The control parameters can be understood as restrictions on data processing by the processing unit, and may include an upper limit on the amount of digital currency that the processing unit can trade each time, the maximum number of offline transactions that the processing unit can conduct, the longest continuous time allowed for offline transactions by the processing unit, two corresponding processing units that can conduct digital currency transactions (for example, setting up whitelists and blacklists for sub-accounts), the processing unit only accepting transactions with specific electronic devices or the processing unit only accepting specific transactions with specific electronic devices, etc.

[0073] In some embodiments, at least the control parameters of each household are different, and the control parameters represent the restrictions on the data modification of the corresponding household information by the household. Specifically, the control parameters of each household correspond to the restrictions on the modification of the corresponding storage unit by the processing unit, or the storage restrictions of the storage unit. The control parameters have the same meaning as the control parameters mentioned above, and are not described here.

[0074] In some embodiments, the household information stored in the multiple storage units mentioned above may include digital currency information, user information, and / or user transaction information.

[0075] It can be understood that digital currency information may include the balance of each account, the digital currency stored in each account, etc.; user information may include information such as the user and account opening date; user transaction information may include the details of each transaction of the user corresponding to the storage unit, including the time, amount, digital currency traded, the user conducting the transaction, etc.

[0076] The household information stored in different storage units may be the same or different, for example, the first storage unit 1121 stores digital currency information and user information, and the second storage unit 1122 stores digital currency information, user information, and user transaction information; or the first storage unit 1121 and the second storage unit 1122 are both used to store digital currency information, user information, and user transaction information. This application is not limited here.

[0077] Furthermore, the digital currency information includes the corresponding amount of the digital currency and / or at least part of the transaction details of the digital currency. The corresponding amount of the digital currency can be understood as the face value or denomination represented by each digital currency, and at least part of the transaction details of the digital currency, that is, the transaction subchain of the digital currency, can be understood as when, where (or what device), and between which accounts the digital currency was traded.

[0078] In some embodiments, the digital currency is a DC coin string, which can be understood as an identifier with value characteristics generated according to the DC / EP (digital currency / electronic payment) expression specification, which exists in the hardware wallet in the form of an encrypted string.

[0079] Please refer to Figure 5 In some embodiments, the hardware wallet 21 includes a security module 222 , and the security module 222 includes a processor 2221 and a memory 2222 .

[0080] The multiple processing units mentioned above can be represented as multiple software processing modules, multiple programs, and multiple instruction sets. The processor 2221 can run multiple software processing modules, multiple programs, and multiple instruction sets.

[0081] An embedded program is also stored in the memory 2222 , wherein when the embedded program is executed by the processor 2221 , the processor 2221 executes the offline transaction method of digital currency described above.

[0082] Furthermore, the above-mentioned various devices can be interconnected through a bus architecture. The bus architecture can be a bus and bridge that can include any number of interconnected buses. Specifically, various circuits of one or more central processing units (CPUs) represented by processor 2221 and one or more memories represented by memory 2222 are connected together. The bus architecture can also connect various other circuits such as peripheral modules 221, voltage regulators, and power management circuits together. It can be understood that the bus architecture is used to achieve connection and communication between these components. In addition to the data bus, the bus architecture also includes a power bus, a control bus, and a status signal bus, which are all well known in the art, so they are not described in detail herein.

[0083] The peripheral module 221 may include a communication unit, a security unit, etc. The communication unit may be a wireless communication unit such as a Bluetooth unit, an NFC unit, etc., or may be a unit for contact communication through a port.

[0084] The memory 2222 is used to store the programs and data necessary for the operation of the operating system, the intermediate results of the calculation process of the processor 2221, and other data as well as digital currency.

[0085] Furthermore, the security module 222 is an embedded chip, and the security module 222 uses a real-time operating system (RTOS) to divide the processor and the memory. Specifically, it is FreeRTOS, which is a free real-time operating system. The security module uses a real-time operating system to divide the processor 2221 and the memory 2222.

[0086] It is understood that the memory 2222 in the embodiment of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. The memory 402 of the apparatus and method described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0087] In some embodiments, the memory 2222 stores the following elements, executable modules or data structures, or a subset thereof, or an extended set thereof: an embedded system 2223 and a data storage 2224 .

[0088] Among them, the data storage 2224 is divided into storage sub-areas corresponding to each household, and the household information corresponding to each household is stored. The storage unit in the previous text corresponds to the storage sub-area in the data storage, and the modification of the corresponding storage unit by the processing unit can be understood as the modification of the corresponding storage sub-area by the software processing module, program segment or instruction set of the processor 2222, and the modification includes deletion, addition and data change.

[0089] Among them, the embedded system 2223 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic businesses and process hardware-based tasks.

[0090] When the processor 2221 calls and executes the data stored in the memory 2222, specifically, the digital currency or instructions stored in the data storage 2224, the processor first obtains the business information and then runs the corresponding processing unit to transfer the digital currency according to the transaction information.

[0091] In some embodiments, the peripheral module 221 and the security module 222 are hardware devices 22 of a hardware wallet. The hardware wallet 21 also includes a memory 21. The memory 21 stores the following elements, executable modules or data structures, or their subsets, or their extended sets.

[0092] In some embodiments, the memory 21 may include an external application 211, which may be a bank transaction platform, etc., and the external application 211 is used to process transaction information between users and trigger the corresponding processing unit of the security module 222 to process data. The external application 211 can also complete the transaction between the current hardware wallet 21 and electronic devices such as mobile phones or other hardware wallets or servers.

[0093] In some embodiments, the security module 222 applies the real-time operating system to perform the following operations: setting multiple processing units and multiple storage units corresponding to multiple accounts; and realizing dynamic changes in the storage space of at least part of the storage unit. The real-time operating system divides the security module into storage units and processing units corresponding to multiple accounts through software algorithms, so that one processing unit corresponds to only one storage unit, and completes the modification of the household information stored in the storage unit, thereby solving the data isolation problem and reducing hardware costs.

[0094] In some embodiments, the same processing unit may include multiple processing units, each processing unit corresponding to a different modification function, such as a processing unit for writing data to the storage unit and a processing unit for deleting data from the storage unit.

[0095] Please refer to Figure 6 , is a flow chart of an offline transaction method of digital currency in an embodiment of the present application. The method is applied to the hardware wallet described above.

[0096] The method includes:

[0097] S301: a first processing unit of a first sub-account among the multiple sub-accounts obtains a first service request, and modifies first sub-account information in a first storage unit of the first sub-account in response to the first service request;

[0098] S302: The second processing unit of the second sub-account among the multiple sub-accounts obtains a second service request, and modifies the second sub-account information in the second storage unit of the second sub-account in response to the second service request.

[0099] It is understood that the first service request may be a service request for conducting a sub-account transaction, such as transferring digital currency from one sub-account to another, or transferring digital currency received by the hardware wallet to a certain sub-account. The second service request is similar and will not be described in detail. It is understood that the multiple sub-accounts are accounts on the hardware wallet, and the first sub-account and the second sub-account are two of the multiple sub-accounts, for example Figure 2 The sub-account A1 is the first sub-account, and the sub-account A2 is the second sub-account. Multiple sub-accounts can be accounts of different users. For example, in the application scenario of expense management of smart meters, different sub-accounts can correspond to different families. The same user can also have at least two sub-accounts, and at least two sub-accounts correspond to different business scenarios. For example, there will be multiple sub-accounts in the user's hardware wallet, and different sub-accounts correspond to different transaction objects, such as the first sub-account corresponding to the electricity company, the second sub-account corresponding to the gas company, etc.

[0100] In some embodiments, the sub-account information includes digital currency information, user information; and / or: user transaction information.

[0101] The modification of the household information of the first storage by the first processing unit and the modification of the household information of the second storage unit by the second processing unit can be: deletion of digital currency, addition of digital currency, modification of user information, modification of user transaction information, etc.

[0102] In some embodiments, the first service request is the same as the second service request.

[0103] Further, the modification of the first sub-account information by the first sub-account includes updating the balance of the first sub-account by reducing the first amount; and the modification of the second sub-account information by the second sub-account includes updating the balance of the second sub-account by increasing the first amount.

[0104] It can be understood that the first business request and the second business request correspond to the same transaction. For example, if the first transaction request and the second transaction request are both to transfer digital currency a1 from sub-account A1 to sub-account B1, the first processing unit corresponding to sub-account A1 will delete the digital currency a1 in the first storage unit, and the balance of sub-account A1 will be reduced by the first amount, and the amount corresponding to digital currency a1 is the first amount. The second processing unit corresponding to sub-account B2 will add digital currency a1 to the second storage unit, and the balance of sub-account B2 will increase by the first amount. Furthermore, when the first business request and the second business request are to transfer the digital currency a1 in sub-account A1 to sub-account B2, and it is necessary to add the transaction sub-chain of the digital currency generated according to the first business request to the digital currency information of the digital currency a1, the first processing unit corresponding to sub-account A1 will delete the digital currency a1 in the first storage unit. At this time, the balance of sub-account A1 will be reduced by the first amount, and the amount corresponding to the digital currency a1 will be the first amount. The second processing unit corresponding to sub-account B2 modifies the digital currency information of the digital currency a1 according to the first business request, and obtains the digital currency a2 and its currency information including the transaction sub-chain corresponding to the first business request, and then stores the digital currency a2 and its currency information in the second storage unit. At this time, the balance of sub-account B2 will increase by the first amount.

[0105] In some embodiments, the first service request is different from the second service request.

[0106] Further, the modification of the first sub-account information by the first sub-account includes updating the balance of the first sub-account by reducing the second amount; and the modification of the second sub-account information by the second sub-account includes updating the balance of the second sub-account by increasing the third amount.

[0107] It can be understood that the first business request and the second business request correspond to different transactions. For example, the first business request is to transfer digital currency a3 from sub-account A1 to sub-account B1, sub-account A1 is the first sub-account, at this time, the balance of sub-account A1 is reduced by the second amount, the amount corresponding to digital currency a3 is the second amount, the balance of sub-account B1 is increased by the second amount, and digital currency a3 is transferred from sub-account A1 to sub-account B1; the second business request is to transfer digital currency a4 from sub-account A2 to sub-account B1, the amount corresponding to digital currency a4 is the third amount, sub-account B1 is the second sub-account, at this time, the balance of sub-account A2 is reduced by the third amount, and the balance of sub-account B1 is increased by the third amount.

[0108] In some embodiments, the first business request and the second business request may be business transactions between multiple sub-accounts of the hardware wallet. Further, the first business request is generated by the hardware wallet according to a transaction instruction sent by an external electronic device. The external electronic device may select different electronic devices according to the transaction scenario.

[0109] The external electronic device may be a portable device, such as a mobile phone, a tablet, a notebook, or a wearable device, such as a smart watch, smart glasses, or a computer or other electronic device with data processing capabilities, which is not limited in the present application.

[0110] For example, in an application scenario of expense management of a smart meter, the external electronic device may be a smart meter. The processor of the smart meter controls its billing module to generate corresponding electricity charges according to real-time electricity consumption. The processor of the smart meter then generates a transaction instruction to a hardware wallet according to the electricity charges. The hardware wallet generates a first business request and then executes S302 to complete the conversion of the first digital currency information between the user's sub-account and the power company's sub-account, that is, the conversion of the first digital currency information between the first storage unit and the second storage unit.

[0111] In some embodiments, the first business request and the second business request may be business transactions between any one of the sub-accounts of the hardware wallet and other electronic devices. The second business request may be understood as business transactions between the hardware wallet and other electronic devices, and the other electronic devices may be the same type of devices as the hardware wallet, and may be portable devices such as mobile phones, tablets, and notebooks, and may be wearable devices such as smart watches and smart glasses, and may also be computers and other electronic devices with data processing capabilities, and this application does not limit this.

[0112] In some embodiments, the second business transaction between the hardware wallet and other electronic devices can be achieved through contact communication or wireless communication. The contact communication can be that the hardware wallet 11 and other electronic devices are both equipped with corresponding contact nodes. When the two need to communicate, the contact nodes on the two are brought into contact to form a closed data transmission line to complete the communication. The contactless communication can be, for example, Bluetooth, Near Field Communication (NFC), Radio Frequency Identification (RFID) communication, etc. Specifically, the hardware wallet 11 in the embodiment of the present application and other electronic devices exchange data through NFC.

[0113] In some embodiments, the modification of the first sub-household information by the first sub-household includes:

[0114] The space size of the first storage unit is dynamically adjusted according to the modification result of the first household information; and the modification of the second household information by the second household includes: dynamically adjusting the space size of the second storage unit according to the modification result of the second household information.

[0115] It can be understood that the space size of the storage unit corresponding to each household can be variable, and the space size of the storage unit can be dynamically adjusted according to the corresponding modification results.

[0116] In some embodiments, at least the control parameters of the sub-households are different, and the control parameters represent the restrictions on the data modification of the corresponding sub-household information by the sub-households.

[0117] In some embodiments, the control parameter includes at least one of the following:

[0118] The amount threshold for modifying the balance of a sub-account corresponding to any business request, that is, the upper limit of the amount of digital currency that the processing department can trade each time;

[0119] The threshold of the number of offline business requests that a sub-account can process, that is, the maximum number of offline transactions that the processing department can perform;

[0120] The time threshold for the continuous processing of business requests by the sub-account, that is, the maximum continuous time allowed for the processing department to conduct offline transactions;

[0121] Other sub-accounts that can make the same business request as the sub-account, that is, two corresponding processing units that can conduct digital currency transactions (for example, setting up whitelists and blacklists for sub-accounts);

[0122] The sub-accounts of other electronic devices that can make the same business requests as the sub-accounts, that is, the processing unit corresponding to the sub-account only accepts sub-account transactions with specific other electronic devices or the processing unit only accepts specific transactions with sub-accounts of other electronic devices.

[0123] In some embodiments, the hardware wallet 21 mentioned above is used as a billing device. Figure 3 Smart meters in.

[0124] Furthermore, the billing device includes at least one of the following devices: an electricity meter, a gas meter, a water meter, and an Internet of Things vehicle-mounted payment system.

[0125] In some embodiments, when the billing device is an electric meter, a gas meter or a water meter, the first sub-household is a residential sub-household, and the second sub-household is a sub-household of an electric power company, a gas company or a water supply company.

[0126] It is understandable that when the billing device is an electric meter, gas meter or water meter, multiple households are divided into resident households and households corresponding to the charging company. Resident households can only conduct transactions with households of the charging company, or residents can recharge or withdraw money from resident households through other electronic devices. Figure 7 Among them, the residents' households are balance households A1, balance households A2, balance households A3, etc., and the charging company's households are balance households B1, etc.

[0127] Please refer to Figure 7 , which is a flow chart of the method for supervising sub-accounts in an embodiment of the present application, wherein the method for supervising sub-accounts can be understood as dividing the security module of the hardware wallet into multiple sub-accounts, and then each sub-account stores its digital currency and processes its own digital currency transaction chain, wherein the digital currency transaction chain can be understood as transaction information and transaction processing based on the transaction information.

[0128] Specifically, the method for generating a household is as follows:

[0129] The state or certain specific enterprises open a software mother wallet and configure the relevant wallet parameters of the software mother wallet, such as the control parameters mentioned above, the storage space of the software mother wallet, and then recharge the software mother wallet with digital currency. The software mother wallet can display its balance.

[0130] After the software parent wallet is opened, a hardware sub-wallet is opened, such as opening hardware wallet A and opening hardware wallet B in the figure. The hardware wallet will inherit the relevant wallet parameters of the software parent wallet, and the user can customize the relevant wallet parameters of the hardware wallet.

[0131] Then the hardware wallet system will divide the hardware wallet into multiple sub-accounts, such as sub-account A1, sub-account A2, etc., that is, it is divided into multiple sub-accounts, each of which can correspond to a processing unit and a storage unit. The storage unit is used for sub-account information, and the processing unit modifies the sub-account information of the storage unit. Each sub-account inherits the control parameters of the hardware wallet by default, and the control parameters can be customized.

[0132] Hardware wallets can achieve dynamic expansion, manage each user's memory space and control parameters based on the embedded hardware operating system they use.

[0133] When conducting offline transactions of digital currency, the processing unit of each sub-account can modify the sub-account information in the storage unit corresponding to the sub-account separately according to the transaction scenario.

[0134] In some embodiments, in the application scenario of smart meter expense management, the State Grid Finance Department opens a software master wallet, and the State Grid Finance Department uses a blank hardware wallet card to open a hardware sub-wallet. After the operator obtains it, it is installed in the smart meter slot. When the smart meter is installed in the household, the user uses his own hardware wallet to recharge the hardware wallet of the smart meter through the NFC card sticking mode. At this time, the funds are divided into the sub-accounts corresponding to the user in the hardware wallet (for example Figure 7 In the balance sub-account A1, balance sub-account A2, etc.), these sub-accounts can be personalized, such as setting a recharge limit, a withdrawal reserve limit, a recharge wallet range (such as not being able to use the meter company wallet for recharge), etc.

[0135] The internal billing module of the smart meter performs real-time billing. Every day, the processor of the smart meter will generate a deduction instruction and send the deduction instruction to the hardware wallet of the smart meter. The user's corresponding household will deduct the electricity fee to the power company's household (such as the State Grid's household), and record the relevant transaction details.

[0136] Users can withdraw digital currency from their corresponding sub-accounts at any time, not exceeding the reserved upper limit parameters and the amount of previous recharge. Furthermore, parameter restrictions can also be set for the withdrawal account of the user's corresponding sub-account. The withdrawal can be understood as the transfer of digital currency from the user's corresponding sub-account to the user's hardware wallet.

[0137] The State Grid can set up a way to collect electricity bills. For example, it can arrange for operators to come to the site to collect the amount of the power company's account in the hardware wallet of the smart meter using a specific hardware wallet at regular intervals. It can also connect to the 4G network at regular intervals to directly withdraw the amount of the power company's account to the software master wallet. The amount changes and details are recorded separately, which will not affect the user's pre-stored account.

[0138] In some embodiments, the hardware wallet includes a security module, which includes multiple processing units and multiple storage units corresponding to multiple accounts, such as Figure 4 , where:

[0139] The first processing unit of the first sub-account among the multiple sub-accounts is used to obtain a first service request and modify the sub-account information in the first storage unit of the first sub-account in response to the first service request;

[0140] The second processing unit of the second sub-account among the multiple sub-accounts is used to obtain a second service request and modify the sub-account information in the second storage unit of the second sub-account in response to the second service request.

[0141] In addition, an embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor executes the offline transaction method of digital currency described above.

[0142] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0143] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A digital currency offline transaction method, characterized in that: Applied to a hardware wallet, the hardware wallet includes multiple processing units and multiple storage units applied to the same security module and corresponding to multiple sub-accounts; The method comprises: The first processing unit of the first sub-account among the multiple sub-accounts obtains the first service request, and modifies the first sub-account information in the first storage unit of the first sub-account in response to the first service request; The second processing unit of the second sub-account among the multiple sub-accounts obtains the second service request, and modifies the second sub-account information in the second storage unit of the second sub-account in response to the second service request.

2. The offline transaction method of digital currency according to claim 1, characterized in that: The first service request is the same as the second service request.

3. The offline transaction method of digital currency according to claim 2, characterized in that: The modification of the first sub-account information by the first sub-account includes updating the balance of the first sub-account to be reduced by a first amount; and The modification of the second sub-account information by the second sub-account includes updating the balance of the second sub-account by increasing the first amount.

4. The offline transaction method of digital currency according to claim 1, characterized in that: The first service request is different from the second service request.

5. The offline transaction method of digital currency according to claim 4, characterized in that: The modification of the first sub-account information by the first sub-account includes updating the balance of the first sub-account to be reduced by a second amount; and The modification of the second sub-account information by the second sub-account includes updating the balance of the second sub-account by adding a third amount.

6. The offline transaction method of digital currency according to claim 1, characterized in that: The sub-account information includes digital currency information, user information; and / or: user transaction information.

7. The offline transaction method of digital currency according to claim 6, characterized in that: The digital currency information includes at least one of the following: The corresponding amount of digital currency; At least partial transaction details of digital currency.

8. The offline transaction method of digital currency according to claim 7, characterized in that: The digital currency is a DC coin string.

9. The offline transaction method of digital currency according to claim 1, characterized in that: The modification of the first sub-household information by the first sub-household includes: Dynamically adjust the space size of the first storage unit according to the modification result of the first household information; and The modification of the second sub-account information by the second sub-account includes: The space size of the second storage unit is dynamically adjusted according to the modification result of the second household information.

10. The offline transaction method of digital currency according to claim 1, characterized in that: At least the control parameters of each sub-household are different, and the control parameters represent the restrictions on the data modification of the corresponding sub-household information by the sub-household.

11. The offline transaction method of digital currency according to claim 10, characterized in that: The control parameters include at least one of the following: The amount threshold for modifying the balance corresponding to any business request of the sub-account; The threshold for the number of offline service requests that a user can process; The time threshold for a user to continuously process business requests; Other sub-accounts that can make the same business request as the sub-account; A branch of other electronic devices that can make the same service request as the branch.

12. The offline transaction method of digital currency according to any one of claims 1 to 11, characterized in that: The hardware wallet is applied to the billing device.

13. The offline transaction method of digital currency according to claim 12, characterized in that: The charging device includes at least one of the following devices: Electricity meters, gas meters, water meters, and IoT vehicle payment systems.

14. The offline transaction method of digital currency according to claim 13, characterized in that: When the billing device is an electric meter, a gas meter or a water meter, the first sub-household is a residential sub-household, and the second sub-household is a sub-household of an electric power company, a gas company or a water supply company; or When the billing device is an Internet of Things vehicle-mounted payment system, the first sub-account is the car owner's sub-account, and the second sub-account is the charging station or gas station's sub-account.

15. A hardware wallet, characterized in that: A security module is included, wherein the security module includes a plurality of processing units and a plurality of storage units corresponding to a plurality of accounts, wherein: The first processing unit of the first sub-account among the multiple sub-accounts is used to obtain a first service request and modify the sub-account information in the first storage unit of the first sub-account in response to the first service request; The second processing unit of the second sub-account among the multiple sub-accounts is used to obtain a second service request and modify the sub-account information in the second storage unit of the second sub-account in response to the second service request.

16. A hardware wallet, characterized in that: A security module is included, wherein the security module includes: A memory for storing instructions executed by one or more processors of the hardware wallet, digital currency information, and The processor is one of the one or more processors of the hardware wallet, and is used to execute the offline transaction method of digital currency according to any one of claims 1 to 14.

17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions which, when executed, cause a computer to execute the offline digital currency transaction method according to any one of claims 1 to 14.

18. A computer program product, characterized in that The computer program product comprises instructions which, when executed, cause a computer to execute the offline transaction method for digital currency according to any one of claims 1 to 14.

Citation Information

Cited By

  • Method for realizing interest calculation in hardware wallet

    CN121563658A