Hardware wallet opening method, device, computer equipment and storage medium
By updating the identification information of the hardware wallet and generating configuration parameters, the problem of high failure rate of hardware wallet opening is solved, achieving higher success rate and reliability.
Patent Information
- Application Number
- CN202210110029.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-29
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2042-01-29
AI Technical Summary
There is a high failure rate problem during the opening of traditional hardware wallets, which leads to the inability to use the hardware wallet normally.
By detecting the unfinished wallet opening process, the current wallet identification information of the hardware wallet is updated, a new wallet identification information is generated, and the configuration parameter acquisition request is forwarded to the server through the client. The server generates and issues configuration parameter information to the security element of the hardware wallet to complete the wallet opening process.
It improves the success rate of hardware wallet opening, prevents opening errors or data loss caused by the same wallet identification information, and ensures the reliability and success of the opening process.
Smart Images

Figure CN114626838B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technologies, and particularly to a method and apparatus for opening a hardware wallet, a computer device, a storage medium, and a computer program product. Background Art
[0002] With the development of digital currency technologies, the hardware wallet technology has emerged. A hardware wallet stores data such as digital currency assets in a secure chip, and operations such as digital currency calculation, payment, and synchronization are completed in the secure chip. Completing the opening process of the hardware wallet is a prerequisite for the normal use of the hardware wallet.
[0003] However, during the process of opening a hardware wallet using traditional technologies, errors or data loss often occur, resulting in the inability to complete the opening process of the hardware wallet and making the hardware wallet unavailable.
[0004] Therefore, in traditional technologies, there is a problem of a high failure rate in opening a hardware wallet. Summary of the Invention
[0005] Based on this, in view of the above technical problems, it is necessary to provide a method and apparatus for opening a hardware wallet, a computer device, a computer-readable storage medium, and a computer program product that can improve the success rate of opening a hardware wallet.
[0006] In a first aspect, this application provides a method for opening a hardware wallet, which is applied to the hardware wallet. The method includes:
[0007] In response to an opening request sent by a client for the hardware wallet, if it is detected that there is an unfinished wallet opening process locally, then according to a preset algorithm, update the current wallet identification information of the hardware wallet to obtain new wallet identification information;
[0008] Generate a first configuration parameter acquisition request according to the new wallet identification information, and forward the first configuration parameter acquisition request to a server through the client; the server is configured to, in response to the first configuration parameter acquisition request, generate first configuration parameter information for opening the hardware wallet according to the new wallet identification information; and is further configured to send the first configuration parameter information to the hardware wallet through the client;
[0009] Store the first configuration parameter information in a secure element of the hardware wallet;
[0010] In response to the wallet opening confirmation instruction sent by the client, if it is determined that the first configuration parameter information is successfully stored in the security element, the wallet opening success message is forwarded to the server through the client; the wallet opening success message is used for the server to record that the hardware wallet has completed the wallet opening process.
[0011] In one embodiment, the preset algorithm is a random number generation algorithm; the current wallet identification information includes the current character identification corresponding to the security element; updating the current wallet identification information of the hardware wallet according to the preset algorithm to obtain the new wallet identification information includes: generating the target random character identification corresponding to the security element based on the current character identification according to the random number generation algorithm; obtaining the new wallet identification information according to the target random character identification.
[0012] In one embodiment, generating the target random character identification corresponding to the security element based on the current character identification according to the random number generation algorithm includes: determining a preset number of characters in the current character identification; generating a random number according to the random number generation algorithm, and using the random number to replace the preset number of characters to obtain the target random character identification; or determining the character insertion position in the current character identification, generating a random number according to the random number generation algorithm, and adding the random number to the character insertion position to obtain the target random character identification.
[0013] In one embodiment, after the step of generating the first configuration parameter acquisition request according to the new wallet identification information and forwarding the first configuration parameter acquisition request to the server through the client, the method further includes: if it is detected that the first configuration parameter information is successfully received, generating a reception success message; forwarding the reception success message to the server through the client; the reception success message is used to instruct the server to generate the wallet opening confirmation instruction and send the wallet opening confirmation instruction to the hardware wallet through the client.
[0014] In one embodiment, the method further includes: if it is detected that the first configuration parameter information fails to be successfully stored in the security element, forwarding a wallet opening failure message to the server through the client; the wallet opening failure message is used for the server to record that the hardware wallet has not completed the wallet opening process.
[0015] In one embodiment, the method further includes: if it is detected that the target wallet has never executed the wallet opening process, obtaining the current wallet identification information; generating a second configuration parameter acquisition request according to the current wallet identification information, and forwarding the second configuration parameter acquisition request to the server through the client; the server is configured to respond to the second configuration parameter acquisition request, generate second configuration parameter information for opening the hardware wallet according to the current wallet identification information; and further configured to send the second configuration parameter information to the hardware wallet through the client.
[0016] In a second aspect, the present application further provides a hardware wallet opening device. The device includes:
[0017] An identification update module, configured to respond to an opening request sent by a client for the hardware wallet, if it is detected that there is an unfinished wallet opening process locally, update the current wallet identification information of the hardware wallet according to a preset algorithm to obtain new wallet identification information;
[0018] A first configuration parameter acquisition request generation module, configured to generate a first configuration parameter acquisition request according to the new wallet identification information, and forward the first configuration parameter acquisition request to the server through the client; the server is configured to respond to the first configuration parameter acquisition request, generate first configuration parameter information for opening the hardware wallet according to the new wallet identification information; and further configured to send the first configuration parameter information to the hardware wallet through the client;
[0019] A first configuration parameter storage module, configured to store the first configuration parameter information in a security element of the hardware wallet;
[0020] An opening success message sending module, configured to respond to a wallet opening confirmation instruction sent by the client, if it is determined that the first configuration parameter information is successfully stored in the security element, forward a wallet opening success message to the server through the client; the wallet opening success message is used for the server to record that the hardware wallet has completed the wallet opening process.
[0021] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0022] Responding to an opening request sent by a client for the hardware wallet, if it is detected that there is an unfinished wallet opening process locally, updating the current wallet identification information of the hardware wallet according to a preset algorithm to obtain new wallet identification information;
[0023] Generate a first configuration parameter acquisition request based on the new wallet identification information, and forward the first configuration parameter acquisition request to the server through the client; the server is configured to, in response to the first configuration parameter acquisition request, generate first configuration parameter information for opening the hardware wallet according to the new wallet identification information; and is further configured to send the first configuration parameter information to the hardware wallet through the client;
[0024] Store the first configuration parameter information in the security element of the hardware wallet;
[0025] In response to the wallet opening confirmation instruction sent by the client, if it is determined that the first configuration parameter information is successfully stored in the security element, forward a wallet opening success message to the server through the client; the wallet opening success message is used for the server to record that the hardware wallet has completed the wallet opening process.
[0026] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0027] In response to an opening request sent by the client for the hardware wallet, if it is detected that there is an unfinished wallet opening process locally, update the current wallet identification information of the hardware wallet according to a preset algorithm to obtain new wallet identification information;
[0028] Generate a first configuration parameter acquisition request based on the new wallet identification information, and forward the first configuration parameter acquisition request to the server through the client; the server is configured to, in response to the first configuration parameter acquisition request, generate first configuration parameter information for opening the hardware wallet according to the new wallet identification information; and is further configured to send the first configuration parameter information to the hardware wallet through the client;
[0029] Store the first configuration parameter information in the security element of the hardware wallet;
[0030] In response to the wallet opening confirmation instruction sent by the client, if it is determined that the first configuration parameter information is successfully stored in the security element, forward a wallet opening success message to the server through the client; the wallet opening success message is used for the server to record that the hardware wallet has completed the wallet opening process.
[0031] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0032] In response to an opening request sent by a client for the hardware wallet, if it is detected that there is an unfinished wallet opening process locally, the current wallet identification information of the hardware wallet is updated according to a preset algorithm to obtain new wallet identification information;
[0033] A first configuration parameter acquisition request is generated according to the new wallet identification information, and the first configuration parameter acquisition request is forwarded to the server through the client; the server is configured to, in response to the first configuration parameter acquisition request, generate first configuration parameter information for opening the hardware wallet according to the new wallet identification information; and is further configured to send the first configuration parameter information to the hardware wallet through the client;
[0034] The first configuration parameter information is stored in the secure element of the hardware wallet;
[0035] In response to a wallet opening confirmation instruction sent by the client, if it is determined that the first configuration parameter information is successfully stored in the secure element, a wallet opening success message is forwarded to the server through the client; the wallet opening success message is used for the server to record that the hardware wallet has completed the wallet opening process.
[0036] The above-mentioned method, device, computer device, storage medium and computer program product for opening a hardware wallet are applied to the hardware wallet. By responding to an opening request sent by a client for the hardware wallet, if it is detected that there is an unfinished wallet opening process locally, the current wallet identification information of the hardware wallet is updated according to a preset algorithm to obtain new wallet identification information; a first configuration parameter acquisition request is generated according to the new wallet identification information, and the first configuration parameter acquisition request is forwarded to the server through the client; the server is configured to, in response to the first configuration parameter acquisition request, generate first configuration parameter information for opening the hardware wallet according to the new wallet identification information; and is further configured to send the first configuration parameter information to the hardware wallet through the client; the first configuration parameter information is stored in the secure element of the hardware wallet; in response to a wallet opening confirmation instruction sent by the client, if it is determined that the first configuration parameter information is successfully stored in the secure element, a wallet opening success message is forwarded to the server through the client; the wallet opening success message is used for the server to record that the hardware wallet has completed the wallet opening process; thus, when the hardware wallet receives an opening request sent for the hardware wallet, if it is detected that there is an unfinished wallet opening process locally, new wallet identification information can be generated and forwarded to the server through the client, preventing the server from reporting an error or discarding data due to its inability to respond to the same wallet identification information, and avoiding the situation where the opening of the hardware wallet fails to be completed; thereby, the probability of failure in opening the hardware wallet can be reduced, and the success rate of opening the hardware wallet can be improved. Brief Description of the Drawings
[0037] Figure 1 It is an application environment diagram of a method for opening a hardware wallet in an embodiment;
[0038] Figure 2 It is a schematic flowchart of a method for opening a hardware wallet in an embodiment;
[0039] Figure 3 It is a schematic flowchart of another method for opening a hardware wallet in an embodiment;
[0040] Figure 4 It is a structural block diagram of a hardware wallet opening device in an embodiment;
[0041] Figure 5 It is an internal structure diagram of a computer device in an embodiment. Detailed implementation manners
[0042] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0043] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects and do not necessarily need to describe a specific order or sequence. It should be understood that such used data can be interchanged under appropriate circumstances so that the embodiments of the present disclosure described herein can be implemented in an order different from those illustrated or described herein. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present disclosure. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0044] A method for opening a hardware wallet provided by an embodiment of the present application can be applied to, for example Figure 1In the application environment shown. Among them, the hardware wallet communicates with the client through wireless communication technology; the client communicates with the server through the network. The data storage system can store the data that the server needs to process. The data storage system can be integrated on the server, or placed on the cloud or other network servers. Among them, in response to the opening request sent by the client for the hardware wallet, if it detects that there is an unfinished wallet opening process locally, it updates the current wallet identification information of the hardware wallet according to a preset algorithm to obtain a new wallet identification information; then, the hardware wallet generates a first configuration parameter acquisition request according to the new wallet identification information, and forwards the first configuration parameter acquisition request to the server through the client; the server is used to respond to the first configuration parameter acquisition request, generate first configuration parameter information for opening the hardware wallet according to the new wallet identification information; and is also used to send the first configuration parameter information to the hardware wallet through the client; then, the hardware wallet stores the first configuration parameter information in the security element of the hardware wallet; finally, in response to the wallet opening confirmation instruction sent by the client, if it determines that the first configuration parameter information is successfully stored in the security element, it forwards the wallet opening success message to the server through the client; the wallet opening success message is used for the server to record that the hardware wallet has completed the wallet opening process. Among them, the client can be, but is not limited to, various personal computers, laptop computers, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things device can be a program on terminals such as smart speakers, smart TVs, smart air conditioners, and smart in-vehicle devices. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. The server can be implemented by an independent server or a server cluster composed of multiple servers.
[0045] In one embodiment, as Figure 2 shown, a method for opening a hardware wallet is provided. Taking the hardware wallet in Figure 1 as an example, the method includes the following steps:
[0046] Step S210, in response to the opening request sent by the client for the hardware wallet, if it detects that there is an unfinished wallet opening process locally, update the current wallet identification information of the hardware wallet according to a preset algorithm to obtain a new wallet identification information.
[0047] Among them, the opening request is the opening request of the hardware wallet.
[0048] Among them, the wallet identification information can include, but is not limited to, the unique ID (Identity document) of the security element of the hardware wallet.
[0049] Among them, the networked terminal can be, but is not limited to, a personal computer, a laptop, a smart phone, a tablet computer, an Internet of Things device, and a portable wearable device. The Internet of Things device can be a smart speaker, a smart TV, a smart air conditioner, a smart vehicle-mounted device, and other terminals.
[0050] In a specific implementation, the user can open the client on the networked terminal, and through NFC (Near Field Communication) technology or Bluetooth technology, the client can obtain the card information of the hardware wallet, such as the name of the hardware wallet, the serial number of the hardware card package, etc. When the user starts the hardware wallet opening process on the client, the client will send an opening request for the hardware wallet. After receiving the opening request, the hardware wallet will detect whether it has ever executed the wallet opening process. If it detects that it has received the opening request, but due to communication anomalies (such as NFC card movement, network anomalies, etc.), it is unable to complete the wallet opening process, that is, the hardware wallet detects that there is an unfinished wallet opening process locally. If it detects that there is an unfinished wallet opening process locally, it will update the current wallet identification information of the hardware wallet according to a preset algorithm to obtain a new wallet identification information.
[0051] Step S220: Generate a first configuration parameter acquisition request according to the new wallet identification information, and forward the first configuration parameter acquisition request to the server through the client.
[0052] Among them, the server is used to respond to the first configuration parameter acquisition request, generate the first configuration parameter information for opening the hardware wallet according to the new wallet identification information, and is also used to send the first configuration parameter information to the hardware wallet through the client.
[0053] Among them, the first configuration parameter includes a hardware wallet certificate, a key, etc. generated according to the new wallet identification information.
[0054] In a specific implementation, the hardware wallet will generate a first configuration parameter acquisition request according to the new wallet identification information, send the first configuration parameter acquisition request containing the new wallet identification information to the client, and the client will forward the first configuration parameter acquisition request to the server, so that the server can generate the first configuration parameter information for opening the hardware wallet according to the new wallet identification information, such as the certificate of the hardware wallet, various keys, etc. At the same time, the server will send the first configuration parameter information to the client, and the client will send the first configuration parameter information to the hardware wallet.
[0055] Step S230: Store the first configuration parameter information in the security element of the hardware wallet.
[0056] Among them, the security element can be the security chip of the hardware wallet.
[0057] In a specific implementation, after the hardware wallet receives the first configuration parameter information, it stores the first configuration parameter information in the local secure chip and sends a message indicating successful reception of the first configuration parameter information to the server through the client.
[0058] Step S240: In response to the wallet opening confirmation instruction sent by the client, if it is determined that the first configuration parameter information has been successfully stored in the secure element, the wallet opening success message is forwarded to the server through the client.
[0059] Among them, the wallet opening success message is used for the server to record that the hardware wallet has completed the wallet opening process.
[0060] In a specific implementation, after the server confirms that the hardware wallet has successfully received the first configuration parameter information, it generates a wallet opening confirmation instruction and sends the wallet opening confirmation instruction to the client. The client then sends the wallet opening confirmation instruction to the hardware wallet. The hardware wallet can, in response to the wallet opening confirmation instruction sent by the client, determine whether the first configuration parameter information has been successfully stored in the local secure chip. If it is determined that the first configuration parameter information has been successfully stored in the secure chip, it is determined that the hardware wallet has been successfully opened, and a wallet opening success message is sent to the client. The client then forwards the wallet opening success message to the server, enabling the server to confirm and record that the hardware wallet has completed the wallet opening process.
[0061] In the above hardware wallet opening method, in response to the opening request sent by the client for the hardware wallet, if it is detected that there is an unfinished wallet opening process locally, the current wallet identification information of the hardware wallet is updated according to a preset algorithm to obtain new wallet identification information. A first configuration parameter acquisition request is generated based on the new wallet identification information, and the first configuration parameter acquisition request is forwarded to the server through the client. The server is used to, in response to the first configuration parameter acquisition request, generate the first configuration parameter information for opening the hardware wallet according to the new wallet identification information, and is also used to send the first configuration parameter information to the hardware wallet through the client, store the first configuration parameter information in the secure element of the hardware wallet, and in response to the wallet opening confirmation instruction sent by the client, if it is determined that the first configuration parameter information has been successfully stored in the secure element, forward the wallet opening success message to the server through the client. The wallet opening success message is used for the server to record that the hardware wallet has completed the wallet opening process. In this way, when the hardware wallet receives the opening request sent for the hardware wallet, if it is detected that there is an unfinished wallet opening process locally, new wallet identification information can be generated and forwarded to the server through the client, preventing the situation where the server fails to respond to the same wallet identification information, resulting in an opening error or data discard and the inability to complete the opening of the hardware wallet. Therefore, the probability of hardware wallet opening failure can be reduced, and the success rate of hardware wallet opening can be improved.
[0062] In one embodiment, the preset algorithm is a random number generation algorithm; the current wallet identification information includes the current character identification corresponding to the security element; according to the preset algorithm, the current wallet identification information of the hardware wallet is updated to obtain new wallet identification information, including: according to the random number generation algorithm, based on the current character identification, generating a target random character identification corresponding to the security element; and obtaining the new wallet identification information according to the target random character identification.
[0063] Wherein, the current character identification corresponding to the security element may be composed of a bank identification code, a hardware wallet serial number, and a serial number.
[0064] Wherein, the number of characters of the random number is at least one.
[0065] Wherein, according to the random number generation algorithm, based on the current character identification, generating a target random character identification corresponding to the security element includes: determining a preset number of characters in the current character identification; according to the preset algorithm, generating a random number, and using the random number to replace the preset number of characters to obtain the target random character identification; or, determining a character insertion position in the current character identification, according to the preset algorithm, generating a random number, and adding the random number to the character insertion position to obtain the target random character identification.
[0066] In a specific implementation, the preset algorithm may be a random number generation algorithm; the current wallet identification information of the hardware wallet includes the current character identification corresponding to the security element; the current character identification may be composed of a bank identification code, a hardware wallet serial number, and a serial number; when the hardware wallet detects that there is an unfinished wallet opening process locally, it obtains the current wallet identification information of the hardware wallet, determines a preset number of characters in the current character identification of the current wallet identification information, and according to the random number generation algorithm, generates a set of random numbers, the number of this set of random numbers may be equal to or different from the number of the preset number of characters, and uses the above set of random numbers to replace the preset number of characters, so as to obtain the target random character identification of the security element; the change of the character identification of the security element causes the identification information of the hardware wallet to change, so that the new wallet identification information of the hardware wallet can be obtained according to the target random character identification of the security element.
[0067] Or, a character insertion position may be determined in the current character identification of the security element, a set of random numbers is generated according to the random number generation algorithm, and this set of random numbers is added to the character insertion position to obtain the target random character identification of the security element; the change of the character identification of the security element causes the identification information of the hardware wallet to change, so that the new wallet identification information of the hardware wallet can be obtained according to the target random character identification of the security element.
[0068] Specifically, if the character insertion position is the starting position of the current character identifier, the random number generated by the random number generation algorithm can be 01 - 99, and the random number is added to the starting position of the current character identifier to obtain the target random character identifier; wherein, the random number can also be other characters, which is not limited herein.
[0069] In the technical solution of this embodiment, the preset algorithm is a random number generation algorithm; the current wallet identification information includes the current character identifier corresponding to the security element; by following the random number generation algorithm, based on the current character identifier, a target random character identifier corresponding to the security element is generated; according to the target random character identifier, new wallet identification information is obtained; wherein, the method for generating the target random character identifier includes: determining a preset number of characters in the current character identifier; generating a random number according to the preset algorithm, and using the random number to replace the preset number of characters to obtain the target random character identifier; or, determining the character insertion position in the current character identifier, generating a random number according to the preset algorithm, and adding the random number to the character insertion position to obtain the target random character identifier; thus, when the hardware wallet detects that there is an unfinished wallet opening process locally, the hardware wallet can generate a random number through the random number generation algorithm, and obtain new wallet identification information through the random number. Due to the randomness of the random number, the possibility of the same wallet identification information appearing is greatly reduced, preventing the server from being unable to respond to the same wallet identification information and causing the failure of opening the hardware wallet, thereby reducing the probability of the failure of opening the hardware wallet.
[0070] In one embodiment, after the step of generating a first configuration parameter acquisition request according to the new wallet identification information and forwarding the first configuration parameter acquisition request to the server through the client, the method further includes: if it is detected that the first configuration parameter information is successfully received, a reception success message is generated; the reception success message is forwarded to the server through the client.
[0071] Wherein, the reception success message is used to instruct the server to generate a wallet opening confirmation instruction, and the wallet opening confirmation instruction is sent to the hardware wallet through the client.
[0072] In specific implementation, after the client sends the first configuration parameter information to the hardware wallet, if the hardware wallet detects that the first configuration parameter information has been successfully received, a reception success message will be generated; and the reception success message is sent to the client, and the client can forward the reception success message to the server; after the server confirms that the hardware wallet has successfully received the first configuration parameter information, a wallet opening confirmation instruction will be generated to confirm whether the hardware wallet has successfully stored the first configuration parameter information in the local security chip, and the wallet opening confirmation instruction is sent to the hardware wallet through the client.
[0073] In the technical solution of this embodiment, if it is detected that the first configuration parameter information is successfully received, a reception success message is generated; the reception success message is forwarded to the server through the client; wherein, the reception success message is used to instruct the server to generate a wallet opening confirmation instruction, and the wallet opening confirmation instruction is sent to the hardware wallet through the client; in this way, the server can know whether the hardware wallet has successfully received the first configuration parameter information, and after the hardware wallet has successfully received the first configuration parameter information, the wallet opening confirmation instruction is sent to the hardware wallet through the client to determine whether the hardware wallet has successfully stored the first configuration parameter information, preventing the establishment of an incorrect communication between the server and the hardware wallet due to communication anomalies, resulting in waste of server resources, thereby improving the interaction reliability between the server and the hardware wallet.
[0074] In one embodiment, the method further includes: if it is detected that the first configuration parameter information is not successfully stored in the security element, the wallet opening failure message is forwarded to the server through the client.
[0075] Wherein, the wallet opening failure message is used for the server to record that the hardware wallet has not completed the wallet opening process.
[0076] In a specific implementation, after the server confirms that the hardware wallet has successfully received the first configuration parameter information, a wallet opening confirmation instruction is generated and sent to the client, and the client sends the wallet opening confirmation instruction to the hardware wallet; the hardware wallet can, in response to the wallet opening confirmation instruction sent by the client, determine whether the first configuration parameter information is successfully stored in the local security chip; if it is determined that the first configuration parameter information is not successfully stored in the security chip, it is determined that the hardware wallet opening fails, and a wallet opening failure message is sent to the client, and the client forwards the wallet opening failure message to the server, so that the server can confirm and record that the hardware wallet has not completed the wallet opening process and wait for the hardware wallet to initiate a request for obtaining configuration parameter information again.
[0077] In the technical solution of this embodiment, if it is detected that the first configuration parameter information is not successfully stored in the security element, the wallet opening failure message is forwarded to the server through the client; the wallet opening failure message is used for the server to record that the hardware wallet has not completed the wallet opening process; in this way, the server can know whether the hardware wallet has completed the wallet opening process, ensuring that the server can know the opening situation of the hardware wallet and ensuring the reliability of the hardware wallet opening process.
[0078] In one embodiment, the method further includes: if it is detected that the hardware wallet has never executed the wallet opening process, the current wallet identification information is obtained; a second configuration parameter acquisition request is generated according to the current wallet identification information, and the second configuration parameter acquisition request is forwarded to the server through the client.
[0079] Among them, the server is used to respond to the second configuration parameter acquisition request, generate second configuration parameter information for opening a hardware wallet according to the current wallet identification information, and is also used to send the second configuration parameter information to the hardware wallet through the client.
[0080] Among them, the second configuration parameters include a hardware wallet certificate, a key, etc. generated according to the current wallet identification information.
[0081] In a specific implementation, after the hardware wallet receives the opening request sent by the client, it will detect whether the wallet opening process has ever been executed locally. If it is determined that the hardware wallet has never executed the wallet opening process, it will obtain the current wallet identification information, generate a second configuration parameter acquisition request according to the current wallet identification information, and forward the second configuration parameter acquisition request containing the current wallet identification information to the server through the client, so that after the server receives the second configuration parameter acquisition request, it can generate second configuration parameter information for opening the hardware wallet according to the current wallet identification information, including a hardware wallet certificate, various keys corresponding to the hardware wallet, etc. Then, the server will send the second configuration parameter information to the client, so that the client can send the second configuration parameter information to the hardware wallet.
[0082] The technical solution of this embodiment is as follows: if it is detected that the hardware wallet has never executed the wallet opening process, the current wallet identification information is obtained; a second configuration parameter acquisition request is generated according to the current wallet identification information, and the second configuration parameter acquisition request is forwarded to the server through the client; among them, the server is used to respond to the second configuration parameter acquisition request, generate second configuration parameter information for opening the hardware wallet according to the current wallet identification information, and is also used to send the second configuration parameter information to the hardware wallet through the client; in this way, the hardware wallet can obtain the second configuration parameter information generated by the server according to the current wallet identification information through the current wallet identification information when it has never executed the wallet opening process, and complete the wallet opening process by storing the second configuration parameter information, ensuring that the hardware wallet can obtain the configuration parameter information necessary to complete the opening process based on the wallet identification information and ensuring the reliability of the hardware wallet opening process.
[0083] In another embodiment, as Figure 3 shown, a data interaction diagram of a hardware wallet opening method is provided. Taking the hardware wallet applied to Figure 1 as an example, the method includes the following steps:
[0084] Step S302, in response to an opening request sent by the client for the hardware wallet, if it is detected that there is an unfinished wallet opening process locally, then according to a preset algorithm, update the current wallet identification information of the hardware wallet to obtain new wallet identification information.
[0085] Step S304, generate a first configuration parameter acquisition request according to the new wallet identification information, and forward the first configuration parameter acquisition request to the server through the client; the server is configured to, in response to the first configuration parameter acquisition request, generate first configuration parameter information for opening the hardware wallet according to the new wallet identification information; and is further configured to send the first configuration parameter information to the hardware wallet through the client.
[0086] Step S306, if it is detected that the first configuration parameter information is successfully received, then generate a reception success message.
[0087] Step S308, forward the reception success message to the server through the client; the reception success message is used to instruct the server to generate the wallet opening confirmation instruction and send the wallet opening confirmation instruction to the hardware wallet through the client.
[0088] Step S310, store the first configuration parameter information in the secure element of the hardware wallet.
[0089] Step S312, in response to the wallet opening confirmation instruction sent by the client, if it is determined that the first configuration parameter information is successfully stored in the secure element, then forward a wallet opening success message to the server through the client; the wallet opening success message is used for the server to record that the hardware wallet has completed the wallet opening process.
[0090] It should be noted that the specific limitations of the above steps can refer to the specific limitations of a hardware wallet opening method described above.
[0091] In another embodiment, another hardware wallet opening method is provided, including the following steps:
[0092] First, the user opens the client on the Internet-connected terminal, and through NFC (Near Field Communication) technology or Bluetooth technology, the client obtains the card information of the hardware wallet. Second, when the user starts the hardware wallet opening process on the client, the client sends an opening request for the hardware wallet. Third, after receiving the opening request, if the hardware wallet detects that there is an unfinished wallet opening process locally, it updates the current wallet identification information of the hardware wallet according to a preset algorithm to obtain a new wallet identification information. The hardware wallet generates a first configuration parameter acquisition request based on the new wallet identification information and sends the first configuration parameter acquisition request to the client, and the client forwards the first configuration parameter acquisition request to the server. If it is detected that the hardware wallet has never executed the wallet opening process, it obtains the current wallet identification information. The hardware wallet generates a second configuration parameter acquisition request based on the current wallet identification information and sends the second configuration parameter acquisition request to the client, and the client forwards the second configuration parameter acquisition request to the server. Fourth, in response to the first configuration parameter acquisition request or the second configuration parameter acquisition request, the server generates a hardware wallet certificate and a hardware wallet key for opening the hardware wallet according to the new wallet identification information or the current wallet identification information, and distributes the hardware wallet certificate and the hardware wallet key to the hardware wallet through the client. Fifth, when the hardware wallet detects that it has successfully received the hardware wallet certificate and the hardware wallet key, it generates a reception success message and sends the reception success message to the client, and the client forwards the reception success message to the server. At the same time, the hardware wallet stores the hardware wallet certificate and the hardware wallet key in the secure chip. Sixth, after receiving the reception success message, the server generates a wallet opening confirmation instruction and sends the wallet opening confirmation instruction to the hardware wallet through the client. Seventh, in response to the wallet opening confirmation instruction sent by the client, if it is determined that the hardware wallet certificate and the hardware wallet key have been successfully stored in the secure chip, the hardware wallet forwards the wallet opening success message to the server through the client. If it is detected that the hardware wallet certificate and the hardware wallet key have not been successfully stored in the secure chip, the hardware wallet forwards the wallet opening failure message to the server through the client.
[0093] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless specifically stated herein, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, at least some of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in rotation with at least some of the steps or stages in other steps or other steps.
[0094] Based on the same inventive concept, an embodiment of the present application further provides a hardware wallet opening device for implementing the above-mentioned hardware wallet opening method. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the hardware wallet opening device provided below can refer to the limitations on a hardware wallet opening method in the above text, and will not be repeated here.
[0095] In one embodiment, as Figure 4 shown, a hardware wallet opening device is provided, including: an identity update module 410, a first configuration parameter acquisition request generation module 420, a first configuration parameter storage module 430, and an opening success message sending module 440, where:
[0096] The identity update module 410 is configured to, in response to an opening request sent by a client for the hardware wallet, if it detects that there is an unfinished wallet opening process locally, update the current wallet identity information of the hardware wallet according to a preset algorithm to obtain new wallet identity information.
[0097] The first configuration parameter acquisition request generation module 420 is configured to generate a first configuration parameter acquisition request according to the new wallet identity information, and forward the first configuration parameter acquisition request to a server through the client; the server is configured to, in response to the first configuration parameter acquisition request, generate first configuration parameter information for opening the hardware wallet according to the new wallet identity information; and is further configured to send the first configuration parameter information to the hardware wallet through the client.
[0098] The first configuration parameter storage module 430 is configured to store the first configuration parameter information in a secure element of the hardware wallet.
[0099] The successful wallet opening message sending module 440 is configured to, in response to the wallet opening confirmation instruction sent by the client, if it is determined that the first configuration parameter information is successfully stored in the security element, forward the successful wallet opening message to the server through the client; the successful wallet opening message is used for the server to record that the hardware wallet has completed the wallet opening process.
[0100] In one embodiment, the preset algorithm is a random number generation algorithm; the current wallet identification information includes the current character identification corresponding to the security element; the identification update module 410 is specifically configured to generate, according to the random number generation algorithm, a target random character identification corresponding to the security element based on the current character identification; and obtain the new wallet identification information according to the target random character identification.
[0101] In one embodiment, the identification update module 410 is specifically configured to determine a preset number of characters in the current character identification; generate a random number according to the random number generation algorithm, and use the random number to replace the preset number of characters to obtain the target random character identification; or determine a character insertion position in the current character identification, generate a random number according to the random number generation algorithm, and add the random number to the character insertion position to obtain the target random character identification.
[0102] In one embodiment, the hardware wallet opening device further includes: a receiving success message generation module, configured to generate a receiving success message if it is detected that the first configuration parameter information is successfully received; a receiving success message forwarding module, configured to forward the receiving success message to the server through the client; the receiving success message is used to instruct the server to generate the wallet opening confirmation instruction and send the wallet opening confirmation instruction to the hardware wallet through the client.
[0103] In one embodiment, the hardware wallet opening device further includes: a wallet opening failure message forwarding module, configured to, if it is detected that the first configuration parameter information is not successfully stored in the security element, forward the wallet opening failure message to the server through the client; the wallet opening failure message is used for the server to record that the hardware wallet has not completed the wallet opening process.
[0104] In one embodiment, the hardware wallet opening device further includes: a current wallet identification information acquisition module, configured to acquire the current wallet identification information if it is detected that the hardware wallet has never executed the wallet opening process; a second configuration parameter acquisition request generation module, configured to generate a second configuration parameter acquisition request according to the current wallet identification information, and forward the second configuration parameter acquisition request to the server through the client; the server is configured to, in response to the second configuration parameter acquisition request, generate second configuration parameter information for opening the hardware wallet according to the current wallet identification information; and is further configured to send the second configuration parameter information to the hardware wallet through the client.
[0105] Each module in the above-mentioned hardware wallet opening device can be implemented in whole or in part by software, hardware, or a combination thereof. The above-mentioned modules can be embedded in the processor of the computer device in hardware form or be independent of it, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
[0106] In one embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be as Figure 5 shown. The computer device includes a processor, a memory, and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store hardware wallet configuration parameter data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements a hardware wallet opening method.
[0107] Those skilled in the art can understand that Figure 5 the structure shown in
[0108] is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0109] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0110] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0111] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0112] Those of ordinary skill in the art can understand that all or part of the processes of implementing the above method embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above method embodiments. Among them, any reference to a memory, database, or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in this application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in this application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.
[0113] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered that the scope recorded in this specification.
[0114] The above-described embodiments only represent several implementation manners of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the patent of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several deformations and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A method for opening a hardware wallet, characterized in that, Applied to a hardware wallet, the method includes: In response to the client's request for opening the hardware wallet, if it is detected that there is an unfinished wallet opening process locally, the current wallet identification information of the hardware wallet is updated according to a preset algorithm to obtain new wallet identification information; generating a first configuration parameter acquisition request based on the new wallet identification information, and forwarding the first configuration parameter acquisition request to the server via the client; the server is configured to respond to the first configuration parameter acquisition request and generate first configuration parameter information for opening the hardware wallet based on the new wallet identification information; and further to send the first configuration parameter information to the hardware wallet via the client; Storing the first configuration parameter information in the secure element of the hardware wallet; In response to the wallet opening confirmation instruction sent by the client, if it is determined that the first configuration parameter information is successfully stored in the secure element, a wallet opening success message is forwarded to the server via the client; the wallet opening success message is used for the server to record that the hardware wallet has completed the wallet opening process.
2. The method according to claim 1, wherein The preset algorithm is a random number generation algorithm; the current wallet identification information includes a current character identification corresponding to the security element; and updating the current wallet identification information of the hardware wallet according to the preset algorithm to obtain new wallet identification information includes: Generate a target random character identifier corresponding to the security element based on the current character identifier according to the random number generation algorithm; The new wallet identification information is obtained according to the target random character identification.
3. The method according to claim 2, wherein Generating a target random character identifier corresponding to the security element based on the current character identifier according to the random number generation algorithm includes: Determining a preset number of characters in the current character identifier; Generate a random number according to the random number generation algorithm, and use the random number to replace the preset number of characters to obtain the target random character identifier; or, In the current character mark, determine the character insertion position, A random number is generated according to the random number generation algorithm, and the random number is added to the character insertion position to obtain the target random character identifier.
4. The method according to claim 1, wherein After the step of generating a first configuration parameter acquisition request according to the new wallet identification information and forwarding the first configuration parameter acquisition request to the server through the client, the method further includes: If it is detected that the first configuration parameter information is successfully received, generating a reception success message; The client forwards the successful reception message to the server; the successful reception message is used to instruct the server to generate the wallet opening confirmation instruction, and send the wallet opening confirmation instruction to the hardware wallet through the client.
5. The method according to claim 1, characterized in that, The method further comprises: If it is detected that the first configuration parameter information fails to be successfully stored in the security element, the client forwards a wallet opening failure message to the server; the wallet opening failure message is used for the server to record that the hardware wallet has not completed the wallet opening process.
6. The method according to claim 1, wherein The method further includes: If it is detected that the hardware wallet has never executed the wallet opening process, obtain the current wallet identification information; Generate a second configuration parameter acquisition request according to the current wallet identification information, and forward the second configuration parameter acquisition request to the server through the client; the server is configured to, in response to the second configuration parameter acquisition request, generate second configuration parameter information for opening the hardware wallet according to the current wallet identification information; and is further configured to send the second configuration parameter information to the hardware wallet through the client.
7. A hardware wallet opening device, characterized in that, Applied to a hardware wallet, the device includes: An identification update module, configured to, in response to an opening request sent by a client for the hardware wallet, if it is detected that there is an unfinished wallet opening process locally, update the current wallet identification information of the hardware wallet according to a preset algorithm to obtain new wallet identification information; A first configuration parameter acquisition request generation module, configured to generate a first configuration parameter acquisition request according to the new wallet identification information, and forward the first configuration parameter acquisition request to a server through the client; the server is configured to, in response to the first configuration parameter acquisition request, generate first configuration parameter information for opening the hardware wallet according to the new wallet identification information; and is further configured to send the first configuration parameter information to the hardware wallet through the client; A first configuration parameter storage module, configured to store the first configuration parameter information in a security element of the hardware wallet; A successful opening message sending module, configured to, in response to a wallet opening confirmation instruction sent by the client, if it is determined that the first configuration parameter information is successfully stored in the security element, forward a wallet opening success message to the server through the client; the wallet opening success message is used for the server to record that the hardware wallet has completed the wallet opening process.
8. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Hardware wallet and management method thereof
CN111091381A
Hardware wallet data synchronization method and device and computer equipment
CN113902438A