WO2016165557A1 - 验证码的实现方法及装置 - Google Patents
验证码的实现方法及装置 Download PDFInfo
- Publication number
- WO2016165557A1 WO2016165557A1 PCT/CN2016/077777 CN2016077777W WO2016165557A1 WO 2016165557 A1 WO2016165557 A1 WO 2016165557A1 CN 2016077777 W CN2016077777 W CN 2016077777W WO 2016165557 A1 WO2016165557 A1 WO 2016165557A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- character
- verification code
- characters
- verification
- sequence
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/30—Authentication, i.e. establishing the identity or authorisation of security principals
- G06F21/31—User authentication
- G06F21/36—User authentication by graphic or iconic representation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/30—Authentication, i.e. establishing the identity or authorisation of security principals
- G06F21/31—User authentication
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/50—Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
- G06F21/55—Detecting local intrusion or implementing counter-measures
- G06F21/56—Computer malware detection or handling, e.g. anti-virus arrangements
- G06F21/566—Dynamic detection, i.e. detection performed at run-time, e.g. emulation, suspicious activities
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09C—CIPHERING OR DECIPHERING APPARATUS FOR CRYPTOGRAPHIC OR OTHER PURPOSES INVOLVING THE NEED FOR SECRECY
- G09C1/00—Apparatus or methods whereby a given sequence of signs, e.g. an intelligible text, is transformed into an unintelligible sequence of signs by transposing the signs or groups of signs or by replacing them by others according to a predetermined system
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/14—Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/12—Detection or prevention of fraud
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/12—Detection or prevention of fraud
- H04W12/121—Wireless intrusion detection systems [WIDS]; Wireless intrusion prevention systems [WIPS]
- H04W12/122—Counter-measures against attacks; Protection against rogue devices
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2221/00—Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2221/00—Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F2221/21—Indexing 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2221/00—Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F2221/21—Indexing 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/2133—Verifying human interaction, e.g., Captcha
Definitions
- the present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for implementing a verification code.
- CAPTCHA Completely Automated Public Turing test to tell Computers and Humans Apart
- CAPTCHA also known as captcha technology
- the computer acting as the server automatically generates a question that is answered by the user. Since the computer usually cannot answer the CAPTCHA problem, the user who answers the question can be considered a human.
- the use of verification codes can effectively prevent bad guys from using automated programs to violently crack passwords, brush tickets, forum watering and other malicious acts.
- the most common verification code at present is the WYSIWYG verification code.
- Typical examples of WYSIWYG verification codes are character verification codes and puzzle verification codes.
- the basic principle of the traditional character verification code is: the server gives the image X; the image is usually automatically generated by the server according to certain rules; the user observes the image X, looking for the number, English character or Chinese character Y in the image; the user will himself The understood number or character Y is submitted to the server; the server compares the Y input by the user with the answer Y' corresponding to the original image X. If Y and Y' are identical, the current user is determined to be a human user, if Y and Y' are inconsistent , the current user is considered to be a non-human user.
- a puzzle verification code is proposed.
- the user only needs to click and rotate the corresponding thumbnail to splicing the thumbnail to the corresponding position, thereby completing the difference between himself and the automatic machine.
- the puzzle verification code can bring a good user experience, but it also increases the cost and requires a large amount of image library.
- the size of the selected picture is basically 10 times the size of the traditional character verification code (usually, the traditional character verification code picture is less than 4 KB, and the puzzle verification code picture is larger than 40 KB). This will be slower than the character verification code, whether it is transmitted from the network or generated. For some mobile users, sometimes it takes a long time to brush out a puzzle verification code.
- the puzzle verification code is just a kind of image verification code.
- the image recognition function can also identify the position and direction of the stitching, so the degree of crack resistance is not very high.
- the embodiment of the invention provides a method for implementing a verification code, and a device for improving the anti-cracking capability of the verification code and improving the verification efficiency of the verification code.
- Some embodiments of the present invention provide a method for implementing a verification code, including:
- a character verification code is obtained, and then a character verification code is displayed; the character verification code includes an erroneous character of a priori knowledge;
- Some embodiments of the present invention provide a verification method, including:
- the generated verification code includes a first part and a second part, and the second part of the verification code is different from the second part of the character sequence;
- the verification information entered by the user is compared with the second part of the sequence of characters.
- Some embodiments of the present invention provide a verification apparatus comprising a memory and a processor, wherein the memory stores program code that, when executed by a processor, configures the apparatus to perform a method in accordance with an embodiment of the present invention.
- Some embodiments of the present invention provide a computer readable storage medium having stored therein program code that, when executed by a processor, configures the processor to perform a method in accordance with an embodiment of the present invention.
- the embodiment of the present invention has the following advantages: constructing a character verification code by using human prior knowledge, and correcting the wrong character by human prior knowledge; since the character verification code is used, the verification is performed.
- the production speed of the code is very fast, and the verification code base can be large but the resources are less.
- the human prior knowledge since the human prior knowledge is used, the image recognition technology can be resisted without the image interference, so the anti-cracking ability is strong. And the user verification pass rate is higher.
- FIG. 1 is a schematic flow chart of a method for implementing a verification code according to an embodiment of the invention
- FIG. 2 is a schematic diagram of verification of a verification code according to an embodiment of the invention.
- FIG. 3 is a schematic flow chart of a verification code generating method according to an embodiment of the invention.
- FIG. 4 is a schematic structural diagram of an apparatus for implementing a verification code according to an embodiment of the invention.
- FIG. 5 is a schematic structural diagram of an apparatus for implementing a verification code according to another embodiment of the present invention.
- FIG. 6 is a schematic structural diagram of an apparatus for implementing a verification code according to still another embodiment of the present invention.
- FIG. 7 is a schematic structural diagram of an apparatus for implementing a verification code according to another embodiment of the present invention.
- FIG. 8 is a schematic structural diagram of an apparatus for implementing a verification code according to another embodiment of the present invention.
- FIG. 9 is a schematic flow chart of a verification method according to an embodiment of the invention.
- FIG. 1 illustrates a method for implementing a verification code according to an exemplary embodiment of the present invention, including:
- the terminal When a user uses a computing device, the user is typically authenticated for security reasons.
- the terminal In the case where a plurality of computing devices are interconnected by a network (for example, one computing device is a terminal and the other is a server), the terminal may be a server or the server may require authentication, and the authentication may be performed, for example, operation. Authorization verification, login verification, etc.
- the verification code For a specific application scenario, reference may be made to the case where the verification code is required to be used, and the embodiment of the present invention is not limited. Because humans have prior knowledge, they can have automatic correction functions for some simple semantic errors.
- the embodiment of the present invention utilizes this to implement a verification code scheme.
- the character verification code may be provided by a service provider (for example, a server), and the server sends the verification code to the terminal for display; the character verification code may also be locally generated by the verification execution party (for example, the terminal).
- a service provider for example, a server
- the specific implementation method of generating the verification code locally by the verification executing party is as follows:
- the obtaining the character verification code includes: obtaining a short sentence from the local text, and randomly extracting characters from the short sentence to perform random transformation, so that the short sentence has an erroneous character of prior knowledge.
- the characters in the character verification code can be Chinese characters, English characters or other characters.
- the language type currently used by the user is first obtained, and then obtained.
- the same type of character verification code as the above language type so that the user can have a priori knowledge of high matching rate and further improve the verification efficiency.
- the method further includes: determining a near-meaning character of the extracted character in the near-character character library;
- Performing the random transformation described above includes transforming using characters other than the near-character character.
- the specific implementation method of providing the verification code by the server provider or the server side is as follows:
- the obtaining the character verification code includes: receiving a character verification code from a service provider device (for example, a server), wherein the character verification code is a short sentence, and the short sentence includes an erroneous character of a priori knowledge.
- a service provider device for example, a server
- the way to generate a verification code on the server side is the same as the way the verification executor generates the verification code locally. I will not repeat them here.
- the erroneous characters include: the reverse order of the non-head-to-end characters of the alphabet string, the default of the characters in the string, and the random increase of the characters in the string. At least one of them.
- the erroneous character based on the a priori knowledge in the verification code may also be prompted, as follows:
- the method further includes: displaying the prompt information of the erroneous character.
- the specific implementation of the prompt may be to identify the wrong character, for example, using a different color from the original color for highlighting, or using other markers such as bolding the box to prompt.
- Prompt to enter the correct character you can refer to the general prompt mode of the character verification code, here to prompt to inform the user that the original character is wrong, you need to enter the correct character prompt information, Avoid users entering the original displayed characters in a "what you see is what you get" way.
- the correct character is the original correct character, for example, the character sequence is reversed, the character within the string is defaulted, or the character within the string is randomly increased.
- the corresponding character before the operation of the verification code generation (such as the server) can also save the correct character.
- the correct character can be sent to the device performing the authentication (eg terminal) after generating the verification code.
- the embodiment of the invention constructs a character verification code by using human prior knowledge, and corrects the wrong character by human prior knowledge; since the character verification code is adopted, the production speed of the verification code is fast, and the verification code
- the library can be large but takes up less resources.
- human prior knowledge because it uses human prior knowledge, it can be used against image recognition technology without image interference, so it has strong anti-cracking ability and high user pass rate.
- the verification code of the embodiment of the present invention utilizes a priori knowledge of human beings, and the image recognition target of the automaton is basically determined by human beings during training, and at most, only some deformations of characters on various images are recognized, and Changes in character semantics are not identifiable. Look at the following two paragraphs:
- the verification code provided in accordance with some embodiments of the present invention is to make some minor errors for the user to automatically correct the error and then enter the correct answer.
- This verification code gives the user a good experience process, and only needs to produce character pictures, the production cost is small, and the anti-hacking is better than the traditional character verification code.
- FIG. 2 An example of a character verification code based on human prior knowledge is shown in FIG. 2, where 201 is a verification code "The damege is becoming more apparent" containing erroneous characters. 202 is the displayed prompt message "Please enter the correct form of the word in the rectangular box", used to prompt the user to lose Enter the correct character. 203 is an input box for receiving user input. If the user inputs "damage" at 203, the verification will be passed.
- FIG. 3 illustrates a verification code generation process according to an exemplary embodiment of the present invention, including the following steps:
- Randomly delete the letters of a certain location (optionally, randomly delete the letters in a certain position in the middle);
- Randomly add a letter to a location (optional, randomly add a letter somewhere in the middle);
- An embodiment of the present invention further provides an apparatus for implementing a verification code, as shown in FIG. 4, including:
- the obtaining unit 401 is configured to obtain a character verification code if it is determined that the identity verification is required; the character verification code includes an erroneous character of the prior knowledge;
- the display unit 402 is configured to display a character verification code; prompting to input the correct character of the wrong character in the character verification code;
- the receiving unit 403 is configured to receive verification information.
- the verification unit 404 is configured to determine that the verification passes when determining that the verification information belongs to the correct character of the prior knowledge, and otherwise determines that the verification fails.
- the authentication may be performed by the terminal or the server, for example, the authentication of the operation authority, the login verification, and the like.
- the embodiments of the present invention are not limited by the scope of the invention. It should be noted that, if the verification code is provided by the server, the display character verification code may be that the server sends the character verification code to the terminal for display.
- the correct character is the original correct character, for example, the character sequence is reversed, the character within the string is defaulted, or the character within the string is randomly increased.
- the corresponding character before the operation of the verification code generation (such as the server) can also save the correct character.
- the correct character can be sent to the device performing the authentication (eg terminal) after generating the verification code.
- the embodiment of the invention constructs a character verification code by using human prior knowledge, and corrects the wrong character by human prior knowledge; since the character verification code is adopted, the production speed of the verification code is fast, and the verification code
- the library can be large but takes up less resources.
- human prior knowledge because it uses human prior knowledge, it can be used against image recognition technology without image interference, so it has strong anti-cracking ability and high user pass rate.
- the source of the character verification code may be provided by a service provider (for example, a server), or may be locally generated by a verification executing party (for example, a terminal), as follows:
- the specific implementation method of generating the verification code locally by the verification executing party is as follows:
- the foregoing obtaining unit 401 includes:
- a short sentence obtaining unit 501 configured to obtain a short sentence from the local text
- the character conversion unit 502 is configured to randomly extract characters from the short sentences to perform random transformation, so that the short sentences have erroneous characters of prior knowledge.
- the characters in the character verification code can be Chinese characters, English characters or other characters.
- the character verification code of the Chinese character is used, further, as shown in FIG.
- the return includes:
- the character determining unit 601 is configured to: if the character is Chinese, determine the approximate character of the extracted character in the near-character character library before the character transform unit 502 performs the random transform;
- the above character conversion unit 502 is configured to perform conversion using other characters than the near-meaning character.
- the specific implementation method of providing the verification code by the server provider or the server side is as follows:
- the obtaining unit 401 is configured to receive a character verification code from the service provider device, where the character verification code is a short sentence, and the short sentence includes an erroneous character of a priori knowledge.
- the manner in which the verification code is generated on the server side is the same as the manner in which the verification execution party generates the verification code locally, and details are not described herein again.
- the error characters include:
- the erroneous character based on the a priori knowledge in the verification code may also be prompted, as follows: Further, the display unit 402 is further configured to display the prompt information of the erroneous character.
- the specific implementation of the prompt may be to identify the wrong character, for example, using a different color from the original color for highlighting, or using other markers such as bolding the box to prompt.
- FIG. 9 shows a flow chart of a verification method in accordance with an exemplary embodiment of the present invention.
- a verification code may be generated by a computing device (or the computing device receives a verification code generated by another computing device), the user inputs according to the verification code, and then by the computing device (or Another computing device connected to the computing device determines if the user has made the correct input.
- a verification method according to an exemplary embodiment of the present invention will be described in detail below with reference to FIG.
- a sequence of characters is obtained, the sequence of characters comprising a first portion and a second portion. Both the first portion and the second portion of the sequence of characters may include one or more characters. Characters in a sequence of characters can be Chinese characters, English characters, or characters in other languages or any of them. combination.
- Characters in a sequence of characters may, for example, constitute a plurality of words.
- a word is usually composed of several Chinese characters; for English, a word is usually composed of several letters.
- Characters in a sequence of characters form multiple words that can form a sentence, or a phrase, to convey a relatively complete meaning. When these words express a relatively complete meaning, if one or more of the words are misspelled, the user can quickly know what the original correct word is and have a better user experience.
- Character sequences can be obtained from a text library or document. For example, a sentence or a phrase can be selected from a document (such as a literary classic) to form a sequence of characters.
- a part of the character sequence can be randomly selected for the conversion process to be described below (for convenience of distinction, the portion of the character sequence to be transformed is also referred to as the second portion of the character sequence, and the remainder of the character sequence is referred to as the character sequence
- one or more words can be randomly selected from the sequence of characters as part of the sequence of characters to be transformed.
- a verification code is generated according to the sequence of characters, the generated verification code includes a first portion and a second portion, and the second portion of the verification code is different from the second portion of the sequence of characters.
- the first part of the character sequence can be kept unchanged, and the second part of the character sequence can be transformed to generate a verification code.
- the verification code thus generated includes two parts, the first part is identical to the first part of the character sequence, and the second part of the character sequence is transformed to obtain the second part of the verification code.
- Transforming the second portion of the sequence of characters includes at least one of: reversing the order of at least two of the characters, deleting at least one of the characters, replacing at least one of the characters, or adding at least one of the characters.
- the first and last characters of the second part of the character sequence are not changed when the transform process is performed.
- the conversion process can deliberately cause the English word to be misspelled, and the user can input the correct word when inputting the verification code to be described later.
- the second part of the verification code obtained by the transformation process and the second part of the character sequence may be the correct words, but the meanings are quite different.
- the verification code is displayed.
- the second part of the verification code may also be identified, for example, by using a color different from the original color, or by using a bold mark or the like. Line identifier.
- a prompt message may be displayed when the verification code is displayed to prompt the user to input the verification information. For example, you can tell the user that the characters displayed are incorrect. Please enter the correct characters.
- the verification information entered by the user is compared to the second portion of the sequence of characters.
- the embodiment of the present invention further provides another verification code implementation device (or verification device).
- the embodiment includes a receiver 701, a transmitter 702, a processor 703, and a memory 704.
- the memory stores program code that, when executed by the processor, configures the processor (or the apparatus) to perform the method according to any of the above embodiments.
- the embodiment of the present invention further provides another verification code implementation device (or verification device).
- verification device As shown in FIG. 8 , for the convenience of description, only parts related to the embodiment of the present invention are shown, and the specific technical details are not disclosed. Please refer to the method part of the embodiment of the present invention.
- the device is exemplified by a terminal, and the terminal may be any terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, and the like. example:
- FIG. 8 is a block diagram showing a partial structure of a mobile phone related to a terminal provided by an embodiment of the present invention.
- the mobile phone includes: a radio frequency (RF) circuit 810, a memory 820, an input unit 830, a display unit 840, a sensor 850, an audio circuit 860, a wireless fidelity (WiFi) module 870, and a processor 880. And power supply 890 and other components.
- RF radio frequency
- the RF circuit 810 can be used for receiving and transmitting signals during the transmission or reception of information or during a call. Specifically, after receiving the downlink information of the base station, it is processed by the processor 880. In addition, the uplink data is designed to be sent to the base station. Generally, the RF circuit 810 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), Duplexer and so on. In addition, RF circuitry 810 can also communicate with the network and other devices via wireless communication. The above wireless communication may use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (Code Division). Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), E-mail, Short Messaging Service (SMS), and the like.
- GSM Global System of Mobile communication
- GPRS General Packet Radio Service
- the memory 820 can be used to store software programs and modules, and the processor 880 executes various functional applications and data processing of the mobile phone by running software programs and modules stored in the memory 820.
- the memory 820 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application 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 be stored according to Data created by the use of the mobile phone (such as audio data, phone book, etc.).
- memory 820 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
- the input unit 830 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function controls of the handset.
- the input unit 830 may include a touch panel 831 and other input devices 832.
- the touch panel 831 also referred to as a touch screen, can collect touch operations on or near the user (such as the user using a finger, a stylus, or the like on the touch panel 831 or near the touch panel 831. Operation), and drive the corresponding connecting device according to a preset program.
- the touch panel 831 can include two parts: a touch detection device and a touch controller.
- the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information.
- the processor 880 is provided and can receive commands from the processor 880 and execute them.
- the touch panel 831 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
- the input unit 830 may also include other input devices 832.
- other input devices 832 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, and the like.
- the display unit 840 can be used to display information input by the user or information provided to the user as well as various menus of the mobile phone.
- the display unit 840 can include a display panel 841.
- the display panel 841 can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
- the touch panel 831 can cover the display panel 841. When the touch panel 831 detects a touch operation thereon or nearby, the touch panel 831 transmits to the processor 880 to determine the type of the touch event, and then the processor 880 according to the touch event. The type provides a corresponding visual output on display panel 841.
- the touch panel 831 and the display panel 841 are two independent components to implement the input and input functions of the mobile phone, in some embodiments, the touch panel 831 can be integrated with the display panel 841. Realize the input and output functions of the phone.
- the handset can also include at least one type of sensor 850, such as a light sensor, motion sensor, and other sensors.
- the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 841 according to the brightness of the ambient light, and the proximity sensor may close the display panel 841 and/or when the mobile phone moves to the ear. Or backlight.
- the accelerometer sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity.
- the mobile phone can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for the mobile phone can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, no longer Narration.
- the gesture of the mobile phone such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration
- vibration recognition related functions such as pedometer, tapping
- the mobile phone can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, no longer Narration.
- An audio circuit 860, a speaker 861, and a microphone 862 can provide an audio interface between the user and the handset.
- the audio circuit 860 can transmit the converted electrical data of the received audio data to the speaker 861 for conversion to the sound signal output by the speaker 861; on the other hand, the microphone 862 converts the collected sound signal into an electrical signal by the audio circuit 860. After receiving, it is converted into audio data, and then processed by the audio data output processor 880, sent to the other mobile phone via the RF circuit 810, or outputted to the memory 820 for further processing.
- WiFi is a short-range wireless transmission technology
- the mobile phone can help users to send and receive emails, browse web pages, and access streaming media through the WiFi module 870, which provides users with wireless broadband Internet access.
- FIG. 8 shows the WiFi module 870, it can be understood that it does not belong to the necessary configuration of the mobile phone, and can completely change the essence of the invention as needed. It is omitted within the scope.
- the processor 880 is the control center of the handset, and connects various portions of the entire handset using various interfaces and lines, by executing or executing software programs and/or modules stored in the memory 820, and invoking data stored in the memory 820, executing The phone's various functions and processing data, so that the overall monitoring of the phone.
- the processor 880 may include one or more processing units; preferably, the processor 880 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, and the like.
- the modem processor primarily handles wireless communications. It will be appreciated that the above described modem processor may also not be integrated into the processor 880.
- the handset also includes a power source 890 (such as a battery) that supplies power to the various components.
- a power source 890 such as a battery
- the power source can be logically coupled to the processor 880 through a power management system to manage functions such as charging, discharging, and power management through the power management system.
- the mobile phone may further include a camera, a Bluetooth module, and the like, and details are not described herein again.
- the processor 880 included in the terminal further has the function of the processor in the previous embodiment.
- the included units are only divided according to functional logic, but are not limited to the foregoing division, as long as the corresponding functions can be implemented; in addition, the specific names of the functional units It is also for convenience of distinguishing from each other and is not intended to limit the scope of protection of the present invention.
- the storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Software Systems (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Virology (AREA)
- Computing Systems (AREA)
- User Interface Of Digital Computer (AREA)
- Information Transfer Between Computers (AREA)
Abstract
本发明实施例公开了一种验证码的实现方法,及装置,其中方法的实现包括:若确定需要进行身份验证,则获取字符验证码,然后显示字符验证码;所述字符验证码包含先验知识的错误字符;提示输入字符验证码中错误字符的正确字符,接收验证信息;在确定所述验证信息属于所述先验知识的正确字符,则确定验证通过,否则确定验证失败。
Description
本申请要求2015年4月16日提交中国专利局、申请号为201510180721X、发明名称为“一种验证码的实现方法,及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本公开涉及计算机技术领域,特别涉及一种验证码的实现方法,及装置。
全自动区分计算机和人类的图灵测试(Completely Automated Public Turing test to tell Computers and Humans Apart,CAPTCHA),也称为验证码技术,是一种区分用户是计算机还是人的公共全自动程序。在CAPTCHA测试中,作为服务器的计算机会自动生成一个问题由用户来解答。由于计算机通常无法解答CAPTCHA的问题,所以回答出问题的用户就可以被认为是人类。使用验证码可以有效防止坏人使用自动化程序进行暴力破解密码、刷票、论坛灌水等恶意行为。
目前最通用的验证码为所见即所得式验证码。所见即所得式验证码的典型例子是字符验证码和拼图验证码。传统的字符验证码的基本原理是:服务器给出图像X;该图像通常是服务器根据一定的规则自动生成的;用户观察图像X,寻找图像中的数字、英文字符或中文字符Y;用户将自己所理解的数字或字符Y提交给服务器;服务器将用户输入的Y与原始图像X对应的答案Y’进行对比,如果Y和Y’一致,则认定当前用户为人类用户,如果Y和Y’不一致,则认定当前用户为非人类用户。
针对传统的字符验证码,只要收集足够的样本,使用OCR(Optical Character Recognition,光学字符识别)技术进行学习和训练,就可以很快开发出可用的自动机程序来对传统的字符验证码进行识别。为了对抗自动机对字符验证码的识别,目前普遍的做法是加各种各样的干扰:比
如旋转、扭曲、形变、加干扰线等等方式。但是随着对验证码所加的干扰越来越复杂,人类用户也越来越难以识别这些加干扰的验证码,导致人正确识别验证码的比例不断下降。
因此,随着深度学习、稀疏编码等人工智能技术的成熟,OCR的精度越来越高,单纯的图像干扰对自动机的抗破解并不能提供很有效的效果,而且导致用户正确识别验证码的比例也不断下降,验证效率也越来越低。
为了改善用户体验,人们提出一种拼图验证码,用户只需要点击、旋转对应的小图,将小图拼接到对应的位置上,以此完成自己与自动机的区别。相对传统的字符验证码,拼图验证码可以带来好的用户体验,却也增加了成本,需要一个大数据量的图片库。另外所选的图片的大小基本上是传统的字符验证码的10倍大小(通常,传统的字符验证码图片小于4KB,拼图验证码图片大于40KB)。这样不管是从网络传输、还是产生速度上都会要比字符验证码要慢。对于一些移动端的用户,有时候刷出一张拼图验证码会需要很长的时间。
与传统的字符验证码一样,拼图验证码也只是单纯的一种图像验证码,通过图像的一些识别技术也能够识别拼接的位置和方向等信息,所以抗破解程度也不是很高。
发明内容
本发明实施例提供了一种验证码的实现方法,及装置,用于提高验证码抗破解能力,提高验证码验证通过效率。
本发明的一些实施例提供一种验证码的实现方法,包括:
若确定需要进行身份验证,则获取字符验证码,然后显示字符验证码;所述字符验证码包含先验知识的错误字符;
提示输入所述验证字符中错误字符的正确字符,接收验证信息;
在确定所述验证信息属于所述先验知识的正确字符,则确定验证通过,否则确定验证失败。
本发明的一些实施例提供一种验证方法,包括:
获取字符序列,所述字符序列包括第一部分和第二部分,
根据所述字符序列,生成验证码,生成的所述验证码包括第一部分和第二部分,所述验证码的第二部分不同于所述字符序列的第二部分;
显示所述验证码;
接收用户输入的验证信息;
比较用户输入的验证信息与所述字符序列的第二部分。
本发明的一些实施例提供一种验证装置,包括存储器和处理器,其中所述存储器存储程序代码,所述代码当由处理器执行时,配置所述装置执行根据本发明实施例的方法。
本发明的一些实施例提供一种计算机可读存储介质,其中存储有程序代码,所述代码当由处理器执行时,配置所述处理器执行根据本发明实施例的方法。
从以上技术方案可以看出,本发明实施例具有以下优点:采用人类的先验知识构建字符验证码,通过人类先验知识对错误的字符进行纠错;由于采用的是字符验证码,因此验证码的生产速度传输速度很快,并且验证码库可以很大但占用资源却较少,另外由于使用的是人类的先验知识,不用加图像干扰,可以对抗图像识别技术因此抗破解能力强,并且用户验证通过率较高。
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简要介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域的普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为根据本发明一实施例的验证码的实现方法流程示意图;
图2为根据本发明一实施例的验证码的验证示意图;
图3为根据本发明一实施例的验证码生成方法流程示意图;
图4为根据本发明一实施例的验证码的实现装置结构示意图;
图5为根据本发明另一实施例的验证码的实现装置结构示意图;
图6为根据本发明又一实施例的验证码的实现装置结构示意图;
图7为根据本发明另一实施例的验证码的实现装置结构示意图;
图8为根据本发明另一实施例的验证码的实现装置结构示意图;
图9为根据本发明一实施例的验证方法的流程示意图。
为了使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明作进一步地详细描述,显然,所描述的实施例仅仅是本发明一部份实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。
图1示出根据本发明示例实施例的一种验证码的实现方法,包括:
101:若确定需要进行身份验证,则获取字符验证码,然后显示字符验证码;上述字符验证码包含先验知识的错误字符。
在用户使用计算装置时,为了安全起见,通常要对用户进行身份验证。在多个计算装置通过网络互联的情况下(例如,一个计算装置是终端,另一个是服务器),可以是终端也可以是服务器一端要求进行身份验证,需要进行身份验证的情况可以是例如:操作权限的验证、登录验证等。具体应用场景可以参考目前需要使用验证码的情形,本发明实施例不作唯一性限定。人类因为拥有先验知识,可以对一些简单语义上的错误有自动纠正功能,本发明实施例利用这一点实现验证码的方案。其中字符验证码可以是服务提供方(例如服务器)提供的,并且服务器将验证码发送给终端显示;字符验证码也可以是验证执行方(例如终端)本地生成的。下面对此具体说明:
一、由验证执行方本地生成验证码的具体实现方式如下:
上述获取字符验证码包括:从本地文本中获取短句,并从上述短句中随机抽取字符进行随机变换,使上述短句出现先验知识的错误字符。
字符验证码中的字符可以是中文字符、英文字符或者其他字符。在本发明实施例中,可选地首先获取用户当前使用的语言类型,然后获取
与上述语言类型相同类型的字符验证码,从而使用户能够具有高匹配率的先验知识,并进一步提升验证效率。
可选地,如果使用中文字符的字符验证码,上述进行随机变换之前,上述方法还包括:确定抽取的字符在近意字符库中的近意字符;
上述进行随机变换包括:使用近意字符之外的其他字符进行变换。
由于中文字符中存在极多近意字符,例如“突然”和“忽然”在语句中含义几乎是相同的,若将“突”改为“忽”则用户难以通过先验知识进行识别,因此使用非近意字符进行变换,可以避免这种情况的发生,从而提高验证成功率。
二、由服务器提供方或者服务器侧提供验证码的具体实现方式如下:
上述获取字符验证码包括:接收来自服务提供方设备(例如服务器)的字符验证码,上述字符验证码为短句,上述短句内包含先验知识的错误字符。
在服务器一侧生成验证码的方式与验证执行方本地生成验证码的方式相同。在此不再赘述。
上文描述了两种验证码的具体实现方式。根据本发明的示例本实施例,若上述字符验证码为字母字符串的集合,上述错误字符包括:字母字符串的非首尾字符顺序颠倒、字符串内字符缺省以及字符串内字符随机增加中的至少一种。
可选地,在显示验证码的过程中,还可以对验证码中基于先验知识的错误字符进行提示,具体如下:上述方法还包括:显示上述错误字符的提示信息。
提示的具体实现方式,可以是将错误字符进行标识,例如:使用与原颜色不同的颜色进行突出显示,或者,使用其他例如加框加粗等标记进行提示。
102:提示输入上述验证字符中错误字符的正确字符,并接收验证信息;
提示输入正确字符的方式,可以参考字符验证码的一般提示方式,这里提示要增加告知用户原字符有误,需要输入正确的字符的提示信息,
避免用户按照“所见即所得”的方式输入原始显示的字符。
103:在确定上述验证信息属于上述先验知识的正确字符,则确定验证通过,否则确定验证失败。
正确字符是原始正确的字符,例如:字符顺序颠倒、字符串内字符缺省或字符串内字符随机增加等操作之前的相应字符;在验证码生成一端(例如服务器)可以保存正确的字符,也可以在生成验证码后将正确的字符发送给执行身份验证的设备(例如终端)。
本发明实施例采用人类的先验知识构建字符验证码,通过人类先验知识对错误的字符进行纠错;由于采用的是字符验证码,因此验证码的生产速度传输速度很快,并且验证码库可以很大但占用资源却较少,另外由于使用的是人类的先验知识,不用加图像干扰,可以对抗图像识别技术因此抗破解能力强,并且用户验证通过率较高。
本发明实施例的验证码利用了人类的先验知识,而自动机的图像识别目标基本是人类在做训练的时候就确定了,最多也只能识别字符在各种图像上的一些形变,而对于字符语义上的改变是无法做到识别的。先看下面两段话:
“研表究明,汉字的序顺并不定一能影阅响读,比如当你看完这句话后,才发这现里的字全是都乱的。”
"Aoccdrnig to a rscheearch at an Elingsh uinervtisy,it deosn't mttaer in waht oredr the ltteers in a wrod are,the olny iprmoetnt tihng is taht frist and lsat ltteer is at the rghit pclae"
从以上两段话我们就可以看出人类因为拥有先验知识,可以对一些简单语义上的错误有自动纠正功能。由此根据本发明一些实施例提供的验证码是制造一些细小的错误让用户去自动的纠错,然后输入正确的答案。这种验证码给用户带来良好的体验过程、而且也只是需要生产字符图片,生产成本很小、并且在抗破解上也比传统的字符验证码要好。
基于人类先验知识的字符验证码的一个例子如图2所示,201是显示的包含错误字符的验证码“The damege is becoming more apparent”。202是显示的提示信息“请输入矩形框内单词的正确形式”,用于提示用户输
入正确的字符。203是输入框,用于接收用户的输入,若用户在203输入“damage”,那么将会验证通过。
参照图3,图3示出根据本发明一示例实施例的验证码生成过程,包括如下步骤:
301:从文档中随机选取一个短句;
302:在这个短句中随机选取一个单词;
303:对这个单词进行以下4种操作中的至少一种:
随机交换2个字母的顺序(可选的是,对不是首端和末端的2个字母随机交换顺序);
随机删除某个位置的字母(可选的是,随机删除中间某个位置的字母);
随机在某个位置添加一个字母(可选的是,随机在中间某个位置添加一个字母);
不做处理。
304:对修改过后的单词进行标红;
305:将包括标红的单词的短句画在图片上,以生成验证码;
306:输出验证码。
采用本发明实施例方案,可以具有如下好处:
1、提升用户体验,字符上不用加任何的图像干扰,验证通过率较高;
2、能够保持与传统字符验证码一样的大小,解决了传输速率、生产速率的问题;和/或
3、抗破解能力比较强,本发明运用了人类一些纠错的先验知识,所以单纯的运用图像技术是不可能破解我们的验证码。
本发明实施例还提供了一种验证码的实现装置,如图4所示,包括:
获取单元401,用于若确定需要进行身份验证,则获取字符验证码;上述字符验证码包含先验知识的错误字符;
显示单元402,用于显示字符验证码;提示输入上述字符验证码中错误字符的正确字符;
接收单元403,用于接收验证信息;
验证单元404,用于在确定上述验证信息属于上述先验知识的正确字符,则确定验证通过,否则确定验证失败。
在本发明实施例中,需要进行身份验证的情况可以是终端也可以是服务器一端需要进行身份验证,例如:操作权限的验证、登录验证等,具体应用场景可以参考目前需要使用验证码的情形,本发明实施例不作唯一性限定。另需说明的是,若验证码由服务器提供,那么显示字符验证码可以是服务器将字符验证码发送给终端显示。
提示输入正确字符的方式,可以参考字符验证码的一般提示方式,这里提示要增加告知用户原字符有误,需要输入正确的字符的提示信息,避免用户按照“所见即所得”的方式输入原始显示的字符。
正确字符是原始正确的字符,例如:字符顺序颠倒、字符串内字符缺省或字符串内字符随机增加等操作之前的相应字符;在验证码生成一端(例如服务器)可以保存正确的字符,也可以在生成验证码后将正确的字符发送给执行身份验证的设备(例如终端)。
本发明实施例采用人类的先验知识构建字符验证码,通过人类先验知识对错误的字符进行纠错;由于采用的是字符验证码,因此验证码的生产速度传输速度很快,并且验证码库可以很大但占用资源却较少,另外由于使用的是人类的先验知识,不用加图像干扰,可以对抗图像识别技术因此抗破解能力强,并且用户验证通过率较高。
根据本发明的示例实施例,字符验证码的来源可以是服务提供方(例如服务器)提供的,也可以是验证执行方(例如终端)本地生成的,具体如下:
一、由验证执行方本地生成验证码的具体实现方式如下:
可选地,如图5所示,上述获取单元401包括:
短句获取单元501,用于从本地文本中获取短句;
字符变换单元502,用于从上述短句中随机抽取字符进行随机变换,使上述短句出现先验知识的错误字符。
字符验证码中的字符可以是中文字符、英文字符或者其他字符。可选地,如果使用中文字符的字符验证码进一步地,如图6所示,上述装
置还包括:
字符确定单元601,用于若上述字符为中文,在上述字符变换单元502进行随机变换之前,确定抽取的字符在近意字符库中的近意字符;
上述字符变换单元502,用于使用近意字符之外的其他字符进行变换。
二、由服务器提供方或者服务器侧提供验证码的具体实现方式如下:
可选地,上述获取单元401,用于接收来自服务提供方设备的字符验证码,上述字符验证码为短句,上述短句内包含先验知识的错误字符。
在服务器一侧生成验证码的方式与验证执行方本地生成验证码的方式相同,在此不再赘述。
可选地,若上述字符验证码为字母字符串的集合,上述错误字符包括:
字母字符串的非首尾字符顺序颠倒、字符串内字符缺省以及字符串内字符随机增加中的至少一种。
可选地,在显示验证码的过程中,还可以对验证码中基于先验知识的错误字符进行提示,具体如下:进一步地,上述显示单元402,还用于显示上述错误字符的提示信息。
提示的具体实现方式,可以是将错误字符进行标识,例如:使用与原颜色不同的颜色进行突出显示,或者,使用其他例如加框加粗等标记进行提示。
图9示出根据本发明一个示例实施例的验证方法流程图。根据本发明示例实施例,为了对用户进行身份验证,可以由计算装置生成验证码(或者计算装置接收另一计算装置生成的验证码),用户根据验证码进行输入,然后由计算装置(或者与计算装置连接的另一计算装置),判断用户是否正确的进行了输入。下面参照图9详细描述根据本发明示例实施例的验证方法。
在901,获取字符序列,所述字符序列包括第一部分和第二部分。字符序列的第一部分和第二部分均可以包括一个或多个字符。字符序列中的字符可以是中文字符、英文字符或者其他语言的字符或者它们的任意
组合。
字符序列中的字符例如可以构成多个词。对于汉语,通常由几个汉字组成一个词;对于英语,通常由若干字母组成一个单词。字符序列中的字符构成多个词,这些词可以构成一个句子,或者一个短语,以表达相对完整的意思。当这些词表达一个相对完整的意思时,如果其中某个或某几个词拼写错误,用户可以很快得知原本正确的词是什么,有更好的用户体验。
可以从文本库或文档中获取字符序列。例如,可以从文档(如一篇文学名著)中选择一个句子或者一个短语,以构成字符序列。
可以随机选择字符序列的一部分用于下文要描述的变换处理(为了便于区别,要进行变换处理的字符序列的部分也称作字符序列的第二部分,字符序列的其余部分称作字符序列的第一部分),例如可以从字符序列中随机选择一个或多个词作为要变换的字符序列部分。
在902,根据字符序列,生成验证码,生成的验证码包括第一部分和第二部分,验证码第二部分不同于字符序列的第二部分。
可以保持字符序列的第一部分不变,而对字符序列的第二部分进行变换处理,从而生成验证码。这样生成的验证码包括了两部分,第一部分与字符序列的第一部分相同,对字符序列的第二部分进行变换处理得到的是验证码的第二部分。对字符序列的第二部分进行变换处理包括下述中的至少一种:将其中的至少两个字符的顺序颠倒、删除其中的至少一个字符、替换其中的至少一个字符或增加至少一个字符。可选的是,在进行变换处理时,不改变字符序列第二部分的第一个和最后一个字符。
在字符序列的第二部分是一个英文单词时,通过变换处理,可以故意让该英文单词拼写错误,而让用户在后面要描述的输入验证码时,输入正确的单词。或者可以使通过变换处理得到的验证码的第二部分与字符序列的第二部分都是正确的词,但含义相差较大。
在903,显示所述验证码。
在显示验证码的过程中,还可以对验证码的第二部分进行标识,例如:使用与原颜色不同的颜色进行标识,或者,使用加框加粗等标记进
行标识。
在904,接收用户输入的验证信息。
在显示所述验证码时可以显示提示信息,以提示用户输入验证信息。例如可以告知用户显示的字符有误,请输入正确的字符。
在905,比较用户输入的验证信息与所述字符序列的第二部分。
如果确定用户输入验证信息与字符序列的第二部分一致,则确定验证通过,否则确定验证失败。
本发明实施例还提供了另一种验证码的实现装置(或验证装置),如图7所示,包括:接收器701、发射器702、处理器703以及存储器704。其中存储器存储程序代码,所述代码当由处理器执行时,配置所述处理器(或所述装置)执行根据上述任一实施例的方法。
本发明实施例还提供了另一种验证码的实现装置(或验证装置),如图8所示,为了便于说明,仅示出了与本发明实施例相关的部分,具体技术细节未揭示的,请参照本发明实施例方法部分。该装置以终端为例,该终端可以为包括手机、平板电脑、PDA(Personal Digital Assistant,个人数字助理)、POS(Point of Sales,销售终端)、车载电脑等任意终端设备,以终端为手机为例:
图8示出的是与本发明实施例提供的终端相关的手机的部分结构的框图。参考图8,手机包括:射频(Radio Frequency,RF)电路810、存储器820、输入单元830、显示单元840、传感器850、音频电路860、无线保真(wireless fidelity,WiFi)模块870、处理器880、以及电源890等部件。本领域技术人员可以理解,图8中示出的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
下面结合图8对手机的各个构成部件进行具体的介绍:
RF电路810可用于收发信息或通话过程中,信号的接收和发送,特别地,将基站的下行信息接收后,给处理器880处理;另外,将设计上行的数据发送给基站。通常,RF电路810包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、
双工器等。此外,RF电路810还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(Global System of Mobile communication,GSM)、通用分组无线服务(General Packet Radio Service,GPRS)、码分多址(Code Division Multiple Access,CDMA)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、长期演进(Long Term Evolution,LTE)、电子邮件、短消息服务(Short Messaging Service,SMS)等。
存储器820可用于存储软件程序以及模块,处理器880通过运行存储在存储器820的软件程序以及模块,从而执行手机的各种功能应用以及数据处理。存储器820可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器820可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
输入单元830可用于接收输入的数字或字符信息,以及产生与手机的用户设置以及功能控制有关的键信号输入。具体地,输入单元830可包括触控面板831以及其他输入设备832。触控面板831,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板831上或在触控面板831附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板831可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器880,并能接收处理器880发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板831。除了触控面板831,输入单元830还可以包括其他输入设备832。具体地,其他输入设备832可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。
显示单元840可用于显示由用户输入的信息或提供给用户的信息以及手机的各种菜单。显示单元840可包括显示面板841,可选的,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板841。进一步的,触控面板831可覆盖显示面板841,当触控面板831检测到在其上或附近的触摸操作后,传送给处理器880以确定触摸事件的类型,随后处理器880根据触摸事件的类型在显示面板841上提供相应的视觉输出。虽然在图8中,触控面板831与显示面板841是作为两个独立的部件来实现手机的输入和输入功能,但是在某些实施例中,可以将触控面板831与显示面板841集成而实现手机的输入和输出功能。
手机还可包括至少一种传感器850,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板841的亮度,接近传感器可在手机移动到耳边时,关闭显示面板841和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于手机还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。
音频电路860、扬声器861,传声器862可提供用户与手机之间的音频接口。音频电路860可将接收到的音频数据转换后的电信号,传输到扬声器861,由扬声器861转换为声音信号输出;另一方面,传声器862将收集的声音信号转换为电信号,由音频电路860接收后转换为音频数据,再将音频数据输出处理器880处理后,经RF电路810以发送给比如另一手机,或者将音频数据输出至存储器820以便进一步处理。
WiFi属于短距离无线传输技术,手机通过WiFi模块870可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图8示出了WiFi模块870,但是可以理解的是,其并不属于手机的必须构成,完全可以根据需要在不改变发明的本质的
范围内而省略。
处理器880是手机的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器820内的软件程序和/或模块,以及调用存储在存储器820内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监控。可选的,处理器880可包括一个或多个处理单元;优选的,处理器880可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器880中。
手机还包括给各个部件供电的电源890(比如电池),优选的,电源可以通过电源管理系统与处理器880逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。
尽管未示出,手机还可以包括摄像头、蓝牙模块等,在此不再赘述。
在本发明实施例中,该终端所包括的处理器880还具有前一实施例中处理器的功能。
值得注意的是,上述装置实施例中,所包括的各个单元只是按照功能逻辑进行划分的,但并不局限于上述的划分,只要能够实现相应的功能即可;另外,各功能单元的具体名称也只是为了便于相互区分,并不用于限制本发明的保护范围。
另外,本领域普通技术人员可以理解实现上述各方法实施例中的全部或部分步骤是可以通过程序来指令相关的硬件完成,相应的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
以上仅为本发明较佳的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明实施例揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应该以权利要求的保护范围为准。
Claims (20)
- 一种验证码的实现方法,包括:若确定需要进行身份验证,则获取字符验证码,然后显示字符验证码,其中所述字符验证码包含先验知识的错误字符;提示输入所述字符验证码中错误字符的正确字符,并接收验证信息;在确定所述验证信息属于所述先验知识的正确字符,则确定验证通过,否则确定验证失败。
- 根据权利要求1所述方法,其中,所述获取字符验证码包括:从本地文本中获取短句,并从所述短句中随机抽取字符进行随机变换,使所述短句出现先验知识的错误字符。
- 根据权利要求2所述方法,其中,若所述字符为中文,所述进行随机变换之前,所述方法还包括:确定抽取的字符在近意字符库中的近意字符;所述进行随机变换包括:使用近意字符之外的其他字符进行变换。
- 根据权利要求1所述方法,其中,所述获取字符验证码包括:接收来自服务提供方设备的字符验证码,所述字符验证码为短句,所述短句内包含先验知识的错误字符。
- 根据权利要求1所述方法,其特征在于,若所述字符验证码为字母字符串的集合,所述错误字符包括:字母字符串的非首尾字符顺序颠倒、字符串内字符缺省以及字符串内字符随机增加中的至少一种。
- 根据权利要求1至5任意一项所述方法,其特征在于,所述方法还包括:显示所述错误字符的提示信息。
- 一种验证码的实现装置,包括:获取单元,用于若确定需要进行身份验证,则获取字符验证码,其中所述字符验证码包含先验知识的错误字符;显示单元,用于显示字符验证码,提示输入所述字符验证码中错误字符的正确字符;接收单元,用于接收验证信息;验证单元,用于在确定所述验证信息属于所述先验知识的正确字符,则确定验证通过,否则确定验证失败。
- 根据权利要求7所述装置,其中,所述获取单元包括:短句获取单元,用于从本地文本中获取短句;字符变换单元,用于从所述短句中随机抽取字符进行随机变换,使所述短句出现先验知识的错误字符。
- 根据权利要求8所述装置,还包括:字符确定单元,用于若所述字符为中文,在所述字符变换单元进行随机变换之前,确定抽取的字符在近意字符库中的近意字符;所述字符变换单元,用于使用近意字符之外的其他字符进行变换。
- 根据权利要求7所述装置,其中,所述获取单元,用于接收来自服务提供方设备的字符验证码,所述字符验证码为短句,所述短句内包含先验知识的错误字符。
- 根据权利要求7所述装置,其中,若所述字符验证码为字母字符串的集合,所述错误字符包括:字母字符串的非首尾字符顺序颠倒、字符串内字符缺省以及字符串内字符随机增加中的至少一种。
- 根据权利要求7至11任意一项所述装置,其中,所述显示单元,还用于显示所述错误字符的提示信息。
- 一种验证方法,包括:获取字符序列,所述字符序列包括第一部分和第二部分,根据所述字符序列,生成验证码,生成的所述验证码包括第一部分和第二部分,所述验证码的第二部分不同于所述字符序列的第二部分;显示所述验证码;接收用户输入的验证信息;比较用户输入的验证信息与所述字符序列的第二部分。
- 根据权利要求13所述方法,还包括:显示提示信息,用于提示用户输入验证信息。
- 根据权利要求13所述方法,其中所述字符序列的第二部分包括 多个字符,根据所述字符序列生成验证码包括:改变所述多个字符中的至少两个字符的顺序以得到所述验证码的所述第二部分。
- 根据权利要求13所述方法,其中所述字符序列的第二部分包括一个或多个字符,根据所述字符序列生成验证码包括:去除所述多个字符中的至少一个以得到所述验证码的所述第二部分。
- 根据权利要求13所述方法,其中所述字符序列的第二部分包括一个或多个字符,根据所述字符序列生成验证码包括:将所述一个或多个字符中的至少一个用不同的字符替换以得到所述验证码的所述第二部分。
- 根据权利要求13所述方法,其中根据所述字符序列生成验证码包括:在所述字符序列的第二部分增加一个或多个字符以得到所述验证码的所述第二部分。
- 根据权利要求13所述方法,其中所述验证码的第一部分与所述字符序列的第一部分包括相同的字符。
- 一种验证装置,包括存储器和处理器,其中所述存储器存储程序代码,所述代码当由处理器执行时,配置所述装置执行根据权利要求13-19中任一项所述的方法。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US15/636,453 US10769253B2 (en) | 2015-04-16 | 2017-06-28 | Method and device for realizing verification code |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510180721.X | 2015-04-16 | ||
CN201510180721.XA CN106156597A (zh) | 2015-04-16 | 2015-04-16 | 一种验证码的实现方法,及装置 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US15/636,453 Continuation US10769253B2 (en) | 2015-04-16 | 2017-06-28 | Method and device for realizing verification code |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2016165557A1 true WO2016165557A1 (zh) | 2016-10-20 |
Family
ID=57125737
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2016/077777 WO2016165557A1 (zh) | 2015-04-16 | 2016-03-30 | 验证码的实现方法及装置 |
Country Status (3)
Country | Link |
---|---|
US (1) | US10769253B2 (zh) |
CN (1) | CN106156597A (zh) |
WO (1) | WO2016165557A1 (zh) |
Families Citing this family (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106899411B (zh) * | 2016-12-08 | 2021-09-21 | 创新先进技术有限公司 | 一种基于验证码的校验方法及装置 |
EP3432182B1 (en) * | 2017-07-17 | 2020-04-15 | Tata Consultancy Services Limited | Systems and methods for secure, accessible and usable captcha |
CN109815658A (zh) * | 2018-12-14 | 2019-05-28 | 平安科技(深圳)有限公司 | 一种验证方法和装置、计算机设备以及计算机存储介质 |
CN110246198B (zh) * | 2019-05-21 | 2023-05-02 | 北京奇艺世纪科技有限公司 | 选字验证码生成方法、装置、电子设备及存储介质 |
CN110691086A (zh) * | 2019-09-29 | 2020-01-14 | 深圳供电局有限公司 | 一种跨平台的验证解锁方法 |
CN111143213A (zh) * | 2019-12-24 | 2020-05-12 | 北京数衍科技有限公司 | 软件自动化测试方法和装置及电子设备 |
CN111667549B (zh) * | 2020-04-28 | 2023-04-07 | 华东师范大学 | 基于对抗样本和随机变换的图形验证码生成方法、设备及存储介质 |
CN112241522B (zh) * | 2020-09-29 | 2024-02-09 | 全通金信控股(广东)有限公司 | 一种图片验证码生成方法和验证系统 |
CN113076535A (zh) * | 2021-03-30 | 2021-07-06 | 顶象科技有限公司 | 一种国际化验证码的实现方法和装置 |
CN113297548B (zh) * | 2021-04-06 | 2022-07-08 | 北京理工大学 | 人机协同方式的验证码识别方法及其系统 |
CN114465762A (zh) * | 2021-12-24 | 2022-05-10 | 安徽航天信息有限公司 | 一种基于语境的验证码生成方法、装置及存储介质 |
CN115567937A (zh) * | 2022-09-16 | 2023-01-03 | 北京字跳网络技术有限公司 | 短信验证方法、装置、存储介质及电子设备 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102904722A (zh) * | 2012-09-21 | 2013-01-30 | 张仁平 | 一种用语义和图像元素接合的网络验证方法及系统 |
CN104038502A (zh) * | 2014-06-24 | 2014-09-10 | 五八同城信息技术有限公司 | 一种验证方法及系统 |
CN104144052A (zh) * | 2013-05-10 | 2014-11-12 | 孙鑫 | 一种文字中间的关键词与图片或视频对应的验证方法 |
CN104283682A (zh) * | 2013-07-08 | 2015-01-14 | 深圳市腾讯计算机系统有限公司 | 一种利用验证码进行校验的方法、装置及系统 |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7945952B1 (en) * | 2005-06-30 | 2011-05-17 | Google Inc. | Methods and apparatuses for presenting challenges to tell humans and computers apart |
US20080228580A1 (en) * | 2007-03-12 | 2008-09-18 | Mynewpedia Corp. | Method and system for compensating online content contributors and editors |
WO2010008722A1 (en) * | 2008-06-23 | 2010-01-21 | John Nicholas Gross | Captcha system optimized for distinguishing between humans and machines |
CN101872351B (zh) * | 2009-04-27 | 2012-10-10 | 阿里巴巴集团控股有限公司 | 识别同义词的方法、装置及利用其进行搜索的方法和装置 |
CN103546287A (zh) * | 2012-07-17 | 2014-01-29 | 联想(北京)有限公司 | 密码验证方法和电子设备 |
CN102768754B (zh) * | 2012-08-03 | 2014-07-09 | 网易(杭州)网络有限公司 | 一种图片验证码的实现方法和装置 |
WO2014107618A1 (en) * | 2013-01-04 | 2014-07-10 | Gary Stephen Shuster | Cognitive-based captcha system |
CN104243399B (zh) * | 2013-06-07 | 2019-02-12 | 腾讯科技(深圳)有限公司 | 用户验证方法以及实现该方法的客户端、服务器及系统 |
CN104346557A (zh) * | 2013-08-06 | 2015-02-11 | 深圳市腾讯计算机系统有限公司 | 验证码的生成方法及装置、验证码的显示控制方法及装置 |
-
2015
- 2015-04-16 CN CN201510180721.XA patent/CN106156597A/zh active Pending
-
2016
- 2016-03-30 WO PCT/CN2016/077777 patent/WO2016165557A1/zh active Application Filing
-
2017
- 2017-06-28 US US15/636,453 patent/US10769253B2/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102904722A (zh) * | 2012-09-21 | 2013-01-30 | 张仁平 | 一种用语义和图像元素接合的网络验证方法及系统 |
CN104144052A (zh) * | 2013-05-10 | 2014-11-12 | 孙鑫 | 一种文字中间的关键词与图片或视频对应的验证方法 |
CN104283682A (zh) * | 2013-07-08 | 2015-01-14 | 深圳市腾讯计算机系统有限公司 | 一种利用验证码进行校验的方法、装置及系统 |
CN104038502A (zh) * | 2014-06-24 | 2014-09-10 | 五八同城信息技术有限公司 | 一种验证方法及系统 |
Also Published As
Publication number | Publication date |
---|---|
US20170300676A1 (en) | 2017-10-19 |
CN106156597A (zh) | 2016-11-23 |
US10769253B2 (en) | 2020-09-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2016165557A1 (zh) | 验证码的实现方法及装置 | |
US11449857B2 (en) | Code scanning method, code scanning device and mobile terminal | |
US10313882B2 (en) | Dynamic unlock mechanisms for mobile devices | |
US8370143B1 (en) | Selectively processing user input | |
WO2019205065A1 (zh) | 快速打开应用或应用功能的方法及终端 | |
US9946867B1 (en) | Input mirroring | |
CN104852885B (zh) | 一种进行验证码验证的方法、装置和系统 | |
WO2015055095A1 (en) | Identity authentication method and device and storage medium | |
WO2018107580A1 (zh) | 一种信息提示的方法及装置 | |
WO2014108005A1 (en) | Co-verification method, two-dimensional code generation method, and device and system therefor | |
CN104184587A (zh) | 声纹生成方法、服务器、客户端及系统 | |
KR102526620B1 (ko) | 자동채움 필드 분류를 위한 시스템 및 방법 | |
US11017066B2 (en) | Method for associating application program with biometric feature, apparatus, and mobile terminal | |
US10440007B1 (en) | Symbolic feedback for user input | |
US20230153520A1 (en) | Message Display Method and Electronic Device | |
CN104573437B (zh) | 信息认证方法、装置和终端 | |
CN113190646B (zh) | 一种用户名样本的标注方法、装置、电子设备及存储介质 | |
CN109951889B (zh) | 一种物联网配网方法及移动终端 | |
CN109522706B (zh) | 一种信息提示方法及终端设备 | |
WO2018140172A1 (en) | Determining computer ownership | |
WO2021083086A1 (zh) | 信息处理方法及设备 | |
Mohamed et al. | On the security and usability of dynamic cognitive game CAPTCHAs | |
US20190286815A1 (en) | Computer system, iot device monitoring method, and program | |
CN109547622B (zh) | 一种验证方法及终端设备 | |
CN108494754B (zh) | 一种账户信息处理方法及移动终端 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 16779532 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 10.04.2018) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 16779532 Country of ref document: EP Kind code of ref document: A1 |