CN108846274B - Security verification method, device and terminal - Google Patents

Security verification method, device and terminal Download PDF

Info

Publication number
CN108846274B
CN108846274B CN201810312164.6A CN201810312164A CN108846274B CN 108846274 B CN108846274 B CN 108846274B CN 201810312164 A CN201810312164 A CN 201810312164A CN 108846274 B CN108846274 B CN 108846274B
Authority
CN
China
Prior art keywords
picture
verification
stylized
information
image
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
CN201810312164.6A
Other languages
Chinese (zh)
Other versions
CN108846274A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201810312164.6A priority Critical patent/CN108846274B/en
Publication of CN108846274A publication Critical patent/CN108846274A/en
Application granted granted Critical
Publication of CN108846274B publication Critical patent/CN108846274B/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
    • G06F21/36User authentication by graphic or iconic representation
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2133Verifying human interaction, e.g., Captcha

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Collating Specific Patterns (AREA)
  • Editing Of Facsimile Originals (AREA)

Abstract

The invention discloses a security verification method, a security verification device and a security verification terminal, and belongs to the technical field of internet communication. The method comprises the following steps: sending a verification request; receiving and displaying an image verification code, wherein the image verification code comprises a first picture and a second picture, the second picture is a picture cut from a stylized picture, and the first picture is a picture left after the second picture is cut from the stylized picture; the stylized picture is a picture of an original picture after style conversion; receiving the verification operation of the user on the second picture and generating verification information; and displaying a safety verification result according to the verification result of the verification information. The image verification code is generated based on the stylized picture obtained after the style conversion, and the machine cracking resistance of the image verification code is improved.

Description

Security verification method, device and terminal
Technical Field
The invention relates to the technical field of internet communication, in particular to a security verification method, a security verification device and a security verification terminal.
Background
At present, the application of the verification code is more common, the verification code is used for distinguishing whether a user is a machine or a human, and phenomena of malicious password cracking, ticket swiping, forum water filling and the like can be effectively prevented.
An image verification code is a type of verification code, and an existing image verification code is a verification code formed by scratching a local block on an original image, and a user is required to move the scratched local block from a new position to an original position during verification, so that the image verification code is restored to the original image.
In the process of implementing the invention, the inventor finds that the prior art has at least the following problems:
in the related art, the machine obtains a difference map by comparing the image obtained after the local block is scratched with an original image, and can directly obtain a new position and an original position of the scratched local block based on the difference map, so that the local block at the new position can be moved to the original position of the local block to be cracked, and the verification code has poor anti-cracking capability. Although the prior art adopts a means of adding random noise processing to the original image to improve the anti-attack capability of the image verification code, after the processing such as noise reduction, the machine can still easily obtain the new position and the original position of the local block to be removed, so the anti-attack capability is still poor.
Disclosure of Invention
In order to solve the problems in the prior art, embodiments of the present invention provide a security verification method, apparatus, terminal, and storage medium. The technical scheme is as follows:
in a first aspect, a security verification method is provided, the method including:
sending a verification request;
receiving and displaying an image verification code, wherein the image verification code comprises a first picture and a second picture, the second picture is a picture cut from a stylized picture, and the first picture is a picture left after the second picture is cut from the stylized picture; the stylized picture is a picture of an original picture after style conversion;
receiving the verification operation of the user on the second picture and generating verification information;
and displaying a safety verification result according to the verification result of the verification information.
In a second aspect, a security verification method is provided, the method comprising:
receiving an authentication request;
responding to the verification request to obtain an image verification code, wherein the image verification code comprises a first picture and a second picture, the second picture is a picture cut from a stylized picture, and the first picture is a picture left after the second picture is cut from the stylized picture; the stylized picture is a picture of an original picture after style conversion;
sending the image verification code and receiving verification information; the verification information is generated according to the verification operation of the user on the second picture;
and generating a verification result according to the verification information, and sending the verification result.
In a third aspect, there is provided a security authentication apparatus, the apparatus comprising:
the request sending module is used for sending a verification request;
the verification code receiving module is used for receiving and displaying an image verification code, wherein the image verification code comprises a first picture and a second picture, the second picture is a picture cut from a stylized picture, and the first picture is a picture left after the second picture is cut from the stylized picture; the stylized picture is a picture of an original picture after style conversion;
a verification information generation module for receiving the verification operation of the user on the second picture and generating verification information
And the verification result display module is used for displaying the result of the safety verification according to the verification result of the verification information.
In a fourth aspect, there is provided a security authentication apparatus, the apparatus comprising:
a request receiving module for receiving a verification request;
a second obtaining module, configured to obtain an image verification code in response to the verification request, where the image verification code includes a first picture and a second picture, the second picture is a picture cut from a stylized picture, and the first picture is a picture remaining after the second picture is cut from the stylized picture; the stylized picture is a picture of an original picture after style conversion;
the first sending module is used for sending the image verification code;
the second receiving module is used for receiving the verification information; the verification information is generated according to the verification operation of the user on the second picture;
and the verification result sending module is used for generating a verification result according to the verification information and sending the verification result.
In a fifth aspect, a terminal is provided, including: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the steps of:
sending a verification request;
receiving and displaying an image verification code, wherein the image verification code comprises a first picture and a second picture, the second picture is a picture cut from a stylized picture, and the first picture is a picture left after the second picture is cut from the stylized picture; the stylized picture is a picture of an original picture after style conversion;
receiving the verification operation of the user on the second picture and generating verification information;
and displaying a safety verification result according to the verification result of the verification information.
In a sixth aspect, a computer storage medium is provided that stores computer program instructions that, when executed, implement the security authentication method described above.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, because the stylized picture obtained by style transformation is difficult to obtain the original picture through inverse transformation, the image verification code generated based on the stylized picture can make the machine obtain a differential image by comparing the image verification code with the original picture so as to determine the position of the second picture in the original picture more difficult, and the machine cracking resistance of the image verification code is improved.
In addition, in the whole security verification process, a user can only see the image verification code but cannot see the complete stylized picture, so that the position information of the second picture in the stylized picture cannot be obtained by comparing the complete stylized picture with the image verification code for a machine, and the machine cracking resistance of the image verification code is improved.
In addition, in the embodiment of the invention, the human eyes can easily identify the matching position of the second picture in the first picture, so that the safety verification is completed by moving the second picture, and the experience of people as users is not influenced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic illustration of an implementation environment provided by an embodiment of the invention;
FIG. 2 is an architecture diagram of a server provided by an embodiment of the present invention;
FIG. 3 is a flow chart of a security verification method provided by an embodiment of the present invention;
FIG. 4 is a flowchart of a method for generating an image verification code according to an embodiment of the present invention;
FIG. 5 is an exemplary diagram of performing a style transformation on an original picture to generate a stylized picture by using a deep convolutional neural network model according to the embodiment;
FIG. 6 is a flowchart of a method for generating a verification result according to verification information according to an embodiment of the present invention;
fig. 7 is a flowchart of a method for generating a verification result of verification information according to a pixel difference according to an embodiment of the present invention;
FIG. 8 is a flow chart of another security verification method provided by embodiments of the present invention;
FIG. 9 is a flow diagram of another security verification method provided by embodiments of the present invention;
FIG. 10 is a flow diagram of another security verification method provided by embodiments of the present invention;
fig. 11 is a block diagram of a security authentication apparatus according to an embodiment of the present invention;
FIG. 12 is a block diagram of a verification code generation module provided by embodiments of the present invention;
FIG. 13 is a block diagram of a verification result generation module provided by embodiments of the present invention;
FIG. 14 is a block diagram of another security authentication device provided by an embodiment of the present invention;
fig. 15 is a schematic structural diagram of a terminal according to an embodiment of the present invention;
fig. 16 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Referring to fig. 1, a schematic diagram of an implementation environment provided by an embodiment of the present invention is shown, where the implementation environment includes: terminal 01 and server 02.
It should be noted that the security verification method according to the embodiment of the present invention may be applied to the security verification apparatus according to the embodiment of the present invention. Among them, the terminal 01 may include: smart phones, tablet computers, electronic book readers, MP3 players (Moving Picture Experts Group Audio Layer III, motion Picture Experts compression standard Audio Layer IV), MP4 players (Moving Picture Experts Group Audio Layer IV, motion Picture Experts compression standard Audio Layer 4), laptop portable computers, car-mounted computers, wearable devices, desktop computers, set-top boxes, smart televisions, all-in-one machines, and the like.
The server 02 may be one server or a server cluster composed of several servers.
The server 02 can establish a communication connection with the terminal 01 through a network. The network may be a wireless network or a wired network.
In one example, as shown in fig. 2, when the server 02 is a cluster architecture, the server 02 may include: webpage server 021, identifying code server 022, picture storage server 023, stylized server 024 and authentication server 025, wherein:
the web server 021 is used to interact with the terminal 01, the captcha server 022 and the authentication server 025. For example, the web server 021 receives an authentication request transmitted from the user through the terminal 01, and transmits an image authentication code or the like to the terminal 01. The web server 021 may also receive the image authentication code transmitted from the authentication code server 022 and the verification result transmitted from the authentication server 025.
The captcha server 022 is for providing a function of generating an image captcha. The picture storage server 023 is used to provide a function of storing an original picture used to generate the image authentication code. The stylization server 024 is used to provide a function of performing a style conversion on an original picture. The authentication server 025 is used to provide the functions of security authentication.
The servers can establish communication connection through a network. The network may be a wireless network or a wired network.
Referring to fig. 3, a flowchart of a security verification method according to an embodiment of the present invention is shown, which can be applied to the implementation environment shown in fig. 1. As shown in fig. 3, the security authentication method may include:
step 301, a verification request is sent.
When a user needs to log in, an authentication request can be sent to the server through the terminal, and the authentication code is pulled from the server through the authentication request.
Step 302, receiving and displaying the image verification code.
In an embodiment of the present invention, the terminal receives and displays an image verification code obtained based on the verification request, where the image verification code includes a first picture and a second picture, the second picture is a picture cut from a stylized picture, and the first picture is a picture remaining after the second picture is cut from the stylized picture.
The stylized picture is a picture obtained by performing style conversion on an original picture used for generating the image verification code.
Style transformation may refer to converting an image in an original picture into an image having a particular style through some algorithm, thereby generating a stylized picture. The style of the image is mainly embodied by detail textures, expression modes of lines and coloring styles in the image, so the style conversion of the image is to convert the textures and the coloring styles in the original image into a certain specified style, namely, the style of the reference style image is converted into another input image, for example, one reference image is selected, and photos shot in different illumination, different time periods and different seasons can be artistically transferred into different styles.
The stylized picture of the original picture is obtained after the original picture is subjected to style transformation, and the stylized picture is difficult to be subjected to inverse transformation by a common machine so as to obtain the original picture.
In the embodiment of the present invention, the image verification code may be generated by the method shown in fig. 4. Fig. 4 is a flowchart of a method for generating an image verification code according to an embodiment of the present invention, and as shown in fig. 4, the method includes:
step 401, an original picture for generating an image verification code is acquired.
In the embodiment of the present invention, the original picture is a picture pre-stored in the database, and the mode of acquiring the original picture may be random acquisition or acquisition according to a preset rule.
Step 402, obtaining a stylized picture according to the original picture.
In the embodiment of the present invention, the obtaining of the stylized picture may be a stylized picture generated in real time according to an original picture under the trigger of the verification request, or may be a stylized picture generated in advance according to the original picture, and the stylized picture generated in advance may be stored in a database.
In the embodiment of the invention, the original picture can be subjected to style transformation by adopting a deep convolutional neural network model so as to generate a stylized picture.
For example, a pre-trained 19-layer VGG network (abbreviated as VGG-19) may be adopted, where the VGG network includes feature spaces provided by 16 convolutional layers and 5 pooling layers, the convolutional kernel size of each convolutional layer is 3, the step size is 1, and a nonlinear activation layer of ReLU is arranged behind each convolutional layer, and the output after the function processing is the feature map obtained by stylizing the image.
The style transformation is the style of changing a common image into another style image, and the basic principle is as follows: given a picture X and a stylistic image S, a picture Y is found such that Y is similar in content to X, and also similar in style to S. The content and style of the picture may be extracted through a well-trained VGG-19 network.
Fig. 5 is an exemplary diagram of performing style transformation on an original picture by using a deep convolutional neural network model to generate a stylized picture, where a picture pointed by an arrow is the original picture, a picture at the root of the arrow is a style picture, i.e., a sample reference picture for style transformation, and a picture below the arrow is the stylized picture output by the deep convolutional neural network model.
For a trained VGG-19 network, a plurality of groups of feature maps can be obtained by taking a picture A as input, the structure of the feature maps is [ H, W, C ], wherein H and W respectively represent the height and width of the feature maps, C represents the number of the feature maps, the [ H, W, C ] can represent the content of A, after deformation, a multi-dimensional array F (X) with the structure of [ H, W, C ] is obtained, and a Gram matrix G (F (X)) is obtained for the multi-dimensional array F (X), so that the texture features, namely the style of X can be obtained.
After the extraction mode of the content and the style is defined, the problem of image style transformation can be solved in an optimization mode. Assuming that Y is an image synthesized from the content of X and the genre of S, the content error of Y and X is:
Figure BDA0001622727670000071
the style error of Y and S is:
Figure BDA0001622727670000072
so that the overall error is:
LA=α·LC+β·LS
wherein, alpha is the proportion of the content in the whole error, beta is the proportion of the style in the whole error, and the difference of the values of alpha and beta represents the difference of the emphasis points of the content and the style.
The style transformation algorithm may be based on iterative optimization, specifically: 1) randomly initializing an image Y; 2) find the wholeBody error LA(ii) a 3) Adjusting the pixel value of each point of Y according to a gradient descent algorithm; 4) if L isAAnd stopping iteration when the convergence is smaller than a preset threshold value, otherwise, continuing the step 2).
Since the deep convolutional neural network usually has at least several million parameters, such complicated parameter transformation makes it difficult to perform inverse transformation on the stylized picture obtained after the style transformation to obtain the original picture.
In step 403, a partial picture is cut from the stylized picture as a second picture.
The stylized picture is a picture obtained by cutting out the second picture as a first picture, and it should be noted that the shape and size of the second picture may be randomly generated, for example, the shape of the second picture may be a quadrangle, a pentagon, an ellipse, a circle, a triangle, an irregular figure, etc., the size of the second picture may be changed by randomly generated shape parameters, and the randomly generated shape parameters may be a radius of the circle, a major axis and a minor axis of the ellipse, a side length of the triangle, etc.
In the embodiment of the invention, in order to increase the difficulty of the machine for cracking the image verification code, the shape and/or size of the second picture in the image verification code is generated in a random mode when the security verification is initiated every time, so that the shape and size of the second picture in the image verification code displayed by the terminal in each security verification can be difficultly predicted, and the anti-cracking capability of the image verification can be favorably improved.
Step 404, obtaining first position information of the second picture, where the first position is a position of the second picture in the stylized picture.
After a second picture is cut from the stylized picture, the position information of the second picture in the stylized picture is acquired as first position information. It will be appreciated that the first location information may be used to represent the original location of the second picture.
The first position information may be a position coordinate of the center position of the second picture in the stylized picture.
Step 405, moving the second picture from the first position to a second position to generate the image verification code, wherein the second position is any position in the first picture.
It will be appreciated that the second position is the position where the second picture is newly placed.
In order to improve the anti-cracking capability of the image verification code, before the image verification code is generated, the second picture moved to the second position may be rotated by a certain angle or turned over. Of course, a simple pattern or color filling may also be performed on a blank region (i.e., a default region) in the first picture to increase the difficulty of finding the region by a machine.
In the embodiment of the invention, in order to increase the difficulty of the machine in cracking the image verification code, when the security verification is initiated each time, the original position (namely the first position) and the newly placed position (namely the second position) of the second picture in the image verification code are generated in a random mode, so that the difficulty of the machine in obtaining the original position and the newly placed position of the second picture is increased, and the anti-cracking capability of the image verification code is improved.
In the embodiment of the present invention, the image verification code generated based on the stylized picture obtained after the style transformation includes the first picture and the second picture, and the second picture can move relative to the first picture, or operate the second picture and turn over the second picture, or rotate around a certain fixed point by a certain angle. For example, selecting the second picture to drag the second picture can move the second picture relative to the first picture; clicking the second picture can turn the second picture over; clicking a certain point in the second picture can rotate it by a certain angle.
In the embodiment of the present invention, before step 302, the terminal may further receive an original picture used for generating the image verification code and display the original picture, so that the user can see the original picture before seeing the image verification code (the stylized second picture and the stylized first picture).
Step 303, receiving a verification operation of the user on the second picture and generating verification information.
In the embodiment of the present invention, the user's verification operation on the second picture includes moving the second picture, for example, selecting the second picture and dragging the second picture to a default position of the first picture. Of course, it is understood that the above-mentioned verification operation may also include flipping the second picture and rotating the second picture.
In an embodiment of the present invention, the verification information includes third position information of the second picture, where the third position information is position information of the second picture after the user operates the second picture.
The third position information may be a position coordinate of the center position of the second picture after the movement in the first picture.
The verification information may further include screen information of the second picture and rotation angle information.
And step 304, displaying a safety verification result according to the verification result of the verification information.
And the terminal acquires a verification result of the verification information and displays the result of the current safety verification according to the verification result. It can be understood that the result of the security verification includes that the security verification fails and the security verification passes, and the terminal can display the result of the security verification to the user in a text form, and of course, can also inform the user in a voice reporting manner.
In the embodiment of the present invention, the verification result of the verification information may be generated by using the method shown in fig. 6. Fig. 6 is a flowchart of a method for generating a verification result according to verification information according to an embodiment of the present invention, and as shown in fig. 6, the method includes:
step 601, obtaining first pixel information according to the third position information of the second picture.
And the terminal generates and acquires verification information when receiving the verification operation of the user on the second picture, wherein the verification information comprises third position information of the second picture, and the third position information is the position information of the second picture after the user operates the second picture.
The terminal further acquires first pixel information according to the acquired third position information of the second picture, and the first pixel information is a pixel value of the center position of the second picture after the movement if the third position information is a position coordinate of the center position of the second picture after the movement in the first picture.
Step 602, obtaining second pixel information according to the first position information of the second picture.
When the image verification code is generated, the first position information of the second picture, namely the original position information of the second picture on the stylized picture, is acquired. In the process of generating the verification result, the terminal further acquires second pixel information according to the acquired first position information of the second picture, for example, when the first position information is a position coordinate of the center position of the second picture in the stylized picture, the second pixel information is a pixel value of the center position of the second picture.
Step 603, calculating a pixel difference value according to the first pixel information and the second pixel information.
And after acquiring the first pixel information and the second pixel information, the terminal calculates a pixel difference value of the first pixel value and the second pixel value.
Step 604, generating a verification result of the verification information according to the pixel difference.
And after the pixel difference value of the first pixel value and the second pixel value is calculated, the terminal generates a corresponding verification result of the verification information according to the pixel difference value.
In the embodiment of the present invention, the method shown in fig. 7 may be adopted to generate the verification result of the verification information according to the pixel difference. Fig. 7 is a flowchart of a method for generating a verification result of verification information according to a pixel difference according to an embodiment of the present invention, and as shown in fig. 7, the method includes:
step 701, determining whether the pixel difference value is greater than a preset threshold value.
After calculating the pixel difference between the first pixel value and the second pixel value, the terminal determines whether the pixel difference is greater than a preset threshold, where the preset threshold is a preset pixel difference, and for example, the preset threshold may be 5 pixels.
In step 702, if the pixel difference is greater than a preset threshold, a result indicating that the verification fails is generated.
If the pixel difference value is greater than the preset threshold, for example, after the user moves the second picture, the difference value between the pixel value of the center position of the moved second picture acquired by the terminal and the pixel value of the center position of the second picture in the stylized picture is greater than the preset threshold, the user who performs the security verification at present can be judged to be a machine, and thus a result that the verification fails is generated. And after the result that the verification fails is generated, the terminal displays that the security verification fails to pass to the user according to the result.
In step 703, if the pixel difference is smaller than or equal to the preset threshold, a result of passing the verification is generated.
If the pixel difference is smaller than or equal to the preset threshold, for example, after the user moves the second picture, the difference between the pixel value of the center position of the second picture after the movement, which is acquired by the terminal, and the pixel value of the center position of the second picture in the stylized picture is smaller than or equal to the preset threshold, it can be determined that the user performing the security verification at present is not a machine, and a result that the verification passes is generated. And after the verification result is generated, the terminal displays the passing of the security verification to the user according to the result.
It should be noted that, in order to improve the anti-cracking capability of the image verification code, it may be considered to further perform security verification according to the picture information and the rotation angle of the second picture on the basis of performing security verification according to the pixel difference, and when the pixel difference, the picture information, and the rotation angle all meet the set requirements, a result that the current verification passes is generated.
In summary, according to the security verification method provided by the embodiment of the present invention, because the stylized picture obtained by the style transformation is difficult to obtain the original picture through inverse transformation, the image verification code generated based on the stylized picture can make it difficult for the machine to determine the position of the second picture in the original picture by comparing the image verification code with the original picture to obtain the differentiated image, and improve the machine-cracking resistance of the image verification code.
In addition, in the whole security verification process, a user can only see the image verification code but cannot see the complete stylized picture, so that the position information of the second picture in the stylized picture cannot be obtained by comparing the complete stylized picture with the image verification code for a machine, and the machine cracking resistance of the image verification code is improved.
In addition, in the embodiment of the invention, the human eyes can easily identify the matching position of the second picture in the first picture, so that the safety verification is completed by moving the second picture, and the experience of people as users is not influenced.
Referring to fig. 8, a flow chart of another security verification method provided by the embodiment of the invention is shown, which can be applied to the implementation environment shown in fig. 1. As shown in fig. 8, the security authentication method may include:
step 801, receiving an authentication request sent by a terminal.
The server receives an authentication request which is sent by the terminal and used for pulling an authentication code, wherein the authentication code can be used for carrying out security authentication on a user of the terminal.
Step 802, responding to the verification request to obtain an image verification code.
And after receiving the verification request, the server responds to the verification request to acquire the image verification code. In an embodiment of the present invention, the image verification code includes a first picture and a second picture, the second picture is a picture cut from the stylized picture, and the first picture is a picture remaining after the second picture is cut from the stylized picture.
The stylized picture is a picture obtained by performing style conversion on an original picture used for generating the image verification code.
The generation manner of the image verification code in this step may refer to the method embodiment shown in fig. 4, and is not described herein again.
Step 803, sending the image verification code and receiving verification information.
And after responding to the verification request, the server generates and acquires an image verification code, and then sends the image verification code to the terminal, so that the terminal displays the image verification code to the user and requests the user to perform verification operation on the second picture to generate verification information.
In the embodiment of the present invention, the operation of the terminal user for verifying the second picture includes a moving operation performed on the second picture by the user, and may further include a flipping operation and a rotating operation performed on the second picture by the user.
In this embodiment of the present invention, the authentication information received by the server includes third location information of the second picture, where the third location information is location information of the second picture after the user operates the second picture.
The third position information may be a position coordinate of the center position of the second picture after the movement in the first picture.
The verification information may further include screen information of the second picture and rotation angle information.
In the embodiment of the present invention, the terminal may send the verification information in response to an operation instruction of the user, where the operation instruction may be a submission instruction issued by the user clicking a submission button.
It should be noted that, because the pictures after the style conversion may have a certain abstraction, the first picture and the second picture displayed to the user by the terminal may make the visual perception of the user uncomfortable, so as to improve the experience effect of the user, so that the user who is a person may not feel obtrusive when seeing the image verification code, and ensure that the user who is a person can pass the safety verification smoothly.
In the embodiment of the present invention, the server may send the acquired image verification code to the terminal according to a request for displaying the image verification code sent by the terminal, may send the image verification code to the terminal after the image verification code is acquired, may set a time interval between sending the original picture to the terminal and sending the image verification code to the terminal, and sends the image verification code to the terminal when the time interval reaches. Of course, it will be appreciated that the server should be able to complete the image verification code generation operation within the time interval.
And step 804, generating a verification result according to the verification information, and sending the verification result.
After receiving the verification information returned by the terminal, the server generates a verification result according to the verification information and sends the verification result to the terminal, so that the terminal displays a safety verification result to a user according to the verification result of the received verification information.
In this step, the generation manner of the verification result may refer to the method embodiments shown in fig. 6 and fig. 7, and is not described herein again.
In one example, when the server is the cluster architecture shown in fig. 2, the security authentication method may include the following steps as shown in fig. 9:
in step 901, the terminal sends a verification request to the web server.
When a user needs to log in the server, the terminal sends an authentication request to the web server 021.
Accordingly, the web server 021 receives the authentication request transmitted from the terminal 01.
Step 902, the web server sends a request for pulling the verification code to the verification code server.
The web server 021 receives an operation request sent by the user through the terminal 01, and sends a request for pulling the authentication code to the authentication code server 022 according to the operation request, where the request is used to acquire the authentication code for security authentication from the authentication code server 022.
Accordingly, the captcha server 022 receives the request for pulling the captcha sent by the web server 021.
Step 903, the verification code server obtains an original picture used for generating the image verification code from the picture storage server, and sends the original picture to the webpage server.
In the embodiment of the present invention, a large number of original pictures are stored in the picture storage server 023. The manner in which the captcha server 022 obtains the original picture used for generating the image captcha may be random or according to a predetermined rule.
The authentication code server 022 obtains the original picture from the picture storage server 023, and then sends the original picture to the web server 021.
In an embodiment of the present invention, the captcha server 022 may further send the original picture to a stylization server 024.
Accordingly, the web server 021 and the stylization server respectively receive the original pictures sent by the verification code server 022.
And step 904, the web server sends the original picture to the terminal.
The web server 021, after receiving the original picture sent by the captcha server 022, sends the original picture to the terminal 01, so that the terminal 01 displays the original picture to the user.
Step 905, the stylized server performs style transformation on the original picture to generate a stylized picture.
After receiving the original picture sent by the verification code server 022, the stylization server 024 performs style transformation on the original picture, and the picture after the style transformation is a stylized picture.
In the embodiment of the invention, the input original picture can be subjected to style transformation by adopting a deep convolutional neural network model.
For example, a pre-trained 19-layer VGG network (abbreviated as VGG-19) may be adopted, where the VGG network includes feature spaces provided by 16 convolutional layers and 5 pooling layers, the convolutional kernel size of each convolutional layer is 3, the step size is 1, and a nonlinear activation layer of ReLU is arranged behind each convolutional layer, and the output after the function processing is the feature map obtained by stylizing the image.
The style transformation is the style of changing a common image into another style image, and the basic principle is as follows: given a picture X and a stylistic image S, a picture Y is found such that Y is similar in content to X, and also similar in style to S. The content and style of the picture may be extracted through a well-trained VGG-19 network.
For a trained VGG-19 network, a plurality of groups of feature maps can be obtained by taking a picture A as input, the structure of the feature maps is [ H, W, C ], wherein H and W respectively represent the height and width of the feature maps, C represents the number of the feature maps, the [ H, W, C ] can represent the content of A, after deformation, a multi-dimensional array F (X) with the structure of [ H, W, C ] is obtained, and a Gram matrix G (F (X)) is obtained for the multi-dimensional array F (X), so that the texture features, namely the style of X can be obtained.
After the extraction mode of the content and the style is defined, the problem of image style transformation can be solved in an optimization mode. Assuming that Y is an image synthesized from the content of X and the genre of S, the content error of Y and X is:
Figure BDA0001622727670000141
the style error of Y and S is:
Figure BDA0001622727670000142
so that the overall error is:
LA=α·LC+β·LS
wherein, alpha is the proportion of the content in the whole error, beta is the proportion of the style in the whole error, and the difference of the values of alpha and beta represents the difference of the emphasis points of the content and the style.
The style transformation algorithm may be based on iterative optimization, specifically: 1) randomly initializing an image Y; 2) determining the overall error LA(ii) a 3) Adjusting the pixel value of each point of Y according to a gradient descent algorithm; 4) if L isAAnd stopping iteration when the convergence is smaller than a preset threshold value, otherwise, continuing the step 2).
Since the deep convolutional neural network usually has at least several million parameters, such complicated parameter transformation makes it difficult to perform inverse transformation on the stylized picture obtained after the style transformation to obtain the original picture.
Step 906, the stylized server sends the stylized picture to the verification code server.
The stylized server 024 performs style conversion on the original picture to generate a stylized picture, and then sends the stylized picture to the captcha server 022.
Accordingly, the captcha server 022 receives the stylized picture sent by the stylized server 024.
Step 907, the verification code server generates an image verification code according to the stylized picture.
After acquiring the stylized picture, the captcha server 022 generates an image captcha according to the stylized picture, where the image captcha includes a first picture and a second picture, the second picture is a picture cut from the stylized picture, and the first picture is a picture left after the second picture is cut from the stylized picture. The second picture can move relative to the first picture, or the second picture can be operated and also turned over, or the second picture can rotate around a certain fixed point by a certain angle. For example, selecting the second picture to drag the second picture can move the second picture relative to the first picture; clicking the second picture can turn the second picture over; clicking a certain point in the second picture can rotate it by a certain angle.
The generation manner of the image verification code may refer to the method embodiment shown in fig. 4, and is not described herein again.
It should be noted that, in the process of generating the image captcha, the captcha server 022 obtains first position information of the second picture, where the first position is a position of the second picture in the stylized picture. The authentication code server 022 transmits the first location information of the second picture to the authentication server 025.
Accordingly, the authentication server 025 receives the first location information of the second picture transmitted by the authentication code server 022.
Step 908, the authentication code server sends the image authentication code to the web server.
The captcha server 022 transmits the image captcha to the web server 021 after completing the generation of the image captcha.
Accordingly, the web server 021 receives the image captcha transmitted from the captcha server 022.
In step 909, the web server sends the image verification code to a terminal, which is configured to receive a verification operation on the second picture and generate verification information.
After receiving the image verification code, the web server 021 sends the image verification code to the terminal 01, so that the terminal 01 displays the image verification code to the user, accepts the verification operation of the user on the second picture and generates verification information.
The user's operation of verifying the second picture includes moving the second picture, for example, selecting the second picture and dragging the second picture to a certain position. Of course, it is understood that the above-mentioned verification operation may also include flipping the second picture and rotating the second picture.
The verification information includes position information of the second picture, and the position information of the second picture is position information of the second picture after the user operates the second picture.
Of course, the verification information may also include the picture information of the second picture and the rotation angle information.
Accordingly, the terminal 01 receives the image authentication code transmitted from the web server 021.
In the embodiment of the present invention, a timer may be set in the web server 021, where the timer is used to set a time interval between when the web server 021 sends the original picture and when the preset time interval is reached, the web server 021 sends the image verification code to the terminal.
It is understood that the web server may also send the image verification code to the terminal after receiving the image verification code sending request sent by the terminal.
Step 910, the terminal displays the image verification code.
The terminal 01, after receiving the image authentication code, displays the image authentication code so that the user can see the image authentication code.
And 911, the terminal monitors the second picture, receives the verification operation of the user on the second picture and generates verification information.
The verification information includes third position information of the second picture, and the third position information of the second picture is position information of the second picture after the user operates the second picture.
Of course, the verification information may also include the picture information of the second picture and the rotation angle information.
Step 912, sending the verification information to the web server, and waiting for the verification result sent by the web server.
The terminal responds to the operation instruction of the user to send the verification information, and if the terminal user clicks a submit button and issues a submit instruction, the terminal sends the generated verification information to the web server 021 and waits for a verification result returned by the web server 021.
Accordingly, the web server 021 receives the authentication information transmitted from the terminal 01.
Step 913, the web server sends the verification information to the verification server.
Correspondingly, the authentication server receives the authentication information.
Step 914, the verification server performs security verification according to the verification information and sends the verification result to the web server.
After receiving the verification information, the verification server 025 performs security verification to generate a verification result, and for a specific generation process of the verification result, please refer to fig. 6 and fig. 7, which is not described herein again.
After generating the verification result, the verification server 025 transmits the verification result to the web server 021. The verification result comprises verification failure and verification passing.
Accordingly, the web server 021 receives the verification result.
Step 915, the web server sends the verification result to the terminal.
And the corresponding terminal receives the verification result sent by the webpage server.
And step 916, the terminal displays the result of the security verification according to the verification result.
After receiving the verification result, the web server 021 sends the verification result to the terminal 01, so that the terminal displays the result of the security verification according to the verification result. Specifically, when the verification result is that the verification fails, the terminal displays the result that the security verification fails to pass to the user, and when the verification result is that the verification passes, the terminal displays the result that the security verification passes to the user.
Referring to fig. 10, a flowchart of another security verification method according to an embodiment of the invention is shown. The embodiment can be applied to the application environment shown in fig. 2, and the security authentication method is implemented by the terminal and each server shown in fig. 2. As shown in fig. 10, the security authentication method includes:
step 1001, the stylization server obtains an original picture from the picture storage server.
Step 1002, the stylized server performs style transformation on the original picture to generate a stylized picture, and sends the generated stylized picture to the picture storage server. For details about the original picture being subjected to the style transformation to generate the stylized picture, refer to step 905, which is not described herein again.
Correspondingly, the picture storage server receives the stylized picture sent by the stylized server.
And 1003, the picture storage server stores the stylized picture and the corresponding relation between the original picture and the stylized picture.
After the image storage server receives the stylized image, the corresponding relation between the original image and the stylized image is established, and the corresponding relation is stored, so that the stylized image corresponding to the original image can be found subsequently according to the acquired original image.
In step 1004, the terminal sends a verification request to the web server.
Step 1005, the web server sends a request for pulling the verification code to the verification code server.
Step 1006, the verification code server obtains an original picture for generating the image verification code from the picture storage server, and sends the original picture to the web server.
Step 1007, the web server sends the original picture to the terminal.
It should be noted that the web server may not send the original picture to the terminal, that is, step 1008 may be directly executed after step 1006.
Step 1008, the verification code server obtains the stylized picture corresponding to the original picture from the picture storage server.
And step 1009, the verification code server generates an image verification code according to the stylized picture.
Step 1010, the verification code server sends the image verification code to a web server.
In step 1011, the web server sends the image verification code to the terminal.
Step 1012, the terminal receives and displays the image verification code.
And step 1013, the terminal receives the verification operation of the user on the second picture and generates verification information.
Step 1014, the terminal sends the verification information to the web server and waits for the verification result sent by the web server.
In step 1015, the web server sends the verification information to the verification server.
Step 1016, the verification server performs security verification according to the verification information and sends the verification result to the web server.
Step 1017, the web server sends the verification result to the terminal.
And step 1018, the terminal displays the result of the security verification according to the verification result.
Specifically, step 1009 to step 1018 may refer to step 907 to step 916, which are not described herein.
In summary, according to the security verification method provided by the embodiment of the present invention, because the stylized picture obtained by the style transformation is difficult to obtain the original picture through inverse transformation, the image verification code generated based on the stylized picture can make it difficult for the machine to determine the position of the second picture in the original picture by comparing the image verification code with the original picture to obtain the differentiated image, and improve the machine-cracking resistance of the image verification code.
In addition, in the whole security verification process, a user can only see the image verification code but cannot see the complete stylized picture, so that the position information of the second picture in the stylized picture cannot be obtained by comparing the complete stylized picture with the image verification code for a machine, and the machine cracking resistance of the image verification code is improved.
In addition, in the embodiment of the invention, the human eyes can easily identify the matching position of the second picture in the first picture, so that the safety verification is completed by moving the second picture, and the experience of people as users is not influenced.
Referring to fig. 11, a block diagram of a security verification apparatus according to an embodiment of the present invention is shown, where the security verification apparatus has a function of implementing a terminal side in the foregoing method embodiment, and the function may be implemented by hardware or by hardware executing corresponding software. As shown in fig. 11, the security authentication apparatus 1100 may include: a request sending module 1101, a verification code receiving module 1102, a verification information generating module 1103 and a verification result displaying module 1104.
A request sending module 1101, configured to send a verification request.
The verification code receiving module 1102 is configured to receive and display an image verification code, where the image verification code includes a first picture and a second picture, the second picture is a picture cut from a stylized picture, and the first picture is a picture left after the second picture is cut from the stylized picture; the stylized picture is a picture of an original picture after the style transformation.
Optionally, the original picture may be input into a deep convolutional neural network model for style transformation to obtain a stylized picture.
And a verification information generating module 1103, configured to receive a verification operation performed on the second picture by the user and generate verification information.
The verification information comprises third position information of the second picture, and the third position information is the position information of the second picture after the user operates the second picture.
And the verification result display module 1104 is configured to display a result of the security verification according to the verification result of the verification information.
Optionally, as shown in fig. 11, the apparatus may further include a verification code generation module 1105 for generating an image verification code. As shown in fig. 12, the verification code generation module 1105 may include: a first obtaining module 1105a, a stylized picture obtaining module 1105b, a cropping module 1105c, a first location module 1105d, and a first generating submodule 1105e, wherein,
a first obtaining module 1105a, configured to obtain an original picture used for generating an image verification code.
A stylized picture obtaining module 1105b, configured to obtain a stylized picture according to the original picture.
A cutting module 1105c, configured to cut a local picture from the stylized picture as the second picture.
The first position module 1105d is configured to obtain first position information of the second picture, where the first position is a position of the second picture in the stylized picture.
The first generating sub-module 1105e is configured to move the second picture from the first position to a second position to generate the image verification code, where the second position is any position in the first picture.
Optionally, as shown in fig. 11, the apparatus may further include a verification result generating module 1106 configured to generate a verification result of the verification information. As shown in fig. 13, the check result generation module 1106 may include: a first pixel acquisition module 1106a, a second pixel acquisition module 1106b, a pixel difference calculation module 1106c and a second generation submodule 1106d, wherein,
the first pixel obtaining module 1106a is configured to obtain first pixel information according to the third position information of the second picture.
In this embodiment of the present invention, the verification information generated by the verification information generating module 1103 includes third position information of the second picture, where the third position information is position information of the second picture after the user operates the second picture.
The second pixel obtaining module 1106b is configured to obtain second pixel information according to the first position information of the second picture.
A pixel difference calculating module 1106c, configured to calculate a pixel difference according to the first pixel information and the second pixel information.
The second generating sub-module 1106d is configured to generate a verification result of the verification information according to the pixel difference.
Optionally, as shown in fig. 11, the apparatus may further include a first receiving module 1107, where the first receiving module 1107 is configured to receive and display an original picture used for generating the image verification code.
Referring to fig. 14, a block diagram of another security verification apparatus provided in an embodiment of the present invention is shown, where the apparatus has a function of implementing the server side in the above method embodiment, and the function may be implemented by hardware, or by hardware executing corresponding software. As shown in fig. 14, the security authentication apparatus 1400 may include: a request receiving module 1401, a second obtaining module 1402, a first sending module 1403, a second receiving module 1404 and a check result sending module 1405.
A request receiving module 1401 for receiving an authentication request.
A second obtaining module 1402, configured to obtain an image verification code in response to the verification request, where the image verification code includes a first picture and a second picture, where the second picture is a picture cut from the stylized picture, and the first picture is a picture remaining after the second picture is cut from the stylized picture; the stylized picture is a picture obtained by performing style conversion on an original picture.
A first sending module 1403, configured to send the image verification code.
A second receiving module 1404, configured to receive the verification information; the verification information is generated according to a verification operation of the user on the second picture.
A verification result sending module 1405, configured to generate a verification result according to the verification information, and send the verification result.
In summary, according to the security verification apparatus provided by the embodiment of the present invention, because the stylized picture obtained by the style transformation is difficult to obtain the original picture through the inverse transformation, the image verification code generated based on the stylized picture can make it difficult for the machine to determine the position of the second picture in the original picture by comparing the image verification code with the original picture to obtain the differentiated image, and thus the machine-cracking resistance of the image verification code is improved.
In addition, in the whole security verification process, a user can only see the image verification code but cannot see the complete stylized picture, so that the position information of the second picture in the stylized picture cannot be obtained by comparing the complete stylized picture with the image verification code for a machine, and the machine cracking resistance of the image verification code is improved.
In addition, in the embodiment of the invention, the human eyes can easily identify the matching position of the second picture in the first picture, so that the safety verification is completed by moving the second picture, and the experience of people as users is not influenced.
An exemplary embodiment of the present invention also provides a security verification system, including: a terminal and a server.
The terminal is used for sending a verification request to the server; receiving and displaying an image verification code, wherein the image verification code comprises a first picture and a second picture, the second picture is a picture cut from a stylized picture, the first picture is a picture left after the second picture is cut from the stylized picture, and the stylized picture is a picture obtained by subjecting an original picture to style conversion; receiving the verification operation of the user on the second picture and generating verification information; and displaying a safety verification result according to the verification result of the verification information.
The server is used for receiving a verification request sent by the terminal; responding to the verification request to obtain an image verification code, wherein the image verification code comprises a first picture and a second picture, the second picture is a picture cut from a stylized picture, the first picture is a picture left after the second picture is cut from the stylized picture, and the stylized picture is a picture obtained by subjecting an original picture to style conversion; sending the image verification code to a terminal, and receiving verification information returned by the terminal, wherein the verification information is generated according to the verification operation of the user on the second picture; and generating a verification result according to the verification information, and sending the verification result to the terminal.
It should be noted that, when the apparatus provided in the foregoing embodiment implements the functions thereof, only the division of the functional modules is illustrated, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the apparatus may be divided into different functional modules to implement all or part of the functions described above. In addition, the apparatus and method embodiments provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments for details, which are not described herein again.
Please refer to fig. 15, which is a schematic structural diagram of a terminal according to an embodiment of the present invention, the terminal is used to implement the terminal-side security authentication method provided in the foregoing embodiment. Specifically, the method comprises the following steps:
the terminal 1500 may include components such as a RF (Radio Frequency) circuit 1510, a memory 1520 including one or more computer-readable storage media, an input unit 1530, a display unit 1540, a video sensor 1550, an audio circuit 1560, a WiFi (wireless fidelity) module 1570, a processor 1580 including one or more processing cores, and a power supply 150. Those skilled in the art will appreciate that the terminal structure shown in fig. 15 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the RF circuit 1510 may be used for receiving and transmitting signals during information transmission and reception or during a call, and in particular, receives downlink information from a base station and then sends the received downlink information to the one or more processors 1580 for processing; in addition, data relating to uplink is transmitted to the base station. In general, RF circuit 1510 includes, but is not limited to, an antenna, at least one Amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, an LNA (Low Noise Amplifier), a duplexer, and the like. In addition, RF circuit 1510 may also communicate with networks and other devices via wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (General Packet Radio Service), CDMA (Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access), LTE (Long Term Evolution), e-mail, SMS (Short Messaging Service), and the like.
The memory 1520 may be used to store software programs and modules, and the processor 1580 performs various functional applications and data processing by operating the software programs and modules stored in the memory 1520. The memory 1520 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as video data, a phone book, etc.) created according to the use of the terminal 1500, and the like. Further, the memory 1520 may include high-speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 1520 may also include a memory controller to provide access to the memory 1520 by the processor 1580 and the input unit 1530.
The input unit 1530 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, the input unit 1530 may include an image input device 1531 and other input devices 1532. The image input device 1531 may be a camera or a photo scanning device. The input unit 1530 may include other input devices 1532 in addition to the image input device 1531. In particular, other input devices 1532 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 1540 can be used to display information entered by or provided to the user as well as various graphical user interfaces of the terminal 1500, which can be made up of graphics, text, icons, video, and any combination thereof. The Display unit 1540 may include a Display panel 1541, and optionally, the Display panel 1541 may be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode, 15 Organic Light-Emitting Diode), or the like.
The terminal 1500 can include at least one video sensor 1550 for obtaining video information of a user. The terminal 1500 may also include other sensors (not shown), such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel 1541 according to the brightness of ambient light and a proximity sensor that may turn off the display panel 1541 and/or backlight when the terminal 1500 is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when the mobile phone is stationary, and can be used for applications of recognizing the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured in the terminal 1500, detailed descriptions thereof are omitted.
Video circuit 1560, speaker 1561, and microphone 1562 may provide a video interface between a user and terminal 1500. The audio circuit 1560 may transmit the electrical signal converted from the received audio data to the speaker 1561, and convert the electrical signal into an audio signal by the speaker 1561 and output the audio signal; on the other hand, the microphone 1562 converts collected sound signals into electrical signals, which are received by the audio circuit 1560 and converted into audio data, which are then processed by the audio data output processor 1580 and then passed through the RF circuit 1511 to be transmitted to, for example, another terminal, or output to the memory 1520 for further processing. The audio circuit 1560 may also include an earbud jack to provide communication of peripheral headphones with the terminal 1500.
WiFi belongs to short distance wireless transmission technology, and the terminal 1500 can help the user send and receive e-mail, browse web pages, access streaming media, etc. through the WiFi module 1570, which provides the user with wireless broadband internet access. Although fig. 15 shows WiFi module 1570, it is understood that it does not belong to the essential constitution of terminal 1500 and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 1580 is a control center of the terminal 1500, connects various parts of the entire mobile phone using various interfaces and lines, and performs various functions of the terminal 1500 and processes data by operating or executing software programs and/or modules stored in the memory 1520 and calling data stored in the memory 1520, thereby integrally monitoring the mobile phone. Optionally, the processor 1580 may include one or more processing cores; preferably, the processor 1580 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, and the like, and a modem processor, which mainly handles wireless communications. It is to be appreciated that the modem processor may not be integrated into the processor 1580.
The terminal 1500 also includes a power supply 150 (e.g., a battery) for powering the various components, which may preferably be logically coupled to the processor 1580 via a power management system, such that the power management system may be configured to manage charging, discharging, and power consumption. The power supply 150 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
Although not shown, the terminal 1500 may further include a bluetooth module or the like, which is not described in detail herein.
In this embodiment, the terminal 1500 further comprises a memory and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors. The one or more programs include instructions for performing the method at the terminal side.
Please refer to fig. 16, which is a schematic structural diagram of a server according to an embodiment of the present invention, the server is used to implement the server-side security authentication method provided in the foregoing embodiment. Specifically, the method comprises the following steps:
the server 1600 includes a Central Processing Unit (CPU)1601, a system memory 1604 that includes a Random Access Memory (RAM)1602 and a Read Only Memory (ROM)1603, and a system bus 1605 that couples the system memory 1604 and the central processing unit 1601. The server 1600 also includes a basic input/output system (I/O system) 1606, which facilitates transfer of information between devices within the computer, and a mass storage device 1607 for storing an operating system 1613, application programs 1614, and other program modules 1615.
The basic input/output system 1606 includes a display 1608 for displaying information and an input device 1609 such as a mouse, keyboard, etc. for user input of information. Wherein the display 1608 and input device 1609 are connected to the central processor 1601 by way of an input-output controller 1610 which is connected to the system bus 1605. The basic input/output system 1606 may also include an input-output controller 1610 for receiving and processing input from a number of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, input-output controller 1610 may also provide output to a display screen, a printer, or other type of output device.
The mass storage device 1607 is connected to the central processor 1301 through a mass storage controller (not shown) connected to the system bus 1605. The mass storage device 1607 and its associated computer-readable media provide non-volatile storage for the server 1600. That is, the mass storage device 1607 may include a computer-readable medium (not shown) such as a hard disk or CD-ROM drive.
Without loss of generality, the computer-readable media may comprise computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes RAM, ROM, EPROM, EEPROM, flash memory or other solid state memory technology, CD-ROM, DVD, or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that the computer storage media is not limited to the foregoing. The system memory 1604 and mass storage device 1607 described above may be collectively referred to as memory.
The server 1600 may also operate with remote computers connected to the network through a network, such as the internet, according to various embodiments of the invention. That is, the server 1600 may be connected to the network 1612 through the network interface unit 1611 coupled to the system bus 1605, or the network interface unit 1611 may be used to connect to other types of networks or remote computer systems (not shown).
The memory also includes one or more programs stored in the memory and configured to be executed by one or more processors. The one or more programs include instructions for performing the server-side method.
In an embodiment of the present invention, there is also provided a non-transitory computer readable storage medium, for example, a memory including instructions, which are executable by a processor of a terminal to perform the steps at the terminal side in the above-described method embodiment, or which are executable by a processor of a server to perform the steps at the server side in the above-described method embodiment. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
It is noted that, herein, relational terms such as first and second, and the like may be 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. Also, 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 an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (12)

1. A security authentication method, the method comprising:
sending a verification request;
receiving and displaying an image verification code, wherein the image verification code comprises a first picture and a second picture, the second picture is a picture cut from a stylized picture, and the first picture is a picture left after the second picture is cut from the stylized picture; the stylized picture is a picture generated according to the content in the original picture extracted by the deep convolutional neural network model and the style in the reference style picture; the styles in the reference style pictures comprise detail textures, expression modes of lines and coloring styles of the reference style pictures;
receiving the verification operation of the user on the second picture and generating verification information;
displaying a safety verification result according to the verification result of the verification information;
the generation mode of the image verification code comprises the following steps:
acquiring an original picture for generating an image verification code; obtaining a stylized picture according to the original picture; cutting a local picture from the stylized picture to be used as the second picture; acquiring first position information of the second picture, wherein the first position is the position of the second picture in the stylized picture; and moving the second picture from the first position to a second position to generate the image verification code, wherein the second position is any position in the first picture.
2. The security verification method of claim 1, wherein obtaining the stylized picture from the original picture comprises:
generating a stylized picture from the original picture, or,
and acquiring a pre-generated stylized picture according to the original picture.
3. The security authentication method according to claim 1, wherein the authentication information includes third position information of the second picture, the third position information being position information of the second picture after the user operates the second picture;
the generation mode of the check result comprises the following steps:
acquiring first pixel information according to the third position information of the second picture;
acquiring second pixel information according to the first position information of the second picture;
calculating a pixel difference value according to the first pixel information and the second pixel information;
and generating a verification result of the verification information according to the pixel difference value.
4. The security verification method according to claim 3, wherein the generating a verification result of the verification information according to the pixel difference value comprises:
judging whether the pixel difference value is larger than a preset threshold value or not;
if the pixel difference value is larger than the preset threshold value, generating a result that the verification fails;
and if the pixel difference value is smaller than or equal to the preset threshold value, generating a result of passing the verification.
5. The security authentication method of claim 1, wherein prior to receiving and displaying the image authentication code, the method further comprises: and receiving and displaying an original picture for generating the image verification code.
6. The security authentication method of claim 1, wherein the shape and/or size of the second picture is generated in a random manner in the image authentication code received each time.
7. The security authentication method of claim 1, wherein the original position and the newly placed position of the second picture are generated in a random manner in the image authentication code received each time.
8. A security authentication apparatus, the apparatus comprising:
the request sending module is used for sending a verification request;
the verification code receiving module is used for receiving and displaying an image verification code, wherein the image verification code comprises a first picture and a second picture, the second picture is a picture cut from a stylized picture, and the first picture is a picture left after the second picture is cut from the stylized picture; the stylized picture is a picture generated according to the content in the original picture extracted by the deep convolutional neural network model and the style in the reference style picture; the styles in the reference style pictures comprise detail textures, expression modes of lines and coloring styles of the reference style pictures;
the verification information generation module is used for receiving the verification operation of the user on the second picture and generating a verification information verification result display module which is used for displaying the safety verification result according to the verification result of the verification information;
the verification code generation module is used for generating an image verification code; the verification code generation module comprises: the first acquisition module is used for acquiring an original picture used for generating an image verification code; the stylized picture obtaining module is used for obtaining stylized pictures according to the original pictures; the cropping module is used for cropping a local picture from the stylized picture as the second picture; a first position module, configured to obtain first position information of the second picture, where the first position is a position of the second picture in the stylized picture; and the first generation sub-module is used for moving the second picture from the first position to a second position to generate the image verification code, wherein the second position is any position in the first picture.
9. The security authentication device according to claim 8, wherein the authentication information includes third position information of the second picture, the third position information being position information of the second picture after the user operates the second picture;
the device also comprises a verification result generating module used for generating the verification result of the verification information; the verification result generation module comprises:
the first pixel obtaining module is used for obtaining first pixel information according to the third position information of the second picture;
the second pixel acquisition module is used for acquiring second pixel information according to the first position information of the second picture;
the pixel difference value calculating module is used for calculating a pixel difference value according to the first pixel information and the second pixel information;
and the second generation submodule is used for generating a verification result of the verification information according to the pixel difference value.
10. The security authentication device according to claim 9, wherein the generating of the verification result of the authentication information according to the pixel difference value comprises:
judging whether the pixel difference value is larger than a preset threshold value or not;
if the pixel difference value is larger than the preset threshold value, generating a result that the verification fails;
and if the pixel difference value is smaller than or equal to the preset threshold value, generating a result of passing the verification.
11. A terminal, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the steps of:
sending a verification request;
receiving and displaying an image verification code, wherein the image verification code comprises a first picture and a second picture, the second picture is a picture cut from a stylized picture, and the first picture is a picture left after the second picture is cut from the stylized picture; the stylized picture is a picture generated according to the content in the original picture extracted by the deep convolutional neural network model and the style in the reference style picture; the styles in the reference style pictures comprise detail textures, expression modes of lines and coloring styles of the reference style pictures;
receiving the verification operation of the user on the second picture and generating verification information;
displaying a safety verification result according to the verification result of the verification information;
the generation mode of the image verification code comprises the following steps:
acquiring an original picture for generating an image verification code; obtaining a stylized picture according to the original picture; cutting a local picture from the stylized picture to be used as the second picture; acquiring first position information of the second picture, wherein the first position is the position of the second picture in the stylized picture; and moving the second picture from the first position to a second position to generate the image verification code, wherein the second position is any position in the first picture.
12. A computer storage medium storing computer program instructions which, when executed, implement a security authentication method as claimed in any one of claims 1 to 7.
CN201810312164.6A 2018-04-09 2018-04-09 Security verification method, device and terminal Active CN108846274B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810312164.6A CN108846274B (en) 2018-04-09 2018-04-09 Security verification method, device and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810312164.6A CN108846274B (en) 2018-04-09 2018-04-09 Security verification method, device and terminal

Publications (2)

Publication Number Publication Date
CN108846274A CN108846274A (en) 2018-11-20
CN108846274B true CN108846274B (en) 2020-08-18

Family

ID=64212064

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810312164.6A Active CN108846274B (en) 2018-04-09 2018-04-09 Security verification method, device and terminal

Country Status (1)

Country Link
CN (1) CN108846274B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109559363B (en) * 2018-11-23 2023-05-23 杭州网易智企科技有限公司 Image stylization processing method and device, medium and electronic equipment
CN109886010B (en) * 2019-01-28 2023-10-17 平安科技(深圳)有限公司 Verification picture sending method, verification picture synthesizing method and device, storage medium and terminal
CN110675308B (en) * 2019-08-21 2024-04-26 平安科技(深圳)有限公司 Character verification method, device, computer equipment and storage medium
CN110706221A (en) * 2019-09-29 2020-01-17 武汉极意网络科技有限公司 Verification method, verification device, storage medium and device for customizing pictures
CN110942062B (en) * 2019-11-21 2022-12-23 杭州网易智企科技有限公司 Image verification code generation method, medium, device and computing equipment
CN111447207B (en) * 2020-03-24 2022-11-01 咪咕文化科技有限公司 Verification code verification method, electronic device and storage medium
CN111859354B (en) * 2020-07-21 2023-09-01 百度在线网络技术(北京)有限公司 Picture verification method, device, electronic equipment, storage medium and program product
TWI770947B (en) * 2021-04-20 2022-07-11 國立清華大學 Verification method and verification apparatus based on attacking image style transfer
CN113158167B (en) * 2021-04-30 2024-02-23 腾讯音乐娱乐科技(深圳)有限公司 Verification code implementation method, electronic equipment and computer readable storage medium
CN114626047A (en) * 2022-03-04 2022-06-14 北京百度网讯科技有限公司 Verification method, device and equipment based on man-machine interaction

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105187206A (en) * 2014-05-28 2015-12-23 腾讯科技(深圳)有限公司 Identity verification method and device
CN105323065A (en) * 2014-07-21 2016-02-10 腾讯科技(深圳)有限公司 Safety verification method and device
CN105335645A (en) * 2015-09-23 2016-02-17 北京奇虎科技有限公司 Verification method and apparatus for picture verification code
CN106886975A (en) * 2016-11-29 2017-06-23 华南理工大学 It is a kind of can real time execution image stylizing method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105187206A (en) * 2014-05-28 2015-12-23 腾讯科技(深圳)有限公司 Identity verification method and device
CN105323065A (en) * 2014-07-21 2016-02-10 腾讯科技(深圳)有限公司 Safety verification method and device
CN105335645A (en) * 2015-09-23 2016-02-17 北京奇虎科技有限公司 Verification method and apparatus for picture verification code
CN106886975A (en) * 2016-11-29 2017-06-23 华南理工大学 It is a kind of can real time execution image stylizing method

Also Published As

Publication number Publication date
CN108846274A (en) 2018-11-20

Similar Documents

Publication Publication Date Title
CN108846274B (en) Security verification method, device and terminal
CN107256555B (en) Image processing method, device and storage medium
CN106919918B (en) Face tracking method and device
JP6257848B1 (en) Training method and apparatus for convolutional neural network model
US9779527B2 (en) Method, terminal device and storage medium for processing image
US10327015B2 (en) Picture combining method, terminal, and picture combining system
CN104852885B (en) Method, device and system for verifying verification code
US20170109756A1 (en) User Unsubscription Prediction Method and Apparatus
US20160292946A1 (en) Method and apparatus for collecting statistics on network information
US20150089431A1 (en) Method and terminal for displaying virtual keyboard and storage medium
WO2017088434A1 (en) Human face model matrix training method and apparatus, and storage medium
CN110555171A (en) Information processing method, device, storage medium and system
CN111949239B (en) Screen sharing method and device, storage medium and terminal
CN108287745A (en) A kind of display methods and terminal device at the interfaces WebApp
CN107995151B (en) Login verification method, device and system
CN113609358B (en) Content sharing method, device, electronic equipment and storage medium
CN107967086B (en) Icon arrangement method and device for mobile terminal and mobile terminal
CN109166164B (en) Expression picture generation method and terminal
CN113469923B (en) Image processing method and device, electronic equipment and storage medium
CN107734049B (en) Network resource downloading method and device and mobile terminal
CN110503189B (en) Data processing method and device
CN114510417A (en) Image rendering effect testing method and device, electronic equipment and storage medium
CN110493460B (en) Icon replacing method, electronic equipment and computer readable storage medium
CN113780291A (en) Image processing method and device, electronic equipment and storage medium
CN109358792B (en) Display object selection method and terminal

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