Man-machine identification method based on anti-AI verification code
By generating complex verification codes of high complexity and monitoring user behavior characteristics, the traditional verification code technology solves the problem of identification when cracking AI model, effectively identifying and verifying the user's identity, reducing the malicious resource information Risk of acquisition.
Patent Information
- Application Number
- CN202411547657.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2025-02-18
AI Technical Summary
When traditional verification code technology faces cracking AI model, it is difficult to effectively identify human-computers, resulting in malicious acquisition of resource information.
The human-computer recognition method based on the adversarial AI verification code is adopted to generate complex verification codes of high complexity and monitor the user's behavioral characteristics and verification code identification information to realize the identification and verification of the user's identity.
It effectively reduces the risk of AI robots cracking verification codes, improves the protection and security of resource information, and ensures the effectiveness of human-computer identification.
Smart Images

Figure CN119475293A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information security technology, and in particular to a human-machine identification method based on countering AI verification codes. Background Art
[0002] With the development of Internet technology, user identity authentication has become a key link in ensuring the security of network services. Especially in scenarios such as e-commerce, social media, and online banking, it is particularly important to prevent automated tools from abusing services and performing malicious operations. Therefore, verification codes (CAPTCHA) are widely used as a common means of human-machine identification.
[0003] With the application of AI (Artificial Intelligence) technology in many fields, attackers have begun to use AI technology to improve the ability of automated tools to identify verification codes. The development of AI technology in image recognition and natural language processing has significantly improved the recognition rate of traditional verification codes, making the effectiveness of traditional verification code technology for human-machine recognition lower, making it difficult to meet the requirements of protecting resource information.
[0004] Therefore, a human-machine identification method based on adversarial AI verification code is proposed. Summary of the invention
[0005] In order to solve the above technical problems, the present invention provides a human-machine identification method based on countering AI verification codes, which is used to solve the problem that AI models in traditional technologies crack verification codes and maliciously obtain resource information.
[0006] An embodiment of the present invention provides a human-machine identification method based on countering AI verification code, including:
[0007] Obtain resource access requests initiated by users through user-end devices;
[0008] According to the resource access request, a verification code is generated and displayed to the user through the user terminal device;
[0009] The user enters corresponding user identification information according to the verification code displayed by the user terminal device;
[0010] According to the behavior characteristics of the user's operation based on the verification code, the user's identity is marked to obtain the user's identity identifier;
[0011] When the user terminal is identified as a normal user, determine whether the user identification information is correct, and if the user identification information is correct, return the resource information corresponding to the resource access request to the user terminal device; if the user identification information is wrong, regenerate a verification code and send it to the user terminal device;
[0012] When the user-side identity is identified as a suspected abnormal user, a highly complex complex verification code is generated based on the interference strategy and displayed to the user through the user-side device. The behavioral characteristics of the user's operations based on the complex verification code and the returned verification code identification information are monitored to identify the user-side identity. When the user-side identity is identified as a normal user, the resource information is sent to the user-side device.
[0013] Preferably, the present invention provides a human-machine identification method based on countering AI verification code, wherein the step of generating a verification code according to the resource access request and displaying it to the user through the user terminal device comprises:
[0014] Set up image verification code generator, logic verification code generator and character verification code generator;
[0015] According to the resource access request, randomly selecting any type of verification code generator to obtain a verification code; including:
[0016] The original image is obtained by an image verification code generator, and horizontal flipping and random rotation operations are performed respectively to obtain a flipped image and a rotated image, and an image fusion operation is performed to obtain a fused image, and disturbance information is added to the fused image to obtain an image verification code;
[0017] Through the logic verification code generator, digital characters and operators are randomly selected to form a mathematical expression to generate an operation verification code;
[0018] Obtain a character verification code through the character verification code generator; including:
[0019] Get the original underlying image;
[0020] Performing background extraction on the original underlying image to obtain a background feature image;
[0021] Set the number of characters of the verification code, and randomly select characters of the corresponding number to form a verification code character group, and convert it into a verification code character image;
[0022] Extracting content features of the verification code character image to obtain a content feature image;
[0023] The background feature image is merged with the content feature image to generate a verification code image, and a character verification code is extracted; optionally, including:
[0024] Initialize the verification code image through the noise image;
[0025] Construct a feature fusion network through convolutional layers, activation function layers, and pooling layers;
[0026] Inputting the initialized verification code image, the background feature image and the content feature image into the feature fusion network to construct a comprehensive loss function;
[0027] The optimizer takes the comprehensive loss function as a target, calculates the derivative of the comprehensive loss function with respect to the initialized verification code image, and updates the initialized verification code image to reduce the comprehensive loss function;
[0028] L(p b ,p c ,p f )=α b L b (p b ,p f )+α c L c (p c ,p f )
[0029] Among them, p f To initialize the verification code image, L(p b ,p c ,p f ) is the comprehensive loss function of the initialization verification code image, the background feature image, and the content feature image, L b (p b ,p f ) is the background loss function between the initial verification code image and the background feature image, L c (p c ,p f ) is the content loss function of the initialization verification code image and the content feature image, α b is the first balancing parameter of the initialization verification code image to the background feature image, α c a second balancing parameter for the initialization verification code image to the content feature image;
[0030]
[0031] in, To initialize the value at the jth position in the feature map of the i-th layer of the verification code image, is the value at the jth position in the feature map of the i-th layer of the background feature image;
[0032]
[0033] Among them, the size of the initialization verification code image feature map is M×N, Initialize the cth element of the rth row of the semi-positive definite matrix corresponding to the verification code image feature map, is the cth element in the rth row of the semi-positive definite matrix corresponding to the feature map of the background feature image;
[0034] When the comprehensive loss function meets the loss function threshold, the updated initialization verification code image is used as the character verification code;
[0035] The verification code includes an image verification code, an operation verification code and a character verification code.
[0036] Preferably, the present invention provides a human-machine identification method based on countering AI verification code, the steps of: marking the user terminal identity according to the behavioral characteristics of the user's operation based on the verification code, and obtaining the user terminal identity identifier; including:
[0037] Collecting operation time information of the user inputting user identification information based on the verification code, the user's refresh frequency of the verification code, and access time information of the user sending a resource access request;
[0038] constructing a behavior feature vector according to the operation time information, the refresh frequency, and the access time information;
[0039] Input the behavior feature vector into the classifier model for prediction, mark the user terminal identity, and obtain the user terminal identity identifier; optionally, including:
[0040] Build an initial classifier model;
[0041] Based on the sample verification code, collect machine behavior characteristics and user behavior characteristics to build a sample training set;
[0042] Training the initial classifier model using the sample training set to obtain a classifier model;
[0043] The classifier model normalizes the input behavior feature vector, obtains a standard feature vector, performs classification prediction, and obtains a user terminal identity.
[0044] Preferably, the present invention provides a method for human-machine identification based on countering AI verification code, the step of: training the initial classifier model through the sample training set to obtain the classifier model; comprising:
[0045] Get the initial classifier model;
[0046]
[0047] Among them, f(ωx+b) is the classification discriminant function, ω is the normal vector of the linear classification plane, b is the displacement term of the linear classification plane, and x is the feature vector;
[0048] Constructing constraints of the linear classification plane;
[0049]
[0050] Among them, δ is the abnormal adjustment function, which is used to adjust the model's tolerance to abnormal sample feature vectors, and θ is the slack variable, which is used to adjust the model's tolerance to abnormal values in sample feature vectors;
[0051] Obtaining sample feature vectors in the sample training set, performing training based on the initial classifier model, determining the normal vector and displacement term of the linear classification plane, and constructing an optimal linear classification plane;
[0052] A classifier model is obtained according to the optimal linear classification plane.
[0053] Preferably, the present invention provides a human-machine identification method based on countering AI verification code, the steps of: when the user terminal identity is identified as a suspected abnormal user, generating a complex verification code with high complexity based on the interference strategy, displaying it to the user through the user terminal device, monitoring the behavioral characteristics of the user's operation according to the complex verification code and the returned verification code identification information, identifying the user terminal identity, and sending the resource information to the user terminal device when the user terminal identity is identified as a normal user; including:
[0054] When the user terminal is identified as a suspected abnormal user, a complex verification code with high complexity is generated based on the interference strategy; optional, including:
[0055] Through the image verification code generator, the original image is subjected to multi-angle flipping and random rotation operations respectively to obtain a number of transformed images, which are fused to obtain a transformed fused image, and multi-dimensional disturbance information and noise points are added to the transformed fused image to generate a complex image verification code;
[0056] Through the logic verification code generator, large numbers of characters and high-order operators are randomly selected to form complex mathematical expressions and generate complex operation verification codes;
[0057] By means of a character verification code generator, the first balance parameter and the second balance parameter in the comprehensive loss function are adjusted to increase the similarity between the initialization verification code image and the background feature image, and to reduce the similarity between the initialization verification code image and the content feature image, so as to obtain a complex character verification code;
[0058] According to the user's behavior characteristics, obtaining the input time information of the user inputting the verification code identification information according to the complex verification code;
[0059] When the input time information is lower than a preset time threshold, and the verification code identification information is consistent with the standard answer information corresponding to the complex verification code, the user terminal is identified as an abnormal user, and the data connection with the user terminal device is disconnected;
[0060] When the input time information is not less than a preset time threshold, the user's behavioral characteristics are analyzed and when the verification code identification information is consistent with the standard answer information, the user terminal identity is identified as a normal user, and the resource information corresponding to the resource access request is obtained and sent to the user terminal device.
[0061] Preferably, the present invention provides a human-machine identification method based on countering AI verification code, wherein the complex verification code includes: a complex image verification code, a complex operation verification code and a complex character verification code;
[0062] The preset time threshold is set according to the artificial calculation and recognition time of the complex verification code.
[0063] Preferably, the present invention provides a human-machine identification method based on countering AI verification code, the steps of: when the user terminal identity is identified as a suspected abnormal user, generating a complex verification code with high complexity based on the interference strategy, displaying it to the user through the user terminal device, monitoring the behavioral characteristics of the user's operation according to the complex verification code and the returned verification code identification information, identifying the user terminal identity, and when the user terminal identity is identified as a normal user, sending the resource information to the user terminal device; also includes:
[0064] When the user terminal is identified as a suspected abnormal user, a highly complex verification code is generated based on the interference strategy and displayed to the user through the user terminal device;
[0065] When it is detected that the user performs a refresh operation according to the complex verification code, a second verification code with low complexity is generated and displayed to the user through the user terminal device, and identification information of the second verification code returned by the user is received;
[0066] Monitor the behavioral characteristics of the user's operations based on the second verification code, and compare the second verification code identification information with the second standard answer information corresponding to the second verification code. When the behavioral characteristics of the user's operations based on the second verification code are consistent with normal user characteristics and the second verification code identification information is consistent with the second standard answer information, the user terminal identity is identified as a normal user, and the resource information corresponding to the resource access request is obtained and sent to the user terminal device.
[0067] Preferably, the present invention provides a human-machine identification method based on countering AI verification code, the steps of: when the user terminal identity is identified as a suspected abnormal user, generating a complex verification code with high complexity based on the interference strategy, displaying it to the user through the user terminal device, monitoring the behavioral characteristics of the user's operation according to the complex verification code and the returned verification code identification information, identifying the user terminal identity, and when the user terminal identity is identified as a normal user, sending the resource information to the user terminal device; also includes:
[0068] When the user terminal is identified as a suspected abnormal user, a highly complex verification code is generated based on the interference strategy and displayed to the user through the user terminal device;
[0069] When monitoring the user's refresh operation according to the complex verification code, if it is monitored that the user's refresh operation on the verification code reaches a preset number of times within a preset time period, the user terminal identity is identified as an abnormal user and the data connection with the user terminal device is disconnected.
[0070] Compared with traditional technologies, the beneficial effects of the present invention are: a human-machine identification method based on countering AI verification codes realizes the identification of the user's identity by monitoring the user's behavioral characteristics based on verification codes and complex verification codes and the returned user identification information and verification code identification information, thereby solving the problem of traditional technologies that only rely on the verification information input by the user for human-machine identification. The complex verification code generated based on the interference strategy can effectively identify the user's identity according to the user's behavioral characteristics, reducing the risk of AI robots cracking the verification code to maliciously obtain resource information, and the generated complex verification code can effectively counter the identification of the AI model, thereby improving the security of resource information protection.
[0071] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings.
[0072] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] Figure 1 A schematic diagram of the process of a human-machine identification method based on countering AI verification code provided by the present invention. DETAILED DESCRIPTION
[0074] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0075] The embodiment of the present invention provides a human-machine identification method based on countering AI verification code, referring to Figure 1 ,include:
[0076] Obtain resource access requests initiated by users through user-end devices;
[0077] Based on the resource access request, a verification code is generated and displayed to the user through the user terminal device;
[0078] The user enters the corresponding user identification information according to the verification code displayed on the user terminal device;
[0079] According to the behavioral characteristics of the user's operation based on the verification code, the user's identity is marked and the user's identity identifier is obtained;
[0080] When the user terminal is identified as a normal user, determine whether the user identification information is correct. If the user identification information is correct, return the resource information corresponding to the resource access request to the user terminal device; if the user identification information is wrong, regenerate the verification code and send it to the user terminal device;
[0081] When the user-side identity is identified as a suspected abnormal user, a highly complex complex verification code is generated based on the interference strategy and displayed to the user through the user-side device. The behavioral characteristics of the user's operations based on the complex verification code and the returned verification code identification information are monitored to identify the user-side identity. When the user-side identity is identified as a normal user, the resource information is sent to the user-side device.
[0082] In the above embodiment, a resource access request initiated by a user through a user terminal device is obtained, and a verification code is generated according to the resource access request and displayed to the user through the user terminal device; the user enters corresponding user identification information according to the verification code displayed by the user terminal device, and the behavior characteristics of the user's operation based on the verification code are monitored, the user terminal identity is marked, and the user terminal identity identifier is obtained;
[0083] When the user terminal is identified as a normal user, determine whether the user identification information is correct. If the user identification information is correct, return the resource information corresponding to the resource access request to the user terminal device; if the user identification information is wrong, regenerate the verification code and send it to the user terminal device;
[0084] When the user-side identity is identified as a suspected abnormal user, a highly complex complex verification code is generated based on the interference strategy and displayed to the user through the user-side device. The behavioral characteristics of the user's operations based on the complex verification code and the returned verification code identification information are monitored to identify the user-side identity. When the user-side identity is identified as a normal user, the resource information is sent to the user-side device. When the user-side identity is identified as an abnormal user, the data connection with the user-side device is disconnected.
[0085] In one embodiment, the client device includes a personal computer or a smart phone.
[0086] In one embodiment, AI refers to artificial intelligence, a technology used to simulate human intelligent behavior, including machine learning, deep learning, etc., which can perform specific tasks through data analysis and pattern recognition.
[0087] In the above embodiments, when a user initiates a resource access request through a user terminal device, a verification code is displayed to the user terminal, the user's behavior based on the verification code is monitored, the user's behavior characteristics are analyzed, the user terminal identity is identified as a normal user or an abnormal user, and different identity identification steps are taken respectively.
[0088] In the above embodiments, when the user terminal is identified as a normal user, whether to send resource information to the user is determined based on whether the user identification information input by the user is correct.
[0089] In the above embodiments, when the user terminal is identified as a suspected abnormal user, a highly complex verification code is generated based on an interference strategy and displayed to the user, and the user's behavioral characteristics based on the complex verification code and the returned verification code identification information are monitored to determine the user terminal's identity.
[0090] In the above embodiment, when it is monitored that the input time information of the user based on the complex verification code is lower than the preset time threshold, and the verification code identification information is consistent with the standard answer information corresponding to the complex verification code, the user terminal identity is identified as an abnormal user.
[0091] In the above embodiments, when it is monitored that the user is performing a refresh operation based on a complex verification code, a second verification code with low complexity is generated and displayed to the user; the user's behavioral characteristics based on the second verification code are monitored, and second verification code identification information is obtained. When it is determined that the user's behavioral characteristics based on the second verification code meet the characteristics of a normal user, the second verification code identification information is compared with the second standard answer information corresponding to the second verification code. When they are consistent, the user end identity is identified as a normal user.
[0092] In the above embodiments, when it is detected that a user frequently performs refresh operations according to a complex verification code, the user terminal is identified as an abnormal user and the data connection with the user terminal device is disconnected.
[0093] The beneficial effects of the above technology are: by sending verification to the user-side device that initiates the resource access request and monitoring the user's behavioral characteristics of operations based on the verification code, the user's identity is marked, and a highly complex complex verification code is generated through an interference strategy to identify the user marked as suspected abnormal based on the behavioral characteristics and verification code identification information, thereby realizing the identification of normal users and abnormal users; compared with traditional technologies, the above method realizes the identification of the user's identity by monitoring the user's behavioral characteristics based on the verification code, the complex verification code and the returned user identification information and verification code identification information, and solves the problem of traditional technologies that only rely on the verification information input by the user for human-machine identification. The complex verification code generated based on the interference strategy can effectively identify the user's identity according to the user's behavioral characteristics, reduce the risk of AI robots cracking the verification code to maliciously obtain resource information, and the generated complex verification code can effectively resist the identification of the AI model, thereby improving the security of resource information protection.
[0094] Embodiment 2:
[0095] The embodiment of the present invention provides a human-machine identification method based on countering AI verification code, the steps of: generating a verification code according to a resource access request and displaying it to the user through a user terminal device, including:
[0096] Set up image verification code generator, logic verification code generator and character verification code generator;
[0097] According to the resource access request, randomly select any type of verification code generator to obtain the verification code; including:
[0098] Through the image verification code generator, the original image is obtained, and horizontal flipping and random rotation operations are performed respectively to obtain the flipped image and the rotated image, and the image fusion operation is performed to obtain the fused image, and disturbance information is added to the fused image to obtain the image verification code;
[0099] Through the logic verification code generator, digital characters and operators are randomly selected to form a mathematical expression to generate an operation verification code;
[0100] Obtain a character verification code through the character verification code generator; including:
[0101] Get the original underlying image;
[0102] Perform background extraction on the original underlying image to obtain a background feature image;
[0103] Set the number of characters of the verification code, and randomly select characters of the corresponding number to form a verification code character group, and convert it into a verification code character image;
[0104] Extracting content features of the verification code character image to obtain a content feature image;
[0105] The background feature image is merged with the content feature image to generate a verification code image and extract the character verification code; optional, including:
[0106] Initialize the verification code image through the noise image;
[0107] Construct a feature fusion network through convolutional layers, activation function layers, and pooling layers;
[0108] Input the initialized verification code image, background feature image and content feature image into the feature fusion network to construct a comprehensive loss function;
[0109] The optimizer takes the comprehensive loss function as the target, calculates the derivative of the comprehensive loss function with respect to the initialized verification code image, and updates the initialized verification code image to reduce the comprehensive loss function;
[0110] L(p b ,p c ,p f )=α b L b (p b ,p f )+α c L c (p c ,p f )
[0111] Among them, p f To initialize the verification code image, L(p b ,p c ,p f ) is the comprehensive loss function of the initialized verification code image, background feature image, and content feature image, L b (p b ,p f ) is the background loss function for initializing the verification code image and the background feature image, L c (p c ,p f ) is the content loss function for initializing the verification code image and the content feature image, α b is the first balancing parameter for initializing the verification code image to the background feature image, α c A second balancing parameter for initializing the verification code image to the content feature image;
[0112]
[0113] in, To initialize the value at the jth position in the feature map of the i-th layer of the verification code image, is the value at the jth position in the feature map of the i-th layer of the background feature image;
[0114]
[0115] Among them, the size of the initialization verification code image feature map is M×N, Initialize the cth element of the rth row of the semi-positive definite matrix corresponding to the verification code image feature map, is the cth element in the rth row of the semi-positive definite matrix corresponding to the feature map of the background feature image;
[0116] When the comprehensive loss function meets the loss function threshold, the updated initialization verification code image is used as the character verification code;
[0117] Verification codes include image verification codes, calculation verification codes, and character verification codes.
[0118] In the above embodiments, the verification code generator includes an image verification code generator, a logic verification code generator and a character verification code generator.
[0119] In the above embodiments, the image verification code generator obtains the original image, performs horizontal flipping and random rotation operations respectively to obtain a flipped image and a rotated image, performs an image fusion operation to obtain a fused image, and adds disturbance information to the fused image to obtain the image verification code.
[0120] In the above embodiments, the logic verification code generator randomly selects numeric characters and operators to form a mathematical expression to generate an operation verification code.
[0121] In the above embodiments, the character verification code generator converts the verification code character group into a verification code character image, extracts content features, obtains a content feature image, fuses the background feature image with the content feature image, generates a verification code image, and extracts a character verification code.
[0122] In the above embodiments, a feature fusion network is constructed through a convolution layer, an activation function layer, and a pooling layer. The feature fusion network layer constructs a comprehensive loss function based on the initialization verification code image, the background feature image, and the content feature image. The optimizer takes the comprehensive loss function as a target, calculates the derivative of the comprehensive loss function with respect to the initialization verification code image, adjusts the first balance parameter and the second balance parameter, updates the initialization verification code image, so as to reduce the comprehensive loss function, and by setting the loss function threshold, the obtained character verification code has the characteristics of both the background feature image and the content feature image, and is convenient for normal users to manually identify.
[0123] The beneficial effects of the above technology are: by setting up an image verification code generator, a logic verification code generator and a character verification code generator, the generation of various types of verification codes is realized, the verification complexity is improved, and the risk of abnormal users using AI models to learn verification codes and crack verification codes to obtain system resources is reduced.
[0124] Embodiment 3:
[0125] The embodiment of the present invention provides a human-machine identification method based on countering AI verification code, the steps of: marking the user terminal identity according to the behavior characteristics of the user's operation based on the verification code, and obtaining the user terminal identity identifier; including:
[0126] Collect the operation time information of the user inputting the user identification information based on the verification code, the user's refresh frequency of the verification code, and the access time information of the user sending the resource access request;
[0127] Constructing a behavior feature vector based on the operation time information, refresh frequency, and access time information;
[0128] Input the behavior feature vector into the classifier model for prediction, mark the user end identity, and obtain the user end identity identifier; optional, including:
[0129] Build an initial classifier model;
[0130] Based on the sample verification code, collect machine behavior characteristics and user behavior characteristics to build a sample training set;
[0131] The initial classifier model is trained through the sample training set to obtain the classifier model;
[0132] The classifier model normalizes the input behavior feature vector, obtains the standard feature vector, performs classification prediction, and obtains the user-side identity.
[0133] In the above embodiments, the behavioral characteristics of the user based on the verification code are collected, and the user terminal identity is marked as a normal user or a suspected abnormal user.
[0134] In the above embodiments, the operation time information, refresh frequency and access time information of the user based on the verification code operation are obtained, a behavior feature vector is constructed, input into the classifier model, normalization is performed, a standard feature vector is obtained for classification prediction, and the corresponding user terminal identity is obtained.
[0135] In the above embodiment, an initial classifier model is constructed, and the initial classifier model is trained through a sample training set to obtain a classifier model; the sample training set is obtained by collecting behavioral characteristics of AI robots and normal users for sample verification codes.
[0136] The beneficial effect of the above technology is: by monitoring the behavioral characteristics of users' operations based on verification codes, obtaining behavioral feature vectors, and acquiring the user-side identity based on the classifier model, it is convenient for subsequent steps to perform verification code recognition operations on the corresponding user-side device according to the user-side identity.
[0137] Embodiment 4:
[0138] The embodiment of the present invention provides a human-machine identification method based on countering AI verification code, the steps of: training an initial classifier model through a sample training set to obtain a classifier model; comprising:
[0139] Get the initial classifier model;
[0140]
[0141] Among them, f(ωx+b) is the classification discriminant function, ω is the normal vector of the linear classification plane, b is the displacement term of the linear classification plane, and x is the feature vector;
[0142] Construct constraints for the linear classification plane;
[0143]
[0144] Among them, δ is the abnormal adjustment function, which is used to adjust the model's tolerance to abnormal sample feature vectors, and θ is the slack variable, which is used to adjust the model's tolerance to abnormal values in sample feature vectors;
[0145] Obtain sample feature vectors in the sample training set, perform training based on the initial classifier model, determine the normal vector and displacement term of the linear classification plane, and construct the optimal linear classification plane;
[0146] According to the optimal linear classification plane, the classifier model is obtained.
[0147] In the above embodiment, an initial classifier model is obtained, the first discrimination result is set as a normal user, and the second discrimination result is set as a suspected abnormal user.
[0148] In the above embodiments, the sample feature vectors in the sample training set are projected into the vector space, and according to the sample classification results corresponding to the sample feature vectors, the optimal linear classification plane is found in the vector space, its normal vector and displacement term are determined, and the classifier model is constructed.
[0149] In the above embodiment, the normal vector and the displacement term are adjusted so that the distance between the linear classification plane and the nearest sample feature vector is maximized, thereby segmenting the first discrimination result and the second discrimination result.
[0150] In the above embodiments, the normal vector and displacement term of the optimal linear classification plane are obtained by constructing a parameter optimization space through a swarm algorithm, and setting an objective function and constraint conditions.
[0151] The beneficial effect of the above technology is that the constructed initial classifier model is trained through the sample feature vectors in the sample training set, the normal vector and displacement term of the optimal linear classification plane are determined to obtain the classifier model, and then the classifier model is obtained for the subsequent steps to realize the identification of normal users and suspected abnormal users.
[0152] Embodiment 5:
[0153] The embodiment of the present invention provides a human-machine identification method based on countering AI verification codes, comprising the following steps: when a user terminal is identified as a suspected abnormal user, a complex verification code with high complexity is generated based on an interference strategy, displayed to the user through a user terminal device, the behavior characteristics of the user operating according to the complex verification code and the returned verification code identification information are monitored, the user terminal identity is identified, and when the user terminal identity is identified as a normal user, resource information is sent to the user terminal device; including:
[0154] When the user terminal is identified as a suspected abnormal user, a complex verification code with high complexity is generated based on the interference strategy; optional, including:
[0155] Through the image verification code generator, the original image is flipped at multiple angles and randomly rotated to obtain several transformed images, which are fused to obtain a transformed fused image, and multi-dimensional disturbance information and noise points are added to the transformed fused image to generate a complex image verification code;
[0156] Through the logic verification code generator, large numbers of characters and high-order operators are randomly selected to form complex mathematical expressions and generate complex operation verification codes;
[0157] By using a character verification code generator, adjusting the first balance parameter and the second balance parameter in the comprehensive loss function, increasing the similarity between the initialization verification code image and the background feature image, and reducing the similarity between the initialization verification code image and the content feature image, to obtain a complex character verification code;
[0158] According to the user's behavior characteristics, obtain the input time information of the user inputting the verification code identification information according to the complex verification code;
[0159] When the input time information is lower than the preset time threshold, and the verification code identification information is consistent with the standard answer information corresponding to the complex verification code, the user terminal is identified as an abnormal user and the data connection with the user terminal device is disconnected;
[0160] When the input time information is not less than the preset time threshold, the user's behavioral characteristics are analyzed and when the verification code identification information is consistent with the standard answer information, the user's identity is identified as a normal user, and the resource information corresponding to the resource access request is obtained and sent to the user's terminal device.
[0161] In the above embodiments, when the user-side identity is identified as a suspected abnormal user, a highly complex complex verification code is generated based on an interference strategy, and the input time information of the user entering the verification code identification information according to the complex verification code is obtained. When the input time information is lower than a preset time threshold and the verification code identification information is consistent with the standard answer information corresponding to the complex verification code, the user-side identity is identified as an abnormal user and the data connection with the user-side device is disconnected; the above technical solution adopts an intentional failure mechanism to interfere with abnormal users from cracking complex verification codes through AI robots, thereby reducing the attack efficiency of abnormal users and providing erroneous feedback to the AI robot. The verification code sample data collected by the abnormal user contains erroneous data, thereby reducing the training efficiency and quality of the AI robot.
[0162] In the above embodiments, when the input time information of the verification code identification information entered by the user according to the complex verification code is not less than the preset time threshold, the user's behavioral characteristics are analyzed and when the verification code identification information is consistent with the standard answer information, the user end identity is identified as a normal user, and the resource information corresponding to the resource access request is obtained and sent to the user end device.
[0163] In one embodiment, the complexity of generating a complex verification code is adjusted according to the behavioral characteristics of the user performing operations based on the verification code, thereby enhancing the protection capability of resource information.
[0164] In the above embodiments, the design of complex verification codes can effectively identify and intercept automated attacks using high computing power, thereby improving the security of resource information.
[0165] In the above embodiments, the complex image verification code is generated by performing multi-angle flipping and random rotation operations on the original image by the image verification code generator, obtaining a number of transformed images, performing fusion processing, obtaining a transformed fused image, and adding multi-dimensional disturbance information and noise points to the transformed fused image, so that the obtained complex image verification code is more difficult for normal users to recognize.
[0166] In the above embodiments, complex operation verification codes are generated by randomly selecting large number characters and high-order operators through a logic verification code generator to form a complex mathematical expression, so that the obtained complex operation verification code is difficult for normal users to calculate and it is difficult to enter the correct answer information in a short time.
[0167] In the above embodiments, the complex character verification code is obtained by adjusting the first balance parameter and the second balance parameter in the comprehensive loss function through the character verification code generator, increasing the similarity between the initialization verification code image and the background feature image, and reducing the similarity between the initialization verification code image and the content feature image, so that the obtained complex character verification code is more difficult for normal users to recognize.
[0168] The beneficial effect of the above technology is that a highly complex complex verification code is generated for the user whose identity is suspected to be an abnormal user, which is used to identify the identity of the user. When the user's input time information for the complex verification code is lower than the preset time threshold, and the verification code identification information is consistent with the standard answer information, the user's identity is identified as an abnormal user. The above method identifies users who correctly identify the complex verification code in a shorter time as abnormal users, and disconnects the data connection with the corresponding user-side device, avoiding abnormal users from collecting complex verification codes for model training, reducing the risk of automatic recognition of verification codes by AI robots, and further protecting the security of system resources.
[0169] Embodiment 6:
[0170] The embodiment of the present invention provides a human-machine identification method based on countering AI verification codes, complex verification codes, including: complex image verification codes, complex operation verification codes and complex character verification codes;
[0171] The preset time threshold is set based on the artificial calculation recognition time of the complex verification code.
[0172] In the above embodiments, the complex verification code is obtained by adjusting parameters of the image verification code generator, the logic verification code generator, and the character verification code generator to obtain the complex image verification code, the complex operation verification code, and the complex character verification code.
[0173] In the above embodiments, the preset time threshold is set according to the fastest time for manual recognition of a complex verification code.
[0174] Embodiment 7:
[0175] The embodiment of the present invention provides a human-machine identification method based on countering AI verification codes, comprising the steps of: when a user terminal is identified as a suspected abnormal user, generating a complex verification code with high complexity based on an interference strategy, displaying the code to the user through a user terminal device, monitoring the behavior characteristics of the user operating according to the complex verification code and the returned verification code identification information, identifying the user terminal identity, and sending resource information to the user terminal device when the user terminal identity is identified as a normal user; and further comprising:
[0176] When the user terminal is identified as a suspected abnormal user, a highly complex verification code is generated based on the interference strategy and displayed to the user through the user terminal device;
[0177] When it is detected that the user performs a refresh operation according to the complex verification code, a second verification code with low complexity is generated and displayed to the user through the user terminal device, and identification information of the second verification code returned by the user is received;
[0178] Monitor the behavioral characteristics of the user's operations based on the second verification code, and compare the second verification code identification information with the second standard answer information corresponding to the second verification code. When the behavioral characteristics of the user's operations based on the second verification code are consistent with the characteristics of a normal user and the second verification code identification information is consistent with the second standard answer information, the user end identity is identified as a normal user, and the resource information corresponding to the resource access request is obtained and sent to the user end device.
[0179] In the above embodiment, when the user terminal is identified as a suspected abnormal user, a complex verification code with high complexity is generated based on the interference strategy and displayed to the user through the user terminal device, and the user's operation based on the complex verification code is monitored. When the user is detected to perform a refresh operation based on the complex verification code, a second verification code with low complexity is generated and displayed to the user;
[0180] Monitor the user's behavioral characteristics based on the second verification code, and obtain the second verification code identification information. When it is determined that the user's behavioral characteristics based on the second verification code meet the characteristics of a normal user, compare the second verification code identification information with the second standard answer information corresponding to the second verification code. When the comparison is consistent, the user end identity is identified as a normal user, and the resource information corresponding to the resource access request is obtained and sent to the user end device.
[0181] In the above embodiments, when it is determined that the user's behavior characteristics based on the second verification code do not meet the normal user characteristics, even if the second verification code identification information is consistent with the second standard answer information, the user terminal identity will be identified as an abnormal user and the data connection with the user terminal device will be disconnected.
[0182] The beneficial effect of the above technology is that when it is monitored that the user refreshes the complex verification code, a low-complexity second verification code is generated to verify the user's identity, and the behavioral characteristics of the user's operation based on the second verification code and the returned second verification code identification information are monitored to identify the user end identity. The above technical scheme realizes a user-end identification method after the user refreshes the complex verification code, and improves the applicability of the method to different user operations.
[0183] Embodiment 8:
[0184] The embodiment of the present invention provides a human-machine identification method based on countering AI verification codes, comprising the steps of: when a user terminal is identified as a suspected abnormal user, generating a complex verification code with high complexity based on an interference strategy, displaying the code to the user through a user terminal device, monitoring the behavior characteristics of the user operating according to the complex verification code and the returned verification code identification information, identifying the user terminal identity, and sending resource information to the user terminal device when the user terminal identity is identified as a normal user; and further comprising:
[0185] When the user terminal is identified as a suspected abnormal user, a highly complex verification code is generated based on the interference strategy and displayed to the user through the user terminal device;
[0186] When monitoring the user's refresh operation based on the complex verification code, if the user's refresh operation on the verification code reaches a preset number of times within a preset time period, the user's identity is identified as an abnormal user and the data connection with the user's terminal device is disconnected.
[0187] In the above embodiment, when a user marked as a suspected abnormal user receives a complex verification code, the user's refresh operation on the complex verification code is monitored. When the user's refresh operation on the verification code reaches a preset number of times within a preset time period, the user terminal identity is identified as an abnormal user.
[0188] In one embodiment, when it is monitored that the user refreshes the verification code a preset number of times (the preset number of times is 10 times) within a preset time period (for example, the preset time period is 5 seconds), the user terminal is identified as an abnormal user.
[0189] The beneficial effect of the above technology is that when the user's identity is identified as a suspected abnormal user, the user's refresh operation on the complex verification code is monitored. When the user's refresh operation on the complex verification code reaches a preset number of times within a preset time period, the user's identity is identified as an abnormal user. By monitoring the user's operation on the complex verification code, the user's identity is identified, and when it is identified as an abnormal user, the data connection with the user's device is disconnected to avoid frequent acquisition of verification codes and occupying system resources.
[0190] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A human-machine identification method based on countering AI verification code, characterized in that: include: Obtain resource access requests initiated by users through user-end devices; According to the resource access request, a verification code is generated and displayed to the user through the user terminal device; The user enters corresponding user identification information according to the verification code displayed by the user terminal device; According to the behavior characteristics of the user's operation based on the verification code, the user's identity is marked to obtain the user's identity identifier; When the user terminal is identified as a normal user, determine whether the user identification information is correct, and if the user identification information is correct, return the resource information corresponding to the resource access request to the user terminal device; if the user identification information is wrong, regenerate a verification code and send it to the user terminal device; When the user-side identity is identified as a suspected abnormal user, a highly complex complex verification code is generated based on the interference strategy and displayed to the user through the user-side device. The behavioral characteristics of the user's operations based on the complex verification code and the returned verification code identification information are monitored to identify the user-side identity. When the user-side identity is identified as a normal user, the resource information is sent to the user-side device.
2. The human-machine identification method based on countering AI verification code according to claim 1 is characterized in that: The step of generating a verification code according to the resource access request and displaying it to the user through the user terminal device includes: Set up image verification code generator, logic verification code generator and character verification code generator; According to the resource access request, randomly selecting any type of verification code generator to obtain a verification code; including: The original image is obtained by an image verification code generator, and horizontal flipping and random rotation operations are performed respectively to obtain a flipped image and a rotated image, and an image fusion operation is performed to obtain a fused image, and disturbance information is added to the fused image to obtain an image verification code; Through the logic verification code generator, digital characters and operators are randomly selected to form a mathematical expression to generate an operation verification code; Obtain a character verification code through the character verification code generator; including: Get the original underlying image; Performing background extraction on the original underlying image to obtain a background feature image; Set the number of characters of the verification code, and randomly select characters of the corresponding number to form a verification code character group, and convert it into a verification code character image; Extracting content features of the verification code character image to obtain a content feature image; The background feature image is merged with the content feature image to generate a verification code image, and a character verification code is extracted; optionally, including: Initialize the verification code image through the noise image; Construct a feature fusion network through convolutional layers, activation function layers, and pooling layers; Inputting the initialized verification code image, the background feature image and the content feature image into the feature fusion network to construct a comprehensive loss function; The optimizer takes the comprehensive loss function as a target, calculates the derivative of the comprehensive loss function with respect to the initialized verification code image, and updates the initialized verification code image to reduce the comprehensive loss function; L(p b ,p c ,p f )=α b 50 b (p b ,p f )+α c 50 c (p c ,p f ) Among them, p f To initialize the verification code image, L(p b ,p c ,p f ) is the comprehensive loss function of the initialization verification code image, the background feature image, and the content feature image, L b (p b ,p f ) is the background loss function between the initial verification code image and the background feature image, L c (p c ,p f ) is the content loss function of the initialization verification code image and the content feature image, α b is the first balancing parameter of the initialization verification code image to the background feature image, α c a second balancing parameter for the initialization verification code image to the content feature image; in, To initialize the value at the jth position in the feature map of the i-th layer of the verification code image, is the value at the jth position in the feature map of the i-th layer of the background feature image; Among them, the size of the initialization verification code image feature map is M×N, Initialize the cth element of the rth row of the semi-positive definite matrix corresponding to the verification code image feature map, is the cth element in the rth row of the semi-positive definite matrix corresponding to the feature map of the background feature image; When the comprehensive loss function meets the loss function threshold, the updated initialization verification code image is used as the character verification code; The verification code includes an image verification code, an operation verification code and a character verification code.
3. The human-machine identification method based on countering AI verification code according to claim 1 is characterized in that: The step of marking the user terminal identity and obtaining the user terminal identity identifier according to the behavior characteristics of the user operating based on the verification code includes: Collecting operation time information of the user inputting user identification information based on the verification code, the user's refresh frequency of the verification code, and access time information of the user sending a resource access request; constructing a behavior feature vector according to the operation time information, the refresh frequency, and the access time information; Input the behavior feature vector into the classifier model for prediction, mark the user terminal identity, and obtain the user terminal identity identifier; optionally, including: Build an initial classifier model; Based on the sample verification code, collect machine behavior characteristics and user behavior characteristics to build a sample training set; Training the initial classifier model using the sample training set to obtain a classifier model; The classifier model normalizes the input behavior feature vector, obtains a standard feature vector, performs classification prediction, and obtains a user terminal identity.
4. The method for human-machine identification based on countering AI verification code according to claim 3 is characterized in that: The step of training the initial classifier model through the sample training set to obtain the classifier model comprises: Get the initial classifier model; Among them, f(ωx+b) is the classification discriminant function, ω is the normal vector of the linear classification plane, b is the displacement term of the linear classification plane, and x is the feature vector; Constructing constraints of the linear classification plane; Among them, δ is the abnormal adjustment function, which is used to adjust the model's tolerance to abnormal sample feature vectors, and θ is the slack variable, which is used to adjust the model's tolerance to abnormal values in sample feature vectors; Obtaining sample feature vectors in the sample training set, performing training based on the initial classifier model, determining the normal vector and displacement term of the linear classification plane, and constructing an optimal linear classification plane; A classifier model is obtained according to the optimal linear classification plane.
5. The method for human-machine identification based on countering AI verification code according to claim 2 is characterized in that: The steps include: when the user terminal is identified as a suspected abnormal user, generating a complex verification code with high complexity based on the interference strategy, displaying it to the user through the user terminal device, monitoring the behavior characteristics of the user operating according to the complex verification code and the returned verification code identification information, identifying the user terminal identity, and sending the resource information to the user terminal device when the user terminal identity is identified as a normal user; including: When the user terminal is identified as a suspected abnormal user, a complex verification code with high complexity is generated based on the interference strategy; optional, including: Through the image verification code generator, the original image is subjected to multi-angle flipping and random rotation operations respectively to obtain a number of transformed images, which are fused to obtain a transformed fused image, and multi-dimensional disturbance information and noise points are added to the transformed fused image to generate a complex image verification code; Through the logic verification code generator, large numbers of characters and high-order operators are randomly selected to form complex mathematical expressions and generate complex operation verification codes; By means of a character verification code generator, the first balance parameter and the second balance parameter in the comprehensive loss function are adjusted to increase the similarity between the initialization verification code image and the background feature image, and to reduce the similarity between the initialization verification code image and the content feature image, so as to obtain a complex character verification code; According to the user's behavior characteristics, obtaining the input time information of the user inputting the verification code identification information according to the complex verification code; When the input time information is lower than a preset time threshold, and the verification code identification information is consistent with the standard answer information corresponding to the complex verification code, the user terminal is identified as an abnormal user, and the data connection with the user terminal device is disconnected; When the input time information is not less than a preset time threshold, the user's behavioral characteristics are analyzed and when the verification code identification information is consistent with the standard answer information, the user terminal identity is identified as a normal user, and the resource information corresponding to the resource access request is obtained and sent to the user terminal device.
6. The method for human-machine identification based on countering AI verification code according to claim 5 is characterized in that: The complex verification code includes: complex image verification code, complex operation verification code and complex character verification code; The preset time threshold is set according to the artificial calculation and recognition time of the complex verification code.
7. The method for human-machine identification based on countering AI verification code according to claim 5 is characterized in that: The steps include: when the user terminal is identified as a suspected abnormal user, generating a complex verification code with high complexity based on the interference strategy, displaying it to the user through the user terminal device, monitoring the behavior characteristics of the user operating according to the complex verification code and the returned verification code identification information, identifying the user terminal identity, and sending the resource information to the user terminal device when the user terminal identity is identified as a normal user; and also include: When the user terminal is identified as a suspected abnormal user, a highly complex verification code is generated based on the interference strategy and displayed to the user through the user terminal device; When it is detected that the user performs a refresh operation according to the complex verification code, a second verification code with low complexity is generated and displayed to the user through the user terminal device, and identification information of the second verification code returned by the user is received; Monitor the behavioral characteristics of the user's operations based on the second verification code, and compare the second verification code identification information with the second standard answer information corresponding to the second verification code. When the behavioral characteristics of the user's operations based on the second verification code are consistent with normal user characteristics and the second verification code identification information is consistent with the second standard answer information, the user terminal identity is identified as a normal user, and the resource information corresponding to the resource access request is obtained and sent to the user terminal device.
8. The method for human-machine identification based on countering AI verification code according to claim 1 is characterized in that: The steps include: when the user terminal is identified as a suspected abnormal user, generating a complex verification code with high complexity based on the interference strategy, displaying it to the user through the user terminal device, monitoring the behavior characteristics of the user operating according to the complex verification code and the returned verification code identification information, identifying the user terminal identity, and sending the resource information to the user terminal device when the user terminal identity is identified as a normal user; and also include: When the user terminal is identified as a suspected abnormal user, a highly complex verification code is generated based on the interference strategy and displayed to the user through the user terminal device; When monitoring the user's refresh operation according to the complex verification code, if it is monitored that the user's refresh operation on the verification code reaches a preset number of times within a preset time period, the user terminal identity is identified as an abnormal user and the data connection with the user terminal device is disconnected.