A verification adversarial method and system for social robots

By optimizing the slider trajectory using object detection models and Bézier curves, and combining adaptive image processing and semantic information extraction, the adaptability problem of social robots when facing multiple verification types is solved, improving the processing effect of sliders and image-based CAPTCHAs, and achieving higher operational realism and adaptability.

CN120995445BActive Publication Date: 2026-03-24THE FIRST RES INST OF MIN OF PUBLIC SECURITY
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-30
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Existing social robot verification adversarial systems are poorly adaptable to various verification types, struggle to accurately locate the target area of ​​slider-type verification codes, and lack intelligent information extraction mechanisms when processing SMS and email verification codes, making it difficult to adapt to the diverse changes in verification code content and format.

Method used

The target region and starting region of slider-type CAPTCHAs are accurately located using an object detection model. The initial slider trajectory is generated by combining Bézier curves and then compared and optimized with historical trajectory data. For image-type CAPTCHAs, image processing techniques such as adaptive grayscale processing, edge detection, and rotation correction are used. For SMS and email CAPTCHAs, information is obtained through API interfaces and content is extracted using a semantic target extraction model.

Benefits of technology

It improves the trajectory simulation of slider-type CAPTCHAs and the recognition accuracy of image-type CAPTCHAs, adapts to the diverse changes in CAPTCHA formats, and enhances the automation adaptability and operational realism of social robots.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120995445B_ABST
    Figure CN120995445B_ABST
Patent Text Reader

Abstract

The application discloses a kind of verification confrontation methods and systems for social robot.The method includes: collecting the interactive data of multiple social platforms in registration, login and verification process, and identifying verification type as image or slider class;For slider type verification code, target detection model is used to extract target area and starting area, and initial slider trajectory route is generated using Bezier curve and compared with historical trajectory library for optimization;For image type verification code, image processing technology is used to improve recognition accuracy;Through API docking virtual mobile phone service platform, receive SMS verification code, and use semantic target extraction model to extract email verification code;Store the registration data of each account.The application forms a dynamic closed-loop verification confrontation system, and improves the adaptability and operation concealment of social robot in complex verification environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a verification adversarial method for social robots, and also to a corresponding verification adversarial system, belonging to the field of data recognition technology. Background Technology

[0002] Driven by artificial intelligence technology, social robots are gradually becoming key players in various online services. Especially in scenarios such as automated registration, information exchange, public opinion monitoring, and data collection, social robots have broad application prospects. They can not only improve the efficiency of information flow but also support business intelligence analysis and play an important role in optimizing user services, thus possessing significant social value.

[0003] However, social bots face several challenges in operation. To prevent malicious operations and fake registrations, major social platforms have strengthened their identity verification mechanisms. They generally employ multiple verification methods, such as image-based CAPTCHAs, slider-based CAPTCHAs, SMS verification, and email verification, to restrict user behavior. While these verification mechanisms play a positive role in enhancing platform security, they also hinder the normal operation of social bots. Especially in legitimate automated application scenarios, these verification mechanisms implicitly increase the difficulty of interaction, creating a high barrier to entry.

[0004] Currently, most social bot verification adversarial systems have significant limitations. On the one hand, most of these systems can only handle single types of verification, such as image-based or slider-based CAPTCHAs, lacking the ability to uniformly identify and process multiple verification types, resulting in poor adaptability. On the other hand, when handling slider-based CAPTCHAs, some bypass methods fail to combine image recognition models for accurate target area localization, or simply employ simple trajectory simulation methods. This makes the generated trajectories lack the characteristics of realistic operation, making them easily identified and blocked by the platform. Furthermore, when handling SMS verification codes and email verification information, existing technologies mostly rely on fixed rules or manual configuration, lacking intelligent information extraction mechanisms and struggling to adapt to the diverse changes in CAPTCHA content and format. Summary of the Invention

[0005] The primary technical problem to be solved by this invention is to provide a verification adversarial method for social robots.

[0006] Another technical problem to be solved by the present invention is to provide a verification adversarial system for social robots.

[0007] To achieve the above-mentioned technical objectives, the present invention adopts the following technical solution:

[0008] According to a first aspect of the present invention, a verification adversarial method for social bots is provided, comprising the following steps:

[0009] S100: Collects interaction data from multiple social platforms during the registration, login, and verification processes. The interaction data includes verification code triggering conditions and verification types.

[0010] S200: Identify the verification type, which includes slider type;

[0011] S300: When the verification type is slider type, the target area and the starting area are extracted using the target detection model. Based on the coordinates of the target area and the starting area, the initial slider trajectory is generated using Bézier curves. The initial slider trajectory is compared with the historical trajectory dataset. Based on the comparison results, it is determined whether to adjust the initial slider trajectory. After adjustment, the final slider trajectory is determined.

[0012] S400: Retrieve information from the verification code;

[0013] S500: Stores registration data for each account.

[0014] Preferably, the steps for extracting the target region and the starting region using the object detection model include:

[0015] Based on the interaction data, obtain historical slider verification data, extract historical slider background images and historical slider block images, and establish a historical dataset.

[0016] The historical dataset was annotated, with the annotation targets including the gap area and the slider block;

[0017] The historical dataset is sampled according to a preset ratio to obtain a training subset and a test subset, an initial object detection model is obtained, and the initial object detection model is iteratively trained based on the training subset, and the object detection model after iterative training is evaluated based on the test subset.

[0018] If the confidence score of the target detection model after the current iteration is lower than that of the target detection model after the previous iteration, then the target detection model after the previous iteration is used as the target detection model; if the confidence score of the target detection model after the current iteration is greater than or equal to that of the target detection model after the previous iteration, then the magnitude of the change in the gradient direction of the target detection model is increased, and iterative training continues until the preset number of iterations is reached or the confidence score of the target detection model after the current iteration is lower than that of the target detection model after the previous iteration, and finally the target detection model is obtained.

[0019] Input the current slider graphic data into the target detection model, and extract the first and second detection boxes from the output results;

[0020] The target region is determined based on the first detection box, and the starting region is determined based on the second detection box.

[0021] Preferably, during the operation phase, the image of the slider to be identified is input into the trained target detection model; two detection boxes are marked in the model output: the first detection box corresponds to the gap area of ​​the verification code, which is used as the target area of ​​the slider; the second detection box corresponds to the initial position of the slider, which is used as the starting area; the center coordinates of these two areas are used as the key reference points for trajectory generation.

[0022] Set the center coordinates of the starting area as the starting point of the trajectory, draw a horizontal line with the starting point and a vertical line with the center point of the target area, and take the intersection of the horizontal and vertical lines as the ending point; randomly generate two offset points between the starting point and the ending point, and offset the offset points up and down by a predetermined number of pixels in the vertical coordinate direction to simulate the slight shaking that may occur in human hand operation.

[0023] By combining the starting point, two offset points, and the ending point, a smooth trajectory line with realistic operational characteristics is fitted using a Bézier curve.

[0024] The final initial slider trajectory is synthesized based on all trajectory points, which is used for subsequent comparison and adjustment.

[0025] Preferably, the initial slider trajectory is compared with the historical trajectory dataset, and the result of the comparison determines whether the initial slider trajectory should be adjusted. Specifically, this includes:

[0026] Obtain the first average overlap between the initial slider trajectory and the set of historical successfully verified trajectory routes; obtain the second average overlap between the initial slider trajectory and the set of historically failed verified trajectory routes;

[0027] When the first average overlap is greater than or equal to the second average overlap, it is determined that the initial slider trajectory will not be adjusted, and the initial slider trajectory will be used as the final slider trajectory. When the first average overlap is less than the second average overlap, it is determined that the initial slider trajectory needs to be adjusted, and the final slider trajectory will be determined after adjustment.

[0028] Ideally, after determining the final slider trajectory, the process also includes:

[0029] Based on a nonlinear velocity model, the sliding velocity between each adjacent trajectory point is determined.

[0030] Based on the positions of adjacent trajectory points on the final slider trajectory route, determine the set of maximum sliding speeds at corresponding positions in the historical successfully verified trajectory route set;

[0031] The slider verification operation is performed according to the final slider trajectory, the sliding speed between each adjacent trajectory point, and the maximum sliding speed; wherein, if the sliding speed exceeds the maximum sliding speed, the operation is performed at the maximum sliding speed.

[0032] According to a second aspect of the present invention, another verification adversarial method for social bots is provided, comprising the following steps:

[0033] S100: Collects interaction data from multiple social platforms during the registration, login, and verification processes. The interaction data includes verification code triggering conditions and verification types.

[0034] S200': Identify the verification type, which includes image types;

[0035] S300': When the verification type is image-based, the verification content is identified based on image processing; this includes the following sub-steps: S301: Convert the acquired color verification code image into a grayscale image; S302: Using any point in the grayscale image as the origin, perform Gaussian weighted average processing on the surrounding pixel area to dynamically calculate the pixel threshold of the area and obtain an optimized grayscale image; S303: Analyze the optimized grayscale image based on the edge detection algorithm to identify obvious structural edges in the image, thereby determining the possible contour area of ​​the verification code; S304: When the identified contour area is a text verification code, further image correction processing is performed; S305: If the verification code contour area is a graphic type, compare its extracted regional features with standard images in the graphic database to determine the graphic type or matching content of the current verification code;

[0036] S400: Retrieve information from the verification code;

[0037] S500: Stores registration data for each account.

[0038] Preferably, step S304 specifically includes:

[0039] The overall tilt angle of the CAPTCHA area is calculated by identifying the smallest bounding rectangle of each character block, and a rotation matrix is ​​constructed accordingly for rotation correction to ensure that the characters are arranged in a normal horizontal direction.

[0040] Extract the center coordinates of each character region and connect all the center points;

[0041] If the connecting lines exhibit a non-linear bending trend, it indicates that there is distortion in the character arrangement;

[0042] The connecting line is modeled based on polynomial fitting, and the character positions are aligned and translated according to the fitting results.

[0043] Preferably, in step S400, multiple virtual mobile phone service platforms are connected via API to receive and extract SMS messages in order to obtain information from the verification code.

[0044] Preferably, in step S400, the email account used for registration is accessed, and a semantic target extraction model is used to extract content from the email body or title to obtain information from the verification code.

[0045] According to a third aspect of the present invention, a verification adversarial system for social bots is provided, for executing the aforementioned verification adversarial method for social bots, comprising:

[0046] The data collection unit is configured to collect interaction data from multiple social platforms during the registration, login, and verification processes. The interaction data includes verification code triggering conditions and verification types.

[0047] The CAPTCHA recognition unit is configured to recognize verification types, including image types and slider types.

[0048] The SMS email processing unit is configured to connect to multiple virtual mobile phone service platforms via API to receive and extract SMS verification codes; or, it can connect to the email account used for registration and use a semantic target extraction model to extract content from the email body or title to obtain information from the verification code.

[0049] The account management unit is configured to store the registration data for each account.

[0050] Compared with the prior art, the present invention has the following technical effects:

[0051] (1) In the processing of slider-type CAPTCHAs, the target area and the starting area are accurately located by the target detection model, the initial slider trajectory is generated by combining the Bézier curve, and the trajectory is compared and optimized with the historical trajectory library to make the slider trajectory closer to the real user operation.

[0052] (2) In the processing of image-based CAPTCHAs, adaptive grayscale processing, Gaussian weighting, edge detection, rotation correction and polynomial fitting are used to improve the accuracy and applicability of CAPTCHA recognition.

[0053] (3) In terms of SMS and email verification code processing, the verification code is extracted by using a semantic target extraction model based on API connection to the virtual mobile phone service platform to adapt to the diverse changes in verification code format. Attached Figure Description

[0054] Figure 1 A structural block diagram of a verification adversarial system for social robots provided in the first embodiment of the present invention;

[0055] Figure 2 A flowchart of a verification adversarial method for social robots provided in the second embodiment of the present invention;

[0056] Figure 3 The flowchart illustrates a verification adversarial method for social robots, as provided in the third embodiment of the present invention. Detailed Implementation

[0057] The technical content of the present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.

[0058] The technical concept in this invention is to collect interaction data from multiple social platforms during registration, login, and verification processes, including CAPTCHA triggering conditions and verification types, to address the limitation of social robots facing different verification types with a single type. For slider-type CAPTCHAs, a target detection model is used to accurately locate the target and starting regions, and a highly realistic trajectory is generated using Bézier curves. Dynamic trajectory optimization further enhances the slider's realism. Simultaneously, a semantic target extraction model is used to extract text verification information, adapting to diverse formats, thus forming a dynamic closed-loop verification adversarial system. This improves the social robot's automation adaptability and operational realism.

[0059] First Embodiment

[0060] like Figure 1 As shown, the first embodiment of the present invention provides a verification adversarial system for social robots, comprising at least a data acquisition unit, a verification code recognition unit, an SMS / email processing unit, and an account management unit. Wherein,

[0061] The data collection unit is responsible for collecting all interaction data generated during the registration, login, and verification processes of multiple social platforms. This data explicitly includes the triggering conditions and type information of the verification code. Through the systematic collection and analysis of this interaction data, it provides key data support for subsequent identification and response to different verification code types, and enables dynamic adaptation to the platform's verification mechanism.

[0062] The CAPTCHA recognition unit is configured to recognize verification types. In one embodiment of the present invention, the verification types include image-based and slider-based CAPTCHAs. When the verification type is image-based, the CAPTCHA recognition unit recognizes the verification content based on image processing, using image processing algorithms to recognize characters, graphics, or puzzle content in the CAPTCHA. When the verification type is slider-based, the CAPTCHA recognition unit uses an object detection model to extract the target area and the starting area, and determines the initial slider trajectory based on the target area and the starting area. The initial slider trajectory is compared with a historical trajectory dataset, and the comparison result determines whether to adjust the initial slider trajectory. After adjustment, the final slider trajectory is determined. Specifically, the CAPTCHA recognition unit accurately identifies the target area and the starting area involved in the slider-based CAPTCHA using an object detection model, then constructs an initial sliding trajectory based on a Bézier curve, compares and analyzes the initial trajectory with typical trajectory data in the historical trajectory database, and if the difference is large or lacks "naturalness," the trajectory path is optimized based on the comparison result, thereby outputting a final slider trajectory that conforms to the characteristics of real user operation.

[0063] The SMS / email processing unit is configured to interface with multiple virtual mobile phone service platforms via API to receive and extract SMS verification codes. It is also configured to access the email account used for registration and utilize a semantic target extraction model to extract content from the email body or title. Specifically, the SMS / email processing unit has the capability to automatically receive and extract verification code information. This is achieved through API integration with multiple virtual mobile phone service platforms, enabling real-time acquisition of SMS verification codes. Simultaneously, the unit accesses the email account used for the registration process and uses a semantic target extraction model to intelligently extract the email title or body content, accurately retrieving the verification code data. Compared to traditional methods based on fixed rules, this approach offers greater versatility and content adaptability, capable of handling the variability of verification code formats.

[0064] The account management unit is configured to store the registration data of each account; specifically, the account management unit is used to uniformly store and manage the registration information of various social media platform accounts, including registration time, platform used, verification code processing records, etc., to provide a data foundation for the subsequent maintenance, use and management of accounts.

[0065] Compared with existing technologies, this invention improves the adaptability and operational stealth of social robots in complex verification environments by constructing a verification adversarial system that integrates data acquisition, multi-type CAPTCHA recognition and processing, CAPTCHA content extraction, and unified account management. Specifically, the acquisition unit obtains the conditions and verification types triggered by CAPTCHAs during registration, login, and verification processes on different social platforms, providing data support for subsequent recognition and simulation. In slider-type verification processing, the CAPTCHA recognition unit introduces a target detection model to accurately extract the slider's starting and target areas, and combines Bézier curves and historical trajectory data to generate highly realistic trajectory paths, enhancing the naturalness and robustness of the slider's simulated operation and reducing the risk of being identified as an anomaly. The SMS / email processing unit automatically receives CAPTCHAs by connecting to multiple virtual mobile phone service platforms via API and uses a semantic target extraction model to flexibly extract email content, effectively adapting to the diverse formats of CAPTCHAs. The account management unit stores and maintains registered accounts, facilitating subsequent tracking and batch management.

[0066] Second Embodiment

[0067] like Figure 2 As shown, the second embodiment of the present invention provides a verification adversarial method for social robots, which is implemented based on the verification adversarial system for social robots provided in the first embodiment, and includes at least the following steps:

[0068] S100: Collects interaction data from multiple social platforms during the registration, login, and verification processes. The interaction data includes verification code triggering conditions and verification types.

[0069] S200: Identify the verification type, which includes slider type.

[0070] S300: When the verification type is slider type, the target area and the starting area are extracted using the target detection model. Based on the coordinates of the target area and the starting area, the initial slider trajectory is generated using Bézier curves. The initial slider trajectory is compared with the historical trajectory dataset. Based on the comparison results, it is determined whether to adjust the initial slider trajectory and the slider trajectory is determined as the final route.

[0071] S400: Retrieve information from the verification code.

[0072] S500: Stores registration data for each account.

[0073] Furthermore, in step S300, when the verification type is a slider, the following sub-steps are included:

[0074] S311: The CAPTCHA recognition unit uses a target detection model to extract the target region and the starting region.

[0075] Specifically, the CAPTCHA recognition unit obtains historical slider verification data based on the interaction data, extracts the historical slider background image and historical slider block image, and establishes a historical dataset.

[0076] The historical dataset is annotated, with the annotation targets including the gap area and the slider block.

[0077] The historical dataset is sampled according to a preset ratio to obtain a training subset and a test subset. The CAPTCHA recognition unit obtains the initial target detection model, and iteratively trains the initial target detection model based on the training subset. The iteratively trained target detection model is evaluated based on the test subset.

[0078] If the confidence score of the target detection model trained in the current iteration is lower than the confidence score of the target detection model trained in the previous iteration, then the target detection model trained in the previous iteration will be used as the target detection model.

[0079] If the confidence level of the target detection model after the current iteration is greater than or equal to the confidence level of the target detection model after the previous iteration, the magnitude of the change in the gradient direction of the target detection model is increased, and iterative training continues until the preset number of iterations is reached or the confidence level of the target detection model after the current iteration is less than the confidence level of the target detection model after the previous iteration, and finally the target detection model is obtained.

[0080] The current slider image data is input into the object detection model, and the first and second detection boxes are extracted from the output. The first detection box is used to detect the gap region (slot). The object detection model identifies the location of the gap region in the CAPTCHA image and marks it with a bounding box (detection box). The coordinate information of this bounding box (such as the coordinates of the top left and bottom right corners) is used to determine the position of the gap in the image. The second detection box is used to detect the slider. The object detection model identifies the position of the draggable slider and marks it with another bounding box. The coordinate information of this bounding box is used to determine the initial position of the slider in the image.

[0081] The CAPTCHA recognition unit determines the target area based on the first detection box and the starting area based on the second detection box.

[0082] S312: The verification code recognition unit generates the initial slider trajectory route using Bézier curves based on the coordinates of the target area and the starting area.

[0083] Specifically, the verification code recognition unit takes the center of the starting area as the starting point and the vertically corresponding point of the center of the target area as the target point.

[0084] The verification code recognition unit randomly generates two offset points between the starting point and the target point, with the vertical coordinate of the offset points shifting up or down by ±5 to 15 pixels.

[0085] The CAPTCHA recognition unit determines the trajectory points using Bézier curves and obtains the initial slider trajectory route based on all trajectory points.

[0086] Specifically, historical slider background images and historical slider block images are extracted from historical interaction data, and a historical dataset containing a large number of samples is established. This historical dataset is then labeled to identify the locations of "gap regions" and "slider blocks" in the images, which are marked as "slot" and "slider," respectively. The dataset is divided into training and testing subsets according to a preset ratio. An initial object detection model is obtained and iteratively trained using the training set, while the performance of the training results is evaluated using the testing set. If the performance of the object detection model declines after training (e.g., confidence decreases), a previous, better-performing object detection model is used as a fallback. If performance improves, the adjustment magnitude of the object detection model in the gradient direction is further increased to accelerate convergence, until the required number of training iterations is met or performance stops improving. Finally, the optimal-performing object detection model is formed.

[0087] Bézier curves generate trajectories of acceleration changes (slow at the beginning → fast in the middle → slow at the end) through control points, perfectly replicating human operating characteristics, achieving physical-level simulation, and having strong anti-detection capabilities.

[0088] During the runtime phase, the slider image to be identified is input into the trained target detection model. Two detection boxes are marked in the model output: the first box corresponds to the gap area of ​​the verification code, serving as the target area of ​​the slider; the second box corresponds to the initial position of the slider, serving as the starting area. The center coordinates of these two areas are used as key reference points for trajectory generation. The center coordinates of the starting area are set as the starting point of the trajectory. A horizontal line is drawn from the starting point, and a vertical line is drawn from the center point of the target area. The intersection of the horizontal and vertical lines is the ending point. Two offset points are randomly generated between the starting and ending points, offset by a predetermined number of pixels (e.g., ±5 to 15 pixels, introducing a random offset mechanism to ensure a unique trajectory each time) in the vertical direction, simulating the slight tremors that may occur during human hand operation. Combining these four key points (starting point, two offset points, and ending point), a smooth trajectory line with realistic operation characteristics is fitted using a Bézier curve. All trajectory points are synthesized into the final initial slider trajectory line for subsequent comparison and adjustment.

[0089] S313: The verification code recognition unit compares the initial slider trajectory with the historical route dataset, and determines whether to adjust the initial slider trajectory based on the comparison results, thereby achieving continuous self-optimization.

[0090] It should be noted that the historical route dataset includes both historically successfully verified trajectory routes and historically failed verification trajectory routes.

[0091] The CAPTCHA recognition unit obtains the first average overlap between the initial slider trajectory and the set of historical successful verification trajectories, and also obtains the second average overlap between the initial slider trajectory and the set of historical failed verification trajectories.

[0092] When the first average overlap is greater than or equal to the second average overlap, the CAPTCHA recognition unit determines that the initial slider trajectory should not be adjusted and uses the initial slider trajectory as the final slider trajectory. When the first average overlap is less than the second average overlap, the CAPTCHA recognition unit determines that the initial slider trajectory needs to be adjusted, and the final slider trajectory is determined after adjustment.

[0093] S314: If the verification code recognition unit determines that the initial slider trajectory needs to be adjusted, specifically including:

[0094] The CAPTCHA recognition unit determines the adjustment area of ​​the initial slider trajectory. The adjustment area is the region in the initial slider trajectory where the overlap with the set of historical failed verification trajectories is higher than the overlap threshold. The CAPTCHA recognition unit determines the adjustment start point and adjustment end point of each adjustment area, and based on the adjustment start point and adjustment end point, it traverses the set of historical successful verification trajectories, and extracts routes from the set of historical successful verification trajectories to replace the adjustment area.

[0095] Specifically, the system includes a set of historically successfully validated trajectory routes (i.e., sliding trajectories that successfully bypassed validation) and a set of historically failed validation trajectory routes (i.e., sliding trajectories that failed to bypass validation). The average overlap of these two dimensions is calculated, referred to as the first average overlap and the second average overlap, respectively. Overlap can be measured based on the spatial overlap of trajectory point locations, such as the mean Euclidean distance between trajectory points or the proportion of similar path segments. If the first average overlap (i.e., similarity to successful trajectories) is higher than or equal to the second average overlap (i.e., similarity to failed trajectories), it indicates that the current trajectory is closer to successful samples, and this initial slider trajectory will be directly adopted as the final route. If the first average overlap is lower than the second average overlap, it indicates that the trajectory is more similar to failed samples, potentially posing a risk of platform identification and interception, triggering a trajectory optimization mechanism to adjust the current trajectory. Regions in the initial slider trajectory with a higher overlap than a preset threshold with historical failed verification trajectories are identified as adjustment areas, as these areas may exhibit obvious abnormal or repetitive characteristics. For each adjustment area, its start and end points are determined, i.e., the range of trajectory segments to be replaced. Then, trajectory segments with similar start and end points are searched in the set of historical successful verification trajectories to replace the current adjustment area. If no identical start and end points are found, the trajectory segment with the highest similarity value is used. This ensures that the adjusted trajectory more closely resembles real user behavior, thereby circumventing the platform's risk control detection.

[0096] S315: The verification code recognition unit determines the final slider trajectory.

[0097] S316: The CAPTCHA recognition unit determines the sliding speed between each adjacent trajectory point based on a nonlinear velocity model. The sliding speed is calculated using the following formula:

[0098]

[0099] Where Vt represents the sliding speed at point t between each adjacent trajectory point, t0 represents the midpoint between adjacent trajectory points, Vmax represents the maximum sliding speed, and k represents the rate of change of speed.

[0100] S317: The verification code recognition unit determines the set of maximum sliding speeds at corresponding positions in the historical successful verification trajectory route set based on the positions of adjacent trajectory points on the final slider trajectory route.

[0101] The maximum sliding speed is calculated using the following formula:

[0102]

[0103] Where N represents the number of trajectories in the historical successfully verified trajectory route set, and Vi represents the maximum sliding speed in the i-th historical successfully verified trajectory route.

[0104] S318: Execute the slider-type CAPTCHA operation according to the final slider trajectory obtained in steps S315 to S317, the sliding speed between each adjacent trajectory point, and the maximum sliding speed. If the sliding speed generated in step S316 exceeds the maximum sliding speed determined in step S317, the operation is executed at the maximum sliding speed.

[0105] In other words, a complete behavioral simulation needs to simultaneously satisfy two dimensions: path realism and velocity characteristic realism. This embodiment determines the final trajectory in step S315, generates each segment's velocity in step S316, obtains the maximum sliding velocity in step S317, and executes the specific operation in step S318. This process ensures that the trajectory meets the requirements in both path simulation (step S315) and velocity simulation (steps S316-S317), thereby achieving the core objective of "human-like operation."

[0106] If only the path is real (Bézier curve) but the speed is not real (such as uniform sliding), it is easily identified by the speed detection mechanism. The nonlinear speed model (step S316) simulates the human "slow-fast-slow" acceleration characteristics, and then step S317 uses historical data to constrain the speed upper limit to avoid outliers.

[0107] In one embodiment of the present invention, step S400 obtains the verification code information in two ways: First, it uses a preset API interface to simultaneously connect to multiple virtual mobile phone service platforms, listens for and receives SMS messages sent to a specified virtual number in real time, and then parses the SMS content to extract the numeric or alphanumeric verification code. Alternatively, for the email account used during login / registration, it employs a Transformer-based semantic target extraction model to scan and semantically match the email body and title character by character, automatically identifying and extracting the verification code field, thus fully covering both SMS verification code and email verification code scenarios.

[0108] Compared with existing technologies, this invention, in simulating slider-type CAPTCHAs, combines a target detection model (preferably YOLOv8, but not limited to it) with Bézier curves and introduces a trajectory comparison and optimization mechanism, effectively enhancing the naturalness of the trajectory and reducing the risk of being identified. It also employs a semantic target extraction model (preferably Transformer, but not limited to it) to extract email content, improving the intelligence and generalization ability of CAPTCHA recognition. This enhances the CAPTCHA adversarial system's ability to resist diverse verification mechanisms and provides a guarantee for the stable implementation of legitimate automated operations in scenarios such as public opinion analysis, information gathering, and platform testing.

[0109] This invention, through the construction and training of a target detection model, achieves high-precision automatic identification of key areas in slider-type CAPTCHAs, exhibiting stronger robustness and adaptability compared to traditional image template matching methods. Simultaneously, it introduces a trajectory generation mechanism based on Bézier curves, simulating a sliding trajectory closer to natural human operation habits by appropriately setting offset points and path curves, thus enhancing the realism and concealment of the simulated operation. While maintaining technical accuracy, it improves the simulation degree of operation and enhances the breakthrough capability of slider verification mechanisms.

[0110] Furthermore, this embodiment of the invention establishes a closed-loop optimization structure between the slider trajectory generation process and historical data feedback through overlap calculation and trajectory segment replacement. Compared to traditional methods that use trajectory statically after a single trajectory generation, this method can dynamically learn and integrate historical verification experience, achieving a balance between trajectory authenticity and success rate, making it suitable for platform environments with constantly upgraded protection mechanisms. This improves the slider trajectory's ability to disguise itself and its verification pass rate.

[0111] This invention integrates nonlinear velocity modeling with historical successful trajectory data analysis to achieve highly human-like simulation of slider behavior over time, avoiding the exposure of "mechanical characteristics" such as uniform speed and smooth trajectory to the platform verification system. Especially in various social platforms with trajectory detection and behavior analysis mechanisms, it enhances the concealment and pass rate of the sliding trajectory, further improving the stability and intelligence of the entire verification and adversarial system.

[0112] Third Embodiment

[0113] like Figure 3 As shown, the third embodiment of the present invention provides a verification adversarial method for social robots, which is implemented based on the verification adversarial system for social robots provided in the first embodiment, and includes at least the following steps:

[0114] S100: Collects interaction data from multiple social platforms during the registration, login, and verification processes. The interaction data includes verification code triggering conditions and verification types.

[0115] S200': Identify the verification type, which includes image types.

[0116] S300': When the verification type is image type, the verification content is identified based on image processing.

[0117] If you click to select a text-based verification method (interactive), then the following sub-steps will be taken:

[0118] a. Recognize all clickable text / icons using OCR;

[0119] b. Parse the verification command (e.g., "Click the Xth character");

[0120] c. Generate a random click sequence (coordinates + time sequence) that conforms to human operation characteristics, where coordinates represent the location information of the click and time sequence represents the time order of the click, in order to simulate human operation and avoid detection by anti-robot systems (random delays or paths can be added);

[0121] d. Simulate the click operation by following this click sequence to complete the verification.

[0122] S400: Retrieve information from the verification code.

[0123] S500: Stores registration data for each account.

[0124] Furthermore, in step S300', when the verification type is an image, the following sub-steps are included:

[0125] S301: Convert the acquired color verification code image into a grayscale image to reduce the computational complexity of image processing.

[0126] S302: Taking any point in the grayscale image as the origin, perform Gaussian weighted average processing on the surrounding pixel area to dynamically calculate the pixel threshold of the area, so as to adapt to the image characteristics of different lighting, contrast and other interference factors, and obtain an optimized grayscale image.

[0127] S303: The processed image is analyzed based on edge detection algorithms (such as Canny edge detection) to identify obvious structural edges in the image, thereby determining the contour region where the CAPTCHA may exist.

[0128] S304: When the identified contour region is a text verification code, further image correction processing is performed. This includes the following sub-steps: Calculate the overall tilt angle of the verification code region by identifying the minimum bounding rectangle of each character block, and construct a rotation matrix accordingly for rotation correction to ensure the characters are arranged in a normal horizontal direction; extract the center coordinates of each character region and connect all center points; if the connecting line exhibits a non-linear bending trend, it indicates a distortion in the character arrangement. Model this connecting line based on polynomial fitting, and align and translate the character positions according to the fitting results to make the characters as structurally neat as possible.

[0129] S305: If the outline area of ​​the verification code is a graphic type (such as graphic selection, pattern matching, etc.), the extracted regional features are compared with the standard images in the graphic database to determine the graphic type or matching content of the current verification code.

[0130] In one embodiment of the present invention, step S400 obtains the verification code information in two ways: First, it uses a preset API interface to simultaneously connect to multiple virtual mobile phone service platforms, listens for and receives SMS messages sent to a specified virtual number in real time, and then parses the SMS content to extract the numeric or alphanumeric verification code. Alternatively, for the email account used during login / registration, it employs a Transformer-based semantic target extraction model to scan and semantically match the email body and title character by character, automatically identifying and extracting the verification code field, thus fully covering both SMS verification code and email verification code scenarios.

[0131] Compared with existing technologies, this invention directly utilizes image processing and geometric modeling techniques such as adaptive grayscale processing, Gaussian weighting, edge detection, rotation correction, and polynomial fitting in image-based CAPTCHA processing. First, the color CAPTCHA image is converted to grayscale. Then, a Gaussian weighted average is applied to local pixels to dynamically calculate the threshold. Next, edge detection is used to locate character or graphic outlines. If a text CAPTCHA is detected, the overall tilt angle is calculated using the minimum bounding rectangle, and a rotation matrix is ​​constructed to complete rotation correction. Then, the character center coordinates are extracted, and nonlinear distortion is corrected using polynomial fitting to restore the character arrangement to a horizontal state. If the CAPTCHA is a graphic, the extracted regional features are compared with standard images in the graphic database to determine the graphic category or matching content. This process exhibits higher robustness in image distortion correction and structure restoration compared to traditional character recognition methods, effectively addressing complex interference such as tilt, distortion, and nonlinear arrangement. Simultaneously, the graphic matching mechanism expands the CAPTCHA adversarial system's ability to recognize non-text CAPTCHAs, improving recognition accuracy, applicability, and general intelligence.

[0132] It should be noted that the above embodiments are merely illustrative examples. The technical solutions of the various embodiments can be combined, and the order of the steps can be changed, all of which are within the protection scope of this invention.

[0133] The verification and adversarial method and system for social robots provided by this invention have been described in detail above. Any obvious modifications made by those skilled in the art without departing from the essence of this invention will constitute an infringement of the patent rights of this invention and will incur corresponding legal liability.

Claims

1. A verification adversarial method for social bots, characterized in that, Includes the following steps: S100: Collects interaction data from multiple social platforms during the registration, login, and verification processes. The interaction data includes verification code triggering conditions and verification types. S200: Identify the verification type, which includes slider type; S300: When the verification type is slider type, the target area and the starting area are extracted using an object detection model. Based on the coordinates of the target area and the starting area, an initial slider trajectory is generated using Bézier curves. The initial slider trajectory is compared with the historical trajectory dataset. Based on the comparison results, it is determined whether to adjust the initial slider trajectory. After adjustment, the final slider trajectory is determined. Then, based on a nonlinear velocity model, the sliding speed between each adjacent trajectory point is determined. Based on the position of the adjacent trajectory points in the final slider trajectory, the maximum sliding speed set at the corresponding position in the historical successful verification trajectory set is determined. The slider verification operation is performed according to the final slider trajectory, the sliding speed between each adjacent trajectory point, and the maximum sliding speed. If the sliding speed exceeds the maximum sliding speed, the operation is performed according to the maximum sliding speed. S400: Retrieve information from the verification code; S500: Stores registration data for each account. During the operation phase, the image of the slider to be identified is input into the trained target detection model; two detection boxes are marked in the model output: the first detection box corresponds to the gap area of ​​the verification code, which is used as the target area of ​​the slider; the second detection box corresponds to the initial position of the slider, which is used as the starting area; the center coordinates of these two areas are used as the key reference points for trajectory generation. Set the center coordinates of the starting area as the starting point of the trajectory, draw a horizontal line with the starting point and a vertical line with the center point of the target area, and take the intersection of the horizontal and vertical lines as the ending point; randomly generate two offset points between the starting point and the ending point, and offset the offset points up and down by a predetermined number of pixels in the vertical coordinate direction to simulate the slight shaking that may occur in human hand operation. By combining the starting point, two offset points, and the ending point, a smooth trajectory line with realistic operational characteristics is fitted using a Bézier curve. The final initial slider trajectory is synthesized based on all trajectory points, which is used for subsequent comparison and adjustment.

2. The verification adversarial method for social robots as described in claim 1, characterized in that, The steps for extracting the target region and the starting region using an object detection model specifically include: Based on the interaction data, obtain historical slider verification data, extract historical slider background images and historical slider block images, and establish a historical dataset. The historical dataset was annotated, with the annotation targets including the gap area and the slider block; The historical dataset is sampled according to a preset ratio to obtain a training subset and a test subset, an initial object detection model is obtained, and the initial object detection model is iteratively trained based on the training subset, and the object detection model after iterative training is evaluated based on the test subset. If the confidence score of the target detection model after the current iteration is lower than that of the target detection model after the previous iteration, then the target detection model after the previous iteration is used as the target detection model; if the confidence score of the target detection model after the current iteration is greater than or equal to that of the target detection model after the previous iteration, then the magnitude of the change in the gradient direction of the target detection model is increased, and iterative training continues until the preset number of iterations is reached or the confidence score of the target detection model after the current iteration is lower than that of the target detection model after the previous iteration, and finally the target detection model is obtained. Input the current slider graphic data into the target detection model, and extract the first and second detection boxes from the output results; The target region is determined based on the first detection box, and the starting region is determined based on the second detection box.

3. The verification adversarial method for social robots as described in claim 1, characterized in that, The initial slider trajectory is compared with the historical trajectory dataset. Based on the comparison results, it is determined whether the initial slider trajectory needs to be adjusted. Specifically, this includes: Obtain the first average overlap between the initial slider trajectory and the set of historical successfully verified trajectory routes; obtain the second average overlap between the initial slider trajectory and the set of historically failed verified trajectory routes; When the first average overlap is greater than or equal to the second average overlap, it is determined that the initial slider trajectory will not be adjusted, and the initial slider trajectory will be used as the final slider trajectory. When the first average overlap is less than the second average overlap, it is determined that the initial slider trajectory needs to be adjusted, and the final slider trajectory will be determined after adjustment.

4. The verification adversarial method for social robots as described in claim 1, characterized in that, In step S400, multiple virtual mobile phone service platforms are connected via API to receive and extract SMS messages in order to obtain information from the verification code.

5. The verification adversarial method for social robots as described in claim 1, characterized in that, In step S400, the email account used for registration is accessed, and the semantic target extraction model is used to extract the content of the email body or title to obtain the information in the verification code.

6. A verification adversarial method for social bots, characterized in that, Includes the following steps: S100: Collects interaction data from multiple social platforms during the registration, login, and verification processes. The interaction data includes verification code triggering conditions and verification types. S200': Identify the verification type, which includes image types; S300': When the verification type is image-based, the verification content is identified based on image processing; this includes the following sub-steps: S301: Convert the acquired color verification code image into a grayscale image; S302: Using any point in the grayscale image as the origin, perform Gaussian weighted average processing on the surrounding pixel area to dynamically calculate the pixel threshold of the area and obtain an optimized grayscale image; S303: Analyze the optimized grayscale image based on the edge detection algorithm to identify obvious structural edges in the image, thereby determining the possible contour area of ​​the verification code; S304: When the identified contour area is a text verification code, further image correction processing is performed; S305: If the verification code contour area is a graphic type, compare its extracted regional features with standard images in the graphic database to determine the graphic type or matching content of the current verification code; S400: Retrieve information from the verification code; S500: Stores registration data for each account; Specifically, step S304 includes: The overall tilt angle of the CAPTCHA area is calculated by identifying the smallest bounding rectangle of each character block, and a rotation matrix is ​​constructed accordingly for rotation correction to ensure that the characters are arranged in a normal horizontal direction. Extract the center coordinates of each character region and connect all the center points; If the connecting lines exhibit a non-linear bending trend, it indicates that there is distortion in the character arrangement; The connecting line is modeled based on polynomial fitting, and the character positions are aligned and translated according to the fitting results.

7. The verification adversarial method for social robots as described in claim 5, characterized in that, In step S400, multiple virtual mobile phone service platforms are connected via API to receive and extract SMS messages in order to obtain information from the verification code.

8. The verification adversarial method for social robots as described in claim 5, characterized in that, In step S400, the email account used for registration is accessed, and the semantic target extraction model is used to extract the content of the email body or title to obtain the information in the verification code.

9. A verification adversarial system for social robots, used to implement the verification adversarial method for social robots according to any one of claims 1 to 8, characterized in that, include: The data collection unit is configured to collect interaction data from multiple social platforms during the registration, login, and verification processes. The interaction data includes verification code triggering conditions and verification types. The CAPTCHA recognition unit is configured to recognize verification types, including image types and slider types. The SMS email processing unit is configured to connect to multiple virtual mobile phone service platforms via API to receive and extract SMS verification codes; or, it can connect to the email account used for registration and use a semantic target extraction model to extract content from the email body or title to obtain information from the verification code. The account management unit is configured to store the registration data for each account.

Citation Information

Patent Citations

  • A verification code identification input method and system based on sliding verification

    CN108985041A

  • Man-machine recognition method and device, sliding block verification method and device, medium, and equipment

    CN113553568A