Intelligent verification code generation and anti-refreshing method and system and computer equipment

Through intelligent verification code generation and anti-brushing methods, multi-modal data and user behavior characteristics are used to dynamically adjust the difficulty of verification code and generate adaptive anti-brushing rules, solving the difficulty of existing verification code technologies in balancing the protection effect and user experience. The problem of this achieves efficient brush protection and good user experience.

CN119397477AActive Publication Date: 2025-02-07SHENZHEN GAUSS COMM CO LTD

Patent Information

Application Number
CN202411518519.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-29
Publication Date
2025-02-07
Estimated Expiration
2044-10-29

AI Technical Summary

Technical Problem

The existing verification code technology is difficult to balance the protection effect and user experience, and it lacks dynamic perception of user behavior and system security status, which makes it difficult for the system to effectively protect when facing diversified attack methods and personalized needs.

Method used

Using intelligent verification code generation and anti-brushing methods, multi-modal data generation and processing and user behavior feature extraction, dual attention network for fusion processing, dynamically adjust the difficulty of verification code, and generate an adaptive anti-brushing rule set based on fusion feature data. .

Benefits of technology

It improves the diversity and unpredictability of verification codes, enhances anti-cracking capabilities, achieves a good balance between security and user experience, and significantly improves the effectiveness and flexibility of anti-brushing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119397477A_ABST
    Figure CN119397477A_ABST
Patent Text Reader

Abstract

The invention relates to an intelligent verification code generation and anti-refreshing method and system and computer equipment. The method comprises the following steps: performing multi-modal generation processing on verification code content to obtain original verification code data; performing multi-dimensional feature extraction on the user interaction behavior to obtain user behavior feature data; inputting the original verification code data and the user behavior feature data into a double attention network for fusion processing to obtain fused feature data; performing dynamic difficulty assessment calculation based on the fused feature data to obtain verification code difficulty adjustment parameters; performing difficulty adjustment on the original verification code data according to the verification code difficulty adjustment parameter to obtain target verification code data; and based on the fused feature data and the target verification code data, performing multi-dimensional anti-refreshing rule analysis, and generating a self-adaptive anti-refreshing rule set. According to the method, the multi-modal data can be comprehensively utilized, the difficulty is dynamically adjusted, and the intelligent verification code of the anti-refreshing rule is adaptively generated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of verification code generation, and in particular to an intelligent verification code generation and anti-swiping method, system and computer equipment. Background Art

[0002] Traditional static verification code methods are facing increasingly severe challenges. On the one hand, with the advancement of artificial intelligence technology, simple verification codes are increasingly easy to be recognized and cracked by machines, resulting in a significant reduction in their protection effectiveness. On the other hand, the increased complexity of verification codes to improve security often leads to a significant decline in user experience, affecting the usability and user satisfaction of the website.

[0003] In addition, existing verification code systems usually use fixed generation rules and difficulty levels, and lack the ability to dynamically perceive user behavior and system security status. This static design method cannot effectively cope with diverse attack methods and the personalized needs of different users, resulting in the system being either too fragile or too strict, and it is difficult to strike a balance between security and user-friendliness. At the same time, with the continuous evolution of network attack methods, a single verification code technology can no longer provide comprehensive protection. The lack of in-depth analysis of user behavior and multi-dimensional anti-brushing rules makes the system easy to be bypassed by advanced automation tools or human-computer collaboration. Summary of the invention

[0004] The main purpose of the present invention is to provide a method, system and computer device for generating and preventing fraudulent verification codes. The present invention can comprehensively utilize multimodal data, dynamically adjust the difficulty, and adaptively generate intelligent verification codes with anti-fraudulent rules.

[0005] To achieve the above object, the present invention provides a smart verification code generation and anti-swiping method, comprising the following steps: Perform multimodal generation processing on the verification code content to obtain original verification code data; Perform multi-dimensional feature extraction on user interaction behaviors to obtain user behavior feature data; Inputting the original verification code data and the user behavior feature data into a dual attention network for fusion processing to obtain fusion feature data; Perform dynamic difficulty evaluation calculation based on the fused feature data to obtain verification code difficulty adjustment parameters; Adjusting the difficulty of the original verification code data according to the verification code difficulty adjustment parameter to obtain target verification code data; A multi-dimensional anti-brushing rule analysis is performed based on the fused feature data and the target verification code data to generate an adaptive anti-brushing rule set.

[0006] The present invention also provides an intelligent verification code generation and anti-swiping system, comprising: A processing module, used for performing multi-modal generation processing on the verification code content to obtain original verification code data; An extraction module is used to extract multi-dimensional features of user interaction behaviors to obtain user behavior feature data; A fusion module, used for inputting the original verification code data and the user behavior feature data into a dual attention network for fusion processing to obtain fused feature data; A calculation module, used for performing dynamic difficulty evaluation calculation based on the fused feature data to obtain a verification code difficulty adjustment parameter; An adjustment module, used for adjusting the difficulty of the original verification code data according to the verification code difficulty adjustment parameter to obtain target verification code data; The analysis module is used to perform multi-dimensional anti-brushing rule analysis based on the fused feature data and the target verification code data to generate an adaptive anti-brushing rule set.

[0007] The present invention also provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the above methods when executing the computer program.

[0008] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned methods are implemented.

[0009] In summary, the technical solution provided by the present invention greatly improves the diversity and unpredictability of verification codes by integrating multiple verification code types such as letters, numbers, graphics and arithmetic problems, and uses generative adversarial networks to dynamically generate content, effectively enhancing the anti-cracking ability of the system. Multi-dimensional feature extraction and fusion technology is adopted to comprehensively capture the interactive behavior characteristics of users, provide rich data support for subsequent difficulty adjustment and anti-brush judgment, and significantly improve the intelligence level of the system. The verification code difficulty is calculated in real time based on the fusion feature data, and the difficulty parameters are dynamically adjusted according to the user proficiency, verification code complexity and system security status, achieving a good balance between security and user experience. Through multi-dimensional anti-brush rule analysis and adaptive rule generation mechanism, the system can quickly respond to new attack modes, continuously optimize protection strategies, and greatly improve the effectiveness and flexibility of anti-brush. By intelligently adjusting the difficulty and form of the verification code, the interference to normal users is reduced, while maintaining effective interception of malicious behavior, significantly improving the user's operating experience. Combined with multimodal data analysis and dynamic protection strategies, the overall security of the system is comprehensively improved, and it can effectively respond to various automated attacks and advanced human-computer collaboration cracking attempts. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1This is a schematic diagram of the steps of a smart verification code generation and anti-swiping method in one embodiment of the present invention; Figure 2 It is a structural block diagram of an intelligent verification code generation and anti-swiping system in one embodiment of the present invention; Figure 3 It is a schematic block diagram of the structure of a computer device according to an embodiment of the present invention.

[0011] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0012] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0013] Reference Figure 1 This embodiment provides a smart verification code generation and anti-swiping method, including the following steps: S1, performing multimodal generation processing on the verification code content to obtain original verification code data; Among them, the verification code type is randomly selected to determine the specific type of the verification code and obtain the verification code type identifier. The verification code types include different forms such as letters, numbers, graphics and arithmetic problems. By randomly selecting the verification code type, the diversity and unpredictability of the verification code are improved, and the difficulty of machine cracking is effectively increased. Based on the verification code type identifier, a generative adversarial network model is constructed to generate and discriminate the content of the verification code. The generative adversarial network model consists of two parts, namely the verification code generator and the verification code discriminator. The function of the verification code generator is to generate various verification code contents, while the function of the verification code discriminator is to evaluate the generated verification code, help the generator to continuously optimize the generation effect, and make the verification code have sufficient complexity and authenticity. When constructing the generative adversarial network model, random noise data is input into the verification code generator, and the generator generates the verification code content according to the randomly input data to obtain candidate verification code data. The readability evaluation and complexity calculation of the candidate verification code data are performed to determine whether the verification code is suitable for users and meets the requirements of anti-swiping. The purpose of readability evaluation is to ensure that the verification code is not too difficult for normal users, so that they can smoothly identify the content of the verification code. The complexity calculation is to ensure that the verification code is difficult enough for automated programs to crack, so as to prevent it from being easily recognized or cracked by malicious programs. Through the readability evaluation and complexity calculation of the candidate verification code, the verification code evaluation index is obtained, which comprehensively reflects the generation quality and applicability of the verification code. The verification code evaluation index is input into the verification code discriminator, and the discriminator judges the authenticity of the verification code based on the evaluation index to obtain the verification code authenticity score, and evaluates whether the generated verification code is realistic, whether it has the ability to resist automated cracking, and meets the expected protection effect. According to the verification code authenticity score, the parameters of the verification code generator are iteratively optimized, and the internal parameters of the generator are continuously adjusted to continuously improve the generation quality in the process of generating verification codes. Through multiple iterations and training, the generator generates high-quality verification codes. Then, the optimized verification code generator is used to generate original verification code images, which are used as the preliminary form of the original verification code data. The original verification code image is interfered. Interference processing includes adding interference lines, background noise, and deforming the characters to obtain the original verification code data. Adding interference lines is to make the automated program encounter more obstacles when recognizing the image, thereby increasing the difficulty of cracking; adding background noise disrupts the characteristics of the image, making it difficult to segment and recognize the image through traditional image processing algorithms; and character deformation processing distorts or randomly transforms the letters or numbers in the verification code, making it difficult for the characters to be accurately recognized by the machine learning model.

[0014] S2, extract multi-dimensional features of user interaction behaviors to obtain user behavior feature data; Specifically, the user's operation behavior in the process of filling in the verification code is captured in real time, and the obtained raw interaction data includes the user's mouse movement trajectory, click events, keyboard input mode, and operation time interval during the verification process. These data can reflect the specific actions of the user when interacting with the verification code, and reveal the behavioral habits and characteristics of the user in the filling process. Then, the original interaction data is analyzed in time series to extract time-related behavioral features and obtain time series feature data. Time series analysis helps to identify the temporal changes in the user's interaction behavior, such as the user's reaction speed and action interval when filling in the verification code. Time-related features can effectively distinguish human users from automated programs. Based on the original interaction data, the user's operation behavior graph is constructed, and each operation node when the user fills in the verification code is represented as a node in the graph, while the order and relationship of the operations constitute the edges in the graph. The user operation behavior graph is subjected to graph convolution processing to extract graph structure feature data. Graph convolution processing is a deep learning method that can perform effective feature extraction on graph structure data, which can mine the implicit graphical relationships in user operation behaviors and help better understand the user's interaction characteristics. Next, based on the original interaction data, local features of user behavior are extracted to obtain local behavior feature data. Local behavior features reflect the detailed features of users in a single interaction process, such as the duration of a specific action, the smoothness of the mouse trajectory, etc. These features can effectively characterize the detailed features of the user's behavior in a specific operation. At the same time, based on the time series feature data, the long-term dependency of user behavior is extracted to obtain global behavior feature data. Global behavior features focus on reflecting the overall pattern of user behavior in the entire interaction process, such as the consistency and stability of operations during the entire verification code input process. The combination of local and global features enables the model to capture the detailed changes in user behavior and understand the overall trend of its behavior, thereby achieving more comprehensive user feature extraction. Multi-head attention fusion is performed on the graph structure feature data, local behavior feature data, and global behavior feature data to obtain fused behavior features. The multi-head attention mechanism is a deep learning method that can establish complex interactive relationships between different features and dynamically weight the importance of each feature, so that the fused features contain both local and global behaviors and combine the associated information of the graph structure. Combine the fused behavior features with the user's historical information, device information, and contextual data of the IP address, and perform time-decay weighted processing on the fused behavior features to obtain weighted behavior features. The purpose of time-decay weighting is to consider the importance differences of user behavior features at different time points. Recent behaviors have higher reference value than earlier behaviors. Different weights are given to features at different time points so that the weighted behavior features can more reasonably reflect the user's current behavior status. Combine the contextual data of device information and IP addresses to improve the accuracy of user authenticity judgment.The weighted behavior features are subjected to nonlinear transformation and dimensionality reduction processing to obtain the final user behavior feature data. The purpose of nonlinear transformation is to enhance the complexity of feature representation so that the model can capture more complex behavior patterns and improve the ability to identify automated attacks. The purpose of dimensionality reduction processing is to reduce the dimension of features, reduce computational complexity, and improve the processing efficiency of the model.

[0015] S3, inputting the original verification code data and the user behavior feature data into the dual attention network for fusion processing to obtain fused feature data; It should be noted that the original verification code data is input into the verification code encoder for feature extraction. The verification code encoder contains 5 convolutional layers, each of which uses the ReLU activation function and is supplemented by batch normalization. The purpose of the convolutional layer is to extract local features in the verification code image, and the ReLU activation function increases the expressiveness of the model by introducing nonlinearity. Batch normalization helps to accelerate the training process and keep the model stable when different batches of data are input. After processing through 5 convolutional layers, the verification code feature vector is obtained, which represents the content information of the original verification code, including its image features and texture patterns. At the same time, the user behavior feature data is input into the behavior encoder for feature extraction to obtain the behavior feature vector. The behavior encoder uses 3 fully connected layers, each of which uses the LeakyReLU activation function and dropout regularization. The role of the fully connected layer is to perform high-dimensional mapping on the input features, thereby extracting high-level features that are helpful in judging the authenticity of the user. The LeakyReLU activation function retains a certain gradient when the input is negative, alleviates the "neuron death" problem, and improves the expressiveness and robustness of the network. Dropout regularization prevents the overfitting of the model by randomly setting some neurons to zero, making the model have better generalization ability for new data. After processing by these three fully connected layers, the feature vector of user behavior is obtained, which represents the operational behavior information of the user in the process of filling in the verification code. Self-attention calculation is performed on the verification code feature vector to obtain the attention weight inside the verification code. Self-attention calculation includes linearly transforming the verification code feature vector to obtain the query matrix, key matrix and value matrix, then performing dot product operation on the query matrix and key matrix, and then obtaining the attention weight through softmax normalization. Finally, these weights are used to perform weighted summation on the value matrix to obtain the enhanced verification code features. The role of the self-attention mechanism is to capture the important parts of the verification code feature vector and establish the dependency relationship between different features, thereby enhancing the effectiveness and robustness of the feature representation, so that the feature information of the verification code can be more comprehensively utilized. Cross-attention calculation is performed on the user behavior feature vector and the enhanced verification code features to obtain the cross-modal attention weight. The cross-attention calculation uses a multi-head attention mechanism, including 8 attention heads. Each attention head focuses on different aspects of the input features, capturing different associations between the verification code features and the user behavior features, so that the model can fuse and associate information at different feature levels and in different attention directions. The cross-modal attention weights calculated by the multi-head attention mechanism are used to weight the enhanced verification code features to obtain the attention-enhanced verification code features. The attention-enhanced verification code features are concatenated with the user behavior feature vector and input into a feature fusion network containing 2 fully connected layers.Each layer of the feature fusion network uses the tanh activation function, which maps the input features to the range of [-1, 1], providing a smoother nonlinear transformation, which helps to stabilize the training of the model. The initial fusion features are obtained through the processing of two layers of full connection. In order to enhance the expression ability of the fusion features, the initial fusion features are subjected to residual connection and layer normalization. The residual connection includes a short-circuit branch and a main branch containing a 1x1 convolution, in which the short-circuit branch directly introduces the input features into the output, and the main branch transforms the input features through a 1x1 convolution and then adds them to the short-circuit branch. The residual connection method effectively prevents the problem of gradient disappearance in deep networks and enables the features to retain the original information after multiple transformations. At the same time, the layer normalization operation is used to normalize the fusion features to eliminate the scale differences of the features at different levels and ensure the stability and convergence speed of the model. After residual connection and layer normalization, the fusion feature data is finally obtained.

[0016] S4, performing dynamic difficulty evaluation calculation based on the fused feature data to obtain verification code difficulty adjustment parameters; Specifically, the fused feature data is feature decomposed to obtain a user behavior feature subset and a verification code feature subset. Based on the user behavior feature subset, the user's proficiency index is calculated to obtain a user proficiency score. The user proficiency index includes multiple aspects such as verification code filling speed, operation fluency, and user history pass rate. The filling speed can reflect the efficiency of the user in the process of entering the verification code, while the operation fluency represents the smoothness of the user in the verification code interaction process, such as the smoothness of the mouse trajectory and the accuracy of the click. The historical pass rate reflects whether the user has successfully completed the verification code in the past interaction. Users with a higher pass rate are usually real users with higher proficiency. Combining these indicators, a score representing the user's current interaction proficiency is obtained. The score is used to dynamically adjust the difficulty of the verification code to ensure that there is no excessive burden on users with higher proficiency, while increasing the verification difficulty for suspicious users. At the same time, the complexity features of the verification code are extracted according to the verification code feature subset, and the verification code complexity score is calculated. The complexity features of the verification code include the degree of character distortion, the number of interference elements, and the complexity of the background. The degree of character distortion describes the degree of deformation and distortion of the characters in the verification code. A higher degree of distortion increases the difficulty of machine cracking, while maintaining a moderate degree of distortion ensures that normal users can still see the content clearly. The number of interference elements refers to the number of noise lines, noise points and other elements contained in the verification code. These elements effectively interfere with the recognition process of the image processing algorithm and increase the security of the verification code. The background complexity refers to the complexity of the verification code background. The complex background effectively obscures the character features and prevents automated image segmentation and recognition. Based on these features, a score representing the complexity of the verification code itself is obtained to measure the protection ability of the verification code. The user proficiency score and the verification code complexity score are input into the preset difficulty evaluation function to obtain an initial difficulty score. The role of the difficulty evaluation function is to comprehensively consider the user's interactive ability and the current complexity of the verification code to obtain a preliminary difficulty score. For users with higher proficiency, the difficulty of the verification code tends to be reduced, while for users with lower proficiency or abnormal performance, the complexity of the verification code needs to be increased to prevent automated attacks. After obtaining the initial difficulty score, it is weighted and adjusted according to the current security threat level of the system. The security threat level of the system will change in real time. When the system detects an increase in existing security threats, such as an abnormal increase in access volume in a short period of time or multiple failed attempts from the same IP, the overall protection level will be increased, thereby weighting the initial difficulty score accordingly to enhance the protection effect of the verification code. The weighted adjusted difficulty score can reflect the current system security situation and user interaction, ensuring that the protection capability of the verification code matches the risk level. The adjusted difficulty score is normalized according to the historical verification code difficulty distribution to obtain a standardized difficulty score. Based on the standardized difficulty score, the most suitable difficulty adjustment strategy is selected from the predefined difficulty adjustment strategy set to obtain a difficulty adjustment plan.The difficulty adjustment strategy set includes a variety of optional adjustment strategies, such as increasing the degree of character distortion, increasing background noise, increasing the number of interference elements, or introducing multimodal verification (such as image selection or audio verification). According to the standardized difficulty score, the difficulty adjustment strategy that best suits the current user and the current environment is automatically selected to ensure that the difficulty of the verification code does not affect the experience of normal users, and can effectively protect against malicious behavior. Convert the selected difficulty adjustment scheme into a specific verification code parameter adjustment instruction to obtain the verification code difficulty adjustment parameter. S5, adjust the difficulty of the original verification code data according to the verification code difficulty adjustment parameter to obtain the target verification code data;. Among them, the verification code difficulty adjustment parameters are parsed to obtain the corresponding difficulty adjustment instruction set, including adjustment requirements in different aspects such as character complexity, background interference, deformation degree and color contrast. These adjustment instructions are used to control the difficulty of various aspects of the verification code and realize fine-grained personalized adjustment. According to the character complexity instruction in the difficulty adjustment instruction set, the characters in the original verification code data are increased or decreased to obtain the verification code data after the character complexity is adjusted. The stroke increase and decrease operation increases or decreases the strokes of the characters in the verification code, making the characters more complex or simplified. For example, adding additional strokes or connecting lines to the characters increases the difficulty of the machine to recognize these characters. Based on the background interference instruction in the difficulty adjustment instruction set, dynamic interference elements are added to the verification code data after the character complexity is adjusted to obtain background-enhanced verification code data. Dynamic interference elements include curves, dot matrices and geometric figures. By adding these elements to the verification code background, the visual complexity of the verification code is effectively increased, making it difficult for the automated program to separate the character information from the background. The addition of curves interferes with the contour features of the characters, while the introduction of dot matrix and geometric figures increases the overall noise level of the image, making it difficult for the cracking program to perform edge detection and image segmentation. The position, shape and number of interference elements are dynamically changed, and are randomly generated according to the user's specific difficulty requirements to ensure that each generated verification code is unique, increasing the difficulty of cracking for attackers. According to the deformation degree instruction in the difficulty adjustment instruction set, the background enhanced verification code data is subjected to nonlinear transformation, including distortion, rotation and perspective transformation, to obtain the deformed verification code data. The purpose of nonlinear transformation is to increase the difficulty of the verification code, making it difficult for automated programs to identify the verification code through image matching algorithms. Distortion transformation causes the characters to bend in shape, making them look irregular, rotation changes the angle of the characters, and perspective transformation makes the characters look like they are rotating in three-dimensional space, increasing the complexity of the image. Based on the color contrast instruction in the difficulty adjustment instruction set, the color space of the deformed verification code data is adjusted to obtain color enhanced verification code data. The adjustment of the color space includes operations such as hue shift, saturation change and brightness adjustment. By shifting the hue, the overall color of the verification code is changed so that each character has a different color, increasing the diversity of the image; the change in saturation makes the color more vivid or faded, increasing the visual complexity; the brightness adjustment changes the brightness of the verification code, making the color of some areas brighter or darker, increasing the interference with machine vision recognition. The color-enhanced verification code data is locally blurred to obtain locally blurred verification code data. The blurred area is dynamically determined according to the difficulty level of the verification code. For example, in the case of high difficulty, the edge of the character is blurred, making the outline of the character less clear, effectively interfering with the edge detection algorithm of the image, making it impossible for the automated program to accurately cut and recognize characters.For verification codes with lower difficulty, the background area is blurred to improve user readability. The locally blurred verification code data is adaptively fused with the original verification code data to obtain the target verification code data. During the fusion process, the contribution ratio of different data is dynamically calculated using the fusion weight. The fusion weight is determined according to the difficulty adjustment parameter to ensure that the final verification code has a high protection capability without causing too much interference to normal users.

[0017] S6, performing multi-dimensional anti-brushing rule analysis based on the fused feature data and the target verification code data, and generating an adaptive anti-brushing rule set.

[0018] Among them, the fused feature data is segmented into time windows to obtain multiple time segment features, which represent the user's behavior performance in different time periods. The length of the time segment is dynamically adjusted according to the difficulty of the verification code. For verification codes with lower difficulty, a shorter time window is selected to capture the user's behavior more precisely, while for verification codes with higher difficulty, a longer time window is used to observe the user's interactive behavior more comprehensively. The time window segmentation method allows the system to flexibly adjust according to different difficulty situations and effectively capture the time series characteristics of user behavior. Based on the segmented time segment features, a user behavior sequence diagram is constructed. The nodes of the user behavior sequence diagram represent the various operations of the user in the process of filling in the verification code, and the edges represent the order and dependency relationship between these operations. The user behavior sequence diagram is topologically sorted to obtain the dependency relationship between user behaviors, which helps the system understand the sequence and logical connection of various operations of the user in the interactive process and identify the rationality and consistency of user behavior. According to the behavioral dependency relationship obtained by topological sorting, the target verification code data is partitioned and mapped to obtain the division result of the verification code interaction area. The purpose of partition mapping is to associate different parts of the verification code with the user's operation behavior according to the user's behavioral characteristics. For example, according to the user's mouse movement trajectory, click position and other operation information, the verification code image is divided into multiple interactive areas to understand the user's interactive performance in each area. The interactive area division results help the system better understand the user's behavior pattern and effectively determine whether the user has performed reasonable operations on the entire verification code, avoiding some automated programs from only cracking part of the verification code. Based on the verification code interactive area division results, the user's operation entropy value is calculated to obtain the behavior complexity index. The operation entropy value is a measure of the randomness and complexity of the user's operation in each interactive area. If the user's operation shows greater randomness and complex behavior between each area, the operation entropy value is high, otherwise it is low. By calculating the operation entropy value, the complexity index of the user's behavior is obtained, which effectively distinguishes normal users from automated programs. The behavior complexity index is compared with the preset threshold to obtain a preliminary anti-brushing judgment result, which reflects the rationality and authenticity of the user's behavior and is used to identify possible abnormal behaviors. Fuzzy reasoning is performed on the preliminary anti-brushing judgment result to obtain the anti-brushing confidence. Fuzzy reasoning is a reasoning method based on a predefined rule set and membership function, which can show high adaptability when processing complex and uncertain information. In the fuzzy reasoning process, the preliminary anti-brushing judgment results are mapped to different membership levels according to different membership functions, and reasoned according to the preset anti-brushing rules to obtain the final anti-brushing confidence. The anti-brushing confidence reflects the system's judgment on the abnormality of user behavior. A higher confidence means that the system has a higher suspicion of abnormal user behavior, while a lower confidence means that the system believes that the user behavior is relatively normal.According to the anti-brushing confidence, the weights of the anti-brushing rules are dynamically adjusted to obtain the updated rule weights. The weights of the anti-brushing rules reflect the importance of different rules in the overall anti-brushing strategy. These weights are dynamically adjusted according to the current user's behavioral characteristics and confidence, so that the anti-brushing strategy can adapt to different risk situations more flexibly. Based on the updated rule weights, the historical anti-brushing rules are reordered and pruned to generate an adaptive anti-brushing rule set. The reordering process is to sort all historical rules according to the current rule weights to ensure that the most important rules can be applied first in the current anti-brushing strategy. The pruning process is to remove rules that are no longer applicable or have too low weights to improve the efficiency of the system and the simplicity of the anti-brushing rule set. Through reordering and pruning, an adaptive anti-brushing rule set is obtained. This rule set can dynamically adjust the anti-brushing strategy according to different user behavior characteristics and current risk situations, thereby ensuring that the verification code system has sufficient protection capabilities to deal with various potential automated attacks while providing a good user experience.

[0019] In one example, multimodal generation processing is performed on the verification code content to obtain original verification code data, including: randomly selecting a verification code type to obtain a verification code type identifier, where the verification code types include letters, numbers, graphics, and arithmetic problems; constructing a generative adversarial network model based on the verification code type identifier to obtain a verification code generator and a verification code discriminator; inputting random noise data into the verification code generator to generate verification code content to obtain candidate verification code data, and performing readability evaluation and complexity calculation on the candidate verification code data to obtain a verification code evaluation index; inputting the verification code evaluation index into the verification code discriminator to judge the authenticity to obtain a verification code authenticity score, and iteratively optimizing the parameters of the verification code generator according to the verification code authenticity score to obtain an optimized verification code generator; using the optimized verification code generator to generate an original verification code image, and performing interference processing on the original verification code image, including adding interference lines, background noise, and character deformation, to obtain original verification code data.

[0020] In this example, the verification code type is randomly selected to obtain the identification of the verification code type. The verification code types include letters, numbers, graphics, arithmetic problems, etc. When generating the verification code, in order to ensure the diversity and unpredictability of the verification code, random selection is performed among these different types. Assume that the random selection process is represented by a probability distribution function, set as ,in Indicates the type of verification code. Letters, numbers, shapes, math problems . Through the distribution function, the type identifier used each time the verification code is generated is randomly determined , ensuring the diversity of verification code types. After determining the verification code type, a generative adversarial network (GAN) model is constructed based on the type identification to generate and discriminate the verification code content. The generative adversarial network model mainly consists of two parts: the generator and the discriminator. The generator is responsible for generating the verification code content, while the discriminator is responsible for judging whether the generated verification code is realistic. Suppose the generator is and the discriminator is , generator The input is random noise data , the noise data is usually randomly sampled from a normal distribution. By Input Generator , generate candidate verification code data, the generation process is expressed by the formula: ; in, Represents the generated candidate verification code data, Identifies the verification code type. The generator is based on and Different types of verification codes are generated. For example, if If the type is letter, the generator will generate a verification code containing random letters. If the type is arithmetic, the generator will generate a verification code containing simple arithmetic expressions. Readability evaluation and complexity calculation are performed on the candidate verification code data to ensure that the generated verification code is both readable for human users and has a certain degree of anti-cracking difficulty for automated programs. Readability evaluation uses specific metrics, such as calculating the clarity of characters, the spacing between strokes, and other indicators. Suppose the readability index is The complexity is calculated by calculating the number of interference elements and the degree of distortion of characters in the verification code. The complexity index is Combining readability and complexity, we get a comprehensive captcha evaluation metric: ; in, and The weight coefficients for readability and complexity are used to balance the importance of the two. , effectively measuring whether the generated verification code meets the reading needs of human users and the requirements of preventing automated cracking. Input Discriminator , the discriminator judges the authenticity of the generated verification code to obtain the authenticity score of the verification code The goal of the discriminator is to distinguish between the verification code generated by the generator and the real verification code sample, while the goal of the generator is to generate realistic verification codes so that the discriminator cannot easily distinguish between the two. The adversarial process is carried out by alternately training the generator and the discriminator, so that the generation quality of the generator is continuously improved. The loss function of the generator is expressed as: ; By minimizing the loss function, the parameters of the generator are optimized to improve the authenticity of the generated verification code, making it impossible for the discriminator to distinguish between the generated and real verification codes. After multiple iterations of training, an optimized generator is obtained. , the generator can generate verification codes with high readability and complexity. Then, using the optimized generator Generate the original verification code image. In order to increase the protection capability of the verification code, the generated original verification code image is interfered, including adding interference lines, background noise, and character deformation. For example, adding interference lines is to increase the visual complexity of the verification code, making it difficult for the automated program to segment and recognize the characters; adding background noise interferes with the overall structure of the image, making it more difficult for the machine vision algorithm to extract effective character features; character deformation is to twist and rotate the characters to make the shape of the characters irregular, increasing the difficulty of cracking. The interference processing process is expressed as: ; Among them, Noise(·) represents the interference processing operation on the generated image, and the final is the original verification code data after interference.

[0021] In one example, multi-dimensional feature extraction is performed on user interaction behavior to obtain user behavior feature data, including: real-time capture of the user's operation behavior in the process of filling in the verification code to obtain original interaction data, the original interaction data including mouse movement trajectory, click events, keyboard input mode and operation time interval; time series analysis is performed on the original interaction data to extract time-related features to obtain time series feature data, and a user operation behavior graph is constructed based on the original interaction data, and graph convolution is performed on the user operation behavior graph to obtain graph structure feature data; local feature extraction is performed on user behavior based on the original interaction data to obtain local behavior feature data, and long-term dependency of user behavior is extracted based on the time series feature data to obtain global behavior feature data; multi-head attention fusion is performed on the graph structure feature data, local behavior feature data and global behavior feature data to obtain fused behavior features; time-attenuated weighted processing is performed on the fused behavior features in combination with the contextual data of user history information, device information and IP address to obtain weighted behavior features, and nonlinear transformation and dimensionality reduction processing are performed on the weighted behavior features to obtain user behavior feature data.

[0022] In this example, the user's operating behavior in the process of filling out the verification code is captured in real time to obtain raw interaction data, including mouse movement trajectory, click events, keyboard input mode, and operation time interval. The mouse movement trajectory refers to the movement path of the mouse when the user fills in the verification code. This trajectory reflects whether the user operates in a natural way; the click event is the specific location and number of click operations performed by the user on the interface; the keyboard input mode refers to the user's input behavior when using the keyboard, such as the sequence of keys, changes in key strength, etc.; the operation time interval is the pause and duration of the user between each operation. These data reflect whether the user's behavior conforms to the typical human operation mode. Next, perform time series analysis on the raw interaction data, extract time-related features, and obtain time series feature data. By capturing the changes in user behavior at different time points, understand the user's overall operation mode. For example, suppose the user's operation behavior is in time The characteristics of , the entire operation process is regarded as a time series . By analyzing the time series, calculating the speed, acceleration and time interval characteristics of the operation, it helps to determine whether the user's operation has a real behavior pattern. Construct a user operation behavior graph based on the original interaction data to capture the relationship and structure between different user operations. The nodes of the user operation behavior graph represent the specific operations of the user at different time points (such as mouse clicks or keyboard input), and the edges between the nodes represent the order and mutual dependence of the operations. For example, if the user first clicks on an area and then enters certain characters when filling in the verification code, there is an edge association between the two operations. By constructing a behavior graph, the logical structure of the user's operations and the dependency between each operation are portrayed. Suppose the operation behavior graph is ,in Represents a collection of operation nodes. Represents the edge set between operations. The behavior graph is processed by graph convolution, and the graph structure feature data in the user behavior is extracted using the graph convolution network. The graph convolution process is expressed as: ; in, Indicates The node feature matrix of the layer, represents the adjacency matrix of the graph, Indicates The weight matrix of the layer, is the activation function. Through graph convolution, the features of each node are aggregated to extract the structural feature data of the operation behavior graph. , reflecting the dependencies and logical order between different user operations. At the same time, local features are extracted from the original interaction data to obtain local behavior feature data. Local behavior features refer to the detailed performance of users in specific operations, such as the smoothness of mouse movement, the accuracy of clicks, etc. These features are extracted by in-depth analysis of the data of each specific operation. At the same time, based on the time series feature data, the long-term dependencies of user behaviors are extracted to obtain global behavior feature data. Long-term dependencies reflect the consistency and continuity of user behaviors throughout the interaction process. These features help identify automated programs. Next, the graph structure feature data, local behavior feature data, and global behavior feature data are fused using a multi-head attention mechanism. The multi-head attention mechanism weights the input features through multiple different attention heads to capture the correlation between different features. Assume that the graph structure features, local features, and global features are , the multi-head attention mechanism is expressed as: ; in, Represents the fused behavior features, and MultiHead represents the calculation process of the multi-head attention mechanism. The fused behavior features are obtained by weighted summation and aggregation of different features. . Combined with the contextual data of user history information, device information and IP address, the fused behavior features are weighted by time decay to obtain weighted behavior features. Considering the timeliness of user behavior, recent behavior features usually have higher reference value, and higher weights are given to recent features. Suppose the fused behavior features are , the time decay weighting is expressed as: ; in, is the time decay weight function, Represents the time range of the feature. Through weighted processing, it can more reasonably reflect the user's current behavior status, and comprehensively evaluate the user in combination with historical data. The weighted behavior features are subjected to nonlinear transformation and dimensionality reduction processing to obtain user behavior feature data. Nonlinear transformation maps features to a nonlinear space through activation functions (such as ReLU or Tanh) to increase the complexity of feature representation, allowing the model to capture more complex behavior patterns. Dimensionality reduction processing maps high-dimensional features to lower dimensions through methods such as principal component analysis or autoencoders, reducing computational complexity and removing redundant features.

[0023] In one example, the original verification code data and the user behavior feature data are input into the dual attention network for fusion processing to obtain fused feature data, including: inputting the original verification code data into the verification code encoder for feature extraction to obtain a verification code feature vector, the verification code encoder contains 5 convolutional layers, each convolutional layer uses the ReLU activation function and batch normalization; inputting the user behavior feature data into the behavior encoder for feature extraction to obtain a behavior feature vector, the behavior encoder contains 3 fully connected layers, each layer uses the LeakyReLU activation function and dropout regularization; performing self-attention calculation on the verification code feature vector to obtain the internal attention weight of the verification code, the self-attention calculation includes linear transformation of the query matrix, the key matrix and the value matrix, and softmax normalization Operation; weighted summation of the verification code feature vector based on the internal attention weight of the verification code is performed to obtain the enhanced verification code feature; cross-attention calculation is performed on the behavior feature vector and the enhanced verification code feature to obtain the cross-modal attention weight. The cross-attention calculation uses a multi-head attention mechanism, including 8 attention heads; weighting the enhanced verification code feature according to the cross-modal attention weight is performed to obtain the attention-enhanced verification code feature; the attention-enhanced verification code feature and the behavior feature vector are concatenated and input into a feature fusion network including 2 fully connected layers, each layer using a tanh activation function to obtain the initial fusion feature; residual connection and layer normalization are performed on the initial fusion feature to obtain the fusion feature data. The residual connection includes a short-circuit branch and a main branch including a 1x1 convolution.

[0024] In this example, the original CAPTCHA data is input into the CAPTCHA encoder for feature extraction. The CAPTCHA encoder consists of 5 convolutional layers, each of which uses the ReLU activation function and batch normalization. The function of the convolutional layer is to extract local features in the image. The ReLU activation function introduces nonlinearity by keeping the positive part of the input and setting the negative value to zero, thereby enhancing the expressive power of the model. The batch normalization operation is used to standardize the input data of each batch, reduce the offset of the internal covariate, and accelerate the convergence process of the model. Assume that The output of the convolutional layer is , then The operation of the layer is expressed as: ; in, It is The output features of the layer, Indicates convolutional layers, BatchNorm is the batch normalization operation, and ReLU is the activation function. Through the operation of these five convolutional layers, a high-dimensional verification code feature vector is obtained. The user behavior feature data is input into the behavior encoder for feature extraction to obtain a behavior feature vector. The behavior encoder contains 3 fully connected layers, each of which uses the LeakyReLU activation function and dropout regularization. The function of the fully connected layer is to perform a linear transformation on the input features, reduce the dimension of the high-dimensional features or map them to a new feature space. The LeakyReLU activation function maintains a certain gradient when the input is negative, alleviating the "neuron death" problem and making the model more robust. Dropout is used to randomly set a part of the neurons to zero to reduce the overfitting phenomenon of the model. Suppose the first The output of the fully connected layer is , then The operation of the layer is expressed as: ; in, It is The output features of the layer, Indicates Fully connected layers, LeakyReLU is the activation function, and Dropout is the regularization operation. After processing by three fully connected layers, the behavior feature vector is obtained. Next, self-attention calculation is performed on the verification code feature vector to obtain the attention weight inside the verification code. The self-attention calculation linearly transforms the feature vector to obtain the query matrix , key matrix Sum Matrix , and calculate the attention weight by the dot product of the query matrix and the key matrix, and then normalize it by softmax to get the weight distribution. The calculation of attention weight is expressed as: ; in, is the linear transformation matrix of query, key and value, is the dimension of the key matrix, is the attention weight matrix. Based on the attention weight matrix Pair Matrix Perform weighted summation to obtain enhanced verification code features , the calculation formula is: ; Through this process, the important parts of the verification code features are strengthened, making the model pay more attention to the key parts of the verification code image. and enhanced CAPTCHA features Perform cross-attention calculation to obtain cross-modal attention weights. The purpose of cross-attention is to capture the correlation between verification code features and user behavior features, and use multi-head attention mechanism to associate in different feature spaces to enhance the interactive information of features. Assume that multi-head attention includes The weight calculated by each attention head is ( ), then the calculation of cross-modal attention weight is: ; in, Indicates The value matrix corresponding to each head is concatenated with the attention results of different heads to obtain the cross-modal fusion features. The enhanced verification code features are weighted according to the cross-modal attention weights to obtain the attention-enhanced verification code features. . Captcha features that increase attention and behavioral feature vector The concatenation is performed and input into a feature fusion network containing two fully connected layers. Each layer uses the tanh activation function to obtain the initial fusion feature. The function of the tanh activation function is to map the input to the range of [-1, 1], providing a smooth nonlinear mapping and increasing the effect of feature fusion. The output of the fully connected layer of the layer is , then The operation of the layer is expressed as: ; Through these two layers of full connection operations, the initial fusion features are obtained The initial fusion features are subjected to residual connection and layer normalization to obtain the final fusion feature data. The purpose of residual connection is to prevent information from being gradually lost in the deep network by adding the input directly to the output, thereby improving the stability of training. Assume that the residual connection consists of a short-circuit branch and a The main branch of the convolution, the calculation of the fusion feature is expressed as: ; For residual features Perform layer normalization to eliminate the scale differences between different feature dimensions, so that the model can converge better and finally obtain fused feature data .

[0025] In one example, a dynamic difficulty assessment calculation is performed based on fused feature data to obtain a verification code difficulty adjustment parameter, including: feature decomposition of the fused feature data to obtain a user behavior feature subset and a verification code feature subset; user proficiency indicators are calculated based on the user behavior feature subset to obtain a user proficiency score, and the user proficiency indicators include verification code filling speed, operation fluency, and historical pass rate; verification code complexity features are extracted according to the verification code feature subset to obtain a verification code complexity score, and the verification code complexity features include the degree of character distortion, the number of interference elements, and the background complexity; the user proficiency score and the verification code complexity score are input into a preset difficulty assessment function to obtain an initial difficulty score; the initial difficulty score is weightedly adjusted based on the current security threat level of the system to obtain an adjusted difficulty score, and the adjusted difficulty score is normalized based on the historical verification code difficulty distribution to obtain a standardized difficulty score; based on the standardized difficulty score, the most suitable difficulty adjustment strategy is selected from a predefined difficulty adjustment strategy set to obtain a difficulty adjustment plan, and the difficulty adjustment plan is converted into a specific verification code parameter adjustment instruction to obtain a verification code difficulty adjustment parameter.

[0026] In this example, the fused feature data is decomposed to obtain the user behavior feature subset and the verification code feature subset. The fused feature data contains the user's operation behavior when filling in the verification code and the features of the verification code itself. The feature fusion reflects the interaction process between the user and the verification code. Calculate the user's proficiency index to get the user's proficiency score. The user proficiency index includes multiple aspects, such as verification code filling speed, operation fluency, and historical pass rate. The filling speed is measured by the time it takes for the user to complete the entire verification code filling. Suppose the filling time is ; Operation fluency is evaluated by the smoothness of the user's mouse movement trajectory and the accuracy of the click operation. Suppose the fluency is The historical pass rate indicates the percentage of users who successfully passed the verification code in the past. Based on these indicators, the user's proficiency score is calculated. , the formula is: ; in, is the weight coefficient, which is used to balance the importance of different indicators in the proficiency score. Extract the complexity features of the verification code to obtain the verification code complexity score. The complexity features of the verification code include the degree of character distortion, the number of interference elements, and the complexity of the background. The degree of character distortion is measured by analyzing the deformation amplitude of the characters in the verification code, assuming that ; The number of interference elements represents the number of random noise lines and points in the verification code, set it to ; The background complexity is evaluated by analyzing the complexity of the verification code image background, assuming that . Based on the complexity characteristics, calculate the complexity score of the verification code , the formula is: ; in, is a weight coefficient used to balance the importance of different complexity features in the overall score. Higher character distortion, number of interference elements, and background complexity will result in a higher complexity score for the CAPTCHA. and verification code complexity score Input into the preset difficulty evaluation function to get the initial difficulty score The difficulty evaluation function combines the user's proficiency and the complexity of the verification code to ensure that the verification code difficulty is appropriate for users of different proficiency. The initial difficulty score is expressed as: ; in, and is a weight coefficient used to balance the impact of user proficiency and verification code complexity in the overall score. If the user proficiency is high, the verification code difficulty score is low. On the contrary, if the user proficiency is low and the verification code complexity is high, the difficulty score will be high. Based on the current security threat level of the system, the initial difficulty score is weighted and adjusted to obtain the adjusted difficulty score. . Security Threat Level Reflects the current security risk status of the system. When the system faces a higher risk of attack, the difficulty of the verification code should be increased accordingly. The adjusted difficulty score is expressed as: ; Ensure that in high-risk situations, even if the user is highly proficient, the difficulty of the CAPTCHA is increased accordingly to prevent automated attacks. The adjusted difficulty score is normalized based on the historical CAPTCHA difficulty distribution to obtain a standardized difficulty score For example, let the mean and standard deviation of the historical difficulty score be and , then the standardized difficulty score is expressed as: ; Through standardization, the difficulty score of the current user is evaluated relative to the historical average level. Based on the standardized difficulty score, the most suitable difficulty adjustment strategy is selected from the predefined difficulty adjustment strategy set to obtain the difficulty adjustment scheme. For example, the predefined difficulty adjustment strategy set includes different adjustment methods such as increasing character distortion, increasing background noise, or increasing interference elements. According to the standardized difficulty score, a suitable strategy is selected to ensure that the difficulty of the verification code can adapt to the proficiency and security requirements of the current user. The difficulty adjustment scheme is then converted into specific verification code parameter adjustment instructions, such as adjusting the degree of deformation of the characters, increasing the number of interference lines, or changing the complexity of the background, etc., to obtain the difficulty adjustment parameters of the verification code.

[0027] In one example, the difficulty of original verification code data is adjusted according to verification code difficulty adjustment parameters to obtain target verification code data, including: parsing the verification code difficulty adjustment parameters to obtain a difficulty adjustment instruction set, the difficulty adjustment instruction set including character complexity, background interference, deformation degree and color contrast; according to the character complexity instruction in the difficulty adjustment instruction set, performing stroke increase and decrease operations on characters in the original verification code data to obtain verification code data after character complexity adjustment; based on the background interference instruction in the difficulty adjustment instruction set, adding dynamic interference elements to the verification code data after character complexity adjustment, including curves, dot matrices and geometric figures, to obtain background enhanced verification code data; according to The deformation degree instruction in the difficulty adjustment instruction set performs nonlinear transformation on the background enhanced verification code data, including distortion, rotation and perspective transformation, to obtain the deformed verification code data; based on the color contrast instruction in the difficulty adjustment instruction set, the color space of the deformed verification code data is adjusted, including hue shift, saturation change and brightness adjustment, to obtain color enhanced verification code data; the color enhanced verification code data is locally blurred, and the blurred area is dynamically determined according to the difficulty level to obtain locally blurred verification code data; the locally blurred verification code data is adaptively fused with the original verification code data, and the fusion weight is dynamically calculated according to the difficulty adjustment parameter to obtain the target verification code data.

[0028] In this example, the difficulty adjustment parameters of the verification code are parsed to obtain a specific difficulty adjustment instruction set. The difficulty adjustment instruction set contains four main dimensions: character complexity, background interference, deformation degree, and color contrast. These instruction sets represent the adjustment requirements of the verification code in various aspects to increase its protection difficulty. For example, the character complexity instruction is used to describe the degree of increase or decrease in the strokes of the character, the background interference instruction describes the type and amount of noise to be added, the deformation degree instruction describes the distortion or perspective intensity of the image, and the color contrast instruction describes the way to adjust the color. According to the character complexity instructions in the difficulty adjustment instruction set, the characters in the original verification code data are increased or decreased in strokes to obtain the verification code data after the character complexity is adjusted. Suppose the original character image is The character complexity is adjusted by increasing or decreasing the strokes of the character. For example, the increase or decrease operation is achieved by adding additional lines or removing existing strokes. The adjusted character complexity image is recorded as The adjustment formula of character complexity is expressed as: ; in, Indicates the stroke set to be added. Represents the set of strokes that need to be removed. By adding or subtracting operations, the complexity of the characters is increased or decreased, increasing the difficulty for the machine to crack the verification code. Based on the result of the character complexity adjustment, the background of the verification code is enhanced according to the background interference instruction in the difficulty adjustment instruction set. The addition of background interference includes elements such as dynamic curves, dot matrices, and geometric figures to increase the complexity and protection capabilities of the verification code. For example, by adding randomly generated curves to the image, these curves partially overlap with the characters, increasing the visual interference of the image, making it difficult for automated programs to recognize character boundaries. Add dots and geometric figures to the image to increase the visual complexity of the verification code. Suppose the enhanced verification code image is , the process of adding background interference elements is expressed as: ; in, The interference elements of curves, dot matrices and geometric figures are represented respectively. The higher the background interference, the higher the number and complexity of these elements. Then, the background-enhanced verification code data is subjected to nonlinear transformation according to the deformation degree instruction, including distortion, rotation and perspective transformation. The distortion transformation makes the characters or background bend along a specific curve, so that the shape of the characters no longer presents a simple straight line or regular figure. This transformation is expressed as a coordinate transformation function: ; in, is the original pixel coordinate, is the pixel coordinate after distortion transformation, is a distortion function. The image is rotated to make the characters rotate at a certain angle, which increases the difficulty of the cracking program to identify the direction of the characters. The perspective transformation makes the image look deep in three-dimensional space, making the characters appear to be displayed on different planes, increasing the complexity of cracking. After nonlinear transformation, the deformed verification code data is obtained Based on the color contrast instruction in the difficulty adjustment instruction set, the color space of the deformed verification code data is adjusted, including hue shift, saturation change and brightness adjustment. Color adjustment increases the complexity of the image by changing the color attributes of the verification code image, making it difficult for automated programs to recognize characters by color features. Suppose the adjusted color image is , color space adjustment is expressed as: ; in, Respectively represent the transformation operations of hue, saturation, and brightness. For example, by adjusting the hue, the color of the character is shifted, so that the same character has different colors in different verification codes, increasing the difficulty of cracking; by adjusting the saturation and brightness, some parts of the characters appear more blurred or more conspicuous. The color-enhanced verification code data is locally blurred to obtain locally blurred verification code data. The blurred area is dynamically determined according to the difficulty level. For example, in high-difficulty cases, the edges or intersections of the characters are blurred to interfere with the morphological information of the characters, making it impossible for the automated program to accurately segment the characters. The blurring is achieved through a convolution operation. Suppose the blurred image is , the fuzzy operation is expressed as: ; in, is a blur kernel, which is used to perform blur convolution on the local area in the image. The degree of blur depends on the difficulty adjustment parameter. The size and weight of the blur kernel are adjusted according to different difficulties to ensure that the blur effect of the image can effectively interfere with automatic recognition. The locally blurred verification code data is adaptively fused with the original verification code data to obtain the final target verification code data. Adaptive fusion combines the blurred and deformed features with the original verification code features, so that the final verification code has both high protection capabilities and a certain readability. Suppose the fused image is , adaptive fusion is expressed as: ; in, To integrate the weights, the parameters are dynamically calculated based on the difficulty adjustment. Closer to 1, it retains more blur and deformation features; at lower difficulty, Reduce, so that the original features are easier to preserve.

[0029] In one example, a multi-dimensional anti-brushing rule analysis is performed based on fused feature data and target verification code data to generate an adaptive anti-brushing rule set, including: segmenting the fused feature data into time windows to obtain multiple time segment features, and dynamically adjusting the length of each time segment according to the difficulty of the verification code; constructing a user behavior sequence diagram based on the time segment features, and topologically sorting the user behavior sequence diagram to obtain behavior dependencies; partitioning and mapping the target verification code data according to the behavior dependencies to obtain the verification code interaction area division results; calculating the user operation entropy value based on the verification code interaction area division results to obtain a behavior complexity index, and comparing the behavior complexity index with a preset threshold to obtain a preliminary anti-brushing judgment result; performing fuzzy reasoning on the preliminary anti-brushing judgment result to obtain anti-brushing confidence, and the fuzzy reasoning is based on a predefined rule set and membership function; dynamically adjusting the weight of the anti-brushing rule according to the anti-brushing confidence to obtain an updated rule weight, and reordering and pruning the historical anti-brushing rules based on the updated rule weight to obtain an adaptive anti-brushing rule set.

[0030] In this example, the fused feature data is segmented into time windows to obtain multiple time segment features. The user's behavior data is divided into time periods to capture the changes in user behavior in different time segments. The length of each time window is dynamically adjusted, depending on the difficulty level of the current verification code. Suppose the total fused feature data is , which is The time window length is , then the time segment feature is expressed as ,in , , is the number of time segments obtained by segmentation. The higher the difficulty of the verification code, the longer the time window The shorter the time window, the more detailed the system observation of the user's behavior. A user behavior sequence diagram is constructed based on the time segment features. The nodes of the user behavior sequence diagram represent the user's behavior in different time segments, and the edges between each node represent the time dependency between behaviors. For example, if the user performs a mouse movement operation in the first time window and a click operation in the next time window, there is a directed edge between the two behavior nodes, indicating the user's behavior dependency order. Let the user behavior sequence diagram be ,in is a set of behavior nodes, is the edge set of the behavior dependency relationship. In order to obtain the dependency order of user behavior, the user behavior sequence graph is topologically sorted, and the result of topological sorting represents the user behavior dependency relationship. For example, the node sequence of the behavior sequence graph is , and its topological sorting result reflects whether the user's behavior sequence in the interaction process is logical. Based on the behavior dependency relationship obtained by topological sorting, the target verification code data is partitioned and mapped to obtain the verification code interaction area division result. The partition mapping process is to map the user's operation behavior to different parts of the verification code image, so as to determine whether the user has reasonably interacted with all areas of the verification code. For example, the verification code image is divided into several interaction areas, and the interaction area is , the user's operation behavior is mapped to these areas to obtain a regional division result. Through regional division, it is analyzed whether the user has performed effective operations on the key parts of the verification code (such as all character areas) to prevent the automated program from only cracking part of the area. Based on the division results of the verification code interaction area, the user's operation entropy value is calculated to obtain the behavior complexity index. The operation entropy value is an indicator that measures the randomness and complexity of the user's operation behavior, and is used to determine whether the user's behavior conforms to the normal human behavior characteristics. Suppose the user is in area The operation probability is , the user's operation entropy value is expressed as: ; in, Indicates the entropy value of user operations, Indicates that the user is in the area The operating frequency, is the total number of regions. A higher operation entropy value indicates that the user's operations in each region are relatively uniform and have a certain degree of randomness, which is usually a characteristic of human users, while automated programs show lower entropy values ​​because their operations tend to be concentrated in certain specific regions or have a high degree of regularity. With the preset threshold Compare and get the preliminary anti-brushing judgment result. , it means that the user behavior has high complexity and is a normal user; otherwise, there is suspicion of automated attack. Next, fuzzy reasoning is performed on the preliminary anti-brushing judgment results to obtain the anti-brushing confidence. The purpose of fuzzy reasoning is to process complex and uncertain information and use fuzzy logic to evaluate the abnormality of user behavior. Fuzzy reasoning is based on a predefined set of rules and membership functions. Each rule describes the user behavior characteristics and their possible confidence in different situations. The membership function is used to map characteristics such as operation entropy values ​​and behavior sequences into fuzzy sets to obtain the corresponding confidence. Suppose the anti-brushing confidence is , the confidence obtained by fuzzy reasoning is expressed as: ; in, represents the fuzzy inference function, is the operation entropy value, and TopoOrder represents the topological sorting result of the behavior dependency relationship. The higher the confidence, the more the user's behavior conforms to the characteristics of normal humans. , dynamically adjust the weights of anti-brushing rules to obtain updated rule weights. The weights of anti-brushing rules reflect the importance of different rules in the anti-brushing strategy. The weights of these rules are adjusted according to the current confidence level to ensure the flexibility and effectiveness of the anti-brushing strategy. For example, if the confidence level is low, indicating that the user behavior is more likely to be abnormal, then the weights of rules related to strict protection will be increased, while the weights of looser rules will be reduced. Let the updated rule weights be It is expressed as: ; in, is the original rule weight, is the adjustment factor, is the anti-brushing confidence. When the confidence is low, the weight will increase accordingly, making the anti-brushing strategy more stringent. Based on the updated rule weights, the historical anti-brushing rules are reordered and pruned to obtain an adaptive anti-brushing rule set. The reordering process is to sort the rules according to the updated weights to ensure that the most important rules can be applied first; and the pruning process is to remove the rules with lower weights and no longer applicable to improve the efficiency of the system. Through reordering and pruning, an adaptive anti-brushing rule set is finally generated, allowing the system to flexibly respond to different user behaviors and risk conditions.

[0031] Reference Figure 2 This embodiment provides a smart verification code generation and anti-swiping system, including: Processing module 1, used for performing multi-modal generation processing on the verification code content to obtain original verification code data; Extraction module 2, used to extract multi-dimensional features of user interaction behaviors to obtain user behavior feature data; Fusion module 3, used for inputting the original verification code data and the user behavior feature data into the dual attention network for fusion processing to obtain fusion feature data; Calculation module 4, used to perform dynamic difficulty evaluation calculation based on fused feature data to obtain verification code difficulty adjustment parameters; An adjustment module 5 is used to adjust the difficulty of the original verification code data according to the verification code difficulty adjustment parameter to obtain the target verification code data; The analysis module 6 is used to perform multi-dimensional anti-brushing rule analysis based on the fused feature data and the target verification code data to generate an adaptive anti-brushing rule set.

[0032] In this embodiment, for the specific implementation of each unit in the above system embodiment, please refer to the above method embodiment, which will not be repeated here.

[0033] Reference Figure 3 In an embodiment of the present invention, a computer device is also provided. The computer device may be a server, and its internal structure may be as follows: Figure 3 As shown. The computer device includes a processor, a memory, a display screen, an input system, a network interface and a database connected through a system bus. Among them, the processor designed by the computer is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the corresponding data in this embodiment. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the above method is implemented.

[0034] Those skilled in the art will understand that Figure 3 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied.

[0035] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the above method is implemented. It can be understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.

[0036] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided by the present invention and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-speed data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM.

[0037] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, system, article or method including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, system, article or method. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, system, article or method including the element.

[0038] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A smart verification code generation and anti-swiping method, characterized in that: The following steps are involved: Perform multimodal generation processing on the verification code content to obtain original verification code data; Perform multi-dimensional feature extraction on user interaction behaviors to obtain user behavior feature data; Inputting the original verification code data and the user behavior feature data into a dual attention network for fusion processing to obtain fusion feature data; Perform dynamic difficulty evaluation calculation based on the fused feature data to obtain verification code difficulty adjustment parameters; Adjusting the difficulty of the original verification code data according to the verification code difficulty adjustment parameter to obtain target verification code data; A multi-dimensional anti-brushing rule analysis is performed based on the fused feature data and the target verification code data to generate an adaptive anti-brushing rule set.

2. The intelligent verification code generation and anti-swiping method according to claim 1 is characterized in that: The multi-modal generation process is performed on the verification code content to obtain the original verification code data, including: Randomly select a verification code type to obtain a verification code type identifier, wherein the verification code type includes letters, numbers, graphics, and arithmetic problems; Constructing a generative adversarial network model based on the verification code type identifier to obtain a verification code generator and a verification code discriminator; Inputting random noise data into the verification code generator to generate verification code content to obtain candidate verification code data, and performing readability evaluation and complexity calculation on the candidate verification code data to obtain verification code evaluation indicators; Inputting the verification code evaluation index into the verification code discriminator to perform authenticity judgment to obtain a verification code authenticity score, and iteratively optimizing the parameters of the verification code generator according to the verification code authenticity score to obtain an optimized verification code generator; The optimized verification code generator is used to generate an original verification code image, and interference processing is performed on the original verification code image, including adding interference lines, background noise points and character deformation, to obtain the original verification code data.

3. The intelligent verification code generation and anti-swiping method according to claim 1 is characterized in that: The multi-dimensional feature extraction of the user interaction behavior to obtain user behavior feature data includes: The user's operation behavior during the verification code filling process is captured in real time to obtain original interaction data, which includes mouse movement trajectory, click events, keyboard input mode and operation time interval; Performing time series analysis on the original interaction data, extracting time-related features, obtaining time series feature data, constructing a user operation behavior graph based on the original interaction data, and performing graph convolution processing on the user operation behavior graph to obtain graph structure feature data; Extracting local features of user behaviors based on the original interaction data to obtain local behavior feature data, and extracting long-term dependencies of user behaviors based on the time series feature data to obtain global behavior feature data; Performing multi-head attention fusion on the graph structure feature data, the local behavior feature data and the global behavior feature data to obtain fused behavior features; Combined with the context data of user history information, device information and IP address, the fused behavior features are subjected to time-attenuated weighted processing to obtain weighted behavior features, and the weighted behavior features are subjected to nonlinear transformation and dimensionality reduction processing to obtain the user behavior feature data.

4. The intelligent verification code generation and anti-swiping method according to claim 1, characterized in that: The step of inputting the original verification code data and the user behavior feature data into a dual attention network for fusion processing to obtain fused feature data includes: Inputting the original verification code data into a verification code encoder for feature extraction to obtain a verification code feature vector, wherein the verification code encoder comprises 5 convolutional layers, and each convolutional layer uses a ReLU activation function and batch normalization; Input the user behavior feature data into a behavior encoder for feature extraction to obtain a behavior feature vector, wherein the behavior encoder comprises three fully connected layers, each layer using a LeakyReLU activation function and dropout regularization; Performing self-attention calculation on the verification code feature vector to obtain the internal attention weight of the verification code, wherein the self-attention calculation includes linear transformation of the query matrix, the key matrix and the value matrix, and a softmax normalization operation; Performing weighted summation on the verification code feature vector based on the internal attention weight of the verification code to obtain enhanced verification code features; Performing cross-attention calculation on the behavior feature vector and the enhanced verification code feature to obtain a cross-modal attention weight, wherein the cross-attention calculation uses a multi-head attention mechanism including 8 attention heads; Weighting the enhanced verification code feature according to the cross-modal attention weight to obtain an attention-enhanced verification code feature; The attention-enhanced verification code feature and the behavior feature vector are concatenated and input into a feature fusion network including two fully connected layers, each layer using a tanh activation function, to obtain an initial fusion feature; The initial fused features are subjected to residual connection and layer normalization processing to obtain fused feature data, wherein the residual connection includes a short-circuit branch and a main branch including a 1x1 convolution.

5. The intelligent verification code generation and anti-swiping method according to claim 1, characterized in that: The dynamic difficulty evaluation calculation based on the fused feature data to obtain the verification code difficulty adjustment parameter includes: Performing feature decomposition on the fused feature data to obtain a user behavior feature subset and a verification code feature subset; Calculate a user proficiency index based on the user behavior feature subset to obtain a user proficiency score, wherein the user proficiency index includes verification code filling speed, operation fluency, and historical pass rate; Extracting verification code complexity features according to the verification code feature subset to obtain a verification code complexity score, wherein the verification code complexity features include a degree of character distortion, a number of interference elements, and background complexity; Inputting the user proficiency score and the verification code complexity score into a preset difficulty evaluation function to obtain an initial difficulty score; The initial difficulty score is weightedly adjusted based on the current security threat level of the system to obtain an adjusted difficulty score, and the adjusted difficulty score is normalized according to the historical verification code difficulty distribution to obtain a standardized difficulty score; Based on the standardized difficulty score, a most suitable difficulty adjustment strategy is selected from a predefined difficulty adjustment strategy set to obtain a difficulty adjustment scheme, and the difficulty adjustment scheme is converted into a specific verification code parameter adjustment instruction to obtain a verification code difficulty adjustment parameter.

6. The intelligent verification code generation and anti-swiping method according to claim 1, characterized in that: The step of adjusting the difficulty of the original verification code data according to the verification code difficulty adjustment parameter to obtain target verification code data includes: Parsing the verification code difficulty adjustment parameter to obtain a difficulty adjustment instruction set, wherein the difficulty adjustment instruction set includes character complexity, background interference, deformation degree and color contrast; According to the character complexity instruction in the difficulty adjustment instruction set, the characters in the original verification code data are subjected to stroke addition and subtraction operations to obtain verification code data after character complexity adjustment; Based on the background interference instruction in the difficulty adjustment instruction set, dynamic interference elements, including curves, dot matrix and geometric figures, are added to the verification code data after the character complexity is adjusted to obtain background-enhanced verification code data; According to the deformation degree instruction in the difficulty adjustment instruction set, the background enhanced verification code data is subjected to nonlinear transformation, including distortion, rotation and perspective transformation, to obtain deformed verification code data; Based on the color contrast instruction in the difficulty adjustment instruction set, color space adjustment is performed on the deformed verification code data, including hue shift, saturation change and brightness adjustment, to obtain color-enhanced verification code data; Performing local blurring processing on the color-enhanced verification code data, wherein the blurring area is dynamically determined according to the difficulty level, to obtain local blurred verification code data; The locally blurred verification code data is adaptively fused with the original verification code data, and the fusion weight is dynamically calculated according to the difficulty adjustment parameter to obtain the target verification code data.

7. The intelligent verification code generation and anti-swiping method according to claim 1, characterized in that: The performing multi-dimensional anti-brushing rule analysis based on the fused feature data and the target verification code data to generate an adaptive anti-brushing rule set includes: The fused feature data is segmented into time windows to obtain multiple time segment features, and the length of each time segment is dynamically adjusted according to the difficulty of the verification code; Constructing a user behavior sequence diagram based on the time segment features, topologically sorting the user behavior sequence diagram, and obtaining a behavior dependency relationship; Performing partition mapping on the target verification code data according to the behavior dependency relationship to obtain a verification code interaction area division result; Calculate the user operation entropy value based on the verification code interaction area division result to obtain a behavior complexity index, and compare the behavior complexity index with a preset threshold to obtain a preliminary anti-brushing determination result; Performing fuzzy reasoning on the preliminary anti-brushing determination result to obtain anti-brushing confidence, wherein the fuzzy reasoning is based on a predefined rule set and a membership function; The weights of the anti-brushing rules are dynamically adjusted according to the anti-brushing confidence to obtain updated rule weights, and the historical anti-brushing rules are reordered and pruned based on the updated rule weights to obtain the adaptive anti-brushing rule set.

8. An intelligent verification code generation and anti-swiping system, characterized in that: For implementing the steps of the method according to any one of claims 1 to 7, the system comprises: A processing module, used for performing multi-modal generation processing on the verification code content to obtain original verification code data; An extraction module is used to extract multi-dimensional features of user interaction behaviors to obtain user behavior feature data; A fusion module, used for inputting the original verification code data and the user behavior feature data into a dual attention network for fusion processing to obtain fused feature data; A calculation module, used to perform dynamic difficulty evaluation calculation based on the fused feature data to obtain a verification code difficulty adjustment parameter; An adjustment module, used for adjusting the difficulty of the original verification code data according to the verification code difficulty adjustment parameter to obtain target verification code data; The analysis module is used to perform multi-dimensional anti-brushing rule analysis based on the fused feature data and the target verification code data to generate an adaptive anti-brushing rule set.

9. A computer device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Safety processing method, device and equipment based on user behaviors

    CN111428231A

  • Large character set verification code attack defense method based on adversarial sample

    CN116665214A

  • Security protection method and device for system verification code

    CN118540132A

  • Image verification code generation method and system

    WO2016124066A1

Cited By

  • Cloud data security management method and device

    CN120372647A

  • Verification code intelligent identification and interaction method based on multi-modal large model

    CN120470578A

  • A verification code intelligent recognition and interaction method based on multimodal large model

    CN120470578B

  • Intelligent verification code system and method based on multi-mode dynamic context awareness

    CN120892883A

  • Image restoration method and device based on rotating verification code and storage medium

    CN121366087A