CN110246198B - Method and device for generating character selection verification code, electronic equipment and storage medium - Google Patents

Method and device for generating character selection verification code, electronic equipment and storage medium Download PDF

Info

Publication number
CN110246198B
CN110246198B CN201910425682.3A CN201910425682A CN110246198B CN 110246198 B CN110246198 B CN 110246198B CN 201910425682 A CN201910425682 A CN 201910425682A CN 110246198 B CN110246198 B CN 110246198B
Authority
CN
China
Prior art keywords
character
image
font
fonts
verification 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.)
Active
Application number
CN201910425682.3A
Other languages
Chinese (zh)
Other versions
CN110246198A (en
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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology 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 Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201910425682.3A priority Critical patent/CN110246198B/en
Publication of CN110246198A publication Critical patent/CN110246198A/en
Application granted granted Critical
Publication of CN110246198B publication Critical patent/CN110246198B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3226Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using a predetermined code, e.g. password, passphrase or PIN
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3226Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using a predetermined code, e.g. password, passphrase or PIN
    • H04L9/3228One-time or temporary data, i.e. information which is sent for every authentication or authorization, e.g. one-time-password, one-time-token or one-time-key

Abstract

The invention discloses a method, a device, electronic equipment and a storage medium for generating a character verification code, wherein the method comprises the following steps: acquiring a background image; determining N positions in the background image; n character images are selected from a preset character image library, N characters in the N character images are respectively added to N positions in a background image to obtain an intermediate image, the character image library comprises a plurality of character images, and the fonts of the characters in the character images are unknown; and performing stylization processing on the intermediate image to obtain a stylized character verification code image, wherein the image background in the character verification code image is consistent with the styles of the N characters. According to the embodiment of the invention, the character image and the background image with unknown font types can be used for generating the character verification code with uniform style, and the existing OCR cannot be cracked because the font types of the character verification code are unknown, so that the character verification code has higher safety. And the background of the character selection verification code is consistent with the style of the character, so that the look and feel is good.

Description

Method and device for generating character selection verification code, electronic equipment and storage medium
Technical Field
The present invention relates to the field of security verification technologies, and in particular, to a method and an apparatus for generating a word selection verification code, an electronic device, and a storage medium.
Background
With the development of internet technology, the types and functions of application programs provided by internet companies are more and more abundant, and great convenience is brought to life, work and study of people. Meanwhile, black ash generation 'out wool' phenomenon occurs, and black ash generation partners maliciously register or log in account numbers of application programs in a machine mode to steal assets of internet companies, so that huge losses are brought to the internet companies.
To prevent black-gray from producing "pull", the internet public will verify the identity of the operator when he registers and logs into the application account. Because the character selection verification code is integrated with literal logic knowledge, the security is much higher than other verification code forms, so that the character selection verification code is used by many Internet companies to verify the identity of operators.
However, with the advent of OCR (Optical Character Recognition ), black-gray producing clusters began to crack the word verification code with OCR, resulting in lower security of the word verification code. Therefore, how to ensure the security of the character selection verification code under the condition of wide application of OCR has become a problem to be solved in the industry.
Disclosure of Invention
The embodiment of the invention provides a method, a device, electronic equipment and a storage medium for generating a character verification code, which are used for solving the technical problem of low safety of the character verification code in the prior art.
According to a first aspect of the invention, a method for generating a word verification code is disclosed, the method comprising:
acquiring a background image;
n positions are determined in the background image, wherein N is the number of verification code characters;
selecting N character images from a preset character image library, and respectively adding N characters in the N character images to N positions in the background image to obtain an intermediate image, wherein the preset character image library comprises: a plurality of character images, wherein each character image comprises a character, and the font of each character is an unknown font;
and performing stylization processing on the intermediate image to obtain a stylized character verification code image, wherein the image background in the character verification code image is consistent with the styles of the N characters.
Optionally, as an embodiment, the performing a stylizing process on the intermediate image to obtain a stylized character verification code image includes:
Performing stylized processing on the intermediate image through a preset style migration model to obtain a stylized character verification code image; the preset style migration model is obtained by training a stylized picture sample set by adopting a generated countermeasure network GAN algorithm, and one style migration model corresponds to one image style.
Optionally, as an embodiment, the determining N positions in the background image includes:
determining a forbidden coverage area in the background image;
n positions are determined in the area outside the forbidden coverage area in the background image.
Optionally, as an embodiment, the determining N positions in the background image includes:
taking two boundaries of the background image as coordinate axes, carrying out random number sampling along the coordinate axes, reserving the sampling point i if the sampling point i meets a preset sampling rule, otherwise, discarding the sampling point i, and stopping sampling when the number of reserved sampling points reaches N;
determining the reserved N sampling points as N positions;
wherein the sampling rule includes: the sampling point i is outside the area with the sampling point i-1 as the center and the diagonal length of the character image as the radius, i is more than 1 and less than or equal to N.
Optionally, as an embodiment, the adding N characters in the N character images to N positions in the background image includes:
extracting N characters in the N character images;
performing anti-cracking processing on the N characters, wherein the anti-cracking processing comprises at least one of the following operations: rotation, affine transformation, image erosion, and image dilation;
and respectively adding N characters obtained by the anti-cracking processing to N positions in the background image.
Optionally, as an embodiment, before the step of selecting N character images from the preset character image library, the method further includes:
constructing a character image library, wherein the construction process of the character image library comprises the following steps:
receiving a first character image, and encoding the first character image to obtain a character embedding vector of the first character image, wherein the first character image comprises target characters with first fonts, and the first fonts are known fonts;
receiving a font selection instruction, selecting at least one font from a preset font library, and generating a font embedded vector of the selected font, wherein the preset font library comprises N fonts which are all known fonts;
Splicing the character embedded vector of the first character image and the font embedded vector of the selected font to obtain a character body vector;
generating a second character image according to the character body vector and a preset character image generation model, wherein the second character image comprises target characters with second fonts, the second fonts are unknown fonts, and the mapping relation between the known fonts and the unknown fonts is recorded in the character image generation model;
and adding the second character image to a character image library.
According to a second aspect of the present invention, there is disclosed a character selection verification code generation apparatus, the apparatus comprising:
the acquisition module is used for acquiring the background image;
the determining module is used for determining N positions in the background image, wherein N is the number of the verification code characters;
the selection module is used for selecting N character images from a preset character image library;
the adding module is configured to add N characters in the N character images to N positions in the background image respectively to obtain an intermediate image, where the preset character image library includes: a plurality of character images, wherein each character image comprises a character, and the font of each character is an unknown font;
And the processing module is used for carrying out stylization processing on the intermediate image to obtain a stylized character verification code image, wherein the image background in the character verification code image is consistent with the styles of the N characters.
Optionally, as an embodiment, the processing module includes:
the stylized processing submodule is used for performing stylized processing on the intermediate image through a preset style migration model to obtain a stylized character selection verification code image; the preset style migration model is obtained by training a stylized picture sample set by adopting a GAN algorithm, and one style migration model corresponds to one image style.
Optionally, as an embodiment, the determining module includes:
a first determining submodule, configured to determine a forbidden coverage area in the background image;
and the second determining submodule is used for determining N positions in the area outside the forbidden coverage area in the background image.
Optionally, as an embodiment, the determining module includes:
the sampling sub-module is used for taking two boundaries of the background image as coordinate axes, carrying out random number sampling along the coordinate axes, reserving the sampling point i if the sampling point i meets a preset sampling rule, otherwise, discarding the sampling point i, and stopping sampling when the number of the reserved sampling points reaches N;
A third determining sub-module, configured to determine the N reserved sampling points as N positions;
wherein the sampling rule includes: the sampling point i is outside the area with the sampling point i-1 as the center and the diagonal length of the character image as the radius, i is more than 1 and less than or equal to N.
Optionally, as an embodiment, the adding module includes:
the character extraction sub-module is used for extracting N characters in the N character images;
the anti-cracking processing sub-module is used for carrying out anti-cracking processing on the N characters, wherein the anti-cracking processing comprises at least one of the following operations: rotation, affine transformation, image erosion, and image dilation;
and the character adding sub-module is used for respectively adding N characters obtained by the anti-cracking processing to N positions in the background image.
Optionally, as an embodiment, the apparatus further includes: a build module, wherein the build module comprises:
the first receiving sub-module is used for receiving a first character image, wherein the first character image comprises target characters with first fonts, and the first fonts are known fonts;
the encoding submodule is used for encoding the first character image to obtain a character embedding vector of the first character image;
The second receiving sub-module is used for receiving a font selection instruction and selecting at least one font from a preset font library, wherein the preset font library comprises N fonts which are all known fonts;
a first generation sub-module for generating a font embedding vector for the selected font;
the vector splicing sub-module is used for splicing the character embedded vector of the first character image and the font embedded vector of the selected font to obtain a character body vector;
the second generation sub-module is used for generating a model according to the character body vector and a preset character image, and generating a second character image, wherein the second character image comprises target characters with second fonts, the second fonts are unknown fonts, and the character image generation model records the mapping relation between the known fonts and the unknown fonts;
and the character image library construction submodule is used for adding the second character image to the character image library.
According to a third aspect of the present invention, an electronic device is disclosed, comprising: the computer program comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the computer program realizes the steps of the character selection verification code generation method when being executed by the processor.
According to a fourth aspect of the present invention, a computer readable storage medium is disclosed, having stored thereon a computer program which, when executed by a processor, implements the steps in a method for generating a word verification code as described above.
According to the embodiment of the invention, the character image and the background image with unknown font types can be used for generating the character verification code with uniform style, and the existing OCR cannot be cracked because the font types of the character verification code are unknown, so that the character verification code has higher safety. And the background of the character selection verification code is consistent with the style of the character, so that the look and feel is good.
Drawings
FIG. 1 is a flow chart of a method of generating a word verification code of one embodiment of the invention;
FIG. 2 is an exemplary diagram of an image stylization process of one embodiment of the present invention;
FIG. 3 is a flow chart of a character image library construction process of one embodiment of the present invention;
FIG. 4 is a block diagram of an apparatus for generating a word verification code according to one embodiment of the invention.
Detailed Description
In order that the above-recited objects, features and advantages of the present invention will become more readily apparent, a more particular description of the invention will be rendered by reference to the appended drawings and appended detailed description.
It should be noted that, for simplicity of description, the method embodiments are shown as a series of acts, but it should be understood by those skilled in the art that the embodiments are not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred embodiments, and that the acts are not necessarily required by the embodiments of the invention.
The embodiment of the invention provides a method, a device, electronic equipment and a storage medium for generating a character verification code.
The following first describes a method for generating a word verification code according to an embodiment of the present invention.
FIG. 1 is a flow chart of a method of generating a word verification code according to one embodiment of the invention, the method being performed by an electronic device, which in actual use may be a server, as shown in FIG. 1, the method may include the steps of: step 101, step 102, step 103 and step 104, wherein,
in step 101, a background image is acquired.
In the embodiment of the present invention, the background image obtained in step 101 is the background image of the character selection verification code.
In the embodiment of the invention, a large number of images can be collected in advance to construct an image library. When the character selection verification code needs to be generated, an image can be randomly acquired from a pre-constructed image library to serve as a background image, or a specific image can be selected from the pre-constructed image library to serve as the background image, and the embodiment of the invention is not limited to the method. In practical applications, the background image may be a scenic image, a cartoon image, a cover image of a movie work, or the like.
In step 102, N positions are determined in the background image, where N is the number of captcha characters.
In the embodiment of the invention, each of N positions in the background image corresponds to one verification code character.
In the embodiment of the present invention, in order to avoid the verification code character covering a specific image area in the background image, for example, to avoid the verification code character covering a logo of the character selection verification code generator, the specific image area in the background image may be masked, and at this time, the step 102 may specifically include the following steps: determining a forbidden coverage area in the background image; n positions are determined in an area other than the prohibited covering area in the background image.
In the embodiment of the present invention, in order to improve the cracking difficulty of the verification code of the selected word, a random sampling method may be used to determine the character position, where step 102 may specifically include the following steps:
Taking two boundaries of the background image as coordinate axes, carrying out random number sampling along the coordinate axes, reserving the sampling points i if the sampling points i meet a preset sampling rule, otherwise, discarding the sampling points i, and stopping sampling when the number of the reserved sampling points reaches N; determining the reserved N sampling points as N positions; wherein the sampling rule includes: the sampling point i is outside the area with the sampling point i-1 as the center and the diagonal length of the character image as the radius, i is more than 1 and less than or equal to N.
In the embodiment of the invention, in order to avoid mutual shielding or overlapping after the verification code character rotates, a circle is drawn by taking the current sampling point as the circle center and taking the diagonal length of the character image as the radius when the next point is sampled, a circular shielding area is generated, and sampling is carried out in an area outside the circular shielding area.
In the embodiment of the invention, the sampling point is unpredictable, namely the position of the verification code character is unpredictable, and the aggregation degree of the verification code characters is unpredictable, so that the cracking difficulty of the character selection verification code can be improved.
In step 103, N character images are selected from a preset character image library, N characters in the N character images are respectively added to N positions in the background image, and an intermediate image is obtained, wherein the preset character image library comprises: and a plurality of character images, wherein each character image comprises a character, and the font of each character is unknown.
In the embodiment of the present invention, the character may include any one of the following: the character image is an image containing only one character, and for convenience of processing, the character image in the embodiment of the invention is preferably an image of white background and black character, namely, the background of the character image is white and the color of the character is black.
Considering that compared with numbers and letters, the Chinese characters have larger cracking difficulty, the character image related in the embodiment of the invention is preferably a Chinese character image, and the Chinese character image only contains one Chinese character.
In the embodiment of the invention, both the known font (the font type is known) and the unknown font (the font with unknown or non-existing font type) are relative to the existing font library, if one font has a record in the existing font library, the font is the known font, and if one font does not have a record in the existing font library, the font is the unknown font.
In the embodiment of the invention, the characters added into the background image are characters with unknown fonts, namely the fonts are not existed in the existing font library, and the existing OCR can only recognize the fonts in the existing font library, so the technical scheme of the embodiment of the invention can improve the cracking difficulty of the character selection verification code.
In the embodiment of the present invention, the step of adding N characters in the N character images to N positions in the background image may specifically include the following steps:
extracting N characters in the N character images; performing anti-cracking processing on the N characters, and respectively adding the N characters obtained by the anti-cracking processing to N positions in the background image, wherein the anti-cracking processing comprises at least one of the following operations: rotation, affine transformation, image erosion, and image dilation.
Considering that the character image is in an image form and the background image is also in an image form, in the embodiment of the invention, the character part of the character image can be scratched out by masking to set a gray threshold value, and then the scratched-out characters are added to N positions of the background image, wherein one character is added to one position.
In the embodiment of the invention, the characters in the character image can be obtained by adopting the reverse mask to scratch out the parts except the characters in the character image and then carrying out reverse calculation, so that the effect is relatively good.
Because the existing OCR has better character recognition capability on regular characters in one row or one column, and after the ways of random rotation, affine transformation and the like are added, the OCR is not easy to locate and correctly recognize the characters, in the embodiment of the invention, after the characters in the character image are extracted, anti-cracking processing is carried out on each character, for example, random angles, random affine transformation, corrosion expansion and the like are added, so that the cracking difficulty of the OCR can be improved.
In step 104, the intermediate image is stylized, and a stylized character verification code image is obtained, wherein the image background in the character verification code image is consistent with the styles of N characters.
In the embodiment of the invention, the background style of the intermediate image can be blended into the characters of the intermediate image by performing stylization processing on the intermediate image, so that the character verification code image with the content faithful to the original image (namely the intermediate image) and the character and background style highly unified is generated, and the appearance is greatly improved compared with the common character verification code.
In the embodiment of the invention, a batch of style migration models can be trained in advance, and when the intermediate image is required to be stylized, one style migration model is selected from the style migration models trained in advance to stylize the intermediate image. At this time, the step 104 may specifically include the following steps: performing stylized processing on the intermediate image through a preset style migration model to obtain a stylized character verification code image; the method comprises the steps that a preset style migration model is obtained by training a stylized picture sample set through a GAN algorithm, and one style migration model corresponds to one image style.
For ease of understanding, a simplified description is given of GAN, which is a deep learning model comprising two modules: a generator (also called a generation model) and a discriminator (also called a discrimination model), wherein the generator is used for learning the real image distribution so as to make the self-generated image more real to cheat the discriminator, and the discriminator is used for carrying out true and false discrimination on the received picture. In the whole training process, the generator strives to make the generated image more real, the discriminator strives to identify the true or false of the image, the process is equivalent to a two-person game, the generator and the discriminator are constantly confronted with each other along with the time, and finally, the two networks achieve a dynamic balance: the image generated by the generator is close to the true image distribution, while the arbiter does not recognize the true or false image, and the probability of the prediction for a given image being true is substantially close to 0.5 (equivalent to a random guess class).
In the embodiment of the invention, a stylized picture sample set is input into a GAN model for training, when a training result meets a preset condition, training is stopped, and a generator obtained by training is used as a style migration model, wherein the preset condition can comprise: the output of the arbiter is 0.5 or the generator converges.
In the embodiment of the invention, one style migration model can be randomly selected from the style migration models trained in advance to stylize the intermediate image; alternatively, a specific style migration model may be selected from the pre-trained style migration models, and the intermediate image may be stylized, for example, a Sanskyline style migration model or a Monet style migration model.
In the embodiment of the invention, one style migration model corresponds to one image style. When training a style migration model, firstly, an image sample set of the style is required to be acquired, then, the GAN algorithm is adopted to train the images in the image sample set of the style, and finally, the style migration model of the style is obtained. And the same can be used for training to obtain a plurality of style migration models with different styles.
In one example, as shown in fig. 2, the intermediate image 21 is input into the style migration model 20 for stylizing processing, and a character selection verification code image 22 is obtained through processing, wherein the image background in the intermediate image 21 is inconsistent with the style of the character, and the image background in the character selection verification code image 22 is consistent with the style of the character.
In the embodiment of the invention, after the character verification code image with the consistent character style and background style is generated, a verification interface with verification problems can be generated based on the character verification code image, and display is output so as to perform identity verification of user login or registration.
In the embodiment, the character image and the background image with unknown font types can be used for generating the character verification code with uniform styles, and the existing OCR cannot be cracked because the font types of the character verification code are unknown, so that the character verification code is high in safety. And the background of the character selection verification code is consistent with the style of the character, so that the look and feel is good.
In one embodiment provided by the present invention, a character image library may be pre-constructed, as shown in fig. 3, and the specific construction process may include the following steps: step 301, step 302, step 303, step 304 and step 305, wherein,
in step 301, a first character image is received, and the first character image is encoded to obtain a character embedding vector of the first character image, where the first character image includes a target character with a first font, and the first font is a known font.
In one example, the first character image is an image of white background and black characters, and the image only contains one 'truncated' character with a regular script, namely, the target character is 'truncated', and the first font is the regular script.
In the embodiment of the invention, the first character image is converted from image type data to numerical type data by encoding the first character image. In practical application, an algorithm related to a deep neural network may be used to encode the first character image to obtain an embedding (embedding) vector of the first character image.
In step 302, a font selection instruction is received, at least one font is selected from a preset font library, and a font embedding vector of the selected font is generated, wherein the preset font library comprises N fonts, and the N fonts are all known fonts.
In one example, the preset font library may include: song Ti, blackbody, script, regular script, hollowed-out, stereo, etc.
In the embodiment of the invention, the font selection instruction is used for indicating to select a font from a preset font library, specifically, may indicate to select one font from the preset font library, or may indicate to select a plurality of fonts from the preset font library. When a font is selected from a preset font library, generating a font embedded vector; when a plurality of fonts are selected from a preset font library, generating a corresponding font embedded vector for each selected font, and obtaining a plurality of font embedded vectors, wherein one font corresponds to one font embedded vector.
In the embodiment of the invention, the font embedded vector may be an N-dimensional column vector or an N-dimensional row vector, and one font embedded vector includes: one 1 and N-1 0.
In order to facilitate understanding of the font embedded vector, describing with reference to a specific example, in one example, the preset font library includes Song Ti, bold, running script, regular script, hollowed-out and stereo, 6 fonts in total, and the character embedded vector of each font can be generated based on the preset font library and the positional relationship of each font in the character embedded vector, for example, the positional relationship is (Song Ti, bold, running script, regular script, hollowed-out and stereo), and then the character embedded vectors of each font are generated respectively: song Ti the character embedding vector is 1,0,0,0,0,0, the bold character embedding vector is 0,1,0,0,0,0, the character embedding vector of the line book is 0,0,1,0,0,0, the character embedding vector of the regular script is 0,0,0,1,0,0, the hollowed-out character embedding vector is 0,0,0,0,1,0, and the three-dimensional character embedding vector is 0,0,0,0,0,1. When a bold is selected from a preset font library according to a font selection instruction, the generated character embedding vector is (0,1,0,0,0,0); when bold and hollowed-out are selected from a preset font library according to a font selection instruction, the generated character embedding vectors are (0,1,0,0,0,0) and (0,0,0,0,1,0).
In the embodiment of the invention, the first font and the font indicated by the font selection instruction may be the same font or different fonts. For example, the font of the target character in the first character image is Song Ti, and the font selection instruction indicates that the selected font is Song Ti; or the font of the target character in the first character image is Song Ti, and the font selection instruction indicates that the selected font is bold; or the font of the target character in the first character image is Song Ti, and the font selection instruction indicates that the selected font is Song Ti and bold; or the font of the target character in the first character image is Song Ti, and the font selection instruction indicates that the selected font is bold and hollowed.
In step 303, the character embedding vector of the first character image and the font embedding vector of the selected font are spliced to obtain a character form vector.
In the embodiment of the invention, the first character image mainly provides font characteristics for generating the second character image (i.e. which character is generated), and the font selection instruction indicates that the selected font mainly provides font characteristics for generating the second character image (i.e. which known font the generated second font is closer to, or more similar to). Further, the character embedded vector of the first character image and the font embedded vector of the selected font are spliced, the font characteristic and the font characteristic are fused, the fused characteristic is used for generating a second character image, and the font of the characters in the second character image (namely, the second font) is a brand new font and is different from the fonts in the existing font library.
In one embodiment of the present invention, when a font is selected from a preset font library, the step 303 may specifically include the following steps:
and splicing the character embedded vector of the first character image and the generated one font embedded vector to obtain a character body vector.
In one example, the character embedding vector of the first character image is a, the font embedding vector B of the selected font is concatenated to obtain the character form vector (a, B).
In the embodiment of the present invention, when the first font and the font selection instruction indicate that the selected font is the same font, a second character image is generated based on the character form vector in the embodiment, the characters in the second character image are target characters, and the font style of the characters in the second character image (second font) is close to the style of the first font. For example, the character in the first character image is "wind", the first font is Song Ti, the font selection instruction indicates that the selected font is Song Ti, the character in the second character image is also "wind", and the style of the second font is similar to Song Ti but not Song Ti.
When the first font and the font selection instruction indicate that the selected font is different, based on the second character image generated by the character body vector in the embodiment, the characters in the second character image are target characters, and the font style of the characters in the second character image is between the style of the first font and the style of the font selected by the font selection instruction. For example, if the character in the first character image is "wind", the first font is Song Ti, and the font selection instruction indicates that the selected font is bold, then the character in the second character image is also "wind", and the style of the second font is somewhat like Song Ti and somewhat like bold, but is not Song Ti and bold.
In another embodiment of the present invention, when a plurality of fonts are selected from a preset font library, the step 303 may specifically include the following steps:
carrying out weighted summation on the plurality of font embedded vectors to obtain an interpolation font embedded vector;
and splicing the character embedding vector of the first character image and the interpolation font embedding vector to obtain a character body vector.
In one example, the character embedding vector of the first character image is a, the font embedding vectors B and C of the selected font are weighted and summed to obtain an interpolated font embedding vector b+c, and then the character feature vectors (a, b+b+c) are spliced to obtain a character feature vector (a, b+c), wherein B and C are weight coefficients, and the sum of B and C is 1.
In the embodiment of the invention, the weight coefficient used for the weighted summation operation determines the approaching degree of the second font and the font indicated by the font selection instruction, and the bigger the weight coefficient is, the closer the approaching degree is.
In the embodiment of the present invention, based on the second character image generated by the character form vector in the embodiment, the characters in the second character image are target characters, and the font style of the characters in the second character image is between the style of the first font and the style of the font selected by the font selection instruction. For example, if the character in the first character image is "wind", the first font is Song Ti, the font selection command indicates that the selected font is Song Ti and bold, then the character in the second character image is also "wind", and the style of the second font is somewhat like Song Ti and somewhat like bold, but not Song Ti and bold. For another example, the characters in the first character image are "wind", the first font is Song Ti, the font selection instruction indicates that the selected fonts are hollowed-out and black, the characters in the second character image are also "wind", the style of the second font is a little like Song Ti and a little like black and is also hollowed-out with points, but is not Song Ti, black and hollowed-out.
In step 304, a second character image is generated according to the character body vector and a preset character image generating model, wherein the second character image contains target characters with a second font, the second font is an unknown font, the character image generating model records the mapping relation between the known font and the unknown font, and one character image contains one character.
In the embodiment of the invention, the character image generation model can be obtained by training the character body vectors based on various machine learning algorithms. It is considered that if the difference between the newly generated font (second font) and the existing font is too large, the user will not recognize the character corresponding to the newly generated font; and GAN (Generative Adversarial Networks, generative countermeasure network) algorithms are well-developed in the field of image style migration, therefore, training of the character image generation model is preferably performed by using GAN algorithm, and the training process of the character image generation model may include the following steps (not shown in the figure): step 3041, step 3042, step 3043 and step 3044, wherein,
in step 3041, a character set is obtained, wherein the character set includes M different characters.
In the embodiment of the invention, the character set comprises N characters, wherein the N characters are different from each other, and the N characters are all existing characters.
Considering that the more the number of characters in the character set is, the more the generated character image can generate the character image, and the cognition degree of most users on the characters, in the embodiment of the invention, the character set containing 3500 common characters can be obtained.
In step 3042, each character in the character set is drawn into a corresponding character image according to each font in the preset font library to obtain a training sample set { P } 1 ,P 2 ,…,P M*N M is the number of character images in the training sample set, P i To train the ith character image in the sample set, P i The font of the middle character is Q i
In the embodiment of the invention, when drawing the character image, any image drawing method (such as a row_font method of PIL) of the related art may be used for drawing.
To facilitate understanding of the process of generating the training sample set, the description is provided in connection with a specific example, and in one example, the preset font library includes: song Ti, bold, regular script and hollowed-out, totally 4 fonts; the character set includes: wind, rain, lightning and electricity, 4 characters in total; drawing wind, rain, lightning and electricity in a character set respectively according to Song Ti, bold, regular script and hollowed-out characters in a preset font library to obtain a total of 16 character images respectively as shown in the following table 1:
Figure BDA0002067410380000141
TABLE 1
In step 3043, for each character image P i For P i Coding to obtain P i Is used for generating Q i Is embedded in the font of P i Character embedded vector sum Q of (2) i Splicing the font embedded vectors to obtain P i Is a character shape vector of (a).
Considering that the image type data cannot be directly used for model training based on the GAN algorithm, in the embodiment of the invention, each character image in the training sample set is encoded, converted into numerical type data, and then input into the GAN model for training.
In the embodiment of the invention, when each character image in the training sample set is encoded, the same encoding mode as that in the previous step is adopted. Generating font Q i The same way of generating the font embedding vector as in the previous step is adopted. In the generation of character image P i The character shape vector of the character is spliced in the same manner as the previous steps, and will not be described in detail here.
Following the example in step 3042, the character shape vectors of each character image in the training sample set are shown in the following table 2:
Figure BDA0002067410380000151
Figure BDA0002067410380000161
TABLE 2
In step 3044, the network GAN algorithm is countered by the generation, for all P' s i Training the character body vectors of the character image to obtain a character image generation model.
In the embodiment of the present invention, all character body vectors generated in step 3043 are input into a GAN model for training, when the training result meets the preset condition, training is stopped, and the generator obtained by training is used as a character image generation model, wherein the preset condition may include: the output of the arbiter is 0.5 or the generator converges.
Therefore, in the embodiment of the invention, the character body vectors of the character images in the training sample set are fused with the font characteristics and the font characteristics of the characters, and the fonts of the characters in the character images are all the existing fonts, so that the character image generation model obtained by training can be used for generating new fonts (namely intermediate fonts) between the existing fonts.
In the embodiment of the present invention, the character shape vector generated in step 303 is input into the character image generation model, so as to obtain the second character image.
When the model is trained, a great number of ready-made character images can be directly obtained as the training sample set in addition to the mode of generating the training sample set.
In step 305, a second character image is added to the character image library.
In the embodiment of the present invention, each time step 301 to step 304 are executed, a character image with unknown font type can be obtained. By executing steps 301 to 304 a plurality of times, a plurality of character images of unknown font types can be obtained, thereby constructing a character image library.
FIG. 4 is a block diagram of an apparatus for generating a word verification code according to an embodiment of the present invention, as shown in FIG. 4, the apparatus 400 for generating a word verification code may include: an acquisition module 401, a determination module 402, a selection module 403, an addition module 404, and a processing module 405, wherein,
an acquisition module 401, configured to acquire a background image;
a determining module 402, configured to determine N positions in the background image, where N is the number of characters of the verification code;
a selection module 403, configured to select N character images from a preset character image library;
an adding module 404, configured to add N characters in the N character images to N positions in the background image respectively, to obtain an intermediate image, where the preset character image library includes: a plurality of character images, wherein each character image comprises a character, and the font of each character is an unknown font;
and the processing module 405 is configured to perform a stylizing process on the intermediate image to obtain a stylized character verification code image, where an image background in the character verification code image is consistent with the styles of the N characters.
In the embodiment, the character image and the background image with unknown font types can be used for generating the character verification code with uniform styles, and the existing OCR cannot be cracked because the font types of the character verification code are unknown, so that the character verification code is high in safety. And the background of the character selection verification code is consistent with the style of the character, so that the look and feel is good.
Optionally, as an embodiment, the processing module 405 may include:
the stylized processing submodule is used for performing stylized processing on the intermediate image through a preset style migration model to obtain a stylized character selection verification code image; the preset style migration model is obtained by training a stylized picture sample set by adopting a GAN algorithm, and one style migration model corresponds to one image style.
Alternatively, as an embodiment, the determining module 402 may include:
a first determining submodule, configured to determine a forbidden coverage area in the background image;
and the second determining submodule is used for determining N positions in the area outside the forbidden coverage area in the background image.
Alternatively, as an embodiment, the determining module 402 may include:
The sampling sub-module is used for taking two boundaries of the background image as coordinate axes, carrying out random number sampling along the coordinate axes, reserving the sampling point i if the sampling point i meets a preset sampling rule, otherwise, discarding the sampling point i, and stopping sampling when the number of the reserved sampling points reaches N;
a third determining sub-module, configured to determine the N reserved sampling points as N positions;
wherein the sampling rule includes: the sampling point i is outside the area with the sampling point i-1 as the center and the diagonal length of the character image as the radius, i is more than 1 and less than or equal to N.
Optionally, as an embodiment, the adding module 404 may include:
the character extraction sub-module is used for extracting N characters in the N character images;
the anti-cracking processing sub-module is used for carrying out anti-cracking processing on the N characters, wherein the anti-cracking processing comprises at least one of the following operations: rotation, affine transformation, image erosion, and image dilation;
and the character adding sub-module is used for respectively adding N characters obtained by the anti-cracking processing to N positions in the background image.
Optionally, as an embodiment, the device 400 for generating the word verification code may further include: a build module, wherein the build module may include:
The first receiving sub-module is used for receiving a first character image, wherein the first character image comprises target characters with first fonts, and the first fonts are known fonts;
the encoding submodule is used for encoding the first character image to obtain a character embedding vector of the first character image;
the second receiving sub-module is used for receiving a font selection instruction and selecting at least one font from a preset font library, wherein the preset font library comprises N fonts which are all known fonts;
a first generation sub-module for generating a font embedding vector for the selected font;
the vector splicing sub-module is used for splicing the character embedded vector of the first character image and the font embedded vector of the selected font to obtain a character body vector;
the second generation sub-module is used for generating a model according to the character body vector and a preset character image, and generating a second character image, wherein the second character image comprises target characters with second fonts, the second fonts are unknown fonts, and the character image generation model records the mapping relation between the known fonts and the unknown fonts;
And the character image library construction submodule is used for adding the second character image to the character image library.
For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
According to still another embodiment of the present invention, there is provided an electronic apparatus including: the method comprises the steps of a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the computer program is executed by the processor to realize the steps of the method for generating the character verification code according to any one of the embodiments.
According to a further embodiment of the present invention, there is also provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method for generating a word verification code according to any one of the embodiments described above.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by differences from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
It will be apparent to those skilled in the art that embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the invention 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.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal 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 terminal. 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 terminal device comprising the element.
The above detailed description of the method, the device, the electronic equipment and the storage medium for generating the character verification code provided by the invention applies specific examples to illustrate the principle and the implementation of the invention, and the description of the above examples is only used for helping to understand the method and the core idea of the invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (12)

1. A method for generating a word verification code, the method comprising:
acquiring a background image;
n positions are determined in the background image, wherein N is the number of verification code characters;
constructing a character image library, wherein the construction process of the character image library comprises the following steps:
receiving a first character image, and encoding the first character image to obtain a character embedding vector of the first character image, wherein the first character image comprises target characters with first fonts, and the first fonts are known fonts; receiving a font selection instruction, selecting at least one font from a preset font library, and generating a font embedded vector of the selected font, wherein the preset font library comprises N fonts which are all known fonts; splicing the character embedded vector of the first character image and the font embedded vector of the selected font to obtain a character body vector; generating a second character image according to the character body vector and a preset character image generation model, wherein the second character image comprises target characters with second fonts, the second fonts are unknown fonts, and the mapping relation between the known fonts and the unknown fonts is recorded in the character image generation model; adding the second character image to a character image library;
Selecting N character images from a preset character image library, and respectively adding N characters in the N character images to N positions in the background image to obtain an intermediate image, wherein the preset character image library comprises: a plurality of character images, wherein each character image comprises a character, and the font of each character is an unknown font;
and performing stylization processing on the intermediate image to obtain a stylized character verification code image, wherein the image background in the character verification code image is consistent with the styles of the N characters.
2. The method of claim 1, wherein the performing a stylizing process on the intermediate image to obtain a stylized word verification code image comprises:
performing stylized processing on the intermediate image through a preset style migration model to obtain a stylized character verification code image; the preset style migration model is obtained by training a stylized picture sample set by adopting a generated countermeasure network GAN algorithm, and one style migration model corresponds to one image style.
3. The method of claim 1, wherein the determining N locations in the background image comprises:
Determining a forbidden coverage area in the background image;
n positions are determined in the area outside the forbidden coverage area in the background image.
4. The method of claim 1, wherein the determining N locations in the background image comprises:
taking two boundaries of the background image as coordinate axes, carrying out random number sampling along the coordinate axes, reserving the sampling point i if the sampling point i meets a preset sampling rule, otherwise, discarding the sampling point i, and stopping sampling when the number of reserved sampling points reaches N;
determining the reserved N sampling points as N positions;
wherein the sampling rule includes: the sampling point i is outside the area with the sampling point i-1 as the center and the diagonal length of the character image as the radius, i is more than 1 and less than or equal to N.
5. The method of claim 1, wherein the adding N characters in the N character images to N positions in the background image, respectively, comprises:
extracting N characters in the N character images;
performing anti-cracking processing on the N characters, wherein the anti-cracking processing comprises at least one of the following operations: rotation, affine transformation, image erosion, and image dilation;
And respectively adding N characters obtained by the anti-cracking processing to N positions in the background image.
6. A word verification code generation apparatus, the apparatus comprising:
the acquisition module is used for acquiring the background image;
the determining module is used for determining N positions in the background image, wherein N is the number of the verification code characters;
a build module, wherein the build module comprises: the first receiving sub-module is used for receiving a first character image, wherein the first character image comprises target characters with first fonts, and the first fonts are known fonts; the encoding submodule is used for encoding the first character image to obtain a character embedding vector of the first character image; the second receiving sub-module is used for receiving a font selection instruction and selecting at least one font from a preset font library, wherein the preset font library comprises N fonts which are all known fonts; a first generation sub-module for generating a font embedding vector for the selected font; the vector splicing sub-module is used for splicing the character embedded vector of the first character image and the font embedded vector of the selected font to obtain a character body vector; the second generation sub-module is used for generating a model according to the character body vector and a preset character image, and generating a second character image, wherein the second character image comprises target characters with second fonts, the second fonts are unknown fonts, and the character image generation model records the mapping relation between the known fonts and the unknown fonts; a character image library construction sub-module for adding the second character image to a character image library;
The selection module is used for selecting N character images from a preset character image library;
the adding module is configured to add N characters in the N character images to N positions in the background image respectively to obtain an intermediate image, where the preset character image library includes: a plurality of character images, wherein each character image comprises a character, and the font of each character is an unknown font; the character image is generated according to a character body vector and a preset character image generation model, and the mapping relation between a known font and an unknown font is recorded in the character image generation model; the character body vectors are obtained by splicing character embedded vectors of the first character image and font embedded vectors of the selected fonts, and the first fonts are known fonts;
and the processing module is used for carrying out stylization processing on the intermediate image to obtain a stylized character verification code image, wherein the image background in the character verification code image is consistent with the styles of the N characters.
7. The apparatus of claim 6, wherein the processing module comprises:
the stylized processing submodule is used for performing stylized processing on the intermediate image through a preset style migration model to obtain a stylized character selection verification code image; the preset style migration model is obtained by training a stylized picture sample set by adopting a GAN algorithm, and one style migration model corresponds to one image style.
8. The apparatus of claim 6, wherein the means for determining comprises:
a first determining submodule, configured to determine a forbidden coverage area in the background image;
and the second determining submodule is used for determining N positions in the area outside the forbidden coverage area in the background image.
9. The apparatus of claim 6, wherein the means for determining comprises:
the sampling sub-module is used for taking two boundaries of the background image as coordinate axes, carrying out random number sampling along the coordinate axes, reserving the sampling point i if the sampling point i meets a preset sampling rule, otherwise, discarding the sampling point i, and stopping sampling when the number of the reserved sampling points reaches N;
a third determining sub-module, configured to determine the N reserved sampling points as N positions;
wherein the sampling rule includes: the sampling point i is outside the area with the sampling point i-1 as the center and the diagonal length of the character image as the radius, i is more than 1 and less than or equal to N.
10. The apparatus of claim 6, wherein the adding module comprises:
the character extraction sub-module is used for extracting N characters in the N character images;
the anti-cracking processing sub-module is used for carrying out anti-cracking processing on the N characters, wherein the anti-cracking processing comprises at least one of the following operations: rotation, affine transformation, image erosion, and image dilation;
And the character adding sub-module is used for respectively adding N characters obtained by the anti-cracking processing to N positions in the background image.
11. An electronic device, comprising: memory, a processor and a computer program stored on the memory and executable on the processor, which when executed by the processor, implements the steps of the method for generating a word verification code according to any one of claims 1 to 5.
12. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps in the method for generating a word verification code according to any one of claims 1 to 5.
CN201910425682.3A 2019-05-21 2019-05-21 Method and device for generating character selection verification code, electronic equipment and storage medium Active CN110246198B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910425682.3A CN110246198B (en) 2019-05-21 2019-05-21 Method and device for generating character selection verification code, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910425682.3A CN110246198B (en) 2019-05-21 2019-05-21 Method and device for generating character selection verification code, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110246198A CN110246198A (en) 2019-09-17
CN110246198B true CN110246198B (en) 2023-05-02

Family

ID=67884606

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910425682.3A Active CN110246198B (en) 2019-05-21 2019-05-21 Method and device for generating character selection verification code, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110246198B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11625576B2 (en) * 2019-11-15 2023-04-11 Shanghai United Imaging Intelligence Co., Ltd. Systems and methods for image style transformation
CN110942062B (en) * 2019-11-21 2022-12-23 杭州网易智企科技有限公司 Image verification code generation method, medium, device and computing equipment
CN111163082B (en) * 2019-12-27 2022-03-25 咪咕文化科技有限公司 Verification code generation method, verification method, electronic equipment and storage medium
CN111626124A (en) * 2020-04-24 2020-09-04 平安国际智慧城市科技股份有限公司 OCR image sample generation method, OCR image sample generation device, OCR image sample printing body verification equipment and OCR image sample printing body verification medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105022746A (en) * 2014-04-25 2015-11-04 腾讯科技(深圳)有限公司 Character library generation method, server and system
WO2016124066A1 (en) * 2015-02-05 2016-08-11 北京京东尚科信息技术有限公司 Image verification code generation method and system
CN109257168A (en) * 2018-09-21 2019-01-22 深圳市元征科技股份有限公司 A kind of generation method of picture validation code, device, equipment and medium
CN109711136A (en) * 2017-10-26 2019-05-03 武汉极意网络科技有限公司 Store equipment, identifying code Picture Generation Method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106156597A (en) * 2015-04-16 2016-11-23 深圳市腾讯计算机系统有限公司 The implementation method of a kind of identifying code, and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105022746A (en) * 2014-04-25 2015-11-04 腾讯科技(深圳)有限公司 Character library generation method, server and system
WO2016124066A1 (en) * 2015-02-05 2016-08-11 北京京东尚科信息技术有限公司 Image verification code generation method and system
CN109711136A (en) * 2017-10-26 2019-05-03 武汉极意网络科技有限公司 Store equipment, identifying code Picture Generation Method and device
CN109257168A (en) * 2018-09-21 2019-01-22 深圳市元征科技股份有限公司 A kind of generation method of picture validation code, device, equipment and medium

Also Published As

Publication number Publication date
CN110246198A (en) 2019-09-17

Similar Documents

Publication Publication Date Title
CN110246198B (en) Method and device for generating character selection verification code, electronic equipment and storage medium
WO2021258920A1 (en) Generative adversarial network training method, image face swapping method and apparatus, and video face swapping method and apparatus
US11463631B2 (en) Method and apparatus for generating face image
CN111241291B (en) Method and device for generating countermeasure sample by utilizing countermeasure generation network
CN111275784B (en) Method and device for generating image
CN110246197B (en) Verification codeword generation method and device, electronic equipment and storage medium
CN107545277B (en) Model training, identity verification method and device, storage medium and computer equipment
US8935767B2 (en) Overlay human interactive proof system and techniques
US20220180043A1 (en) Training method for character generation model, character generation method, apparatus and storage medium
CN106250755B (en) Method and device for generating verification code
CN107844696B (en) Verification code interference method and server
CN109741420B (en) Region filling method and device, electronic equipment and storage medium
CN116010899A (en) Multi-mode data processing and pre-training method of pre-training model and electronic equipment
WO2022252372A1 (en) Image processing method, apparatus and device, and computer-readable storage medium
CN114972016A (en) Image processing method, image processing apparatus, computer device, storage medium, and program product
CN114783017A (en) Method and device for generating confrontation network optimization based on inverse mapping
CN115082992A (en) Face living body detection method and device, electronic equipment and readable storage medium
KR102476334B1 (en) Diary generator using deep learning
CN116704588B (en) Face image replacing method, device, equipment and storage medium
CN110598392A (en) Man-machine verification method and device, storage medium and electronic equipment
CN117576264B (en) Image generation method, device, equipment and medium
CN115984947B (en) Image generation method, training device, electronic equipment and storage medium
CN113838159B (en) Method, computing device and storage medium for generating cartoon images
CN116596752B (en) Face image replacement method, device, equipment and storage medium
Paul Deepfakes Generated by Generative Adversarial Networks

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
GR01 Patent grant
GR01 Patent grant