CN101178813B - Method and apparatus for generating photograph identifying code - Google Patents

Method and apparatus for generating photograph identifying code Download PDF

Info

Publication number
CN101178813B
CN101178813B CN2007101610391A CN200710161039A CN101178813B CN 101178813 B CN101178813 B CN 101178813B CN 2007101610391 A CN2007101610391 A CN 2007101610391A CN 200710161039 A CN200710161039 A CN 200710161039A CN 101178813 B CN101178813 B CN 101178813B
Authority
CN
China
Prior art keywords
picture
animation frame
duration
background
word message
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
CN2007101610391A
Other languages
Chinese (zh)
Other versions
CN101178813A (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.)
Shenzhen Tencent Computer Systems 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 CN2007101610391A priority Critical patent/CN101178813B/en
Publication of CN101178813A publication Critical patent/CN101178813A/en
Application granted granted Critical
Publication of CN101178813B publication Critical patent/CN101178813B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention embodiment discloses an image checking-code generating method which includes taking the static image with checking-code text information as the first animation frame, the chosen background image as the second animation frame and displaying the first animation frame and the second animation frame alternatively; using the alternatively displayed first animation frame and the second animation frame to generate a dynamic image, which can be taken as image checking-code. The invention also discloses an image checking-code generating device. The application of the invention can improve the anti-decryption of the image checking-code.

Description

A kind of generation method and apparatus of picture validation code
Technical field
The present invention relates to computer realm, particularly a kind of generation method and apparatus of picture validation code.
Background technology
Along with the development of network service, some can utilize " robot program " to use the network free resource in a large number, and server usefulness is greatly reduced, and for example mass-send spam etc.; Someone utilizes " robot program " constantly to send services request and responds, and carries out " saturation attack " to reach the purpose that makes the service paralysis; Also the someone utilizes Brute Force supervisor means to carry out virtual assets theft etc.Thereby picture validation code is that program or human identity are assert instrument as differentiating the network service user, more and more is widely used.
Picture validation code is the picture that a width of cloth contains character, and the character in this picture guaranteeing under the identifiable prerequisite of human vision usually, is twisted or adds some noises, to increase the difficulty of automatic program identification.When utilizing picture validation code to carry out the identity identification, system can require the user to answer to have shown which literal or character in this pictures, when system is correctly answered, assert that the user is human, and when repeatedly obtaining wrong answer, then system thinks that the user is a program, and does not carry out subsequent operation.
Present picture validation code, by adopting the static images form, picture such as jpg, png form, in the process that generates this picture validation code, background and character merge fully, and only increase the Character segmentation difficulty by adding noise in character picture background of living in or simple artificial texture.Picture validation code first exemplary plot of Fig. 1 for using in the prior art.As shown in Figure 1, (a) and (b) all twist the character in the picture with the picture validation code (c).Picture validation code second exemplary plot of Fig. 2 for using in the prior art.Picture validation code shown in Figure 2 has all carried out noise or texture processing to the background in the picture.
And along with the development of artificial intelligence and image understanding technology, machine is more and more stronger to the recognition capability of character in the image.For the picture validation code generation method of present this generation static images form, malicious user can be easy to pull the whole identifying code picture that contains alphabet by machine program, crack means by Character segmentation etc. then, from ground unrest, extract alphabet, thereby can crack out picture validation code.
Thereby, generating the method for picture validation code at present, the risk that is cracked is bigger, and security is not high.
Summary of the invention
In view of this, the embodiment of the invention provides a kind of method and apparatus that generates picture validation code, can improve the anti-ability of cracking of picture validation code.
For achieving the above object, the technical scheme of the embodiment of the invention specifically is achieved in that
A kind of generation method of picture validation code, this method comprises: the static images that will comprise the identifying code Word message is as first animation frame, with selected background picture as second animation frame, described first animation frame of Alternation Display and second animation frame; Described selected background picture is: blank background picture or with described static images in the different background picture of identifying code Word message color;
Utilize first animation frame of Alternation Display and second animation frame to generate dynamic picture, with described dynamic picture as picture validation code.
A kind of generating apparatus of picture validation code, this device comprises:
Alternation Display module, the static images that is used for comprising the identifying code Word message be as first animation frame, with selected background picture as second animation frame, described first animation frame of Alternation Display and second animation frame; Described selected background picture is: blank background picture or with described static images in the different background picture of identifying code Word message color;
The picture validation code generation module is used to utilize first animation frame of described Alternation Display module Alternation Display and second animation frame to generate dynamic picture, with described dynamic picture as picture validation code.
As seen from the above technical solution, the method and apparatus that the embodiment of the invention provides, the static images and the background picture that comprise the identifying code Word message by Alternation Display, generate dynamic picture validation code, thereby reduced machine and pulled the probability that comprises complete identifying code Word message in the picture, thereby can increase the difficulty that the identifying code Word message is split from picture, thereby can effectively destroy the integrality that pulls character in the picture, effectively improved the anti-ability of cracking of picture validation code.
Description of drawings
Picture validation code first exemplary plot of Fig. 1 for using in the prior art;
Picture validation code second exemplary plot of Fig. 2 for using in the prior art;
Fig. 3 is the method flow exemplary plot of the generation picture validation code of the present invention's employing;
Fig. 4 is the principle schematic that generates picture validation code in a preferred embodiment of the present invention;
Fig. 5 is the method flow synoptic diagram that generates picture validation code among Fig. 4;
Fig. 6 is the apparatus structure synoptic diagram of the generation picture validation code that adopts among the present invention.
Embodiment
For making purpose of the present invention, technical scheme and advantage clearer, below with reference to the accompanying drawing embodiment that develops simultaneously, the present invention is described in further detail.
The method that provides in the embodiment of the invention is: the static images that will comprise the identifying code Word message is as first animation frame, with selected background picture as second animation frame, Alternation Display first animation frame and second animation frame; Utilize first animation frame of Alternation Display and second animation frame to generate dynamic picture, with dynamic picture as picture validation code.Fig. 3 is the method flow exemplary plot of the generation picture validation code of the present invention's employing, referring to Fig. 3, specifically may further comprise the steps:
Step 301: the static images that will comprise the identifying code Word message is as first animation frame, with selected background picture as second animation frame, Alternation Display first animation frame and second animation frame.
In this step, the identifying code Word message referred in when checking, and the information that requires the user to recognize can be following any one or a plurality of combination: character, numeral, characteristic symbol etc.Static images can be the picture of forms such as jpg, bmp or png.
Alternation Display first animation frame and second animation frame comprise in this step: show first animation frame in the identifying code Word message that obtains shows duration, in showing duration, the background of obtaining shows second animation frame, when not satisfying the condition of the termination demonstration that sets in advance, re-execute the step that shows first animation frame.Here, the termination display condition that sets in advance many, such as, when total duration of Alternation Display reaches the demonstration duration maximal value that sets in advance, terminate alternative shows that perhaps when the number of times of Alternation Display reached the number of times maximal value that sets in advance, terminate alternative showed.
In this step,, then in showing duration, whole backgrounds shows this background picture if selected background picture is one, and when selected background picture when being a plurality of, the then background picture that Alternation Display is selected in background shows duration.Such as, selected background picture is I 1And I 2, then can show that the duration first half shows I in background 1, latter half shows I 2
In this step, the identifying code Word message that obtains shows that duration and background show that the method for duration can set in advance or generate at random.Be specially: the time that sets in advance is shown duration or shows the duration upper and lower limit according to the Word message that sets in advance as the identifying code Word message that obtains, showing that more than or equal to described Word message the duration lower limit is to showing smaller or equal to described Word message in the scope of the duration upper limit, produce a random number, show duration as the described identifying code Word message that obtains.The time that sets in advance is shown duration or shows the duration bound according to the background that sets in advance as the background that obtains, showing that more than or equal to described background the duration lower limit is to showing smaller or equal to described background in the scope of the duration upper limit, produce a random number, show duration as the described background that obtains.
Step 302: utilize first animation frame of Alternation Display and second animation frame to generate dynamic picture, with the dynamic picture that generates as picture validation code.
This step can adopt the method that generates dynamic picture in the prior art, promptly by continuous playing animation frame, just first animation frame of Alternation Display and second animation frame here convert a series of animation frame that produce dynamic effect to support dynamic format file, such as the gif file.
Fig. 4 is the principle schematic that generates picture validation code in a preferred embodiment of the present invention.As shown in Figure 4, at first after the character string of input identifying code to be generated, come the displaying ratio of control string and background according to the demonstration duration of the identifying code Word message that generates at random and the demonstration duration of background.Then, according to the blank background picture of input, generate the gif picture file that a character frame and blank background frame alternate cycles show.At last, output is based on the dynamic picture identifying code of gif form.
Fig. 5 generates the method flow synoptic diagram of picture validation code for Fig. 4.
Step 501: produce the demonstration duration of identifying code character string and the demonstration duration of background at random.
In the present embodiment, suppose to set in advance the interval { t of being of demonstration duration 1, t 2.Adopt random algorithm to generate 2 random numbers, be expressed as the demonstration duration t of identifying code character string, the demonstration duration t ' of background.
Step 502: according to the demonstration duration of identifying code character string and the demonstration duration of background, Alternation Display comprises the static images and the background picture of identifying code character string.
In the present embodiment, with the static images of identifying code character string and background picture all as animation frame, in the t duration, all show the picture I that comprises the identifying code Word message, whole background picture I ' in t ' duration, the condition that the present embodiment supposition stops showing is for showing that the duration maximal value is 10 seconds, then circulation shows two width of cloth pictures,, stops showing during more than or equal to 10 seconds up to total duration of Alternation Display.
Step 503: utilize the static images and the background picture of the identifying code character string of Alternation Display, generate the dynamic picture of supporting dynamic format.
In the present embodiment, adopt prior art, the static images and the background picture of the identifying code character string of Alternation Display be converted to a gif file of supporting dynamic format, with this gif file as picture validation code.When needs are verified, execution in step 504.
Step 504: play this dynamic picture as picture validation code.(503 and 504 repeat among Fig. 5, please revise Fig. 5)
The selected background picture of present embodiment can be blank background picture, also can be and the bigger picture of identifying code Word message difference, such as, the background picture different with the color of identifying code Word message.
The demonstration duration of the identifying code character string of using in the present embodiment and the demonstration duration of background can adopt different upper and lower limits, such as, can set on the demonstration duration of identifying code character string and be limited to 11 seconds, under be limited to 9 seconds, and be limited to 3 seconds on the demonstration duration of background, under be limited to 2 seconds, like this, can so that the identifying code character string display time long.
The method that present embodiment generates picture validation code can realize the dynamic effect of identifying code character string and background Alternation Display, thereby effectively destroy the integrality of character in the picture, has increased and has cracked difficulty.In addition, present embodiment generates dynamic effect by picked at random identifying code character string display time and background method of displaying time, has increased the cost and the cost that adopt the violence method to crack.
Fig. 6 is the apparatus structure synoptic diagram of the generation picture validation code that adopts in the embodiment of the invention.Referring to Fig. 6, this device comprises:
Alternation Display module 610, the static images that will comprise the identifying code Word message be as first animation frame, with selected background picture as second animation frame, Alternation Display first animation frame and second animation frame.Here, selected background picture can be for one or more, all by will be as second animation frame, when selected background picture can be for one, can in showing duration, whole backgrounds show this background picture, and when selected background picture when being a plurality of, the then selected background picture of Alternation Display in background shows duration.
Picture validation code generation module 620 utilizes first animation frame of Alternation Display module Alternation Display and second animation frame to generate dynamic picture, with dynamic picture as picture validation code.
Display module 610 comprises:
First display unit 611 shows first animation frame in the identifying code Word message that obtains shows duration, and triggers second display unit, 612 demonstrations, second animation frame after demonstration is finished.
Second display unit 612 triggers according to first module 611, shows second animation frame in the background of obtaining shows duration, when not satisfying the condition of the termination demonstration that sets in advance, triggers first display unit 611 and shows first animation frame.But it can be also generating at random of setting in advance that the identifying code Word message here shows duration.
In sum, present embodiment generates the method and apparatus of picture validation code, picture by will comprising the identifying code Word message and background picture are as animation frame, and then by these two kinds of pictures of Alternation Display, thereby generated the dynamic picture that comprises the identifying code Word message, this dynamic picture as picture validation code, can effectively be destroyed character integrity in the picture, increased and cracked difficulty.
The above is preferred embodiment of the present invention only, is not to be used to limit protection scope of the present invention.All any modifications of being done within the spirit and principles in the present invention, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (9)

1. the generation method of a picture validation code, it is characterized in that, this method comprises: the static images that will comprise the identifying code Word message is as first animation frame, with selected background picture as second animation frame, described first animation frame of Alternation Display and second animation frame; Described selected background picture is: blank background picture or with described static images in the different background picture of identifying code Word message color;
Utilize first animation frame of Alternation Display and second animation frame to generate dynamic picture, with described dynamic picture as picture validation code.
2. method according to claim 1, it is characterized in that, described first animation frame of described Alternation Display and second animation frame comprise: show described first animation frame in the identifying code Word message that obtains shows duration, in showing duration, the background of obtaining shows described second animation frame, when not satisfying the condition of the termination demonstration that sets in advance, re-execute the step of described first animation frame of described demonstration.
3. method according to claim 2 is characterized in that, obtains described identifying code Word message and shows that duration comprises:
The time that sets in advance is shown duration as the identifying code Word message that obtains, perhaps show the duration upper and lower limit according to the Word message that sets in advance, showing that more than or equal to described Word message the duration lower limit is to showing smaller or equal to described Word message in the scope of the duration upper limit, produce a random number, show duration as the described identifying code Word message that obtains.
4. method according to claim 2 is characterized in that, obtains described background and shows that duration comprises:
The time that sets in advance is shown duration as the background that obtains, perhaps show the duration bound according to the background that sets in advance, showing that more than or equal to described background the duration lower limit is to showing smaller or equal to described background in the scope of the duration upper limit, produce a random number, show duration as the described background that obtains.
5. method according to claim 2 is characterized in that, the described termination display condition that sets in advance comprises: total duration of Alternation Display reaches the demonstration duration maximal value that sets in advance, and perhaps the number of times of Alternation Display reaches the number of times maximal value that sets in advance.
6. method according to claim 2, it is characterized in that, when described selected background picture is a plurality of, describedly in showing duration, the background obtained shows that described second animation frame comprises: the described selected background picture of Alternation Display in described background shows duration.
7. according to claim 1,2,3,4,5 or 6 described methods, it is characterized in that described background picture comprises: the picture of jpg, bmp or png form.
8. the generating apparatus of a picture validation code is characterized in that, this device comprises:
Alternation Display module, the static images that is used for comprising the identifying code Word message be as first animation frame, with selected background picture as second animation frame, described first animation frame of Alternation Display and second animation frame; Described selected background picture is: blank background picture or with described static images in the different background picture of identifying code Word message color;
The picture validation code generation module is used to utilize first animation frame of described Alternation Display module Alternation Display and second animation frame to generate dynamic picture, with described dynamic picture as picture validation code.
9. device according to claim 8 is characterized in that, described Alternation Display module comprises:
First display unit be used for showing described first animation frame in the identifying code Word message that obtains shows duration, and described second display unit of triggering shows described second animation frame after demonstration is finished;
Second display unit is used for triggering according to described first module, shows described second animation frame in the background of obtaining shows duration, when not satisfying the condition of the termination demonstration that sets in advance, triggers described first display unit and shows described first animation frame.
CN2007101610391A 2007-12-19 2007-12-19 Method and apparatus for generating photograph identifying code Active CN101178813B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2007101610391A CN101178813B (en) 2007-12-19 2007-12-19 Method and apparatus for generating photograph identifying code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2007101610391A CN101178813B (en) 2007-12-19 2007-12-19 Method and apparatus for generating photograph identifying code

Publications (2)

Publication Number Publication Date
CN101178813A CN101178813A (en) 2008-05-14
CN101178813B true CN101178813B (en) 2010-04-14

Family

ID=39405053

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2007101610391A Active CN101178813B (en) 2007-12-19 2007-12-19 Method and apparatus for generating photograph identifying code

Country Status (1)

Country Link
CN (1) CN101178813B (en)

Families Citing this family (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100573591C (en) * 2008-08-12 2009-12-23 腾讯科技(深圳)有限公司 A kind of generation method and apparatus of picture validation code
EP2455883B1 (en) * 2010-03-29 2015-03-11 Rakuten, Inc. Authentication server, method and program
EP2715587B1 (en) * 2011-05-26 2019-01-09 Thomson Licensing More secure image-based "captcha" technique
CN102890761B (en) * 2011-08-24 2015-06-10 北京文海思创科技有限公司 Method for verifying through graphical verification code
CN103164700A (en) * 2011-12-15 2013-06-19 英顺源(上海)科技有限公司 System for providing dynamic images to carry out verification and method thereof
CN102663672B (en) * 2012-05-03 2013-12-04 杭州朗和科技有限公司 Picture verification code generation method and device
CN102710635A (en) * 2012-05-30 2012-10-03 无锡德思普科技有限公司 Verification method based on cyclic steady and dynamic-state verification code pictures
CN103065341A (en) * 2012-12-19 2013-04-24 福建天晴数码有限公司 Method for turning figure picture into verification code picture based on black color and white color
CN104113682B (en) * 2013-04-22 2018-08-31 联想(北京)有限公司 A kind of image acquiring method and electronic equipment
CN103400107B (en) * 2013-07-05 2017-04-19 百度在线网络技术(北京)有限公司 Method and device for generating dynamic verification code picture, and verification method and device
CN104298912B (en) * 2013-07-15 2018-12-11 深圳市腾讯计算机系统有限公司 Anti- identifying code implementation method, generation method and the device cracked
CN104346557A (en) * 2013-08-06 2015-02-11 深圳市腾讯计算机系统有限公司 Verification code generation method and device and verification code display control method and device
CN103532979A (en) * 2013-10-30 2014-01-22 蓝盾信息安全技术股份有限公司 Method for generating and verifying multi-conversation verification codes under CGI (common gateway interface) for web
CN105323224B (en) * 2014-07-21 2019-09-17 腾讯科技(深圳)有限公司 Verify exchange method and relevant apparatus and communication system
CN105701391B (en) * 2014-11-27 2018-12-07 阿里巴巴集团控股有限公司 Dynamic verification code Picture Generation Method and device
CN104700022B (en) * 2015-03-31 2018-08-07 北京奇艺世纪科技有限公司 A kind of dynamic authentication code generating method and device
CN106161023B (en) * 2015-04-02 2019-11-05 深圳市腾讯计算机系统有限公司 Auth response method and system based on picture validation code
CN107463830A (en) * 2017-07-07 2017-12-12 北京人亩田网络科技有限公司 The generation method and device and verification method and device of identifying code
JP6958096B2 (en) * 2017-08-10 2021-11-02 富士フイルムビジネスイノベーション株式会社 Information processing equipment and programs
US10592654B2 (en) 2017-09-21 2020-03-17 International Business Machines Corporation Access control to computer resource
CN108182355B (en) * 2017-11-21 2021-10-22 深圳市口袋网络科技有限公司 Login verification method, server and computer readable storage medium
CN108399327B (en) * 2018-03-21 2021-10-22 平安科技(深圳)有限公司 Electronic device, user authentication method based on dynamic picture and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1744123A (en) * 2005-09-24 2006-03-08 宋剑鸿 Method for filtering group-transmitted rubbish mails
CN1980126A (en) * 2005-12-08 2007-06-13 上海盛大网络发展有限公司 Method for realizing picture identifying code
CN1988442A (en) * 2005-12-23 2007-06-27 上海盛大网络发展有限公司 Method for realizing picture verification code
CN101064601A (en) * 2006-04-26 2007-10-31 资通电脑股份有限公司 Method for authenticating character graph

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1744123A (en) * 2005-09-24 2006-03-08 宋剑鸿 Method for filtering group-transmitted rubbish mails
CN1980126A (en) * 2005-12-08 2007-06-13 上海盛大网络发展有限公司 Method for realizing picture identifying code
CN1988442A (en) * 2005-12-23 2007-06-27 上海盛大网络发展有限公司 Method for realizing picture verification code
CN101064601A (en) * 2006-04-26 2007-10-31 资通电脑股份有限公司 Method for authenticating character graph

Also Published As

Publication number Publication date
CN101178813A (en) 2008-05-14

Similar Documents

Publication Publication Date Title
CN101178813B (en) Method and apparatus for generating photograph identifying code
US20090232351A1 (en) Authentication method, authentication device, and recording medium
Imsamai et al. 3D CAPTCHA: A next generation of the CAPTCHA
CN111275784B (en) Method and device for generating image
Hernandez-Castro et al. Pitfalls in CAPTCHA design and implementation: The Math CAPTCHA, a case study
Tao Pass-Go, a new graphical password scheme
CN104657653B (en) The verification method and checking device of image authentication code
CN104426879B (en) Processing method and the corresponding methods, devices and systems of identifying code generation and verifying
CN1998174A (en) Method and system to generate an image for monitoring user interaction with a computer
Rusu et al. Generation and use of handwritten CAPTCHAs
CN107463830A (en) The generation method and device and verification method and device of identifying code
Hwang et al. A spelling based CAPTCHA system by using click
Chiasson Usable authentication and click-based graphical passwords
JP6372396B2 (en) Information transmission system
CN105719522A (en) Dual-client-terminal speech communication method, device and system
JP5552911B2 (en) Authentication apparatus, authentication system, and authentication method
JP7227444B2 (en) Access authentication method using random dot pattern CAPTCHA
CN110569627B (en) Image processing method and device and electronic equipment
CN103853968A (en) Method and device for generating verification code picture and verification method and device thereof
CN103971315A (en) Method for generating image verification codes
JP2016224510A (en) Information processor and computer program
CN112199290A (en) UI element positioning method and system based on machine learning
Ince et al. Designing captcha algorithm: splitting and rotating the images against ocrs
Beheshti et al. A CAPTCHA model based on visual psychophysics: Using the brain to distinguish between human users and automated computer bots
Ishfaq et al. Attaining accessibility and personalization with Socio-Captcha (SCAP)

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
C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20151230

Address after: The South Road in Guangdong province Shenzhen city Fiyta building 518057 floor 5-10 Nanshan District high tech Zone

Patentee after: Shenzhen Tencent Computer System Co., Ltd.

Address before: Shenzhen Futian District City, Guangdong province 518044 Zhenxing Road, SEG Science Park 2 East Room 403

Patentee before: Tencent Technology (Shenzhen) Co., Ltd.