Sliding verification code design method based on clock and application thereof

By introducing clock elements and random rotation ratios into the sliding verification code, the predictability problem of existing sliding verification codes in machine recognition is solved, achieving higher security and user experience.

CN119808059AInactive Publication Date: 2025-04-11ANHUI HANGTIAN INFORMATION CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411877871.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-04-11
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing sliding verification codes are predictable in machine recognition, resulting in insufficient security and affecting real-person recognition operations.

Method used

The clock-based sliding verification code design method is adopted. By randomly generating transaction ID, initial time and target time, the standard value of the slider sliding distance is calculated, and the hour hand, minute hand and slider are set on the clock base map. When the user drags the slider, the hour hand and minute hand rotate synchronously, the rotation ratio is randomly set, and the slider drag distance is collected for verification.

Benefits of technology

It improves the unpredictability of machine recognition, thereby enhancing the security of verification codes, reducing the machine pass rate, and not affecting the real person's identification operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119808059A_ABST
    Figure CN119808059A_ABST
Patent Text Reader

Abstract

The invention discloses a clock-based sliding verification code design method, which comprises the following steps: calling an encryption interface in response to a front end, randomly generating a transaction ID (Identity), initial time and target time, and calculating to obtain a standard value of a sliding distance of a sliding block required by a user; the clock base map, the hour hand picture, the minute hand picture, the initial time, the target time and the transaction ID of the fixed address are returned to the front end, the hour hand and the minute hand are placed on the upper layer of the clock base map according to the initial time, a sliding block is placed in the clock base map, and a user is prompted to drag the sliding block to adjust the time of the clock to the target time; in response to the fact that a user drags the sliding block to enable the hour hand picture and the minute hand picture to synchronously rotate, collecting the sliding block dragging distance and submitting the sliding block dragging distance and the transaction ID to a verification interface; and the verification interface judges whether the difference between the sliding block dragging distance and the sliding distance standard value is within a threshold value so as to determine whether verification is passed or not. Compared with a traditional sliding verification code, the sliding verification code has higher unpredictability for machine identification, so that better safety is obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of structural optimization design, and in particular to a clock-based sliding verification code design method, a clock-based sliding verification code design device, an electronic device, and a computer-readable storage medium. Background Art

[0002] CAPTCHA stands for "Completely Automated Public Turing test to tell Computers and Humans Apart", which is a public fully automatic program to distinguish whether a user is a computer or a human. Currently, CAPTCHA has been widely used in login, registration and other scenarios. There are many different CAPTCHAs on the market, and their common goal is to block robots and only allow real people to pass the verification.

[0003] However, as new verification codes continue to emerge, corresponding cracking methods are also emerging. A good verification code generally needs to meet the following characteristics: ① It conforms to the cognition of most people; ② The authentication operation can be easily completed by most people; ③ It is difficult for machines to recognize or pass.

[0004] Conventional sliding verification codes on the market are basically sliding puzzle verification codes (aligning an uneven small picture with the corresponding position of the large picture by sliding the slider). The defect of this solution is that the width of the large picture and the slider track is a fixed ratio. When the slider slides to the left, the small picture must be on the left of the large picture; when the slider slides to the right, the small picture must be on the right of the large picture. Then the machine recognition can obtain the ratio of the large picture and the slider track, and the coordinates of the pit position on the large picture, and can calculate the distance the slider needs to slide to make the small picture reach the corresponding position. This solution can only be processed according to the above-mentioned point ③ characteristics to reduce the machine's pass rate, adding noise, interference lines and other solutions to the picture to reduce the machine's recognition success rate. However, after years of technological development, the actual effect of this solution is average, and it will affect the recognition operation of real people. Summary of the invention

[0005] In order to overcome the defects of the above-mentioned prior art, an embodiment of the present invention provides a clock-based sliding verification code design method and application, which is more unpredictable for machine recognition than traditional sliding verification codes, thereby achieving better security.

[0006] On the one hand, an embodiment of the present invention proposes a clock-based sliding verification code design method, including: in response to the front end calling the encryption interface, randomly generating a transaction ID, an initial time, and a target time, and calculating the standard value of the sliding distance of the slider required by the user; returning the clock base map, the hour hand image, the minute hand image, the initial time, the target time and the transaction ID of the fixed address to the front end, the front end displays the clock base map, and places the hour hand image and the minute hand image on the upper layer of the clock base map according to the initial time; placing a slider in the clock base map, and prompting the user to drag the slider to adjust the clock time to the target time; in response to the user dragging the slider, making the hour hand image and the minute hand image rotate synchronously, and collecting the sliding distance of the user dragging the slider, and submitting the sliding distance and the transaction ID to the verification interface; judging through the verification interface whether the difference between the sliding distance of the user dragging the slider and the standard value of the sliding distance calculated in advance is within a threshold to determine whether the verification is passed.

[0007] In one embodiment of the present invention, the clock-based sliding verification code design method also includes: randomly setting the rotation ratio of the hour hand image and the minute hand image as the slider slides, so that the number of pixels required to move each time the slider is dragged to adjust the clock time to the target time is different; and calculating the sliding distance of the slider based on the difference between the initial time and the target time and the set rotation ratio.

[0008] In one embodiment of the present invention, the initial time and the target time are expressed using a 24-hour system, and it is set that the initial time and the target time do not cross 0 o'clock.

[0009] In one embodiment of the present invention, the target time is the initial time plus t minutes, and the value range of t is [10, 360] minutes, so as to ensure that the minute hand rotates through at least a certain angle.

[0010] In one embodiment of the present invention, the rotation ratio ranges from [t*6 / 360, 360*6 / 360], and when the initial time and the target time interval are integer hours, the hour hand is controlled to rotate instead of the minute hand in response to the user dragging the slider.

[0011] In one embodiment of the present invention, the minute hand is allowed to rotate counterclockwise so that the target time is smaller than the initial time.

[0012] In one embodiment of the present invention, before displaying the clock background image, the method further includes: rotating the clock background image by a certain angle in an initial state to increase the complexity of the verification code.

[0013] On the other hand, the embodiment of the present invention also proposes a clock-based sliding verification code design device, including: a sliding distance calculation module, which is used to randomly generate a transaction ID, an initial time, a target time, and calculate the standard value of the sliding distance of the slider required by the user in response to the front end calling the encryption interface; a clock generation module, which is used to return the clock base map, the hour hand image, the minute hand image, the initial time, the target time and the transaction ID of the fixed address to the front end, and the front end displays the clock base map, and places the hour hand image and the minute hand image on the upper layer of the clock base map according to the initial time; a sliding prompt module, which is used to place a slider in the clock base map, and prompt the user to drag the slider to adjust the clock time to the target time; a sliding verification module, which is used to respond to the user dragging the slider, so that the hour hand image and the minute hand image rotate synchronously, and collect the sliding distance of the user dragging the slider, and submit the sliding distance and the transaction ID to the verification interface; a verification judgment module, which is used to judge through the verification interface whether the difference between the sliding distance of the user dragging the slider and the standard value of the sliding distance calculated in advance is within a threshold to determine whether the verification is passed.

[0014] On the other hand, an embodiment of the present invention further proposes an electronic device, comprising: a memory and one or more processors connected to the memory, the memory storing a computer program, and the processor being used to execute the computer program to implement the clock-based sliding verification code design method as described in any one of the above embodiments.

[0015] On the other hand, an embodiment of the present invention further proposes a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to execute the clock-based sliding verification code design method as described in any one of the above embodiments.

[0016] It can be seen from the above that, compared with the prior art, the above embodiments of the present invention can have at least one or more of the following beneficial effects:

[0017] By randomly generating a transaction ID, initial time, and target time, the standard value of the slider sliding distance required by the user is calculated and returned to the front end. The front end generates and displays a clock base map, and sets the hour hand, minute hand, and slider on the clock base map. When the user drags the slider, the hour hand image and the minute hand image rotate synchronously, and the rotation ratio is randomly set. The distance the slider is dragged is collected to verify whether the verification is passed. Compared with traditional sliding verification codes, it is more unpredictable for machine recognition, thereby achieving better security. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0019] Figure 1 A flowchart of a clock-based sliding verification code design method provided by an embodiment of the present invention;

[0020] Figure 2 A schematic diagram of the structure of a clock-based sliding verification code design device provided by an embodiment of the present invention;

[0021] Figure 3 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention;

[0022] Figure 4 A schematic diagram of the structure of a computer-readable storage medium provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0023] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other. The present invention will be described below with reference to the accompanying drawings and in combination with the embodiments.

[0024] In order to enable ordinary technicians in the field to better understand the technical solution of the present invention, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments, and all should belong to the protection scope of the present invention.

[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are applicable to distinguishing similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition. The terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or are proprietary to these processes, methods, products or devices.

[0026] It should also be noted that the division of multiple embodiments in the present invention is only for the convenience of description and should not constitute a special limitation. The features in various embodiments can be combined and referenced to each other without contradiction.

[0027] like Figure 1As shown, the first embodiment of the present invention proposes a clock-based sliding verification code design method, for example, including: step S1, in response to the front end calling the encryption interface, randomly generating a transaction ID, an initial time, and a target time, and calculating the standard value of the sliding distance of the slider required by the user; step S2, returning the clock base map, the hour hand image, the minute hand image, the initial time, the target time and the transaction ID of the fixed address to the front end, and the front end displays the clock base map, and places the hour hand image and the minute hand image on the upper layer of the clock base map according to the initial time; step S3, placing a slider in the clock base map, and prompting the user to drag the slider to adjust the clock time to the target time; step S4, in response to the user dragging the slider, making the hour hand image and the minute hand image rotate synchronously, and collecting the sliding distance of the user dragging the slider, and submitting the sliding distance and the transaction ID to the verification interface; step S5, judging through the verification interface whether the difference between the sliding distance of the user dragging the slider and the standard value of the sliding distance calculated in advance is within the threshold to determine whether the verification is passed.

[0028] Specifically, in step S1, for example, the server backend responds to the user's operation of calling the encryption interface at the front end, and the backend randomly generates a transaction ID, an initial time (assumed to be 12:00), and a target time (assumed to be 13:20). At the same time, based on the initial time, the target time and the rotation ratio of the clock as the slider slides, a standard value of the sliding distance required by the user is calculated and stored for subsequent verification by the user.

[0029] In one embodiment, the sliding distance is calculated based on the difference between the initial time and the target time and the set rotation ratio. The rotation ratio is set randomly, so that each time the slider is dragged to adjust the clock time to the target time, the number of pixels required to move the slider is different, thereby increasing the difficulty of machine recognition.

[0030] In step S2, for example, the server backend returns the clock base image, hour hand image, minute hand image, initial time, target time and transaction ID of the fixed address to the front end. Preferably, the initial time and target time are accurate to minutes, and the initial time is less than the target time.

[0031] In one embodiment, the target time is the initial time plus t minutes, and the value range of t is [10, 360] minutes, so as to ensure that the minute hand rotates through at least a certain angle.

[0032] In one embodiment, the initial time and the target time are expressed in a 24-hour system and are guaranteed not to cross 0 o'clock, so as to ensure that the operation is easy to understand. In addition, the initial time and the target time will not differ greatly, for example, they are controlled within 360 minutes, mainly to control that the minute hand does not rotate too much when the slider slides 1 pixel, otherwise it will be difficult to operate the minute hand to locate the target time when sliding to the final stage.

[0033] After the front end gets the clock base map, hour hand image, minute hand image, initial time, target time and transaction ID returned by the interface, it displays the clock base map and places the hour hand and minute hand images on the upper layer of the base map according to the initial time (12:00).

[0034] In step S3, for example, a slider is placed below the clock base map, and a prompt "Please drag the slider to adjust the clock time to 12:20" (target time) is added between the slider and the base map. For example, the user holds down the left mouse button to drag the slider. Generally, the width of the verification code sliding track is between 300-500 pixels. For example, the design width is 360 pixels for the convenience of calculation.

[0035] In step S4, for example, the server backend responds to the user dragging the slider to make the hour hand image and the minute hand image rotate synchronously. In the process of the user dragging the slider, in order to make the hour hand image and the minute hand image rotate synchronously, the developer needs to design an interactive logic that not only takes into account the user experience, but also ensures the security and effectiveness of the verification mechanism.

[0036] Specifically, in order to achieve the synchronous rotation of the hour hand graph and the minute hand graph, a mapping relationship between the slider position and the time must be established. This means that every time the user moves the slider, the system should be able to calculate the corresponding time based on the position of the slider and adjust the angles of the hour and minute hands accordingly. Specifically, the maximum value of the slider can be set to correspond to the maximum number of minutes in a day (i.e. 1440 minutes), while the minimum value corresponds to zero. When the user drags the slider, the program determines the currently selected time point based on the proportion of the slider's current position to the total length, and calculates the angle that the hour and minute hands should point to at this time through a predefined formula:

[0037] For the minute hand, since one revolution represents 60 minutes, the minute hand rotates 6 degrees (360° / 60) for every minute that passes. In addition, taking into account the influence of the second hand, the minute hand advances an additional 0.1 degrees (6° / 60) for every second that passes.

[0038] For the hour hand, it is not only affected by the minute, but also by the hour. In one hour, the hour hand will move 30 degrees (360° / 12), and in every minute, the hour hand will move forward 0.5 degrees (30° / 60). If it is further subdivided into seconds, the hour hand will move forward about 0.0083 degrees (0.5° / 60) per second.

[0039] Next, in order to update the hour and minute hands in real time as the slider is dragged, you can use JavaScript event listeners to capture the user's mouse movements. For example, trigger the mousedown event when the user presses and drags the slider, and continue to listen to the mousemove event to obtain the latest slider position information. Once the slider position changes, immediately update the angles of the hour and minute hands and refresh the display on the page. When the user releases the mouse button, stop listening to the mousemove event.

[0040] In one embodiment, the range of the clock rotation ratio is [t*6 / 360, 360*6 / 360], and when the initial time and the target time interval are integer hours, dragging the slider controls the rotation of the hour hand instead of the minute hand to improve the verification efficiency. Specifically, assuming that the initial time A is 12:00, the target time B is 13:20, and the range of the rotation ratio C is [80 minutes*6 degrees / 360 pixels, 6] = [1.33, 6]; a random rotation ratio, assuming it is 2, then the user needs to slide distance = (BA)*6 / C = 240 pixels.

[0041] Finally, in step S5, for example, the server backend collects the distance the user drags the slider and submits this distance and the transaction ID to the verification interface, which determines whether the distance the user drags the slider and the pre-stored standard value are within the threshold to determine whether the verification is passed.

[0042] In one embodiment, in order to ensure the security of the verification code, the server side also needs to verify the received time data. Usually, the backend will pre-set a correct target time range and allow a certain error interval. Only when the time selected by the user falls within this range, the verification is considered successful. This not only improves security, but also prevents users from failing the verification due to slight operational deviations.

[0043] In one embodiment, for example, the target time is allowed to be smaller than the initial time, that is, the minute hand can rotate counterclockwise, which can also be used to implement the present solution, and the present application is not limited to this.

[0044] In one embodiment, the clock background image may be rotated by a certain angle in the initial state, for example, so as to further increase the complexity of the verification code.

[0045] In summary, the first embodiment of the present invention proposes a clock-based sliding verification code design method, which randomly generates a transaction ID, an initial time, and a target time, calculates the standard value of the slider sliding distance required by the user and returns it to the front end, and generates and displays a clock background map by the front end, and sets the hour hand, minute hand and slider on the clock background map. When the user drags the slider, the hour hand image and the minute hand image rotate synchronously, and the rotation ratio is randomly set. The distance the slider is dragged is collected for verification to determine whether the verification is passed. Compared with traditional sliding verification codes, it has greater unpredictability for machine recognition, thereby obtaining better security.

[0046] In addition, if Figure 2 As shown, the second embodiment of the present invention further proposes a clock-based sliding verification code design device 20, including: a sliding distance calculation module 201, a clock generation module 202, a sliding prompt module 203, a sliding verification module 204 and a verification judgment module 205.

[0047] Among them, the sliding distance calculation module 201 is used to randomly generate a transaction ID, an initial time, a target time, and calculate the standard value of the sliding distance of the slider required by the user in response to the front end calling the encryption interface; the clock generation module 202 is used to return the clock base map, the hour hand image, the minute hand image, the initial time, the target time and the transaction ID of the fixed address to the front end, and the front end displays the clock base map, and places the hour hand image and the minute hand image on the upper layer of the clock base map according to the initial time; the sliding prompt module 203 is used to place a slider in the clock base map, and prompt the user to drag the slider to adjust the clock time to the target time; the sliding verification module 204 is used to respond to the user dragging the slider, so that the hour hand image and the minute hand image rotate synchronously, and collect the sliding distance of the user dragging the slider, and submit the sliding distance and the transaction ID to the verification interface; the verification judgment module 205 is used to judge through the verification interface whether the difference between the sliding distance of the user dragging the slider and the standard value of the sliding distance calculated in advance is within the threshold to determine whether the verification is passed.

[0048] The clock-based sliding verification code design method implemented by the clock-based sliding verification code design device disclosed in the second embodiment of the present invention is as described in the first embodiment, so it will not be described in detail here. Optionally, the various modules and the above-mentioned other operations or functions in the second embodiment are respectively for implementing the method described in the first embodiment, and the beneficial effects of the clock-based sliding verification code design device provided by this embodiment are the same as the beneficial effects of the clock-based sliding verification code design method provided by the first embodiment, and for the sake of brevity, they are not repeated here.

[0049] like Figure 3As shown, the third embodiment of the present invention further proposes an electronic device 30, for example, including: at least one processing unit 32, and at least one storage unit 31, wherein the storage unit 31 stores a computer program, and when the computer program is executed by the processing unit 32, the processing unit 32 executes the method described in the first embodiment, and the beneficial effects of the electronic device provided by this embodiment are the same as the beneficial effects of the clock-based sliding verification code design method provided by the first embodiment.

[0050] like Figure 4 As shown, the fourth embodiment of the present invention further provides a computer-readable storage medium 40 on which a computer program is stored, and the program implements the steps of the above method when executed by a processor, and the beneficial effects of the computer-readable storage medium 40 provided by this embodiment are the same as the beneficial effects of the clock-based sliding verification code design method provided by the first embodiment.

[0051] Among them, computer-readable storage media may include, but are not limited to, any type of disk, including floppy disks, optical disks, DVDs, CD-ROMs, microdrives and magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.

[0052] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0053] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0054] In the several embodiments provided in the present application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0055] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0056] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0057] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, disk or optical disk and other media that can store program code.

[0058] A person skilled in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by entering a program to instruct the relevant hardware. The program may be stored in a computer-readable memory, and the memory may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0059] The above is only an exemplary embodiment of the present disclosure, and the scope of the present disclosure cannot be limited thereto. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the specification and practicing the disclosure here, those skilled in the art will easily think of the implementation scheme of the present disclosure. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field not recorded in the present disclosure. The description and examples are regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.

[0060] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0061] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A clock-based sliding verification code design method, characterized in that: include: In response to the front-end calling the encryption interface, the transaction ID, initial time, and target time are randomly generated, and the standard value of the slider sliding distance required by the user is calculated; The clock base map, hour hand image, minute hand image, initial time, target time and transaction ID of the fixed address are returned to the front end, and the front end displays the clock base map and places the hour hand image and minute hand image on the upper layer of the clock base map according to the initial time; Placing a slider in the clock base map, and prompting the user to drag the slider to adjust the clock time to the target time; In response to the user dragging the slider, the hour hand image and the minute hand image are rotated synchronously, and the sliding distance of the slider dragged by the user is collected, and the sliding distance and the transaction ID are submitted to the verification interface; Whether the verification is passed is determined by judging through the verification interface whether the difference between the sliding distance of the slider dragged by the user and the standard value of the sliding distance calculated in advance is within a threshold.

2. The clock-based sliding verification code design method according to claim 1 is characterized in that: Also includes: The rotation ratio of the hour hand image and the minute hand image as the slider slides is randomly set, so that the number of pixels required to move each time the slider is dragged to adjust the clock time to the target time is different; The sliding distance of the slider is calculated according to the difference between the initial time and the target time and the set rotation ratio.

3. The clock-based sliding verification code design method according to claim 1 is characterized in that: The initial time and the target time are expressed using a 24-hour system, and it is set that the initial time and the target time do not cross 0 o'clock.

4. The clock-based sliding verification code design method according to claim 1, characterized in that: The target time is the initial time plus t minutes, where the value range of t is [10, 360] minutes, to ensure that the minute hand rotates through at least a certain angle.

5. The clock-based sliding verification code design method according to claim 4 is characterized in that: The rotation ratio has a value range of [t*6 / 360, 360*6 / 360], and when the initial time and the target time interval are integer hours, the hour hand is controlled to rotate instead of the minute hand in response to the user dragging the slider.

6. The clock-based sliding verification code design method according to claim 1, characterized in that: The minute hand is allowed to rotate counterclockwise so that the target time is smaller than the initial time.

7. The clock-based sliding verification code design method according to claim 1, characterized in that: Before displaying the clock base map, it also includes: The clock base image is rotated by a certain angle in the initial state to increase the complexity of the verification code.

8. A clock-based sliding verification code design device, characterized in that: include: The sliding distance calculation module is used to randomly generate a transaction ID, an initial time, and a target time in response to the front-end calling the encryption interface, and calculate the standard value of the sliding distance of the slider required by the user; A clock generation module is used to return a clock base map, an hour hand image, a minute hand image, an initial time, a target time and a transaction ID of a fixed address to the front end, and the front end displays the clock base map and places the hour hand image and the minute hand image on the upper layer of the clock base map according to the initial time; A sliding prompt module, used to place a slider in the clock base map and prompt the user to drag the slider to adjust the clock time to the target time; A sliding verification module, used for causing the hour hand image and the minute hand image to rotate synchronously in response to the user dragging the slider, collecting the sliding distance of the slider dragged by the user, and submitting the sliding distance and the transaction ID to the verification interface; The verification judgment module is used to judge whether the difference between the sliding distance of the slider dragged by the user and the standard value of the sliding distance calculated in advance is within a threshold value through the verification interface to determine whether the verification is passed.

9. An electronic device, characterized in that: include: A memory and one or more processors connected to the memory, the memory storing a computer program, and the processor being used to execute the computer program to implement the clock-based sliding verification code design method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable commands, and the computer-executable commands are used to execute the clock-based sliding verification code design method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Verification code data processing method and device

    CN108243154A

  • Man-machine verification method based on clock

    CN109711137A

  • Continuous controllable random rotation animation generation method and system

    CN117011424A

  • Clock with at least two hands and at least one dial

    DE202016006197U1

  • Multi-factor authentication with dynamic handshake quick-response code

    KR1020160035523A