Methods, verification methods and devices for generating dynamic verification codes

By using a dynamic CAPTCHA generation method, which identifies the movement trajectory of an image within a preset area and the location of random gaps, the problem of CAPTCHAs being easily cracked is solved, thereby improving security, reducing maintenance costs, and achieving efficient network security verification.

CN115801282BActive Publication Date: 2026-03-06BEIJING TOPSEC NETWORK SECURITY TECH +2
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-29
Publication Date
2026-03-06

AI Technical Summary

Technical Problem

Existing CAPTCHA verification methods are easily cracked by web crawlers, resulting in low data security and high maintenance costs.

Method used

A dynamic verification code generation method is adopted, which recognizes an image moving in real time within a preset verification area according to a preset trajectory, and uses whether the image is correctly reset as the verification method. By combining the randomly defined gap position of the gap image and the preset movement trajectory of the recognized image, a unique and random dynamic verification code is generated.

Benefits of technology

It increases the difficulty of cracking network security verification, reduces the maintenance cost of the verification system, saves server resources through caching pools, and improves data processing speed and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115801282B_ABST
    Figure CN115801282B_ABST
Patent Text Reader

Abstract

This disclosure provides a method, method, and apparatus for generating and verifying dynamic verification codes. The method includes: randomly acquiring a background image and a gap image from a pre-created image library based on a received verification code generation request; cutting the background image into a preset number of segments and assigning unique identification information to each segment; randomly selecting one background segment as a recognition image; moving the recognition image in real-time within a preset verification area according to a preset trajectory; and placing the gap image at the gap position of the recognition image; and generating a dynamic verification code based on the preset trajectory of the recognition image, the identification information of the background segments and the gap image. This method can increase the difficulty of cracking network security verification, save server resources, improve data processing speed and security, and reduce the maintenance cost of the verification system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of internet security technology, and in particular to a method for generating, verifying, and using dynamic verification codes. Background Technology

[0002] With the rapid development of the internet, major websites and applications are implementing access defense measures against web crawlers and bot detection technologies to better protect data security. Commonly used defense measures include blocking IP addresses, verifying logins, and using image CAPTCHAs for verification.

[0003] However, as web crawler technology continues to improve, some web crawlers are able to bypass anti-crawling measures by using proxy IPs, simulated accounts, and image recognition models to block them. They can obtain high-value data at low cost. Most websites can no longer implement anti-crawling defense measures due to the high cost and difficulty in maintaining them.

[0004] Related technologies typically employ methods like nine-grid image selection verification and slider verification as anti-scraping defenses. Nine-grid image selection verification requires manual matching of images to categories, which is time-consuming, labor-intensive, and easily cracked due to the nature of updating the image library. Slider verification requires users to drag a slider to a designated area to pass verification; however, the gaps in the slider verification code are easily calculated, allowing web crawlers to exploit this vulnerability and use automated tools to simulate human intervention. These verification methods are relatively easy to crack, have high maintenance costs for the verification systems, and offer low data security. Summary of the Invention

[0005] In view of this, the present disclosure provides a method for generating dynamic verification codes, a verification method, and an apparatus. By moving the recognition image in the dynamic verification code in real time within a preset verification area according to a preset trajectory, and using whether the recognition image is correctly reset as the verification method, the difficulty of cracking network security verification can be increased, data security can be improved, and the maintenance cost of the verification system can be reduced.

[0006] In a first aspect, embodiments of this disclosure provide a method for generating dynamic verification codes, employing the following technical solution:

[0007] Based on the received verification code generation request, randomly select the background image and the gap image from the pre-created image library;

[0008] The background image is cut into a preset number of pieces, and a unique identifier is assigned to each of the resulting background fragments.

[0009] Randomly select one background fragment from the aforementioned background fragments as the recognition image;

[0010] The recognition image is moved in real time within a preset verification area according to a preset movement trajectory, and the gap image is set at the gap position of the recognition image;

[0011] A dynamic verification code is generated based on the preset movement trajectory of the acquired recognition image, the identification information of the background fragment and the gap image.

[0012] In some embodiments, the method further includes:

[0013] An array of a preset length is randomly generated, wherein each array contains several elements corresponding to the identification information of the background fragment, and the several elements contain the identification information of the notched image;

[0014] The dynamic verification code is generated by binding the background fragment, the identification information of the gap image, and the array, and then stored in a pre-created cache pool.

[0015] In some embodiments, the method further includes:

[0016] Obtain the coordinate information of the gap location in the gap image;

[0017] Based on the arrangement order of several elements in the array, a preset movement trajectory of the recognized image within a preset verification area is generated;

[0018] The coordinates of the gap location in the gap image and the preset movement trajectory of the recognized image are stored in the database of the server.

[0019] In some embodiments, the method further includes:

[0020] Several images downloaded from the target webpage will be preprocessed and saved to the image library;

[0021] Create a cache pool to store dynamic verification codes;

[0022] When the number of dynamic verification codes in the cache pool is less than a preset threshold, a verification code generation request is triggered.

[0023] Secondly, this disclosure also provides a method for verifying dynamic verification codes, employing the following technical solution:

[0024] Receive verification requests from clients;

[0025] According to the above-described method for generating dynamic verification codes, a dynamic verification code is obtained from the cache pool and displayed on the verification interface of the client. The recognition image in the dynamic verification code moves in real time within a preset verification area according to a preset movement trajectory.

[0026] Receive the trigger signal from the client to trigger the image recognition;

[0027] The real-time position coordinates of the recognized image are obtained according to the trigger signal, and the position coordinate information of the gap in the gap image in the dynamic verification code is also obtained.

[0028] When the real-time location coordinates of the identified image match the location coordinates of the gap in the image, the client's verification request is approved; when the real-time location coordinates of the identified image do not match the location coordinates of the gap in the image, the client's verification request is rejected.

[0029] In some embodiments, the method further includes:

[0030] When a user clicks the pause button on the verification interface, the movement of the image to be recognized is paused, and the icon of the pause button is changed to the icon of the start button.

[0031] When a user clicks on the start button on the verification interface, the system continues to control the recognition image to move in real time within the preset verification area according to a preset trajectory.

[0032] In some embodiments, the method further includes:

[0033] When the real-time location coordinates of the identified image match the location coordinates of the gap in the image, the user's entered username and login password are verified again.

[0034] When the account name and login password are successfully verified, the verification request from the client is granted;

[0035] When the account name and login password verification fails, the client's verification request is not approved.

[0036] In some embodiments, the method further includes:

[0037] Count the number of verification failures for the client.

[0038] When the number of verification failures of the client reaches a preset access threshold, the client is prohibited from making verification requests within a preset time period.

[0039] Thirdly, this disclosure also provides a dynamic verification code generation device, which adopts the following technical solution:

[0040] The image acquisition unit is configured to randomly acquire a background image and a notch image from a pre-created image library based on the received verification code generation request;

[0041] The image cutting unit is configured to cut the background image into a preset number of segments and set unique identification information for each of the resulting background fragments.

[0042] The random selection unit is configured to randomly select any one background fragment from the plurality of background fragments as the recognition image;

[0043] The setting unit is configured to move the recognition image in real time within a preset verification area according to a preset movement trajectory, and to set the gap image at the gap position of the recognition image;

[0044] The verification code generation unit is configured to generate a dynamic verification code based on the preset movement trajectory of the acquired recognition image, the background fragment, and the identification information of the gap image.

[0045] Fourthly, embodiments of this disclosure also provide a verification device for dynamic verification codes, including:

[0046] The verification request receiving unit is configured to receive verification requests from clients;

[0047] The verification code acquisition unit is configured to retrieve a dynamic verification code from a cache pool and display it on the verification interface of the client, wherein the recognition image in the dynamic verification code moves in real time within a preset verification area according to a preset movement trajectory.

[0048] The signal receiving unit is configured to receive a trigger signal from the client to trigger the recognition image;

[0049] The coordinate information acquisition unit is configured to acquire the real-time position coordinates of the recognition image according to the trigger signal, and to acquire the gap position coordinate information of the gap image in the dynamic verification code;

[0050] The verification unit is configured to accept the client's verification request when the real-time position coordinates of the recognized image match the gap position coordinates of the gap image; and to reject the client's verification request when the real-time position coordinates of the recognized image do not match the gap position coordinates of the gap image.

[0051] This disclosure provides a method, method, and apparatus for generating and verifying dynamic verification codes. By moving the recognition image in the dynamic verification code in real time within a preset verification area according to a preset trajectory, and using the correct reset of the recognition image as the verification method, the difficulty of cracking network security verification can be increased. By randomly defining the gap position of the gap image and randomly defining the preset movement trajectory of the recognition image, the uniqueness and randomness of the dynamic verification code can be guaranteed. By temporarily storing the dynamic verification code in a cache pool, server resources can be saved, data processing speed and security can be improved, and the maintenance cost of the verification system can be reduced.

[0052] The above description is merely an overview of the technical solution disclosed herein. In order to better understand the technical means of this disclosure and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0053] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0054] Figure 1 A flowchart illustrating a method for generating dynamic verification codes according to an embodiment of this disclosure;

[0055] Figure 2 A flowchart illustrating a dynamic verification code verification method provided in this embodiment of the disclosure;

[0056] Figure 3 A schematic diagram of the structure of a dynamic verification code generation device provided in an embodiment of this disclosure;

[0057] Figure 4 A schematic diagram of the structure of a dynamic verification code verification device provided in an embodiment of this disclosure;

[0058] Figure 5 This is a schematic block diagram of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation

[0059] The embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.

[0060] It should be understood that the following specific examples illustrate the implementation of this disclosure, and those skilled in the art can easily understand other advantages and effects of this disclosure from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. This disclosure can also be implemented or applied through other different specific implementation methods, and the details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this disclosure. It should be noted that, in the absence of conflict, the following embodiments and features in the embodiments can be combined with each other. Based on the embodiments in this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.

[0061] It should be noted that various aspects of embodiments within the scope of the appended claims are described below. It will be apparent that the aspects described herein can be embodied in a wide variety of forms, and any particular structure and / or function described herein is merely illustrative. Based on this disclosure, those skilled in the art will understand that one aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects set forth herein can be used to implement the device and / or practice the method. Additionally, this device and / or method can be implemented using structures and / or functionalities other than one or more of the aspects set forth herein.

[0062] It should also be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this disclosure. The drawings only show the components related to this disclosure and are not drawn according to the number, shape and size of the components in actual implementation. In actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0063] Furthermore, specific details are provided in the following description to facilitate a thorough understanding of the examples. However, those skilled in the art will understand that the described aspects can be practiced without these specific details.

[0064] like Figure 1 As shown, this disclosure provides a method for generating dynamic verification codes, executed on the server side, and may include the following steps:

[0065] S101. The server generates a request based on the received verification code and randomly selects a background image and a notch image from a pre-created image library.

[0066] Optionally, several images can be downloaded automatically from a target webpage (e.g., an image website). These downloaded images are then preprocessed, such as cropped, to a uniform size and format. Each image is assigned a unique identifier and saved to an image library. This embodiment only requires downloading images from the internet, eliminating the need for manual categorization and organization, thus reducing the cost of manually maintaining an image library used to generate dynamic verification codes.

[0067] Optionally, the server periodically retrieves images from image websites and updates the historical images in the image library to ensure dynamic updates of the image library.

[0068] The server generates a request based on the received verification code, randomly selects two images from a pre-created image library, uses one image as the background image, and the other image as the notch image.

[0069] S102. The server cuts the background image into a preset number of segments and sets unique identification information for each of the resulting background fragments.

[0070] Optionally, the background image can be divided into nine background fragments in a 3x3 grid, and each background fragment can be assigned an image number. The image number serves as the unique identifier for each background fragment. The image numbers of the nine background fragments can be sequential, such as image numbers 1 to 9.

[0071] S103. The server randomly selects one background fragment from several background fragments as the recognition image.

[0072] For example, one background fragment is randomly selected from the nine background fragments obtained after cutting as the recognition image. A gap image randomly obtained from the image library is cut according to the size of the recognition image, and the cut gap image is replaced in the gap position of the recognition image. The gap image and the other eight background fragments (excluding the recognition image) are combined to form the bottom image of the dynamic verification code.

[0073] S104. The server moves the recognized image in real time within a preset verification area according to a preset movement trajectory, and sets the gap image at the gap position of the recognized image.

[0074] Optionally, the preset verification area can be the area containing the nine background fragments obtained after cutting the background image. The image being recognized can move without a trajectory, flashing at the positions of the background fragments and the gap image according to a preset movement trajectory. The movement frequency can be randomly set to 1 to 1.5 seconds, waiting for user operation on the verification interface. For example, the user can click the pause button to stop the movement of the image being recognized, or click the start button to continue the movement of the image being recognized, or click the submit button to pause the movement of the image being recognized and verify the dynamic verification code through the server.

[0075] Optionally, the image to be recognized can be moved randomly within a preset verification area. When the image moves to the gap position, the user can click the pause button on the client's verification interface to check if the image is at the gap position. If the user confirms that the image is at the gap position, the user can click the submit button on the verification interface. The server matches the position coordinates of the recognized image with the gap position coordinates of the image based on the trigger signal of the submit button. If the position coordinates of the recognized image and the gap position coordinates of the image match, the client's verification request is approved; if the position coordinates of the recognized image and the gap position coordinates of the image do not match, the client's verification request is rejected.

[0076] S105. The server generates a dynamic verification code based on the preset movement trajectory of the acquired recognition image, the identification information of the background fragments and the gap image.

[0077] The embodiments disclosed herein can increase the difficulty of cracking dynamic verification codes while ensuring a good user experience, and can also reduce the maintenance cost of the verification system.

[0078] In some embodiments, the method for generating the dynamic verification code further includes:

[0079] Randomly generate an array of a preset length, wherein each array contains several elements corresponding to the identification information of the background fragments, and several elements contain the identification information of the notched image;

[0080] The identification information of the background fragments and the gap image are bound to the array to generate a dynamic verification code, and the dynamic verification code is stored in a pre-created cache pool.

[0081] Optionally, the length of the randomly generated array can be set according to the user's actual needs. For example, an array of length 6 can be randomly generated. Several elements in this array correspond to the image numbers of the background fragments (e.g., 1 to 9), while only one element in the array corresponds to the image number of the recognition image, that is, the image number corresponding to the position of the gap in the image. The randomly generated array is the preset movement trajectory of the recognition image during the movement process. The background fragments, the gap image, and the randomly generated array are bound together to generate a dynamic verification code and stored in the cache pool.

[0082] Optionally, a cache pool can be created on the server side to store dynamic verification codes. The cache pool can store the generated dynamic verification codes for statistical analysis and retrieval.

[0083] Based on website user access data, a preset threshold for the number of dynamic verification codes stored in the cache pool can be set. When the number of dynamic verification codes in the cache pool is less than the preset threshold, a verification code generation request is triggered, and the actual number of dynamic verification codes in the cache pool is not greater than the preset threshold.

[0084] Optionally, a cache pool can be established using a message queue, and the number of dynamic verification codes stored in the cache pool can be monitored in real time. When the number of dynamic verification codes stored in the cache pool is less than a preset threshold, a verification code generation request is immediately triggered. A new dynamic verification code is generated based on the verification code generation request and stored in the cache pool. By temporarily storing the different dynamic verification codes generated each time in the cache pool, it is more efficient to save server resources compared to storing them in the server's database.

[0085] In some embodiments, the method for generating the dynamic verification code further includes:

[0086] The server obtains the coordinates of the gap location in the image.

[0087] The server generates a preset movement trajectory of the recognized image within a preset verification area based on the arrangement order of several elements in the array.

[0088] The server stores the coordinates of the gap location in the image and the preset movement trajectory of the recognized image in its database.

[0089] Optionally, for example, the arrangement order of several elements can be (1, 2, 4, 6, 8, 9). The gap position where the identified image is located is the position of image number 2. The gap image is set at the gap position, and the identified image flashes and moves according to the positions of the background fragments corresponding to image numbers 1, 2, 4, 6, 8, and 9. When the identified image moves to the gap position, the user can click the pause button on the verification interface for manual verification. The manual verification confirms whether the identified image has moved to the gap position. When the identified image moves to the gap position, the user can click the submit button on the verification interface so that the server can verify it based on the position coordinates and movement trajectory of the identified image.

[0090] like Figure 2 As shown in the embodiments of this disclosure, a verification method for dynamic verification codes is also provided, including:

[0091] S201. The server receives the client's verification request.

[0092] S202. The server retrieves the dynamic verification code from the cache pool according to the above-mentioned dynamic verification code generation method and displays it on the client's verification interface. The recognition image in the dynamic verification code moves in real time within the preset verification area according to a preset movement trajectory.

[0093] For example, the image to be recognized can be moved by flashing along a preset trajectory from the gap position, and the movement interval of the image can be set between 1 and 1.5 seconds.

[0094] S203. The server receives the trigger signal from the client to trigger image recognition.

[0095] S204. The server obtains the real-time position coordinates of the image to be recognized based on the trigger signal, and obtains the position coordinate information of the gap in the image of the gap in the dynamic verification code.

[0096] S205. When the server determines that the real-time position coordinates of the recognized image match the position coordinates of the gap in the image, the server approves the client's verification request; when the server determines that the real-time position coordinates of the recognized image do not match the position coordinates of the gap in the image, the server rejects the client's verification request.

[0097] Optionally, the server receives a trigger signal triggered by the user clicking the submit button on the verification interface, obtains the current real-time position coordinates of the recognized image, and matches the current real-time position coordinates of the recognized image with the gap position coordinates of the gap image stored in the server's database. If the current real-time position coordinates of the recognized image match the gap position coordinates of the gap image stored in the server's database, the webpage content accessed by the user is displayed on the client's webpage interface after the client's verification request is approved; if the current real-time position coordinates of the recognized image do not match the gap position coordinates of the gap image stored in the server's database, the client's verification request is rejected.

[0098] Optionally, the server can also match the movement trajectory of the real-time acquired recognition image with the preset movement trajectory of the recognition image stored in the server's database. If the movement trajectory of the real-time acquired recognition image matches the preset movement trajectory of the recognition image stored in the server's database, the client's verification request is approved; if the movement trajectory of the real-time acquired recognition image does not match the preset movement trajectory of the recognition image stored in the server's database, the client's verification request is rejected.

[0099] This disclosure improves the difficulty of cracking dynamic verification codes by using a verification method that randomly selects whether the image has been correctly reset, and by randomly selecting images from a massive image library, while ensuring user experience.

[0100] In some embodiments, the verification method for the dynamic verification code further includes:

[0101] When the server detects that a user clicks the pause button on the verification interface, it pauses the image recognition process and changes the pause button icon to the start button icon.

[0102] When the server detects that the user clicks the start button on the verification interface, it continues to control the recognition image to move in real time within the preset verification area according to the preset movement trajectory.

[0103] In some embodiments, the verification method for the dynamic verification code further includes:

[0104] When the server determines that the real-time location coordinates of the recognized image match the location coordinates of the gap in the image, the server continues to verify the username and password entered by the user.

[0105] When the username and login password are successfully verified, the server accepts the client's verification request;

[0106] When username and password verification fails, the server does not accept the client's verification request.

[0107] In some embodiments, the verification method for the dynamic verification code further includes:

[0108] The server counts the number of client verification failures;

[0109] When the number of failed verification attempts by a client reaches a preset access threshold, the server will prohibit the client from making verification requests for a preset period of time.

[0110] For example, a preset access threshold can be set to 10 attempts, and a preset time period can be set to 5 minutes. When a client's verification failure count reaches 10, the client will be prohibited from making verification requests for 5 minutes. This can prevent malicious login access to the website and improve the ability to protect data security.

[0111] This disclosure provides a method, method, and apparatus for generating and verifying dynamic verification codes. By moving the recognition image in the dynamic verification code in real time within a preset verification area according to a preset trajectory, and using the correct reset of the recognition image as the verification method, the difficulty of cracking network security verification can be increased. By randomly defining the gap position of the gap image and randomly defining the preset movement trajectory of the recognition image, the uniqueness and randomness of the dynamic verification code can be guaranteed. By temporarily storing the dynamic verification code in a cache pool, server resources can be saved, data processing speed and security can be improved, and the maintenance cost of the verification system can be reduced.

[0112] like Figure 3 As shown in the embodiments of this disclosure, a dynamic verification code generation device is also provided, which adopts the following technical solution:

[0113] Image acquisition unit 31 is configured to randomly acquire background image and gap image from a pre-created image library based on the received verification code generation request;

[0114] The image cutting unit 32 is configured to cut the background image into a preset number of pieces and set unique identification information for the resulting background fragments.

[0115] The random selection unit 33 is configured to randomly select any one background fragment from a number of background fragments as the recognition image;

[0116] Setting unit 34 is configured to move the recognition image in real time within a preset verification area according to a preset movement trajectory, and to set the gap image at the gap position of the recognition image.

[0117] The verification code generation unit 35 is configured to generate a dynamic verification code based on the preset movement trajectory of the acquired recognition image, the identification information of the background fragments and the gap image.

[0118] like Figure 4As shown in the figure, this disclosure also provides a verification device for dynamic verification codes, including:

[0119] The verification request receiving unit 41 is configured to receive verification requests from clients;

[0120] The verification code acquisition unit 42 is configured to retrieve a dynamic verification code from the cache pool and display it on the client's verification interface, wherein the recognition image in the dynamic verification code moves in real time within a preset verification area according to a preset movement trajectory.

[0121] The signal receiving unit 43 is configured to receive a trigger signal from the client to trigger image recognition;

[0122] The coordinate information acquisition unit 44 is configured to acquire the real-time position coordinates of the recognition image based on the trigger signal, and to acquire the gap position coordinate information of the gap image in the dynamic verification code;

[0123] The verification unit 45 is configured to pass the client's verification request when the real-time position coordinates of the recognized image match the gap position coordinates of the gap image; and to fail the client's verification request when the real-time position coordinates of the recognized image do not match the gap position coordinates of the gap image.

[0124] An electronic device according to embodiments of the present disclosure includes a memory and a processor. The memory is used to store non-transitory computer-readable instructions. Specifically, the memory may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may, for example, include random access memory (RAM) and / or cache memory. The non-volatile memory may, for example, include read-only memory (ROM), a hard disk, flash memory, etc.

[0125] The processor may be a central processing unit (CPU) or other form of processing unit with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions. In one embodiment of this disclosure, the processor is used to execute the computer-readable instructions stored in the memory, causing the electronic device to execute the dynamic verification code generation method of the foregoing embodiments of this disclosure, or to execute all or part of the steps of the dynamic verification code of the foregoing embodiments of this disclosure.

[0126] Those skilled in the art will understand that, in order to solve the technical problem of how to achieve a good user experience, this embodiment may also include well-known structures such as communication buses and interfaces, and these well-known structures should also be included within the protection scope of this disclosure.

[0127] like Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. It illustrates a structural schematic diagram suitable for implementing the electronic device in the embodiment of the present disclosure. Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0128] like Figure 5 As shown, an electronic device may include a processing unit (such as a central processing unit, graphics processing unit, etc.) that can perform various appropriate actions and processes based on a program stored in read-only memory (ROM) or a program loaded from a storage device into random access memory (RAM). The RAM also stores various programs and data required for the operation of the electronic device. The processing unit, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.

[0129] Typically, the following devices can be connected to the I / O interface: input devices, such as sensors or visual information acquisition devices; output devices, such as displays; storage devices, such as magnetic tapes or hard drives; and communication devices. Communication devices allow electronic devices to communicate wirelessly or wiredly with other devices (such as edge computing devices) to exchange data. Although Figure 5 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.

[0130] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processing device, it performs the dynamic verification code generation method of embodiments of this disclosure, or performs all or part of the steps of the dynamic verification code verification method of embodiments of this disclosure.

[0131] For a detailed description of this embodiment, please refer to the corresponding descriptions in the foregoing embodiments, which will not be repeated here.

[0132] A computer-readable storage medium according to embodiments of the present disclosure stores non-transitory computer-readable instructions. When the non-transitory computer-readable instructions are executed by a processor, the dynamic verification code generation method of the foregoing embodiments of the present disclosure is performed, or all or part of the steps of the dynamic verification code verification method of the embodiments of the present disclosure are performed.

[0133] The aforementioned computer-readable storage media include, but are not limited to: optical storage media (e.g., CD-ROM and DVD), magneto-optical storage media (e.g., MO), magnetic storage media (e.g., magnetic tape or portable hard drive), media with built-in rewritable non-volatile memory (e.g., memory card), and media with built-in ROM (e.g., ROM cartridge).

[0134] For a detailed description of this embodiment, please refer to the corresponding descriptions in the foregoing embodiments, which will not be repeated here.

[0135] The basic principles of this disclosure have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this disclosure are merely examples and not limitations, and should not be considered as essential features of each embodiment of this disclosure. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the scope of this disclosure to the necessity of employing the aforementioned specific details for implementation.

[0136] In this disclosure, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The block diagrams of devices, apparatuses, devices, and systems involved in this disclosure are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as "comprising," "including," "having," etc., are open-ended terms meaning "including but not limited to," and are used interchangeably with them. The terms "or" and "and" as used herein refer to the terms "and / or," and are used interchangeably with them unless the context clearly indicates otherwise. The term "such as" as used herein refers to the phrase "such as but not limited to," and is used interchangeably with it.

[0137] Additionally, as used herein, the “or” used in a list of items beginning with “at least one” indicates a separate list, such that a list of, for example, “at least one of A, B, or C” means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word “exemplary” does not imply that the described example is preferred or better than other examples.

[0138] It should also be noted that in the systems and methods of this disclosure, the components or steps can be decomposed and / or recombined. These decompositions and / or recombinations should be considered as equivalent solutions to this disclosure.

[0139] Various changes, substitutions, and modifications can be made to the technology described herein without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims of this disclosure is not limited to the specific aspects of the processes, machines, manufactures, events, means, methods, and actions described above. Currently existing or later-developed processes, machines, manufactures, events, means, methods, or actions that perform substantially the same function or achieve substantially the same result as the corresponding aspects described herein can be utilized. Therefore, the appended claims include such processes, machines, manufactures, events, means, methods, or actions within their scope.

[0140] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of this disclosure. Therefore, this disclosure is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features disclosed herein.

[0141] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this disclosure to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations therein.

Claims

1. A method for generating a dynamic verification code, characterized in that, The method comprises: According to the received verification code generation request, randomly obtain the background picture and the gap picture from the pre-created gallery; Cut the background picture according to the preset number, and set unique identification information for the several background fragments obtained by cutting; Randomly select any one of the several background fragments as an identification picture from the several background fragments; Move the identification picture according to the preset moving track in the preset verification area in real time, and set the gap picture at the gap position of the identification picture; Generate a dynamic verification code according to the preset moving track of the identification picture, the identification information of the background fragment, and the identification information of the gap picture; Randomly generate an array of a preset length, wherein each array contains several elements corresponding to the identification information of the background fragment, and the several elements contain the identification information of the gap picture; Bind the background fragment, the identification information of the gap picture, and the array to generate the dynamic verification code, and store the dynamic verification code in the pre-created cache pool.

2. The method of claim 1, wherein, The method further comprises: Obtain the gap position coordinate information of the gap picture; According to the arrangement order of the several elements in the array, generate the preset moving track of the identification picture in the preset verification area; Store the gap position coordinate information of the gap picture and the preset moving track of the identification picture in the database of the server.

3. The method of claim 1, wherein, The method further comprises: Preprocess and save several pictures downloaded from a target webpage to a gallery; Create a cache pool for storing dynamic verification codes; When it is detected that the number of dynamic verification codes in the cache pool is less than a preset number threshold, trigger a verification code generation request.

4. A method of verifying a dynamic authentication code, characterized by, The method comprises: Receive a verification request of a client; According to the dynamic verification code generation method of any one of claims 1 to 3, obtain a dynamic verification code from the cache pool and display it on the verification interface of the client, wherein the identification picture in the dynamic verification code moves in real time according to the preset moving track in the preset verification area; Receive a trigger signal for triggering the identification picture from the client; According to the trigger signal, obtain the real-time position coordinate of the identification picture and the gap position coordinate information of the gap picture in the dynamic verification code; When the real-time position coordinate of the identification picture matches the gap position coordinate information of the gap picture, the verification request of the client is passed; when the real-time position coordinate of the identification picture does not match the gap position coordinate information of the gap picture, the verification request of the client is not passed.

5. The dynamic verification method of a verification code according to claim 4, characterized in that, The method further comprises: When detecting a click operation of a user on a pause button on the verification interface, pause the moving operation of the identification picture, and switch the icon of the pause button to the icon of a start button; When detecting a click operation of a user on the start button on the verification interface, continue to control the identification picture to move in real time according to the preset moving track in the preset verification area.

6. The dynamic verification method of a verification code according to claim 4, characterized in that, The method further comprises: When the real-time position coordinate of the identification picture matches the gap position coordinate information of the gap picture, continue to verify the account name and login password input by the user; When the account name and login password verification is successful, pass the verification request of the client; When the account name and login password verification fails, do not pass the verification request of the client.

7. The dynamic verification method of a verification code according to claim 4, characterized in that, The method further comprises: Counting the number of failed verifications of the client; When the number of failed verifications of the client reaches a preset access threshold, prohibit the verification request of the client within a preset time period.

8. A dynamic verification code generation device, characterized in that, Comprise: A picture acquisition unit configured to randomly acquire a background picture and a gap picture from a pre-created gallery according to a received verification code generation request; A picture cutting unit configured to cut the background picture according to a preset number, and set unique identification information for the cut background fragments; A random selection unit configured to randomly select any one of the background fragments as an identification picture from the background fragments; A setting unit configured to move the identification picture in real time according to a preset moving track in a preset verification area, and set the gap picture at a gap position of the identification picture; A verification code generation unit configured to generate a dynamic verification code according to the preset moving track of the identification picture, the identification information of the background fragments and the gap picture; Randomly generate an array of a preset length, wherein each array contains a plurality of elements corresponding to the identification information of the background fragments, and the plurality of elements contain the identification information of the gap picture; Bind the identification information of the background fragments, the gap picture and the array to generate the dynamic verification code, and store the dynamic verification code in a pre-created cache pool.

9. A verification device for dynamic verification codes, characterized in that, Comprise: A verification request receiving unit configured to receive a verification request of a client; A verification code acquisition unit configured to acquire a dynamic verification code from a cache pool and display it in a verification interface of the client, wherein an identification picture in the dynamic verification code moves in real time according to a preset moving track in a preset verification area; A signal receiving unit configured to receive a trigger signal for triggering the identification picture from the client; A coordinate information acquisition unit configured to acquire a real-time position coordinate of the identification picture according to the trigger signal, and acquire gap position coordinate information of a gap picture in the dynamic verification code; A verification unit configured to pass the verification request of the client when the real-time position coordinate of the identification picture matches the gap position coordinate information of the gap picture; When the real-time position coordinate of the identification picture does not match the gap position coordinate information of the gap picture, do not pass the verification request of the client.

Citation Information

Patent Citations

  • Dynamic verification code generation method and device and verification method and device based on dynamic verification code

    CN108809654A

  • Verification method and device of sliding verification code, computer equipment and medium

    CN112651010A