CN104200150B - Method and device for processing verification codes - Google Patents

Method and device for processing verification codes Download PDF

Info

Publication number
CN104200150B
CN104200150B CN201410441617.7A CN201410441617A CN104200150B CN 104200150 B CN104200150 B CN 104200150B CN 201410441617 A CN201410441617 A CN 201410441617A CN 104200150 B CN104200150 B CN 104200150B
Authority
CN
China
Prior art keywords
identifying code
picture
background
true
code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410441617.7A
Other languages
Chinese (zh)
Other versions
CN104200150A (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.)
HUBEI SHENGTIAN NETWORK TECHNOLOGY Co Ltd
Original Assignee
HUBEI SHENGTIAN NETWORK TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by HUBEI SHENGTIAN NETWORK TECHNOLOGY Co Ltd filed Critical HUBEI SHENGTIAN NETWORK TECHNOLOGY Co Ltd
Priority to CN201410441617.7A priority Critical patent/CN104200150B/en
Publication of CN104200150A publication Critical patent/CN104200150A/en
Application granted granted Critical
Publication of CN104200150B publication Critical patent/CN104200150B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • 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)
  • Image Analysis (AREA)
  • Editing Of Facsimile Originals (AREA)

Abstract

The invention discloses a method for processing verification codes. The method comprises the steps that two sets of verification codes are generated randomly, one set of the verification codes are used as real verification codes, and the other set of the verification codes are used as disturbance verification codes; a verification code picture is generated, wherein the verification code picture comprises the real verification codes and the disturbance verification codes, and the background, expect the verification codes, in the verification code picture is a transparent background; a verification code background picture is acquired, the real verification codes and the verification code background picture are subjected to same hollow-out processing, the verification code picture is placed on the verification code background picture to be merged, and a merged picture is obtained, wherein the hollow-out position of the real verification codes and the hollow-out position of the verification code background picture coincide; the merged picture is displayed on a webpage background, and the webpage background and the real verification codes are the same in color; a moving instruction to the merged picture is monitored, and the merged picture is moved to a visible area according to the moving instruction. The method for processing the verification codes can improve the difficulty for a robot program to identify the verification codes, and the safety of the verification codes is improved.

Description

Identifying code treating method and apparatus
Technical field
The application is related to computer and internet data processing technology field, more particularly, to a kind of identifying code processing method and Device.
Background technology
In computer and internet data processing technology field, identifying code be a kind of distinguish user be robot program or The public full auto-programs of people.Identifying code is usually used some lines and some irregular character compositions, and user must read These characters, then inputting these characters could successful log website.Because people can be easy to read the character in picture, but If one section of client side attack program (i.e. robot program), it is to be difficult to identify described identifying code by general means.
The effect of identifying code can prevent: malice decryption, brush ticket, forum pour water, and effectively prevents certain hacker to certain One particular registered user is constantly logged in trial with specific program Brute Force mode, is present actually with identifying code The login mode passing through in a lot of websites.
But, current verification code technology is only randomly generated a picture also having random string, also occurs now Some more intelligent robot programs that can identify image content, this robot program has a large amount of characters that are stored with The data base of picture, when carrying out malicious attack, this robot program can enter to each of identifying code picture character Row scratches figure, then scratches figure using this character and compares with the character picture in data base, finds similar to the stingy figure of character Degree highest character picture, using this corresponding character of character picture as the character identifying, thus automatic identification is decoded out test Character string in card code picture.
When in the face of above-mentioned robot program, identifying code is easy to be decoded by robot the verification code technology of prior art, Safety is relatively low, the operation leading to malicious attack side using robot, internet, applications to be repeated in a large number, leads to all kinds of mutual Working application weight is then paralysed, and gently then loses all kinds of virtual resources, allows service provide enterprise and the interests of normal users to endure infringement to the fullest extent.
Content of the invention
In view of this, the main object of the present invention is to provide a kind of identifying code treating method and apparatus, can improve machine People identifies the difficulty of identifying code, improves the safety of identifying code.
The technical scheme is that and be achieved in that:
A kind of identifying code processing method, comprising:
Generate at random two groups of identifying codes, one group as true identifying code, another group as interference identifying code;
Generate identifying code picture, including true identifying code and interference identifying code, in described identifying code picture, remove checking Background outside code is transparent background;
Obtain identifying code background picture, identical hollow part is carried out to described true identifying code and identifying code background picture Reason, described identifying code picture is placed in merge on described identifying code background picture obtains composing picture, wherein said true The hollow out position of real identifying code is overlapped with the hollow out position of described identifying code background picture;
Described composing picture is shown on page layout background, and the color one of page layout background color and described true identifying code Cause;Viewing area is shown on page layout background, the color of this viewing area is inconsistent with the color of true identifying code;
Described composing picture is moved to described visual by the move to described composing picture for the monitoring according to move On region.
In an advantageous embodiment, described move is the dragging instruction to composing picture.
In an advantageous embodiment, described generation identifying code picture, specifically includes: described in each group, identifying code corresponds to Generate an identifying code picture, in described identifying code picture, the background in addition to identifying code is transparent background.
In an advantageous embodiment, two groups of identifying codes of described random generation, specifically include:
Using predetermined key generation secrets;
The corresponding grade of difficulty of this active user is determined according to the access characteristic information of active user;
According to determined by grade of difficulty, random from described ciphertext obtain two groups of character strings as identifying code, wherein difficult Degree higher grade, and the character string of identifying code is more complicated.
In an advantageous embodiment, described using predetermined key generation secrets, specifically include: obtain the ip of active user Address and browser type, by described ip address, browser type and described predetermined set of keys composite characters string, more encrypted calculation Method carries out irreversible encryption, generates a string ciphertext.
In an advantageous embodiment, the described access characteristic information according to active user determines that this active user is corresponding Grade of difficulty, specifically includes:
Obtain ip address and/or the browser type of active user;
Asking according to predetermined different grade of difficulty corresponding ip address realm, browser type and/or identical ip address Ask interval, judge the grade of difficulty corresponding to the ip address of active user and/or browser type;
This grade of difficulty is defined as the corresponding grade of difficulty of this active user.
In an advantageous embodiment, after described generation identifying code picture, hollow out is carried out to described identifying code picture Before process, further include: distortion effects process is carried out to the identifying code in described identifying code picture.
In an advantageous embodiment, described distortion effects process is carried out to the identifying code in described identifying code picture, tool Body includes:
Create one with identifying code picture equivalently-sized new painting canvas, former identifying code picture in the way of individual element Each pixel is copied on this painting canvas, SIN function f (x)=sin (a*2 is passed through in the pixel position on this new painting canvas π * y/height) the y-axis coordinate of pixel is processed, in formula, f (x) is the y-axis coordinate of the pixel on new painting canvas, y For the y-axis coordinate of the same pixel point of former identifying code picture, height is the height of former identifying code picture.
In an advantageous embodiment, the method further includes: monitoring, in the character string of input frame input, judges this word Whether symbol string is consistent with described true identifying code, if consistent, is verified, otherwise authentication failed.
A kind of identifying code processing meanss, comprising:
Identifying code generation module, generates two groups of identifying codes for random, one group as true identifying code, another group as dry Disturb identifying code;
Identifying code image generating module, for generating identifying code picture, including true identifying code and interference identifying code, In described identifying code picture, the background in addition to identifying code is transparent background;
Composing picture generation module, for obtaining identifying code background picture, to described true identifying code and identifying code background Picture carries out identical hollow processing, described identifying code picture is placed in merge on described identifying code background picture obtains Composing picture, the hollow out position of wherein said true identifying code is overlapped with the hollow out position of described identifying code background picture;
Checking page generation module, for described composing picture is shown in page layout background, and page layout background color with The solid colour of described true identifying code;Viewing area is shown on page layout background, the color of this viewing area is verified with true The color of code is inconsistent;
Mobile module, for the move to described composing picture for the monitoring, according to move by described composing picture Move on described viewing area.
Compared with prior art, the present invention generates two groups of identifying codes at random, and one group as true identifying code, another group of conduct Interference identifying code;And generate identifying code picture, including true identifying code and interference identifying code, remove in described identifying code picture Background outside identifying code is transparent background;Then identical hollow out is carried out to true identifying code therein and identifying code background picture Process, described identifying code picture is placed in merge on described identifying code background picture obtains composing picture, wherein said The hollow out position of true identifying code is overlapped with the hollow out position of described identifying code background picture;Described composing picture is shown in page In the background of face, and page layout background color and the solid colour of described true identifying code, so make eye recognition not go out this true experiment Card code, and can only see interference identifying code;Viewing area shown afterwards on page layout background, the color of this viewing area with true The color of identifying code is inconsistent;Described composing picture is moved by the move to described composing picture for the monitoring according to move Move on described viewing area, at this moment, because the color of this viewing area is inconsistent with the color of true identifying code, from but Eye recognition goes out the colour contrast of true identifying code non-hollow out block and viewing area, makes eye recognition go out true identifying code.Due to The present invention needs by move, and composing picture is moved to just can show true identifying code on viewing area, And this move send and move to the operation on viewing area, be very difficult to accomplish for robot program , therefore the present invention can improve the difficulty that robot program identifies identifying code, improves the safety of identifying code.
Brief description
Fig. 1 is a kind of flow chart of identifying code processing method of the present invention;
A kind of schematic diagram of the identifying code picture that Fig. 2 is generated by the present invention;
Fig. 3 show the schematic diagram of an identifying code background picture;
Fig. 4 a is the schematic diagram of hollow processing mask employed in an embodiment of the present invention;
Fig. 4 b show a kind of schematic diagram of the identifying code background picture through hollow processing;
Fig. 4 c is a kind of schematic diagram of the true identifying code through hollow processing identical with Fig. 4 b;
Fig. 5 a is a kind of schematic diagram that composing picture of the present invention is placed on the background that background color is white;
Fig. 5 b is a kind of schematic diagram that composing picture of the present invention is placed on the background that background color is Lycoperdon polymorphum Vitt;
Fig. 6 a is a kind of schematic diagram of identifying code input page;
Fig. 6 b is a kind of schematic diagram that composing picture is dragged in identifying code input page viewing area;
Fig. 6 c is a kind of schematic diagram that composing picture is dragged in identifying code input page viewing area completely;
Fig. 7 is a kind of composition schematic diagram of identifying code processing meanss of the present invention.
Specific embodiment
Below in conjunction with the accompanying drawings and specific embodiment the present invention is further described in more detail.
Fig. 1 is a kind of flow chart of identifying code processing method of the present invention, referring to Fig. 1, at identifying code of the present invention Reason method specifically includes that
Step 101, generate at random two groups of identifying codes, one group as true identifying code, another group as interference identifying code.
Described identifying code is typically a string character string.In one embodiment, two groups of identifying codes of described random generation are permissible It is the arbitrarily random two groups of identifying codes generating.
In order to increase the difficulty of identifying code further, in a further preferred embodiment, described random generate two groups test Card code, can specifically include following steps 111 to 113:
Step 111, using predetermined key (key) generate ciphertext.Described key can be pre-set.
More specifically, this step 111 can obtain active user's (being currently needed for carrying out the user of identifying code checking) Ip address and browser type, by described ip address, browser type and described predetermined set of keys composite characters string, then through plus Close algorithm, such as Message Digest Algorithm 5 (md5, message-digest algorithm 5) algorithm, carries out irreversible Encryption, generates a string ciphertext, such as similar to one section of ciphertext so follow-up: d725ec04c205e27363daa4fda1f1d5b1.
Step 112, the corresponding grade of difficulty of this active user is determined according to the access characteristic information of active user.Described difficulty Degree grade can also be pre-set, for example, can define three different grade of difficulty in a kind of specific embodiment, each Grade of difficulty all corresponds to a labelling, for representing its grade difficulty.
During user's request internet, applications resource all can by user's history access information, for example user access time, ip, The information such as browser type, are stored in the data base of service provider, and the present invention can be from the data base of service provider Extract the history access information of active user, often all can go to compare with the history access information of this user upon request by a user, enter Row grade of difficulty judges.The present invention can be set and be stored to the division scope of grade of difficulty in advance, such as ip ground Location scope can divide different grades, and the ip address realm being included into highest blacklist can correspond to highest grade of difficulty, example Spend grade 3 as difficult herein, the ip address realm of secondary one-level blacklist can correspond to grade of difficulty 2, and other ip address realms are then right Answer the grade that difficulty is minimum, i.e. grade of difficulty 1.For example analysis can be made to the type of browser according to history access information again And division, then corresponding for the commonly used browser type of some malicious robot program or unconventional browser type Grade of difficulty is higher.For example ip address same to user can access the frequency of network application and carry out statistical analysiss again, if with One ip address accesses consolidated network application with a high speed frequently (accessing interval especially little, for example, be spaced and be less than 1 second), then assert it For malicious access, corresponding grade of difficulty is higher, can set the corresponding difficulty of different access interval of same ip address Grade.
For example this step 112 can specifically include:
Obtain ip address and/or the browser type of active user;
Asking according to predetermined different grade of difficulty corresponding ip address realm, browser type and/or identical ip address Ask interval, judge the grade of difficulty corresponding to the ip address of active user and/or browser type;
This grade of difficulty is defined as the corresponding grade of difficulty of this active user.
For example specifically may is that the corresponding grade of difficulty of ip address realm residing for ip address judging active user;Sentence Determine the corresponding grade of difficulty of browser type of active user;And judge that last access the in active user ip address is visited with this The time interval asked, determines corresponding grade of difficulty according to time interval;Finally will be highest true in these three grade of difficulty It is set to the corresponding grade of difficulty of this active user.
Step 113, grade of difficulty determined by basis, obtain two groups of character strings as checking from described ciphertext at random Code, wherein grade of difficulty is higher, and the character string of identifying code is more complicated.
For example, just can determine corresponding identifying code according to predetermined setting after reserving grade of difficulty, the following is a kind of 3 Individual grade of difficulty specific example:
Grade of difficulty 1, then obtain 2 groups of 4 cardinar numbers as two groups of identifying codes in aforesaid ciphertext at random;
Grade of difficulty 2, then obtain 2 groups 5 pure letters as two groups of identifying codes in aforesaid ciphertext at random;
Grade of difficulty 3, then the character string that random 2 group of 6 bit digital letter of acquisition mixes in aforesaid ciphertext is as two groups Identifying code.
In described two groups of identifying codes, can at random using one group therein as true identifying code, test as interference for another group Card code, for playing the effect obscured, increases the difficulty of robot program's identification.
Step 102, generation identifying code picture, including true identifying code and interference identifying code, described identifying code picture In background in addition to identifying code be transparent background.
In this step 102, described generation identifying code picture, specifically include: correspond to generation one for described each group of identifying code Open identifying code picture, in described identifying code picture, the background in addition to identifying code is transparent background.
More specifically, can respectively true identifying code and interference identifying code be utilized using font in fontlib at random Color word color (being herein for example white) is horizontally-arranged one by one to be put, and the position up and down of each character can also be through row 10-20 Random floating between pixel, allows machine be difficult to catch real character position, produces the identifying code picture of two transparent backgrounds. The color of described identifying code needs consistent with the background colour of the subsequent authentication page.
A kind of schematic diagram as the identifying code picture that Fig. 2 is generated by the present invention.Wherein " s t n t s n0 01 " is Interference card code code, " s t n t s n 002 " is true identifying code, and the color of identifying code is white, goes out in identifying code picture Background outside identifying code is transparent background, this in figure in order to make reader see the identifying code of white, special with gray background Lai Represent transparent background, actually transparent background.
Certainly, in order to increase the difficulty of robot program's automatic identification identifying code further, the present invention's is a kind of further Preferred embodiment in, can also described generation identifying code picture after, described identifying code picture is carried out hollow processing it Before, further include: distortion effects process is carried out to the identifying code in described identifying code picture.
Described distortion effects process is carried out to the identifying code in described identifying code picture, specifically include:
Create one with identifying code picture equivalently-sized new painting canvas, former identifying code picture in the way of individual element Each pixel is copied on this painting canvas, SIN function f (x)=sin (a*2 is passed through in the pixel position on this new painting canvas π * y/height) the y-axis coordinate of pixel is processed, in formula, f (x) is the y-axis coordinate of the pixel on new painting canvas, y For the y-axis coordinate of the same pixel point of former identifying code picture, height is the height of former identifying code picture.Drawn by this formula The coordinate in pixel y week on new picture, x-axis coordinate and artwork are consistent, and may finally obtain a sine curve the same Waveform distortion identifying code, by the numerical value of adjusting parameter a, the degree of distortion can be changed, can be according to reality Situation is adjusted to a suitable value.In an advantageous embodiment, can be respectively to real character code and invalid character Code all carries out distortion process.
By above-mentioned process it is possible to obtain the identifying code picture with transparent background, in picture, include true checking Code and interference identifying code, below, next introduce needs identifying code picture is entered taking identifying code picture as shown in Figure 2 as a example One step is processed.
Step 103, acquisition identifying code background picture, carry out identical to described true identifying code and identifying code background picture Hollow processing, described identifying code picture is placed in merge on described identifying code background picture obtains composing picture, wherein The hollow out position of described true identifying code is overlapped with the hollow out position of described identifying code background picture.
In this step, need to obtain the identifying code background picture of next layer being illustrated in identifying code picture.As Fig. 3 institute It is shown as the schematic diagram of an identifying code background picture.
Described identical hollow processing is carried out to described true identifying code and identifying code background picture, described hollow processing exists Can be to be processed with mask mode in computer image processing technology.Described hollow processing is according to the rule specifying to picture Lattice carry out borehole, obtain the hollow out picture with multiple eyelets, each eyelet described is transparent, it can directly be seen that next Figure layer or background.
For example, Fig. 4 a is the schematic diagram of hollow processing mask employed in an embodiment of the present invention.This mask is black and white Alternate grid picture, wherein white portion are transparent in fact, by this mask picture be placed in described identifying code background picture it On, to carry out hollowing out process in black box part, the part overlapping with all black box on identifying code background picture is all Dug out a hole, using this processing mode, identifying code background picture hollow processing can have been become have neat eyelet Hollow out picture, is a kind of schematic diagram of the identifying code background picture through hollow processing as shown in Figure 4 b, and wherein lower section is that it is right The partial enlarged drawing of inferior horn.
Then need to carry out same hollow processing to described true identifying code, such as Fig. 4 c is through hollow out identical with Fig. 4 b A kind of schematic diagram of the true identifying code processing, it is the same, that is, finally that described identical hollow processing refers to that mask used needs Described true identifying code is processed into the hollow out picture with neat eyelet, and described in the size of eyelet and relative position and Fig. 4 a Barrel hole size on identifying code background picture is all consistent with relative position;Described eye portion is all transparent it can be seen that next Layer, this in figure also represents transparent background with Lycoperdon polymorphum Vitt.
However, described interference identifying code need not carry out described hollow processing.
Afterwards, need to be placed in described identifying code picture (include true identifying code picture and interference identifying code picture) described Merge on identifying code background picture and obtain composing picture, herein it is noted that the hollow out of wherein said true identifying code Position is overlapped with the hollow out position of described identifying code background picture, and that is, the eyelet on described true identifying code will be with identifying code background Hole position on picture overlaps.Can be random with the relative upper-lower position of invalid authentication code as described true identifying code.
It is a kind of schematic diagram that composing picture of the present invention is placed on the background that background color is white referring to Fig. 5 a.Due to In embodiment hereof, the color of true identifying code is white, and the hollow out position of described true identifying code and described identifying code The hollow out position of background picture overlaps, and therefore can directly be seen that the background color of background from the eyelet of its openwork part, but background Background color is also white, then white and white mix and just do not see the described true identifying code through hollow processing, can only See not through interference identifying code hollow processing, being placed in described identifying code background picture upper strata " s t n t s n 00 1”.
Fig. 5 b is a kind of schematic diagram that composing picture of the present invention is placed on the background that background color is Lycoperdon polymorphum Vitt.Its first half It is divided into the overall schematic of composing picture, the latter half is the partial enlarged drawing of the character " 002 " in true identifying code.Due to In embodiment hereof, the color of true identifying code is white, and the hollow out position of described true identifying code and the described identifying code back of the body The hollow out position of scape picture overlaps, and therefore can directly be seen that the background color of background from the eyelet of its openwork part, but background bottom Color is the Lycoperdon polymorphum Vitt inconsistent with the color of true identifying code, then white and Lycoperdon polymorphum Vitt will make a distinction, it can be seen that institute State the true identifying code " s t n t s n 002 " through hollow processing, certainly do not verify through the interference of hollow processing Code " s t n t s n 001 " is provided in identifying code background picture upper strata, therefore can also be seen.
As long as therefore controlling the background background color of described next layer of composing picture it is possible to control the aobvious of described true identifying code Show with hidden, as long as background background color and true identifying code solid colour, then can with hidden true identifying code, as long as background background color with True identifying code color is inconsistent, then can show described true identifying code.The present invention is exactly to be processed as follows by this Step in increase identifying code identification difficulty.
Step 104, described composing picture is shown on page layout background, and page layout background color and described true identifying code Solid colour.The color of true experiment card code thus can be made corresponding with the color of described page layout background consistent, described true Even if real identifying code is placed on page layout background, eye recognition can't be made this true identifying code, thus hiding true identifying code. Also need to show viewing area on page layout background, the color of this viewing area is inconsistent with the color of true identifying code.
If Fig. 6 a is a kind of schematic diagram of identifying code input page;The background color of this input page and described true checking The solid colour of code, for example, be white herein, after so described composing picture 601 is placed on this white page layout background, due to The color of true identifying code is white, and the hollow out position of the hollow out position of described true identifying code and described identifying code background picture Put coincidence, therefore can directly be seen that page layout background from the eyelet of its openwork part, but page layout background is also white, then be white Normal complexion white mixes and does not just see the described true identifying code through hollow processing, can only see not through hollow processing , interference identifying code " s t n t s n 001 " being placed in described identifying code background picture upper strata.Meanwhile, also will be in checking A viewing area such as 602 is shown, the color of this viewing area is inconsistent with the color of true identifying code, example on code input page As being Lycoperdon polymorphum Vitt herein.
Described composing picture is moved to by step 105, the move to described composing picture for the monitoring according to move On described viewing area.
In an advantageous embodiment, described move is the dragging instruction to composing picture.User can be to described Composing picture 601 applies to pull instruction, and composing picture 601 is dragged on described viewing area 602.If Fig. 6 b is identifying code In input page, composing picture is dragged to a kind of schematic diagram of viewing area, Fig. 6 c is will to merge figure in identifying code input page Piece is dragged to a kind of schematic diagram of viewing area completely.Referring to Fig. 6 b and Fig. 6 c, when true experiment card code is dragged to viewing area When on 602, because the color of true identifying code is white, and the hollow out position of described true identifying code and the described identifying code back of the body The hollow out position of scape picture overlaps, and therefore can directly be seen that the color of next layer from the eyelet of its openwork part, but next The viewing area 602 background background color of layer is the Lycoperdon polymorphum Vitt inconsistent with the color of true identifying code, then white and Lycoperdon polymorphum Vitt will areas Separate, it can be seen that the described true identifying code " s t n t s n 002 " through hollow processing, certainly there is no warp The interference identifying code " s t n t s n 001 " crossing hollow processing is provided in identifying code background picture upper strata, therefore Can be seen.
Afterwards, the true identifying code that user just can see in input frame 603 input, present invention monitoring is in input frame input Character string, judge whether this character string consistent with described true identifying code, if consistent, be verified, otherwise authentication failed.
By above-mentioned process, because the present invention needs by move, and by composing picture move to viewing area it Upper just can show true identifying code, and this move send and move to the operation on viewing area, for machine It is very difficult to for device people's program to accomplish, therefore the present invention can improve the difficulty that robot program identifies identifying code, improve The safety of identifying code.
Corresponding with above-mentioned identifying code processing method, the invention also discloses a kind of identifying code processing meanss, for execution State identifying code processing method.Fig. 7 is a kind of composition schematic diagram of identifying code processing meanss of the present invention.Referring to Fig. 7, this device Including:
Identifying code generation module 701, generates two groups of identifying codes for random, one group as true identifying code, another group of work For disturbing identifying code;
Identifying code image generating module 702, for generating identifying code picture, including true identifying code and interference checking Code, in described identifying code picture, the background in addition to identifying code is transparent background;
Composing picture generation module 703, for obtaining identifying code background picture, to described true identifying code and the identifying code back of the body Scape picture carries out identical hollow processing, described identifying code picture is placed on described identifying code background picture and merges To composing picture, the hollow out position of wherein said true identifying code is overlapped with the hollow out position of described identifying code background picture;
Checking page generation module 704, for described composing picture is shown in page layout background, and page layout background color Solid colour with described true identifying code;Viewing area, the color of this viewing area and true experiment are shown on page layout background The color of card code is inconsistent;
Mobile module 705, for the move to described composing picture for the monitoring, for example, pulls instruction, is referred to according to movement Order moves to described composing picture on described viewing area.
Further, this device also includes authentication module, for monitoring in the character string of input frame input, judges this character Whether string is consistent with described true identifying code, if consistent, is verified, otherwise authentication failed.
In addition, can be integrated in a processing unit in each functional module in each embodiment of the present invention it is also possible to It is that modules are individually physically present it is also possible to two or more modules are integrated in a unit.Above-mentioned integrated list Unit both can be to be realized in the form of hardware, it would however also be possible to employ the form of SFU software functional unit is realized.The work(of described each embodiment Module can may be located at a terminal or network node, or can also be distributed on multiple terminals or network node.
In addition, each embodiment of the present invention can be by the data processing by data handling equipment such as computer execution Program is realizing.Obviously, data processor constitutes the present invention.Additionally, the data being generally stored inside in a storage medium Processing routine is by directly reading out storage medium or by installing program or copying to data handling equipment by program Execute in storage device (as hard disk and/or internal memory).Therefore, such storage medium also constitutes the present invention.Storage medium is permissible Using any kind of recording mode, for example paper storage medium (as paper tape etc.), magnetic storage medium are (as floppy disk, hard disk, flash memory Deng), optical storage media (as cd-rom etc.), magnetic-optical storage medium (as mo etc.) etc..
Therefore the invention also discloses a kind of storage medium, be wherein stored with data processor, this data processor For executing any embodiment of said method of the present invention.
In addition, method and step of the present invention is except being realized with data processor, can also be come by hardware Realize, for example, it is possible to by gate, switch, special IC (asic), programmable logic controller (PLC) and embedded microcontroller Etc. realizing.The therefore this hardware that can realize the method for the invention can also constitute the present invention.
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all essences in the present invention Within god and principle, any modification, equivalent substitution and improvement done etc., should be included within the scope of protection of the invention.

Claims (10)

1. a kind of identifying code processing method is it is characterised in that include:
Generate at random two groups of identifying codes, one group as true identifying code, another group as interference identifying code;
Generate identifying code picture, including true identifying code and interference identifying code, in described identifying code picture in addition to identifying code Background be transparent background;
Obtain identifying code background picture, identical hollow processing is carried out to described true identifying code and identifying code background picture, will Described identifying code picture is placed in merge on described identifying code background picture and obtains composing picture, wherein said true checking The hollow out position of code is overlapped with the hollow out position of described identifying code background picture;
Described composing picture is shown on page layout background, and the solid colour of page layout background color and described true identifying code; Viewing area is shown on page layout background, the color of this viewing area is inconsistent with the color of true identifying code;
Described composing picture is moved to described viewing area according to move by the move to described composing picture for the monitoring On.
2. method according to claim 1 is it is characterised in that described move is the dragging instruction to composing picture.
3. method according to claim 1, it is characterised in that described generation identifying code picture, specifically includes: for each group Described identifying code is corresponding to generate an identifying code picture, and in described identifying code picture, the background in addition to identifying code is transparent background.
4. method according to claim 1, it is characterised in that two groups of identifying codes of described random generation, specifically includes:
Using predetermined key generation secrets;
The corresponding grade of difficulty of this active user is determined according to the access characteristic information of active user;
According to determined by grade of difficulty, obtain at random two groups of character strings from described ciphertext as identifying code, wherein difficulty etc. Level is higher, and the character string of identifying code is more complicated.
5. method according to claim 4 it is characterised in that described using predetermined key generation secrets, specifically include: obtain Take ip address and the browser type of active user, described ip address, browser type and described predetermined set of keys are synthesized word Symbol is gone here and there, more encrypted algorithm carries out irreversible encryption, generates a string ciphertext.
6. method according to claim 4 was it is characterised in that the described access characteristic information determination according to active user should The corresponding grade of difficulty of active user, specifically includes:
Obtain ip address and/or the browser type of active user;
Between the request according to predetermined different grade of difficulty corresponding ip address realm, browser type and/or identical ip address Every judging the grade of difficulty corresponding to the ip address of active user and/or browser type;
This grade of difficulty is defined as the corresponding grade of difficulty of this active user.
7. method according to claim 1 it is characterised in that described generation identifying code picture after, to described checking Before code picture carries out hollow processing, further include: distortion effects process is carried out to the identifying code in described identifying code picture.
8. method according to claim 7 is it is characterised in that described turn round to the identifying code in described identifying code picture Bent effect process, specifically includes:
Create one with identifying code picture equivalently-sized new painting canvas, former identifying code picture, by individual element in the way of, handle is often Individual pixel all copies on this painting canvas, and SIN function f (x)=sin (a*2 π * y/ is passed through in the pixel position on this new painting canvas Height) the y-axis coordinate of pixel is processed, in formula, f (x) is the y-axis coordinate of the pixel on new painting canvas, y is former The y-axis coordinate of the same pixel point of identifying code picture, height is the height of former identifying code picture.
9. method according to claim 1 is it is characterised in that the method further includes: monitoring is in input frame input Character string, judges whether this character string is consistent with described true identifying code, if consistent, is verified, otherwise authentication failed.
10. a kind of identifying code processing meanss are it is characterised in that include:
Identifying code generation module, generates two groups of identifying codes for random, as true identifying code, tests as interference for another group for one group Card code;
Identifying code image generating module, for generating identifying code picture, including true identifying code and interference identifying code, described In identifying code picture, the background in addition to identifying code is transparent background;
Composing picture generation module, for obtaining identifying code background picture, to described true identifying code and identifying code background picture Carry out identical hollow processing, described identifying code picture is placed in merge on described identifying code background picture is merged Picture, the hollow out position of wherein said true identifying code is overlapped with the hollow out position of described identifying code background picture;
Checking page generation module, for described composing picture is shown in page layout background, and page layout background color with described The solid colour of true identifying code;Viewing area, the color of this viewing area and true identifying code are shown on page layout background Color is inconsistent;
Described composing picture, for the move to described composing picture for the monitoring, is moved by mobile module according to move To on described viewing area.
CN201410441617.7A 2014-09-01 2014-09-01 Method and device for processing verification codes Active CN104200150B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410441617.7A CN104200150B (en) 2014-09-01 2014-09-01 Method and device for processing verification codes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410441617.7A CN104200150B (en) 2014-09-01 2014-09-01 Method and device for processing verification codes

Publications (2)

Publication Number Publication Date
CN104200150A CN104200150A (en) 2014-12-10
CN104200150B true CN104200150B (en) 2017-01-18

Family

ID=52085442

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410441617.7A Active CN104200150B (en) 2014-09-01 2014-09-01 Method and device for processing verification codes

Country Status (1)

Country Link
CN (1) CN104200150B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105991519B (en) * 2015-01-29 2019-11-08 阿里巴巴集团控股有限公司 A kind of method, apparatus and system verifying identifying code
CN105100079A (en) * 2015-07-01 2015-11-25 广东欧珀移动通信有限公司 Verification interaction method based on pictures and relevant device as well as communication system
CN107346386A (en) * 2016-05-05 2017-11-14 阿里巴巴集团控股有限公司 A kind of certification, information generating method and device for certification
CN106127836B (en) * 2016-06-30 2019-11-19 北京奇艺世纪科技有限公司 Identifying code Picture Generation Method and device
CN107888553B (en) * 2016-09-30 2021-08-13 华为技术有限公司 Verification method, server and system
CN106446662B (en) * 2016-10-25 2019-03-01 国云科技股份有限公司 A method of identification identifying code cheating program
CN107169340A (en) * 2017-05-12 2017-09-15 北京高地信息技术有限公司 A kind of behavior formula identifying code processing method and processing device
CN109782989B (en) * 2017-11-14 2021-08-03 腾讯科技(深圳)有限公司 Security verification method and related device
CN108446083B (en) * 2018-02-24 2022-02-01 维沃移动通信有限公司 Verification information display method and mobile terminal
CN109886010B (en) * 2019-01-28 2023-10-17 平安科技(深圳)有限公司 Verification picture sending method, verification picture synthesizing method and device, storage medium and terminal
CN109902475B (en) * 2019-03-13 2021-01-29 百度在线网络技术(北京)有限公司 Verification code image generation method and device and electronic equipment
CN110246207A (en) * 2019-06-13 2019-09-17 四川长虹电器股份有限公司 Graphical verification code generation method based on multi-layer image
CN112751799B (en) * 2019-10-29 2023-09-05 北京沃东天骏信息技术有限公司 Verification method and device based on picture verification code

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102254355A (en) * 2011-07-05 2011-11-23 周圣云 Method and device for generating three-dimensional verification code
CN102298763A (en) * 2010-06-28 2011-12-28 腾讯科技(北京)有限公司 Method and system for generating picture identifying code
CN102831568A (en) * 2012-08-03 2012-12-19 网易(杭州)网络有限公司 Method and device for generating verification code picture
TWI436232B (en) * 2010-11-30 2014-05-01 F2Ware Inc Data processing methods and systems for processing data in an operation having a predetermined flow based on captcha (completely automated public test to tell computers and humans apart) data, and computer program products thereof
CN103971045A (en) * 2013-01-25 2014-08-06 苏州精易会信息技术有限公司 Click type verification code implementation method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8601538B2 (en) * 2006-08-22 2013-12-03 Fuji Xerox Co., Ltd. Motion and interaction based CAPTCHA

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102298763A (en) * 2010-06-28 2011-12-28 腾讯科技(北京)有限公司 Method and system for generating picture identifying code
TWI436232B (en) * 2010-11-30 2014-05-01 F2Ware Inc Data processing methods and systems for processing data in an operation having a predetermined flow based on captcha (completely automated public test to tell computers and humans apart) data, and computer program products thereof
CN102254355A (en) * 2011-07-05 2011-11-23 周圣云 Method and device for generating three-dimensional verification code
CN102831568A (en) * 2012-08-03 2012-12-19 网易(杭州)网络有限公司 Method and device for generating verification code picture
CN103971045A (en) * 2013-01-25 2014-08-06 苏州精易会信息技术有限公司 Click type verification code implementation method

Also Published As

Publication number Publication date
CN104200150A (en) 2014-12-10

Similar Documents

Publication Publication Date Title
CN104200150B (en) Method and device for processing verification codes
US8510814B2 (en) Method and apparatus for network authentication of human interaction and user identity
US8516606B2 (en) Systems and methods for challenge-response animation and randomization testing
Bursztein et al. Easy does it: More usable CAPTCHAs
US8141146B2 (en) Authentication server, authentication method and authentication program
JP5723981B2 (en) Method, apparatus and computer program for providing challenge response tests related to computer resources
EP2410450A1 (en) Method for providing a challenge based on a content
US10395022B2 (en) Access control for a resource
US20110314537A1 (en) Automatic construction of human interaction proof engines
US8935767B2 (en) Overlay human interactive proof system and techniques
US8893034B2 (en) Motion enabled multi-frame challenge-response test
Kaur et al. Captcha and its techniques: a review
CN105354481B (en) Network verification method and network authentication server
CN103870725A (en) Method and device for generating and verifying verification codes
CN103731403A (en) Verification code generating system and method
CN113918898A (en) Safety verification code generation method, system and medium based on track drawing interaction
EP2715587A1 (en) More secure image-based "captcha" technique
KR101363668B1 (en) Apparatus and method for authentication user using captcha
Tamang et al. Uncover impact factors of text-based CAPTCHA identification
Ghiyamipour Secure graphical password based on cued click points using fuzzy logic
Kumar et al. Gamification of internet security by next generation CAPTCHAs
Chaudhari et al. 3D drag-n-drop CAPTCHA enhanced security through CAPTCHA
Poornananda Bhat et al. Two-way image based CAPTCHA
El-Serngawy et al. Captureme: Attacking the user credential in mobile banking applications
EP3619890B1 (en) Systems and methods for distinguishing among human users and software robots

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant