Man-machine interaction detection method and system based on proof of work

Through the human-computer interaction detection method based on proof of work, the client iteratively calculates and solves the proof of work challenges, generates and verifys responses, solving the problem of promising cracks and attacks in the existing technology, achieving more efficient defense against robot attacks and improving user experience.

CN120474753APending Publication Date: 2025-08-12UNIV OF SCI & TECH OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510552061.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-29
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

The existing human-computer interaction detection technology based on image and verification codes is easily cracked by machine learning and computer vision technology, and there are vulnerabilities in distributed denial of service attacks and replay attacks.

Method used

Using a human-computer interaction detection method based on proof of work, solve the proof of work challenges through client iterative calculations, generate and verify the proof of work response, and use the proof of work token for resource access control.

Benefits of technology

Effective defense against robot attacks improves the level of defense against distributed denial of service attacks and replay attacks, improves user experience and reduces server resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120474753A_ABST
    Figure CN120474753A_ABST
Patent Text Reader

Abstract

The invention discloses a man-machine interaction detection method based on proof of work, which comprises the following steps: when a user initiates a request to a client protected by a man-machine interaction detection module, triggering the man-machine interaction detection module according to identity information of the user; the human-computer interaction detection module generates a proof-of-work challenge POWC according to the total difficulty coefficient of human-computer interaction requested this time; the client solves a proof-of-work response POWR corresponding to the proof-of-work challenge POWC through iterative computation; the man-machine interaction detection module verifies whether a proof-of-work response message submitted by the client is valid, and if yes, a proof-of-work token POWT is returned; and the server side judges whether the user is allowed to access the protected resource according to the validity of the proof-of-work token POWT. According to the method and the system, robot attacks can be effectively and automatically defended, and the defect that a traditional workload proving process is easily subjected to distributed denial of service attacks and replay attacks is overcome.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of human-computer interaction detection, and in particular to a human-computer interaction detection method and system based on proof-of-work. Background Art

[0002] CAPTCHA (Completely Automated Public Turing test to tell Computers and Humans Apart) is a technical method used to distinguish between human users and automated programs (such as malicious robots). Its primary function is to prevent malicious automated programs from abusing websites or services, such as frequently requesting server resources, initiating spam registrations, and carrying out network attacks. CAPTCHA protects against various types of automated attacks, such as crawler attacks, brute force attacks, ad manipulation, spam, and distributed denial of service (DDoS) attacks. The main principle behind CAPTCHA is to design tasks that are simple for humans but difficult for machines to verify whether the user is a real person. Common technical implementations include text distortion image recognition, image selection (such as clicking on an image containing a traffic light), sliding puzzles, and behavioral analysis (such as mouse trajectory and click speed).

[0003] While existing image-based manual CAPTCHAs and alphanumeric verification code technologies play a fundamental role in preventing robot attacks, they have shown certain limitations with the advancement of machine learning and computer vision technologies. First, image verification codes increase the difficulty of recognition by distorting text, adding noise, or changing the background, but modern OCR (optical character recognition) technology, especially deep learning models, can effectively crack these simple image verification codes. Similarly, verification codes based on alphanumeric combinations (such as common letter and number combinations) are also easily cracked by automated scripts using character recognition technology. Especially when the verification code characters are simple in design and lack complexity, automated tools can quickly train efficient recognition models through machine learning algorithms to break through this line of defense.

[0004] Proof of Work (PoW) is a consensus mechanism used to ensure the security and reliability of distributed systems, and is widely used in decentralized networks such as blockchain. Its primary function is to prevent malicious actors from tampering with or attacking the network by consuming computing resources, thereby ensuring system fairness and data immutability. Proof of Work is based on the process of solving complex computational tasks. Nodes must complete a certain amount of computational work to obtain the right to record and add new blocks to the blockchain. These computational tasks typically involve repeated trial and error calculations of hash values. However, existing human-computer interaction detection solutions based on PoW are vulnerable to distributed denial of service attacks, token expiration, and replay attacks, and existing technologies lack corresponding solutions. Summary of the Invention

[0005] The purpose of the present invention is to provide a human-computer interaction detection method and system based on proof of work, which can effectively and automatically defend against robot attacks and eliminate the shortcomings of traditional proof of work processes that are susceptible to distributed denial of service attacks and replay attacks.

[0006] The purpose of the present invention is achieved through the following technical solutions:

[0007] A method for detecting human-computer interaction based on proof of work, the method comprising:

[0008] Step 1: During the system initialization phase, set the corresponding parameters for the human-computer interaction detection module and initialize it;

[0009] Step 2: When a user initiates a request to a client protected by a human-computer interaction detection module, the human-computer interaction detection module is triggered according to the user's identity information;

[0010] Step 3: The human-computer interaction detection module generates a proof-of-work challenge POWC based on the total difficulty coefficient of the human-computer interaction requested, and sends the proof-of-work challenge POWC to the client;

[0011] Step 4: The client solves the proof-of-work response POWR corresponding to the proof-of-work challenge POWC through iterative calculation, and submits a proof-of-work response message to the human-computer interaction detection module within the validity period; wherein the proof-of-work response message includes the proof-of-work challenge POWC, the proof-of-work response POWR and the user identifier ID;

[0012] Step 5: The human-computer interaction detection module verifies whether the proof-of-work response message submitted by the client is valid. If the proof-of-work response message is valid, the proof-of-work token POWT is returned to the client; otherwise, an error warning is returned and the protocol is exited.

[0013] Step 6: When the client accesses the server protected by the human-computer interaction detection module, it submits the generated proof-of-work token POWT to the server. The server determines whether to allow the user to access the protected resources based on the validity of the proof-of-work token POWT.

[0014] A human-computer interaction detection system based on proof of work, the system comprising:

[0015] The client is configured to trigger the human-computer interaction detection module based on the user's identity information when a user initiates a request to the client protected by the human-computer interaction detection module; solve the proof-of-work response POWR corresponding to the proof-of-work challenge POWC received from the human-computer interaction detection module through iterative calculation, and submit a proof-of-work response message to the human-computer interaction detection module within a validity period; wherein the proof-of-work response message includes the proof-of-work challenge POWC, the proof-of-work response POWR, and the user identifier ID;

[0016] The human-computer interaction detection module is used to generate a proof-of-work challenge POWC based on the total difficulty coefficient of the human-computer interaction requested, and send the proof-of-work challenge POWC to the client; then verify whether the proof-of-work response message submitted by the client is valid. If the proof-of-work response message is valid, the proof-of-work token POWT is returned to the client; otherwise, an error warning is returned and the protocol is exited;

[0017] The server side is used to set the corresponding parameters and initialize the human-computer interaction detection module during the system initialization phase; when the client accesses the server side protected by the human-computer interaction detection module, the client submits the generated proof-of-work token POWT to the server side, and the server side determines whether to allow the user to access the protected resources based on the validity of the proof-of-work token POWT.

[0018] It can be seen from the technical solutions provided by the present invention that the above-mentioned method and system can effectively and automatically defend against robot attacks, eliminate the shortcomings of the traditional proof-of-work process that are susceptible to distributed denial-of-service attacks and replay attacks, thereby improving the defense level against distributed denial-of-service attacks and replay attacks against websites. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0020] Figure 1A schematic diagram of the process flow of a human-computer interaction detection method based on proof of work provided by an embodiment of the present invention;

[0021] Figure 2 Schematic diagram of the structure of the human-computer interaction detection system based on proof of work according to an embodiment of the present invention. DETAILED DESCRIPTION

[0022] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments, and do not constitute a limitation of the present invention. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0023] like Figure 1 FIG2 is a flow chart of a method for detecting human-computer interaction based on proof of work according to an embodiment of the present invention, wherein the method includes:

[0024] Step 1: During the system initialization phase, set the corresponding parameters for the human-computer interaction detection module and initialize it;

[0025] In this step, the parameters to be set include:

[0026] (1) Website traffic level, which is to divide the expected number of requests to the protected business system within a specific time into N segments;

[0027] (2) setting a corresponding basic difficulty coefficient BD for each website visit volume level, wherein the basic difficulty coefficient BD is a positive integer and is used to control the verification difficulty of the human-computer interaction detection module under the corresponding website visit volume;

[0028] (3) The growth coefficient of the source IP difficulty coefficient SIPDI is a coefficient that controls the increase in the verification difficulty of a single source IP address as the number of requests SIPF of the single source IP address within a specific time period increases;

[0029] (4) Hash function H, which is a cryptographically secure hash function used by the server to generate the proof-of-work challenge and the user to decrypt the proof-of-work challenge;

[0030] (5) HMAC key KHMAC, used to sign subsequent challenge and response messages to ensure message integrity and authenticity;

[0031] The initialization process is as follows:

[0032] First, the website traffic level is initialized, and the expected number of requests to the protected business system within a specific time period is divided into N segments. The segment with the least expected number of requests is recorded as level 1, and the segment with the most expected number of requests is recorded as level N.

[0033] Set the corresponding basic difficulty coefficient BD for each website visit level;

[0034] Initialize the source IP difficulty coefficient SIPD and the source IP difficulty coefficient growth coefficient SIPDI;

[0035] Initialize the cryptographically secure hash function H and HMAC algorithm used by the human-computer interaction detection module, as well as the HMAC key KHMAC used by the HMAC algorithm; wherein the HMAC algorithm is defined by the RFC 2104 standard and uses the hash function H as the hash function;

[0036] In the specific implementation, the basic difficulty coefficient BD and the source IP difficulty coefficient SIPD are parameters that quantitatively measure the decryption difficulty of the proof-of-work challenge, both of which are positive integers; the basic difficulty coefficient is determined by the website's visit volume level, and the source IP difficulty coefficient is determined by the source IP access frequency. The larger the difficulty coefficient, the higher the difficulty of the proof-of-work challenge generated by the human-computer interaction detection module. The specific difficulty coefficient is designed based on the actual carrying capacity of the website and the expected website visit volume.

[0037] Step 2: When a user initiates a request to a client protected by a human-computer interaction detection module, the human-computer interaction detection module is triggered according to the user's identity information;

[0038] In this step, when a user accesses a client protected by the human-computer interaction detection module, he first submits a login form containing user identity credentials; the login form includes fields: user identity credential ID, user password;

[0039] The client collects the user identifier ID information required by the human-computer interaction detection module according to the login form submitted by the user and sends it to the server;

[0040] When the user identity is authenticated by the server-side identity authentication module, the server submits the user identifier ID and request source IP address SIP information to the human-computer interaction detection module to trigger human-computer interaction detection; conversely, if the user identity authentication fails, the human-computer interaction detection is not triggered.

[0041] Step 3: The human-computer interaction detection module generates a proof-of-work challenge POWC based on the total difficulty coefficient of the human-computer interaction requested, and sends the proof-of-work challenge POWC to the client;

[0042] In this step, the human-computer interaction detection module determines the current network access level based on the business system access volume within a specific time period, and further calculates the basic difficulty coefficient BD corresponding to the website access level;

[0043] The human-computer interaction detection module queries the source IP request frequency SIPF corresponding to the source IP of this request, and multiplies it by the growth coefficient SIPDI of the source IP difficulty coefficient to calculate the difficulty coefficient SIPD corresponding to the source IP of this request; wherein the source IP difficulty coefficient SIPD is a positive integer that controls the verification difficulty of requests from a single source IP address;

[0044] The human-computer interaction detection module adds the basic difficulty coefficient BD and the source IP difficulty coefficient SIPD to obtain the total difficulty coefficient TD of this request;

[0045] The human-computer interaction detection module sets a maximum challenge random number MNonce based on the total difficulty coefficient TD of this request; the maximum challenge random number is a positive integer and increases as the total difficulty coefficient increases, and is used to specify the random range of the proof-of-work challenge of this request. The larger the random range of the proof-of-work challenge, the greater the probability of generating a proof-of-work challenge with a larger value, and the higher the difficulty of the proof-of-work challenge. The human-computer interaction detection module randomly generates a proof-of-work random number Nonce between 0 and the maximum challenge random number MNonce, and generates a fixed-length salt value Salt;

[0046] The human-computer interaction detection module sequentially concatenates the generated proof-of-work random number Nonce and the fixed-length salt value Salt into a string, and uses the hash function H to calculate its hash value as the proof-of-work challenge POWC;

[0047] The human-computer interaction detection module generates a challenge validity period T, and records the corresponding relationship between the user identifier ID, the proof-of-work random number Nonce, and the challenge validity period T in the database for future reference;

[0048] The human-computer interaction detection module uses the prepared HMAC key KHMAC to sign the proof-of-work challenge POWC Sig, and returns the hash algorithm H used by the proof-of-work, the proof-of-work challenge POWC, the fixed-length salt value Salt and the corresponding signature Sig to the client.

[0049] In specific implementations, a smaller challenge maximum random number MNonce will reduce the complexity of the proof-of-work challenge, and the number of computational iterations required for the client to find a matching answer will be fewer; on the contrary, a larger challenge maximum random number MNonce will increase the complexity of the proof-of-work challenge, thereby requiring the client to provide more computing resources and time. The increase in complexity is mainly manifested in the increase in the maximum number of digits that may appear in the proof-of-work random number Nonce as the maximum random number increases.

[0050] Step 4: The client solves the proof-of-work response POWR corresponding to the proof-of-work challenge POWC through iterative calculation, and submits the proof-of-work response message to the human-computer interaction detection module within the validity period;

[0051] The proof-of-work response message includes a proof-of-work challenge POWC, a proof-of-work response POWR, and a user identifier ID;

[0052] In this step, the client traverses all positive integers from 0 in ascending order, and performs the following calculation for each positive integer traversed:

[0053] Sequentially concatenate the traversed positive integers with the salt value Salt in the response message from the server, and use the hash algorithm H to generate the corresponding hash value;

[0054] If the generated hash value is the same as the proof-of-work challenge POWC obtained from the human-computer interaction detection module, the proof-of-work is successful, and the corresponding random number is recorded as the proof-of-work response POWR; otherwise, the client continues this traversal process until it finds a random number that makes the corresponding hash value the same as the proof-of-work challenge POWC;

[0055] The client sends a proof-of-work response message to the human-computer interaction detection module within the validity period T; wherein the proof-of-work response message includes a proof-of-work challenge POWC, a proof-of-work response POWR, a user identifier ID, and a signature Sig.

[0056] Step 5: The human-computer interaction detection module verifies whether the proof-of-work response message submitted by the client is valid. If the proof-of-work response message is valid, the proof-of-work token POWT is returned to the client; otherwise, an error warning is returned and the protocol is exited.

[0057] In this step, the human-computer interaction detection module confirms whether the submission time of the proof-of-work response message is within the validity period T; if the proof-of-work response has expired, it is determined that the client is using an expired challenge to perform a replay attack. The human-computer interaction detection module returns an error message and prohibits the client from accessing protected resources for a certain period of time;

[0058] The human-computer interaction detection module confirms that the proof-of-work response POWR is equal to the proof-of-work random number Nonce stored in the database;

[0059] The human-computer interaction detection module performs signature verification and reconstructs the signature Sig' using the proof-of-work challenge POWC and the HMAC key KHMAC; the reconstructed signature Sig' is compared with the signature Sig submitted by the user on the back end to verify the correctness of the proof-of-work response POWR;

[0060] If the proof-of-work response POWR is valid, the proof-of-work token POWT is returned to the client; otherwise, an error warning is returned and the protocol is exited.

[0061] Step 6: When the client accesses the server protected by the human-computer interaction detection module, it submits the generated proof-of-work token POWT to the server. The server determines whether to allow the user to access the protected resources based on the validity of the proof-of-work token POWT.

[0062] In this step, after receiving the client access request containing the proof-of-work token POWT, the server checks the validity of the proof-of-work token POWT;

[0063] If the verification is successful, the server confirms that the client has successfully passed the human-computer interaction test and allows the user to access protected business resources;

[0064] If the proof-of-work token POWT fails to be verified, the server will reject the access request and return an error message, and restart the human-computer interaction detection process.

[0065] Based on the above method embodiment, the embodiment of the present invention also provides a human-computer interaction detection system based on proof of work, such as Figure 2 FIG. 1 is a schematic diagram of the structure of a human-computer interaction detection system based on proof of work according to an embodiment of the present invention. The system includes:

[0066] The client is configured to trigger the human-computer interaction detection module based on the user's identity information when a user initiates a request to the client protected by the human-computer interaction detection module; solve the proof-of-work response POWR corresponding to the proof-of-work challenge POWC received from the human-computer interaction detection module through iterative calculation, and submit a proof-of-work response message to the human-computer interaction detection module within a validity period; wherein the proof-of-work response message includes the proof-of-work challenge POWC, the proof-of-work response POWR, and the user identifier ID;

[0067] The human-computer interaction detection module is used to generate a proof-of-work challenge POWC based on the total difficulty coefficient of the human-computer interaction requested, and send the proof-of-work challenge POWC to the client; then verify whether the proof-of-work response message submitted by the client is valid. If the proof-of-work response message is valid, the proof-of-work token POWT is returned to the client; otherwise, an error warning is returned and the protocol is exited;

[0068] The server side is used to set the corresponding parameters and initialize the human-computer interaction detection module during the system initialization phase; when the client accesses the server side protected by the human-computer interaction detection module, the client submits the generated proof-of-work token POWT to the server side, and the server side determines whether to allow the user to access the protected resources based on the validity of the proof-of-work token POWT.

[0069] The specific implementation process of each module of the above system is described in the method embodiment.

[0070] It should be noted that the contents not described in detail in the embodiments of the present invention belong to the prior art known to those skilled in the art.

[0071] In summary, the method and system described in the embodiments of the present invention have the following advantages:

[0072] 1) This method and system uses proof-of-work to replace manual access by users, making it more difficult to crack than existing human-computer interaction detection methods based on images or verification codes, and improving the user experience;

[0073] 2) This method and system modify the traditional proof-of-work process, eliminate the hash calculation during the server's verification of the answer's correctness, and convert the cost of client interaction and server response in the entire proof-of-work process into equal resource consumption, thereby making the cost of accessing the server protected by this system high. Compared with the general proof-of-work process, this method and system prevent distributed denial-of-service attacks to a certain extent. At the same time, by adding an expiration time parameter to the salt value and maintaining the corresponding registry for the user's proof-of-work challenge, the timed expiration of the proof-of-work challenge is achieved, which prevents replay attacks compared to the general proof-of-work process.

[0074] In addition, those skilled in the art will understand that all or part of the steps in the above-mentioned embodiment method can be implemented by instructing the relevant hardware through a program, and the corresponding program can be stored in a computer-readable storage medium. The above-mentioned storage medium can be a read-only memory, a disk or an optical disk, etc.

[0075] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by any person skilled in the art within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims. The information disclosed in the background technology section of this article is only intended to deepen the understanding of the overall background technology of the present invention, and should not be regarded as an admission or any form of implication that the information constitutes prior art already known to those skilled in the art.

Claims

1. A human-computer interaction detection method based on proof of work, characterized in that: The method comprises: Step 1: During the system initialization phase, set the corresponding parameters for the human-computer interaction detection module and initialize it; Step 2: When a user initiates a request to a client protected by a human-computer interaction detection module, the human-computer interaction detection module is triggered according to the user's identity information; Step 3: The human-computer interaction detection module generates a proof-of-work challenge POWC based on the total difficulty coefficient of the human-computer interaction requested, and sends the proof-of-work challenge POWC to the client; Step 4: The client solves the proof-of-work response POWR corresponding to the proof-of-work challenge POWC through iterative calculation, and submits a proof-of-work response message to the human-computer interaction detection module within the validity period; wherein the proof-of-work response message includes the proof-of-work challenge POWC, the proof-of-work response POWR and the user identifier ID; Step 5: The human-computer interaction detection module verifies whether the proof-of-work response message submitted by the client is valid. If the proof-of-work response message is valid, the proof-of-work token POWT is returned to the client; otherwise, an error warning is returned and the protocol is exited. Step 6: When the client accesses the server protected by the human-computer interaction detection module, it submits the generated proof-of-work token POWT to the server. The server determines whether to allow the user to access the protected resources based on the validity of the proof-of-work token POWT.

2. The human-computer interaction detection method based on proof of work according to claim 1 is characterized in that: In step 1, the parameters to be set include: (1) Website traffic level, which is to divide the expected number of requests to the protected business system within a specific time into N segments; (2) setting a corresponding basic difficulty coefficient BD for each website visit volume level, wherein the basic difficulty coefficient BD is a positive integer and is used to control the verification difficulty of the human-computer interaction detection module under the corresponding website visit volume; (3) The growth coefficient of the source IP difficulty coefficient SIPDI is a coefficient that controls the increase in the verification difficulty of a single source IP address as the number of requests SIPF of the single source IP address within a specific time period increases; (4) Hash function H, which is a cryptographically secure hash function used by the server to generate the proof-of-work challenge and the user to decrypt the proof-of-work challenge; (5) HMAC key KHMAC, used to sign subsequent challenge and response messages to ensure message integrity and authenticity; The initialization process is as follows: First, the website traffic level is initialized, and the expected number of requests to the protected business system within a specific time period is divided into N segments. The segment with the least expected number of requests is recorded as level 1, and the segment with the most expected number of requests is recorded as level N. Set the corresponding basic difficulty coefficient BD for each website visit level; Initialize the source IP difficulty coefficient SIPD and the source IP difficulty coefficient growth coefficient SIPDI; Initialize the cryptographically secure hash function H and HMAC algorithm used by the human-computer interaction detection module, as well as the HMAC key KHMAC used by the HMAC algorithm; Among them, the basic difficulty coefficient BD and the source IP difficulty coefficient SIPD are parameters that quantitatively measure the decryption difficulty of the proof-of-work challenge, and both are positive integers; the basic difficulty coefficient is determined by the website's visit volume level, and the source IP difficulty coefficient is determined by the source IP access frequency. The larger the difficulty coefficient, the higher the difficulty of the proof-of-work challenge generated by the human-computer interaction detection module. The specific difficulty coefficient is designed based on the actual carrying capacity of the website and the expected website visits.

3. The human-computer interaction detection method based on proof of work according to claim 1 is characterized in that: In step 2, when a user accesses a client protected by the human-computer interaction detection module, he first submits a login form containing user identity credentials; the login form includes fields: user identity credential ID, user password; The client collects the user identifier ID information required by the human-computer interaction detection module according to the login form submitted by the user and sends it to the server; When the user identity is authenticated by the server-side identity authentication module, the server submits the user identifier ID and request source IP address SIP information to the human-computer interaction detection module to trigger human-computer interaction detection; conversely, if the user identity authentication fails, the human-computer interaction detection is not triggered.

4. The human-computer interaction detection method based on proof of work according to claim 1 is characterized in that: In step 3, the human-computer interaction detection module determines the current network access level based on the business system access volume within a specific time period, and further calculates the basic difficulty coefficient BD corresponding to the website access level; The human-computer interaction detection module queries the source IP request frequency SIPF corresponding to the source IP of this request, and multiplies it by the growth coefficient SIPDI of the source IP difficulty coefficient to calculate the difficulty coefficient SIPD corresponding to the source IP of this request; wherein the source IP difficulty coefficient SIPD is a positive integer that controls the verification difficulty of requests from a single source IP address; The human-computer interaction detection module adds the basic difficulty coefficient BD and the source IP difficulty coefficient SIPD to obtain the total difficulty coefficient TD of this request; The human-computer interaction detection module sets a maximum challenge random number MNonce based on the total difficulty coefficient TD of this request; the maximum challenge random number is a positive integer and increases as the total difficulty coefficient increases, and is used to specify the random range of the proof-of-work challenge of this request. The larger the random range of the proof-of-work challenge, the greater the probability of generating a proof-of-work challenge with a larger value, and the higher the difficulty of the proof-of-work challenge. The human-computer interaction detection module randomly generates a proof-of-work random number Nonce between 0 and the maximum challenge random number MNonce, and generates a fixed-length salt value Salt; The human-computer interaction detection module sequentially concatenates the generated proof-of-work random number Nonce and the fixed-length salt value Salt into a string, and uses the hash function H to calculate its hash value as the proof-of-work challenge POWC; The human-computer interaction detection module generates a challenge validity period T, and records the corresponding relationship between the user identifier ID, the proof-of-work random number Nonce, and the challenge validity period T in the database for future reference; The human-computer interaction detection module uses the prepared HMAC key KHMAC to sign the proof-of-work challenge POWC Sig, and returns the hash algorithm H used by the proof-of-work, the proof-of-work challenge POWC, the fixed-length salt value Salt and the corresponding signature Sig to the client.

5. The human-computer interaction detection method based on proof of work according to claim 1 is characterized in that: In step 4, the client traverses all positive integers from 0 in ascending order, and performs the following calculation for each positive integer traversed: Sequentially concatenate the traversed positive integers with the salt value Salt in the response message from the server, and use the hash algorithm H to generate the corresponding hash value; If the generated hash value is the same as the proof-of-work challenge POWC obtained from the human-computer interaction detection module, the proof-of-work is successful, and the corresponding random number is recorded as the proof-of-work response POWR; otherwise, the client continues this traversal process until it finds a random number that makes the corresponding hash value the same as the proof-of-work challenge POWC; The client sends a proof-of-work response message to the human-computer interaction detection module within the validity period T; wherein the proof-of-work response message includes a proof-of-work challenge POWC, a proof-of-work response POWR, a user identifier ID, and a signature Sig.

6. The human-computer interaction detection method based on proof of work according to claim 1 is characterized in that: In step 5, the human-computer interaction detection module confirms whether the submission time of the proof-of-work response message is within the validity period T; if the proof-of-work response has expired, it is determined that the client is using an expired challenge to perform a replay attack, and the human-computer interaction detection module returns an error message and prohibits the client from accessing protected resources for a certain period of time; The human-computer interaction detection module confirms that the proof-of-work response POWR is equal to the proof-of-work random number Nonce stored in the database; The human-computer interaction detection module performs signature verification and reconstructs the signature Sig' using the proof-of-work challenge POWC and the HMAC key KHMAC; the reconstructed signature Sig' is compared with the signature Sig submitted by the user on the back end to verify the correctness of the proof-of-work response POWR; If the proof-of-work response POWR is valid, a proof-of-work token POWT is returned to the client; Otherwise, an error warning will be returned and the protocol will be exited.

7. The human-computer interaction detection method based on proof of work according to claim 1 is characterized in that: In step 6, after receiving the client access request containing the proof-of-work token POWT, the server checks the validity of the proof-of-work token POWT; If the verification is successful, the server confirms that the client has successfully passed the human-computer interaction test and allows the user to access protected business resources; If the proof-of-work token POWT fails to be verified, the server will reject the access request and return an error message, and restart the human-computer interaction detection process.

8. A human-computer interaction detection system based on proof of work, characterized in that: The system comprises: The client is configured to trigger the human-computer interaction detection module based on the user's identity information when a user initiates a request to the client protected by the human-computer interaction detection module; solve the proof-of-work response POWR corresponding to the proof-of-work challenge POWC received from the human-computer interaction detection module through iterative calculation, and submit a proof-of-work response message to the human-computer interaction detection module within a validity period; wherein the proof-of-work response message includes the proof-of-work challenge POWC, the proof-of-work response POWR, and the user identifier ID; The human-computer interaction detection module is used to generate a proof-of-work challenge POWC based on the total difficulty coefficient of the human-computer interaction requested, and send the proof-of-work challenge POWC to the client; then verify whether the proof-of-work response message submitted by the client is valid. If the proof-of-work response message is valid, the proof-of-work token POWT is returned to the client; otherwise, an error warning is returned and the protocol is exited; The server side is used to set the corresponding parameters and initialize the human-computer interaction detection module during the system initialization phase; when the client accesses the server side protected by the human-computer interaction detection module, the client submits the generated proof-of-work token POWT to the server side, and the server side determines whether to allow the user to access the protected resources based on the validity of the proof-of-work token POWT.