WO2020062973A1 - 一种二维码生成方法、装置及电子设备 - Google Patents

一种二维码生成方法、装置及电子设备 Download PDF

Info

Publication number
WO2020062973A1
WO2020062973A1 PCT/CN2019/092964 CN2019092964W WO2020062973A1 WO 2020062973 A1 WO2020062973 A1 WO 2020062973A1 CN 2019092964 W CN2019092964 W CN 2019092964W WO 2020062973 A1 WO2020062973 A1 WO 2020062973A1
Authority
WO
WIPO (PCT)
Prior art keywords
wallet
target user
dimensional code
wallet information
information
Prior art date
Application number
PCT/CN2019/092964
Other languages
English (en)
French (fr)
Inventor
张康宗
李伟
史国芸
聂亦鹤
Original Assignee
北京金山安全软件有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京金山安全软件有限公司 filed Critical 北京金山安全软件有限公司
Publication of WO2020062973A1 publication Critical patent/WO2020062973A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/36Payment architectures, schemes or protocols characterised by the use of specific devices or networks using electronic wallets or electronic money safes
    • G06Q20/367Payment architectures, schemes or protocols characterised by the use of specific devices or networks using electronic wallets or electronic money safes involving electronic purses or money safes
    • G06Q20/3678Payment architectures, schemes or protocols characterised by the use of specific devices or networks using electronic wallets or electronic money safes involving electronic purses or money safes e-cash details, e.g. blinded, divisible or detecting double spending
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/06009Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
    • G06K19/06037Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking multi-dimensional coding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management

Definitions

  • the present application relates to the field of blockchain technology, and in particular, to a method, device, and electronic device for generating a two-dimensional code.
  • a mnemonic is a manifestation of a plaintext private key. Its purpose is to help users remember complex private keys, such as 64-bit hash values.
  • the mnemonic word is generally composed of a first preset number of English words arranged in order.
  • the first preset number can be 12, 15, 18, or 21. These words are taken from a fixed word bank, and the generation order is also according to a certain algorithm. Then, the private key can be generated by the first preset number of words arranged in this order.
  • the blockchain private key serves as the only proof that the user has the right to control the assets of the user's virtual wallet, that is, who owns the blockchain private key corresponding to the virtual wallet, that is, the owner of the virtual wallet.
  • the blockchain private key is a set of irregular strings that are not easy to remember.
  • users are assisted by mnemonics.
  • the mnemonic is a set of English words that are not regular, and it is not easy to remember.
  • the user forgets the wallet information corresponding to the virtual wallet such as the mnemonic and the blockchain private key, the user will lose the assets in the virtual wallet. Dominance, user experience is not high.
  • the purpose of the embodiments of the present application is to provide a method, device, and electronic device for generating a two-dimensional code, so as to realize that the user does not need to memorize complicated wallet information corresponding to the virtual wallet, and improves user experience.
  • Specific technical solutions are as follows:
  • an embodiment of the present application provides a method for generating a two-dimensional code, where the method includes:
  • Obtaining wallet information of a target user wherein the wallet information is: information used to assist in managing assets in a virtual wallet of the target user;
  • the generated two-dimensional code is stored.
  • the wallet information includes a mnemonic and / or a blockchain private key.
  • the method further includes:
  • the target user Upon receiving the first identification instruction for the two-dimensional code triggered by the target user, identifying the two-dimensional code to obtain a first identification result, wherein the first identification result includes the wallet information;
  • the assets of the virtual wallet of the target user are managed.
  • the method before the step of encoding the wallet information to generate a two-dimensional code, the method further includes:
  • the step of encoding the wallet information to generate a two-dimensional code includes:
  • the method further includes:
  • the assets of the virtual wallet of the target user are managed.
  • the step of obtaining wallet information of the target user includes:
  • the creation instruction is: an instruction for creating wallet information corresponding to a virtual wallet of a target user;
  • wallet information of the target user is obtained.
  • an embodiment of the present application provides a two-dimensional code generating device, where the device includes:
  • An obtaining module for obtaining wallet information of a target user, wherein the wallet information is: information for assisting in managing assets in a virtual wallet of the target user;
  • An encoding generating module configured to encode the wallet information to generate a two-dimensional code
  • the storage module is configured to store the generated two-dimensional code for the target user.
  • the wallet information includes a mnemonic and / or a blockchain private key.
  • the apparatus further includes:
  • a first recognition module configured to recognize the two-dimensional code to obtain a first recognition result when receiving a first recognition instruction for the two-dimensional code triggered by the target user, wherein the first recognition result includes The wallet information;
  • a first login module is configured to manage assets of the virtual wallet of the target user based on the wallet information.
  • the apparatus further includes:
  • An encryption module configured to encrypt the wallet information by using a target encryption algorithm before encoding the wallet information to generate a two-dimensional code
  • the code generation module is specifically used for
  • the apparatus further includes:
  • a second recognition module configured to recognize the two-dimensional code to obtain a second recognition result when receiving a second recognition instruction for the two-dimensional code triggered by the target user, wherein the second recognition result includes The wallet information encrypted by using the target encryption algorithm;
  • a decryption module configured to use the decryption algorithm corresponding to the target encryption algorithm to decrypt the encrypted wallet information to obtain a decryption result
  • a second login module is configured to manage assets of the virtual wallet of the target user based on the decryption result.
  • the obtaining module is specifically used for
  • the creation instruction is: an instruction for creating wallet information corresponding to a virtual wallet of a target user;
  • wallet information of the target user is obtained.
  • an embodiment of the present application provides an electronic device including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus;
  • the processor is configured to implement any one of the steps of the two-dimensional code generating method provided in the embodiments of the present application when the computer program stored in the memory is executed.
  • an embodiment of the present application 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, any one of the embodiments provided in the embodiment of the present application is implemented.
  • the two-dimensional code generating method steps are provided.
  • an embodiment of the present application further provides a computer program product, which when executed on an electronic device, causes the electronic device to execute: any one of the steps of the two-dimensional code generating method described above.
  • the two-dimensional code generating method obtains wallet information corresponding to a target user, wherein the wallet information is: information used to assist in managing assets in the virtual wallet of the target user; encoding the wallet information to generate a two-dimensional Code; for the target user, store the generated two-dimensional code.
  • the wallet information corresponding to the virtual wallet is encoded, and the encoded two-dimensional code is generated and stored for the target user, so that when the wallet information corresponding to the virtual wallet of the target user is needed, only two scans are required.
  • the dimension code can obtain the wallet information corresponding to the virtual wallet of the target user, so that the user does not need to memorize the complex wallet information corresponding to the virtual wallet, improving the user experience, and avoiding the user's own assets caused by forgetting the wallet information corresponding to the virtual wallet. Loss situation.
  • FIG. 1 is a schematic flowchart of a two-dimensional code generation method according to an embodiment of the present application
  • FIG. 2 is another schematic flowchart of a two-dimensional code generating method according to an embodiment of the present application
  • FIG. 3 is another schematic flowchart of a two-dimensional code generating method according to an embodiment of the present application.
  • FIG. 4 is another schematic flowchart of a two-dimensional code generating method according to an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a two-dimensional code generating device according to an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • the embodiments of the present application provide a method, device, and electronic device for generating a two-dimensional code, so as to realize that the user does not need to memorize complex wallet information corresponding to the virtual wallet, and improves the user experience.
  • an embodiment of the present application provides a method for generating a two-dimensional code, which may include the following steps:
  • the wallet information is information for assisting in managing assets in the virtual wallet of the target user.
  • the method for generating a two-dimensional code provided in the embodiment of the present application can be applied to any type of electronic device, and the electronic device can be a terminal or server built by a computer, a mobile phone, or the like.
  • a blockchain wallet application may be installed in the electronic device.
  • the electronic device is a server, the electronic device can communicate with a terminal installed with a blockchain wallet application.
  • the blockchain wallet application is: application software for managing blockchain keys, wallet addresses, tracking balances, and creating transactions.
  • the blockchain key includes the private key of the blockchain and the public key corresponding to the private key of the blockchain.
  • Each blockchain user can create their own virtual wallet based on the blockchain wallet application. After creating their own virtual wallet, blockchain users can manage their own virtual wallet correspondence based on the blockchain wallet application.
  • the target user can be any blockchain user.
  • the functional software that implements the two-dimensional code generation method provided in the embodiments of the present application may exist in the form of specialized client software, such as a specialized blockchain wallet application;
  • Client software plug-ins exist, such as plug-ins for existing blockchain wallet applications.
  • the step of obtaining wallet information of the target user may include:
  • the creation instruction is: an instruction for creating wallet information corresponding to a virtual wallet of a target user;
  • the electronic device When the electronic device receives the creation instruction for the virtual wallet, based on the creation instruction, the electronic device obtains wallet information of the target user. Specifically, in a case, when the electronic device is a terminal, after the virtual wallet of the target user is created, the electronic device may provide a function button that triggers the creation instruction, and the target user may perform a predetermined operation by executing the function button. . For example, clicking or long-pressing triggers the creation instruction, so that the electronic device receives the creation instruction, and then obtains wallet information of the target user based on the creation instruction to execute the two-dimensional code generation process provided in the embodiment of the present application. In an implementation manner, the electronic device may further display the wallet information to the target user, so that the target user can record the wallet information.
  • the electronic device may receive a creation instruction for the virtual wallet sent by the terminal where the virtual wallet is located.
  • the terminal where the virtual wallet is located may be provided with a function button that triggers the creation instruction, and the target user performs a predetermined operation by performing the function button. For example, click or long press, so that the terminal where the virtual wallet is located sends a creation instruction to the electronic device.
  • the electronic device obtains wallet information of the target user based on the creation instruction to execute the two-dimensional code generation process provided in the embodiment of the present application.
  • the electronic device may further send the wallet information to a terminal where the virtual wallet is located, so that the terminal where the virtual wallet is located displays the wallet information to the target user, so that the target user can record the wallet information.
  • the electronic device when the electronic device receives the account creation instruction for the target user to create a virtual wallet, after the virtual wallet is created, the wallet information corresponding to the virtual wallet can be obtained directly, and then the embodiments of the present application can be directly executed.
  • the provided QR code generation process when the electronic device receives the account creation instruction for the target user to create a virtual wallet, after the virtual wallet is created, the wallet information corresponding to the virtual wallet can be obtained directly, and then the embodiments of the present application can be directly executed.
  • the provided QR code generation process when the electronic device receives the account creation instruction for the target user to create a virtual wallet, after the virtual wallet is created, the wallet information corresponding to the virtual wallet can be obtained directly, and then the embodiments of the present application can be directly executed.
  • wallet information of the virtual wallet can be generated at the same time.
  • wallet information of the virtual wallet may be generated and obtained by any feasible implementation manner, and the implementation manner of generating and obtaining wallet information of the virtual wallet is not limited in the embodiments of the present application.
  • the wallet information may include, but is not limited to, a mnemonic and / or a blockchain private key.
  • the mnemonic and the blockchain private key are information used to assist in managing assets in the user's virtual wallet. It can be understood that the mnemonic word can be converted into a blockchain private key through a first predetermined algorithm, and the blockchain private key serves as the only proof that the user has the right to control the assets of the user's virtual wallet. After the user has the mnemonic corresponding to the virtual wallet and / or the private key of the blockchain, he can manage the assets in the virtual wallet corresponding to the private key of the blockchain, and the management can transfer and trade.
  • the blockchain private key corresponding to the virtual wallet may include: the blockchain private key corresponding to the wallet address corresponding to the virtual wallet. It can be understood that in the blockchain, each wallet address corresponds to a blockchain private key.
  • S102 encode the wallet information to generate a two-dimensional code
  • a preset two-dimensional code generation algorithm may be used to encode wallet information to generate a two-dimensional code.
  • the preset two-dimensional code generation algorithm may be any type of current two-dimensional code generation algorithm, and the embodiment of the present application does not limit the preset two-dimensional code generation algorithm.
  • the generated QR code can be stored for the target user.
  • the virtual wallet for the target user may be stored with the two-dimensional code, that is, a correspondence between the virtual wallet of the target user and the two-dimensional code is recorded.
  • the wallet information of the target user may also be correspondingly stored, that is, it is possible to record the correspondence between the target user's virtual wallet, the two-dimensional code, and the wallet information that generates the two-dimensional code. This is all possible.
  • the target user in order to ensure the security of the virtual wallet assets of the target user, as long as the target user has the right to control the assets of the virtual wallet of the target user, the target user has the ability to export the target user based on the blockchain wallet application. Permission for the QR code and / or wallet information.
  • the target user does not have control over the assets of his or her virtual wallet, such as losing or forgetting the mnemonic corresponding to the virtual wallet and the blockchain private key, the target user cannot export the target user based on the blockchain wallet application. QR code and / or wallet information corresponding to your virtual wallet.
  • the electronic device may display the generated two-dimensional code to the target user and display prompt information to prompt the target user to record the two-dimensional code, so that subsequent target users
  • the recorded QR code can be used to obtain the wallet information, that is, the mnemonic corresponding to the virtual wallet of the target user and / or the private key of the blockchain, so as to obtain the virtual wallet of the user. Dominance of the assets.
  • the electronic device when the electronic device is a server, the electronic device may display the generated two-dimensional code to a target user and display the prompt information.
  • the implementation method may be: the electronic device displays the generated two-dimensional code and The prompt information is sent to the terminal held by the target user, that is, the terminal where the virtual wallet of the target user is located, so that the terminal where the virtual wallet of the target user is located displays the two-dimensional code and the prompt information on its own display screen.
  • the target user can record the QR code by taking screenshots and taking pictures.
  • the electronic device when the electronic device is a terminal, the electronic device may display the generated two-dimensional code to a target user and display the prompt information.
  • the implementation method may be: the electronic device displays the generated two-dimensional code and The prompt message displays the two-dimensional code and the prompt message in its own display.
  • the target user can record the QR code by taking screenshots and taking pictures.
  • the wallet information corresponding to the target user can be obtained, wherein the wallet information is: information used to assist in managing the assets in the virtual wallet of the target user; encoding the wallet information to generate a two-dimensional code; and targeting the target user To store the generated QR code.
  • the wallet information corresponding to the virtual wallet is encoded, and the encoded two-dimensional code is generated and stored for the target user, so that when the wallet information corresponding to the virtual wallet of the target user is needed, only two scans are required.
  • the dimension code can obtain the wallet information corresponding to the virtual wallet of the target user, so that the user does not need to memorize the complex wallet information corresponding to the virtual wallet, improving the user experience, and avoiding the user's own assets caused by forgetting the wallet information corresponding to the virtual wallet. Loss situation.
  • the method may further include the following steps:
  • S201 When receiving a first identification instruction for a two-dimensional code triggered by a target user, identify the two-dimensional code to obtain a first identification result;
  • the first identification result includes wallet information;
  • the wallet information is wallet information corresponding to the virtual wallet of the target user, and is used to assist in managing assets in the virtual wallet of the target user;
  • S202 Based on the wallet information, manage the assets of the virtual wallet of the target user.
  • the target user may be prompted to record the two-dimensional code corresponding to the virtual wallet of the target user, and then when the target user needs to obtain the wallet information corresponding to the virtual wallet of the target user, the recorded two-dimensional code may be triggered. Identify instructions. Furthermore, the electronic device may receive the identification instruction for the two-dimensional code triggered by the target user as the first identification instruction, and then execute the step of identifying the two-dimensional code.
  • the blockchain private key corresponding to the virtual wallet of the target user may include: the blockchain private key corresponding to the wallet address corresponding to the virtual wallet of the target user. It can be understood that in the blockchain, each wallet address corresponds to a blockchain private key.
  • the electronic device may use the two-dimensional code decoding algorithm corresponding to the preset two-dimensional code generation algorithm to identify the two-dimensional code, and A first recognition result including wallet information is obtained. Furthermore, the electronic device can manage the assets of the virtual wallet of the target user based on the obtained first identification result including wallet information. Specifically, when the target user obtains the wallet information of the target user, that is, the mnemonic corresponding to the target user's virtual wallet and / or the blockchain private key, the target user obtains the right to control the assets of the virtual wallet. Then, the target user can manage the assets of the target user's virtual wallet based on the electronic device.
  • the method may include the following steps:
  • the wallet information is: information for assisting in managing assets in the virtual wallet of the target user;
  • the S301 is the same as S101 shown in FIG. 1, and the S304 is the same as S103 shown in FIG. 1.
  • the wallet information may be encrypted based on the target encryption algorithm, and then the encrypted wallet information is encoded to generate a two-dimensional code.
  • the target encryption algorithm may include: AES (Advanced Encryption Standard), DES (Data Encryption Standard), 3DES (Triple Data Encryption Algorithm), DSA (Digital Signature Algorithm, Elliptic Curve Digital Signature Algorithm), ECC (Elliptic Curves Cryptography, Elliptic Curve Cryptography), MD5 (Message Digest Algorithm MD5, Message Digest Algorithm Fifth Edition) and HMAC (Hash Message Authentication Code) algorithm.
  • AES Advanced Encryption Standard
  • DES Data Encryption Standard
  • 3DES Triple Data Encryption Algorithm
  • DSA Digital Signature Algorithm, Elliptic Curve Digital Signature Algorithm
  • ECC Elliptic Curves Cryptography, Elliptic Curve Cryptography
  • MD5 Message Digest Algorithm MD5, Message Digest Algorithm Fifth Edition
  • HMAC Haash Message Authentication Code
  • the wallet information is encrypted, and then the encrypted wallet information is encoded to generate a two-dimensional code.
  • the security of wallet information can be improved.
  • the two-dimensional code is obtained by other users except the target user, the other users cannot decode the two-dimensional code to obtain wallet information, and other users except the target user cannot obtain wallet information corresponding to the virtual wallet of the target user. , To a certain extent, ensure the security of the target user's virtual wallet assets.
  • the method may further include the following steps:
  • the second identification result includes wallet information encrypted by using the target encryption algorithm;
  • the wallet information is wallet information corresponding to the virtual wallet of the target user, and is used to assist in managing assets in the virtual wallet of the target user;
  • S403 Based on the decryption result, manage the assets of the virtual wallet of the target user.
  • the electronic device may use the two-dimensional code decoding algorithm corresponding to the preset two-dimensional code generation algorithm, and the decoding includes the use of the target encryption algorithm.
  • the second identification result of the encrypted wallet information, and further, the decryption algorithm corresponding to the target encryption algorithm can be used to decrypt the encrypted wallet information to obtain the decryption result; wherein the target encryption algorithm is the encryption that encrypts the wallet information algorithm.
  • the decryption result includes wallet information, that is, the mnemonic words and / or blockchain private key corresponding to the virtual wallet of the target user.
  • the electronic device can manage the assets of the virtual wallet of the target user based on the decryption result. Specifically, when the target user obtains the wallet information of the target user, that is, the mnemonic corresponding to the target user's virtual wallet and / or the blockchain private key, the target user obtains the right to control the assets of the virtual wallet. Then, the target user can manage the assets of the target user's virtual wallet based on the electronic device.
  • an embodiment of the present application provides a two-dimensional code generating device.
  • the device may include:
  • the obtaining module 510 is configured to obtain wallet information of a target user, wherein the wallet information is: information used to assist in managing assets in a virtual wallet of the target user;
  • An encoding generating module 520 configured to encode wallet information to generate a two-dimensional code
  • the storage module 530 is configured to store the generated two-dimensional code for the target user.
  • the wallet information corresponding to the target user can be obtained, wherein the wallet information is: information used to assist in managing the assets in the virtual wallet of the target user; encoding the wallet information to generate a two-dimensional code; and targeting the target user To store the generated QR code.
  • the wallet information corresponding to the virtual wallet is encoded, and the encoded two-dimensional code is generated and stored for the target user, so that when the wallet information corresponding to the virtual wallet of the target user is needed, only two scans are required.
  • the dimension code can obtain the wallet information corresponding to the virtual wallet of the target user, so that the user does not need to memorize the complex wallet information corresponding to the virtual wallet, improving the user experience, and avoiding the user's own assets caused by forgetting the wallet information corresponding to the virtual wallet. Loss situation.
  • the wallet information includes mnemonics and / or blockchain private keys.
  • the apparatus may further include:
  • a first recognition module configured to recognize a two-dimensional code to obtain a first recognition result when receiving a first recognition instruction for a two-dimensional code triggered by a target user, wherein the first recognition result includes wallet information;
  • the first login module is used to manage the assets of the virtual wallet of the target user based on the wallet information.
  • the apparatus may further include:
  • the encryption module is used to encrypt the wallet information by using the target encryption algorithm before encoding the wallet information and generating the two-dimensional code;
  • Code generation module 520 specifically used for
  • the apparatus may further include:
  • a second identification module is configured to identify a two-dimensional code and obtain a second identification result when receiving a second identification instruction for the two-dimensional code triggered by a target user, wherein the second identification result includes a wallet encrypted by using a target encryption algorithm information;
  • a decryption module configured to decrypt the encrypted wallet information by using a decryption algorithm corresponding to the target encryption algorithm to obtain a decryption result
  • the second login module is used to manage the assets of the virtual wallet of the target user based on the decryption result.
  • the obtaining module 510 is specifically used for
  • the creation instruction is: an instruction for creating wallet information corresponding to a virtual wallet of a target user;
  • an embodiment of the present application further provides an electronic device, as shown in FIG. 6, including a processor 610, a communication interface 620, a memory 630, and a communication bus 640, where the processor 610 and the communication interface 620
  • the memory 630 completes communication with each other through the communication bus 640,
  • a memory 630 configured to store a computer program
  • the processor 610 is configured to implement any one of the foregoing two-dimensional code generating method steps provided in the embodiment of the present application when executing a computer program stored in the memory 630:
  • Obtaining wallet information of a target user wherein the wallet information is: information used to assist in managing assets in a virtual wallet of the target user;
  • the generated QR code is stored.
  • the wallet information corresponding to the target user can be obtained, wherein the wallet information is: information used to assist in managing the assets in the virtual wallet of the target user; encoding the wallet information to generate a two-dimensional code; and targeting the target user To store the generated QR code.
  • the wallet information corresponding to the virtual wallet is encoded, and the encoded two-dimensional code is generated and stored for the target user, so that when the wallet information corresponding to the virtual wallet of the target user is needed, only two scans are required.
  • the dimension code can obtain the wallet information corresponding to the virtual wallet of the target user, so that the user does not need to memorize the complex wallet information corresponding to the virtual wallet, improving the user experience, and avoiding the user's own assets caused by forgetting the wallet information corresponding to the virtual wallet. Loss situation.
  • the wallet information includes mnemonics and / or blockchain private keys.
  • the method further includes:
  • the assets of the virtual wallet of the target user are managed.
  • the method before the steps of encoding the wallet information and generating the two-dimensional code, the method further includes:
  • the steps of encoding wallet information and generating a QR code include:
  • the method further includes:
  • the target user When receiving the second identification instruction for the two-dimensional code triggered by the target user, identifying the two-dimensional code to obtain a second identification result, wherein the second identification result includes wallet information encrypted by using the target encryption algorithm;
  • the assets of the virtual wallet of the target user are managed.
  • the step of obtaining wallet information of the target user includes:
  • the creation instruction is: an instruction for creating wallet information corresponding to a virtual wallet of a target user;
  • the communication bus mentioned in the above electronic device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • the communication bus can be divided into an address bus, a data bus, a control bus, and the like.
  • the figure only uses a thick line to represent, but it does not mean that there is only one bus or one type of bus.
  • the communication interface is used for communication between the aforementioned electronic device and other devices.
  • the memory may include random access memory (Random Access Memory, RAM), and may also include non-volatile memory (Non-Volatile Memory, NVM), such as at least one disk memory.
  • NVM non-Volatile Memory
  • the memory may also be at least one storage device located far from the foregoing processor.
  • the aforementioned processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc .; it may also be a digital signal processor (Digital Signal Processing, DSP), special integration Circuit (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
  • CPU central processing unit
  • NP network processor
  • DSP Digital Signal Processing
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • this embodiment of the present application further provides a computer-readable storage medium.
  • a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the foregoing tasks provided in the embodiments of this application are implemented One QR code generation method steps:
  • Obtaining wallet information of a target user wherein the wallet information is: information used to assist in managing assets in a virtual wallet of the target user;
  • the generated QR code is stored.
  • the wallet information corresponding to the target user can be obtained, wherein the wallet information is: information used to assist in managing the assets in the virtual wallet of the target user; encoding the wallet information to generate a two-dimensional code; and targeting the target user To store the generated QR code.
  • the wallet information corresponding to the virtual wallet is encoded, and the encoded two-dimensional code is generated and stored for the target user, so that when the wallet information corresponding to the virtual wallet of the target user is needed, only two scans are required.
  • the dimension code can obtain the wallet information corresponding to the virtual wallet of the target user, so that the user does not need to memorize the complex wallet information corresponding to the virtual wallet, improving the user experience, and avoiding the user's own assets caused by forgetting the wallet information corresponding to the virtual wallet. Loss situation.
  • the wallet information includes mnemonics and / or blockchain private keys.
  • the method further includes:
  • the assets of the virtual wallet of the target user are managed.
  • the method before the steps of encoding the wallet information and generating the two-dimensional code, the method further includes:
  • the steps of encoding wallet information and generating a QR code include:
  • the method further includes:
  • the target user When receiving the second identification instruction for the two-dimensional code triggered by the target user, identifying the two-dimensional code to obtain a second identification result, wherein the second identification result includes wallet information encrypted by using the target encryption algorithm;
  • the assets of the virtual wallet of the target user are managed.
  • the step of obtaining wallet information of the target user includes:
  • the creation instruction is: an instruction for creating wallet information corresponding to a virtual wallet of a target user;
  • an embodiment of the present application further provides a computer program product that, when running on an electronic device, causes the electronic device to execute: any one of the foregoing two-dimensional code generation method steps.
  • the wallet information corresponding to the target user can be obtained, wherein the wallet information is: information used to assist in managing the assets in the virtual wallet of the target user; encoding the wallet information to generate a two-dimensional code; and targeting the target user To store the generated QR code.
  • the wallet information corresponding to the virtual wallet is encoded, and the encoded two-dimensional code is generated and stored for the target user, so that when the wallet information corresponding to the virtual wallet of the target user is needed, only two scans are required.
  • the dimension code can obtain the wallet information corresponding to the virtual wallet of the target user, so that the user does not need to memorize the complex wallet information corresponding to the virtual wallet, improving the user experience, and avoiding the user's own assets caused by forgetting the wallet information corresponding to the virtual wallet. Loss situation.

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Engineering & Computer Science (AREA)
  • Finance (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Storage Device Security (AREA)

Abstract

一种二维码生成方法、装置及电子设备,方法包括:获得目标用户对应的钱包信息(S101);对钱包信息进行编码,生成二维码(S102);针对目标用户,存储生成的二维码(S103)。对虚拟钱包对应的钱包信息进行编码,生成并针对目标用户存储编码所得的二维码,使得在需要使用目标用户的虚拟钱包对应的钱包信息时,只需要扫描二维码即可获得目标用户的虚拟钱包对应的钱包信息,实现无需用户记忆虚拟钱包对应的复杂的钱包信息,提高了用户体验,并且避免了用户由于忘记虚拟钱包对应的钱包信息,而造成自身资产损失的情况。

Description

一种二维码生成方法、装置及电子设备
本申请要求于2018年9月27日提交中国专利局、申请号为201811134229.9、发明名称为“一种二维码生成方法、装置及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及区块链技术领域,特别是涉及一种二维码生成方法、装置及电子设备。
背景技术
助记词是明文私钥的一种表现形式,其目的是为了帮助用户记忆复杂的私钥,例如64位的哈希值。助记词一般由顺序排列的第一预设数量个英文单词构成该第一预设数量可以为12、15、18或21,这些单词都取自一个固定词库,其生成顺序也是按照一定算法而来,通过该顺序排列的第一预设数量个单词,可以生成私钥。
区块链技术领域中,区块链私钥作为用户拥有对该用户的虚拟钱包的资产的支配权的唯一凭证,即谁拥有虚拟钱包对应的区块链私钥,即拥有对该虚拟钱包的资产的支配权。而区块链私钥为一组没有规律的字符串,不易记忆,目前,为了避免用户忘记区块链私钥,而导致丢失对自身的虚拟钱包的资产的支配权,通过助记词辅助用户记忆用户的虚拟钱包对应的区块链私钥。然而,助记词为一组没有规律的英文单词,也不易记忆,当用户忘记助记词和区块链私钥等虚拟钱包对应的钱包信息时,用户就会失去对虚拟钱包内的资产的支配权,用户体验不高。
发明内容
本申请实施例的目的在于提供一种二维码生成方法、装置及电子设备,以实现无需用户记忆虚拟钱包对应的复杂的钱包信息,提高用户体验。具体技术方案如下:
一方面,本申请实施例提供了一种二维码生成方法,所述方法包括:
获得目标用户的钱包信息,其中,所述钱包信息为:用于辅助管理所述目标用户的虚拟钱包内的资产的信息;
对所述钱包信息进行编码,生成二维码;
针对所述目标用户,存储生成的所述二维码。
可选地,所述钱包信息包括助记词和/或区块链私钥。
可选地,所述方法还包括:
在接收所述目标用户触发的针对所述二维码的第一识别指令时,识别所述二维码,得到第一识别结果,其中,所述第一识别结果包括所述钱包信息;
基于所述钱包信息,对所述目标用户的虚拟钱包的资产进行管理。
可选地,在所述对所述钱包信息进行编码,生成二维码的步骤之前,所述方法还包括:
利用目标加密算法,对所述钱包信息进行加密;
所述对所述钱包信息进行编码,生成二维码的步骤,包括:
对加密后的所述钱包信息进行编码,生成二维码。
可选地,所述方法还包括:
在接收所述目标用户触发的针对所述二维码的第二识别指令时,识别所述二维码,得到第二识别结果,其中,所述第二识别结果包括利用所述目标加密算法加密后的所述钱包信息;
利用所述目标加密算法对应的解密算法,对加密后的所述钱包信息进行解密,得到解密结果;
基于所述解密结果,对所述目标用户的虚拟钱包的资产进行管理。
可选地,所述获得目标用户的钱包信息的步骤,包括:
接收针对虚拟钱包的创建指令,其中,所述创建指令为:用于创建目标用户的虚拟钱包对应的钱包信息的指令;
基于所述创建指令,获得所述目标用户的钱包信息。
另一方面,本申请实施例提供了一种二维码生成装置,所述装置包括:
获得模块,用于获得目标用户的钱包信息,其中,所述钱包信息为:用于辅助管理所述目标用户的虚拟钱包内的资产的信息;
编码生成模块,用于对所述钱包信息进行编码,生成二维码;
存储模块,用于针对所述目标用户,存储生成的所述二维码。
可选地,所述钱包信息包括助记词和/或区块链私钥。
可选地,所述装置还包括:
第一识别模块,用于在接收所述目标用户触发的针对所述二维码的第一识别指令时,识别所述二维码,得到第一识别结果,其中,所述第一识别结果包括所述钱包信息;
第一登录模块,用于基于所述钱包信息,对所述目标用户的虚拟钱包的资产进行管理。
可选地,所述装置还包括:
加密模块,用于在所述对所述钱包信息进行编码,生成二维码之前,利用目标加密算法,对所述钱包信息进行加密;
所述编码生成模块,具体用于
对加密后的所述钱包信息进行编码,生成二维码。
可选地,所述装置还包括:
第二识别模块,用于在接收所述目标用户触发的针对所述二维码的第二识别指令时,识别所述二维码,得到第二识别结果,其中,所述第二识别结果包括利用所述目标加密算法加密后的所述钱包信息;
解密模块,用于利用所述目标加密算法对应的解密算法,对加密后的所述钱包信息进行解密,得到解密结果;
第二登录模块,用于基于所述解密结果,对所述目标用户的虚拟钱包的资产进行管理。
可选地,所述获得模块,具体用于
接收针对虚拟钱包的创建指令,其中,所述创建指令为:用于创建目标用户的虚拟钱包对应的钱包信息的指令;
基于所述创建指令,获得所述目标用户的钱包信息。
另一方面,本申请实施例提供了一种电子设备,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;
存储器,用于存放计算机程序;
处理器,用于执行存储器上所存放的计算机程序时,实现本申请实施例所提供的任一所述的二维码生成方法步骤。
另一方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现本申请实施例所提供的任一所述的二维码生成方法步骤。
另一方面,本申请实施例还提供了一种计算机程序产品,当其在电子设备上运行时,使得电子设备执行:上述任一所述的二维码生成方法步骤。
本申请实施例提供的二维码生成方法,获得目标用户对应的钱包信息,其中,钱包信息为:用于辅助管理目标用户的虚拟钱包内的资产的信息;对钱包信息进行编码,生成二维码;针对目标用户,存储生成的二维码。可见,本申请实施例中,对虚拟钱包对应的钱包信息进行编码,生成并针对目标用户存储编码所得的二维码,使得在需要使用目标用户的虚拟钱包对应的钱包信息时,只需要扫描二维码即可获得目标用户的虚拟钱包对应的钱包信息,实现无需用户记忆虚拟钱包对应的复杂的钱包信息,提高了用户体验,并且避免了用户由于忘记虚拟钱包对应的钱包信息,而造成自身资产损失的情况。
附图说明
为了更清楚地说明本申请实施例和现有技术的技术方案,下面对实施例和现有技术中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例所提供的一种二维码生成方法的流程示意图;
图2为本申请实施例所提供的一种二维码生成方法的另一流程示意图;
图3为本申请实施例所提供的一种二维码生成方法的另一流程示意图;
图4为本申请实施例所提供的一种二维码生成方法的另一流程示意图;
图5为本申请实施例所提供的一种二维码生成装置的结构示意图;
图6为本申请实施例所提供的一种电子设备的结构示意图。
具体实施方式
为使本申请的目的、技术方案、及优点更加清楚明白,以下参照附图并举实施例,对本申请进一步详细说明。显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本 申请保护的范围。
本申请实施例提供了一种二维码生成方法、装置及电子设备,以实现无需用户记忆虚拟钱包对应的复杂的钱包信息,提高用户体验。
下面首先对本申请实施例所提供的一种二维码生成方法进行介绍。
如图1所示,本申请实施例提供了一种二维码生成方法,可以包括如下步骤:
S101:获得目标用户的钱包信息;
其中,该钱包信息为:用于辅助管理目标用户的虚拟钱包内的资产的信息。
可以理解的是,本申请实施例所提供的二维码生成方法,可以应用于任一类型的电子设备,该电子设备可以为电脑和手机等设备搭建的终端或服务器。当该电子设备为终端时,该电子设备中可以安装有区块链钱包应用。当该电子设备为服务器时,该电子设备可以与安装有区块链钱包应用的终端进行通信连接。该区块链钱包应用为:用于管理区块链密钥、钱包地址,跟踪余额和创建交易的应用软件。其中,区块链密钥包括区块链私钥和区块链私钥对应的公钥。每一区块链用户均可以基于该区块链钱包应用创建自己的虚拟钱包,进而,创建完成自己的虚拟钱包之后,区块链用户可以基于该区块链钱包应用,管理自己的虚拟钱包对应的区块链密钥和钱包地址,并跟踪自己的虚拟钱包的余额和创建交易。其中,该目标用户可以为任一区块链用户。
在一种情况中,实现本申请实施例所提供的二维码生成方法的功能软件,可以以专门的客户端软件的形式存在,例如:专门的区块链钱包应用;也可以以目前存在的客户端软件的插件的形式存在,例如:现有的区块链钱包应用的插件。
在一种实现方式中,获得目标用户的钱包信息的步骤,可以包括:
接收针对虚拟钱包的创建指令,其中,该创建指令为:用于创建目标用户的虚拟钱包对应的钱包信息的指令;
基于创建指令,获得目标用户的钱包信息。
电子设备可以在接收到针对虚拟钱包的创建指令时,基于该创建指令,获得目标用户的钱包信息。具体的,一种情况,当电子设备为终端时,在创建完成目标用户的虚拟钱包后,该电子设备可以提供有触发该创建指令的功能按键,目标用户可以通过对该功能按键的执行预定操作。例如点击或长按,触发该创建指令,以使得电子设备接收到该创建指令,进而基于该创建指令获得目标用户的钱包信息,以执行本申请实施例所提供的二维码生成流程。在一种实现方式中,电子设备还可以将该钱包信息展示给目标用户,以便目标用户可以记录该钱包信息。
另一种情况,当电子设备为服务器时,在创建完成目标用户的虚拟钱包后,该电子设备可以接收虚拟钱包所在终端发送的针对该虚拟钱包的创建指令。其中,该虚拟钱包所在终端可以提供有触发该创建指令的功能按键,目标用户通过对该功能按键的执行预定操作。例如点击或长按,使得该虚拟钱包所在终端向电子设备发送创建指令。进而,电子设备基于该创建指令获得目标用户的钱包信息,以执行本申请实施例所提供的二维码生成流程。在一种实现方式中,电子设备还可以将该钱包信息发送至该虚拟钱包所在终端,以使得该虚拟钱包所在终端将该钱包信息展示给目标用户,以便目标用户可以记录该钱包信息。
在另一种实现方式中,在电子设备接收到目标用户用于创建虚拟钱包的账户建立指令时,可以在创建完成虚拟钱包之后,直接获得虚拟钱包对应的钱包信息,进而直接执行本申请实施例所提供的二维码生成流程。
可以理解的是,在创建虚拟钱包时,可以同时生成得到该虚拟钱包的钱包信息。本申请实施例中,可以采用任一可行的实现方式生成得到该虚拟钱包的钱包信息,本申请实施例并不对生成得到该虚拟钱包的钱包信息的实现方式进行限定。
在一种实现方式中,该钱包信息可以包括但不限于助记词和/或区块链私钥。其中,该助记词和区块链私钥均为用于辅助管理用户的虚拟钱包内的资产的信息。可以理解的是,该助记词可以通过第一预定算法,被转化为区块链私钥,而区块链私钥作为用户拥有对该用户的虚拟钱包的资产的支配权的唯一凭证,当用户拥有了虚拟钱包对应的助记词和/或区块链私钥之后,就可 以对该区块链私钥对应的虚拟钱包内的资产进行管理,该管理可以转账和交易等。其中,该虚拟钱包对应的区块链私钥可以包括:虚拟钱包对应的钱包地址所对应的区块链私钥。可以理解的是,在区块链中,每一钱包地址对应一区块链私钥。
S102:对钱包信息进行编码,生成二维码;
S103:针对目标用户,存储生成的二维码。
本申请实施例中,可以利用预设的二维码生成算法,对钱包信息进行编码,以生成二维码。该预设的二维码生成算法可以是目前任一类型的二维码生成算法,本申请实施例并不对预设的二维码生成算法进行限定。
生成二维码后,可以针对目标用户存储该生成的二维码。在一种实现方式中,可以是针对该目标用户的虚拟钱包,存储该二维码,即记录目标用户的虚拟钱包与该二维码两者之间的对应关系。后续的,还可以对应存储该目标用户的钱包信息,即记录目标用户的虚拟钱包、该二维码以及该生成二维码的钱包信息三者之间的对应关系,这都是可以的。
本申请实施例中,为了保证目标用户的虚拟钱包的资产的安全,只要在目标用户拥有对自身的虚拟钱包的资产的支配权时,该目标用户才具有基于该区块链钱包应用导出该目标用户的二维码和/或钱包信息的权限。当目标用户不具有对自身的虚拟钱包的资产的支配权时,例如丢失或忘记虚拟钱包对应的助记词和区块链私钥时,该目标用户则不能基于区块链钱包应用导出该目标用户的虚拟钱包对应的二维码和/或钱包信息。在一种实现方式中,在生成二维码之后,电子设备可以将所生成的二维码展示给目标用户,并展示提示信息,以提示目标用户记录该二维码,以使得后续的目标用户在忘记或丢失钱包信息时,可以通过识别记录的该二维码,得到钱包信息,即得到目标用户的虚拟钱包对应的助记词和/或区块链私钥,进而得到对自身的虚拟钱包的资产的支配权。
在一种情况中,当电子设备为服务器时,上述电子设备可以将所生成的二维码展示给目标用户,并展示提示信息的实现方式,可以是:电子设备将所生成的二维码以及提示信息发送至目标用户所持有的终端,即目标用户的 虚拟钱包所在终端,以使该目标用户的虚拟钱包所在终端,在其自身的显示屏中显示该二维码以及提示信息。此时,目标用户可以通过截屏和拍照的方式,记录该二维码。
另一种情况中,当电子设备为终端时,上述电子设备可以将所生成的二维码展示给目标用户,并展示提示信息的实现方式,可以是:电子设备将所生成的二维码以及提示信息,在其自身的显示屏中显示该二维码以及提示信息。此时,目标用户可以通过截屏和拍照的方式,记录该二维码。
应用本申请实施例,可以获得目标用户对应的钱包信息,其中,钱包信息为:用于辅助管理目标用户的虚拟钱包内的资产的信息;对钱包信息进行编码,生成二维码;针对目标用户,存储生成的二维码。可见,本申请实施例中,对虚拟钱包对应的钱包信息进行编码,生成并针对目标用户存储编码所得的二维码,使得在需要使用目标用户的虚拟钱包对应的钱包信息时,只需要扫描二维码即可获得目标用户的虚拟钱包对应的钱包信息,实现无需用户记忆虚拟钱包对应的复杂的钱包信息,提高了用户体验,并且避免了用户由于忘记虚拟钱包对应的钱包信息,而造成自身资产损失的情况。
在一种实现方式中,如图2所示,方法还可以包括如下步骤:
S201:在接收目标用户触发的针对二维码的第一识别指令时,识别二维码,得到第一识别结果;
其中,第一识别结果包括钱包信息;该钱包信息为目标用户的虚拟钱包对应的钱包信息,用于辅助管理目标用户的虚拟钱包内的资产;
S202:基于钱包信息,对目标用户的虚拟钱包的资产进行管理。
可以理解的是,目标用户由于管理不当,忘记或丢失目标用户的虚拟钱包对应的区块链私钥和助记词时,为了避免由于目标用户的虚拟钱包对应的区块链私钥和/或助记词的丢失,而导致丢失对目标用户的虚拟钱包中资产的支配权。本申请实施例中,可以提示目标用户记录该目标用户的虚拟钱包对应的二维码,进而在目标用户需要得到目标用户的虚拟钱包对应的钱包信息时,可以触发对该记录的二维码的识别指令。进而,电子设备可以接收目标用户触发的针对二维码的识别指令,作为第一识别指令,进而执行识别二维 码的步骤。
其中,该目标用户的虚拟钱包对应的区块链私钥可以包括:目标用户的虚拟钱包对应的钱包地址所对应的区块链私钥。可以理解的是,在区块链中,每一钱包地址对应一区块链私钥。
本申请实施例中,在接收到目标用户触发的针对二维码的第一识别指令时,电子设备可以利用预设的二维码生成算法对应的二维码解码算法,识别二维码,以得到包括钱包信息的第一识别结果。进而,电子设备可以基于得到的包括钱包信息的第一识别结果,对目标用户的虚拟钱包的资产进行管理。具体的,可以是:当目标用户得到目标用户的钱包信息,即目标用户的虚拟钱包对应的助记词和/或区块链私钥时,该目标用户即获得对虚拟钱包的资产的支配权,进而目标用户可以基于该电子设备,对目标用户的虚拟钱包的资产进行管理。
在一种实现方式中,如图3所示,方法可以包括如下步骤:
S301:获得目标用户的钱包信息;
其中,该钱包信息为:用于辅助管理目标用户的虚拟钱包内的资产的信息;
S302:利用目标加密算法,对钱包信息进行加密;
S303:对加密后的钱包信息进行编码,生成二维码;
S304:针对目标用户,存储生成的二维码。
其中,该S301与图1中所示的S101相同,该S304与图1中所示的S103相同。
本实现方式中,为了保证钱包信息的安全性,在将钱包信息进行编码之前,可以基于目标加密算法对钱包信息进行加密,进而对加密后的钱包信息进行编码,生成二维码。
其中,该目标加密算法可以包括:AES(Advanced Encryption Standard,高级加密标准)、DES(Data Encryption Standard,数据加密标准)、3DES(Triple  Data Encryption Algorithm,三重数据加密算法)、DSA(Digital Signature Algorithm,椭圆曲线数字签名算法)、ECC(Elliptic Curves Cryptography,椭圆曲线密码编码学)、MD5(Message Digest Algorithm MD5,消息摘要算法第五版)和HMAC(Hash Message Authentication Code,散列消息鉴别码)等加密算法。可以理解的是,本申请实施例中,该目标加密算法可以是目前任一可以对钱包信息进行加密的算法,本申请实施例并不对该目标加密算法的具体类型进行限定。
通过目标加密算法,对钱包信息进行加密,进而,对加密后的钱包信息进行编码,生成二维码。在一定程度上可以提高钱包信息的安全性。当该二维码被除该目标用户外的其他用户得到时,该其他用户也不能解码该二维码以得到钱包信息,除目标用户外的其他用户无法得到目标用户的虚拟钱包对应的钱包信息,在一定程度上保证了目标用户的虚拟钱包的资产的安全。
在一种实现方式中,如图4所示,方法还可以包括如下步骤:
S401:在接收目标用户触发的针对二维码的第二识别指令,识别二维码,得到第二识别结果;
其中,第二识别结果包括利用目标加密算法加密后的钱包信息;该钱包信息为目标用户的虚拟钱包对应的钱包信息,用于辅助管理目标用户的虚拟钱包内的资产;
S402:利用目标加密算法对应的解密算法,对加密后的钱包信息进行解密,得到解密结果;
S403:基于解密结果,对目标用户的虚拟钱包的资产进行管理。
可以理解的是,电子设备在接收到目标用户触发的针对二维码的第二识别指令时,可以利用预设的二维码生成算法对应的二维码解码算法,解码得到包括利用目标加密算法加密后的钱包信息的第二识别结果,进而,可以利用目标加密算法对应的解密算法,对加密后的钱包信息进行解密,得到解密结果;其中,该目标加密算法为对钱包信息进行加密的加密算法。可以理解的是,该解密结果中包括钱包信息,即目标用户的虚拟钱包对应的助记词和/或区块链私钥。进而,电子设备可以基于解密结果,对目标用户的虚拟钱包 的资产进行管理。具体的,可以是:当目标用户得到目标用户的钱包信息,即目标用户的虚拟钱包对应的助记词和/或区块链私钥时,该目标用户即获得对虚拟钱包的资产的支配权,进而目标用户可以基于该电子设备,对目标用户的虚拟钱包的资产进行管理。
相应于上述方法实施例,本申请实施例提供了一种二维码生成装置,如图5所示,装置可以包括:
获得模块510,用于获得目标用户的钱包信息,其中,钱包信息为:用于辅助管理目标用户的虚拟钱包内的资产的信息;
编码生成模块520,用于对钱包信息进行编码,生成二维码;
存储模块530,用于针对目标用户,存储生成的二维码。
应用本申请实施例,可以获得目标用户对应的钱包信息,其中,钱包信息为:用于辅助管理目标用户的虚拟钱包内的资产的信息;对钱包信息进行编码,生成二维码;针对目标用户,存储生成的二维码。可见,本申请实施例中,对虚拟钱包对应的钱包信息进行编码,生成并针对目标用户存储编码所得的二维码,使得在需要使用目标用户的虚拟钱包对应的钱包信息时,只需要扫描二维码即可获得目标用户的虚拟钱包对应的钱包信息,实现无需用户记忆虚拟钱包对应的复杂的钱包信息,提高了用户体验,并且避免了用户由于忘记虚拟钱包对应的钱包信息,而造成自身资产损失的情况。
在一种实现方式中,钱包信息包括助记词和/或区块链私钥。
在一种实现方式中,装置还可以包括:
第一识别模块,用于在接收目标用户触发的针对二维码的第一识别指令时,识别二维码,得到第一识别结果,其中,第一识别结果包括钱包信息;
第一登录模块,用于基于钱包信息,对目标用户的虚拟钱包的资产进行管理。
在一种实现方式中,装置还可以包括:
加密模块,用于在对钱包信息进行编码,生成二维码之前,利用目标加密算法,对钱包信息进行加密;
编码生成模块520,具体用于
对加密后的钱包信息进行编码,生成二维码。
在一种实现方式中,装置还可以包括:
第二识别模块,用于在接收目标用户触发的针对二维码的第二识别指令时,识别二维码,得到第二识别结果,其中,第二识别结果包括利用目标加密算法加密后的钱包信息;
解密模块,用于利用目标加密算法对应的解密算法,对加密后的钱包信息进行解密,得到解密结果;
第二登录模块,用于基于解密结果,对目标用户的虚拟钱包的资产进行管理。
在一种实现方式中,获得模块510,具体用于
接收针对虚拟钱包的创建指令,其中,创建指令为:用于创建目标用户的虚拟钱包对应的钱包信息的指令;
基于创建指令,获得目标用户的钱包信息。
相应于上述方法实施例,本申请实施例还提供了一种电子设备,如图6所示,包括处理器610、通信接口620、存储器630和通信总线640,其中,处理器610,通信接口620,存储器630通过通信总线640完成相互间的通信,
存储器630,用于存放计算机程序;
处理器610,用于执行存储器630上所存放的计算机程序时,实现本申请实施例所提供的上述任一的二维码生成方法步骤:
获得目标用户的钱包信息,其中,钱包信息为:用于辅助管理目标用户的虚拟钱包内的资产的信息;
对钱包信息进行编码,生成二维码;
针对目标用户,存储生成的二维码。
应用本申请实施例,可以获得目标用户对应的钱包信息,其中,钱包信息为:用于辅助管理目标用户的虚拟钱包内的资产的信息;对钱包信息进行编码,生成二维码;针对目标用户,存储生成的二维码。可见,本申请实施例中,对虚拟钱包对应的钱包信息进行编码,生成并针对目标用户存储编码所得的二维码,使得在需要使用目标用户的虚拟钱包对应的钱包信息时,只需要扫描二维码即可获得目标用户的虚拟钱包对应的钱包信息,实现无需用户记忆虚拟钱包对应的复杂的钱包信息,提高了用户体验,并且避免了用户由于忘记虚拟钱包对应的钱包信息,而造成自身资产损失的情况。
在一种实现方式中,钱包信息包括助记词和/或区块链私钥。
在一种实现方式中,还包括:
在接收目标用户触发的针对二维码的第一识别指令时,识别二维码,得到第一识别结果,其中,第一识别结果包括钱包信息;
基于钱包信息,对目标用户的虚拟钱包的资产进行管理。
在一种实现方式中,在对钱包信息进行编码,生成二维码的步骤之前,还包括:
利用目标加密算法,对钱包信息进行加密;
对钱包信息进行编码,生成二维码的步骤,包括:
对加密后的钱包信息进行编码,生成二维码。
在一种实现方式中,还包括:
在接收目标用户触发的针对二维码的第二识别指令时,识别二维码,得到第二识别结果,其中,第二识别结果包括利用目标加密算法加密后的钱包信息;
利用目标加密算法对应的解密算法,对加密后的钱包信息进行解密,得到解密结果;
基于解密结果,对目标用户的虚拟钱包的资产进行管理。
在一种实现方式中,获得目标用户的钱包信息的步骤,包括:
接收针对虚拟钱包的创建指令,其中,创建指令为:用于创建目标用户的虚拟钱包对应的钱包信息的指令;
基于创建指令,获得目标用户的钱包信息。
上述电子设备提到的通信总线可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。该通信总线可以分为地址总线、数据总线、控制总线等。为便于表示,图中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
通信接口用于上述电子设备与其他设备之间的通信。
存储器可以包括随机存取存储器(Random Access Memory,RAM),也可以包括非易失性存储器(Non-Volatile Memory,NVM),例如至少一个磁盘存储器。可选的,存储器还可以是至少一个位于远离前述处理器的存储装置。
上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(Digital Signal Processing,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。
相应于上述方法实施例,本申请实施例还提供了一种计算机可读存储介质,计算机可读存储介质内存储有计算机程序,计算机程序被处理器执行时实现本申请实施例所提供的上述任一的二维码生成方法步骤:
获得目标用户的钱包信息,其中,钱包信息为:用于辅助管理目标用户的虚拟钱包内的资产的信息;
对钱包信息进行编码,生成二维码;
针对目标用户,存储生成的二维码。
应用本申请实施例,可以获得目标用户对应的钱包信息,其中,钱包信息为:用于辅助管理目标用户的虚拟钱包内的资产的信息;对钱包信息进行编码,生成二维码;针对目标用户,存储生成的二维码。可见,本申请实施例中,对虚拟钱包对应的钱包信息进行编码,生成并针对目标用户存储编码所得的二维码,使得在需要使用目标用户的虚拟钱包对应的钱包信息时,只需要扫描二维码即可获得目标用户的虚拟钱包对应的钱包信息,实现无需用户记忆虚拟钱包对应的复杂的钱包信息,提高了用户体验,并且避免了用户由于忘记虚拟钱包对应的钱包信息,而造成自身资产损失的情况。
在一种实现方式中,钱包信息包括助记词和/或区块链私钥。
在一种实现方式中,还包括:
在接收目标用户触发的针对二维码的第一识别指令时,识别二维码,得到第一识别结果,其中,第一识别结果包括钱包信息;
基于钱包信息,对目标用户的虚拟钱包的资产进行管理。
在一种实现方式中,在对钱包信息进行编码,生成二维码的步骤之前,还包括:
利用目标加密算法,对钱包信息进行加密;
对钱包信息进行编码,生成二维码的步骤,包括:
对加密后的钱包信息进行编码,生成二维码。
在一种实现方式中,还包括:
在接收目标用户触发的针对二维码的第二识别指令时,识别二维码,得到第二识别结果,其中,第二识别结果包括利用目标加密算法加密后的钱包信息;
利用目标加密算法对应的解密算法,对加密后的钱包信息进行解密,得到解密结果;
基于解密结果,对目标用户的虚拟钱包的资产进行管理。
在一种实现方式中,获得目标用户的钱包信息的步骤,包括:
接收针对虚拟钱包的创建指令,其中,创建指令为:用于创建目标用户的虚拟钱包对应的钱包信息的指令;
基于创建指令,获得目标用户的钱包信息。
相应于上述方法实施例,本申请实施例还提供了一种计算机程序产品,当其在电子设备上运行时,使得电子设备执行:上述任一的二维码生成方法步骤。
应用本申请实施例,可以获得目标用户对应的钱包信息,其中,钱包信息为:用于辅助管理目标用户的虚拟钱包内的资产的信息;对钱包信息进行编码,生成二维码;针对目标用户,存储生成的二维码。可见,本申请实施例中,对虚拟钱包对应的钱包信息进行编码,生成并针对目标用户存储编码所得的二维码,使得在需要使用目标用户的虚拟钱包对应的钱包信息时,只需要扫描二维码即可获得目标用户的虚拟钱包对应的钱包信息,实现无需用户记忆虚拟钱包对应的复杂的钱包信息,提高了用户体验,并且避免了用户由于忘记虚拟钱包对应的钱包信息,而造成自身资产损失的情况。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括要素的过程、方法、物品或者设备中还存在另外的相同要素。
本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置、电子设备、计算机可读存储介质和计算机程序产品实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之 处参见方法实施例的部分说明即可。
以上仅为本申请的较佳实施例而已,并非用于限定本申请的保护范围。凡在本申请的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本申请的保护范围内。

Claims (15)

  1. 一种二维码生成方法,其特征在于,所述方法包括:
    获得目标用户的钱包信息,其中,所述钱包信息为:用于辅助管理所述目标用户的虚拟钱包内的资产的信息;
    对所述钱包信息进行编码,生成二维码;
    针对所述目标用户,存储生成的所述二维码。
  2. 根据权利要求1所述的方法,其特征在于,所述钱包信息包括助记词和/或区块链私钥。
  3. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    在接收所述目标用户触发的针对所述二维码的第一识别指令时,识别所述二维码,得到第一识别结果,其中,所述第一识别结果包括所述钱包信息;
    基于所述钱包信息,对所述目标用户的虚拟钱包的资产进行管理。
  4. 根据权利要求1所述的方法,其特征在于,在所述对所述钱包信息进行编码,生成二维码的步骤之前,所述方法还包括:
    利用目标加密算法,对所述钱包信息进行加密;
    所述对所述钱包信息进行编码,生成二维码的步骤,包括:
    对加密后的所述钱包信息进行编码,生成二维码。
  5. 根据权利要求4所述的方法,其特征在于,所述方法还包括:
    在接收所述目标用户触发的针对所述二维码的第二识别指令时,识别所述二维码,得到第二识别结果,其中,所述第二识别结果包括利用所述目标加密算法加密后的所述钱包信息;
    利用所述目标加密算法对应的解密算法,对加密后的所述钱包信息进行解密,得到解密结果;
    基于所述解密结果,对所述目标用户的虚拟钱包的资产进行管理。
  6. 根据权利要求1-5任一项所述的方法,其特征在于,所述获得目标用户 的钱包信息的步骤,包括:
    接收针对虚拟钱包的创建指令,其中,所述创建指令为:用于创建目标用户的虚拟钱包对应的钱包信息的指令;
    基于所述创建指令,获得所述目标用户的钱包信息。
  7. 一种二维码生成装置,其特征在于,所述装置包括:
    获得模块,用于获得目标用户的钱包信息,其中,所述钱包信息为:用于辅助管理所述目标用户的虚拟钱包内的资产的信息;
    编码生成模块,用于对所述钱包信息进行编码,生成二维码;
    存储模块,用于针对所述目标用户,存储生成的所述二维码。
  8. 根据权利要求7所述的装置,其特征在于,所述钱包信息包括助记词和/或区块链私钥。
  9. 根据权利要求7所述的装置,其特征在于,所述装置还包括:
    第一识别模块,用于在接收所述目标用户触发的针对所述二维码的第一识别指令时,识别所述二维码,得到第一识别结果,其中,所述第一识别结果包括所述钱包信息;
    第一登录模块,用于基于所述钱包信息,对所述目标用户的虚拟钱包的资产进行管理。
  10. 根据权利要求7所述的装置,其特征在于,所述装置还包括:
    加密模块,用于在所述对所述钱包信息进行编码,生成二维码之前,利用目标加密算法,对所述钱包信息进行加密;
    所述编码生成模块,具体用于对加密后的所述钱包信息进行编码,生成二维码。
  11. 根据权利要求10所述的装置,其特征在于,所述装置还包括:
    第二识别模块,用于在接收所述目标用户触发的针对所述二维码的第二识别指令时,识别所述二维码,得到第二识别结果,其中,所述第二识别结 果包括利用所述目标加密算法加密后的所述钱包信息;
    解密模块,用于利用所述目标加密算法对应的解密算法,对加密后的所述钱包信息进行解密,得到解密结果;
    第二登录模块,用于基于所述解密结果,对所述目标用户的虚拟钱包的资产进行管理。
  12. 根据权利要求7-11任一项所述的装置,其特征在于,所述获得模块,具体用于
    接收针对虚拟钱包的创建指令,其中,所述创建指令为:用于创建目标用户的虚拟钱包对应的钱包信息的指令;
    基于所述创建指令,获得所述目标用户的钱包信息。
  13. 一种电子设备,其特征在于,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;
    存储器,用于存放计算机程序;
    处理器,用于执行存储器上所存放的计算机程序时,实现权利要求1-6任一所述的二维码生成方法步骤。
  14. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1-6任一所述的二维码生成方法步骤。
  15. 一种计算机程序产品,其特征在于,所述计算机程序产品用于在运行时执行权利要求1-6中任一项所述的二维码生成方法步骤。
PCT/CN2019/092964 2018-09-27 2019-06-26 一种二维码生成方法、装置及电子设备 WO2020062973A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811134229.9A CN109272310A (zh) 2018-09-27 2018-09-27 一种二维码生成方法、装置及电子设备
CN201811134229.9 2018-09-27

Publications (1)

Publication Number Publication Date
WO2020062973A1 true WO2020062973A1 (zh) 2020-04-02

Family

ID=65199066

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/092964 WO2020062973A1 (zh) 2018-09-27 2019-06-26 一种二维码生成方法、装置及电子设备

Country Status (2)

Country Link
CN (1) CN109272310A (zh)
WO (1) WO2020062973A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109272310A (zh) * 2018-09-27 2019-01-25 北京金山安全软件有限公司 一种二维码生成方法、装置及电子设备
CN110009344A (zh) * 2019-03-08 2019-07-12 海南新软软件有限公司 一种备份助记词的方法、装置及系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140254796A1 (en) * 2013-03-08 2014-09-11 The Chinese University Of Hong Kong Method and apparatus for generating and/or processing 2d barcode
CN107453862A (zh) * 2017-05-15 2017-12-08 杭州复杂美科技有限公司 私钥生成存储及使用的方案
CN107633400A (zh) * 2017-08-09 2018-01-26 北京云知科技有限公司 一种基于区块链的机器钱包的支付方法和装置
CN109272310A (zh) * 2018-09-27 2019-01-25 北京金山安全软件有限公司 一种二维码生成方法、装置及电子设备

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017152150A1 (en) * 2016-03-04 2017-09-08 ShoCard, Inc. Method and system for authenticated login using static or dynamic codes
CN107464110B (zh) * 2017-07-10 2021-12-03 北京云知科技有限公司 基于图像的区块链钱包地址生成方法、支付方法、装置以及电子设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140254796A1 (en) * 2013-03-08 2014-09-11 The Chinese University Of Hong Kong Method and apparatus for generating and/or processing 2d barcode
CN107453862A (zh) * 2017-05-15 2017-12-08 杭州复杂美科技有限公司 私钥生成存储及使用的方案
CN107633400A (zh) * 2017-08-09 2018-01-26 北京云知科技有限公司 一种基于区块链的机器钱包的支付方法和装置
CN109272310A (zh) * 2018-09-27 2019-01-25 北京金山安全软件有限公司 一种二维码生成方法、装置及电子设备

Also Published As

Publication number Publication date
CN109272310A (zh) 2019-01-25

Similar Documents

Publication Publication Date Title
US11558381B2 (en) Out-of-band authentication based on secure channel to trusted execution environment on client device
US11374916B2 (en) Key export techniques
US10284372B2 (en) Method and system for secure management of computer applications
TWI578749B (zh) 用於遷移金鑰之方法及設備
US20210246824A1 (en) Method and apparatus for securing communications using multiple encryption keys
US10924289B2 (en) Public-private key pair account login and key manager
WO2018182890A1 (en) Method and system for protecting data keys in trusted computing
US9596263B1 (en) Obfuscation and de-obfuscation of identifiers
TW201540040A (zh) 授權方法、請求授權的方法及裝置
WO2022142629A1 (zh) 用户数据处理方法、装置、计算机设备及存储介质
WO2021190197A1 (zh) 生物支付设备的认证方法、装置、计算机设备和存储介质
US20160013942A1 (en) Identity Verification Using Key Pairs
WO2021114885A1 (zh) 敏感信息保护方法、装置、计算设备及存储介质
US10333707B1 (en) Systems and methods for user authentication
WO2020062973A1 (zh) 一种二维码生成方法、装置及电子设备
CN110417740B (zh) 用户数据的处理方法、智能终端、服务器及存储介质
CN112948789B (zh) 身份认证方法及装置、存储介质及电子设备
US11399015B2 (en) Data security tool
CN114268447A (zh) 一种文件传输方法、装置、电子设备和计算机可读介质
CN113810178B (zh) 密钥管理方法、装置、系统及存储介质
US12047496B1 (en) Noncustodial techniques for granular encryption and decryption
WO2009108129A2 (en) Improved transaction system and method
TW202236135A (zh) 加解密神經網路模型的方法、電子設備及存儲介質
JP2015118451A (ja) 認証装置、認証方法、および認証プログラム
CN117390665A (zh) 身份信息管理方法、装置、设备、存储介质和程序产品

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19864287

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19864287

Country of ref document: EP

Kind code of ref document: A1