Method, device, electronic device and storage medium for associating multiple blockchain addresses
Receive and verify transaction data through blockchain smart contracts, ensuring that the relationships between multiple blockchain addresses are transparently stored on the blockchain and controlled by users. This solves the problems of opaque relationships and easy fraud in existing technologies, and achieves Decentralized and reliable address association.
Patent Information
- Application Number
- CN202211575424.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-08
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2042-12-08
AI Technical Summary
In the existing technology, the association of multiple blockchain addresses is controlled in the backend of the project party, resulting in the association being opaque, easy to falsify, and difficult to prove. Moreover, it is complicated for users to prove the association of addresses by themselves, and lacks decentralized reliability.
Receive the transaction data sent by the main account through the blockchain smart contract, including the signature of the bound account, the bound address and the associated ID of the main account, determine the signature address and publish the association success event to ensure that the binding relationship is in the blockchain It is stored on the Internet and users control binding and unbinding to prevent fraud by the project side.
It achieves decentralized association of multiple blockchain addresses, ensuring the reliability and transparency of the binding relationship. Only any project can query the associated data, avoiding single account fraud.
Smart Images

Figure CN115913576B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of associating multiple blockchain addresses, and in particular to a method, device, electronic device, and storage medium for associating multiple blockchain addresses. Background Art
[0002] This section is intended to provide a background or context to the embodiments of the application that are recited in the claims. No description herein is admitted to be prior art by inclusion in this section.
[0003] The generation of blockchain account addresses is decentralized. Users have different account addresses on multiple public chains, and users also have multiple addresses on the same chain. These account addresses are independent of each other. If the project party wants to make airdrops based on the user's on-chain behavior, it is relatively complicated for the user to prove the association of multiple addresses. At present, the solution to associate multiple user addresses in the relevant technology is to associate the addresses of multiple users in the background of the project party. However, this method associates the relationship in the background of the project party, and other project parties cannot query and use the association relationship. It is relatively complicated for users to prove that their addresses are associated. Moreover, the association relationship is in the background, which is controlled by the project party rather than the user, and is easy to falsify. Summary of the invention
[0004] In view of this, the purpose of this application is to propose a method, device, electronic device and storage medium for associating multiple blockchain addresses.
[0005] Based on the above purpose, the first aspect of the present application provides a method for associating multiple blockchain addresses, wherein the multiple blockchain addresses include an address of a primary account and a bound address of at least one bound account; the method is applied to a blockchain smart contract; the method comprises:
[0006] Receiving first transaction data sent by the master account, wherein the first transaction data includes a first signature of the bound account, the bound address, and an associated ID of the master account, and the first signature is a signature associated with the bound address and the associated ID;
[0007] Determining a first signature address corresponding to the first signature;
[0008] In response to determining that the first signing address is the same as the bound address, an event of successful association between the bound address and the association ID is published.
[0009] Correspondingly, the second aspect of the present application provides another method for associating multiple blockchain addresses, wherein the multiple blockchain addresses include an address of a primary account and a bound address of at least one bound account; the method is applied to the primary account; the method includes:
[0010] Obtaining a first signature of the bound account, the bound address, and an associated ID of the primary account; wherein the first signature is a signature associated with the bound address and the associated ID;
[0011] Assembling the first signature, the bound address, and the associated ID into first transaction data, and sending the first transaction data to the blockchain smart contract, so that the blockchain smart contract determines whether to publish an event of successful association between the bound address and the associated ID through the first transaction data;
[0012] Among them, when the blockchain smart contract determines that the address corresponding to the first signature is the same as the bound address, it publishes an event of successful association between the bound address and the association ID.
[0013] Based on the same inventive concept, the exemplary embodiment of the present application further provides a device for associating multiple blockchain addresses, wherein the multiple blockchain addresses include an address of a primary account and a bound address of at least one bound account; the device is applied to a blockchain smart contract; the device includes:
[0014] A receiving module receives first transaction data sent by the master account, wherein the first transaction data includes a first signature of the bound account, the bound address, and an associated ID of the master account, and the first signature is a signature associated with the bound address and the associated ID;
[0015] A determination module determines a first signature address corresponding to the first signature;
[0016] The publishing module publishes an event of successful association between the bound address and the association ID in response to determining that the first signing address is the same as the bound address.
[0017] Based on the same inventive concept, the exemplary embodiment of the present application further provides another device for associating multiple blockchain addresses, wherein the multiple blockchain addresses include an address of a primary account and a bound address of at least one bound account; the device is applied to the primary account; the device includes:
[0018] An acquisition module is configured to acquire a first signature of the bound account, the bound address, and an associated ID of the primary account; wherein the first signature is a signature associated with the bound address and the associated ID;
[0019] a sending module, assembling the first signature, the bound address and the associated ID into first transaction data, and sending the first transaction data to the blockchain smart contract, so that the blockchain smart contract determines whether to publish an event of successful association between the bound address and the associated ID through the first transaction data;
[0020] Among them, when the blockchain smart contract determines that the address corresponding to the first signature is the same as the bound address, it publishes an event of successful association between the bound address and the association ID.
[0021] Based on the same inventive concept, an exemplary embodiment of the present application also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable by the processor. When the processor executes the program, the method for associating multiple blockchain addresses provided in the first aspect as described above or the method for associating multiple blockchain addresses provided in the second aspect as described above is implemented.
[0022] Based on the same inventive concept, the exemplary embodiments of the present application also provide a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute the method of associating multiple blockchain addresses provided in the first aspect as described above or the method of associating multiple blockchain addresses provided in the second aspect as described above.
[0023] From the above, it can be seen that the method, device, electronic device and storage medium for associating multiple blockchain addresses provided by the present application receive the first transaction data sent by the master account through the blockchain smart contract, wherein the first transaction data includes the first signature of the bound account, the bound address and the association ID of the master account, and the first signature is the signature associated with the bound address and the association ID; and determine the first signature address corresponding to the first signature; then when the blockchain smart contract determines that the first signature address is the same as the bound address, it publishes an event of successful association between the bound address and the association ID, thereby providing a decentralized method for associating multiple blockchain account addresses of users. Since the user binding relationship is stored in the blockchain contract, the binding and unbinding of the address are controlled by the user himself, and the project party cannot forge it, thereby ensuring the reliability of the binding relationship. At the same time, any project party can obtain relevant data associated with the address, which provides convenience for proving the association between multiple addresses. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the present application or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0025] Figure 1 A flowchart of a method for associating multiple blockchain addresses according to an embodiment of the present application;
[0026] Figure 2 A flowchart of another method for associating multiple blockchain addresses according to an embodiment of the present application;
[0027] Figure 3 This is a structural diagram of the interaction between a master account and a blockchain smart contract in an embodiment of the present application;
[0028] Figure 4 A schematic diagram of the structure of a device for associating multiple blockchain addresses according to an embodiment of the present application;
[0029] Figure 5 A schematic diagram of the structure of another device for associating multiple blockchain addresses according to an embodiment of the present application;
[0030] Figure 6 A schematic diagram of the structure of a specific electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0031] The principles and spirit of the present application will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present application, and are not intended to limit the scope of the present application in any way. On the contrary, these embodiments are provided to make the present application more thorough and complete, and to fully convey the scope of the present application to those skilled in the art.
[0032] According to the implementation manner of the present application, a method, device, electronic device and storage medium for associating multiple blockchain addresses are proposed.
[0033] It should be understood herein that any number of elements in the drawings is for illustration rather than limitation, and any naming is only for distinction rather than having any limiting meaning.
[0034] The principles and spirit of the present application are explained in detail below with reference to several representative implementations of the present application. SUMMARY OF THE INVENTION
[0036] At present, the scheme for associating multiple user addresses in related technologies is generally to associate multiple user addresses in the background of the project party, which is a centralized association method. Moreover, this method associates the relationship in the background of the project party, and other project parties cannot query and use the association relationship. It is complicated for users to prove that their addresses are associated. In addition, since the association relationship is in the background, it is under the centralized control of the project party rather than the user. Therefore, it is easy to forge and the reliability of the association relationship cannot be guaranteed.
[0037] In order to solve the above problems, this application provides a method for associating multiple blockchain addresses, which specifically includes:
[0038] The first transaction data sent by the master account is received through a blockchain smart contract, wherein the first transaction data includes a first signature of the bound account, the bound address and the associated ID of the master account, and the first signature is a signature that associates the bound address with the associated ID; and a first signature address corresponding to the first signature is determined; then when the blockchain smart contract determines that the first signature address is the same as the bound address, an event of successful association of the bound address with the associated ID is published, thereby providing a method for decentralizing the association of multiple blockchain account addresses of users. Since the user binding relationship is stored in the blockchain contract, the binding and unbinding of the address are controlled by the user himself, and the project party cannot forge it, thereby ensuring the reliability of the binding relationship. At the same time, any project party can obtain relevant data associated with the address, which provides convenience for proving the association of multiple addresses. In addition, the first transaction data including the first signature of the bound account is sent through the master account, which further ensures the operation of binding the bound address with the associated ID of the master account, and at the same time obtains the consent of the binding account and the bound account, thereby avoiding the fraudulent binding behavior of a single account.
[0039] After introducing the basic principles of the present application, various non-limiting implementation methods of the present application are described in detail below.
[0040] Application Scenario Overview
[0041] In some specific application scenarios, the method of associating multiple blockchain addresses of the present application can be applied to various platforms, systems or APPs involving blockchain.
[0042] The following describes the method of associating multiple blockchain addresses according to the exemplary implementation of the present application in conjunction with specific application scenarios. It should be noted that the above application scenarios are only shown to facilitate understanding of the spirit and principles of the present application, and the implementation of the present application is not limited in this regard. On the contrary, the implementation of the present application can be applied to any applicable scenario.
[0043] Exemplary Methods
[0044] refer to Figure 1 In a first aspect, an embodiment of the present application provides a method for associating multiple blockchain addresses, wherein the multiple blockchain addresses include an address of a primary account and a bound address of at least one bound account; the method is applied to a blockchain smart contract; the method comprises the following steps:
[0045] S101, receiving first transaction data sent by the primary account, wherein the first transaction data includes a first signature of the bound account, the bound address, and an associated ID of the primary account, and the first signature is a signature associated with the bound address and the associated ID.
[0046] In specific implementation, the blockchain smart contract first receives the first transaction data sent by the master account, where the master account refers to an account with an associated ID. Optionally, the address of the master account can be saved in the blockchain smart contract. The first transaction data includes the first signature of the bound account, the bound address, and the associated ID of the master account, wherein the first signature is a signature associating the bound address with the associated ID. It should be noted that the first signature is issued by the bound account, that is, the bound account is declared to agree to associate its bound address with the associated ID through the first signature.
[0047] S102: Determine a first signature address corresponding to the first signature.
[0048] In specific implementation, after obtaining the first signature provided by the primary account, the blockchain smart contract will first obtain the public key corresponding to the first signature through the first signature, and translate the first signature according to the public key to obtain the first signature address corresponding to the first signature.
[0049] S103: In response to determining that the first signing address is the same as the bound address, publishing an event of successful association between the bound address and the association ID.
[0050] In specific implementation, in order to prevent the master account from initiating a transaction associated with the bound address without the permission of the bound account, after obtaining the first signature address corresponding to the first signature, the blockchain smart contract will further determine whether the first signature address is the same as the bound address that the master account wants to associate with. When the first signature address is the same as the bound address, it means that the first signature is indeed issued by the bound account, that is, it is not a forged signature. At this time, the blockchain smart contract confirms that the bound address is successfully associated with the associated ID, and notifies everyone by publishing the event of successful association of the bound address with the associated ID. It should be noted that in this embodiment, since the first signature represents the signature associated with the bound address and the associated ID, under this premise, if the master account wants to forge the first signature, it will also forge a signature associated with the bound address and the associated ID. For other signatures issued by the bound account and containing the bound address but not belonging to the first signature, the blockchain smart contract will not perform subsequent judgment steps, but will directly reject the transaction initiated by the master account.
[0051] In some embodiments, receiving the first transaction data sent by the primary account includes:
[0052] Acquire a first transaction signature of a current account that sends first transaction data, and determine whether the current account is the primary account based on the first transaction signature;
[0053] In response to determining that the current account is the primary account, receiving first transaction data sent by the current account;
[0054] In response to determining that the current account is not the primary account, refusing to receive the first transaction data sent by the current account.
[0055] In specific implementation, in order to prevent a bound account from making decisions on its own and forging an association ID with a master account, the blockchain smart contract only receives the first transaction data sent by the master account. Therefore, when the blockchain smart contract receives the first transaction data, it will determine whether the current account is the master account, specifically by obtaining the first transaction signature of the current account that sent the first transaction data, and determining whether the current account is the master account based on the first transaction signature. It should be noted that in the blockchain, each transaction initiated requires the initiator of the transaction to sign the transaction, and when the smart contract receives the transaction, it will first verify the transaction signature. Optionally, the signature address of the initiator can be determined through the transaction signature, and then the signature address can be compared with the address of the initiator to initiate the transaction, and then it can be determined whether the transaction was issued by the address that initiated the transaction.
[0056] In some embodiments, determining whether the current account is the primary account based on the first transaction signature specifically includes:
[0057] Determine a first transaction address of the current account based on the first transaction signature;
[0058] Obtaining the address of the primary account, and determining whether the first transaction address is the same as the address of the primary account;
[0059] In response to determining that the first transaction address is the same as the address of the primary account, determining that the current account is the primary account;
[0060] In response to determining that the first transaction address is different from the address of the primary account, it is determined that the current account is not the primary account.
[0061] In specific implementation, in order to accurately determine whether the current account is the primary account, the first transaction address of the current account is first determined according to the first transaction signature. Optionally, the public key can be obtained through the first transaction signature, and then the first transaction signature is translated through the public key to obtain the first transaction address of the current account, which is the address obtained through the first transaction signature. Then the address of the primary account is obtained. Optionally, the address of the primary account can be pre-stored in the blockchain smart contract and then read from it. It can also be queried whether the associated ID of the primary account has been generated or the event of the successful association of the bound address with the associated ID has been published, and then the address of the primary account is found therefrom, and there is no limitation on this. After obtaining the address of the primary account, it is determined whether the first transaction address is the same as the address of the primary account. When it is determined that the first transaction address is the same as the address of the primary account, it is determined that the current account is the primary account. When it is determined that the first transaction address is different from the address of the primary account, it is determined that the current account is not the primary account.
[0062] In some embodiments, before receiving the first transaction data sent by the primary account, the method further includes:
[0063] Receive the transaction request for the association ID sent by the target account;
[0064] Obtaining a second transaction signature of the target account, and determining a second transaction address of the target account based on the second signature address;
[0065] Determining whether the second transaction address is associated;
[0066] In response to determining that the second transaction address is not associated, determining the target account as the primary account, and generating an association ID for the primary account;
[0067] Publishes an event that generates the correlation ID.
[0068] In specific implementation, in order to prevent the associated account from being confirmed as the main account and generate an associated ID for the main account, when the blockchain smart contract receives a transaction request for an associated ID sent by the target account, the target account can be any account, and then the second transaction signature of the target account is obtained, and the second transaction address of the target account is determined according to the second signature address; optionally, the corresponding public key can be obtained through the second signature, and then the second transaction address of the target account is obtained through the public key and the second signature. After obtaining the second transaction address, it is determined whether the second transaction address is associated, that is, whether there is information that the second transaction address is associated in the blockchain smart contract. When it is determined that the second transaction address is not associated, the target account is determined as the main account, and the associated ID of the main account is generated, and then the event of generating the associated ID is released. When it is determined that the second transaction address has been associated, the target account is not determined as the main account, and the generation of the associated ID of the main account is refused.
[0069] It should be noted that, in the blockchain, when the target account initiates a transaction, a transaction signature is required, that is, a second transaction signature is generated. Correspondingly, when the blockchain smart contract receives a transaction request for an application association ID sent by the target account, it will verify whether the second transaction address in the second transaction signature is consistent with the address from which the target account issued the transaction. If so, it will accept the transaction request for an application association ID sent by the target account. Therefore, when obtaining the second transaction address of the target account, the address from which the target account issued the transaction can be used as the second transaction address.
[0070] In order to prevent the bound account from actively applying for an association ID, in some embodiments, after determining whether the second transaction address is associated, the method further includes:
[0071] In response to determining that the second transaction address is associated, refusing to generate an association ID for the target account.
[0072] In order to realize the centralized disassociation of the bound address from the association ID, in some embodiments, after publishing the event of successful association of the bound address with the association ID, the method further includes:
[0073] receiving second transaction data sent by the primary account, wherein the second transaction data includes a second signature of the bound account, the bound address, and the associated ID, and the second signature is a signature for disassociating the bound address from the associated ID;
[0074] Determine a second signature address corresponding to the second signature;
[0075] In response to determining that the second signing address is the same as the bound address, an event of successfully disassociating the bound address from the association ID is issued.
[0076] It should be noted that the second signature is issued by the bound account, that is, the bound account declares through the second signature that the bound account agrees to associate its bound address with the associated ID. In order to prevent the master account from initiating a transaction to cancel the association with the bound address without the permission of the bound account, after obtaining the second signature address corresponding to the second signature, the blockchain smart contract will further determine whether the second signature address is the same as the bound address that the master account wants to cancel the association. When the second signature address is the same as the bound address, it means that the second signature is indeed issued by the bound account, that is, it is not a fake signature. At this time, the blockchain smart contract confirms that the bound address is successfully disassociated from the associated ID, and notifies everyone by publishing the event that the bound address is successfully disassociated from the associated ID.
[0077] In some embodiments, after publishing the event of successful association between the bound address and the association ID, the method further includes:
[0078] Receiving a query transaction for querying a bound address associated with the association ID;
[0079] All the bound addresses associated with the association ID are displayed to the account that issues the query transaction.
[0080] In specific implementation, the blockchain smart contract of this embodiment provides an interface for querying association relationships. Optionally, any account can use the query interface to query whether there is an association relationship between multiple blockchain addresses or between a blockchain address and an association ID. When the blockchain smart contract receives a query transaction for querying the bound address associated with the association ID, all the bound addresses associated with the association ID are displayed to the account that issued the query transaction. When the blockchain smart contract receives a query transaction for querying whether there is an association relationship between any two blockchain addresses, it first determines whether the any two blockchain addresses are associated with the same association ID. If so, it means that there is an association relationship between the any two blockchain addresses, and the query result is fed back to the account that issued the query transaction; if not, it means that there is no association relationship between the any two blockchain addresses, and the query result is fed back to the account that issued the query transaction.
[0081] The method for associating multiple blockchain addresses provided in the present application receives the first transaction data sent by the master account through a blockchain smart contract, wherein the first transaction data includes the first signature of the bound account, the bound address and the associated ID of the master account, and the first signature is a signature associating the bound address with the associated ID; and determines the first signature address corresponding to the first signature; then when the blockchain smart contract determines that the first signature address is the same as the bound address, publishes an event of successful association between the bound address and the associated ID, thereby providing a decentralized method for associating multiple blockchain account addresses of a user. Since the user binding relationship is stored in the blockchain contract, the binding and unbinding of the address are controlled by the user himself, and the project party cannot forge it, thereby ensuring the reliability of the binding relationship. At the same time, any project party can obtain relevant data associated with the address, which provides convenience for proving the association between multiple addresses.
[0082] refer to Figure 2 In a second aspect, an embodiment of the present application provides another method for associating multiple blockchain addresses, wherein the multiple blockchain addresses include an address of a primary account and a bound address of at least one bound account; the method is applied to the primary account; the method comprises the following steps:
[0083] S201, obtaining a first signature of the bound account, the bound address, and an associated ID of the primary account; wherein the first signature is a signature associated with the bound address and the associated ID.
[0084] In specific implementation, when the master account wants to associate the bound address with the association ID, it needs to first obtain the first signature of the bound account, the bound address and the association ID of the master account, that is, the bound account needs to issue the first signature first. When the holder of the bound account and the master account is the same user, it will be easy to implement this step, but when the holder of the bound account and the master account is not the same user, it is difficult to implement this step. Therefore, this embodiment makes it easier for the same user to associate multiple blockchain addresses, and at the same time, avoids the fake association behavior of other users.
[0085] S202, assembling the first signature, the bound address and the associated ID into first transaction data, and sending the first transaction data to the blockchain smart contract, so that the blockchain smart contract determines whether to publish an event of successful association between the bound address and the associated ID through the first transaction data.
[0086] In specific implementation, after obtaining the first signature, the bound address and the associated ID, the master account assembles them into the first transaction data, and sends the first transaction data to the blockchain smart contract, which then determines whether the association is successful. When the blockchain smart contract determines that the address corresponding to the first signature is the same as the bound address, it publishes an event that the bound address is successfully associated with the associated ID. It should be noted that in this embodiment, the master account is the account that owns the associated ID, and the blockchain smart contract provides an interface for associating and canceling the account address, and only the master account has the authority to call the interface.
[0087] In some embodiments, after sending the first transaction data to the blockchain smart contract, the method further includes:
[0088] In response to monitoring that the blockchain smart contract publishes an event that the bound address is successfully associated with the association ID, the bound address is saved under the name of the association ID.
[0089] In specific implementation, when the master account monitors the blockchain smart contract to publish an event that the bound address is successfully associated with the associated ID, the bound address is saved under the associated ID and displayed to the user, so that the user with the master account can be informed of the successful association in a timely manner.
[0090] In some embodiments, before obtaining the first signature of the bound account, the bound address, and the associated ID of the primary account, the method further includes:
[0091] Sending a transaction request for applying for an associated ID to the blockchain smart contract; wherein the transaction request includes a second transaction signature of the primary account;
[0092] In response to monitoring the blockchain smart contract publishing and generating the association ID event, saving the association ID;
[0093] When the blockchain smart contract determines that the address of the primary account is not associated based on the second transaction signature, it generates an association ID for the primary account and publishes an event for generating the association ID.
[0094] In specific implementation, when a user wants to determine a certain account as the primary account, he needs to send a transaction request for applying for an association ID to the blockchain smart contract through the account, and then the blockchain smart contract determines whether the account address of the primary account has been associated. If not, the association ID of the primary account is generated for the account of the primary account, that is, the account of the primary account is determined as the primary account, and the association ID generation event is published. Optionally, the published association ID generation event includes not only the association ID, but also the address of the primary account.
[0095] In some embodiments, after sending the first transaction data to the blockchain smart contract, the method further includes:
[0096] Obtaining a second signature of the bound account, the bound address, and the associated ID; wherein the second signature is a signature for disassociating the bound address from the associated ID;
[0097] Assembling the second signature, the bound address, and the associated ID into second transaction data, and sending the second transaction data to the blockchain smart contract, so that the blockchain smart contract determines whether to publish an event of successful disassociation of the bound address and the associated ID through the second transaction data;
[0098] Among them, when the blockchain smart contract determines that the address corresponding to the second signature is the same as the bound address, it publishes an event of successful disassociation between the bound address and the association ID.
[0099] In specific implementation, when the user wants to cancel the association between the bound address and the associated ID, the bound account needs to issue a second signature first, and then the master account obtains the second signature, and assembles the second signature, the bound address and the associated ID into second transaction data, and then sends the second transaction data to the blockchain smart contract, so as to determine whether to cancel the association between the bound address and the associated ID through the blockchain smart contract. Among them, when the blockchain smart contract determines that the address corresponding to the second signature is the same as the bound address, it publishes an event that the bound address and the associated ID are successfully disassociated. If it needs to be explained, the specific steps for the blockchain smart contract to determine whether the address corresponding to the second signature is the same as the bound address are the same as the corresponding embodiments above, and will not be repeated here.
[0100] The method for associating multiple blockchain addresses provided in the present application is that the master account obtains the first signature of the bound account, the bound address and the associated ID of the master account; wherein the first signature is the signature associating the bound address with the associated ID; then the first signature, the bound address and the associated ID are assembled into the first transaction data, and the first transaction data is sent to the blockchain smart contract, so that the blockchain smart contract determines whether to publish the event of successful association between the bound address and the associated ID through the first transaction data; wherein, when the blockchain smart contract determines that the address corresponding to the first signature is the same as the bound address, it publishes the event of successful association between the bound address and the associated ID. Through the above steps, a method for decentralizing the association of multiple blockchain account addresses of users is provided. Since the user binding relationship is stored in the blockchain contract, the binding and unbinding of the address are controlled by the user himself, and the project party cannot forge it, which ensures the reliability of the binding relationship. At the same time, any project party can obtain the relevant data associated with the address, which provides convenience for proving the association of multiple addresses.
[0101] refer to Figure 3 , is a structural diagram of the interaction between a master account and a blockchain smart contract in an embodiment of the present application, wherein the bound account is used to issue a first signature or a second signature, that is, the bound account declares through a signature that it agrees to associate or cancel the association between the bound address and the associated ID. The main functions of the master account include: 1. Obtain the first signature and the second signature issued by the bound account, and assemble them into the first transaction data and the second transaction data, and declare that the master account agrees to associate or cancel the association between the bound address and the associated ID by sending the first transaction data or the second transaction data to the blockchain; 2. Obtain the associated ID by sending a transaction request to the blockchain smart contract to request an associated ID. 3. Listen to events published by the blockchain smart contract. The main functions of the blockchain smart contract include: 1. Determine the master account and generate an associated ID for it; 2. Receive the first transaction data or the second transaction data, and decide whether to agree to associate or cancel the association between the bound address and the associated ID. 3. Provide a query service for the association result for the account. It should be noted that in this embodiment, all signatures can be completed through a blockchain wallet, for example, other blockchain wallets such as the Little Fox Wallet. It should be noted that users can log in to the main account or the bound account through DAPP or other blockchain systems, and there is no restriction on this.
[0102] Exemplary Devices
[0103] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a device for associating multiple blockchain addresses, wherein the multiple blockchain addresses include an address of a primary account and a bound address of at least one bound account; the device is applied to a blockchain smart contract.
[0104] refer to Figure 4 , the device for associating multiple blockchain addresses includes:
[0105] The receiving module 201 receives first transaction data sent by the master account, wherein the first transaction data includes a first signature of the bound account, the bound address, and an associated ID of the master account, and the first signature is a signature associated with the bound address and the associated ID;
[0106] Determining module 202, determining a first signature address corresponding to the first signature;
[0107] The publishing module 203, in response to determining that the first signing address is the same as the bound address, publishes an event of successful association between the bound address and the association ID.
[0108] For the convenience of description, the above device is described in terms of functions divided into various modules. Of course, when implementing the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0109] The device of the above embodiment is used to implement the corresponding method of associating multiple blockchain addresses in any of the embodiments of the first aspect, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0110] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides another device for associating multiple blockchain addresses, wherein the multiple blockchain addresses include an address of a primary account and a bound address of at least one bound account; the device is applied to the primary account.
[0111] refer to Figure 5 , the device for associating multiple blockchain addresses includes:
[0112] The acquisition module 301 acquires the first signature of the bound account, the bound address, and the association ID of the primary account; wherein the first signature is a signature associated with the bound address and the association ID;
[0113] The sending module 302 assembles the first signature, the bound address and the associated ID into first transaction data, and sends the first transaction data to the blockchain smart contract, so that the blockchain smart contract determines whether to publish an event of successful association between the bound address and the associated ID through the first transaction data;
[0114] Among them, when the blockchain smart contract determines that the address corresponding to the first signature is the same as the bound address, it publishes an event of successful association between the bound address and the association ID.
[0115] For the convenience of description, the above device is described in terms of functions divided into various modules. Of course, when implementing the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0116] The device of the above embodiment is used to implement the corresponding method of associating multiple blockchain addresses in any of the embodiments of the second aspect, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0117] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for associating multiple blockchain addresses described in any of the above embodiments is implemented.
[0118] Figure 6 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.
[0119] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0120] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.
[0121] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0122] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0123] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).
[0124] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.
[0125] The electronic device of the above embodiment is used to implement the corresponding method of associating multiple blockchain addresses in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0126] Exemplary Program Products
[0127] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method of associating multiple blockchain addresses as described in any of the above embodiments.
[0128] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0129] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute a method for associating multiple blockchain addresses as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0130] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application (including the claims) is limited to these examples; based on the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.
[0131] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power supply / ground connection with the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform to be implemented in the embodiments of the present application (that is, these details should be fully within the scope of understanding of those skilled in the art). In the case of elaborating specific details (e.g., circuits) to describe exemplary embodiments of the present application, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered to be illustrative rather than restrictive.
[0132] Although the present application has been described in conjunction with specific embodiments of the present application, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
[0133] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of the present application.
Claims
1. A method for associating multiple blockchain addresses, It is characterized in that The multiple blockchain addresses include an address of a primary account and a bound address of at least one bound account; The method is applied to a blockchain smart contract; the method comprises: Receiving first transaction data sent by the master account, wherein the first transaction data includes a first signature of the bound account, the bound address, and an associated ID of the master account, and the first signature is a signature associated with the bound address and the associated ID; Determining a first signature address corresponding to the first signature; In response to determining that the first signing address is the same as the bound address, an event of successful association between the bound address and the association ID is published.
2. The method according to claim 1, It is characterized in that Receiving first transaction data sent by the primary account, including: Acquire a first transaction signature of a current account that sends first transaction data, and determine whether the current account is the primary account based on the first transaction signature; In response to determining that the current account is the primary account, receiving first transaction data sent by the current account; In response to determining that the current account is not the primary account, refusing to receive the first transaction data sent by the current account.
3. The method according to claim 2, It is characterized in that Determining whether the current account is the primary account based on the first transaction signature specifically includes: Determine a first transaction address of the current account based on the first transaction signature; Obtaining the address of the primary account, and determining whether the first transaction address is the same as the address of the primary account; In response to determining that the first transaction address is the same as the address of the primary account, determining that the current account is the primary account; In response to determining that the first transaction address is different from the address of the primary account, it is determined that the current account is not the primary account.
4. The method according to claim 1, It is characterized in that Before receiving the first transaction data sent by the primary account, the method further includes: Receive the transaction request for the association ID sent by the target account; Obtaining a second transaction signature of the target account, and determining a second transaction address of the target account based on the second transaction signature; Determining whether the second transaction address is associated; In response to determining that the second transaction address is not associated, determining the target account as the primary account, and generating an association ID for the primary account; Publishes an event that generates the correlation ID.
5. The method according to claim 4, It is characterized in that After determining whether the second transaction address is associated, the method further includes: In response to determining that the second transaction address is associated, refusing to generate an association ID for the target account.
6. The method according to claim 1, It is characterized in that After publishing the event of successful association between the bound address and the association ID, the method further includes: receiving second transaction data sent by the primary account, wherein the second transaction data includes a second signature of the bound account, the bound address, and the associated ID, and the second signature is a signature for disassociating the bound address from the associated ID; Determine a second signature address corresponding to the second signature; In response to determining that the second signing address is the same as the bound address, an event of successfully disassociating the bound address from the association ID is issued.
7. A method for associating multiple blockchain addresses, It is characterized in that The multiple blockchain addresses include an address of a primary account and a bound address of at least one bound account; The method is applied to the master account; the method comprises: Obtaining a first signature of the bound account, the bound address, and an associated ID of the primary account; wherein the first signature is a signature associated with the bound address and the associated ID; Assembling the first signature, the bound address, and the associated ID into first transaction data, and sending the first transaction data to the blockchain smart contract, so that the blockchain smart contract determines whether to publish an event of successful association between the bound address and the associated ID through the first transaction data; Among them, when the blockchain smart contract determines that the address corresponding to the first signature is the same as the bound address, it publishes an event of successful association between the bound address and the association ID.
8. The method according to claim 7, It is characterized in that After sending the first transaction data to the blockchain smart contract, the method further includes: In response to monitoring that the blockchain smart contract publishes an event that the bound address is successfully associated with the association ID, the bound address is saved under the name of the association ID.
9. The method according to claim 7, It is characterized in that Before obtaining the first signature of the bound account, the bound address, and the associated ID of the primary account, the method further includes: Sending a transaction request for applying for an associated ID to the blockchain smart contract; wherein the transaction request includes a second transaction signature of the primary account; In response to monitoring the blockchain smart contract publishing and generating the association ID event, saving the association ID; When the blockchain smart contract determines that the address of the primary account is not associated based on the second transaction signature, it generates an association ID for the primary account and publishes an event for generating the association ID.
10. The method according to claim 7, It is characterized in that After sending the first transaction data to the blockchain smart contract, the method further includes: Obtaining a second signature of the bound account, the bound address, and the associated ID; wherein the second signature is a signature for disassociating the bound address from the associated ID; Assembling the second signature, the bound address, and the associated ID into second transaction data, and sending the second transaction data to the blockchain smart contract, so that the blockchain smart contract determines whether to publish an event of successful disassociation of the bound address and the associated ID through the second transaction data; Among them, when the blockchain smart contract determines that the address corresponding to the second signature is the same as the bound address, it publishes an event of successful disassociation between the bound address and the association ID.
11. A device for associating multiple blockchain addresses, It is characterized in that The multiple blockchain addresses include an address of a primary account and a bound address of at least one bound account; The device is applied to a blockchain smart contract; the device comprises: A receiving module receives first transaction data sent by the master account, wherein the first transaction data includes a first signature of the bound account, the bound address, and an associated ID of the master account, and the first signature is a signature associated with the bound address and the associated ID; A determination module determines a first signature address corresponding to the first signature; The publishing module publishes an event of successful association between the bound address and the association ID in response to determining that the first signing address is the same as the bound address.
12. A device for associating multiple blockchain addresses, It is characterized in that The multiple blockchain addresses include an address of a primary account and a bound address of at least one bound account; The device is applied to the primary account; the device includes: An acquisition module is configured to acquire a first signature of the bound account, the bound address, and an associated ID of the primary account; wherein the first signature is a signature associated with the bound address and the associated ID; a sending module, assembling the first signature, the bound address and the associated ID into first transaction data, and sending the first transaction data to the blockchain smart contract, so that the blockchain smart contract determines whether to publish an event of successful association between the bound address and the associated ID through the first transaction data; Among them, when the blockchain smart contract determines that the address corresponding to the first signature is the same as the bound address, it publishes an event of successful association between the bound address and the association ID.
13. An electronic device, It is characterized in that The method comprises a memory, a processor and a computer program stored in the memory and executable by the processor, wherein when the processor executes the program, the method according to any one of claims 1 to 6 or 7 to 10 is implemented.
14. A non-transitory computer-readable storage medium, It is characterized in that The non-transitory computer-readable storage medium stores computer instructions for causing a computer to execute the method according to any one of claims 1 to 6 or 7 to 10.
Citation Information
Patent Citations
Blockchain-based cross-chain transaction method and storage medium
CN107679857A
Authorization management method and device, and authorization management system
CN108337540A
Design method and device for realizing block chain system supporting multiple signatures
CN109934593A
Digital key sharing method
CN111047740A
Decentralized address mapping method and device
CN111953773A
