Human verification method, apparatus, electronic device, storage medium and computer program product

By randomly generating starting and path points in the human-machine verification image area, and using the de Casteljau algorithm to calculate Bézier curves to generate complex trajectories, the dynamic image responds to user click events, solving the problem of low recognition rate in traditional human-machine verification and improving recognition accuracy and user experience.

WO2025175835A9PCT designated stage Publication Date: 2025-10-23CHINA MOBILEHANGZHOUINFORMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/131368
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-02-20
Filing Date
2024-11-11
Publication Date
2025-10-23

AI Technical Summary

Technical Problem

Existing human-machine verification methods have low recognition rates, traditional CAPTCHAs are easily cracked by machines, and the user experience is poor.

Method used

Multiple starting points are randomly generated in the human-machine verification image area. The path points of the motion trajectory are determined based on the starting points to generate dynamic images. Human-machine verification is performed in response to user click events. The de Casteljau algorithm is used to calculate Bézier curves to generate complex trajectories and confuse the trajectory motion to increase the difficulty.

Benefits of technology

It improved the recognition rate of human-machine verification, increased the difficulty of machine recognition, and enhanced the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024131368_23102025_PF_FP_ABST
    Figure CN2024131368_23102025_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of computers. Provided are a human verification method, an apparatus, an electronic device, a storage medium and a computer program product. The method comprises: determining a plurality of starting points in a human verification image area, any starting point corresponding to one motion trajectory; on the basis of the starting points, determining path points of each motion trajectory, any motion trajectory comprising a plurality of path points; on the basis of the plurality of path points, generating a dynamic image of the plurality of motion trajectories; and, responding to a click event of a user on the basis of the dynamic image, and performing human verification on the basis of the click event, the click event representing a selection of the user with respect to the motion trajectories. The present application determines whether an operator is a real person or a bot by means of random generation of a plurality of motion trajectories, thereby improving the recognition rate of human verification.
Need to check novelty before this filing date? Find Prior Art

Description

Human-computer verification method and device, electronic equipment, storage medium and computer program product

[0001] Cross-reference of related applications

[0002] The present application is based on the Chinese patent application No. 202410189603.4, filed on February 20, 2024, and claims priority to the Chinese patent application, the entire contents of which are incorporated herein by reference. TECHNICAL FIELD

[0003] The present application relates to the technical field of computers, and relates to a human-computer verification method and device, electronic equipment, storage medium and computer program product. BACKGROUND

[0004] With the rapid development of computer technology, artificial intelligence and machine learning, more and more network security problems have also arisen, one of the main problems being how to resist illegal requests from automated tools and robots. In order to solve this problem, human-computer identification technology has emerged. Human-computer identification technology refers to the use of computer programs to identify the differences between humans and machines, thereby preventing illegal requests from automated tools and robots. Human-computer identification technology is a product of network security problems, and its development aims to protect the security of network systems and the privacy of users, and to provide users with more convenient and secure network services.

[0005] Traditional human-computer verification methods include picture verification codes, sliding verification codes and SMS voice verification codes. Among them, picture verification codes increase the difficulty of cracking by increasing the difficulty of recognition, but algorithms based on deep learning can surpass the performance of normal people in picture recognition, so that traditional verification codes cannot effectively identify humans and computers. Sliding verification codes are limited by user operations and cannot generate overly complex motion trajectories, thereby disrupting the user experience and being easily cracked by machines simulating sliding trajectories. SMS voice verification codes need to be sent in plain text and have relatively simple and fixed content, which can be easily intercepted and captured by hackers, thereby being cracked. Therefore, the low recognition rate of human-computer verification has become a problem that needs to be solved.

[0006] SUMMARY

[0007] The embodiments of the present application provide a human-computer verification method, device, electronic equipment, storage medium and computer program product to solve the problem of low recognition rate of human-computer verification in the prior art.

[0008] The embodiments of the present application provide a human-computer verification method, comprising:

[0009] determining a plurality of starting points in a human-computer verification picture area; wherein any starting point corresponds to a motion trajectory;

[0010] determine a path point of each of the motion trajectories based on the starting point; wherein any of the motion trajectories comprises a plurality of path points;

[0011] generate a dynamic image of the plurality of motion trajectories based on the plurality of path points;

[0012] perform human-computer verification based on the click event of the user based on the dynamic image; wherein the click event represents the selection of the motion trajectory by the user.

[0013] In one embodiment, the determining a plurality of starting points in the human-computer verification picture area comprises:

[0014] randomly select a point from the human-computer verification picture area as an initial starting point, and add the initial starting point to a sample point set;

[0015] randomly select a first target point from the sample point set, and generate a target region with the first target point as the center and a first set distance as the radius;

[0016] determine at least one candidate point from the target region, and determine the distance between the candidate point and each sample point in the sample point set;

[0017] if the distance is greater than a second set distance, add the candidate point to the sample point set;

[0018] if the number of sample points in the sample point set is greater than or equal to a set number, the sample points in the sample point set are used as the starting points.

[0019] In one embodiment, the determining a path point of each of the motion trajectories based on the starting point comprises:

[0020] select any of the starting points as a first target starting point of a following trajectory, and select any of the starting points as a second target starting point; wherein the following trajectory is the motion trajectory corresponding to the first target starting point;

[0021] randomly select a second target point from the perpendicular bisector of a first line segment; wherein the first line segment is the connecting line segment of the first target starting point and the second target starting point;

[0022] use the vertex of the perpendicular line of a second line segment as a control point; wherein the second line segment is the connecting line segment of the first target starting point and the second target point; and the length of the perpendicular line is greater than a set length;

[0023] determine a path point of each of the motion trajectories based on the control point.

[0024] In one embodiment, the generating the dynamic image of all the motion trajectories based on the path points comprises:

[0025] controlling the motion trajectories to move between the path points and to confuse the following trajectory with all other motion trajectories; wherein the other motion trajectories are motion trajectories other than the following trajectory; the number of path points of all the motion trajectories is the same, and the time interval of the motion trajectories moving between the path points is the same;

[0026] after the confusion is completed, controlling each motion trajectory to move to a terminal point to stop and disappear, to generate the dynamic image.

[0027] In one embodiment, the confusing the following trajectory with all other motion trajectories comprises:

[0028] controlling the following trajectory and each of the other motion trajectories to move to the second target point, to complete the confusion of the following trajectory with all other motion trajectories.

[0029] In one embodiment, the determining the path points of each of the motion trajectories based on the control points comprises:

[0030] determining the number of recursive operations of the path points based on the number of control points;

[0031] determining the path points of each of the motion trajectories based on the number of control points, the number of recursive operations and a preset parameter.

[0032] In one embodiment, the responding to a click event of a user based on the dynamic image and performing human-computer verification based on the click event comprises:

[0033] displaying the dynamic image and detecting a click event based on the dynamic image;

[0034] if the click event is a click on the following trajectory, it is determined that the user performs the click operation;

[0035] if the click event is not a click on the following trajectory, it is determined that the machine performs the click operation.

[0036] Embodiments of the present application provide a human-computer verification device, comprising:

[0037] a starting point determination module configured to determine a plurality of starting points in a human-computer verification picture area; wherein any of the starting points corresponds to a motion trajectory;

[0038] a path point determination module configured to determine a path point of each of the motion trajectories based on the start point; wherein any of the motion trajectories comprises a plurality of path points;

[0039] a dynamic image generation module configured to generate a dynamic image of the motion trajectories based on the plurality of path points;

[0040] a human-computer verification module configured to perform human-computer verification based on the dynamic image in response to a click event of a user, wherein the click event represents a selection of the motion trajectories by the user.

[0041] Embodiments of the present application provide an electronic device, comprising a processor and a memory storing a computer program, wherein the processor implements the steps of the human-computer verification method of the first aspect when executing the program.

[0042] Embodiments of the present application provide a non-transitory computer-readable storage medium, which stores a computer program, wherein the computer program is executed by a processor to implement the steps of the human-computer verification method of the first aspect.

[0043] Embodiments of the present application provide a computer program product, comprising a computer program, wherein the computer program is executed by a processor to implement the steps of the human-computer verification method of the first aspect.

[0044] The human-computer verification method, device, electronic device, storage medium and computer program product provided by the embodiments of the present application determine a plurality of start points in a human-computer verification picture area; any start point corresponds to a motion trajectory; path points of each motion trajectory are determined based on the start points; any motion trajectory comprises a plurality of path points; a dynamic image of the motion trajectories is generated based on the plurality of path points; human-computer verification is performed based on a click event of a user in response to the dynamic image; and the click event represents a selection of the motion trajectories by the user. The embodiments of the present application determine whether an operator is a human or a machine by randomly generating a plurality of motion trajectories, thereby improving the recognition rate of human-computer verification. BRIEF DESCRIPTION OF DRAWINGS

[0045] In order to more clearly illustrate the technical solutions of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can also obtain other drawings according to these drawings without creative labor.

[0046] FIG. 1 is a flowchart of a human-computer verification method according to an embodiment of the present application;

[0047] FIG. 2 is a schematic diagram of start points of each motion trajectory according to an embodiment of the present application;

[0048] FIG. 3 is a schematic diagram of a motion trajectory according to an embodiment of the present application;

[0049] FIG. 4 is a schematic diagram of motion trajectory confusion according to an embodiment of the present application;

[0050] FIG. 5 is a flowchart of a method of human-computer verification according to an embodiment of the present application;

[0051] FIG. 6 is a schematic diagram of a structure of a human-computer verification device according to an embodiment of the present application;

[0052] FIG. 7 is a schematic diagram of a structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0053] To make the objectives, technical solutions, and advantages of the present application clearer, the following will be combined with the accompanying drawings for a clear and complete description of the technical solutions of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the scope of protection of the present application.

[0054] FIG. 1 is a flowchart of a method of human-computer verification according to an embodiment of the present application. Referring to FIG. 1, the present application provides a method of human-computer verification, which can include:

[0055] Step 100, determining a plurality of starting points in a human-computer verification picture area.

[0056] The present application dynamically draws a plurality of complex motion trajectories in the human-computer verification picture area based on the form of the picture verification code, and all the motion trajectories have the same morphological characteristics. The motion trajectory can be understood as a path, and each motion trajectory corresponds to a starting point. Therefore, the starting point of the motion trajectory needs to be determined in advance.

[0057] In the human-computer verification picture area, a plurality of starting points are determined. For example, referring to FIG. 2, a plurality of starting points are randomly generated on the human-computer verification picture area, wherein the starting points are uniformly distributed in the human-computer verification picture area, and any two starting points are not repeated. The starting point exists in the form of coordinates, so the starting point can be understood as a starting coordinate point. All the motion trajectories have a same identification head and a same tail, which are used to actually move on the picture and help the user to judge the actual motion direction. The motion trajectory is shown in FIG. 3.

[0058] Step 200, determining a path point of each motion trajectory based on the starting point.

[0059] Any one of the motion trajectories comprises a plurality of path points, wherein the path points can be understood as intermediate coordinate points, which refer to each position point in the motion process of the trajectory. In the human-computer verification process, each motion trajectory passes through a series of path points, and the path points determine the shape and motion path of the trajectory.

[0060] After determining the starting points of the motion trajectories, the path points of each motion trajectory are determined based on the starting points. For example, the de Casteljau algorithm is used to calculate the intermediate coordinate points on the Bezier curve, i.e., the path points, according to the control points and the parameter t. For example, the control points are determined based on the starting points, and the control points are continuously interpolated recursively to calculate the intermediate coordinate points on the curve. Each recursion will split the control points according to a certain proportion, and calculate new intermediate coordinate points. This process is repeated multiple times until a preset accuracy or calculation times is reached.

[0061] Step 300, based on a plurality of path points, generating a dynamic image of a plurality of motion trajectories.

[0062] After determining the path points of each motion trajectory, the motion trajectory is controlled to move between the path points, and the generated motion trajectory is generated into a Graphics Interchange Format (GIF) picture or a video animation. The GIF picture will contain multiple frames of images, and each frame of image describes the state of a certain moment in the motion trajectory movement process. When these frames of images are played continuously at a certain speed, an animation is formed, which shows the whole trajectory movement process. The video animation refers to an animation effect presented in the form of a video. The video contains the complete trajectory movement process, and shows the movement process of the trajectory from the starting point to the final position in continuous pictures.

[0063] Step 400, based on the dynamic image, responding to a click event of a user, and performing human-computer verification based on the click event.

[0064] After generating the dynamic image, the dynamic image is displayed, and a click event based on the dynamic image is detected, wherein the click event represents the selection of the motion trajectory by the user; if the click event is a click following trajectory, it is judged that the user performs the click operation; if the click event is a non-click following trajectory, it is judged that the machine performs the click operation.

[0065] For example, the client (or front end) displays the moving process of each motion trajectory, and when the GIF picture or video animation is played to the end, all motion trajectories stop and disappear, and a click button is generated at the position where each motion trajectory disappears. The user needs to click the button to select the disappearing position. The client uploads the user's selection result to the server (or back-end server), and finally determines whether it is a natural person or a machine according to the selection result. If the position of the button clicked by the user is consistent with the disappearing position of the follow-up trajectory recorded by the server, it is determined to be a natural person, which means that the user successfully observes and clicks the position consistent with the motion trajectory, indicating that the user's selection of the motion trajectory is based on visual observation. If the position of the button clicked by the user is inconsistent with the disappearing position of the follow-up trajectory recorded by the server, it is determined to be a machine, which means that the user does not accurately observe and follow the motion trajectory, or clicks the operation through other ways, rather than based on visual observation of the motion trajectory.

[0066] The method for human-computer verification provided by the embodiments of the present application determines a plurality of starting points in the human-computer verification picture area; each starting point corresponds to a motion trajectory; based on the starting points, path points of each motion trajectory are determined; any motion trajectory includes a plurality of path points; based on the path points, a dynamic image of all motion trajectories is generated; a click event of a user is obtained based on the dynamic image, and human-computer verification is performed based on the click event; the click event represents the user's selection of the motion trajectory. The present application determines whether the operator is a real person or a machine by randomly generating a plurality of motion trajectories, thereby improving the recognition rate of human-computer verification.

[0067] Based on the above embodiments, the determination of a plurality of starting points in the human-computer verification picture area includes:

[0068] Step 111: randomly selecting a point from the human-computer verification picture area as an initial starting point, and adding the initial starting point to a sample point set;

[0069] Step 112: randomly selecting a first target point from the sample point set, and generating a target area with the first target point as the center and a first set distance as the radius;

[0070] Step 113: determining at least one candidate point from the target area, and determining the distance between the candidate point and each sample point in the sample point set;

[0071] Step 114: if the distance is greater than a second set distance, the candidate point is added to the sample point set;

[0072] Step 115: if the number of sample points in the sample point set is greater than or equal to a set number, the sample points in the sample point set are used as the starting points.

[0073] The server randomly generates multiple starting points on the man-machine verification picture area, wherein the starting points need to be uniformly distributed in the man-machine verification picture area, and any two starting points cannot be repeated. Therefore, the following method can be used to randomly generate multiple starting points:

[0074] Step one: divide the man-machine verification picture area into several small areas, wherein there is at most one sampling point, i.e. a starting point, in each small area.

[0075] Step two: randomly select a point in each small area as a starting point (i.e. an initial starting point), add it to the sampling point set, and mark the area around it as occupied.

[0076] Step three: randomly select a point (i.e. a first target point) from the sampling point set, generate a target area with the first target point as the center and a first set distance as the radius, generate a candidate point in the target area, and check whether the candidate point meets the minimum distance (i.e. a second set distance) requirement with each sampling point in the sampling point set. The minimum distance is set to ensure that the generated starting points are separated from each other, avoiding being too close or overlapping. By limiting the minimum distance, the uniform distribution of starting points on the man-machine verification picture area can be ensured, and the reliability and accuracy of verification can be improved. If the distance between the candidate point and other sampling points is greater than the minimum distance, it is considered to meet the requirement, and the candidate point can be added to the sampling point set. If the distance between the candidate point and other sampling points is less than or equal to the minimum distance, it is considered not to meet the requirement, and the candidate point needs to be regenerated to ensure that the finally generated starting points meet the requirements. This processing method can ensure that the generated starting points are uniformly distributed on the whole man-machine verification picture area, and improve the difficulty and security of verification.

[0077] Step four: repeat the candidate point generation process until the sampling point set reaches the preset size, i.e. the number of sampling points in the sampling point set is greater than or equal to the set data. Then, the sampling points in the sampling point set are used as the starting points in each small area.

[0078] The embodiments of the present application can increase the difficulty and diversity of verification by randomly generating multiple starting coordinate points and ensuring that they do not overlap, making it difficult for automated programs to guess or simulate the verification process, thereby improving the security of verification.

[0079] Based on the above embodiments, the path points of each motion trajectory are determined based on the starting points, including:

[0080] Step 211, selecting any starting point as a first target starting point of a following trajectory, and selecting any starting point as a second target starting point; wherein the following trajectory is the motion trajectory corresponding to the first target starting point;

[0081] Step 212, randomly selecting a second target point from the perpendicular line of the first line segment; wherein the first line segment is the connecting line segment between the first target starting point and the second target starting point;

[0082] Step 213, taking the vertex of the perpendicular line of the second line segment as a control point; wherein the second line segment is the connecting line segment between the first target starting point and the second target point; and the length of the perpendicular line is greater than a set length;

[0083] Step 214, determining the path point of each motion trajectory based on the control point.

[0084] The server calculates the path point coordinates in the motion process of each motion trajectory. The trajectory moves along a smooth curve path, so the motion trajectory adopts a Bezier curve, and a relatively complex smooth curve is calculated and generated to improve the cracking difficulty of human-computer verification.

[0085] The embodiments of the present application adopt the de Casteljau algorithm with high precision and fast calculation speed to calculate the Bezier curve. The curve generated by this method needs to give a set of control points and a parameter t. The control points determine the general shape of the curve, and the parameter t controls the number of intermediate points in the curve generation. Exemplarily, the following steps are included:

[0086] After the generation of all starting points is completed, each starting point is displayed as a circle in the human-computer verification picture area, and one of the starting points is highlighted to prompt that the coordinate point is the starting point of the motion trajectory to be tracked, i.e., the starting point of the tracking trajectory G1 (i.e., the first target starting point). The coordinate point is generated as shown in FIG. 2.

[0087] The starting point of each motion trajectory is selected as the starting control point of the Bezier curve, the first target starting point S1=(x1, y1) of the tracking trajectory G1 is selected, and the second target starting point S2=(x2, y2) of another motion trajectory G2 is randomly selected to form a first line segment S1S2; according to the median line formula, the median line C1 of the first line segment S1S2 can be obtained, and a point S3=(x3, y3) (that is, a second target point) on the median line G1 is randomly selected as the end point of the next movement of the motion trajectories G1 and G2. In order to make the motion trajectory smoother and more natural, and improve the user experience, the S1S3 forms a second line segment, a vertical line H1 with a length greater than the fixed length h is drawn, the bottom of the H1 is S1S3, and the top point T is taken as a control point, so that S1, S2 and T are obtained as three control points. At the same time, a coordinate point with a distance from the starting point of each other motion trajectory being the length of the second line segment S1S3 is randomly selected as the end point of this movement, and a third control point is obtained in the same way. After the control points are determined, the number of recursive operations of the path points is determined based on the number of control points, and then the path points of each motion trajectory are determined based on the number of control points, the number of recursive operations and the preset parameters.

[0088] For example, the intermediate coordinate points (that is, the path points) of each motion trajectory are calculated by using the de Casteljau algorithm, and the calculation formula is as follows:

[0089] The calculation of the path points is a recursive formula, where k represents the kth recursion, n represents the number of control points, i represents the ith control point, k=0 is the initial control point, t ranges from 0 to 1, represents the path point obtained after the kth recursion of the ith control point, represents the path point obtained after the k-1th recursion of the ith control point, represents the path point obtained after the k-1th recursion of the i+1th control point. When calculating the path points, the value of t is fixed, t is uniformly increased, and the step size is d each time, so a total of path points are calculated.

[0090] The embodiments of the present application dynamically generate multiple complex motion trajectories by using the de Casteljau algorithm, which can balance the curve precision and calculation complexity according to the actual situation, has strong flexibility, and the calculated curve is smooth. At the same time, by using the complex Bezier curve path and the randomly generated control points, the cracking difficulty of verification can be increased.

[0091] Based on the above embodiments, the dynamic images of all the motion trajectories are generated based on the path points, including:

[0092] Step 311, control the movement trajectory between the path points to move, and mix the following trajectory with all other movement trajectories; wherein the other movement trajectories are movement trajectories other than the following trajectory; the number of path points of all the movement trajectories is the same, and the time interval of all the movement trajectories moving between the path points is the same;

[0093] Step 312, after completing the mixing, control each movement trajectory to move to the end point to stop and disappear, to generate the dynamic image.

[0094] After the server calculates all the path points of the movement trajectories, all the trajectories start to move. After all the path points of the movement trajectories are calculated, and the number of path points of all the trajectories is the same, in order to make all the movement trajectories move for the same time, the interval time of all the movement trajectories moving between the path points is also the same. Control the following trajectory and each movement trajectory in the other movement trajectories to move to the second target point, to complete the mixing of the following trajectory and all the other movement trajectories.

[0095] For example, after the same movement time, G1 and G2 reach the median coordinate point S3=(x3, y3) to complete a mixing, and other movement trajectories also stop moving at the same time. The movement state during mixing is shown in FIG. 4. After the mixing is completed, another trajectory other than G2 is selected as the new G2, and the above steps are repeated multiple times until all the movement trajectories have mixed with all the other movement trajectories once. G1 and all the other movement trajectories have mixed once, the end point of each movement trajectory is determined, and all the movement trajectories move for the last time. Finally, all the movement trajectories stop and disappear, the server records the disappearing position, the server generates a dynamic image of the whole process of trajectory movement, such as a gif picture or a video animation.

[0096] The embodiment of the present application designs a set of trajectory mixing method by using trajectory mixing, so that the movement process of the trajectory is more complex, further increases the difficulty of AI recognition, effectively prevents the automatic program from identifying and cracking the verification process, and thus improves the reliability of the verification.

[0097] In order to further analyze and explain the man-machine verification method proposed in the present application, refer to FIG. 5 and the following embodiments.

[0098] The embodiment of the present application proposes a man-machine verification method based on multi-path confusion. The method uses a terminal device, and dynamically draws multiple complex motion trajectories in a man-machine verification picture area based on the form of a picture verification code. All the motion trajectories have the same form feature, and a user is prompted with a tracking trajectory before the motion trajectories move. The user needs to continuously observe the motion of the tracking trajectory. In the process of moving the trajectories, the motion trajectories are sufficiently confused to further improve the cracking difficulty of the man-machine verification. Finally, the user needs to click a button to select the coordinate point of the trajectory stop to perform man-machine verification.

[0099] The man-machine verification process of the embodiment of the present application mainly includes four parts: generating a starting point of a motion trajectory, dynamically generating path points of the motion trajectory, moving the trajectory, and processing a man-machine recognition result. Among them, the generation of the starting point, the calculation of the path points of each motion trajectory, and the processing of the man-machine recognition result are processed in the server (or the back-end server), and the client (or the front-end) is used to display the motion of the trajectory and submit the selection result of the user. Among them, the analysis of each part is as follows:

[0100] (1) Generating a starting point of a motion trajectory: the server randomly generates multiple starting points on the man-machine verification picture area. Among them, the starting points need to be uniformly distributed in the man-machine verification picture area, and any two starting points cannot be repeated. Therefore, the following method can be used to randomly generate multiple starting points.

[0101] 1.1) Divide the man-machine verification picture area into several small areas, wherein there is at most one sampling point, that is, a starting point, in each small area.

[0102] 1.2) Randomly select a point in each small area as a starting point (that is, an initial starting point), add it to the sampling point set, and mark the area around it as occupied.

[0103] 1.3) Randomly select a point from the sampling point set, generate a candidate point with the point as the center and within a certain radius, and check whether the candidate point and each sampling point in the sampling point set meet the minimum distance requirement, that is, calculate the distance between the candidate point and each sampling point. If all distances are greater than the set minimum distance, the minimum distance requirement is met, and the candidate point is added to the sampling point set. If any distance is less than or equal to the set minimum distance, the minimum distance requirement is not met, and the candidate point is regenerated.

[0104] 1.4) Repeat the process of generating candidate points until the sampling point set reaches a preset size, i.e. the number of sampling points in the sampling point set is greater than or equal to the set data. Then, the sampling points in the sampling point set are taken as the starting points in each small area. After the generation of all starting points is completed, each starting point is displayed in a circle in the man-machine verification picture area, and one of the starting points is highlighted to prompt that the coordinate point is the starting point of the motion trajectory to be tracked, i.e. the starting point of the tracking trajectory G1, and the coordinate point is generated as shown in FIG. 2. All motion trajectories have a same identification head and a same tailing, which are used to actually move on the picture and help the user to judge the actual motion direction, and the motion trajectory is shown in FIG. 3.

[0105] (2) Dynamically generating path points of the motion trajectory: the server calculates the path point coordinates in the motion process of each motion trajectory. The trajectory moves in a smooth curve path, so the motion trajectory adopts a Bezier curve, a relatively complex smooth curve is calculated and generated to improve the cracking difficulty of the man-machine verification.

[0106] The de Casteljau algorithm with high precision and fast calculation speed is adopted to calculate the Bezier curve in the embodiment of the application, and the curve generated by the method needs to give a group of control points and a parameter t. The control points determine the general shape of the curve, and the parameter t controls the number of intermediate points in the curve generation. The following steps are included:

[0107] Firstly, the control points of each trajectory motion need to be obtained. The starting point of each motion trajectory is selected as the starting control point of the Bezier curve, the starting point S1=(x1, y1) of the tracking trajectory G1 is selected, and the starting point S2=(x2, y2) of another motion trajectory G2 is randomly selected to form a line segment S1S2. According to the formula of the perpendicular bisector, the perpendicular bisector C1 of the line segment S1S2 can be obtained, and a point S3=(x3, y3) on the perpendicular bisector G1 is randomly selected as the end point of the next movement of the motion trajectories G1 and G2. In order to make the motion trajectory more smooth and natural and improve the user experience, a perpendicular line H1 with a length greater than a fixed length h is drawn from the line segment S1S3, and the top point T of the perpendicular line H1 is taken as a control point, so that S1, S2 and T are taken as three control points. At the same time, a coordinate point with a distance from the starting point of each motion trajectory equal to the length of S1S3 is randomly selected as the end point of this movement, and a third control point is obtained by the same method. After the control points are determined, the intermediate coordinate points (i.e. path points) of each motion trajectory are calculated by using the de Casteljau algorithm, and the calculation formula is as follows:

[0108] The calculation of the path points is a recursive formula, where k represents the kth recursion, n represents the number of control points, i represents the ith control point, k = 0 is the initial control point, and t ranges from 0 to 1, represents the path point of the ith control point after the kth recursion, represents the path point of the ith control point after the (k-1)th recursion, represents the path point of the (i+1)th control point after the (k-1)th recursion. In each calculation of the path point, the value of t is fixed, t is uniformly increased, and each increase step is d, then a total of path points are calculated.

[0109] (3) Trajectory movement and confusion: after the path points of all trajectories are calculated on the server, all trajectories start moving. In step (2), the path points of all trajectories have been calculated, and the number of path points of all trajectories is the same. In order to make all trajectories move for the same time, the interval time between the path points of all trajectories is also the same. After the same movement time, G1 and G2 reach the midpoint coordinate point S3 = (x3, y3) to complete a confusion, and other trajectories also stop moving at the same time. The movement state during confusion is shown in FIG. 4. After the confusion is completed, another trajectory other than G2 is selected as the new G2, and steps (2) and (3) are repeated multiple times until all trajectories have confused with all other trajectories once.

[0110] (4) After repeating steps (2) and (3) multiple times, G1 and all other trajectories have confused once, the endpoints of each trajectory are determined, and all trajectories move one last time. Finally, all trajectories stop and disappear, the server records the disappearance position, the server generates a GIF picture or a video animation of the entire trajectory movement process and sends it to the client, and the client displays the movement process of each trajectory. After the animation is played, all trajectories stop and disappear, a click button is generated at the position where the trajectories disappear, and the user needs to click to select the button at the disappearance position. The client uploads the user's selection result to the server, and finally determines whether it is a natural person or a machine according to the selection result. If the position of the button clicked by the user is consistent with the disappearance position of the following trajectory recorded by the server, it is determined to be a natural person, otherwise it is determined to be a machine.

[0111] The man-machine verification method provided by the embodiment of the application combines the advantages of the picture verification code and the sliding verification code, has the advantages of the sliding verification code in generating complex trajectories to improve the difficulty of man-machine verification cracking, and has the advantages of the picture verification code in easy operation and improved user experience. Meanwhile, the de Casteljau algorithm is used to dynamically generate multiple moving complex trajectories. The algorithm can balance the curve accuracy and the calculation complexity according to the actual situation, has strong flexibility, and the calculated curve is smooth. By using trajectory confusion, a set of trajectory confusion method is designed, so that the motion process of the trajectory is more complex, and the difficulty of AI recognition is further increased. By randomly generating starting coordinate points, it can be ensured that the starting coordinate points of the trajectories are not overlapped and are uniformly distributed in the man-machine verification picture area, thereby improving the user experience.

[0112] The man-machine verification device provided by the embodiment of the application is described below. The man-machine verification device described below can be referred to the man-machine verification method described above.

[0113] Referring to FIG. 6, FIG. 6 is a structural schematic diagram of the man-machine verification device provided by the embodiment of the application. The man-machine verification device provided by the embodiment of the application includes a starting point determination module 601, a path point determination module 602, a dynamic image generation module 603, and a man-machine verification module 604.

[0114] The starting point determination module 601 is configured to determine a plurality of starting points in a man-machine verification picture area. Any starting point corresponds to a motion trajectory.

[0115] The path point determination module 602 is configured to determine a path point of each motion trajectory based on the starting point. Any motion trajectory includes a plurality of path points.

[0116] The dynamic image generation module 603 is configured to generate dynamic images of a plurality of motion trajectories based on a plurality of path points.

[0117] The man-machine verification module 604 is configured to respond to a click event of a user based on the dynamic images, and perform man-machine verification based on the click event. The click event represents the selection of the motion trajectory by the user.

[0118] The man-machine verification device provided by the embodiments of the present application determines a plurality of starting points in a man-machine verification picture area; each starting point corresponds to a motion track; based on the starting points, path points of each motion track are determined; any motion track includes a plurality of path points; based on the path points, a dynamic image of all motion tracks is generated; a click event of a user is obtained based on the dynamic image, and man-machine verification is performed based on the click event; the click event represents the selection of the user on the motion track. The present application determines whether the operator is a human or a machine by randomly generating a plurality of motion tracks, thereby improving the recognition rate of man-machine verification.

[0119] In one embodiment, the starting point determination module 601 is further configured to:

[0120] randomly select a point from the man-machine verification picture area as an initial starting point, and add the initial starting point to a sample point set;

[0121] randomly select a first target point from the sample point set, and generate a target area with the first target point as the center and a first set distance as the radius;

[0122] determine at least one candidate point from the target area, and determine the distance between the candidate point and each sample point in the sample point set;

[0123] if the distance is greater than a second set distance, add the candidate point to the sample point set;

[0124] if the number of sample points in the sample point set is greater than or equal to a set number, the sample points in the sample point set are used as the starting points.

[0125] In one embodiment, the path point determination module 602 is further configured to:

[0126] select any of the starting points as a first target starting point of a following track, and select any of the starting points as a second target starting point; wherein the following track is a motion track corresponding to the first target starting point;

[0127] randomly select a second target point from the perpendicular bisector of the first line segment; wherein the first line segment is a connecting line segment of the first target starting point and the second target starting point;

[0128] the vertex of the perpendicular line of the second line segment is used as a control point; wherein the second line segment is a connecting line segment of the first target starting point and the second target point; the length of the perpendicular line is greater than a set length;

[0129] based on the control point, determine the path points of each motion track.

[0130] In an embodiment, the dynamic image generation module 603 is further configured to:

[0131] control the movement of the movement trajectories between the path points and confuse the following trajectory with all other movement trajectories; wherein the other movement trajectories are movement trajectories other than the following trajectory; the number of path points of all the movement trajectories is the same, and the time interval of the movement of all the movement trajectories between the path points is the same;

[0132] after the confusion is completed, control each movement trajectory to move to the end point to stop and disappear, to generate the dynamic image.

[0133] In an embodiment, the dynamic image generation module 603 is further configured to:

[0134] control the movement of the following trajectory and each of the other movement trajectories to the second target point to complete the confusion of the following trajectory and all other movement trajectories.

[0135] In an embodiment, the path point determination module 602 is further configured to:

[0136] determine the number of recursions of the recursive operation of the path points based on the number of control points;

[0137] determine the path points of each of the movement trajectories based on the number of control points, the number of recursions, and a preset parameter.

[0138] In an embodiment, the human-computer verification module 604 is further configured to:

[0139] display the dynamic image and detect a click event based on the dynamic image;

[0140] if the click event is clicking the following trajectory, it is judged that the user performs a click operation;

[0141] if the click event is not clicking the following trajectory, it is judged that the machine performs a click operation.

[0142] FIG. 7 illustrates an example of an entity structure of an electronic device. As shown in FIG. 7, the electronic device can include a processor 710, a communication interface 720, a memory 730, and a communication bus 740, wherein the processor 710, the communication interface 720, and the memory 730 complete mutual communication through the communication bus 740. The processor 710 can invoke a computer program in the memory 730 to execute the steps of the human-computer verification method, for example, including:

[0143] determining a plurality of starting points in a region of a man-machine verification picture; wherein any starting point corresponds to a motion track;

[0144] determining a path point of each motion track based on the starting points; wherein any motion track includes a plurality of path points;

[0145] generating a dynamic image of the plurality of motion tracks based on the plurality of path points;

[0146] performing man-machine verification based on a click event of a user based on the dynamic image; wherein the click event represents a selection of the motion track by the user.

[0147] In addition, the logic instructions in the memory 730 described above can be implemented in the form of a software functional unit and sold or used as an independent product, which can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0148] On the other hand, the embodiments of the present application also provide a non-transitory computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of the man-machine verification method provided by the above-mentioned embodiments, for example, including:

[0149] determining a plurality of starting points in a region of a man-machine verification picture; wherein any starting point corresponds to a motion track;

[0150] determining a path point of each motion track based on the starting points; wherein any motion track includes a plurality of path points;

[0151] generating a dynamic image of the plurality of motion tracks based on the plurality of path points;

[0152] performing man-machine verification based on a click event of a user based on the dynamic image; wherein the click event represents a selection of the motion track by the user.

[0153] In another aspect, the embodiments of the present application also provide a computer program product, which comprises a computer program, the computer program being stored in a non-transitory computer-readable storage medium, and the computer program being executable by a processor to enable a computer to perform the steps of the human-computer verification method provided by any of the above embodiments, for example comprising:

[0154] determining a plurality of starting points in the human-computer verification picture area; wherein any of the starting points corresponds to a motion trajectory;

[0155] determining a path point of each of the motion trajectories based on the starting points; wherein any of the motion trajectories comprises a plurality of path points;

[0156] generating a dynamic image of all the motion trajectories based on the path points;

[0157] obtaining a click event of a user based on the dynamic image, and performing human-computer verification based on the click event; wherein the click event represents a selection of the motion trajectories by the user.

[0158] The above-described apparatus embodiments are merely illustrative, wherein the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., they can be located in one place, or distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the embodiments according to actual needs. Those skilled in the art can understand and implement without creative labor.

[0159] From the above description of the embodiments, those skilled in the art can clearly understand that the embodiments can be implemented by means of software plus necessary general hardware platforms, and of course can also be implemented by hardware. Based on such understanding, the above technical solutions, essentially or in other words, the part that contributes to the prior art, can be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some parts of the embodiments.

[0160] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements to some technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for human-computer verification, comprising: determining a plurality of starting points in a human-computer verification picture area; wherein any starting point corresponds to a motion trajectory; determining a path point of each motion trajectory based on the starting points; wherein any motion trajectory comprises a plurality of path points; generating a dynamic image of the plurality of motion trajectories based on the plurality of path points; performing human-computer verification based on a click event of a user based on the dynamic image; wherein the click event represents the user's selection of the motion trajectory.

2. The human verification method of claim 1, wherein, The determination of a plurality of starting points in the human-computer verification picture area comprises: randomly selecting a point from the human-computer verification picture area as an initial starting point and adding the initial starting point to a sample point set; randomly selecting a first target point from the sample point set and generating a target area with the first target point as the center and a first set distance as the radius; determining at least one candidate point from the target area and determining the distance between the candidate point and each sample point in the sample point set; if the distance is greater than a second set distance, the candidate point is added to the sample point set; if the number of sample points in the sample point set is greater than or equal to a set number, the sample points in the sample point set are used as the starting points.

3. The human verification method of claim 1, wherein, The determination of a path point of each motion trajectory based on the starting points comprises: selecting any starting point as a first target starting point of a following trajectory, and selecting any starting point as a second target starting point; wherein the following trajectory is the motion trajectory corresponding to the first target starting point; randomly selecting a second target point from the perpendicular bisector of the first line segment; wherein the first line segment is the connecting line segment between the first target starting point and the second target starting point; using the vertex of the perpendicular line of the second line segment as a control point; wherein the second line segment is the connecting line segment between the first target starting point and the second target point; the length of the perpendicular line is greater than a set length; determining a path point of each motion trajectory based on the control point. The generation of a dynamic image of all motion trajectories based on the path points comprises:

4. The method of claim 3, wherein, controlling the motion trajectory to move between the path points and confusing the following trajectory with all other motion trajectories; wherein the other motion trajectories are motion trajectories other than the following trajectory; the number of path points of all motion trajectories is the same, and the time interval of the movement of all motion trajectories between the path points is the same; after the confusion is completed, controlling each motion trajectory to move to an end point, stop and disappear to generate the dynamic image. The confusion of the following trajectory with all other motion trajectories comprises:

5. The method of claim 4, wherein, controlling the following trajectory and each motion trajectory in the other motion trajectories to move to the second target point to complete the confusion of the following trajectory with all other motion trajectories. The determination of a path point of each motion trajectory based on the control point comprises:

6. The method of claim 3, wherein, determining the number of recursive operations of the path point recursive operation based on the number of control points; ​ Determine path points of each of the motion trajectories based on the number of the control points, the number of the recursions, and a preset parameter.

7. The man-machine authentication method according to claim 1, wherein The human-computer verification device comprises: Display the dynamic image and detect a click event based on the dynamic image; If the click event is clicking the follow trajectory, it is determined that the user performs the click operation; If the click event is not clicking the follow trajectory, it is determined that the machine performs the click operation.

8. A human-computer verification device, comprising: A starting point determination module configured to determine a plurality of starting points in a human-computer verification picture region; wherein any of the starting points corresponds to a motion trajectory; A path point determination module configured to determine path points of each of the motion trajectories based on the starting points; wherein any of the motion trajectories comprises a plurality of path points; A dynamic image generation module configured to generate dynamic images of the plurality of motion trajectories based on the plurality of path points; A human-computer verification module configured to respond to a click event of a user based on the dynamic images, and perform human-computer verification based on the click event; wherein the click event represents selection of the motion trajectory by the user.

9. An electronic device, comprising a processor and a memory storing a computer program, wherein the processor implements the steps of the human-computer verification method of any one of claims 1 to 7 when executing the computer program.

10. A non-transitory computer-readable storage medium, having a computer program stored thereon, wherein the computer program implements the steps of the human-computer verification method of any one of claims 1 to 7 when executed by a processor.

11. A computer program product, comprising a computer program, wherein the computer program implements the steps of the human-computer verification method of any one of claims 1 to 7 when executed by a processor.