CN109902474B - Method and device for determining moving track of moving object in sliding verification code - Google Patents

Method and device for determining moving track of moving object in sliding verification code Download PDF

Info

Publication number
CN109902474B
CN109902474B CN201910156177.3A CN201910156177A CN109902474B CN 109902474 B CN109902474 B CN 109902474B CN 201910156177 A CN201910156177 A CN 201910156177A CN 109902474 B CN109902474 B CN 109902474B
Authority
CN
China
Prior art keywords
track
moving
moving object
determining
track point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910156177.3A
Other languages
Chinese (zh)
Other versions
CN109902474A (en
Inventor
殷昊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201910156177.3A priority Critical patent/CN109902474B/en
Publication of CN109902474A publication Critical patent/CN109902474A/en
Application granted granted Critical
Publication of CN109902474B publication Critical patent/CN109902474B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a method and a device for determining a moving track of a moving object in a sliding verification code, which can obtain the distance of the moving object in the sliding verification code to be moved; determining the number of track points included in the movement track to be determined of the moving object and the coordinate value of each track point in the first space dimension according to the first function matched with the distance; according to a preset duration interval, for any other track point except the last track point in the moving direction: determining the time interval corresponding to the track point; and determining the moving track of the moving object according to the coordinate values of the track points and the time intervals corresponding to the track points. The invention can generate more moving tracks, and because the moving tracks are not generated by controlling the moving of the moving object by a real person, more machine behavior characteristics can be learned by learning the moving tracks generated by the invention, and the man-machine identification of the sliding verification code and the blocking capability of the automatic verification of the machine are optimized.

Description

Method and device for determining moving track of moving object in sliding verification code
Technical Field
The invention relates to the technical field of sliding verification codes, in particular to a method and a device for determining a moving track of a moving object in a sliding verification code.
Background
Behavioral captchas are one of the more popular captchas. The behavioral verification code completes verification through the operation behavior of the user without reading distorted pictures and characters. The behavioral verification code includes a drag verification code and a point-contact verification code. The dragging type verification code is also called as a sliding verification code, and a user can control the sliding block to move to a specified position to complete verification by using a mouse and the like according to prompts. With the development of scientific technology, the technology of sliding verification codes is continuously improved.
Because part of programs can automatically control the sliding block of the sliding verification code to complete verification (namely, automatic machine verification) according to the prestored movement track, the characteristics of the automatic machine verification need to be learned to identify the automatic machine verification and carry out safety processing such as blocking and the like, so that the verification function of the sliding verification code is prevented from being invalid.
The inventor of the application researches and discovers that in the process of realizing the technical scheme of the invention: because the prior art can only learn a small number of movement tracks which are identified as machine automatic verification, the prior art learns less characteristics of the machine automatic verification, and the identification rate of the machine automatic verification is reduced.
Disclosure of Invention
In view of the above problems, the present invention provides a method and an apparatus for determining a moving trajectory of a moving object in a sliding verification code, which overcome or at least partially solve the above problems, and the technical solution is as follows:
a method for determining a moving track of a moving object in a sliding verification code comprises the following steps:
obtaining the distance of the moving object in the sliding verification code to move;
determining the number of track points included in the movement track to be determined of the moving object and the coordinate value of each track point in the first space dimension according to the first function matched with the distance;
according to a preset duration interval, for any other track point except the last track point in the moving direction: determining the time interval corresponding to the track point, wherein the time interval corresponding to the track point is as follows: a time interval between a first time when the moving object reaches the position of the track point and a second time when the moving object reaches the position of the next track point in the moving direction;
and determining the moving track of the moving object according to the coordinate values of the track points and the time intervals corresponding to the track points.
Optionally, the first function is a function in which the first derivative increases first and then decreases.
Optionally, the first function is:
Figure BDA0001982982200000011
wherein d is the distance, m is a stretch coefficient, n is a translation coefficient, p is a random factor, x is a track point number, x is a natural number, and f (x) is the distance from the track point numbered with x to the initial position of the moving object.
Optionally, m is more than or equal to 5 and less than or equal to 50, and/or n is more than or equal to 4 and less than or equal to 5.
Optionally, the obtaining of the distance that the moving object needs to move in the sliding verification code includes:
obtaining a complete picture corresponding to a background picture used by the sliding verification code;
identifying the positions of jigsaw puzzle blocks and the positions of gaps in the background picture according to the complete picture;
and obtaining the distance of the moving object in the sliding verification code to move according to the position of the notch and the position of the jigsaw puzzle block.
Optionally, the determining, according to the first function matched with the distance, the number of track points included in the movement track to be determined of the moving object and the coordinate value of each track point in the first space dimension includes:
inputting a first natural number as an independent variable into a first function matched with the distance to obtain a dependent variable corresponding to the first natural number;
and when the ratio of the dependent variable to the distance is not lower than a threshold value, determining the number of track points included in the movement track to be determined of the moving object and the coordinate value of each track point in a first space dimension according to the first natural number.
Optionally, the determining the time interval corresponding to the trace point includes:
and randomly selecting one time length in the preset time length interval, and determining the time length as the time interval corresponding to the track point.
Optionally, the determining the movement trajectory of the moving object according to the coordinate values of each track point and the time interval corresponding to each track point includes:
and storing the coordinate values of the track points and the time intervals corresponding to the track points as the moving track of the moving object.
Optionally, the method further includes:
and performing machine learning on the determined movement track to generate a movement track identification model for identifying automatic verification of the machine.
An apparatus for determining a moving trajectory of a moving object in a slide validation code, comprising: the device comprises a moving distance obtaining module, a track point determining module, a time interval determining module and a moving track determining module, wherein:
the moving distance obtaining module is used for obtaining the distance of the moving object to be moved in the sliding verification code;
the track point determining module is used for determining the number of track points included in the movement track to be determined of the moving object and the coordinate value of each track point in a first space dimension according to the first function matched with the distance;
the time interval determining module is used for determining any other track point except the last track point in the moving direction according to a preset time interval: determining the time interval corresponding to the track point, wherein the time interval corresponding to the track point is as follows: a time interval between a first time when the moving object reaches the position of the track point and a second time when the moving object reaches the position of the next track point in the moving direction;
and the moving track determining module is used for determining the moving track of the moving object according to the coordinate values of the track points and the time intervals corresponding to the track points.
Optionally, the first function is a function in which the first derivative increases first and then decreases.
Optionally, the first function is:
Figure BDA0001982982200000031
wherein d is the distance, m is a stretch coefficient, n is a translation coefficient, p is a random factor, x is a track point number, x is a natural number, and f (x) is the distance from the track point numbered with x to the initial position of the moving object.
Optionally, m is more than or equal to 5 and less than or equal to 50, and/or n is more than or equal to 4 and less than or equal to 5.
Optionally, the moving distance obtaining module includes: a picture obtaining sub-module, a position identification sub-module and a moving distance obtaining sub-module,
the picture obtaining submodule is used for obtaining a complete picture corresponding to the background picture used by the sliding verification code;
the position identification submodule is used for identifying the positions of the jigsaw puzzle blocks and the positions of the gaps in the background picture according to the complete picture;
and the moving distance obtaining submodule is used for obtaining the distance of the moving object in the sliding verification code, which needs to move, according to the position of the notch and the position of the jigsaw puzzle block.
Optionally, the track point determining module includes: a dependent variable obtaining submodule and a coordinate value determining submodule,
the dependent variable obtaining submodule is used for inputting a first natural number serving as an independent variable into a first function matched with the distance to obtain a dependent variable corresponding to the first natural number;
and the coordinate value determining submodule is used for determining the number of track points included in the movement track to be determined of the moving object and the coordinate value of each track point in a first space dimension according to the first natural number when the ratio of the dependent variable to the distance is not lower than a threshold value.
Optionally, the time interval determining module is specifically configured to: according to a preset duration interval, for any other track point except the last track point in the moving direction: randomly selecting one time length in the preset time length interval, and determining the time length as the time interval corresponding to the track point, wherein the time interval corresponding to the track point is as follows: and the time interval between the first moment when the moving object reaches the position of the track point and the second moment when the moving object reaches the position of the next track point in the moving direction is shorter than the time interval between the first moment when the moving object reaches the position of the next track point in the moving direction and the second moment when the moving object reaches the position of the next track point in the moving direction.
Optionally, the sliding track determining module is specifically configured to:
and storing the coordinate values of the track points and the time intervals corresponding to the track points as the moving track of the moving object.
Optionally, the method further includes: and the machine learning module is used for performing machine learning on the determined movement track and generating a movement track identification model for identifying automatic verification of the machine.
The invention discloses a method and a device for determining a moving track of a moving object in a sliding verification code, which can obtain the distance of the moving object in the sliding verification code to be moved; determining the number of track points included in the movement track to be determined of the moving object and the coordinate value of each track point in the first space dimension according to the first function matched with the distance; according to a preset duration interval, for any other track point except the last track point in the moving direction: determining the time interval corresponding to the track point; and determining the moving track of the moving object according to the coordinate values of the track points and the time intervals corresponding to the track points. The invention can generate more moving tracks, and because the moving tracks are not generated by controlling the moving of the moving object by a real person, more machine behavior characteristics can be learned by learning the moving tracks generated by the invention, and the man-machine identification of the sliding verification code and the blocking capability of the automatic verification of the machine are optimized.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a flowchart illustrating a method for determining a moving trajectory of a moving object in a sliding verification code according to an embodiment of the present invention;
FIG. 2A is a schematic diagram of a sliding authentication code for authentication on a one-dimensional straight line;
FIG. 2B is a schematic diagram of another sliding authentication code that performs authentication on a one-dimensional straight line;
FIG. 2C is a schematic diagram of another sliding authentication code that performs authentication on a one-dimensional straight line;
FIG. 3 shows a schematic diagram of a sliding authentication code for authentication on a two-dimensional plane;
FIG. 4 is a schematic diagram of a sliding authentication code for authentication in three-dimensional space;
FIG. 5 shows a function
Figure BDA0001982982200000041
Images in a rectangular coordinate system;
FIG. 6 shows a function
Figure BDA0001982982200000042
Images in a rectangular coordinate system;
fig. 7 is a flowchart illustrating a method for determining a moving trajectory of a moving object in a sliding verification code according to another embodiment of the present invention;
fig. 8 is a schematic structural diagram illustrating an apparatus for determining a moving trajectory of a moving object in a sliding verification code according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
An embodiment of the present invention provides a method for determining a moving trajectory of a moving object in a sliding verification code, as shown in fig. 1, the method may include the following steps:
s100, obtaining the distance of the moving object in the sliding verification code to move;
the moving object can be a sliding block or a jigsaw puzzle block.
Fig. 2A is a schematic diagram of a sliding verification code, as shown in fig. 2A, when verification is needed, the user needs to control the slider 005 to move right on the slider 004, so that the puzzle piece 002 moves along with the slider 005, and when the user controls the slider 005 to move to a position such that the puzzle piece 002 moves to or near the gap 003, the verification process is completed. The sliding verification code service provider can carry out deep analysis on the behavior characteristics of the person through a machine learning and deep learning method so as to establish a movement track recognition model for recognizing automatic verification of the machine to distinguish the person from the machine. The moving trace of the slider 005 in the above-mentioned verification process is analyzed by, for example, a moving trace recognition model for recognizing automatic verification by a machine to determine whether the above-mentioned verification process is performed by a human or by a machine. Of course, in other embodiments, the user can control the puzzle pieces to move for verification, and the graph shown in fig. 2C is a schematic diagram of another sliding verification code. As shown in fig. 2C, the user may move tile 002 to notch 003 or near notch 003 to complete the verification according to the text prompt "move tile fill tile right".
The moving track comprises track points and time intervals corresponding to the track points, wherein the time intervals corresponding to the track points are the time intervals between the first moment when the moving object reaches the position of the track points and the second moment when the moving object reaches the position of the next track point in the moving direction. The track points in the moving track are all or part of points passed by the moving object in the process of moving from the starting position to the ending position.
For ease of understanding, the following illustrates a sliding authentication code:
as shown in fig. 2A, the slide validation code may include a slider 005, a slider 004, puzzle pieces 002, and a background picture 001 with a gap 003.
As shown in FIG. 2A, puzzle piece 002 can be the same shape and size as notch 003 so that when puzzle piece 002 is moved over notch 003, puzzle piece 002 fills notch 003.
Alternatively, the puzzle pieces 002 may be partial pictures extracted from the whole picture corresponding to the background picture 001, and the puzzle pieces 002 may be suspended on the background picture 001 and cover a region of the background picture 001. The area of the background picture 001 where the picture is scratched out is the notch 003. Specifically, the notch 003 can display the scratched-out picture content with a different display effect from other areas of the background picture 001, such as: the notch 003 displays the clipped picture content in grayscale or in a halved chroma manner.
Optionally, the server of the sliding authentication code service provider may store a certain number of complete pictures, which may not have gaps in them. When a sliding verification code needs to be generated, the server can select a stored complete picture, then extract picture content in a certain area in the complete picture, the extracted picture content is a jigsaw puzzle block, and the remaining pictures after the jigsaw puzzle block is extracted from the complete picture are background pictures of the sliding verification code. Specifically, the server may place the tile in a position (corresponding to the starting position of the slider) of the background picture (at this time, after the tile is extracted, the background picture has a gap). The server can also process the picture effect of the gap left after the jigsaw puzzle blocks are extracted (for example, the pattern carried by the extracted jigsaw puzzle blocks is displayed in the gap in a gray scale mode), and then the sliding strip with the sliding block and the processed background picture are combined to obtain the sliding verification code.
The sliding block can be positioned outside the background picture and below the jigsaw puzzle blocks, and the central points of the sliding block and the jigsaw puzzle blocks can be positioned on the same vertical line. It should be noted that, in other track confirmation methods provided by the embodiments of the present invention, the starting relative positions of the slider and the puzzle pieces are not limited.
In other embodiments of the present invention, the sliding verification code shown in fig. 2C may not require a sliding bar with a sliding block, as compared to the sliding verification code shown in fig. 2A, and the user may directly control the puzzle pieces 002 to move to the position of the gap 003 to complete the verification. Of course, as shown in FIG. 2C, the present invention may prompt the user to move tile pieces by adding a text prompt "move tile pieces right to fill a tile". Of course, in other embodiments of the present invention, no text prompt or other text prompts may be added, and the present invention is not limited herein.
The distance in step S100 may be the length of a straight line connecting the puzzle pieces and the corresponding points in the gap. Optionally, the straight line may be a straight line connecting a central point of the puzzle block and a central point of the notch, or may be a straight line connecting a point at the upper left corner of the puzzle block and a point at the upper left corner of the notch.
In practical applications, the verification can be completed only when the moving object in the sliding verification code moves in a horizontal direction, but in other methods for confirming the moving track of the sliding verification code provided by the embodiments of the present invention, the movement of the moving object in the verification process is not limited to the horizontal direction, and the moving object may move in any one-dimensional, two-dimensional, or three-dimensional direction. As shown in fig. 2B, the slide block can move in the vertical direction and move the puzzle pieces in the vertical direction. As shown in fig. 3, the slide block can move on a two-dimensional plane and drive the puzzle pieces to move in two dimensions. As shown in fig. 4, puzzle pieces may be moved within a three-dimensional space to complete verification.
The three-dimensional sliding authentication code of fig. 4 is explained as follows:
in the sliding validation code shown in FIG. 4, a space 300 is included, along with puzzle pieces 301 and a rectangular parallelepiped 302 with a gap 303 located within the space 300.
Optionally, pictures may be respectively disposed on part or all of the six faces of the cuboid 302, and it should be noted that the pictures may be regarded as a background picture disposed on the cuboid 302 as a whole.
Optionally, the jigsaw puzzle piece 301 may be a small cuboid (or other regular or irregular pieces) with a part of background picture, which is extracted from the cuboid 302, the area of the cuboid 302 after the small cuboid is extracted may be regarded as a notch 303 of the cuboid 302, and the notch 303 may display the extracted picture content using a display effect different from that of the cuboid 302, for example: the notch 303 displays the clipped picture content in a grayscale manner or a color-halved manner.
Optionally, the sliding verification code may not have a slider therein. The user can determine what control needs to be given to the puzzle piece 301 by observing the size, shape, and picture content of the puzzle piece 301, the cuboid 302, and the gap 303. Specifically, the user may control tile 301 by: puzzle piece 301 is moved to gap 303 and puzzle piece 301 fills gap 303. Of course, in other embodiments of the present invention, the user may control tile 301 by: puzzle piece 301 is rotated and rotated, and then rotated puzzle piece 301 is moved to gap 303 and puzzle piece 301 fills gap 303. The user may rotate puzzle piece 301 to conform the shape, picture content, of puzzle piece 301 to the shape, picture content, of gap 303. Of course, in other embodiments of the present invention, the user may also control the reduction, enlargement, etc. of puzzle pieces 301 so that the size of puzzle pieces 301 matches the size of indentations 303. In practical applications, a user may control the puzzle pieces 301 through a mouse, a touch screen, or a Virtual Reality (VR) device, etc. to complete the movement verification.
S200, determining the number of track points included in the movement track to be determined of the moving object and the coordinate value of each track point in the first space dimension according to the first function matched with the distance.
Wherein the first function may be a function in which the first derivative increases and then decreases. Specifically, the independent variable of the first function may be a track point number, and the dependent variable may be a distance from a track point numbered x to an initial position of the moving object. Therefore, the first function can be used as a track equation of the moving object in the sliding verification code, and the invention can obtain a curve with x as the abscissa and f (x) as the ordinate according to the track equation. Since the first derivative increases and then decreases, the moving speed of the moving trajectory obtained according to the first function increases and then decreases, which is very suitable for the speed change of the moving object when the moving object is controlled by a person to move. Therefore, the invention can obtain the highly anthropomorphic movement track according to the first function.
In particular, the first function used in the present invention may also be different when the distances are different, i.e. the first function varies with distance. The first spatial dimension may be a spatial dimension corresponding to a moving direction of the moving object, as shown in fig. 2A, the moving object is a slider, and the moving direction of the slider is horizontal to the right, so the first spatial dimension in the sliding verification code shown in fig. 2A is a horizontal direction.
Alternatively, since the start position of the moving object is known, the start position of the moving object may be excluded from the moving trajectory of the moving object obtained by the present invention, that is, the start position of the moving object may not be used as the track point. Of course, the present invention can also add the starting position of the moving object as one of the track points into the moving track of the moving object.
Correspondingly, when the moving object is a jigsaw puzzle block, the jigsaw puzzle block can be completely verified only by moving to the vicinity of the notch, and therefore, a corresponding position point (such as a central point of the notch) of the notch can also not be used as a track point. When the moving object is a sliding block, points corresponding to the corresponding position points of the notch are arranged on the sliding strip, the sliding block can be completely verified only by moving to the position near the corresponding points, and therefore the corresponding points can not be used as track points.
It should be noted that, for the sliding verification code shown in fig. 2A, 2B, and 2C that performs verification on a one-dimensional straight line, when a real person moves a moving object, coordinates of the moving object in other dimensions except for the dimension in which the moving direction is located may be unchanged. However, the hand of a real person shakes when the real person controls the moving object to move, so that coordinates of each track point in the moving track of the moving object, which is actually generated when the real person performs movement verification, in other dimensions except the dimension in which the moving direction is located can be changed within a certain range, and a shaking effect is formed. Specifically, the invention can add a shock value to the coordinates of other dimensions of each track point except the dimension of the moving direction. The oscillation value is the displacement perpendicular to the moving direction, such as 3 pixels or 0.1 mm.
It can be understood that the invention makes the moving track of the moving object more anthropomorphic by increasing the oscillation value.
Optionally, the first function is:
Figure BDA0001982982200000071
wherein d is the distance, m is a stretch coefficient, n is a translation coefficient, p is a random factor, x is a track point number, x is a natural number, and f (x) is the distance from the track point numbered with x to the initial position of the moving object.
Optionally, in the first function, m is greater than or equal to 5 and less than or equal to 50, and/or n is greater than or equal to 4 and less than or equal to 5. For example, when m is 10 and n is 4.5, the first function is
Figure BDA0001982982200000081
FIG. 5 shows a function
Figure BDA0001982982200000082
The function f (x) gradually approaches 1 as x increases, and the first derivative of the function increases and then decreases. A function of
Figure BDA0001982982200000083
The image of (2) is subjected to a scaling transformation and a translation transformation to obtain a first function. Optionally, a function
Figure BDA0001982982200000084
Can be regarded as a function
Figure BDA0001982982200000085
The image is obtained by performing the following transformation: the stretching is carried out by 10 times in the transverse direction after moving to the right by (4.5-p) unit values, and then by d times in the longitudinal direction. FIG. 6 is a function
Figure BDA0001982982200000086
Figure BDA0001982982200000087
Since p in the first function is a random factor, the function
Figure BDA0001982982200000088
Figure BDA0001982982200000089
There will be a random pattern variation with respect to fig. 6. It will be appreciated that the addition of the random factor causes the trajectory of the movement according to the first function of the invention to be different each time, which is whyThe diversity of the movement tracks obtained by the method is greatly enriched, and abundant learning samples are provided for subsequent machine learning. It should be noted that p may be positive, negative or zero, and meanwhile, the value of p may be relatively small, which does not affect the characteristic that f (1) of the first function is close to zero.
Wherein the content of the first and second substances,
Figure BDA00019829822000000810
and the moving object is close to zero, and the characteristic that the moving object is close to the starting position when the real person just starts to control the moving object to move is met. With the increasing of x, f (x) is also gradually close to d, and the graph relationship represents that the moving track comprises more track points and the number of the track points is larger as the moving object moves. Meanwhile, along with the movement of the moving object, the moving object is farther away from the initial position of the moving object and is finally gradually close to the point corresponding to the corresponding position point of the notch on the notch or the sliding strip.
Optionally, step S200 may specifically include:
inputting a first natural number as an independent variable into a first function matched with the distance to obtain a dependent variable corresponding to the first natural number;
and when the ratio of the dependent variable to the distance is not lower than a threshold value, determining the number of track points included in the movement track to be determined of the moving object and the coordinate value of each track point in a first space dimension according to the first natural number.
In particular, in the first function is
Figure BDA00019829822000000811
It can be seen that different distances d make the first function different, for example: when d is 100 pixels, the first function is
Figure BDA00019829822000000812
When d is 500 pixels, the first function is
Figure BDA00019829822000000813
It can be seen that the different distances are matched withA different first function.
It is to be understood that, when the present invention does not take the start position of the moving object as the track point, the present invention may not input 0 to the first function.
Optionally, in the process of determining the number of trace points according to the first function, a certain natural number may be input into the first function as an independent variable x, so as to obtain a value of a dependent variable f (x) of the first function. It will be appreciated that as x increases, f (x) also increases progressively and approaches d progressively. In practical applications, when f (x) obtained from a natural number is very close to d (e.g., f (x) ═ 0.95d), it can be considered that the natural number of trace points is sufficiently distributed over the entire moving distance of the moving object. Therefore, the natural number is the number of the trace points. Of course, in practical applications, the present invention may input each natural number 1, 2 … … as an independent variable in order from small to large, and when the ratio of the obtained dependent variable f (x) to d is not lower than a preset threshold (for example, the threshold may be 98.9%), the last input x is the number of track points included in the movement track. For example: when the ratio of f (x) to d obtained after 98 is input is not lower than a preset threshold, it can be determined that the moving track comprises 98 track points in total, and the serial number of the 98 track points is 98 natural numbers from 1 to 98. In practical application, the threshold may be set according to a specific sliding verification code, and the setting of the threshold is not limited in the embodiment of the present invention.
Specifically, after the number of track points included in the movement track to be determined of the moving object is determined according to the first natural number, dependent variables obtained after respective natural numbers from 1 to the number of track points are respectively input to the first function may be determined as coordinate values of the track points in the first space dimension. For example: when the dependent variable obtained by inputting the natural number 95 into the first function is 0.93212d, the coordinate value of the trajectory point with the number of 95 in the first space dimension is 0.93212 d.
S300, according to a preset duration interval, for any track point except the last track point in the moving direction: determining the time interval corresponding to the track point, wherein the time interval corresponding to the track point is as follows: a time interval between a first time when the moving object reaches the position of the track point and a second time when the moving object reaches the position of the next track point in the moving direction;
it can be understood that after the coordinate values of the track points are determined, the time intervals corresponding to the track points are also required to be determined, and only after the coordinate values of the track points and the corresponding time intervals are determined, the mobile object can be controlled to move to the corresponding track points according to the time intervals, so that complete verification is achieved. If there are only the coordinate values of the trace points, it is known to which coordinates the moving object is moved in sequence, but it is not known how long it takes to move. If the moving time is short or long, the moving speed of the moving object is too fast or too slow, and the moving rule of the real person is not met. Therefore, the time interval corresponding to each track point is determined according to the preset time interval. Optionally, the preset time duration may be set according to a speed at which the real person controls the moving object to move.
The verification of the moving object is completed when the moving object reaches the last track point in the moving direction, and the moving object does not need to be controlled to move, so that the corresponding time interval of the last track point can not be set.
When performing the movement verification, the moving process of the moving object in the adjacent track points may be transient movement, or may be non-transient movement, such as uniform movement. Note that, when the movement in the present invention is used as a verb, the meaning thereof includes: transient motion, uniform motion, variable motion, and the like.
Optionally, the moving process of the moving object in the adjacent track points is transient movement, so that the time interval corresponding to any track point is the time that the moving object needs to pause after reaching the corresponding position of the track point, and the moving object can be transiently moved to the next track point in the moving direction again after the track point pauses for the corresponding time interval.
Optionally, the moving process of the moving object in the adjacent track points is a uniform motion, and then the time interval corresponding to any one track point is the time taken for the moving object to move to the next track point again in a uniform state without stopping after the moving object reaches the track point.
Optionally, the determining the time interval corresponding to the trace point may include:
and randomly selecting one time length in the preset time length interval, and determining the time length as the time interval corresponding to the track point.
By randomly selecting one time length from the preset time length interval as the time interval corresponding to the track point, the invention can ensure that the time interval corresponding to each track point has certain randomness. The randomness of the time interval makes the moving track of the moving object determined by the invention more rich and diversified. Meanwhile, the speed of the real person for controlling the moving object to move is not fixed or does not move uniformly for a long time, so that the moving speed embodied by the moving track of the moving object determined by the invention is more similar to that of the real person.
In practical applications, the preset time interval may be determined according to the time taken by the real person to control the distance obtained in the moving step S100. For example: if the time length taken by the real person to control the moving object to move the distance obtained in step S100 is 0.65 seconds and the number of the track points determined in step S200 is 80, the present invention may determine that the average time length taken by the real person to control the moving object to move between two adjacent track points is 0.008125 seconds, which is 0.65/80. The present invention may determine a preset duration interval according to 0.008125 seconds, for example: 0.007125 seconds to 0.009125 seconds. The present invention can use the existing random algorithm (such as the scheimpflug algorithm) to randomly select a duration from the preset duration interval, and determine the duration as the time interval corresponding to the trace point.
S400, determining the moving track of the moving object according to the coordinate values of the track points and the time intervals corresponding to the track points.
Optionally, step S400 may specifically include:
and storing the coordinate values of the track points and the time intervals corresponding to the track points as the moving track of the moving object.
After the coordinate values of the first space dimension of each track point and the corresponding time interval are obtained, the method can be used for storing the coordinate values as the moving track of the moving object. It can be understood that, part of the program can control the moving object to move to the corresponding coordinate value according to the moving track stored in the application at time intervals, so as to perform automatic machine verification. The invention can learn the characteristics of the determined movement track through a machine learning algorithm, thereby obtaining a movement track identification model capable of identifying the automatic verification of the machine.
In other embodiments of the invention, some intermediate points can be added between adjacent track points as track points (for example, the middle points of the adjacent track points) to make the track points in the moving track more, so that the moving object is more smooth and more anthropomorphic when controlled to move according to the moving track. Specifically, because the track points are added, the time interval corresponding to each track point can be determined according to the number of the track points after the track points are added.
In other embodiments of the present invention, the method shown in fig. 1 may further include:
and performing machine learning on the determined movement track to generate a movement track identification model for identifying automatic verification of the machine.
Optionally, there are many methods for performing machine learning, such as unsupervised, supervised, and semi-supervised machine learning methods, and the invention is not limited herein.
The method for determining the moving track of the moving object in the sliding verification code provided by the embodiment of the invention can obtain the distance of the moving object in the sliding verification code to be moved; determining the number of track points included in the movement track to be determined of the moving object and the coordinate value of each track point in the first space dimension according to the first function matched with the distance; according to a preset duration interval, for any other track point except the last track point in the moving direction: determining the time interval corresponding to the track point, wherein the time interval corresponding to the track point is as follows: a time interval between a first time when the moving object reaches the position of the track point and a second time when the moving object reaches the position of the next track point in the moving direction; and determining the moving track of the moving object according to the coordinate values of the track points and the time intervals corresponding to the track points. The invention can automatically generate the moving tracks of various moving objects and provides a large number of samples for machine learning. Because more samples can be learned, the invention can effectively improve the recognition rate of automatic verification of the machine.
On the basis of the embodiment shown in fig. 1, as shown in fig. 7, in another method for determining a moving trajectory of a moving object in a sliding verification code provided by the embodiment of the present invention, step S100 may specifically include the following steps:
s101, obtaining a complete picture corresponding to a background picture used by the sliding verification code;
optionally, the invention may crawl the webpage using the sliding verification code by using a crawler technology to obtain a complete picture stored in a server of the service provider of the sliding verification code. In other embodiments of the present invention, the present invention may also use a corresponding picture extraction tool to extract a background picture with a gap in the sliding verification code. When the complete pictures corresponding to the two background pictures extracted from different sliding verification codes are the same but the positions of the gaps in the two background pictures are different, the two background pictures can be synthesized into one complete picture through a picture synthesis technology, so that the complete picture corresponding to the background picture can be obtained.
S102, identifying the positions of jigsaw puzzle blocks and the positions of gaps in the background picture according to the complete picture;
specifically, the invention can determine the position of the notch in the background picture by comparing the complete picture with the background picture. Because the puzzle pieces float above the background picture, the present invention can compare the combination of the puzzle pieces and the background picture with the complete picture to determine the location of the puzzle pieces. Specifically, the process of the image comparison can be performed through the pixel value comparison of the pixel points at the same position.
S103, obtaining the distance of the moving object in the sliding verification code to move according to the position of the notch and the position of the jigsaw puzzle block.
Taking a pixel point in the gap as a gap mark point (such as a central point of the gap or a pixel point at the upper left corner), taking a pixel point corresponding to the mark point in the jigsaw puzzle block as a jigsaw mark point, and then determining the distance between the gap mark point and the jigsaw mark point as the distance of the moving object to move.
Corresponding to the embodiment of the method, the invention also provides a device for determining the moving track of the moving object in the sliding verification code.
As shown in fig. 8, an apparatus for determining a moving trajectory of a moving object in a sliding verification code according to an embodiment of the present invention may include: a moving distance obtaining module 100, a track point determining module 200, a time interval determining module 300 and a moving track determining module 400, wherein:
the moving distance obtaining module 100 is configured to obtain a distance that a moving object needs to move in the sliding verification code;
optionally, the moving distance obtaining module 100 may include: a picture obtaining sub-module, a position identification sub-module and a moving distance obtaining sub-module,
the picture obtaining submodule is used for obtaining a complete picture corresponding to the background picture used by the sliding verification code;
the position identification submodule is used for identifying the positions of the jigsaw puzzle blocks and the positions of the gaps in the background picture according to the complete picture;
and the moving distance obtaining submodule is used for obtaining the distance of the moving object in the sliding verification code, which needs to move, according to the position of the notch and the position of the jigsaw puzzle block.
The track point determining module 200 is configured to determine, according to a first function matched with the distance, the number of track points included in the movement track to be determined of the moving object and a coordinate value of each track point in a first space dimension;
optionally, the first function is a function in which the first derivative increases first and then decreases.
Optionally, the first function is:
Figure BDA0001982982200000121
wherein d is the distance, m is a stretch coefficient, n is a translation coefficient, p is a random factor, x is a track point number, x is a natural number, and f (x) is the distance from the track point numbered with x to the initial position of the moving object.
Optionally, m is more than or equal to 5 and less than or equal to 50, and/or n is more than or equal to 4 and less than or equal to 5.
Optionally, the track point determining module 200 may include: a dependent variable obtaining submodule and a coordinate value determining submodule,
the dependent variable obtaining submodule is used for inputting a first natural number serving as an independent variable into a first function matched with the distance to obtain a dependent variable corresponding to the first natural number;
and the coordinate value determining submodule is used for determining the number of track points included in the movement track to be determined of the moving object and the coordinate value of each track point in a first space dimension according to the first natural number when the ratio of the dependent variable to the distance is not lower than a threshold value.
The time interval determining module 300 is configured to, according to a preset duration interval, perform, on any one of the other trace points except the last trace point in the moving direction: determining the time interval corresponding to the track point, wherein the time interval corresponding to the track point is as follows: a time interval between a first time when the moving object reaches the position of the track point and a second time when the moving object reaches the position of the next track point in the moving direction;
optionally, the time interval determining module 300 may be specifically configured to: according to a preset duration interval, for any other track point except the last track point in the moving direction: randomly selecting one time length in the preset time length interval, and determining the time length as the time interval corresponding to the track point, wherein the time interval corresponding to the track point is as follows: and the time interval between the first moment when the moving object reaches the position of the track point and the second moment when the moving object reaches the position of the next track point in the moving direction is shorter than the time interval between the first moment when the moving object reaches the position of the next track point in the moving direction and the second moment when the moving object reaches the position of the next track point in the moving direction.
The moving track determining module 400 is configured to determine a moving track of the moving object according to the coordinate values of the track points and the time intervals corresponding to the track points.
Optionally, the movement track determining module 400 may be specifically configured to:
and storing the coordinate values of the track points and the time intervals corresponding to the track points as the moving track of the moving object.
Optionally, the apparatus shown in fig. 8 may further include: and the machine learning module is used for performing machine learning on the determined movement track and generating a movement track identification model for identifying automatic verification of the machine.
The device for determining the moving track of the moving object in the sliding verification code can obtain the distance of the moving object in the sliding verification code to move; determining the number of track points included in the movement track to be determined of the moving object and the coordinate value of each track point in the first space dimension according to the first function matched with the distance; according to a preset duration interval, for any other track point except the last track point in the moving direction: determining the time interval corresponding to the track point; and determining the moving track of the moving object according to the coordinate values of the track points and the time intervals corresponding to the track points. The invention can generate more moving tracks, and because the moving tracks are not generated by controlling the moving of the moving object by a real person, more machine behavior characteristics can be learned by learning the moving tracks generated by the invention, and the man-machine identification of the sliding verification code and the blocking capability of the automatic verification of the machine are optimized.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for system/apparatus embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference may be made to some descriptions of the method embodiments for relevant points.

Claims (10)

1. A method for determining a moving track of a moving object in a sliding verification code is characterized by comprising the following steps:
obtaining the distance of the moving object in the sliding verification code to move;
determining the number of track points included in the movement track to be determined of the moving object and the coordinate value of each track point in the first space dimension according to the first function matched with the distance;
according to a preset duration interval, for any other track point except the last track point in the moving direction: determining the time interval corresponding to the track point, wherein the time interval corresponding to the track point is as follows: a time interval between a first time when the moving object reaches the position of the track point and a second time when the moving object reaches the position of the next track point in the moving direction;
and determining the moving track of the moving object according to the coordinate values of the track points and the time intervals corresponding to the track points.
2. The method of claim 1, wherein the first function is a first derivative that increases and then decreases.
3. The method of claim 1, wherein the first function is:
Figure FDA0002675377290000011
wherein d is the distance, m is a stretch coefficient, n is a translation coefficient, p is a random factor, x is a track point number and x is a natural number, and f (x) is the distance from the track point numbered with x to the initial position of the moving object.
4. The method of claim 3, wherein 5 ≦ m ≦ 50, and/or 4 ≦ n ≦ 5.
5. The method of claim 1, wherein obtaining the distance to be moved by the mobile object in the sliding verification code comprises:
obtaining a complete picture corresponding to a background picture used by the sliding verification code;
identifying the positions of jigsaw puzzle blocks and the positions of gaps in the background picture according to the complete picture;
and obtaining the distance of the moving object in the sliding verification code to move according to the position of the notch and the position of the jigsaw puzzle block.
6. The method according to claim 3, wherein the determining, according to the first function matched with the distance, the number of track points included in the movement track to be determined of the moving object and the coordinate value of each track point in the first space dimension includes:
inputting a first natural number as an independent variable into a first function matched with the distance to obtain a dependent variable corresponding to the first natural number;
and when the ratio of the dependent variable to the distance is not lower than a threshold value, determining the number of track points included in the movement track to be determined of the moving object and the coordinate value of each track point in a first space dimension according to the first natural number.
7. The method of claim 1, wherein determining the time interval corresponding to the trace point comprises:
and randomly selecting one time length in the preset time length interval, and determining the time length as the time interval corresponding to the track point.
8. The method according to claim 1, wherein the determining the movement trajectory of the moving object according to the coordinate values of the track points and the time intervals corresponding to the track points comprises:
and storing the coordinate values of the track points and the time intervals corresponding to the track points as the moving track of the moving object.
9. The method of any one of claims 1 to 8, further comprising:
and performing machine learning on the determined movement track to generate a movement track identification model for identifying automatic verification of the machine.
10. An apparatus for determining a movement trajectory of a moving object in a slide validation code, comprising: the device comprises a moving distance obtaining module, a track point determining module, a time interval determining module and a moving track determining module, wherein:
the moving distance obtaining module is used for obtaining the distance of the moving object to be moved in the sliding verification code;
the track point determining module is used for determining the number of track points included in the movement track to be determined of the moving object and the coordinate value of each track point in a first space dimension according to the first function matched with the distance;
the time interval determining module is used for determining any other track point except the last track point in the moving direction according to a preset time interval: determining the time interval corresponding to the track point, wherein the time interval corresponding to the track point is as follows: a time interval between a first time when the moving object reaches the position of the track point and a second time when the moving object reaches the position of the next track point in the moving direction;
and the moving track determining module is used for determining the moving track of the moving object according to the coordinate values of the track points and the time intervals corresponding to the track points.
CN201910156177.3A 2019-03-01 2019-03-01 Method and device for determining moving track of moving object in sliding verification code Active CN109902474B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910156177.3A CN109902474B (en) 2019-03-01 2019-03-01 Method and device for determining moving track of moving object in sliding verification code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910156177.3A CN109902474B (en) 2019-03-01 2019-03-01 Method and device for determining moving track of moving object in sliding verification code

Publications (2)

Publication Number Publication Date
CN109902474A CN109902474A (en) 2019-06-18
CN109902474B true CN109902474B (en) 2020-11-03

Family

ID=66946039

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910156177.3A Active CN109902474B (en) 2019-03-01 2019-03-01 Method and device for determining moving track of moving object in sliding verification code

Country Status (1)

Country Link
CN (1) CN109902474B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110427737A (en) * 2019-06-20 2019-11-08 平安科技(深圳)有限公司 Man-machine recognition methods, device and the computer equipment of operation behavior
CN111309222B (en) * 2019-11-28 2021-05-04 苏宁金融科技(南京)有限公司 Sliding block notch positioning and dragging track generation method for sliding block verification code
CN110955881A (en) * 2019-11-28 2020-04-03 杭州米络星科技(集团)有限公司 Simple verification method based on image movement
CN111125669B (en) * 2019-12-17 2022-03-01 美的集团股份有限公司 Sliding operation man-machine recognition method and device, electronic equipment and storage medium
CN111125670B (en) * 2019-12-17 2022-03-01 美的集团股份有限公司 Sliding track man-machine recognition method and device, electronic equipment and storage medium
CN111428228A (en) * 2020-02-28 2020-07-17 平安科技(深圳)有限公司 Cracking method, device, equipment and storage medium of extreme-test sliding verification code
CN112819693B (en) * 2021-04-19 2022-04-22 北京每日优鲜电子商务有限公司 Sliding verification code generation method and device, electronic equipment and computer readable medium
CN113254912B (en) * 2021-05-26 2023-06-02 多益网络有限公司 Sliding verification method, sliding verification device, storage medium and computer equipment
CN114035734A (en) * 2021-11-10 2022-02-11 浪潮卓数大数据产业发展有限公司 Simulation sliding track implementation method and tool for App simulation touch

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104700007A (en) * 2015-03-18 2015-06-10 詹万泉 Gesture impression password setting and application method
CN106815515A (en) * 2016-12-12 2017-06-09 微梦创科网络科技(中国)有限公司 A kind of identifying code implementation method and device based on track checking
CN107729729A (en) * 2017-09-18 2018-02-23 北京知道未来信息技术有限公司 It is a kind of based on random forest slip identifying code automatically by method of testing
CN107908300A (en) * 2017-11-17 2018-04-13 哈尔滨工业大学(威海) A kind of synthesis of user's mouse behavior and analogy method and system
CN108460269A (en) * 2018-03-21 2018-08-28 广州多益网络股份有限公司 Verification method and device, verification terminal device
CN108491714A (en) * 2018-04-09 2018-09-04 众安信息技术服务有限公司 The man-machine recognition methods of identifying code

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104700007A (en) * 2015-03-18 2015-06-10 詹万泉 Gesture impression password setting and application method
CN106815515A (en) * 2016-12-12 2017-06-09 微梦创科网络科技(中国)有限公司 A kind of identifying code implementation method and device based on track checking
CN107729729A (en) * 2017-09-18 2018-02-23 北京知道未来信息技术有限公司 It is a kind of based on random forest slip identifying code automatically by method of testing
CN107908300A (en) * 2017-11-17 2018-04-13 哈尔滨工业大学(威海) A kind of synthesis of user's mouse behavior and analogy method and system
CN108460269A (en) * 2018-03-21 2018-08-28 广州多益网络股份有限公司 Verification method and device, verification terminal device
CN108491714A (en) * 2018-04-09 2018-09-04 众安信息技术服务有限公司 The man-machine recognition methods of identifying code

Also Published As

Publication number Publication date
CN109902474A (en) 2019-06-18

Similar Documents

Publication Publication Date Title
CN109902474B (en) Method and device for determining moving track of moving object in sliding verification code
CN109034397A (en) Model training method, device, computer equipment and storage medium
CN110738101B (en) Behavior recognition method, behavior recognition device and computer-readable storage medium
US20170153787A1 (en) Injection of 3-d virtual objects of museum artifact in ar space and interaction with the same
WO2018032947A1 (en) Method for realizing three-dimensional model authentication code and device thereof
EP3379396A1 (en) Method for acting on augmented reality virtual objects
CN108229277A (en) Gesture identification, control and neural network training method, device and electronic equipment
WO2015000286A1 (en) Three-dimensional interactive learning system and method based on augmented reality
US7751627B2 (en) Image dominant line determination and use
KR102106135B1 (en) Apparatus and method for providing application service by using action recognition
EP3230920B1 (en) Method for recognizing if a user of an electronic terminal is a human or a robot
WO2012164562A1 (en) Computer vision based control of a device using machine learning
CN109816758B (en) Two-dimensional character animation generation method and device based on neural network
CN111178170B (en) Gesture recognition method and electronic equipment
CN111638784B (en) Facial expression interaction method, interaction device and computer storage medium
CN113254491A (en) Information recommendation method and device, computer equipment and storage medium
CN113238705A (en) Virtual keyboard interaction method and system
KR102063408B1 (en) Method and apparatus for interaction with virtual objects
KR101447958B1 (en) Method and apparatus for recognizing body point
CN111062022A (en) Slider verification method and device based on disturbance visual feedback and electronic equipment
US20140018167A1 (en) User manipulation of voronoi diagram game mechanics
CN114610155A (en) Gesture control method and device, display terminal and storage medium
CN114202799A (en) Method and device for determining change speed of controlled object, electronic equipment and storage medium
CN113781271A (en) Makeup teaching method and device, electronic equipment and storage medium
CN110930488A (en) Fish body behavior simulation method, device, equipment and storage medium

Legal Events

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