CN116738393A - Verification code data processing method and device, electronic equipment and storage medium - Google Patents

Verification code data processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116738393A
CN116738393A CN202310744605.0A CN202310744605A CN116738393A CN 116738393 A CN116738393 A CN 116738393A CN 202310744605 A CN202310744605 A CN 202310744605A CN 116738393 A CN116738393 A CN 116738393A
Authority
CN
China
Prior art keywords
verification
point
verification code
data
generating
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.)
Pending
Application number
CN202310744605.0A
Other languages
Chinese (zh)
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202310744605.0A priority Critical patent/CN116738393A/en
Publication of CN116738393A publication Critical patent/CN116738393A/en
Pending legal-status Critical Current

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
    • 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
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The disclosure provides a method, a device, an electronic device and a medium for processing verification code data, which can be used in the technical field of big data or the financial field, and the method comprises the following steps: sending a verification code request and a unique identifier aiming at a target user to a target server through a client; generating binary verification code data by a target server in response to a verification code request, wherein the verification code data comprises a verification track, and the verification track comprises a starting point, an ending point and a plurality of folding points; generating a display picture and a verification prompt by the client according to the received verification code data, wherein the verification prompt is generated according to the break point ordering and the associated color of each break point; responding to the content input by the target user according to the display picture and the verification prompt through the client, and generating sampling data associated with the unique identifier; determining verification duration and verification speed in a corresponding range of each break point through a cache database according to the received sampling data, and generating a verification result; and the client receives and displays the verification result.

Description

Verification code data processing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of big data technology, and more particularly, to an authentication code data processing method, apparatus, electronic device, computer readable storage medium, and computer program product.
Background
The CAPTCHA (CAPTCHA, completely Automated Public Turing test totell Computers and Humans Apart) is fully known as a full-automatic, computer-to-human, turing test, originating from Altavista in 1997, with the aim of preventing automatic submission of URLs, in the basic form of: each time information is submitted to a web page, the system automatically randomly generates a series of numbers or symbols (i.e., verification codes) that can only be successfully submitted if correctly entered at the designated location. The verification code technology can judge whether the end user is a person or a machine, and whether the network request is initiated by a real user.
The existing verification code has a certain problem, for example, a cracker can firstly grasp a picture corresponding to the verification code on a webpage, then realize automatic positioning of a slide block after preprocessing data such as binarization, gray level, filtering and interference removal, then divide a track between two points into a plurality of sections, slide the slide block at different intervals at different speeds, and thus, the artificial behavior is automatically simulated, and the verification code is cracked.
Disclosure of Invention
In view of the above, the present disclosure provides a method, an apparatus, an electronic device, a readable storage medium and a computer program product for processing verification code data, which can effectively avoid cracking of the verification code and improve the security of the verification code.
One aspect of the present disclosure provides a method for processing verification code data, applied to a client, the method comprising: transmitting a verification code request and a unique identifier aiming at a target user to a target server, wherein the unique identifier is generated according to user information of the target user; receiving binary verification code data, wherein the binary verification code data is generated by a target server according to a randomly acquired background picture in response to a verification code request, the verification code data comprises a verification track, the verification track comprises a starting point, an ending point and a plurality of folding points, and each folding point has folding point sequencing and associated colors; generating a display picture and a verification prompt according to the received verification code data, wherein the verification prompt is generated according to the break point ordering and the associated color of each break point; responding to the content input by the target user according to the display picture and the verification prompt, and generating sampling data associated with the unique identifier; and receiving and displaying a verification result, wherein the verification result is generated by a cache database according to the received sampling data, and determining the verification duration and the verification speed in the corresponding range of each folding point.
In some embodiments of the present disclosure, the binary captcha data is generated by binarizing a captcha picture in response to the captcha request, the captcha picture being generated from a randomly acquired background picture.
In some embodiments of the present disclosure, the verification code picture is generated from a background picture, a start point and an end point of a verification track, and a plurality of break points, and an associated color of each break point, the background picture is randomly acquired from a preset picture database, the start point and the end point of the verification track are randomly generated according to a size of the background picture, the plurality of break points are randomly generated according to the start point and the end point of the verification track, and the associated color of each break point is determined according to a break point ordering of each break point.
In some embodiments of the disclosure, the verification results include a first verification result and a second verification result, the first verification result being generated by determining a verification duration within a range corresponding to each break point from the sampling data; the second verification result is generated by determining the verification speed in the corresponding range of each folding point according to the sampling data.
In some embodiments of the present disclosure, the generating of the first verification result includes: determining the sampling distance between the sampling point and the folding point according to the coordinate data corresponding to the sampling point in the sampling data; determining a sampling point with the smallest sampling distance with the break point as a target sampling point in a range corresponding to the break point; determining the time length from the starting point to the target sampling point as verification time length in the range corresponding to the folding point; and generating a first verification result according to the relation between the verification duration and the break point ordering in the corresponding range of each break point.
In some embodiments of the present disclosure, the generating of the second verification result includes: determining the verification speed of a target sampling point in the range corresponding to the break point according to the received sampling data; determining an average speed of the verification track of a period preceding the break point; and generating a second verification result according to the relation between the verification speed and the average speed of each folding point.
In some embodiments of the disclosure, the method further comprises: and after responding to the content input by the target user according to the display picture and the verification prompt, generating sampling data associated with the unique identifier, and then sending the sampling data associated with the unique identifier to a cache database.
One aspect of the present disclosure provides a method for processing verification code data, applied to a data processing system, where the data processing system includes a client, a target server, and a cache database, the method includes, but is not limited to: sending a verification code request and a unique identifier aiming at a target user to a target server through a client, wherein the unique identifier is generated according to user information of the target user; generating binary verification code data according to the randomly acquired background picture by the target server in response to the verification code request, wherein the verification code data comprises a verification track, the verification track comprises a starting point, an ending point and a plurality of folding points, and each folding point has folding point ordering and associated colors; generating a display picture and a verification prompt by the client according to the received verification code data, wherein the verification prompt is generated according to the break point ordering and the associated color of each break point; generating sampling data associated with the unique identifier by a client in response to the content input by a target user according to the display picture and the verification prompt; determining verification duration and verification speed in a corresponding range of each break point through a cache database according to the received sampling data, and generating a verification result; and receiving and displaying the verification result through the client.
In some exemplary embodiments of the present disclosure, generating, by the target server in response to the verification code request, binary verification code data from a randomly acquired background picture includes: responding to the verification code request through a target server, and generating a verification code picture according to the randomly acquired background picture; and performing binary processing on the verification code picture to generate binary verification code data.
In some exemplary embodiments of the present disclosure, generating, by the target server in response to the verification code request, a verification code picture from a randomly acquired background picture includes: the target server responds to the verification code request, and a background picture is randomly obtained from a preset picture database; randomly generating a starting point and an end point of a verification track according to the size of the background picture; randomly generating a plurality of folding points according to the starting point and the ending point; determining the associated color of each folding point according to the sorting of the folding points of each folding point; and generating a verification code picture according to the background picture, the starting point, the end point, the plurality of break points and the associated color of each break point.
In some exemplary embodiments of the present disclosure, generating, by the client, a display picture and a verification hint from the received verification code data includes: decoding the received verification code data through a client to generate the display picture, wherein the display picture comprises a starting point, an ending point and a plurality of folding points of the verification track, and each folding point displays an associated color; and generating the verification prompt according to the verification track, the break point sequence of each break point and the associated color of each break point.
In some exemplary embodiments of the present disclosure, determining, by a cache database, a verification duration and a verification speed within a range corresponding to each break point according to received sampling data, generating a verification result includes: receiving sampling data through a cache database; determining verification duration in a corresponding range of each folding point, and generating a first verification result; determining verification speed in a corresponding range of each folding point, and generating a second verification result; and generating the verification result according to the first verification result and the second verification result.
In some exemplary embodiments of the present disclosure, determining a verification duration within a range corresponding to each break point, generating a first verification result includes: determining the sampling distance between the sampling point and the folding point according to the coordinate data corresponding to the sampling point in the sampling data; determining a sampling point with the smallest sampling distance with the break point as a target sampling point in a range corresponding to the break point; determining the time length from the starting point to the target sampling point as verification time length in the range corresponding to the folding point; and generating a first verification result according to the relation between the verification duration and the break point ordering in the corresponding range of each break point.
In some exemplary embodiments of the present disclosure, determining a verification speed within a range corresponding to each break point, generating a second verification result includes: determining the verification speed of a target sampling point in the range corresponding to the break point according to the received sampling data; determining an average speed of the verification track of a period preceding the break point; and generating a second verification result according to the relation between the verification speed and the average speed of each folding point.
In some exemplary embodiments of the present disclosure, the method further comprises: after binary verification code data are generated according to the randomly acquired background pictures, a cache database receives and stores the unique identification and the verification code data sent by the target server; and after the client responds to the content input by the target user according to the display picture and the verification prompt, generating the sampling data associated with the unique identifier, and receiving and storing the sampling data associated with the unique identifier by a cache database.
In some exemplary embodiments of the present disclosure, the method further comprises: and deleting the verification code data and the sampling data corresponding to the unique identifier through caching an instruction of which the database responds to the verification result as not passing.
In some exemplary embodiments of the present disclosure, the method further comprises: receiving an instruction that the verification result submitted by the client is passed through a target server, and inquiring the verification code data and the sampling data in the cache database according to the unique identification; if the query result is normal, receiving service data submitted by the client based on the verification result; and if the query result is empty, refusing to receive the service data submitted by the client based on the verification result.
In another aspect of the embodiments of the present disclosure, there is provided a verification code data processing apparatus, including: the system comprises a sending module, a verification code sending module and a verification code sending module, wherein the sending module is configured to send a verification code request and a unique identifier aiming at a target user to a target server by a client, and the unique identifier is generated according to user information of the target user; the first generation module is configured to respond to the verification code request by the target server, and generate binary verification code data according to the randomly acquired background picture, wherein the verification code data comprises a verification track, the verification track comprises a starting point, an ending point and a plurality of break points, and each break point has break point ordering and associated colors; the second generation module is configured to generate a display picture and a verification prompt by the client according to the received verification code data, wherein the verification prompt is generated according to the break point sequence and the associated color of each break point; the third generation module is configured to generate sampling data associated with the unique identifier by the client in response to the content input by the target user according to the display picture and the verification prompt; the fourth generation module is configured to determine verification duration and verification speed in the corresponding range of each break point according to the received sampling data by the cache database, and generate a verification result; and a display module configured to receive and display the verification result by the client.
In some exemplary embodiments of the present disclosure, the first generation module includes a first generation subunit configured to: the target server responds to the verification code request and generates a verification code picture according to the randomly acquired background picture; and performing binary processing on the verification code picture to generate binary verification code data.
In some exemplary embodiments of the present disclosure, the first generation subunit includes a verification code picture generation module configured to: the target server responds to the verification code request and randomly acquires a background picture from a preset picture database; randomly generating a starting point and an end point of a verification track according to the size of the background picture; randomly generating a plurality of folding points according to the starting point and the ending point; determining the associated color of each folding point according to the sorting of the folding points of each folding point; and generating a verification code picture according to the background picture, the starting point, the end point, the plurality of break points and the associated color of each break point.
In some exemplary embodiments of the present disclosure, the second generating unit includes: a second generation subunit configured to: the client decodes the received verification code data to generate the display picture, wherein the display picture comprises a starting point, an ending point and a plurality of folding points of the verification track, and each folding point displays an associated color; and generating the verification prompt according to the verification track, the break point sequence of each break point and the associated color of each break point.
In some exemplary embodiments of the present disclosure, the fourth generating unit includes: a verification result generation unit configured to: receiving, by a cache database, the sampled data; determining verification duration in a corresponding range of each folding point, and generating a first verification result; determining verification speed in a corresponding range of each folding point, and generating a second verification result; and generating the verification result according to the first verification result and the second verification result.
In some exemplary embodiments of the present disclosure, the verification result generation unit includes a first verification result generation unit configured to: determining the sampling distance between the sampling point and the folding point according to the coordinate data corresponding to the sampling point in the sampling data; determining a sampling point with the smallest sampling distance with the break point as a target sampling point in a range corresponding to the break point; determining the time length from the starting point to the target sampling point as verification time length in the range corresponding to the folding point; and generating a first verification result according to the relation between the verification duration and the break point ordering in the corresponding range of each break point.
In some exemplary embodiments of the present disclosure, the verification result generation unit includes a second verification result generation unit configured to: determining the verification speed of a target sampling point in the range corresponding to the break point according to the received sampling data; determining an average speed of the verification track of a period preceding the break point; and generating a second verification result according to the relation between the verification speed and the average speed of each folding point.
In some exemplary embodiments of the present disclosure, the authentication code data processing apparatus further includes: a storage module configured to: after binary verification code data are generated according to the randomly acquired background pictures, a cache database receives and stores the unique identification and the verification code data sent by the target server; and after the client responds to the content input by the target user according to the display picture and the verification prompt, generating the sampling data associated with the unique identifier, and receiving and storing the sampling data associated with the unique identifier by a cache database.
In some exemplary embodiments of the present disclosure, the authentication code data processing apparatus further includes: a deletion module configured to: and responding an instruction that the verification result is not passed by the cache database, and deleting the verification code data and the sampling data corresponding to the unique identifier.
In some exemplary embodiments of the present disclosure, the authentication code data processing apparatus further includes: a query module configured to: receiving an instruction that the verification result submitted by the client is passed by the target server, and inquiring the verification code data and the sampling data in the cache database according to the unique identification; if the query result is normal, receiving service data submitted by the client based on the verification result; and if the query result is empty, refusing to receive the service data submitted by the client based on the verification result.
Another aspect of the disclosure provides an electronic device comprising one or more processors and a storage device for storing executable instructions that when executed by the processors implement the method as above.
Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions that, when executed, are configured to implement a method as above.
Another aspect of the present disclosure provides a computer program comprising computer executable instructions which when executed are for implementing a method as above.
According to the embodiment of the disclosure, binary verification code data are generated by randomly acquiring the background picture, interception and cracking are avoided, safety is improved, cracking of images after binarization processing can be avoided by setting a plurality of folding points included in the verification track to have folding point sequencing and associated colors, verification results are generated according to verification duration and verification speed in the corresponding range of each folding point, accuracy of the verification results can be effectively improved, and verification code cracking difficulty is improved.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be more apparent from the following description of embodiments of the disclosure with reference to the accompanying drawings, in which:
FIG. 1 schematically illustrates a schematic diagram of a system architecture to which a captcha data processing method of embodiments of the present disclosure may be applied;
FIG. 2A schematically illustrates a flow chart of a method of captcha data processing in accordance with one embodiment of the present disclosure;
FIG. 2B schematically illustrates a flow chart of a method of captcha data processing in accordance with another embodiment of the present disclosure;
FIG. 3 schematically illustrates a flowchart of a captcha data processing method in operation S220, according to an embodiment of the present disclosure;
FIG. 4A schematically illustrates a flowchart of a captcha data processing method in operation S221, according to an embodiment of the present disclosure;
FIG. 4B schematically illustrates a schematic diagram of a captcha data processing method in operation S221, according to an embodiment of the present disclosure;
FIG. 5 schematically illustrates a flowchart of a captcha data processing method in operation S230, according to an embodiment of the present disclosure;
FIG. 6 schematically illustrates a flow chart of a captcha data processing method at operation S250, according to an embodiment of the present disclosure;
FIG. 7A schematically illustrates a flow chart of a captcha data processing method in operation S252, according to an embodiment of the present disclosure;
fig. 7B schematically illustrates a flowchart of a captcha data processing method in operation S253, according to an embodiment of the present disclosure;
FIG. 8 schematically illustrates a flow chart of storing captcha data and sample data, where the captcha data processing method further includes in accordance with an embodiment of the present disclosure;
FIG. 9 schematically illustrates a flowchart of operation S270 further included in a captcha data processing method according to an embodiment of the present disclosure;
FIG. 10 schematically illustrates a flowchart of querying captcha data and sample data, where the captcha data processing method further includes in accordance with an embodiment of the present disclosure;
FIG. 11 schematically illustrates a process diagram of a captcha data processing method in accordance with one embodiment of the present disclosure;
FIG. 12 schematically illustrates a process diagram of a captcha data processing method according to another embodiment of the present disclosure;
FIG. 13A schematically illustrates a block diagram of a captcha data processing apparatus, according to one embodiment of the present disclosure;
FIG. 13B schematically illustrates a block diagram of a captcha data processing apparatus according to another embodiment of the present disclosure; and
fig. 14 schematically illustrates a block diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is only exemplary and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where a formulation similar to at least one of "A, B or C, etc." is used, in general such a formulation should be interpreted in accordance with the ordinary understanding of one skilled in the art (e.g. "a system with at least one of A, B or C" would include but not be limited to systems with a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). The terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more features.
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the related personal information of the user all conform to the regulations of related laws and regulations, necessary security measures are taken, and the public order harmony is not violated.
In the technical scheme of the disclosure, related operations such as acquisition, storage, application and the like of the personal information of the user are all authorized by the user.
In this context, the term "break point" refers to a point for changing the track route between the start point and the end point of the verification track, and a plurality of break points may be provided between the start point and the end point of the verification track, so that the verification code has different verification tracks.
In this context, the term "break ordering" refers to the order of the breaks from the start point to the end point, each break having coordinates and a break ordering such that a specific path of travel of the verification track can be determined.
In the prior art, in order to prevent automatic submission of the URL, a slider verification code is generally adopted, and verification is realized by manually dragging the verification code. For the slide block verification mode, a cracker realizes automatic positioning of the slide block by capturing a verification code picture and carrying out binarization, gray level, filtering, interference taking and other data processing on the picture, and realizes cracking of the sliding verification code by simulating manual sliding.
In order to solve the problems in the prior art, embodiments of the present disclosure provide a method, an apparatus, an electronic device, a readable storage medium, and a computer program product for processing verification code data, which can effectively avoid cracking when a verification code is gripped out, and improve security of the verification code. The verification code data processing method of the embodiment of the disclosure comprises the following steps: the client sends a verification code request and a unique identifier aiming at a target user to a target server, wherein the unique identifier is generated according to user information of the target user; the target server responds to the verification code request, binary verification code data are generated according to the randomly acquired background picture, the verification code data comprise a verification track, the verification track comprises a starting point, an end point and a plurality of break points, and each break point has break point ordering and associated colors; the client generates a display picture and a verification prompt according to the received verification code data, wherein the verification prompt is generated according to the break point ordering and the associated color of each break point; the client responds to the content input by the target user according to the display picture and the verification prompt, and generates sampling data associated with the unique identifier; the cache database determines verification duration and verification speed in a corresponding range of each break point according to the received sampling data, and generates a verification result; and the client receives and displays the verification result.
According to the embodiment of the disclosure, binary verification code data are generated by randomly acquiring the background picture, so that the problem that a target server is intercepted and cracked in the process of transmitting the picture to a client can be effectively avoided, and the binary verification code data are more difficult to crack. By setting a plurality of break points included in the verification track to have break point ordering and associated colors and generating verification prompts according to the break point ordering and associated colors, cracking of binarization processing on verification code pictures can be effectively avoided. In the verification process of receiving the input of the target user, the verification result is generated based on the verification duration and the verification speed in the corresponding range of each folding point, so that the problem of cracking caused by simulating the sliding process of the sliding block can be avoided, and the safety of the verification code is improved.
Fig. 1 schematically illustrates a schematic diagram of a system architecture to which a captcha data processing method of an embodiment of the present disclosure may be applied. It should be noted that fig. 1 is only an example of a system architecture to which embodiments of the present disclosure may be applied to assist those skilled in the art in understanding the technical content of the present disclosure, but does not mean that embodiments of the present disclosure may not be used in other devices, systems, environments, or scenarios. It should be noted that, the verification code data processing method and device provided by the embodiment of the present disclosure may be used in the big data technical field, the financial field in the relevant aspect of the big data field, and any field other than the financial field, and the application field is not limited by the verification code data processing method and device provided by the embodiment of the present disclosure.
As shown in fig. 1, an exemplary system architecture 10 to which the authentication code data processing method may be applied may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. Various communication client applications, such as mail client applications, file processing class applications, shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, etc., may be installed on the terminal devices 101, 102, 103, as just examples.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting functions of data input, file transmission, data analysis, data processing, web browsing, etc., including but not limited to smartphones, tablet computers, laptop and desktop computers, etc.
The server 105 may be a server providing various services, such as a background management server (by way of example only) providing support for a user to utilize data acquired by the terminal devices 101, 102, 103 or a browsed website. The background management server may analyze and process the received data such as the user request, and feed back the processing result (e.g., the web page, information, or data obtained or generated according to the user request) to the terminal device. The file or the like transmitted by the user may be analyzed or processed, and the terminal device may be controlled based on the processing result, for example, access to the terminal device may be restricted.
It should be noted that, the method for processing verification code data provided in the embodiments of the present disclosure may be generally performed by the server 105. Accordingly, the verification code data processing apparatus provided in the embodiments of the present disclosure may be generally disposed in the server 105. The method for processing captcha data provided by the embodiments of the present disclosure may also be performed by a server or a cluster of servers that are different from the server 105 and that are capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the verification code data processing apparatus provided by the embodiments of the present disclosure may also be provided in a server or a server cluster, which is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The verification code data processing method according to the embodiment of the present disclosure will be described in detail below with reference to fig. 2A to 7.
Fig. 2A schematically illustrates a flow chart of a method of captcha data processing in accordance with one embodiment of the present disclosure.
As shown in fig. 2A, a verification code data processing method according to an embodiment of the present disclosure is applied to a client, and a flow 100 of the method includes operations S110 to S150.
In this embodiment, the method is performed by the client, specifically, in operation S110, a verification code request for a target user and a unique identifier generated according to user information of the target user are transmitted to the target server.
In operation S120, binary verification code data is received, the binary verification code data is generated by the target server according to the randomly acquired background picture in response to the verification code request, the verification code data includes a verification track, the verification track includes a start point, an end point and a plurality of break points, and each break point has a break point ordering and an associated color.
Illustratively, the binary captcha data is generated by binarizing a captcha picture in response to the captcha request, the captcha picture being generated from a randomly acquired background picture. The verification code picture is generated by a background picture, a starting point and an end point of a verification track, a plurality of break points and associated colors of each break point, the background picture is randomly acquired from a preset picture database, the starting point and the end point of the verification track are randomly generated according to the size of the background picture, the plurality of break points are randomly generated according to the starting point and the end point of the verification track, and the associated colors of each break point are determined according to the break point sequence of each break point.
In operation S130, a display picture and a verification hint are generated according to the received verification code data, the verification hint being generated according to the break-point ordering and the associated color of each break-point.
In operation S140, sampling data associated with the unique identification is generated in response to the content input by the target user according to the display picture and the verification prompt.
In operation S150, a verification result is received and displayed, where the cache database determines, according to the received sampling data, verification duration and verification speed within a range corresponding to each break point.
Illustratively, the verification results include a first verification result and a second verification result, the first verification result being generated by determining a verification duration in a range corresponding to each break point according to the sampling data; the second verification result is generated by determining the verification speed in the corresponding range of each folding point according to the sampling data.
The first verification result generation process comprises the following steps: determining the sampling distance between the sampling point and the folding point according to the coordinate data corresponding to the sampling point in the sampling data; determining a sampling point with the smallest sampling distance with the break point as a target sampling point in a range corresponding to the break point; determining the time length from the starting point to the target sampling point as verification time length in the range corresponding to the folding point; and generating a first verification result according to the relation between the verification duration and the break point ordering in the corresponding range of each break point.
The generation process of the second verification result comprises the following steps: determining the verification speed of a target sampling point in the range corresponding to the break point according to the received sampling data; determining an average speed of the verification track of a period preceding the break point; and generating a second verification result according to the relation between the verification speed and the average speed of each folding point.
Fig. 2B schematically illustrates a flow chart of a method of captcha data processing according to another embodiment of the present disclosure.
As shown in fig. 2B, the verification code data processing method is applied to a data processing system, where the data processing system includes a client, a target server and a cache database, and a flow 200 of the verification code data processing method in the embodiment of the disclosure includes operations S210 to S260.
In operation S210, a verification code request for a target user and a unique identifier generated from user information of the target user are transmitted to a target server by a client.
By way of example, the client may be application software (e.g., browser, chat communication software, etc.) installed on a terminal device (e.g., cell phone, tablet, PC, etc.). The target server may be a back-end located service device for processing responses to data requests.
In some embodiments of the present disclosure, when a target user submits information to a server at a client, verification is first required to prevent URL auto-submission operations from occurring. The client loads the page, obtains user information of the target user, such as information including user numbers, browser information, font information, time stamps and the like, splices the user information to generate character strings, and generates unique identifications for the character strings by using an encryption algorithm. The unique identification is used for determining the association relation between the verification code request and the target user.
And the target user simultaneously sends a verification code request to the target server through the client, and the target server generates verification code data after receiving the verification code request, so that the target user can conveniently perform verification operation on the client.
In operation S220, binary verification code data is generated from the randomly acquired background picture by the target server in response to the verification code request, the verification code data including a verification track including a start point, an end point, and a plurality of break points, each break point having a break point order and an associated color.
Illustratively, the target server generates the captcha data based on the received captcha request. The verification code data is binary verification code data generated by firstly generating a verification code picture according to a verification code request and then processing the verification code picture.
The verification code picture comprises a verification track, the verification track is provided with a starting point, an ending point and a plurality of folding points between the starting point and the ending point, the folding points are used for determining the trend or the path of the verification track, the number of the folding points can be modified and set according to actual requirements, and for example, the folding points can comprise 2, 3, 4 or more. Each break point has a break point sequence and an associated color, specifically, for example, the number of break points is set to 3, for example, the first break point is a1, the second break point is a2, the third break point is a3, and the path of the verification track can be determined according to the break point sequence and the start point and the end point of the verification track, that is, the sequence of the verification track is the start point, the first break point a1, the second break point a2, the third break point a3, and the end point. When the verification is performed, the verification must be performed according to the verification track so as to pass the verification. Each break point has an associated color for generating a verification prompt according to which the target user can verify. Because the break points have associated colors, a target user can effectively identify the colors, and in the process of cracking the verification code in the prior art, the aim of realizing automatic positioning to realize verification is fulfilled after data processing such as grabbing, binarization, gray scale, filtering, interference removal and the like are mainly performed on the generated verification code picture. The method and the device set the associated color for each break point, and can not distinguish the associated color of the break point after adopting data processing such as binarization, gray scale, filtering, interference elimination and the like, so that the verification code picture of the method and the device is prevented from being broken.
By generating the binary verification code data, even if the binary verification code data are intercepted in the verification code data transmission process, the content of the verification code picture cannot be clearly known, so that the cracking difficulty is improved, and the security of the verification code data is improved.
In operation S230, a display picture and a verification hint are generated by the client according to the received verification code data, the verification hint being generated according to the break ordering and associated colors of each break.
In some exemplary embodiments of the present disclosure, the client receives the verification code data to generate a display picture, which may display, for example, a position of a start point, a position of an end point, a position of each break point, and an associated color corresponding to each break point of the verification track.
The verification prompt is generated according to the break point ordering and the associated color. For example, if the first folding point is a1, the second folding point is a2, and the associated colors corresponding to the third folding point is a3 are blue, yellow, and red, respectively, the generated indication information may be "sequentially passing the slider through blue, yellow, and red from the start point, and reaching the end point". The target user can complete verification operation according to the content displayed on the display picture and the verification prompt.
In operation S240, sampling data associated with the unique identification is generated by the client in response to the content input by the target user according to the display picture and the authentication prompt.
In some exemplary embodiments of the present disclosure, during an input of a verification operation by a target user according to a verification prompt, the content of the input of the target user is recorded, and sampling data for verifying whether the target user having a unique identification passes or not is generated.
In operation S250, the verification duration and the verification speed in the range corresponding to each break point are determined by the cache database according to the received sampling data, and a verification result is generated.
In some embodiments of the present disclosure, by determining the verification duration in the range corresponding to each setpoint, the order of the target user sequentially passing through the break points in the verification process may be determined, so as to determine whether the verification track is correct, and by determining the verification speed in the range corresponding to each break point, whether the verification is manual verification or machine verification is determined, so as to prevent the problem that the machine verification leads to the failure of the function of the verification code.
In operation S260, the verification result is received and presented through the client.
According to the embodiment of the disclosure, binary verification code data are generated by randomly acquiring the background picture, interception and cracking are avoided, safety is improved, cracking of images after binarization processing can be avoided by setting a plurality of folding points included in the verification track to have folding point sequencing and associated colors, verification results are generated according to verification duration and verification speed in the corresponding range of each folding point, accuracy of the verification results can be effectively improved, and verification code cracking difficulty is improved.
The following describes details of the verification code data processing method according to the embodiment of the present disclosure with reference to fig. 3 to 10.
Fig. 3 schematically illustrates a flowchart of a captcha data processing method in operation S220 according to an embodiment of the present disclosure.
As shown in fig. 3, operation S220 includes operations S221 to S222.
In operation S221, a verification code picture is generated from the randomly acquired background picture by the target server in response to the verification code request.
The background picture is, for example, a picture stored in a preset picture database, the size and resolution of the background picture are inconsistent, and by randomly acquiring the background picture, the parameters such as the size and the verification track of the verification code picture are generated to have randomness, so that the verification code picture can be effectively prevented from being broken, and the safety is improved.
In operation S222, the verification code picture is binary processed to generate binary verification code data.
The target server needs to send the verification code picture to the client for display after generating the verification code picture, and if the verification code picture is sent, the verification code picture is easy to intercept and machine processing is performed on intercepted content so as to achieve the purpose of cracking. Binary processing is carried out on the verification code picture to generate binary verification code data, so that the verification code picture cannot be effectively acquired, the safety of data transmission from the target server to the client is improved, and the cracking difficulty is further improved.
In some optional embodiments, encryption processing can be performed on binary verification code data, and after receiving the binary verification code data, the client performs decryption processing, so that the security of data transmission can be further improved.
Fig. 4A schematically illustrates a flowchart of a captcha data processing method according to an embodiment of the present disclosure at operation S221. Fig. 4B schematically illustrates a schematic diagram of a captcha data processing method according to an embodiment of the present disclosure in operation S221.
As shown in fig. 4A, operation S221 includes operations S2211 to S2215.
In operation S2211, a background picture is randomly acquired from a preset picture database through a target server in response to a request for a verification code.
The preset picture database can be, for example, an internet picture database, and background pictures are obtained from the internet picture database in real time, so that the updating of data can be ensured, and the risk of cracking by a cracking person aiming at a specific database can be avoided.
In operation S2212, the start point and the end point of the verification track are randomly generated according to the size of the background picture.
Illustratively, when the sizes of the background pictures are different, the distances between the start point and the end point are also different, and after the sizes of the background pictures are acquired, the position coordinates (x 0, y 0) of the start point and the position coordinates (x 4, y 4) of the end point of the verification track are randomly generated according to the two-dimensional abscissa of the background pictures.
In operation S2213, a plurality of folding points are randomly generated according to the start point and the end point.
For example, the number of generated break points may be determined according to the size of the background picture, more break points may be generated when the size of the background picture is larger, and fewer break points may be generated when the size of the background picture is smaller. For example, the number of generated break points is determined to be 3. Coordinates of 3 folding points are generated between the coordinate positions (x 0, y 0) corresponding to the starting point and the coordinate positions (x 4, y 4) corresponding to the ending point respectively, namely, the first folding point a1 is (x 1, y 1), the second folding point a2 is (x 2, y 2), and the third folding point a3 is (x 3, y 3). Each break point has an associated color that,
in operation S2214, an associated color of each break point is determined according to the break point ranking of each break point.
For example, the first folding point is a1, the second folding point is a2, and the third folding point is a3, and the associated colors corresponding to the first folding point are blue B, yellow Y, and red R, respectively. By determining the associated color of each set point, verification prompts are conveniently generated, and a target user can perform correct verification operation according to the verification prompts.
In operation S2215, a verification code picture is generated according to the background picture, the start point, the end point, the plurality of break points, and the associated color of each break point.
Illustratively, a verification track with a starting point, an ending point, a plurality of break points and associated colors of each break point on the verification code picture is generated, and a broken line as shown in fig. 4B is not shown in the verification code picture, wherein the verification track can be obtained by a target user according to the input of a verification prompt operation slider.
Fig. 5 schematically illustrates a flowchart of a captcha data processing method in operation S230 according to an embodiment of the present disclosure.
As shown in fig. 5, operation S230 includes operations S231 to S232.
In operation S231, decoding the received verification code data by the client generates a display picture, the display picture including a start point, an end point, and a plurality of break points of the verification track, each break point displaying an associated color.
The client decodes the received verification code data to obtain a display picture, the display picture is displayed to the user at the client, and the content displayed by the display picture can be consistent with the content of the verification code picture generated by the target server. In addition, when the client generates the display picture, the slider is displayed at the starting point position of the verification track, the slider can be overlapped with the starting point position, for example, and the target user can slide aiming at the slider so as to draw the moving track of the slider.
In operation S232, a verification hint is generated according to the verification track, the break ordering for each break, and the associated color for each break.
Illustratively, the sorting of the folding points is sequentially a first folding point a1, a second folding point a2 and a third folding point a3, the associated color of the first folding point a1 is blue B, the associated color of the second folding point a2 is yellow Y, and the associated color of the third folding point a3 is red R, so that the generated verification prompt may be "please swipe through the three folding points of blue, yellow and red in turn and finally reach the end point", and the verification prompt may be displayed on the peripheral side, such as the lower side, of the display picture.
Fig. 6 schematically illustrates a flowchart of a captcha data processing method in operation S250 according to an embodiment of the present disclosure.
As shown in fig. 6, operation S250 includes operations S251 to S254.
In operation S251, sampling data is received through a cache database.
In operation S252, a verification duration in a range corresponding to each break point is determined, and a first verification result is generated.
In operation S253, a verification speed in a range corresponding to each folding point is determined, and a second verification result is generated.
In operation S254, a verification result is generated according to the first verification result and the second verification result.
Fig. 7A schematically illustrates a flowchart of a captcha data processing method in operation S252, according to an embodiment of the present disclosure. Fig. 7B schematically shows a flowchart of a captcha data processing method in operation S253 according to an embodiment of the present disclosure.
As described in detail below in conjunction with fig. 7A and 7B, as shown in fig. 7A, operation S252 includes operations S2521 to S2524.
In operation S2521, a sampling distance between the sampling point and the break point is determined according to coordinate data corresponding to the sampling point in the sampling data.
In the process that the target user operates the sliding block to move according to the verification prompt, the moving data of the sliding block can be sampled according to the set sampling speed. For example, the position information of the slider is acquired every 5 ms.
The coordinate data corresponding to each sampling point is (x) n ,y n ) Calculating the sampling distance between the sampling point and the folding point: m= (x n -x 1 ) 2 +(y n -y 1 ) 2
In operation S2522, a sampling point having the smallest sampling distance from the break point is determined as a target sampling point within the range corresponding to the break point.
In this embodiment, since the sampling interval is fixed, the sampling point does not completely coincide with the break point during the sampling process, and the sampling point with the smallest sampling distance from the break point is determined as the target sampling point, at this time, it can be approximately considered that the slider passes through the position corresponding to the break point when the target sampling point.
In operation S2523, a length of time from the start point to the target sampling point is determined as a verification length of time within the range corresponding to the break point.
Illustratively, for example, the start point time is 0, and the time from the start point position to the target sampling point corresponding to the break point is t. For example, the number of the folding points is 3, the verification duration corresponding to the first folding point a1 is t1, the verification duration corresponding to the second folding point a2 is t2, and the verification duration corresponding to the third folding point a3 is t3, namely, the time required for the sliding block to slide from the starting point to each folding point.
In operation S2524, a first verification result is generated according to the relationship between the verification duration and the break ordering in the range corresponding to each break.
For example, the first, second and third folding points a1, a2 and a3 are respectively ranked as 1 < 2 < 3, and the verification time period t1 < t2 < t3 corresponding to the first, second and third folding points a1, a2 and a3. That is, the slider passes through the first folding point a1, the second folding point a2 and the third folding point a3 in sequence when sliding.
In some alternative embodiments of the present disclosure, the verification time process may present a problem, as the time or speed of different personnel manipulation varies as the target user manipulates the slider movement according to the verification prompts. For the verification duration of the last folding point, a limit value can be set, and when the verification duration of the last folding point exceeds the threshold value, a first verification result which is not passed by verification can be directly returned, so that the safety in the verification process is ensured.
If the verification duration in the corresponding range of each break point is consistent with the relation of the break point ordering, generating a first verification result as verification passing.
If the verification duration in the corresponding range of each break point is inconsistent with the relation of the break point ordering, generating a first verification result as that verification is not passed.
After the first verification result is passed, operation S253 is performed. Otherwise, returning the result of verification failure.
As shown in fig. 7B, operation S253 includes operations S2531 to S2533.
In operation S2531, a verification speed of a target sampling point within a range corresponding to the break point is determined from the received sampling data.
For example, after the target sampling point is determined, the speed of the slider sliding to the target sampling point is determined as a verification speed, which can identify the speed of the slider sliding to the vicinity of the break point. In an alternative embodiment, the average speed of three sampling points including the target sampling point and the sampling points on two adjacent sides can be determined, and the speed of the sliding block in the vicinity of the folding point can be reflected more accurately.
In operation S2532, an average speed of the verification track of the previous period of the break point is determined.
For example, the average speed of the verification track of the previous period of the folding point may refer to the average speed of the starting point to the first folding point, the average speed of the first folding point to the second folding point, the average speed … … of the second folding point to the third folding point, and the average speed of the folding point adjacent to the ending point.
In operation S2533, a second verification result is generated according to the relationship between the verification speed and the average speed of each break point.
In some embodiments of the present disclosure, since the location of the break point is the location at which the verification track turns, the speed of the slider at the break point is less than the average speed of the verification track for the break point migration period during the process of performing the manual verification. By comparing the average speed of each section in the verification track with the verification speed of the folding point, accurate verification is realized, and a cracking person is effectively prevented from cracking in a sliding mode of the sliding block.
In some embodiments of the present disclosure, when the first validation result is pass and the second validation result is also pass, then a validation result is generated from the first validation result and the second validation result, the validation result being pass. When at least one of the first verification result and the second verification result is failed, the verification result is failed.
In some alternative embodiments, when the first verification result is failed, the step of operation S253 described above may not be performed, and the verification result may be directly generated as failed, thereby improving efficiency.
Fig. 8 schematically illustrates a flowchart of storing captcha data and sample data, which is further included in a captcha data processing method according to an embodiment of the present disclosure.
As shown in fig. 8, the flow 300 includes operations S3 to S320.
In operation S310, after binary verification code data is generated from the randomly acquired background picture, the cache database receives and stores the unique identification and verification code data transmitted by the target server.
In operation S320, after the client generates sample data associated with the unique identifier in response to the content input by the target user according to the display picture and the authentication prompt, the cache database receives and stores the sample data associated with the unique identifier.
In the embodiment of the present disclosure, by performing operation S310 and operation S320, the unique identifier, the verification code data and the sampling data are sent to the cache database, so that after verification is passed, whether the service data submitted by the client is normal or not is determined by querying whether the related data exist or not. For example, when the client intercepts the verification result returned by the target server and submits a false verification result, the target server cannot perform effective judgment, and the authenticity of the verification result can be effectively judged by querying the data cached by the cached data.
Fig. 9 schematically illustrates a flowchart of operation S270 further included in the captcha data processing method according to an embodiment of the present disclosure.
As shown in fig. 9, the verification code data processing method further includes an operation 270: and deleting the verification code data and the sampling data corresponding to the unique identifier through caching the instruction of which the database responds to the verification result as failed.
In the embodiment of the disclosure, when the verification result is failed, the sampling data stored in the cache database is deleted, so that the client is prevented from realizing the purpose of cracking by submitting false verification results when the verification result is failed. In the embodiment of the disclosure, when the target server receives the instruction that the verification result submitted by the client is passed, the verification code data and the sampling data in the cache database are queried according to the unique identifier, so that the accuracy of the verification result is ensured, and if the verification result is forged, the verification result can be timely stopped, and the safety is improved.
Fig. 10 schematically illustrates a flowchart of querying verification code data and sample data, which is further included in the verification code data processing method according to an embodiment of the present disclosure.
As shown in fig. 10, the flow 400 further includes operation S410, operation S411, and operation S412.
In operation S4, an instruction that the verification result submitted by the client is passed is received by the target server, and verification code data and sampling data in the cache database are queried according to the unique identifier.
In operation S411, if the query result is normal, the service data submitted by the client based on the verification result is received.
In operation S412, if the query result is null, the receiving client is refused to submit the service data based on the verification result.
According to the embodiment of the disclosure, the verification code data and the sampling data in the cache database are queried, so that the accuracy of the verification result is judged, the verification result submitted by the client is prevented from being forged, and the security of the verification code data is improved.
Fig. 11 schematically illustrates a process diagram of a captcha data processing method according to one embodiment of the present disclosure. Fig. 12 schematically illustrates a process diagram of a captcha data processing method according to another embodiment of the present disclosure.
As shown in FIG. 11, a specific embodiment is illustrated, specifically illustrating the slider verification code generation and verification code data verification process.
The following describes the procedure of the verification code data processing method with reference to fig. 11:
and step 1, loading a page by a browser of a client, splicing a character string according to client information (client number, browser name, font information, timestamp and other information), generating a UUID (universal unique identifier) by using an SHA1 hash algorithm, and sending the UUID and a request for acquiring the verification code to a back-end server.
Step 2: after receiving a request for generating the verification code, the back-end server randomly generates a starting position coordinate (x 0, y 0) and an ending position coordinate (x 4, y 4) of the sliding block according to the two-dimensional horizontal and vertical coordinates of the background picture, and randomly generates 3 coordinates between x0 and x4 positions of the x-axis coordinates; three folding points (x 1, y 1), (x 2, y 2), (x 3, y 3) are randomly generated between the y-axis coordinates y0 to y 4. The three folding points correspond to the three colors of red, yellow and blue respectively, and finally the verification code is generated.
Step 3: and storing UUID, verification codes and other contents into a distributed cache database.
Step 4: and sending the verification code to the client in a binary stream format.
Step 5: and the client converts the verification code in the binary stream format into a picture and displays the picture to the user.
Step 6: and the user performs verification input according to the verification code picture displayed by the client and the verification prompt sliding block.
Step 7: and the browser of the client uses the ajax interface to asynchronously send the UUID and the sampling point coordinate information of the slide block position acquired every 5ms to the back-end server.
Step 8: and the back-end server sends the UUID and the coordinates of the sampling points to the distributed cache database.
Step 9: and (3) checking the check code of the distributed cache database, if the result is true, checking the record of the database, and if the result is false, clearing the data corresponding to the stored UUID by the database.
Step 10: the database returns the verification result to the back-end server.
Fig. 12 illustrates another embodiment, specifically illustrating the process of verifying the identity of a target user and submitting data from a client for subsequent services.
Step 11: and the back-end server returns the verification result to the browser of the client.
Step 12: and the browser of the client determines whether to submit the service data according to the verification result. If the verification result is true, step 13 is executed, and if the verification result is false, the verification fails, and the service data is not allowed to be submitted.
Step 13: allowing the user to submit service data and attaching UUID information.
And 14, checking UUID by the distributed cache database, inquiring verification code data and sampling data in the cache database, if the result of checking the UUID is false, checking the UUID to be not passed, terminating the service, and if the result of checking the UUID is true, executing step 15.
In step 15, the back-end server performs subsequent service processing, for example, receives and processes the service data submitted by the client.
According to the embodiment of the disclosure, binary verification code data are generated by randomly acquiring the background picture, interception and cracking are avoided, safety is improved, cracking of images after binarization processing can be avoided by setting a plurality of folding points included in the verification track to have folding point sequencing and associated colors, verification results are generated according to verification duration and verification speed in the corresponding range of each folding point, accuracy of the verification results can be effectively improved, and verification code cracking difficulty is improved.
Fig. 13A schematically illustrates a block diagram of a captcha data processing apparatus according to one embodiment of the present disclosure.
Another aspect of the present disclosure provides an authentication code data processing apparatus 500 located in a client.
As shown in fig. 13A, the verification code data processing apparatus 500 includes a first module 501, a second module 502, a third module 503, a fourth module 504, and a fifth module 505.
A first module 501 configured to send a request for a verification code for a target user and a unique identifier to a target server, the unique identifier being generated from user information of the target user; in an embodiment, the first module 501 may be configured to perform the operation S110 described above, which is not described herein.
A second module 502 configured to receive binary verification code data, where the binary verification code data is generated by a target server according to a randomly acquired background picture in response to the verification code request, and the verification code data includes a verification track, where the verification track includes a start point, an end point, and a plurality of break points, and each break point has a break point ordering and an associated color; in an embodiment, the second module 502 may be used to perform the operation S120 described above, which is not described herein.
A third module 503 configured to generate a display picture and a verification hint according to the received verification code data, wherein the verification hint is generated according to the break point sequence and the associated color of each break point; in an embodiment, the third module 503 may be configured to perform the operation S130 described above, which is not described herein.
A fourth module 504 configured to generate sample data associated with the unique identifier in response to content entered by a target user from the display picture and the verification prompt; in an embodiment, the fourth module 504 may be configured to perform the operation S140 described above, which is not described herein.
And a fifth module 505, configured to receive and display a verification result, where the verification result is generated by the cache database according to the received sampling data, and determining a verification duration and a verification speed within a range corresponding to each break point. In an embodiment, the fifth module 505 may be configured to perform the operation S150 described above, which is not described herein.
Fig. 13B schematically illustrates a block diagram of a captcha data processing apparatus according to another embodiment of the present disclosure.
Another aspect of the present disclosure provides a captcha data processing apparatus 510.
As shown in fig. 13B, the verification code data processing apparatus 510 includes a transmitting module 511, a first generating module 512, a second generating module 513, a third generating module 514, a fourth generating module 515, and a presentation module 516.
The sending module 511 is configured to send a request for a verification code for the target user and a unique identification generated from user information of the target user to the target server by the client. In an embodiment, the sending module 511 may be configured to perform the operation S210 described above, which is not described herein.
The first generation module 512 is configured to generate binary verification code data from the randomly acquired background picture by responding to a verification code request by the target server, the verification code data including a verification track including a start point, an end point, and a plurality of break points, each break point having a break point ordering and an associated color. In an embodiment, the first generating module 512 may be used to perform the operation S220 described above, which is not described herein.
The second generation module 513 is configured to generate, by the client, a display picture and a verification hint based on the received verification code data, the verification hint being generated based on the break ordering and the associated color of each break. In an embodiment, the second generating module 513 may be configured to perform the operation S230 described above, which is not described herein.
The third generation module 514 is configured to generate, by the client, sample data associated with the unique identifier in response to the target user's input from the display picture and the verification prompt. In an embodiment, the third generating module 514 may be configured to perform the operation S240 described above, which is not described herein.
The fourth generation module 515 is configured to determine, through the cache database, a verification duration and a verification speed within a range corresponding to each break point according to the received sampling data, and generate a verification result. In an embodiment, the fourth generating module 515 may be configured to perform the operation S250 described above, which is not described herein.
The presentation module 516 is configured to receive and present the verification result via the client. In an embodiment, the display module 516 may be configured to perform the operation S260 described above, which is not described herein.
In some exemplary embodiments of the present disclosure, the first generation module includes a first generation subunit configured to: the target server responds to the verification code request and generates a verification code picture according to the randomly acquired background picture; and performing binary processing on the verification code picture to generate binary verification code data.
In some exemplary embodiments of the present disclosure, the first generation subunit includes a verification code picture generation module configured to: the target server responds to the verification code request and randomly acquires a background picture from a preset picture database; randomly generating a starting point and an end point of a verification track according to the size of the background picture; randomly generating a plurality of folding points according to the starting point and the ending point; determining the associated color of each folding point according to the sorting of the folding points of each folding point; and generating a verification code picture according to the background picture, the starting point, the end point, the plurality of break points and the associated color of each break point.
In some exemplary embodiments of the present disclosure, the second generating unit includes: a second generation subunit configured to: the client decodes the received verification code data to generate the display picture, wherein the display picture comprises a starting point, an ending point and a plurality of folding points of the verification track, and each folding point displays an associated color; and generating the verification prompt according to the verification track, the break point sequence of each break point and the associated color of each break point.
In some exemplary embodiments of the present disclosure, the fourth generating unit includes: a verification result generation unit configured to: receiving, by a cache database, the sampled data; determining verification duration in a corresponding range of each folding point, and generating a first verification result; determining verification speed in a corresponding range of each folding point, and generating a second verification result; and generating the verification result according to the first verification result and the second verification result.
In some exemplary embodiments of the present disclosure, the verification result generation unit includes a first verification result generation unit configured to: determining the sampling distance between the sampling point and the folding point according to the coordinate data corresponding to the sampling point in the sampling data; determining a sampling point with the smallest sampling distance with the break point as a target sampling point in a range corresponding to the break point; determining the time length from the starting point to the target sampling point as verification time length in the range corresponding to the folding point; and generating a first verification result according to the relation between the verification duration and the break point ordering in the corresponding range of each break point.
In some exemplary embodiments of the present disclosure, the verification result generation unit includes a second verification result generation unit configured to: determining the verification speed of a target sampling point in the range corresponding to the break point according to the received sampling data; determining an average speed of the verification track of a period preceding the break point; and generating a second verification result according to the relation between the verification speed and the average speed of each folding point.
In some exemplary embodiments of the present disclosure, the authentication code data processing apparatus further includes: a storage module configured to: after binary verification code data are generated according to the randomly acquired background pictures, a cache database receives and stores the unique identification and the verification code data sent by the target server; and after the client responds to the content input by the target user according to the display picture and the verification prompt, generating the sampling data associated with the unique identifier, and receiving and storing the sampling data associated with the unique identifier by a cache database.
In some exemplary embodiments of the present disclosure, the authentication code data processing apparatus further includes: a deletion module configured to: and responding an instruction that the verification result is not passed by the cache database, and deleting the verification code data and the sampling data corresponding to the unique identifier.
In some exemplary embodiments of the present disclosure, the authentication code data processing apparatus further includes: a query module configured to: receiving an instruction that the verification result submitted by the client is passed by the target server, and inquiring the verification code data and the sampling data in the cache database according to the unique identification; if the query result is normal, receiving service data submitted by the client based on the verification result; and if the query result is empty, refusing to receive the service data submitted by the client based on the verification result.
According to an embodiment of the present disclosure, any of the transmission module 511, the first generation module 512, the second generation module 513, the third generation module 514, the fourth generation module 515, and the presentation module 516 may be combined in one module to be implemented, or any of the modules may be split into a plurality of modules. Alternatively, at least some of the functionality of one or more of the modules may be combined with at least some of the functionality of other modules and implemented in one module. According to embodiments of the present disclosure, at least one of the sending module 511, the first generating module 512, the second generating module 513, the third generating module 514, the fourth generating module 515, the presentation module 516 may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or in hardware or firmware such as any other reasonable way of integrating or packaging a circuit, or in any one of or a suitable combination of three of software, hardware and firmware. Alternatively, at least one of the sending module 511, the first generating module 512, the second generating module 513, the third generating module 514, the fourth generating module 515, the presentation module 516 may be at least partially implemented as a computer program module, which when executed may perform the respective functions.
Fig. 14 schematically illustrates a block diagram of an electronic device according to an embodiment of the disclosure. The electronic device shown in fig. 14 is merely an example, and should not impose any limitations on the functionality and scope of use of embodiments of the present disclosure.
As shown in fig. 14, an electronic device 600 according to an embodiment of the present disclosure includes a processor 601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. The processor 601 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or an associated chipset and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. Processor 601 may also include on-board memory for caching purposes. The processor 601 may comprise a single processing unit or a plurality of processing units for performing different actions of the method flows according to embodiments of the disclosure.
In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are stored. The processor 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. The processor 601 performs various operations of the method flow according to the embodiments of the present disclosure by executing programs in the ROM 602 and/or the RAM 603. Note that the program may be stored in one or more memories other than the ROM 602 and the RAM 603. The processor 601 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the present disclosure, the electronic device 600 may also include an input/output (I/O) interface 605, the input/output (I/O) interface 605 also being connected to the bus 604. The electronic device 600 may also include one or more of the following components connected to the I/O interface 605: an input portion 606 including a keyboard, mouse, etc.; an output portion 607 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The drive 610 is also connected to the I/O interface 605 as needed. Removable media 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed as needed on drive 610 so that a computer program read therefrom is installed as needed into storage section 608.
The present disclosure also provides a computer-readable storage medium that may be embodied in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the apparatus/device/system. The computer-readable storage medium carries one or more programs which, when executed, implement methods in accordance with embodiments of the present disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example, but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, the computer-readable storage medium may include ROM 602 and/or RAM 603 and/or one or more memories other than ROM 602 and RAM 603 described above.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowcharts. The program code, when executed in a computer system, causes the computer system to perform the methods provided by embodiments of the present disclosure.
The above-described functions defined in the system/apparatus of the embodiments of the present disclosure are performed when the computer program is executed by the processor 601. The systems, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted, distributed in the form of signals over a network medium, and downloaded and installed via the communication section 609, and/or installed from the removable medium 611. The computer program may include program code that may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program may be downloaded and installed from a network through the communication portion 609, and/or installed from the removable medium 611. The above-described functions defined in the system of the embodiments of the present disclosure are performed when the computer program is executed by the processor 601. The systems, devices, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
According to embodiments of the present disclosure, program code for performing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, such computer programs may be implemented in high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. Programming languages include, but are not limited to, such as Java, c++, python, "C" or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that the features recited in the various embodiments of the disclosure and/or in the claims may be provided in a variety of combinations and/or combinations, even if such combinations or combinations are not explicitly recited in the disclosure. In particular, the features recited in the various embodiments of the present disclosure and/or the claims may be variously combined and/or combined without departing from the spirit and teachings of the present disclosure. All such combinations and/or combinations fall within the scope of the present disclosure.
The embodiments of the present disclosure are described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the embodiments cannot be used advantageously in combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be made by those skilled in the art without departing from the scope of the disclosure, and such alternatives and modifications are intended to fall within the scope of the disclosure.

Claims (14)

1. A verification code data processing method applied to a data processing system, wherein the data processing system comprises a client, a target server and a cache database, and the method comprises the following steps:
Sending a verification code request and a unique identifier aiming at a target user to a target server through a client, wherein the unique identifier is generated according to user information of the target user;
generating binary verification code data according to the randomly acquired background picture by the target server in response to the verification code request, wherein the verification code data comprises a verification track, the verification track comprises a starting point, an ending point and a plurality of folding points, and each folding point has folding point ordering and associated colors;
generating a display picture and a verification prompt by the client according to the received verification code data, wherein the verification prompt is generated according to the break point ordering and the associated color of each break point;
generating sampling data associated with the unique identifier by a client in response to the content input by a target user according to the display picture and the verification prompt;
determining verification duration and verification speed in a corresponding range of each break point through a cache database according to the received sampling data, and generating a verification result; and
and receiving and displaying the verification result through the client.
2. The method of claim 1, wherein,
the target server responds to the verification code request, and binary verification code data is generated according to the randomly acquired background picture, and the method comprises the following steps:
Responding to the verification code request through a target server, and generating a verification code picture according to the randomly acquired background picture; and
and performing binary processing on the verification code picture to generate binary verification code data.
3. The method of claim 2, wherein,
responding to the verification code request through the target server, generating a verification code picture according to the randomly acquired background picture, wherein the verification code picture comprises the following steps:
the target server responds to the verification code request, and a background picture is randomly obtained from a preset picture database;
randomly generating a starting point and an end point of a verification track according to the size of the background picture;
randomly generating a plurality of folding points according to the starting point and the ending point;
determining the associated color of each folding point according to the sorting of the folding points of each folding point; and
and generating a verification code picture according to the background picture, the starting point, the ending point, the plurality of break points and the associated color of each break point.
4. The method of claim 1, wherein,
generating, by the client, a display picture and a verification prompt according to the received verification code data, including:
decoding the received verification code data through a client to generate the display picture, wherein the display picture comprises a starting point, an ending point and a plurality of folding points of the verification track, and each folding point displays an associated color; and
And generating the verification prompt according to the verification track, the folding point sequence of each folding point and the associated color of each folding point.
5. The method of claim 1, wherein,
determining the verification duration and the verification speed in the corresponding range of each break point through the cache database according to the received sampling data, and generating a verification result, wherein the method comprises the following steps:
receiving sampling data through a cache database;
determining verification duration in a corresponding range of each folding point, and generating a first verification result;
determining verification speed in a corresponding range of each folding point, and generating a second verification result; and
and generating the verification result according to the first verification result and the second verification result.
6. The method of claim 5, wherein,
determining verification duration in a corresponding range of each folding point, and generating a first verification result, wherein the first verification result comprises the following steps:
determining the sampling distance between the sampling point and the folding point according to the coordinate data corresponding to the sampling point in the sampling data;
determining a sampling point with the smallest sampling distance with the break point as a target sampling point in a range corresponding to the break point;
determining the time length from the starting point to the target sampling point as verification time length in the range corresponding to the folding point; and
And generating a first verification result according to the relation between the verification duration and the break point ordering in the corresponding range of each break point.
7. The method of claim 6, wherein,
determining the verification speed in the corresponding range of each folding point, and generating a second verification result, wherein the second verification result comprises the following steps:
determining the verification speed of a target sampling point in the range corresponding to the break point according to the received sampling data;
determining an average speed of the verification track of a period preceding the break point; and
and generating a second verification result according to the relation between the verification speed and the average speed of each folding point.
8. The method of claim 1, further comprising:
after binary verification code data are generated according to the randomly acquired background pictures, a cache database receives and stores the unique identification and the verification code data sent by the target server; and
after the client responds to the content input by the target user according to the display picture and the verification prompt, generating sampling data associated with the unique identifier, and receiving and storing the sampling data associated with the unique identifier by a cache database.
9. The method of claim 8, further comprising:
And deleting the verification code data and the sampling data corresponding to the unique identifier through caching an instruction of which the database responds to the verification result as not passing.
10. The method of claim 9, further comprising:
receiving an instruction that the verification result submitted by the client is passed through a target server, and inquiring the verification code data and the sampling data in the cache database according to the unique identification;
if the query result is normal, receiving service data submitted by the client based on the verification result;
and if the query result is empty, refusing to receive the service data submitted by the client based on the verification result.
11. A verification code data processing apparatus, comprising:
the system comprises a sending module, a verification code sending module and a verification code sending module, wherein the sending module is configured to send a verification code request and a unique identifier aiming at a target user to a target server through a client, and the unique identifier is generated according to user information of the target user;
the first generation module is configured to respond to the verification code request through the target server, and generate binary verification code data according to the randomly acquired background picture, wherein the verification code data comprises a verification track, the verification track comprises a starting point, an ending point and a plurality of break points, and each break point has break point ordering and associated colors;
The second generation module is configured to generate a display picture and a verification prompt by the client according to the received verification code data, wherein the verification prompt is generated according to the break point sequence and the associated color of each break point;
a third generation module configured to generate sampling data associated with the unique identifier by responding to content input by a target user according to the display picture and the verification prompt by the client;
the fourth generation module is configured to determine the verification duration and the verification speed in the corresponding range of each break point according to the received sampling data by the cache database, and generate a verification result; and
and the display module is configured to receive and display the verification result by the client.
12. One or more processors;
storage means for storing executable instructions which when executed by the processor implement the method according to any one of claims 1 to 10.
13. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, implement the method according to any of claims 1 to 10.
14. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 10.
CN202310744605.0A 2023-06-21 2023-06-21 Verification code data processing method and device, electronic equipment and storage medium Pending CN116738393A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310744605.0A CN116738393A (en) 2023-06-21 2023-06-21 Verification code data processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310744605.0A CN116738393A (en) 2023-06-21 2023-06-21 Verification code data processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116738393A true CN116738393A (en) 2023-09-12

Family

ID=87900874

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310744605.0A Pending CN116738393A (en) 2023-06-21 2023-06-21 Verification code data processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116738393A (en)

Similar Documents

Publication Publication Date Title
KR101441472B1 (en) Access monitoring method, information processing apparatus, and computer-readable medium storing access monitoring program
JP6609047B2 (en) Method and device for application information risk management
US10958683B2 (en) Method and device for classifying uniform resource locators based on content in corresponding websites
CN109376078B (en) Mobile application testing method, terminal equipment and medium
JP7025354B2 (en) Automation of image validation
CN103339635B (en) Determine the vulnerability that computer software application is attacked for privilege upgrading
US20160057157A1 (en) Verification method, apparatus, server and system
US20130185645A1 (en) Determining repeat website users via browser uniqueness tracking
JP2015511340A (en) System and method for dynamic scoring of online fraud detection
CN105989268A (en) Safety access method and system for human-computer identification
US10601840B2 (en) Security determination
US20140157382A1 (en) Observable authentication methods and apparatus
US9769159B2 (en) Cookie optimization
CN109547426B (en) Service response method and server
US11356433B2 (en) System and method for detecting unauthorized activity at an electronic device
CN110324416A (en) Download path tracking, device, server, terminal and medium
CN110764979A (en) Log identification method, system, electronic device and computer readable medium
CN113362173A (en) Anti-duplication mechanism verification method, anti-duplication mechanism verification system, electronic equipment and storage medium
CN105512208B (en) Information publishing method, device and system
CN116738393A (en) Verification code data processing method and device, electronic equipment and storage medium
CN108804713B (en) Image output method, electronic device, and computer-readable medium
WO2019062007A1 (en) Data transmission method and apparatus, terminal device, and medium
CN114925337A (en) Data labeling method and device and electronic equipment
CN114301713A (en) Risk access detection model training method, risk access detection method and risk access detection device
KR101624276B1 (en) Method and apparatus for detecting icon spoofing of mobile application

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination