CN116797691A - Hash code-based image generation method and related equipment - Google Patents

Hash code-based image generation method and related equipment Download PDF

Info

Publication number
CN116797691A
CN116797691A CN202211730398.5A CN202211730398A CN116797691A CN 116797691 A CN116797691 A CN 116797691A CN 202211730398 A CN202211730398 A CN 202211730398A CN 116797691 A CN116797691 A CN 116797691A
Authority
CN
China
Prior art keywords
hash code
target
image
target hash
code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211730398.5A
Other languages
Chinese (zh)
Inventor
徐文彬
屈黎黎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ant Blockchain Technology Shanghai Co Ltd
Original Assignee
Ant Blockchain Technology Shanghai Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ant Blockchain Technology Shanghai Co Ltd filed Critical Ant Blockchain Technology Shanghai Co Ltd
Priority to CN202211730398.5A priority Critical patent/CN116797691A/en
Publication of CN116797691A publication Critical patent/CN116797691A/en
Pending legal-status Critical Current

Links

Abstract

The specification provides an image generation method based on hash codes and related equipment, which are applied to a blockchain client. The method comprises the following steps: acquiring a target hash code to be displayed; generating a hash code image corresponding to the target hash code based on the target hash code; the hash code image comprises a target character string corresponding to the target hash code and image textures for anti-counterfeiting aiming at the target hash code; the target character string comprises at least part of characters in the target hash code; and outputting and displaying the hash code image through a first interface.

Description

Hash code-based image generation method and related equipment
Technical Field
One or more embodiments of the present disclosure relate to the field of blockchain technologies, and in particular, to a hash code-based image generating method and related devices.
Background
Blockchain technology, also known as distributed ledger technology, is an emerging technology that is commonly engaged in "accounting" by several computing devices, together maintaining a complete distributed database. Hash codes are representative technical elements in a blockchain, and are mark elements representing the technical characteristic that the blockchain cannot be tampered with. However, the hash code is simply a nonsensical string, which is difficult for an ordinary user to understand and distinguish, and when the user uses the blockchain client, various interaction experiences for the hash code are often poor.
Disclosure of Invention
In view of this, one or more embodiments of the present disclosure provide a hash code-based image generation method and related apparatus.
To achieve the above object, one or more embodiments of the present disclosure provide a hash code-based image generation method applied to a blockchain client; the method comprises the following steps:
acquiring a target hash code to be displayed;
generating a hash code image corresponding to the target hash code based on the target hash code; the hash code image comprises a target character string corresponding to the target hash code and image textures for anti-counterfeiting aiming at the target hash code; the target character string comprises at least part of characters in the target hash code;
and outputting and displaying the hash code image through a first interface.
In a further illustrated embodiment, the outputting and displaying the hash code image through the first interface includes:
generating a hash code interaction control, wherein the hash code interaction control comprises the hash code image;
and outputting and displaying the hash code interaction control through the first interface.
In yet another illustrated embodiment, the generating, based on the target hash code, a hash code image corresponding to the target hash code includes:
Generating the target character string based on the target hash code and a preset character string arrangement rule;
dividing the target hash code into a plurality of groups of character strings, and mapping character contents corresponding to the plurality of groups of character strings into values of a plurality of groups of characteristic parameters corresponding to the image textures respectively;
and performing visual rendering based on the plurality of groups of characteristic parameters, generating the image texture, and fusing the image texture and the target character string to obtain the hash code image.
In still another illustrated embodiment, the generating the target string based on the target hash code and a preset string arrangement rule includes:
based on the preset character string arrangement rule, arranging at least part of characters in the target hash code into P rows of character strings to obtain the target character strings; wherein each row of character strings comprises M character string groups, each character string group comprises N characters, and the character string groups are separated by the width of K characters.
In yet another illustrated embodiment, if the target string includes a portion of the characters in the target hash code, at least one abbreviation is also included in the target string.
In a further illustrated embodiment, the image texture is a ripple-like image texture; the plurality of sets of characteristic parameters corresponding to the image texture include one or more of the following illustrated characteristic parameters: the starting point color, the ending point color, the color gradual change starting point, the ripple quantity, the ripple width, the ripple amplitude, the ripple frequency and the ripple angle of the ripple.
In yet another illustrated embodiment, fusing the image texture with the target string includes: and overlaying the image texture on the target character string to fuse with the target character string.
In a further illustrated embodiment, the color of the character in the target character string that is covered by the image texture is different from the original color of the character.
In a further illustrated embodiment, the color of the character in the target character string that is covered by the image texture is the inverse of the original color of the character.
In a further illustrated embodiment, the method further comprises:
and in response to a first trigger operation of a user on the hash code interaction control, copying the target hash code, and executing interaction operation corresponding to the target hash code based on the copied target hash code.
In yet another illustrated embodiment, the blockchain client is a blockchain wallet client; the target hash code comprises a hash code corresponding to an account address of a blockchain account on the blockchain; the interactive operation comprises an interactive operation of inquiring the target hash code;
the copying the target hash code and executing the interactive operation corresponding to the target hash code based on the copied target hash code, including:
copying a URL address used for inquiring the target hash code, and outputting and displaying the target hash code through a second interface; wherein the URL address includes the target hash code; the second interface further comprises a jump control;
responding to the triggering operation of a user for the jump control, and initiating a page access request to the copied URL address; wherein the page access request includes the target hash code as a query parameter; the method comprises the steps of,
and jumping to a third interface corresponding to the URL address, and outputting a query result corresponding to the page access request through the third interface.
In yet another illustrated embodiment, the blockchain client is a blockchain browser; the interactive operation comprises an interactive operation of inquiring the target hash code;
The copying the target hash code and executing the interactive operation corresponding to the target hash code based on the copied target hash code, including:
copying a URL address for inquiring the target hash code; wherein the URL address includes the target hash code;
initiating a page access request to the copied URL address; wherein the page access request includes the target hash code as a query parameter; the method comprises the steps of,
and jumping to a fourth interface corresponding to the URL address, and outputting a query result corresponding to the page access request through the fourth interface.
In yet another illustrated embodiment, the blockchain client is a blockchain asset management client; the target hash code includes a hash code corresponding to an asset address of a blockchain asset on a blockchain; the interactive operation includes an asset management operation for a target asset object corresponding to the target hash code.
In a further illustrated embodiment, further comprising:
responding to a second triggering operation of a user for the hash code interaction control, sending the target hash code and the hash code image to a server, generating a corresponding target image by the server according to the target hash code, and checking whether the generated target image is identical to the hash code image;
If the target image is the same as the hash code image, receiving a first message sent by the server, wherein the first message is used for indicating that the target hash code is not tampered;
and if the target image is different from the hash code image, receiving a second message sent by the server, wherein the second message is used for indicating that the target hash code has been tampered.
In a further illustrated embodiment, further comprising:
generating a graphic code corresponding to the target hash code based on the target hash code;
and outputting and displaying the graphic code through a code scanning interface, so that a scanning client can obtain the target hash code through scanning and analyzing the graphic code, and executing interactive operation corresponding to the target hash code based on the obtained target hash code.
In yet another illustrated embodiment, the output presentation of the hash code interaction control through the first interface includes:
and outputting and displaying the hash code interaction control through the first interface, and outputting a prompt icon at a position corresponding to the hash code interaction control 5 pieces, wherein the prompt icon is used for prompting a user about the interaction mode of the hash code interaction control.
Accordingly, the present disclosure further provides an image generating apparatus based on hash codes, applied to a blockchain client, including:
the 0 acquisition unit is used for acquiring a target hash code to be displayed;
the generation unit is used for generating a hash code image corresponding to the target hash code based on the target hash code; the hash code image comprises a target character string corresponding to the target hash code and image textures for anti-counterfeiting aiming at the target hash code; the target character string comprises at least part of characters in the target hash code;
and the display unit is used for outputting and displaying the hash code image through a first interface.
5 in a further illustrated embodiment, the display unit is specifically configured to:
generating a hash code interaction control, wherein the hash code interaction control comprises the hash code image;
and outputting and displaying the hash code interaction control through the first interface.
In a further illustrated embodiment, the generating unit is specifically configured to:
generating the target character string based on the target hash code and a preset character string arrangement rule; 0 dividing the target hash code into a plurality of groups of character strings, and respectively mapping the character contents corresponding to the character strings
Shooting values of a plurality of groups of characteristic parameters corresponding to the image textures;
and performing visual rendering based on the plurality of groups of characteristic parameters, generating the image texture, and fusing the image texture and the target character string to obtain the hash code image.
In a further illustrated embodiment, the generating unit is specifically configured to: 5, based on the preset character string arrangement rule, arranging at least part of characters in the target hash code into P rows of character strings to obtain the target character strings; wherein each row of character strings comprises M character string groups, each character string group comprises N characters, and the character string groups are separated by the width of K characters.
In yet another illustrated embodiment, if the target string includes a portion of the characters in the target hash code, at least one abbreviation is also included in the target string.
0 in a further illustrated embodiment, the image texture is a ripple-like image texture; texture with the image
The corresponding sets of characteristic parameters include one or more of the following: the starting point color, the ending point color, the color gradual change starting point, the ripple quantity, the ripple width, the ripple amplitude, the ripple frequency and the ripple angle of the ripple.
In a further illustrated embodiment, the generating unit is specifically configured to overlay the image texture on the target string to fuse with the target string.
In a further illustrated embodiment, the color of the character in the target character string that is covered by the image texture is different from the original color of the character.
In a further illustrated embodiment, the color of the character in the target character string that is covered by the image texture is the inverse of the original color of the character.
In a further illustrated embodiment, the apparatus further comprises an interaction unit for:
and in response to a first trigger operation of a user on the hash code interaction control, copying the target hash code, and executing interaction operation corresponding to the target hash code based on the copied target hash code.
In yet another illustrated embodiment, the blockchain client is a blockchain wallet client; the target hash code comprises a hash code corresponding to an account address of a blockchain account on the blockchain; the interactive operation comprises an interactive operation of inquiring the target hash code;
the interaction unit is specifically configured to:
Copying a URL address used for inquiring the target hash code, and outputting and displaying the target hash code through a second interface; wherein the URL address includes the target hash code; the second interface further comprises a jump control;
responding to the triggering operation of a user for the jump control, and initiating a page access request to the copied URL address; wherein the page access request includes the target hash code as a query parameter; the method comprises the steps of,
and jumping to a third interface corresponding to the URL address, and outputting a query result corresponding to the page access request through the third interface.
In yet another illustrated embodiment, the blockchain client is a blockchain browser; the interactive operation comprises an interactive operation of inquiring the target hash code;
the interaction unit is specifically configured to:
copying a URL address for inquiring the target hash code; wherein the URL address includes the target hash code;
initiating a page access request to the copied URL address; wherein the page access request includes the target hash code as a query parameter; the method comprises the steps of,
and jumping to a fourth interface corresponding to the URL address, and outputting a query result corresponding to the page access request through the fourth interface.
In yet another illustrated embodiment, the blockchain client is a blockchain asset management client; the target hash code includes a hash code corresponding to an asset address of a blockchain asset on a blockchain; the interactive operation includes an asset management operation for a target asset object corresponding to the target hash code.
In a further illustrated embodiment, the apparatus further comprises a verification unit for:
responding to a second triggering operation of a user for the hash code interaction control, sending the target hash code and the hash code image to a server, generating a corresponding target image by the server according to the target hash code, and checking whether the generated target image is identical to the hash code image;
if the target image is the same as the hash code image, receiving a first message sent by the server, wherein the first message is used for indicating that the target hash code is not tampered;
and if the target image is different from the hash code image, receiving a second message sent by the server, wherein the second message is used for indicating that the target hash code has been tampered.
In a further embodiment which is shown in the figures,
The generating unit is further used for generating a graphic code corresponding to the target hash code based on the target hash code;
the display unit is further configured to output and display the graphic code through a code scanning interface, so that the scanning client scans and parses the graphic code to obtain the target hash code, and execute an interactive operation corresponding to the target hash code based on the obtained target hash code.
In a further illustrated embodiment, the display unit is further configured to:
and outputting and displaying the hash code interaction control through the first interface, and outputting a prompt icon at a position corresponding to the hash code interaction control, wherein the prompt icon is used for prompting a user about the interaction mode of the hash code interaction control.
Correspondingly, the specification also provides a terminal device, which comprises: a memory and a processor; the memory has stored thereon a computer program executable by the processor; the processor executes the image generation method based on the hash code according to the above embodiments when executing the computer program.
Accordingly, the present specification also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the hash code-based image generation method according to the above embodiments.
In summary, the technical solution provided in the present disclosure is to display a hash code to a user in the form of an image, where the hash code image includes not only a character string in the hash code, but also an image texture generated based on the hash code and having uniqueness. Therefore, the technical scheme provided by the specification not only improves the identification degree of the hash code, thereby improving the visual experience of a user when browsing the hash code, but also adds anti-counterfeiting guarantee for the hash code, thereby effectively guaranteeing the account safety and property safety of the user on the blockchain.
In addition, in the technical scheme provided by the specification, different interaction modes aiming at hash codes can be provided for users aiming at different blockchain clients (such as a blockchain wallet client, a blockchain browser and a blockchain asset management client), so that different functions can be realized according to the interaction operation of the users, different contents can be displayed, the actual use requirements of the users in various scenes can be flexibly met, and the use experience of the users can be remarkably improved.
Drawings
FIG. 1 is a schematic diagram of a hash code representation in a blockchain wallet, provided in an exemplary embodiment;
FIG. 2 is a schematic diagram of a hash code representation in a blockchain browser in accordance with an exemplary embodiment;
FIG. 3 is a flow chart of a hash code based image generation method according to an exemplary embodiment;
FIG. 4 is a schematic diagram of a method for generating image textures according to an exemplary embodiment;
FIGS. 5 a-5 e are schematic illustrations of a set of hash code images provided by an exemplary embodiment;
FIG. 6 is a schematic diagram of an interactive interface provided by an exemplary embodiment;
FIG. 7 is a schematic diagram of another interactive interface provided by an exemplary embodiment;
FIG. 8 is a flow chart of a method for hash code verification according to an exemplary embodiment;
FIG. 9 is an interface diagram of a hash code verification result provided by an exemplary embodiment;
fig. 10 is a schematic structural diagram of an image generating apparatus based on hash codes according to an exemplary embodiment;
fig. 11 is a schematic structural diagram of a terminal device according to an exemplary embodiment.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of the present specification. Rather, they are merely examples of apparatus and methods consistent with aspects of one or more embodiments of the present description as detailed in the accompanying claims.
It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the method may include more or fewer steps than described in this specification. Furthermore, individual steps described in this specification, in other embodiments, may be described as being split into multiple steps; while various steps described in this specification may be combined into a single step in other embodiments.
First, some terms in the present specification are explained for the convenience of understanding by those skilled in the art.
(1) Blockchains are an advanced database mechanism that allows information to be shared transparently in an enterprise network. The blockchain database stores data in blocks, and the databases are linked together into a chain. The data is consistent in time because any user cannot delete or modify the chain without network consensus. Thus, using blockchain technology, an unalterable ledger may be created to track orders, payments, accounts, and other transactions.
(2) The hash code is an encoding form used for recording data content in the blockchain, is a digital fingerprint which can be created from any data, and can comprise the hash code corresponding to any storage object on the blockchain and also can comprise the hash code corresponding to the data stored on the blockchain. The hash code is actually a string of characters, which may typically comprise 64-bit characters.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating a hash code display manner in a blockchain wallet according to an exemplary embodiment. As shown in fig. 1, in a blockchain wallet client (such as MetaMask), it is often achieved to present the corresponding hash code in a smaller display area by shrinking several characters in the hash code, for example, "ox22 c..5ef 0" as shown in fig. 1.
Referring to fig. 2, fig. 2 is a schematic diagram illustrating a hash code display manner in a blockchain browser according to an exemplary embodiment. As shown in fig. 2, in a blockchain browser (such as an ETH browser like etherscan), the hash code is also shown in a smaller display area by a number of strings in the abbreviated hash code, for example, "0xc49b5906bd219eb3a9.," 0x8f8221afbb33998d858., "ox0778b6c64118.," as shown in fig. 2, and so on.
As shown in fig. 1 and fig. 2, the conventional hash code has a single presentation form, and when the hash code and other information are presented together, the hash code lacks identification, so that the user is hard to distinguish, and when a plurality of characters in front of and behind two hash codes are identical, the hash code presented after the middle character string is abbreviated has no uniqueness, and potential safety hazard exists. Therefore, in order to optimize the expression form of the hash code in the blockchain application and improve the use experience of a user, the present specification provides an image generation method based on the hash code, which can be applied to various blockchain applications operated by terminal equipment.
Referring to fig. 3, fig. 3 is a flowchart of an image generating method based on hash codes according to an exemplary embodiment. As shown in fig. 3, the method can be applied to a blockchain client operated by a terminal device. The terminal device may be, for example, a smart wearable device, a smart phone, a tablet computer, a notebook computer, a desktop computer, an on-board computer, a server with a display, etc., which is not particularly limited in this specification. As shown in fig. 3, the method may specifically include the following steps S101 to S103.
Step S101, obtaining a target hash code to be displayed.
Specifically, the terminal device obtains a target hash code to be displayed. The target hash code may be a hash code corresponding to any storage object on the blockchain, or may be a hash code corresponding to data stored on the blockchain. Illustratively, the target hash code may include a hash code corresponding to an account address of a blockchain account on the blockchain.
Optionally, the terminal device may receive the target hash code sent by the server, so as to obtain the target hash code to be displayed. Optionally, the target hash code may also be stored locally at the terminal device, and the terminal device may directly read the target hash code from its memory.
Step S102, generating a hash code image corresponding to the target hash code based on the target hash code; the hash code image comprises a target character string corresponding to the target hash code and image textures for anti-counterfeiting aiming at the target hash code.
Specifically, the terminal device generates a hash code image corresponding to the target hash code based on the target hash code. The hash code image comprises a target character string corresponding to a target hash code and image textures for anti-counterfeiting aiming at the target hash code. Wherein the target string may include at least a portion of the characters in the target hash code. By way of example, the target hash code may be a 64-bit hash code, i.e., including 64 characters, and then the target hash code may include 8 characters, 24 characters, 28 characters, 32 characters, or 64 characters, among others, which are not specifically limited in this specification.
Alternatively, the terminal device may arrange at least part of the characters in the target hash code into P-line character strings based on a preset character string arrangement rule, so as to obtain the target character strings. Wherein each of the P rows of strings includes M string groups, each string group including N characters, each string group being spaced apart by a width of K characters. Wherein P, M, N, K is an integer greater than or equal to 1. Optionally, if the target character string includes only a part of characters in the target hash code, the target character string further includes at least one abbreviation. For example, if the target hash code includes 64 characters in total, and the target character string includes only 28 characters in the target hash code, the 36 characters that are not displayed in the target hash code may be represented by an elision in the target character string, so as to reduce the display area occupied by displaying the hash code as much as possible.
Alternatively, the terminal device may divide the target hash code into a plurality of sets of character strings, and map the character contents corresponding to the plurality of sets of character strings to values of a plurality of sets of feature parameters corresponding to the image textures, respectively. And then, the terminal equipment performs visual rendering based on the plurality of groups of characteristic parameters to generate corresponding image textures. Finally, the terminal equipment can fuse the image texture with the target character string to obtain a hash code image corresponding to the target hash code.
Note that, in this specification, the order of generating the target character string and the image texture is not particularly limited.
Referring to fig. 4, fig. 4 is a schematic diagram of a method for generating an image texture according to an exemplary embodiment. The generation process of the hash code image provided in the present specification will be further exemplified with reference to fig. 4. As shown in fig. 4, the target hash code to be displayed is "6ae481d112642d85f5a3159494e251e75 edd 20ce1f5c00eddb0ae9e45b30a36", for a total of 64 characters. As shown in fig. 4, the terminal device divides the 64-bit target hash code into 8 groups of character strings, each group of character strings includes 8 characters, and maps the character content corresponding to each of the 8 groups of character strings into values of 8 groups of characteristic parameters corresponding to the image textures. As shown in fig. 4, the image texture may be a moire-shaped image texture, and correspondingly, the 8 sets of characteristic parameters may be a moire start point color, a moire end point color, a color gradation start point, a moire number, a moire width, a moire amplitude, a moire frequency, and a moire bias, respectively.
As shown in fig. 4, the 1 st group of strings "6ae481d1" in the target hash code may be mapped to the values of the ripple start color based on the corresponding calculation rule, for example, the values of three parameters including RGB. The group 2 string "12642d85" may be mapped to a value of the ripple start color, for example, including values of three parameters of RGB. The 3 rd set of strings "f5a31594" may be mapped to values of the color gradation start point, including, for example, values of coordinates (x, y) in the display area. The 4 th set of strings "94e251e7" may be mapped to a value of the number of waves, including, for example, a value of the number of waves corresponding to each row of strings. The 5 th group of strings "5eded20c" may be mapped to a value of the width of the ripple, where the width of each ripple may be the same or different. The 6 th set of strings "e1f5c00e" can be mapped to values of ripple amplitude. The 7 th group string "ddb0ae9e" can be mapped to a value of the ripple frequency. The 8 th set of strings "45b30a36" may be mapped to values of the corrugation bias, including for example values of the corrugation tilt angle, which in fig. 4 is exemplified by horizontal 0 °, in some possible embodiments may also be 30 °, 45 ° or 120 °, etc.
Alternatively, the feature parameters of the image texture may contain more or less feature parameters than the 8 sets of feature parameters described above. For example, the terminal device divides the 64-bit target hash code into 6 sets of character strings, wherein 4 sets of character strings contain 8 characters and 2 sets of character strings contain 16 characters. The terminal device may map the character content corresponding to each of the 6 sets of character strings to values of 6 sets of characteristic parameters (including, for example, a ripple start point color, a ripple end point color, a ripple number, a ripple width, a ripple amplitude, and a ripple bias) corresponding to the image texture, and the like, which may be specifically set according to actual requirements, and this description is not limited specifically.
As shown in fig. 4, the terminal device may perform visual rendering based on the multiple sets of feature parameters, generate a corresponding image texture, and fuse the generated image texture with a target character string, so as to finally obtain a hash code image corresponding to the target hash code. As shown in fig. 4, the terminal device may overlay the image texture over the target string to fuse with the target string. Alternatively, the color of the character in the target string covered by the image texture may be different from the original color of the character. The color of the character in the target string covered by the image texture may be, for example, the inverse of the original color of the character.
Alternatively, when fusing the generated image texture with the target character string, the image texture may be placed at the bottom of the target character string to be fused with the target character string. Alternatively, the image texture may be spliced with the target character string in a left-right or up-down manner, so as to be fused with the target character string, and the like, which is not specifically described in the present specification.
As an example, a hash code image as shown in fig. 4, in which a target character string includes 2 rows of character strings, each row of character strings includes 4 character string groups, each character string group includes 4 characters, each character string group is separated by a width of 1 character, and 4 abbreviations are included in the target character string. The image texture is in a ripple shape, each row of character strings is correspondingly covered with three ripples, the color of each ripple is a gradient color, the color of each ripple can be a gradient pattern of a laser effect, and the color of a part covered by the ripple in the character is the inverse color of the original color.
In summary, the present specification presents a hash code to a user in the form of an image, and the hash code image includes not only a character string in the hash code but also an image texture generated based on the hash code and having uniqueness. The hash code and the anti-counterfeiting mark are combined, and the unique visual form is given to the hash code through the display form of the image, so that the hash code is not a meaningless string of character strings but an image with an anti-counterfeiting code-like effect on visual presentation, and has uniqueness. Therefore, the technical scheme provided by the specification not only improves the identification degree of the hash code, thereby improving the visual experience of a user when browsing the hash code, but also adds anti-counterfeiting guarantee for the hash code, and further effectively guaranteeing the property safety of the user on the blockchain.
Referring to fig. 5 a-5 e, fig. 5 a-5 e are schematic diagrams of a set of hash code images provided by an exemplary embodiment. Various possible aspects of the hash code image provided in this specification will be illustrated in connection with fig. 5 a-5 e.
The hash image as shown in fig. 5a, wherein the target character string includes 2 rows of character strings, each row of character string includes 4 character string groups, each character string group includes 4 characters, each character string group is separated by a width of 1 character, and 4 eligibles are included in the target character string, the eligibility being an ellipsis. The image texture is in a ripple shape, each row of character strings is correspondingly covered with three ripples, the color of each ripple is a gradual change color, and the color of the part covered by the ripple in the character is the inverse color of the original color.
As shown in the hash code image of fig. 5b, wherein the target character string includes 1 line of character strings, the 1 line of character strings includes 2 character string groups each including 8 characters, each of the character string groups is separated by a width of 1 character, and 4 elision symbols are included in the target character string, the elision symbols being ellipses. The image texture is in a ripple shape, each row of character strings is correspondingly covered with three ripples, the color of each ripple is a gradient color, the color of each ripple can be a gradient pattern of a laser effect, and the color of a part covered by the ripple in the character is the inverse color of the original color.
As shown in fig. 5c, the hash code image is shown, in which the target string includes 2 rows of strings, each row of strings includes 8 string groups, each string group includes 4 characters, and each string group is separated by a width of 1 character, and it is apparent that the target string includes all the characters in the target hash code. The image texture is in a ripple shape, each row of character strings is correspondingly covered with three ripples, the color of each ripple is a gradient color, the color of each ripple can be a gradient pattern of a laser effect, and the color of a part covered by the ripple in the character is the inverse color of the original color.
As shown in fig. 5d, the hash code image is shown, in which the target string includes 4 rows of strings, each row of strings includes 4 string groups, each string group includes 4 characters, and each string group is separated by a width of 1 character, and it is apparent that the target string includes all the characters in the target hash code. The image texture is in a ripple shape, each row of character strings is correspondingly covered with three ripples, the color of each ripple is a gradient color, the color of each ripple can be a gradient pattern of a laser effect, and the color of a part covered by the ripple in the character is the inverse color of the original color.
The hash code image shown in fig. 5e has the same arrangement of the target character strings as in fig. 5a, but the character colors of the target character strings and the colors of the corrugations are reversed.
It should be understood that fig. 5 a-5 e are only exemplary, and in some possible embodiments, further forms of hash code images may be included, for example, the abbreviations in the target strings may be asterisks or hash marks (#), the number of corrugations corresponding to each row of strings may be 4 or 2, the color of the corrugations may be solid, and the color of each corrugation may be different. In addition, the image texture may be an image texture in the form of a straight line, a dotted line, or an arc line, or may be an image texture in the form of various pattern combinations or characters, or the like, in addition to the moire, which is not particularly limited in the present specification.
And step S103, outputting and displaying the hash code image through a first interface.
Specifically, the terminal equipment generates a hash code interaction control, the hash code interaction control comprises a hash code image, and the hash code interaction control is output and displayed through a first interface.
Referring to fig. 6, fig. 6 is a schematic diagram of an interactive interface according to an exemplary embodiment. As shown in fig. 6, the terminal device displays a first interface 601, the first interface 601 comprising a hash interaction control 602, the hash interaction control 602 comprising a hash image. Optionally, as shown in fig. 6, a corresponding prompt icon 603 may also be output at a position corresponding to the hash code interaction control 602, where the prompt icon 603 may be used to prompt the user about the interaction manner of the hash code interaction control 602, for example, to prompt that the hash code may be copied. Alternatively, the prompt icon 603 may be located above the hash-code interaction control 602, or may be located below, left or right of the hash-code interaction control 602, or the like, which is not specifically limited in this specification.
Alternatively, the terminal device may copy the target hash code in response to a corresponding trigger operation of the user on the hash code interaction control 602, and perform an interaction operation corresponding to the target hash code based on the copied target hash code.
As shown in fig. 6, the blockchain client may be a blockchain wallet client, and the target hash code may include a hash code corresponding to an account address of a blockchain account on the blockchain, and the interoperation may include an interoperation to query the target hash code. Specifically, in response to the first trigger operation 604 of the user on the hash code interaction control 602 (for example, to click on the hash code interaction control 602), the terminal device copies a uniform resource locator (Universal Resource Locator, URL) address for querying the target hash code, and outputs and displays the target hash code through the second interface. The URL address comprises a target hash code, and is an address in the blockchain browser. It should be appreciated that a blockchain browser is a tool that provides a user with a view of all information about the querying blockchain, including querying the user for a hash code associated with the blockchain, such as a hash code corresponding to an account address of a blockchain account. The user may be a developer, a coin holder, a DApp user, a supervisor, and possibly other people interested in the blockchain, etc., as this specification is not specifically limited. Illustratively, the URL address may be "https:// etherscan.io/tx/0x6ae481d112642d85f5a3159494e251e75 ed20ce1f5c00eddb0ae9e45b30a36", where "0x6ae481d112642d85f5a3159494e251e75 ed20ce1f5c00eddb0ae9e45b30a36" is the target hash code.
Referring to fig. 7, fig. 7 is a schematic diagram of another interactive interface according to an exemplary embodiment. As shown in fig. 7, the terminal device displays a second interface 605, where the second interface 605 includes a popup window, and the popup window includes the target hash code, the skip control 606, and the corresponding prompt information. The terminal device may initiate a page access request to the copied URL address in response to a triggering operation 607 of the user on the jump control 606 (e.g., to click on the jump control 606), wherein the page access request includes the target hash code as a query parameter. Accordingly, the terminal device jumps from the second interface 605 to a third interface (not shown in the figure) corresponding to the URL address, and outputs a query result corresponding to the page access request through the third interface. Therefore, the query requirement of the user on the hash code is rapidly and conveniently met, and the use experience of the user is remarkably improved.
Alternatively, based on the user's different needs, the user may choose not to click on the jump control 606, but rather run a corresponding blockchain browser through the terminal device, paste the URL address just copied into the clipboard in the blockchain browser, initiate a page access request to the URL address, and so on.
Optionally, the prompt icon 603 shown in fig. 6 may also be a control, the terminal device may copy the target hash code in response to a click operation performed by the user on the prompt icon 603, or directly copy a URL address used for querying the target hash code, and may subsequently run a corresponding blockchain browser through the terminal device, paste the URL address just copied into the clipboard in the blockchain browser, initiate a page access request to the URL address, and so on.
Alternatively, the blockchain client may be a blockchain browser, and the interaction may include an interaction that queries the target hash code. Specifically, the terminal device copies the URL address for querying the target hash code in response to a first trigger operation 604 of the user for the hash code interaction control 602 (e.g., to click on the hash code interaction control 602). Wherein the URL address includes a target hash code. And the terminal equipment initiates a page access request to the copied URL address, wherein the page access request comprises the target hash code as a query parameter. Accordingly, the terminal device jumps from the first interface 601 to a fourth interface (not shown in the figure) corresponding to the URL address, and outputs a query result corresponding to the page access request through the fourth interface.
Alternatively, the blockchain client may be a blockchain asset management client, and the target hash code may include a hash code corresponding to an asset address of a blockchain asset on the blockchain. The interaction may include an asset management operation for a target asset object corresponding to the target hash code. By way of example, the asset management operations may include transfer, transfer of assets, and any other possible operations, among others.
In summary, the application aims at different types of blockchain clients (such as a blockchain wallet client, a blockchain browser, a blockchain asset management client and the like), can provide different interaction modes aiming at hash codes for users, so as to realize different functions according to the interaction operation of the users and display different contents, thereby flexibly meeting the actual use requirements of the users in various scenes and obviously improving the use experience of the users.
Further, in addition to the above-described hash code images shown in fig. 4 to 7, the terminal device may generate a graphic code corresponding to the target hash code based on the target hash code. The image code may be, for example, a bar code or a two-dimensional code, etc. Correspondingly, the terminal equipment can output and display the graphic code through a corresponding code scanning interface so as to obtain the target hash code by scanning and analyzing the graphic code by the scanning client, and execute interaction operation corresponding to the target hash code based on the obtained target hash code. By way of example, the user may scan the two-dimensional code corresponding to the target hash code through the scanning client running on the terminal device, obtain the target hash code and access the corresponding URL address, etc., so that the user may more directly and quickly implement the hash code query.
Further, in order to reduce the possibility of tampering the hash code and ensure account security and property security on the user blockchain, the specification also provides a method for verifying authenticity of the hash code. Referring to fig. 8, fig. 8 is a flowchart illustrating a method for verifying a hash code according to an exemplary embodiment. As shown in fig. 8, the method includes the following steps S201 to S205.
In step S201, the terminal device sends the target hash code and the hash code image to the server in response to the second trigger operation of the user on the hash code interaction control.
Specifically, taking the interactive interface shown in fig. 6 as an example, the terminal device sends the target hash code and the hash code image to the server in response to the second trigger operation of the user on the hash code interactive control 602. The server may be one server, or may be a server cluster formed by a plurality of servers.
Alternatively, the second triggering operation may be, for example, a double-click hash interaction control 602 or a long-press hash interaction control 602, or the like. Optionally, the second triggering operation may be the same as the first triggering operation, that is, when the user clicks the hash interaction control 602 to perform the hash query, the target hash and the hash image are sent to the server to timely verify the authenticity of the current target hash.
In step S202, the server generates a corresponding target image according to the target hash code.
Specifically, the server receives a target hash code and a hash code image sent by the terminal device, and generates a target image corresponding to the target hash code based on the image generation method based on the hash code provided by the specification.
In step S203, the server checks whether the generated target image is identical to the hash code image.
Specifically, the server checks whether the generated target image is identical to the received hash code image, if the target image is identical to the hash code image, step S204 is executed, and if the target image is different from the hash code image, step S205 is executed.
In step S204, the terminal device receives a first message sent by the server, where the first message is used to indicate that the target hash code is not tampered.
Specifically, if the server side compares the target image with the hash code image, a first message is sent to the terminal equipment, and the terminal equipment receives the first message correspondingly. The first message is used for indicating that the current target hash code is not tampered with.
In step S205, the terminal device receives a second message sent by the server, where the second message is used to indicate that the target hash code has been tampered with.
Specifically, if the server side compares the target image with the hash code image, a second message is sent to the terminal device, and the terminal device receives the second message correspondingly. The second message is used for indicating that the current target hash code has been tampered with, or that the current target hash code is a hash code obtained after the correct hash code has been tampered with.
Referring to fig. 9, fig. 9 is an interface diagram of a hash check result according to an exemplary embodiment. As shown in fig. 9, after the terminal device receives the second message, a corresponding verification result interface 608 may be displayed, where the verification result interface 608 may include the current target hash code and corresponding alert information, so as to alert the user that the current target hash code has been tampered, and that the device environment has a potential safety hazard and needs to be checked in time. Optionally, as shown in fig. 9, if the user is doubtful about the verification result, the terminal device may send the target hash code and the hash code image to the server again in response to the clicking operation of the user on the hash code image in the verification result interface 608, so as to verify the authenticity of the current target hash code again.
Therefore, the method and the device can generate the corresponding target image by the server according to the current target hash code under the condition that the hash code of the user is tampered by a malicious program, and compare the target image with the original hash code image by the server so as to accurately and efficiently check whether the current target hash code is tampered and inform the user, timely and effectively ensure the property safety of the user, and improve the use experience and trust feeling of the user.
Corresponding to the implementation of the method flow, the embodiment of the specification also provides an image generation device based on the hash code, which is applied to the blockchain client. Referring to fig. 10, fig. 10 is a schematic structural diagram of an image generating apparatus based on hash codes according to an exemplary embodiment. As shown in fig. 10, the apparatus 30 includes:
an obtaining unit 301, configured to obtain a target hash code to be displayed;
a generating unit 302, configured to generate a hash code image corresponding to the target hash code based on the target hash code; the hash code image comprises a target character string corresponding to the target hash code and image textures for anti-counterfeiting aiming at the target hash code; the target character string comprises at least part of characters in the target hash code;
And the display unit 303 is used for outputting and displaying the hash code image through a first interface.
In a further illustrated embodiment, the display unit 303 is specifically configured to:
generating a hash code interaction control, wherein the hash code interaction control comprises the hash code image;
and outputting and displaying the hash code interaction control through the first interface.
In a further illustrated embodiment, the generating unit 302 is specifically configured to:
generating the target character string based on the target hash code and a preset character string arrangement rule;
dividing the target hash code into a plurality of groups of character strings, and mapping character contents corresponding to the plurality of groups of character strings into values of a plurality of groups of characteristic parameters corresponding to the image textures respectively;
and performing visual rendering based on the plurality of groups of characteristic parameters, generating the image texture, and fusing the image texture and the target character string to obtain the hash code image.
In a further illustrated embodiment, the generating unit 302 is specifically configured to:
based on the preset character string arrangement rule, arranging at least part of characters in the target hash code into P rows of character strings to obtain the target character strings; wherein each row of character strings comprises M character string groups, each character string group comprises N characters, and the character string groups are separated by the width of K characters.
In yet another illustrated embodiment, if the target string includes a portion of the characters in the target hash code, at least one abbreviation is also included in the target string.
In a further illustrated embodiment, the image texture is a ripple-like image texture; the plurality of sets of characteristic parameters corresponding to the image texture include one or more of the following illustrated characteristic parameters: the starting point color, the ending point color, the color gradual change starting point, the ripple quantity, the ripple width, the ripple amplitude, the ripple frequency and the ripple angle of the ripple.
In a further illustrated embodiment, the generating unit 302 is specifically configured to overlay the image texture on the target string to fuse with the target string.
In a further illustrated embodiment, the color of the character in the target character string that is covered by the image texture is different from the original color of the character.
In a further illustrated embodiment, the color of the character in the target character string that is covered by the image texture is the inverse of the original color of the character.
In a further illustrated embodiment, the apparatus further comprises an interaction unit 304 for:
And in response to a first trigger operation of a user on the hash code interaction control, copying the target hash code, and executing interaction operation corresponding to the target hash code based on the copied target hash code.
In yet another illustrated embodiment, the blockchain client is a blockchain wallet client; the target hash code comprises a hash code corresponding to an account address of a blockchain account on the blockchain; the interactive operation comprises an interactive operation of inquiring the target hash code;
the interaction unit 304 is specifically configured to:
copying a URL address used for inquiring the target hash code, and outputting and displaying the target hash code through a second interface; wherein the URL address includes the target hash code; the second interface further comprises a jump control;
responding to the triggering operation of a user for the jump control, and initiating a page access request to the copied URL address; wherein the page access request includes the target hash code as a query parameter; the method comprises the steps of,
and jumping to a third interface corresponding to the URL address, and outputting a query result corresponding to the page access request through the third interface.
In yet another illustrated embodiment, the blockchain client is a blockchain browser; the interactive operation comprises an interactive operation of inquiring the target hash code;
the interaction unit 304 is specifically configured to:
copying a URL address for inquiring the target hash code; wherein the URL address includes the target hash code;
initiating a page access request to the copied URL address; wherein the page access request includes the target hash code as a query parameter; the method comprises the steps of,
and jumping to a fourth interface corresponding to the URL address, and outputting a query result corresponding to the page access request through the fourth interface.
In yet another illustrated embodiment, the blockchain client is a blockchain asset management client; the target hash code includes a hash code corresponding to an asset address of a blockchain asset on a blockchain; the interactive operation includes an asset management operation for a target asset object corresponding to the target hash code.
In a further illustrated embodiment, the apparatus further comprises a verification unit 305 for:
responding to a second triggering operation of a user for the hash code interaction control, sending the target hash code and the hash code image to a server, generating a corresponding target image by the server according to the target hash code, and checking whether the generated target image is identical to the hash code image;
If the target image is the same as the hash code image, receiving a first message sent by the server, wherein the first message is used for indicating that the target hash code is not tampered;
and if the target image is different from the hash code image, receiving a second message sent by the server, wherein the second message is used for indicating that the target hash code has been tampered.
In a further embodiment which is shown in the figures,
the generating unit 302 is further configured to generate, based on the target hash code, a graphics code corresponding to the target hash code;
the display unit 303 is further configured to output and display the graphic code through a code scanning interface, so that the scanning client scans and parses the graphic code to obtain the target hash code, and execute an interaction operation corresponding to the target hash code based on the obtained target hash code.
In a further illustrated embodiment, the display unit 303 is further configured to:
and outputting and displaying the hash code interaction control through the first interface, and outputting a prompt icon at a position corresponding to the hash code interaction control, wherein the prompt icon is used for prompting a user about the interaction mode of the hash code interaction control.
The implementation process of the functions and roles of each unit in the above-mentioned device 30 is specifically described in the above-mentioned corresponding embodiments of fig. 3 to 9, and will not be described in detail herein. It should be understood that the above-mentioned apparatus 30 may be implemented by software, or may be implemented by hardware or a combination of hardware and software. Taking software implementation as an example, the device in a logic sense is formed by reading corresponding computer program instructions into a memory through a CPU (Central Process Unit, central processing unit) of the device. In addition to the CPU and the memory, the device in which the above apparatus is located generally includes other hardware such as a chip for performing wireless signal transmission and reception, and/or other hardware such as a board for implementing a network communication function.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical modules, i.e., may be located in one place, or may be distributed over a plurality of network modules. Some or all of the units or modules may be selected according to actual needs to achieve the purposes of the present description. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
The apparatus, units, modules illustrated in the above embodiments may be implemented in particular by a computer chip or entity or by a product having a certain function. A typical implementation device is a computer, which may be in the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or a combination of any of these devices.
Corresponding to the method embodiment, the embodiment of the present specification also provides a terminal device. Referring to fig. 11, fig. 11 is a schematic structural diagram of a terminal device according to an exemplary embodiment. As shown in fig. 11, the terminal device 1000 includes a processor 1001 and a memory 1002, and may further include an input device 1004 (e.g., a keyboard, etc.) and an output device 1005 (e.g., a display, etc.). The processor 1001, memory 1002, input devices 1004, and output devices 1005 may be connected by a bus or other means. As shown in fig. 11, the memory 1002 includes a computer-readable storage medium 1003, which computer-readable storage medium 1003 stores a computer program executable by the processor 1001. The processor 1001 may be a general purpose central processing unit, a microprocessor, or an integrated circuit for controlling the execution of the above method embodiments. The processor 1001 may execute the steps of the hash code based image generation method in the embodiment of the present specification when executing the stored computer program, including: acquiring a target hash code to be displayed; generating a hash code image corresponding to the target hash code based on the target hash code; the hash code image comprises a target character string corresponding to the target hash code and image textures for anti-counterfeiting aiming at the target hash code; the target character string comprises at least part of characters in the target hash code; and outputting and displaying the hash code image through a first interface, and the like. For a detailed description of each step of the above hash code-based image generation method, please refer to the previous contents, and a detailed description thereof will not be repeated here.
Corresponding to the above-described method embodiments, embodiments of the present description also provide a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the hash code based image generation method in the embodiments of the present description. Please refer to the description of the corresponding embodiments of fig. 3-9, and the detailed description is omitted herein.
The foregoing description of the preferred embodiments is provided for the purpose of illustration only, and is not intended to limit the scope of the disclosure, since any modifications, equivalents, improvements, etc. that fall within the spirit and principles of the disclosure are intended to be included within the scope of the disclosure.
In a typical configuration, the terminal device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data.
Examples of storage media for a computer 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, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
It will be appreciated by those skilled in the art that embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, embodiments of the present specification may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, embodiments of the present description may take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.

Claims (19)

1. An image generation method based on hash codes is applied to a blockchain client and comprises the following steps:
acquiring a target hash code to be displayed;
generating a hash code image corresponding to the target hash code based on the target hash code; the hash code image comprises a target character string corresponding to the target hash code and image textures for anti-counterfeiting aiming at the target hash code; the target character string comprises at least part of characters in the target hash code;
and outputting and displaying the hash code image through a first interface.
2. The method of claim 1, the presenting the hash image output through a first interface, comprising:
Generating a hash code interaction control, wherein the hash code interaction control comprises the hash code image;
and outputting and displaying the hash code interaction control through the first interface.
3. The method of claim 1, the generating a hash image corresponding to the target hash based on the target hash, comprising:
generating the target character string based on the target hash code and a preset character string arrangement rule;
dividing the target hash code into a plurality of groups of character strings, and mapping character contents corresponding to the plurality of groups of character strings into values of a plurality of groups of characteristic parameters corresponding to the image textures respectively;
and performing visual rendering based on the plurality of groups of characteristic parameters, generating the image texture, and fusing the image texture and the target character string to obtain the hash code image.
4. The method of claim 3, wherein the generating the target string based on the target hash code and a preset string arrangement rule comprises:
based on the preset character string arrangement rule, arranging at least part of characters in the target hash code into P rows of character strings to obtain the target character strings; wherein each row of character strings comprises M character string groups, each character string group comprises N characters, and the character string groups are separated by the width of K characters.
5. The method of claim 3, further comprising at least one abbreviation in the target string if the target string comprises a portion of the characters in the target hash code.
6. A method according to claim 3, the image texture being a ripple-like image texture; the plurality of sets of characteristic parameters corresponding to the image texture include one or more of the following illustrated characteristic parameters: the starting point color, the ending point color, the color gradual change starting point, the ripple quantity, the ripple width, the ripple amplitude, the ripple frequency and the ripple angle of the ripple.
7. A method according to claim 3, fusing the image texture with the target string, comprising: and overlaying the image texture on the target character string to fuse with the target character string.
8. The method of claim 7, wherein a color of a character in the target string that is covered by the image texture is different from an original color of the character.
9. The method of claim 8, wherein the color of the character in the target string that is covered by the image texture is the inverse of the original color of the character.
10. The method of claim 2, the method further comprising:
and in response to a first trigger operation of a user on the hash code interaction control, copying the target hash code, and executing interaction operation corresponding to the target hash code based on the copied target hash code.
11. The method of claim 10, the blockchain client being a blockchain wallet client; the target hash code comprises a hash code corresponding to an account address of a blockchain account on the blockchain; the interactive operation comprises an interactive operation of inquiring the target hash code;
the copying the target hash code and executing the interactive operation corresponding to the target hash code based on the copied target hash code, including:
copying a URL address used for inquiring the target hash code, and outputting and displaying the target hash code through a second interface; wherein the URL address includes the target hash code; the second interface further comprises a jump control;
responding to the triggering operation of a user for the jump control, and initiating a page access request to the copied URL address; wherein the page access request includes the target hash code as a query parameter; the method comprises the steps of,
And jumping to a third interface corresponding to the URL address, and outputting a query result corresponding to the page access request through the third interface.
12. The method of claim 10, the blockchain client being a blockchain browser; the interactive operation comprises an interactive operation of inquiring the target hash code;
the copying the target hash code and executing the interactive operation corresponding to the target hash code based on the copied target hash code, including:
copying a URL address for inquiring the target hash code; wherein the URL address includes the target hash code;
initiating a page access request to the copied URL address; wherein the page access request includes the target hash code as a query 5 parameter; the method comprises the steps of,
and jumping to a fourth interface corresponding to the URL address, and outputting a query result corresponding to the page access request through the fourth interface.
13. The method of claim 10, the blockchain client being a blockchain asset management client; the 0 target hash code includes a hash code corresponding to an asset address of a blockchain asset on a blockchain; the interactive operation includes an asset management operation for a target asset object corresponding to the target hash code.
14. The method of claim 2, further comprising:
responding to a second triggering operation of a user for the hash code interaction control, sending the target hash code and the 5 hash code image to a server, generating a corresponding target image by the server according to the target hash code, and checking whether the generated target image is identical to the hash code image;
if the target image is the same as the hash code image, receiving a first message sent by the server, wherein the first message is used for indicating that the target hash code is not tampered;
and if the target image is different from the hash code image, receiving a second message sent by the server, wherein the 0 second message is used for indicating that the target hash code is tampered.
15. The method of claim 1, further comprising:
generating a graphic code corresponding to the target hash code based on the target hash code;
and outputting and displaying the graphic code through a code scanning interface, so that a scanning client can obtain the target hash code through scanning and analyzing the 5 graphic code, and executing interactive operation corresponding to the target hash code based on the obtained target hash code.
16. The method of claim 2, outputting the hash interaction control through the first interface, comprising:
and 0, outputting and displaying the hash code interaction control through the first interface, and outputting a prompt icon at a position corresponding to the hash code interaction control, wherein the prompt icon is used for prompting a user about the interaction mode of the hash code interaction control.
17. An image generation device based on hash codes, applied to a blockchain client, comprises:
the acquisition unit is used for acquiring the target hash code to be displayed;
the generation unit is used for generating a hash code image corresponding to the target hash code based on the target hash code; the hash code image comprises a target character string corresponding to the target hash code and image textures for anti-counterfeiting aiming at the target hash code; the target character string comprises at least part of characters in the target hash code;
and the display unit is used for outputting and displaying the hash code image through a first interface.
18. A terminal device, comprising: a memory and a processor; the memory has stored thereon a computer program executable by the processor; the processor, when running the computer program, performs the method of any one of claims 1 to 16.
19. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 16.
CN202211730398.5A 2022-12-30 2022-12-30 Hash code-based image generation method and related equipment Pending CN116797691A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211730398.5A CN116797691A (en) 2022-12-30 2022-12-30 Hash code-based image generation method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211730398.5A CN116797691A (en) 2022-12-30 2022-12-30 Hash code-based image generation method and related equipment

Publications (1)

Publication Number Publication Date
CN116797691A true CN116797691A (en) 2023-09-22

Family

ID=88045706

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211730398.5A Pending CN116797691A (en) 2022-12-30 2022-12-30 Hash code-based image generation method and related equipment

Country Status (1)

Country Link
CN (1) CN116797691A (en)

Similar Documents

Publication Publication Date Title
US10049421B2 (en) Secure content and document watermarking
US9697447B2 (en) Automated generation of QR codes with embedded images
US8141146B2 (en) Authentication server, authentication method and authentication program
US9450969B2 (en) System and method for key challenge validation
EP2836953B1 (en) Method and device for generating a code
US8966583B2 (en) Method, apparatus and server for user verification
US9350722B2 (en) Authentication of an end user
EP3114601B1 (en) Access control for a resource
CN108280144A (en) Information displaying method, device and electronic equipment
WO2014085816A1 (en) Observable authentication methods and apparatus
CN110287724A (en) Data storage and verification method and device
US20160234192A1 (en) Service implementation
US20160234193A1 (en) Service implementation method, payment method and apparatus
CN106330846A (en) Cross-platform object recommendation method and device
CN116797691A (en) Hash code-based image generation method and related equipment
CN102402598A (en) Application file system access
CN112950154A (en) Flow information matching method, device, equipment and storage medium
US20150193870A1 (en) Generating electronic documents (edocs) for transactions
CN112583603A (en) Visual signature method and device, electronic equipment and computer readable storage medium
CN112019642A (en) Audio uploading method, device, equipment and storage medium
CN111459475A (en) Interface calling method, interface docking configuration method, device, equipment and medium
KR20020004918A (en) image transmission method for online publication
KR101171653B1 (en) Advertising system using image-text fusion captcha and method thereof
Ak et al. Biletini Devret: A Secure Mobile App for Ticket Sales
CN116383873A (en) Webpage content display method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination