Man-machine verification method and device, electronic equipment and storage medium
By combining a dual verification mechanism of proof-of-work CAPTCHA and geometric CAPTCHA, and dynamically adjusting the verification difficulty and visual interference, the problem of insufficient resistance to automated attacks and poor user experience in existing technologies is solved, thus achieving efficient and secure user verification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JILIN UNIVERSITY
- Filing Date
- 2025-12-11
- Publication Date
- 2026-05-05
AI Technical Summary
Existing human-machine verification methods are insufficient in resisting complex attacks when facing automated attacks using deep learning technology, and the user interaction cost is high, resulting in a poor user experience.
It adopts a dual verification mechanism that combines Proof-of-Work (PoW) and GeoCAPTCHA, and improves security and user experience by dynamically adjusting the verification difficulty and using visual interference techniques.
It effectively resists automated attacks, reduces the difficulty of machine recognition, improves user verification efficiency, provides a good user experience, and significantly reduces the success rate of machine recognition and the cost of user operation.
Smart Images

Figure CN121980554A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of CAPTCHA processing technology, and in particular to a human-machine verification method, apparatus, electronic device, and storage medium. Background Technology
[0002] CAPTCHA technology originated from a research project in higher education institutions. Its full name is "Completely Automated Public Turing test to tell Computers and Humans Apart," meaning a fully automated Turing test to distinguish between computers and humans. As an automated program used to differentiate between computers and humans, CAPTCHAs provide crucial security against malicious programs or machine access. The core idea of CAPTCHAs is to automatically generate a question and judge the user's answer: if the answer is correct, the user is identified as human; if the answer is incorrect, the user is identified as a machine. Generally speaking, if a CAPTCHA has a human success rate of over 90% and a machine success rate of less than 1%, it can be considered highly effective.
[0003] With the rapid development of deep learning technology and the continuous upgrading of automated attack methods, existing mainstream human-machine verification methods face a dual bottleneck: first, insufficient resistance to complex attacks, making it difficult to cope with new machine breakthrough methods; second, high user interaction costs, easily leading to a poor user experience. Therefore, developing a human-machine verification method that can effectively resist automated attacks while providing a good user experience has significant research value and application prospects. Summary of the Invention
[0004] Therefore, it is necessary to provide a human-machine verification method, device, electronic device, and storage medium to address the aforementioned technical problems, which can effectively resist automated attacks and provide a good user experience.
[0005] According to a first aspect of certain exemplary embodiments of this application, a human-machine verification method is provided, comprising: in response to a user's human-machine verification request, obtaining a proof-of-work verification code and displaying the proof-of-work verification code to the user, wherein the proof-of-work verification code is determined based on the request frequency of human-machine verification requests received by the system; in response to the user's verification operation on the proof-of-work verification code, verifying user information submitted by the user; in response to the successful verification of the user information, obtaining a background image and a geometric verification code and displaying the background image and the geometric verification code to the user; and in response to the user's verification operation on the geometric verification code, confirming that the human-machine verification has passed.
[0006] In one example, a human-machine verification method further includes: obtaining the request frequency of human-machine verification requests received by the system at the current time; determining the verification difficulty based on the request frequency; determining the constraints based on the verification difficulty; and generating a proof-of-work verification code based on the constraints and a hash algorithm.
[0007] In one example, the verification difficulty is determined based on the request frequency, including: when the request frequency exceeds a first set frequency value, the verification difficulty is determined to be a first difficulty value; when the request frequency exceeds a second set frequency value but does not exceed the first set frequency value, the verification difficulty is determined to be a second difficulty value; when the request frequency does not exceed the second set frequency value, the verification difficulty is determined to be a default difficulty value; wherein the first difficulty value is greater than the second difficulty value, and the second difficulty value is greater than the default difficulty value.
[0008] In one example, displaying a proof-of-work verification code to a user includes: displaying a proof-of-work verification code and a random verification code to the user; responding to the user's verification operation on the proof-of-work verification code includes: if the user's operation information is received through the front end within a set time, determining the verification code corresponding to the operation information fed back by the front end; verifying whether the corresponding verification code meets the verification conditions based on constraints and a hash algorithm, and if so, responding to the user's verification operation on the proof-of-work verification code.
[0009] In one example, a human-machine verification method further includes: randomly generating multiple geometric shapes in a background image, configuring the line colors of the geometric shapes based on the color of the background image; configuring interference lines of the geometric shapes based on the number of geometric shapes; and generating a geometric verification code based on the configured geometric shapes.
[0010] In one example, a human-machine verification method further includes: obtaining an image to be processed; converting the image to be processed into HSV mode and then randomly adjusting the hue shift and enhancing the saturation to obtain a preliminary processed image; and performing a red-green gradient layer processing on the preliminary processed image at a random angle to obtain a background image.
[0011] In one example, there are multiple geometric CAPTCHAs, each with a corresponding background image. Displaying the background image and the geometric CAPTCHA to the user includes: sequentially displaying each geometric CAPTCHA and its corresponding background image to the user; responding to the user's verification operation on the geometric CAPTCHA includes: sequentially responding to the user's verification operation on each displayed background image to complete the corresponding geometric CAPTCHA verification operation.
[0012] According to a second aspect of certain exemplary embodiments of this application, a human-machine verification device is provided, comprising: a first display module, configured to, in response to a user's human-machine verification request, acquire a proof-of-work verification code and display the proof-of-work verification code to the user, wherein the proof-of-work verification code is determined based on the request frequency of human-machine verification requests received by the system; a first verification module, configured to, in response to a user's verification operation on the proof-of-work verification code, verify user information submitted by the user; a second display module, configured to, in response to successful verification of the user information, acquire a background image and a geometric verification code and display the background image and the geometric verification code to the user; and a second verification module, configured to, in response to a user's verification operation on the geometric verification code, confirm successful human-machine verification.
[0013] According to a third aspect of certain exemplary embodiments of this application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of any of the above methods.
[0014] According to a fourth aspect of certain exemplary embodiments of this application, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the methods described above.
[0015] The aforementioned human-machine verification method, apparatus, electronic device, and storage medium include: responding to a user's human-machine verification request, obtaining a proof-of-work verification code and displaying the proof-of-work verification code to the user, wherein the proof-of-work verification code is determined based on the request frequency of human-machine verification requests received by the system; responding to the user's verification operation on the proof-of-work verification code, verifying the user information submitted by the user; responding to the successful verification of the user information, obtaining a background image and a geometric verification code, and displaying the background image and the geometric verification code to the user; and responding to the user's verification operation on the geometric verification code, confirming that the human-machine verification has passed. Therefore, by integrating proof-of-work and geometric recognition into a novel human-machine verification system, combining lightweight proof-of-work that is imperceptible to the user with a visual region to form a dual mechanism, "high machine interception and low human operation cost" is achieved. Attached Figure Description
[0016] Figure 1 This is an application scenario diagram of a human-machine verification method in some exemplary embodiments of this application; Figure 2 This is a flowchart illustrating a human-machine verification method in some exemplary embodiments of this application; Figure 3 This is a schematic diagram of the interface for the checkboxes of the proof-of-work verification code in some exemplary embodiments of this application; Figure 4This is a schematic diagram of a randomly selected background image used in some exemplary embodiments of this application; Figure 5 A schematic diagram of randomly drawn triangles for background images in some exemplary embodiments of this application; Figure 6 This is a schematic diagram of a background image processed with a red-green gradient in some exemplary embodiments of this application; Figure 7 This is a structural block diagram of a human-machine verification device in some other exemplary embodiments of this application; Figure 8 This is a diagram of the internal structure of an electronic device in some other exemplary embodiments of this application. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0018] The following detailed descriptions are provided to aid the reader in gaining a comprehensive understanding of the methods, apparatus, electronic devices, storage media, and / or computer program products described herein. However, after understanding the disclosure of this application, various changes, modifications, and equivalents of the methods, apparatus, storage media, and / or computer program products described herein will become apparent. For example, the order of operations described herein is merely illustrative and is not limited to those orders set forth herein, but may be changed as will become clear after understanding the disclosure of this application, except for operations that must occur in a specific order. Furthermore, for clarity and conciseness, descriptions of features known in the art may be omitted.
[0019] The features described herein may be implemented in different forms and should not be construed as limited to the examples described herein. Rather, the examples described herein are provided only to illustrate some of the many feasible ways of implementing the methods, electronic devices, and / or storage media described herein, many of which will become clear upon understanding this application.
[0020] The terminology used herein is for the purpose of describing various examples only and is not intended to limit disclosure. Unless the context clearly indicates otherwise, the singular form is intended to include the plural form as well. The terms “comprising,” “including,” and “having” indicate the presence of the described features, quantities, operations, components, elements, and / or combinations thereof, but do not exclude the presence or addition of one or more other features, quantities, operations, components, elements, and / or combinations thereof. Unless otherwise stated, “ / ” means “or,” for example, A / B can mean A or B; “and / or” in the text is merely a description of the relationship between related objects, indicating that three relationships can exist, for example, A and / or B can mean: A alone, A and B simultaneously, and B alone. Furthermore, in the description of embodiments of the invention, “multiple” means two or more.
[0021] Unless otherwise defined, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains upon understanding this application. Unless expressly defined herein, terms (such as those defined in a general dictionary) shall be interpreted as having a meaning consistent with their meaning in the context of the relevant field and in this application, and shall not be interpreted in an idealized or overly formalistic manner.
[0022] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in some of the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0023] Furthermore, in the description of the examples, detailed descriptions of well-known related structures or functions will be omitted when it is believed that such detailed descriptions would lead to a vague interpretation of this application.
[0024] In the following description, embodiments will be described in detail with reference to the accompanying drawings. However, embodiments may be implemented in various forms and are not limited to the examples described herein.
[0025] PoW: Proof of Work. Geo: Geometric. CAPTCHA: Completely Automated Public Turing Test to Tell Computers and Humans Apart. PoW-GeoCAPTCHA: Proof of Work - Geometric CAPTCHA.
[0026] In some exemplary embodiments of this application, a human-machine verification method is provided. A human-machine verification method is applied to, for example... Figure 1 The application environment shown. For example... Figure 1 As shown, the human-machine verification system 100 is used to execute a human-machine verification method according to this application. Specifically, a user initiates a human-machine verification request to the human-machine verification system 100 through a terminal 200. In response to the user's human-machine verification request, the human-machine verification system 100 obtains a proof-of-work verification code and displays the proof-of-work verification code to the user's terminal 200. The proof-of-work verification code is determined based on the request frequency of the human-machine verification requests received by the system. The terminal 200 displays the proof-of-work verification code and other verification codes to the user, who then performs a verification operation. If the user triggers a verification operation on the proof-of-work verification code, the human-machine verification system 100, in response to the user's verification operation on the proof-of-work verification code, verifies the user information submitted by the user; in response to the successful verification of the user information, it obtains a background image and a geometric verification code, and displays the background image and the geometric verification code to the user's terminal 200. When the user performs a verification operation on the terminal 200, the human-machine verification system 100, in response to the user's verification operation on the geometric verification code, confirms that the human-machine verification is successful.
[0027] In some exemplary embodiments of this application, a human-machine verification method is provided. For example... Figure 2 As shown, a human-machine verification method includes the following steps: S201, in response to the user's human verification request, obtain the proof-of-work verification code and display the proof-of-work verification code to the user, wherein the proof-of-work verification code is determined based on the request frequency of the human verification requests received by the system.
[0028] In this embodiment, when a terminal initiates a human-machine verification request, the human-machine verification system obtains a proof-of-work verification code and displays it on the user's terminal. The proof-of-work verification code is determined based on the request frequency of human-machine verification requests received by the system. For example, the human-machine verification system determines the proof-of-work verification code based on the cumulative number of human-machine verification requests received from all users globally within a set time period. Therefore, the difficulty of the proof-of-work verification code can be dynamically adjusted according to the request frequency of human-machine verification requests; the higher the traffic, the greater the difficulty. This mechanism effectively prevents malicious attacks while ensuring a good experience for legitimate users.
[0029] In one embodiment, the steps for generating the proof-of-work verification code include: obtaining the request frequency of human-machine verification requests received by the system at the current time; determining the verification difficulty based on the request frequency; determining the constraints based on the verification difficulty; and generating the proof-of-work verification code based on the constraints and a hash algorithm.
[0030] In this embodiment, a proof-of-work (PoW) verification code is generated using a hash algorithm. The constraints on the hash algorithm output are based on the verification difficulty configuration. This embodiment dynamically adjusts the verification difficulty according to the request frequency of human-machine verification requests received by the system. This allows for dynamic adjustment of the PoW verification code output by the hash algorithm through PoW difficulty, increasing the attack cost in high-traffic scenarios and reducing verification time in low-traffic scenarios, significantly enhancing the overall robustness of the system.
[0031] In one example, determining the verification difficulty based on the request frequency includes: determining the verification difficulty as a first difficulty value when the request frequency exceeds a first preset frequency value; determining the verification difficulty as a second difficulty value when the request frequency exceeds a second preset frequency value but does not exceed the first preset frequency value; and determining the verification difficulty as a default difficulty value when the request frequency does not exceed the second preset frequency value; wherein the first difficulty value is greater than the second difficulty value, and the second difficulty value is greater than the default difficulty value.
[0032] In this example, a first preset frequency value and a second preset frequency value are pre-set, with the first preset frequency value being greater than the second preset frequency value. A first difficulty value and a second difficulty value are also pre-configured, with the first difficulty value being greater than the second difficulty value. When the frequency of human-machine verification requests received by the system exceeds the first preset frequency value, the verification difficulty is determined to be the first difficulty value. When the frequency of human-machine verification requests received by the system does not exceed the first preset frequency value but exceeds the second preset frequency value, the verification difficulty is determined to be the second difficulty value. In other cases, the verification difficulty is configured to the default difficulty value. For example, the first preset frequency value is 100 human-machine verification requests within 60 seconds, the second preset frequency value is 50 human-machine verification requests within 60 seconds, the first difficulty value is 5, the second difficulty value is 4, and the default difficulty value is 3.
[0033] S202, in response to the user's verification operation of the proof-of-work verification code, verifies the user information submitted by the user.
[0034] In this embodiment, the terminal displays a proof-of-work verification code, as well as other verification codes. The user verifies the proof-of-work verification code by triggering the correct verification code on the terminal. The human-machine verification system responds to the user's verification operation by receiving the user information submitted by the user and verifying it. The user information includes a username and password. The human-machine verification system verifies the correctness of the username and password.
[0035] In one example, step S201 above, which displays the proof-of-work verification code to the user, includes: displaying the proof-of-work verification code and a random verification code to the user; step S202 above, which responds to the user's verification operation of the proof-of-work verification code, includes: if the user's operation information is received through the front end within a set time, determining the verification code corresponding to the operation information fed back by the front end; verifying whether the corresponding verification code meets the verification conditions by using constraints and a hash algorithm, and if so, responding to the user's verification operation of the proof-of-work verification code.
[0036] In this example, the front-end response time is configured, i.e., a set time, such as 2 seconds. If the verification code corresponding to the user's operation information meets the verification conditions within the response time, the user's verification operation of the proof-of-work verification code is confirmed to be successful, and the response to the user's verification operation of the proof-of-work verification code is executed.
[0037] Specifically, for the examples above, the verification difficulty is dynamically adjusted based on the request frequency of the human verification requests received by the system. For example, the verification difficulty (challenge) is 5 when the number of requests exceeds 100, 4 when the number of requests exceeds 50, and otherwise the default difficulty is 3. The number of human verification requests received by the system is the cumulative number of all requests from all users globally, and the request frequency is the total number of global requests within 60 seconds; neither is targeted at individual users. A verification difficulty of 5 means that a nonce (a continuously tried random number) must be found such that the SHA256 hash of "challenge + nonce" has five leading zeros. The difficulty value corresponds exactly to the number of leading zeros. The more leading zeros, the greater the computational difficulty.
[0038] To prevent the verification difficulty from escalating indefinitely, the system resets the request count every 60 seconds. Furthermore, the user's frontend must find the nonce within 2 seconds, ensuring the number of leading zeros in the SHA256 hash value matches the verification difficulty. The system's server verifies whether the hash value meets the constraints and whether the actual time taken is within 2 seconds. The final result is that the user only needs to click... Figure 3 The above verification can be completed with just one checkbox as shown.
[0039] In the above embodiments, a fixed-difficulty PoW can be used, but a fixed-difficulty PoW cannot meet the security requirements of high-traffic scenarios. Therefore, adjusting the dynamic verification difficulty can be the optimal solution.
[0040] S203, in response to successful verification of user information, obtain the background image and geometric verification code, and display the background image and geometric verification code to the user.
[0041] In this embodiment, if the user information verification is successful, a background image and a geometric verification code are obtained. The geometric verification code is rendered in the background image, and the background image containing the geometric verification code is displayed to the user's terminal.
[0042] In one example, the steps for generating the geometric CAPTCHA include: randomly generating multiple geometric shapes in a background image and configuring the line colors of the geometric shapes based on the color of the background image; configuring interference lines of the geometric shapes based on the number of geometric shapes; and generating a geometric CAPTCHA based on the configured geometric shapes.
[0043] In one example, the steps for generating the background image include: obtaining the image to be processed; converting the image to be processed to HSV mode and then randomly adjusting the hue shift and enhancing the saturation to obtain a preliminary processed image; and applying a red-green gradient layer at a random angle to the preliminary processed image to obtain the background image.
[0044] Specifically, for the two examples above, a background image, i.e., the image to be processed, is randomly selected from the background image library, for example, such as... Figure 4 As shown. During each verification, multiple geometric shapes are randomly drawn, and the line colors of the geometric shapes are configured based on the background image color, while the interference lines of the geometric shapes are configured based on the number of geometric shapes. For example, as... Figure 5 As shown, 2 to 6 triangles are randomly drawn. The vertex coordinates of the triangles are determined using four random distribution algorithms to ensure a high degree of randomness in their position, size, and shape. The triangle outline colors are randomly selected from the background image and their complementary colors are chosen (255-R, 255-G, 255-B) to ensure sufficient contrast with the background. Furthermore, the interference lines are dynamically adjusted based on the number of triangles. For example, two interference lines are added when there are two triangles, one interference line is added when there are three triangles, and no interference lines are added in other cases.
[0045] For the background image: Convert the background image to HSV mode and randomly adjust the hue and saturation. For example, adjust the hue by ±40° and increase the saturation by 1.2 to 1.8 times. Apply a red-green gradient layer to blend with the background image, with a blending opacity of 0.3. For example, ... Figure 6 As shown, the red component increases from left to right, the green component decreases from left to right, and the blue component is fixed at 128.
[0046] In the above embodiments, other geometric shapes, such as polygons, can be used instead of triangles. However, triangles are more visually recognizable by humans and more difficult for machines to accurately segment, so triangles can be the optimal choice.
[0047] In the above embodiments, other color spaces, such as RGB and YUV, can be used for color adjustment. However, the HSV mode can better achieve random adjustment of hue and saturation while maintaining the naturalness of the color, making it the optimal choice. Gradient layers can use other color combinations, but red-green gradients, while increasing complexity, maintain human visual recognizability, making them the best option.
[0048] Therefore, by using random hue shifting and saturation enhancement in HSV mode, combined with the overlay and mixing of red-green gradient layers, a color distribution pattern that is difficult to process using traditional image recognition techniques is created. This multi-layered color processing not only enhances security but also maintains user-friendliness for human recognition.
[0049] This embodiment significantly reduces the machine's success rate in recognizing CAPTCHAs by using an "indistinguishable region" design and dynamic color adjustment. Experiments show that PoW-GeoCAPTCHA achieves a recognition rate of only 1.1% against traditional OCR attacks, a single-image recognition rate of only 22% against CNN models, and a probability of recognizing two consecutive images of only 4.84% (0.22²). Combined with PoW proof-of-work verification, the probability of a successful attack is less than 2%.
[0050] S204, in response to the user's verification operation of the geometric verification code, confirms that the human-machine verification is successful.
[0051] In this embodiment, the user needs to perform a geometric CAPTCHA verification operation on the terminal. This can be achieved by setting a user question, requiring the user to respond with the number of geometric CAPTCHAs in the background image. If the user correctly answers the number of geometric CAPTCHAs, the system responds to the user's CAPTCHA verification operation. For example, the verification operation could involve setting a verification question: How many independent triangles are there in the background image? The user only needs to answer the number of triangles. If the answer is correct, the system responds to the user's CAPTCHA verification operation, confirming that the human-machine verification has passed.
[0052] This embodiment of the application uses dynamic difficulty adjustment and PoW seamless verification, allowing users to complete the verification by simply clicking a checkbox. Meanwhile, the geometric CAPTCHA has an average accuracy rate of 96.1% and an average time of 40.38 seconds. Moreover, the performance of users of all ages is almost consistent, demonstrating its good versatility and usability.
[0053] In one embodiment, there are multiple geometric verification codes, each with a corresponding background image. Step S203, which displays the background image and the geometric verification code to the user, includes: sequentially displaying each geometric verification code and its corresponding background image to the user. Step S204, which responds to the user's verification operation on the geometric verification code, includes: sequentially completing the verification operation of the corresponding geometric verification code in each displayed background image.
[0054] Specifically, multiple geometric verification codes are randomly generated in each background image. Users need to identify the geometric verification codes from multiple background images in order to complete the verification operation.
[0055] A human-machine verification method based on the above embodiments includes the following specific steps for confirming that the human-machine verification has passed: (1) Verify whether the nonce value of the Proof-of-Work (PoW) verification code meets the difficulty requirements.
[0056] (2) Verify the correctness of the username and password.
[0057] (3) Users need to identify two geometric verification codes in succession to complete the geometric verification code operation.
[0058] The four verification steps—PoW verification, username and password verification, first image verification code verification, and second image verification code verification—are performed sequentially, and the human-machine verification is considered successful only if all four are passed.
[0059] The aforementioned human-machine verification method includes: responding to a user's human-machine verification request, obtaining a proof-of-work verification code and displaying the proof-of-work verification code to the user, wherein the proof-of-work verification code is determined based on the request frequency of human-machine verification requests received by the system; responding to the user's verification operation on the proof-of-work verification code, verifying the user information submitted by the user; responding to the successful verification of the user information, obtaining a background image and a geometric verification code, and displaying the background image and the geometric verification code to the user; and responding to the user's verification operation on the geometric verification code, confirming that the human-machine verification has passed. Therefore, by integrating proof-of-work and geometric recognition into a novel human-machine verification method, combining lightweight proof-of-work that is imperceptible to the user with a visual region to form a dual mechanism, "high machine interception and low human operation cost" is achieved.
[0060] In summary, the human-machine verification method of this application has the following technical effects: 1. "Indistinguishable Region" Optimization: By overlapping triangles, occlusion relationships, and superimposed interference lines, a visual trap that is unfriendly to machines but friendly to humans is constructed. This design makes it difficult for machines to accurately count triangles, while human users can easily distinguish them using visual and spatial cognition.
[0061] 2. Color processing combining HSV mode and gradient layer: The background image is converted to HSV mode, with random hue shift and saturation enhancement, then a red-green gradient layer with random angles (mixed opacity 0.3) is overlaid. This dual color processing creates complex color distributions that are difficult for traditional image recognition technologies to handle, while maintaining visual friendliness for human users. This is a key innovation that distinguishes it from the fixed color filter of "Catholic Color Filter," enhancing the difficulty of machine recognition through a dual mechanism of dynamic randomization and gradient overlay.
[0062] 3. Dynamic PoW Difficulty Mechanism: The PoW difficulty is dynamically adjusted based on the frequency of human verification requests; the higher the traffic, the greater the difficulty. This mechanism effectively prevents malicious attacks while ensuring a good experience for legitimate users.
[0063] 4. Dual Authentication Mechanism: Combining Proof-of-Work (PoW) and Geometric CAPTCHA, the dual authentication mechanism significantly improves security while effectively preventing automated attacks. PoW verification increases the cost of attacks through computational tasks, while the Geometric CAPTCHA further ensures the authenticity of the user.
[0064] 5. Geometric CAPTCHA continuous verification mechanism: requires users to recognize two CAPTCHA images consecutively, significantly reducing the success rate of CNN model attacks from 22% for a single image to 4.84% (i.e. 0.22²), greatly enhancing the system's resistance to automated attacks.
[0065] 6. Seamless PoW Verification: By executing computationally intensive PoW tasks asynchronously in the client background and submitting the success result (nonce) as the verification credential, the user only needs to perform a single click throughout the entire process. This "seamless" verification fundamentally resolves the traditional conflict between security measures and user experience, achieving a perfect balance between security and user experience.
[0066] It should be understood that although the steps in the flowchart are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order constraint on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowchart may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0067] In some exemplary embodiments of this application, such as Figure 7 As shown, a human-machine verification device is provided, including a first display module 701, a first verification module 702, a second display module 703, and a second verification module 704. The first display module 701 is used to respond to a user's human-machine verification request, obtain a proof-of-work verification code, and display the proof-of-work verification code to the user, wherein the proof-of-work verification code is determined based on the request frequency of human-machine verification requests received by the system. The first verification module 702 is used to verify the user information submitted by the user in response to the user's verification operation of the proof-of-work verification code. The second display module 703 is used to obtain a background image and a geometric verification code in response to the successful verification of the user information, and display the background image and the geometric verification code to the user. The second verification module 704 is used to confirm the successful human-machine verification in response to the user's verification operation of the geometric verification code.
[0068] In one example, a human-machine verification device further includes a first generation module, used to obtain the request frequency of human-machine verification requests received by the system at the current time; determine the verification difficulty based on the request frequency; determine the constraints based on the verification difficulty; and generate a proof-of-work verification code based on the constraints and a hash algorithm.
[0069] In one example, the verification difficulty is determined based on the request frequency, including: when the request frequency exceeds a first set frequency value, the verification difficulty is determined to be a first difficulty value; when the request frequency exceeds a second set frequency value but does not exceed the first set frequency value, the verification difficulty is determined to be a second difficulty value; when the request frequency does not exceed the second set frequency value, the verification difficulty is determined to be a default difficulty value; wherein the first difficulty value is greater than the second difficulty value, and the second difficulty value is greater than the default difficulty value.
[0070] In one example, displaying a proof-of-work verification code to a user includes: displaying a proof-of-work verification code and a random verification code to the user; responding to the user's verification operation on the proof-of-work verification code includes: if the user's operation information is received through the front end within a set time, determining the verification code corresponding to the operation information fed back by the front end; verifying whether the corresponding verification code meets the verification conditions based on constraints and a hash algorithm, and if so, responding to the user's verification operation on the proof-of-work verification code.
[0071] In one example, a human-machine verification device further includes a second generation module for randomly generating multiple geometric shapes in a background image and configuring the line colors of the geometric shapes based on the color of the background image; configuring interference lines of the geometric shapes based on the number of geometric shapes; and generating a geometric verification code based on the configured geometric shapes.
[0072] In one example, a human-machine verification device further includes a third generation module for acquiring an image to be processed; converting the image to be processed into HSV mode and then randomly adjusting the hue shift and enhancing the saturation to obtain a preliminary processed image; and performing a red-green gradient layer processing at a random angle on the preliminary processed image to obtain a background image.
[0073] In one example, there are multiple geometric CAPTCHAs, each with a corresponding background image. Displaying the background image and the geometric CAPTCHA to the user includes: sequentially displaying each geometric CAPTCHA and its corresponding background image to the user; responding to the user's verification operation on the geometric CAPTCHA includes: sequentially responding to the user's verification operation on each displayed background image to complete the corresponding geometric CAPTCHA verification operation.
[0074] For specific limitations regarding a human-machine verification device, please refer to the limitations of a human-machine verification method described above, which will not be repeated here. Each module in the aforementioned human-machine verification device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the electronic device in hardware form, or stored in the memory of the electronic device in software form, so that the processor can call and execute the operations corresponding to each module.
[0075] In some exemplary embodiments of this application, an electronic device is provided, which may be a server of a human-machine verification system 100, and its internal structure diagram may be as follows. Figure 8As shown, the electronic device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage medium. The database stores data related to human-machine verification. The network interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements one of the aforementioned human-machine verification methods.
[0076] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0077] In some exemplary embodiments of this application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of a human-machine verification method in any of the above exemplary embodiments.
[0078] In some exemplary embodiments of this application, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of a human-machine verification method in any of the exemplary embodiments described above.
[0079] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0080] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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.
[0081] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A human-machine verification method, characterized in that, The method includes: In response to a user's human verification request, a proof of work verification code is obtained and displayed to the user, wherein the proof of work verification code is determined based on the request frequency of human verification requests received by the system. In response to the user's verification operation of the proof-of-work verification code, the user information submitted by the user is verified. In response to successful verification of the user information, a background image and a geometric verification code are obtained, and the background image and the geometric verification code are displayed to the user. In response to the user's verification operation on the geometric verification code, the human-machine verification is confirmed to be successful.
2. The method according to claim 1, characterized in that, The method further includes: Get the frequency of human verification requests received by the system at the current time; The verification difficulty is determined based on the request frequency. The constraints are determined based on the verification difficulty. The proof-of-work verification code is generated based on the constraints and a hash algorithm.
3. The method according to claim 2, characterized in that, Determining the verification difficulty based on the request frequency includes: When the request frequency exceeds a first preset frequency value, the verification difficulty is determined to be a first difficulty value; When the request frequency exceeds a second preset frequency value but does not exceed the first preset frequency value, the verification difficulty is determined to be the second difficulty value; If the request frequency does not exceed the second preset frequency value, the verification difficulty is determined to be the default difficulty value. Wherein, the first difficulty value is greater than the second difficulty value, and the second difficulty value is greater than the default difficulty value.
4. The method according to claim 2, characterized in that, The step of displaying the proof-of-work verification code to the user includes: The user is shown the proof-of-work verification code and the random verification code; The response to the user's verification operation of the proof-of-work verification code includes: If the user's operation information is received through the front end within a set time, determine the verification code corresponding to the operation information fed back by the front end. The corresponding verification code is verified based on the constraints and the hash algorithm to determine whether it meets the verification conditions. If it does, the user performs a verification operation on the proof-of-work verification code.
5. The method according to claim 1, characterized in that, The method further includes: Multiple geometric shapes are randomly generated in the background image, and the lines of the geometric shapes are configured with colors based on the colors of the background image. The interference lines of the geometric shapes are configured based on the number of the geometric shapes; The geometric verification code is generated based on the configured geometry.
6. The method according to any one of claims 1-5, characterized in that, The method further includes: Get the image to be processed; After converting the image to be processed into HSV mode, the hue shift and saturation are randomly adjusted to obtain a preliminary processed image. The background image is obtained by applying a red-green gradient layer at a random angle to the pre-processed image.
7. The method according to claim 1, characterized in that, The geometric verification code consists of multiple images, each corresponding to a background image. Displaying the background image and the geometric verification code to the user includes: Each geometric verification code and its corresponding background image are displayed to the user in turn; The response to the user's verification operation on the geometric verification code includes: In response to the user sequentially completing the verification operation of the corresponding geometric verification code in each displayed background image.
8. A human-machine verification device, characterized in that, The device includes: The first display module is used to respond to the user's human-machine verification request, obtain the proof of work verification code, and display the proof of work verification code to the user, wherein the proof of work verification code is determined based on the request frequency of the human-machine verification requests received by the system. The first verification module is used to verify the user information submitted by the user in response to the user's verification operation of the proof of work verification code. The second display module is used to obtain a background image and a geometric verification code in response to the successful verification of the user information, and to display the background image and the geometric verification code to the user. The second verification module is used to respond to the user's verification operation on the geometric verification code and confirm that the human-machine verification is successful.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.