Background
With the continuous development of information technology, the application of the internet is becoming more and more popular, for example, users can perform online transactions, speak and other behaviors through the internet. Generally, a user performs these actions through the internet, and an address capable of indicating the identity of the user is required to ensure the authenticity of the identity of the user.
In the existing block chain technology, the address indicating the user identity is determined by the user himself, and is generally a string of unreadable characters, or a combination of a string of readable characters and an unreadable character string. Therefore, the user can register randomly when registering the address indicating the user identity, so that part of the addresses specific to the user are registered by other people, such as the mobile phone number, the mailbox and the like of the user, and the authenticity of the address indicating the user identity is influenced.
Disclosure of Invention
In view of the above problems, the present invention provides a method, an apparatus, and a system for associating address information, so as to overcome the problem in the prior art that the address indicating the user identity is registered by another person in the blockchain, thereby affecting the authenticity of the address indicating the user identity in the blockchain.
According to an aspect of the present invention, there is provided a method for associating address information, applied to a block chain, including:
receiving first readable address information sent by an information entry platform, and a first hash value of the first readable address information and first verification information, wherein the first readable address information comprises a readable address of a target user, and the first verification information is verification information generated by the information entry platform according to the first readable address information;
receiving the cryptology address information, the second readable address information and the second verification information sent by the user side;
calculating a second hash value of the second readable address information and the second authentication information;
judging whether the first hash value is the same as the second hash value;
and if the first hash value is the same as the second hash value, establishing an association relationship between the first readable address information and the cryptographic address information.
Optionally, after the establishing the association relationship between the first readable address information and the cryptographic address information if the first hash value is the same as the second hash value, the method further includes:
and sending the information that the first readable address information and the cryptology address information are successfully associated to the user side.
Optionally, the method further comprises: receiving identity identification information sent by a user side, and establishing an association relation between the identity identification information and the first readable address information as well as the cryptology address information, wherein the identity identification information comprises identification information used for representing the identity of the user.
Optionally, the method further comprises: and if the first hash value is different from the second hash value, sending information that the association between the first readable address information and the cryptology address information fails to be carried out to a user side.
Optionally, the readable address of the target user includes a mailbox address of the target user or a mobile phone number of the target user.
According to another aspect of the present invention, there is provided an apparatus for associating address information, applied to a block chain, including:
the information input platform comprises a first information receiving unit and a second information receiving unit, wherein the first information receiving unit is used for receiving first readable address information sent by the information input platform and a first hash value of first verification information, the first readable address information comprises a readable address of a target user, and the first verification information is verification information generated by the information input platform according to the first readable address information;
the second information receiving unit is used for receiving the cryptology address information, the second readable address information and the second verification information sent by the user side;
an information calculation unit configured to calculate a second hash value of the second readable address information and the second verification information;
the information verification unit is used for judging whether the first hash value is the same as the second hash value or not;
and the task execution unit is used for establishing the association relationship between the first readable address information and the cryptology address information if the first hash value is the same as the second hash value.
Optionally, the method further comprises:
and the information sending unit is used for sending information that the association between the first readable address information and the cryptology address information is successful to a user side after the task execution unit establishes the association relationship between the first readable address information and the cryptology address information when the first hash value is the same as the second hash value.
Optionally, the information receiving unit is further configured to receive identity information sent by a user side, where the identity information includes identity information used to characterize a user identity;
the task execution unit is further configured to establish an association relationship between the identity information and the first readable address information and the cryptographic address information.
Optionally, the information sending unit is further configured to:
and if the first hash value is different from the second hash value, sending information that the association between the first readable address information and the cryptology address information fails to be carried out to a user side.
Optionally, the address of the target user includes a mailbox address of the target user or a mobile phone number of the target user.
According to another aspect of the present invention, a system for associating address information is provided, which includes an information entry platform, a user end, and a block chain, where the information entry platform, the user end, and the block chain are communicatively connected;
the information entry platform is used for sending first readable address information and a first hash value of first readable address information and first verification information to the blockchain, wherein the first readable address information comprises a readable address of a target user, and the first verification information is verification information generated by the information entry platform according to the first readable address information;
the user side is used for sending the cryptology address information, the second readable address information and the second verification information to the block chain;
the block chain is used for receiving first readable address information sent by an information input platform, receiving cryptology address information, second readable address information and second verification information sent by a user side, wherein the first readable address information and a first hash value of first verification information are received; calculating a second hash value of the second readable address information and the second authentication information; judging whether the first hash value is the same as the second hash value; and if the first hash value is the same as the second hash value, establishing an association relationship between the first readable address information and the cryptographic address information.
According to the method, the device and the system for associating the address information, when a user registers an address indicating the identity of the user on a block chain, the block chain receives first readable address information sent by the user through an information entry platform and a first hash value obtained by calculating the first readable address information and first verification information, receives cryptographic address information, second readable address information and second verification information sent by the user side, obtains a second hash value by calculating the second readable address information and the second verification information, verifies whether the first readable address information and the second readable address information are the same by judging whether the first hash value and the second hash value are the same, and can confirm that the user sending the first readable address information through the information entry platform and the user sending the second readable address information through the user side are the same user when the first readable address information and the second readable address information are the same, and then, an association relation between the first readable address information and the cryptology address information distributed to the user by the block chain is established, so that the first readable address information and the cryptology address information are uniquely corresponding, the authenticity of the address which indicates the identity of the user when the user registers on the block is ensured, and the authenticity of the address which indicates the identity of the user in the block chain is further ensured.
The address information which indicates the identity and is registered on the block chain of the user can be verified, so that the problem that the address information specific to the user is registered is solved, and the authenticity of the address which indicates the identity of the user can be guaranteed.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
An embodiment of the present invention provides a method for associating address information applied to a block chain, and as shown in fig. 1, the method is a flowchart of a method for associating address information according to a first embodiment of the present invention. As can be seen from fig. 1, the method for associating address information of this embodiment includes the following steps:
s101: the method comprises the steps of receiving first readable address information sent by an information entry platform, and a first hash value of the first readable address information and first verification information, wherein the first readable address information comprises a readable address of a target user, and the first verification information is verification information generated by the information entry platform according to the first readable address information.
In this embodiment, the information entry platform may be a platform with a transaction function, such as an electronic mall, to which the blockchain technology is applied, a platform with a payment function, such as a bank, to which the blockchain technology is applied, or a platform with a communication function, such as a forum or a social software platform, to which the blockchain technology is applied. When a user registers an account representing the identity of the user on the information entry platform, the information entry platform requires the user to input first readable address information, the first readable address information comprises a user-specific address to finish verification of the validity of the identity of the user, and the user-specific address can be a mobile phone number or a mailbox of the user. After an information entry platform obtains first readable address information input by a user, first verification information is randomly generated according to the first readable address information, and the first verification information corresponds to the first readable address information one by one. The first authentication information may be an authentication code including a plurality of characters. The information entry platform calculates a first hash value of the first readable address information and the corresponding first verification information, and sends the first readable address information and the first hash value to the block chain, and at this time, the block chain performs the steps as described in step S101.
It should be noted that the hash value is a unique and extremely compact numerical representation of a piece of data, and the hash algorithm used by the information entry platform to calculate the first hash value is a hash algorithm known in the prior art, and is not specifically limited and explained here.
S102: and receiving the cryptology address information, the second readable address information and the second verification information sent by the user side, and calculating a second hash value of the second readable address information and the second verification information.
In this embodiment, the user side may be a mobile phone, a notebook, a tablet computer, or a vehicle-mounted computer, and when a user registers an account representing the user identity on an information entry platform applying a block chain technology, the user may send, to the block chain, the cryptography address information, the second readable address information, and the second verification information, where the cryptography address information is unique address information of the user in the block chain, the cryptography address information has a unique identifier for identifying the user identity, and the cryptography address information of different users in the block chain is different. Generally, the cryptographic address information is a string of unreadable characters, which has no specific meaning under normal language environment, and the identity of the user is not easily recognized, so the user usually needs to have a readable address information that can indicate the identity of the user in a blockchain and is easily recognized, and establish an association relationship between the readable address information and the cryptographic address information of the user, that is, establish a corresponding relationship between the readable address information and the cryptographic address information of the user. The second readable address information contains a user-specific address to complete the verification of the validity of the user identity, and the user-specific address may be a mobile phone number or a mailbox of the user. The second authentication information may be an authentication code including a plurality of characters. Therefore, when the user registers an account number representing the user identity in the information entry platform, the user also sends the cryptology address information, the second readable address information and the second verification information to the block chain so as to finish the authentication of the user identity.
In general, the second readable address information is the same as the first readable address information sent by the user to the information entry platform through the user side, and the second verification information is the same as the verification information generated by the information entry platform according to the first readable address information. At this time, the user who registers the account number representing the user identity in the information entry platform and the user who sends the cryptology address information, the second readable address information and the second verification information to the blockchain can be identified as the same user.
And the block chain calculates a second hash value of the second readable address information and the second verification information after receiving the cryptology address information, the second readable address information and the second verification information sent by the user side. The algorithm of the second hash value may be the same as the algorithm of the first hash value, and certainly, according to actual needs, the algorithm of the second hash value may be different from the algorithm of the first hash value.
S103: and judging whether the first hash value is the same as the second hash value.
After the second readable address information and the second hash value of the second verification information are obtained through calculation, the block chain compares the first hash value with the second hash value and judges whether the first hash value is the same as the second hash value.
S104: and if the first hash value is the same as the second hash value, establishing an association relationship between the first readable address information and the cryptographic address information.
In this embodiment, when the block chain determines that the first hash value is the same as the second hash value, that is, the second readable address information is the same as the first readable address information sent by the user to the information entry platform through the user side, and the second verification information is the same as the verification information generated by the information entry platform according to the first readable address information, the association relationship between the first readable address information and the cryptographic address information is established, that is, the first readable address information and the cryptographic address information are bound. The binding mode may be one-way correspondence between the first readable address information and the cryptographic address information, or may also be two-way correspondence between the first readable address information and the cryptographic address information, that is, the cryptographic address information may correspond to only one piece of first readable address information.
Since the cryptography address information is unique address information of the user in the blockchain, and after the first readable address information and the cryptography address information are bound, the first readable address information is also unique address information of the user in the blockchain, the unique address of the user in the first readable address information cannot be registered any more. In this way, it is achieved that the authenticity of the address indicating the identity of the user is guaranteed, i.e. the first readable address information corresponds to the identity of the user.
In the method for associating address information in this embodiment, when a user registers an address indicating the identity of the user on a blockchain, the blockchain receives first readable address information sent by the user through an information entry platform and a first hash value calculated from the first readable address information and first verification information, receives cryptographic address information, second readable address information, and second verification information sent by the user, calculates the second readable address information and the second verification information to obtain a second hash value, verifies whether the first readable address information and the second readable address information are the same by determining whether the first hash value and the second hash value are the same, and when the first readable address information and the second readable address information are the same, can confirm that the user sending the first readable address information through the information entry platform and the user sending the second readable address information through the user are the same user, and then, an association relation between the first readable address information and the cryptology address information distributed to the user by the block chain is established, so that the first readable address information and the cryptology address information are uniquely corresponding, the authenticity of the address which indicates the identity of the user when the user registers on the block is ensured, and the authenticity of the address which indicates the identity of the user in the block chain is further ensured.
As shown in fig. 2, a flowchart of a method for associating address information according to a second embodiment of the present invention is shown, and as an optional embodiment of the present invention, after step S104 in the foregoing embodiment, the method for associating address information may further include:
s205: and sending the information that the first readable address information and the cryptology address information are successfully associated to the user side.
In this way, the user can be informed of the successful association between the first readable address information and the cryptographic address information.
The method can further comprise the following steps:
s206: receiving identity identification information sent by a user side, and establishing an association relation between the identity identification information and the first readable address information as well as the cryptology address information, wherein the identity identification information comprises identification information used for representing the identity of the user.
In this embodiment, after the association relationship between the first readable address information and the cryptographic address information is established, the association relationship between the identity information and the first readable address information and the cryptographic address information may be further established. The identity information includes identification information for characterizing the identity of the user, and the identification information may be a name, a nickname, a pen name, or the like of the user, which may be another representation of the identity of the user.
Furthermore, after step S104 in the above embodiment, the method for associating address information may further include:
s207: and if the first hash value is different from the second hash value, sending information that the association between the first readable address information and the cryptology address information fails to be carried out to a user side.
Therefore, when the first readable address information and the cryptology address information are failed to be associated, the user can be timely notified, and the user can take corresponding measures in time, such as re-registration.
In the method for associating address information in this embodiment, when a user registers an address indicating the identity of the user on a blockchain, the blockchain receives first readable address information sent by the user through an information entry platform and a first hash value calculated from the first readable address information and first verification information, receives cryptographic address information, second readable address information, and second verification information sent by the user, calculates the second readable address information and the second verification information to obtain a second hash value, verifies whether the first readable address information and the second readable address information are the same by determining whether the first hash value and the second hash value are the same, and when the first readable address information and the second readable address information are the same, can confirm that the user sending the first readable address information through the information entry platform and the user sending the second readable address information through the user are the same user, and then, an association relation between the first readable address information and the cryptology address information distributed to the user by the block chain is established, so that the first readable address information and the cryptology address information are uniquely corresponding, the authenticity of the address which indicates the identity of the user when the user registers on the block is ensured, and the authenticity of the address which indicates the identity of the user in the block chain is further ensured.
In this embodiment, the first readable address information sent by the information entry platform to the block chain may be sent by the user side to the information entry platform, where the first readable address information includes an address of a target user, and after receiving the first readable address information, the information entry platform generates corresponding first verification information according to the received first readable address information, and sends the generated first verification information to the user side corresponding to the address of the target user. On the other hand, the information entry platform calculates a first hash value of the first readable address information and the first verification information, and sends the first readable address information and the first hash value to the block chain.
After receiving the first verification information sent by the information entry platform, the user side can send the first verification information as second verification information to the block chain, send the first readable address information as second address information to the block chain, and send the cryptography address information to the block chain at the same time. It should be noted that "first" and "second" are relative to the block chain. In this embodiment, the first readable address information is the same as the second address information, and the first authentication information is also the same as the second authentication information.
The method of the embodiment can ensure the consistency of the identity of the user who registers the account number representing the identity of the user in the information entry platform and the identity of the user who sends the cryptology address information, the second readable address information and the second verification information to the blockchain, namely, the identity-indicating address information registered on the blockchain by the user can be verified, so that the problem that the unique address information of the user is registered is solved, and the authenticity of the address indicating the identity of the user can be ensured.
In addition, the first readable address information sent by the receiving information entry platform and the time interval between the first readable address information and the first hash value of the first verification information and the time interval between the first readable address information and the cryptology address information, the second readable address information and the second verification information sent by the receiving user side can be preset in the block chain. When the time interval between two times of information receiving is larger than the preset time interval, whether the first hash value is the same as the second hash value is not judged, and the association relation between the first readable address information and the cryptology address information is not established. Optionally, the time of receiving the cryptographic address information, the second readable address information, and the second verification information sent by the user side may be corresponded to the time of receiving the first readable address information, and the time interval between the first readable address information and the first hash value of the first verification information exceeds the preset time interval.
Fig. 3 is a flowchart illustrating a method for associating address information according to a third embodiment of the present invention.
In this embodiment, the first verification information is generated by the information entry platform according to the first readable address information sent by the user side, and the information entry platform performs hash operation on the first readable address information and the first verification information to generate a first hash value, and sends the first readable address information and the first hash value to the block chain. And the user terminal sends second readable address information, second verification information and cryptology address information to the block chain, wherein the cryptology address information is the unique address information of the user in the block chain. And after receiving the second readable address information, the second verification information and the cryptology address information, the block chain performs hash operation on the second readable address information and the second verification information to generate a second hash value, and judges whether the first hash value is the same as the second hash value. The determination rule may be whether the first hash value and the second hash value are the same. And when the first hash value is the same as the second hash value, establishing an association relationship between the cryptographic address information and the first readable address information, that is, binding the cryptographic address information and the first readable address information, writing the bound cryptographic address information and the first readable address information into one block (block n as shown in the figure) in the block chain, and synchronizing the bound cryptographic address information and the first readable address information into other information entry platforms through a peer-to-peer network. Therefore, the situation that other users bind own cryptology address information with the first readable address information provided by the previous user is avoided, the problem that the specific address information of the user is registered is solved, and the authenticity of the address indicating the identity of the user can be guaranteed.
Fig. 4 is a block diagram showing an apparatus for associating address information according to a fourth embodiment of the present invention. In this embodiment, an apparatus for applying address information associated with a block chain includes:
the information receiving unit 301 is configured to receive first readable address information sent by an information entry platform, and a first hash value of the first readable address information and first verification information, where the first verification information is verification information generated by the information entry platform according to the first readable address information; receiving the cryptology address information, the second readable address information and the second verification information sent by a user side, and calculating a second hash value of the second readable address information and the second verification information;
an information verification unit 302, configured to determine whether the first hash value is the same as the second hash value;
a task executing unit 303, configured to establish an association relationship between the first readable address information and the cryptographic address information if the first hash value is the same as the second hash value.
Fig. 5 is a block diagram showing an apparatus for associating address information according to a fourth embodiment of the present invention. As an optional embodiment of the present invention, in the apparatus for associating address information in the foregoing embodiment, the apparatus further includes: an information sending unit 304, configured to send, to the user side, information that the association between the first readable address information and the cryptographic address information is successful.
As an optional embodiment of the present invention, the information receiving unit 301 is further configured to receive identity information sent by a user, and after the information receiving unit 301 receives the identity information sent by the user, the task executing unit 303 is further configured to establish an association relationship between the identity information and the first readable address information and the cryptography address information.
As an optional embodiment of the present invention, the information sending 304 unit is further configured to:
and if the first hash value is different from the second hash value, sending information that the association between the first readable address information and the cryptology address information fails to be carried out to a user side.
As an alternative embodiment of the invention, said first readable address information comprises an address of a target user.
As an optional embodiment of the present invention, the address of the target user includes a mailbox address of the target user or a mobile phone number of the target user.
As an optional embodiment of the present invention, the second authentication information is the same as the first authentication information.
The apparatus for associating address information in the embodiment of the present invention can determine the same technical effect as the method for associating address information in the foregoing embodiment of the present invention, and details are not described here.
Fig. 6 is a block diagram showing a system for associating address information according to a sixth embodiment of the present invention. In this embodiment, the system for associating address information includes: the system comprises an information entry platform 601, a user terminal 602 and a blockchain 603, wherein the information entry platform 601, the user terminal 602 and the blockchain 603 are in communication connection.
The information entry platform 601 is configured to send first readable address information to the blockchain 603, and a first hash value of the first readable address information and first verification information, where the first readable address information includes a readable address of a target user, and the first verification information is verification information generated by the information entry platform 601 according to the first readable address information;
in addition, the information entry platform 601 may be further configured to send the first verification information to the user terminal 602.
The user side 602 is configured to send cryptographic address information, second readable address information, and second verification information to the blockchain 603, and may also be configured to receive first verification information sent by the information entry platform 601. The second verification information sent by the user side 602 to the blockchain 603 may be the received first verification information sent by the information entry platform 601.
The block chain 603 is configured to receive first readable address information sent by the information entry platform 601, a first hash value of the first readable address information and first verification information, and receive cryptographic address information, second readable address information, and second verification information sent by the user side 602. Calculating a second hash value of the second readable address information and the second authentication information; judging whether the first hash value is the same as the second hash value; and if the first hash value is the same as the second hash value, establishing an association relationship between the first readable address information and the cryptographic address information.
The system for associating address information in this embodiment can achieve the same technical effects as those of the above method and apparatus embodiments, and is not described herein again.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
It will be appreciated that the relevant features of the method and apparatus described above are referred to one another. In addition, "first", "second", and the like in the above embodiments are for distinguishing the embodiments, and do not represent merits of the embodiments.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components of the method, apparatus and system for verifying the correctness of blockchain transaction information in accordance with embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.