Web picture-based human-computer verification method and device
By sending the hash value of a random original image and a puzzle link to the client, the client removes obfuscated links and displays the rotated fragments. The server verifies and restores the trajectory data, which solves the problem of easy cracking of web crawlers in existing technologies and improves the verification accuracy.
Patent Information
- Application Number
- CN202211532918.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-01
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2042-12-01
AI Technical Summary
Existing web image verification methods are easily cracked by web crawlers, resulting in low accuracy of server verification.
By sending the hash value of a random original image and multiple puzzle links to the client, the client removes the obfuscated links and displays the rotated pieces. The server verifies the data based on the restored trajectory and the hash value, increasing the difficulty of cracking the puzzle.
This increases the difficulty of cracking the verification method, prevents web crawlers from simulating human clicks, and improves the accuracy of server verification.
Smart Images

Figure CN116028920B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a human-computer verification method and apparatus based on web images. Background Technology
[0002] With the rapid development of the Internet, more and more attention is being paid to the protection of data security. Servers usually verify the identity of visitors. When a user visits a web page, the server will verify the visitor's identity in order to ensure data security and determine whether the visitor is a web crawler or bot based on the verification result.
[0003] Currently, most common verification methods in related technologies employ slider verification, text selection verification, and image rotation verification. These methods analyze the trajectory generated by the user during the verification process to determine the user's identity.
[0004] Text selection verification in related technologies involves clicking on Chinese characters provided at the bottom of the image in sequence. By segmenting and recognizing text from a library to build a data model, the recognition rate increases with the number of models, thus failing to detect web crawlers. Slider verification typically involves discrete analysis of the user's slider movement trajectory; those matching the discrete results are considered genuine and allowed access. This method simulates human sliding behavior to confuse the server's verification. Image rotation verification involves clicking to rotate the image to the location corresponding to the text. The server uses the angle between the straight line and the horizontal baseline to determine if it's a genuine operation. These verification methods are relatively easy to crack and can be easily imitated by web crawlers, resulting in low server verification accuracy. Summary of the Invention
[0005] In view of this, the present disclosure provides a human-computer verification method and apparatus based on web images, which can increase the difficulty of cracking the verification method and improve the accuracy of server verification.
[0006] In a first aspect, embodiments of this disclosure provide a human-computer verification method based on web images, employing the following technical solution:
[0007] Send an authentication request to the server and obtain the hash value of the random original image returned by the server in response to the authentication request;
[0008] The hash value of the random original image is sent to the server, and a data packet carrying the hash value of the random original image and multiple puzzle links is received from the server, wherein the puzzle links include target links that are allowed to be accessed by users and randomly generated obfuscated links that are prohibited from being accessed by users.
[0009] Remove the obfuscated links that fail to be accessed, and display the rotating fragments corresponding to the target links that are successfully accessed in sequence within the verification area;
[0010] The rotating fragments are restored sequentially to obtain restored images, and the restoration trajectory data of each rotating fragment during the restoration process is recorded.
[0011] The restored trajectory data of the rotating fragment and the data packet carrying the hash value of the random original image are sent to the server, so that the server can verify the pre-stored preset restored trajectory and the restored trajectory data of the rotating fragment sent by the client based on the hash value of the received random original image.
[0012] In some embodiments, the rotated fragments are sequentially restored to obtain a restored image, including:
[0013] Several properties are created for the several rotating fragments using JavaScript, wherein the property values of the several properties correspond sequentially to the rotation record values of the rotating fragments, and the initial value of the rotation record values is zero;
[0014] The rotation operation is performed on each of the rotated fragments in sequence to obtain the restored fragments, and the rotation record value of each of the rotated fragments is saved;
[0015] After the rotation is complete, the restored fragments are stitched together to obtain the restored image.
[0016] In some embodiments, the method further includes:
[0017] Count the number of rotations of the rotating fragment during the rotation process;
[0018] When the number of rotations is less than a preset threshold, the number of rotations is used as the rotation record value of the rotating fragment;
[0019] When the number of rotations is greater than or equal to a preset threshold, the remainder of the number of rotations is calculated and used as the rotation record value of the rotating fragment.
[0020] In some embodiments, the restored trajectory data of the rotating fragment and a data packet carrying the hash value of the random original image are sent to a server, so that the server verifies the pre-stored preset restored trajectory and the restored trajectory data of the rotating fragment sent by the client based on the received hash value of the random original image, including:
[0021] The created attribute values are concatenated into strings with preset identifiers as intervals;
[0022] The concatenated string and the data packet carrying the hash value of the random original image are sent to the server, so that the server can verify the pre-stored preset restoration trajectory and the string representing the restoration trajectory data sent by the client based on the received hash value of the random original image;
[0023] Receive the verification value returned by the server based on the successful verification result;
[0024] Send an access request carrying the verification value to the server;
[0025] Receive the target access page returned by the server if the verification value is correct; or, receive the historical access page returned by the server if the verification value is incorrect, displaying a verification failure result.
[0026] In some embodiments, removing the obfuscated links that fail to access and sequentially displaying the rotating fragments corresponding to the successfully accessed target links within the verification area includes:
[0027] The puzzle links are accessed sequentially according to the order in which they are arranged in the data packet;
[0028] When the puzzle link is successfully accessed, the puzzle link is determined to be the target link, and the rotated piece obtained according to the target link is displayed in the corresponding position of the verification area;
[0029] When the puzzle link access fails, the puzzle link is determined to be an obfuscated link and is removed. The process continues to access other puzzle links in the puzzle data package until all puzzle links are accessed. The rotated pieces obtained from accessing the puzzle links are then displayed sequentially at their corresponding positions in the verification area.
[0030] In some embodiments, the method further includes:
[0031] Obtain several original images to be cut, wherein the original images to be cut do not include solid color images;
[0032] The original image to be cut is cut into several puzzle pieces;
[0033] The puzzle pieces are rotated according to preset rules to obtain rotated pieces, and the hash value of the original image, the URL address of the rotated piece, and the preset restoration trajectory of the rotated piece are stored as verification data on the server.
[0034] Secondly, this disclosure also provides a human-computer verification method based on web images, employing the following technical solution:
[0035] In response to the client's authentication request, the system sends the hash value of a random original image to the client and receives the hash value of the random original image returned by the client. The system then sends a data packet to the client carrying the hash value of the random original image and multiple puzzle links, wherein the puzzle links include target links that allow users to access and randomly generated obfuscated links that prohibit users from accessing.
[0036] In response to an access request for the obfuscated link, a blocked access page is returned; and in response to an access request for the target link, the rotating fragment corresponding to the target link is returned.
[0037] The system receives the restoration trajectory data generated by the rotating fragment during the restoration operation and the data packet carrying the hash value of the random original image sent by the client, and verifies the pre-stored preset restoration trajectory and the restoration trajectory data of the rotating fragment sent by the client based on the hash value of the received random original image.
[0038] In some embodiments, the method further includes:
[0039] Check if an update request for historical verification data has been received;
[0040] When the update request is received, the historical verification data is automatically updated by the script, and the position and number of puzzle pieces in the updated verification data are different from the position and number of historical puzzle pieces in the historical verification data.
[0041] Thirdly, this disclosure also provides a human-computer verification device based on web images, employing the following technical solution:
[0042] The first sending unit is configured to send an authentication request to the server and obtain the hash value of the random original image returned by the server in response to the authentication request;
[0043] The receiving unit is configured to send the hash value of the random original image to the server and receive a data packet sent by the server carrying the hash value of the random original image and multiple puzzle links, wherein the puzzle links include target links that are allowed to be accessed by users and randomly generated obfuscated links that are prohibited from being accessed by users.
[0044] The processing unit is configured to remove the obfuscated links that fail to be accessed, and to sequentially display the rotating fragments corresponding to the target links that are successfully accessed within the verification area.
[0045] The image restoration unit is configured to sequentially perform restoration operations on the rotating fragments to obtain restored images, and record the restoration trajectory data of each rotating fragment during the restoration operation.
[0046] The first verification unit is configured to send the restored trajectory data of the rotating fragment and a data packet carrying the hash value of the random original image to the server, so that the server can verify the pre-stored preset restoration trajectory and the restored trajectory data of the rotating fragment sent by the client based on the hash value of the received random original image.
[0047] Fourthly, this disclosure also provides a human-machine verification device based on web images, employing the following technical solution:
[0048] The second sending unit is configured to, in response to an authentication request from a client, send a hash value of a random original image to the client, receive a hash value of a random original image returned by the client, and send a data packet carrying the hash value of the random original image and multiple puzzle links to the client, wherein the puzzle links include target links that allow users to access and randomly generated obfuscated links that prohibit users from accessing.
[0049] The third sending unit is configured to return a blocked page in response to an access request for the obfuscated link; and to return a rotating fragment corresponding to the target link in response to an access request for the target link.
[0050] The second verification unit is configured to receive the restoration trajectory data generated by the rotating fragment during the restoration operation and the data packet carrying the hash value of the random original image sent by the client, and to verify the pre-stored preset restoration trajectory and the restoration trajectory data of the rotating fragment sent by the client according to the hash value of the received random original image.
[0051] This disclosure provides a human-computer verification method and apparatus based on web images. The method includes: sending an authentication request to a server and obtaining the hash value of a random original image returned by the server in response to the authentication request; sending the hash value of the random original image to the server and receiving a data packet sent by the server in response to the authentication request, carrying the hash value of the random original image and multiple puzzle links, wherein the puzzle links include target links that allow users to access and randomly generated obfuscated links that prohibit users from accessing; removing obfuscated links that fail to be accessed and sequentially displaying the rotating fragments corresponding to the target links that are successfully accessed in a verification area; sequentially performing restoration operations on the rotating fragments to obtain restored images; and recording the restoration trajectory data of each rotating fragment during the restoration operation; sending the restoration trajectory data of the rotating fragments and the data packet carrying the hash value of the random original image to the server, so that the server verifies the pre-stored preset restoration trajectory and the restoration trajectory data of the rotating fragments sent by the client based on the received hash value of the random original image.
[0052] In this embodiment, the server responds to the client's authentication request by sending a hash value of a random original image to the client. The hash value of the random original image completes the handshake connection between the server and the client. Furthermore, by adding obfuscated links that prohibit user access to the data packets sent by the server to the client, the number of puzzle pieces cannot be determined by the number of puzzle links in the data packets. The client removes the obfuscated links that fail to be accessed. When the user clicks the correct puzzle link, the correct rotated piece is displayed in the client's verification area. The server verifies the pre-stored preset restoration trajectory and the restoration trajectory data of the rotated piece sent by the client based on the received hash value of the random original image. This increases the difficulty of cracking the verification method and the difficulty of machine recognition, preventing crawler robots from simulating human clicking behavior and improving the server's verification accuracy.
[0053] The above description is merely an overview of the technical solution disclosed herein. In order to better understand the technical means of this disclosure and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0054] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0055] Figure 1 A flowchart illustrating a web image-based human-computer verification method provided in this embodiment of the disclosure;
[0056] Figure 2 A flowchart illustrating another web image-based human-computer verification method provided in this embodiment of the present disclosure;
[0057] Figure 3 This is a schematic diagram of the structure of a web image-based human-computer verification method provided in an embodiment of the present disclosure;
[0058] Figure 4 This is a schematic diagram of another web image-based human-computer verification method provided in an embodiment of the present disclosure;
[0059] Figure 5 This is a schematic block diagram of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation
[0060] The embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.
[0061] It should be understood that the following specific examples illustrate the implementation of this disclosure, and those skilled in the art can easily understand other advantages and effects of this disclosure from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. This disclosure can also be implemented or applied through other different specific implementation methods, and the details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this disclosure. It should be noted that, in the absence of conflict, the following embodiments and features in the embodiments can be combined with each other. Based on the embodiments in this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0062] It should be noted that various aspects of embodiments within the scope of the appended claims are described below. It will be apparent that the aspects described herein can be embodied in a wide variety of forms, and any particular structure and / or function described herein is merely illustrative. Based on this disclosure, those skilled in the art will understand that one aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects set forth herein can be used to implement the device and / or practice the method. Additionally, this device and / or method can be implemented using structures and / or functionalities other than one or more of the aspects set forth herein.
[0063] It should also be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this disclosure. The drawings only show the components related to this disclosure and are not drawn according to the number, shape and size of the components in actual implementation. In actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0064] Furthermore, specific details are provided in the following description to facilitate a thorough understanding of the examples. However, those skilled in the art will understand that the described aspects can be practiced without these specific details.
[0065] like Figure 1 As shown, this disclosure provides a web image-based human-computer verification method, executed on a client side, which includes the following steps:
[0066] S101. The client sends an authentication request to the server and obtains the hash value of the random original image returned by the server in response to the authentication request.
[0067] When a user accesses the web interface on the client, the user can send an authentication request to the server by clicking the button on the web interface to obtain the puzzle piece, etc. The server returns the hash value of the random original image to the client based on the received authentication request.
[0068] S102. The client sends the hash value of the random original image to the server and receives a data packet sent by the server in response to the authentication request, which carries the hash value of the random original image and multiple puzzle links. The puzzle links include target links that allow users to access and randomly generated obfuscated links that prohibit users from accessing them.
[0069] The server sends a data packet containing the hash value of a random original image and multiple puzzle links to the client based on the client's authentication request. The client accesses the multiple puzzle links contained in the data packet. If a puzzle link cannot be accessed, it is determined to be an obfuscated link. The image in the obfuscated link is an obfuscated image randomly generated by the server according to an algorithm. The server can verify the identity of the user accessing the web interface based on the obfuscated image to determine whether the visitor is a web crawler, thereby increasing the cost of cracking and preventing web crawlers from simulating the user's manual clicking behavior on images.
[0070] S103. The client removes the obfuscated links that failed to be accessed and displays the rotating fragments corresponding to the successfully accessed target links in the verification area in sequence.
[0071] The client removes the obfuscated links and continues to access other puzzle links in the data packet. When a user accesses a puzzle link, it is determined that the puzzle link is the target link. The rotating pieces corresponding to the target link are then arranged sequentially and displayed in the verification area of the web interface. It should be noted that users can set the number of obfuscated links according to their actual needs, and this embodiment does not limit this.
[0072] S104. The client sequentially performs restoration operations on the rotating fragments to obtain restored images and records the restoration trajectory data of each rotating fragment during the restoration operation.
[0073] Users can rotate the fragments in the verification area by clicking the corresponding operation button on the web interface to obtain the restored fragments. The restored fragments are then stitched together to obtain the complete restored image.
[0074] S105. The client sends the restored trajectory data of the rotating fragment and the data packet carrying the hash value of the random original image to the server, so that the server can verify the pre-stored preset restored trajectory and the restored trajectory data of the rotating fragment sent by the client based on the hash value of the received random original image.
[0075] In this embodiment, the server responds to the client's authentication request by sending a hash value of a random original image to the client. The hash value of the random original image completes the handshake connection between the server and the client. Furthermore, by adding obfuscated links that prohibit user access to the data packets sent by the server to the client, the number of puzzle pieces cannot be determined by the number of puzzle links in the data packets. The client removes the obfuscated links that fail to be accessed. When the user clicks the correct puzzle link, the correct rotated piece is displayed in the client's verification area. The server verifies the pre-stored preset restoration trajectory and the restoration trajectory data of the rotated piece sent by the client based on the received hash value of the random original image. This increases the difficulty of cracking the verification method and the difficulty of machine recognition, preventing crawler robots from simulating human clicking behavior and improving the server's verification accuracy.
[0076] In some embodiments, the method further includes:
[0077] The client obtains several original images to be cut from the web browser in advance. The original images to be cut do not include solid color images.
[0078] The client cuts the original image to be cut into several puzzle pieces proportionally.
[0079] The client rotates the puzzle pieces according to preset rules to obtain rotated pieces, and stores the hash value of the original image, the URL address of the rotated piece, and the preset restoration trajectory of the rotated piece as verification data to the server.
[0080] Optionally, several images with a single color and relatively complex graphics can be obtained from a web browser as the original images to be cut. Optionally, the original images can contain two or more colors, but cannot be solid color images. This increases the difficulty of machine recognition, preventing web crawlers from simulating human clicking behavior. Furthermore, web crawlers cannot quickly and accurately locate the correct orientation of the puzzle pieces based solely on the recognition of the cut puzzle pieces, and the randomness of the number of puzzle pieces further increases the difficulty of building a machine recognition model, ensuring the security of human-machine verification.
[0081] Optionally, the original image to be cut is cut proportionally along the x and y axes, and the number of cuts is random. For example, the number of puzzle pieces obtained after cutting can be set to be an even number, which should be greater than 1 and less than 6. This is because if the number of cuts is less than 1, it cannot serve the purpose of verification, while if the number of cuts is greater than 6, the number of puzzle pieces obtained will be too large, which will increase the user's verification time and result in a poor user experience.
[0082] In this embodiment, the number of puzzle pieces obtained after cutting can be set to 4. The puzzle pieces are labeled, the current position of the puzzle piece is taken as the initial position, and the initial rotation record value of the puzzle piece is set to zero. The puzzle piece can be rotated to the right any number of times according to a preset rule. Each time the puzzle piece is rotated to the right, the rotation count of the puzzle piece is incremented by one. After the rotation is completed, the rotation count of the puzzle piece is counted. For example, if the puzzle piece is rotated to the right 3 times, the rotation count of the puzzle piece is less than a preset threshold (for example, the preset threshold is 4), so the rotation count of 3 is recorded as the rotation count value. As another example, if the puzzle piece is rotated to the right 4 times, the rotation count of the puzzle piece is equal to the preset threshold (for example, the preset threshold is 4), so the rotation count is %4 and the remainder is 0, so the remainder 0 is saved as the rotation record value. As yet another example, if the count of the number of rotations of the puzzle piece is 5, then the rotation count of 5 is %4 and the remainder is 1, so the remainder 1 is saved as the rotation record value of the puzzle piece.
[0083] The number of rotations required to complete one full rotation of a puzzle piece is 4. In other words, if the puzzle piece is rotated 4 times, it will return to its original position.
[0084] If the user rotates the puzzle piece multiple times, for example, 17 times, the number of rotations of the puzzle piece is recorded as 17. The remainder of the puzzle piece is calculated by taking 4% of the number of rotations, and the remainder 1 is used as the rotation record value of the puzzle piece.
[0085] Optionally, during the right rotation operation of the puzzle pieces, the client records the rotation trajectory of the puzzle pieces and sends the rotation trajectory to the server. The server generates a preset restoration trajectory of the rotated image based on the rotation trajectory and stores the hash value of the original image corresponding to the rotated piece, the URL address of the rotated piece, and the preset restoration trajectory of the rotated piece as verification data on the server.
[0086] In some embodiments, step S104, in which the client sequentially performs a restoration operation on the rotated fragments to obtain a restored image, includes:
[0087] The client uses JavaScript to create several properties for several rotating fragments. The property values of these properties correspond to the rotation record values of the rotating fragments, and the initial value of the rotation record values of the rotating fragments is zero. For example, if there are four rotating images in this embodiment, then four properties a, b, c, and d can be created using JavaScript.
[0088] The client performs rotation operations on each rotated fragment sequentially to obtain the restored fragment, and saves the rotation record value of each rotated fragment;
[0089] After the rotation is complete, the client stitches together several restored fragments to obtain the restored image.
[0090] In some embodiments, the method further includes:
[0091] Count the number of rotations of the rotating fragment during the rotation process;
[0092] When the number of rotations is less than a preset threshold, the number of rotations is used as the rotation record value of the rotating fragment;
[0093] When the number of rotations is greater than or equal to a preset threshold, the remainder of the number of rotations is calculated and used as the rotation record value of the rotating fragment.
[0094] Optionally, a rotated piece can be defined as an image in which the puzzle pieces have been rotated to the right in advance and stored on the server. When the client performs a restore operation on the rotated piece, it is equivalent to rotating the rotated piece to the left.
[0095] For example, the initial value of the rotation record value of the rotating fragment is zero. Each time the rotating fragment is rotated to the left, the number of rotations of the rotating fragment is increased by one. If the rotating fragment is rotated five times, the number of rotations of the rotating fragment is recorded as five. If the number of rotations is greater than a preset threshold (for example, the preset threshold is 4), the number of rotations is calculated by taking %4, and the remainder of the number of rotations is 1. The remainder 1 is used as the rotation record value of the rotating fragment.
[0096] In some embodiments, the client sends the restored trajectory data of the rotating fragment and a data packet carrying a hash value of a random original image to the server, so that the server verifies the pre-stored preset restored trajectory and the restored trajectory data of the rotating fragment sent by the client based on the hash value of the received random original image, including:
[0097] The client will concatenate several attribute values created with preset identifiers as intervals;
[0098] The client sends the concatenated string and the data packet carrying the hash value of the random original image to the server, so that the server can verify the pre-stored preset restoration trajectory and the string representing the restoration trajectory data sent by the client based on the hash value of the received random original image.
[0099] The client receives the verification value returned by the server based on a successful verification result;
[0100] Send an access request with a verification value to the server;
[0101] The receiving server returns the target access page if the checksum is correct; or, if the receiving server returns a historical access page showing the checksum failure result if the checksum is incorrect.
[0102] Optionally, JavaScript is used to concatenate the values of the four created attributes a, b, c, and d into strings, separated by preset identifiers, such as commas. After the user completes the leftward rotation operation on the rotating fragment and obtains the restored fragment, the user clicks the submit button. The concatenated string is then sent to the server via JavaScript. The server verifies the restored trajectory data of the rotating fragment sent by the client against the pre-stored preset restored trajectory based on the hash value of the received random original image.
[0103] Optionally, the client sends an authentication request to the server that includes the user's IP address. The server records the number of times the user accesses the server. When a user's access request fails authentication and the number of accesses reaches the access threshold, the server can add the IP address to the blacklist to prohibit the user's access, thereby ensuring the security of human-machine authentication.
[0104] In some embodiments, the client removes the obfuscated links that fail to access and displays the rotating fragments corresponding to the successfully accessed target links sequentially within the verification area, including:
[0105] The client accesses the puzzle links sequentially according to the order in which they are arranged in the data packet;
[0106] When the puzzle link is successfully accessed, the puzzle link is identified as the target link, and the rotated piece obtained from the target link is displayed in the corresponding position in the verification area.
[0107] If a puzzle link access fails, it is determined to be an obfuscated link and is removed. The process continues to access other puzzle links in the data packet until all puzzle links have been accessed. The rotated pieces obtained from accessing the puzzle links are then displayed sequentially in the corresponding positions of the verification area.
[0108] For example, if a data packet contains six puzzle links, with the second and third links being obfuscated, then when the client accesses the first puzzle link, it can access it normally and obtain the rotated piece, displaying it in the first display area of the verification region. When the client accesses the second puzzle link, it cannot access the obfuscated link and removes it; when the client accesses the third puzzle link, it cannot access the obfuscated link and removes it; when the client accesses the fourth puzzle link, it can access it normally and displays the obtained rotated piece in the second display area of the verification region; when the client accesses the fifth puzzle link, it can access it normally and displays the obtained rotated piece in the third display area of the verification region; when the client accesses the sixth puzzle link, it can access it normally and displays the obtained rotated piece in the fourth display area of the verification region.
[0109] like Figure 2 As shown, this disclosure also provides a web image-based human-computer verification method, executed on the server side, including:
[0110] S201. In response to the client's authentication request, the server sends the hash value of the random original image to the client and receives the hash value of the random original image returned by the client. The server then sends a data packet to the client carrying the hash value of the random original image and multiple puzzle links, wherein the puzzle links include target links that allow users to access and randomly generated obfuscated links that prohibit users from accessing.
[0111] S202. In response to an access request for an obfuscated link, the server returns a forbidden page; and in response to an access request for a target link, it returns the rotating fragment corresponding to the target link.
[0112] S203. The server receives the restoration trajectory data generated during the restoration operation of the rotating fragment sent by the client and the data packet carrying the hash value of the random original image, and verifies the pre-stored preset restoration trajectory and the restoration trajectory data of the rotating fragment sent by the client based on the hash value of the received random original image.
[0113] In some embodiments, the verification method further includes:
[0114] The server checks whether it has received an update request from the client for historical verification data.
[0115] When a data update request is received from the server, the server automatically updates the historical verification data via a script. The position and number of puzzle pieces in the updated verification data are different from the position and number of historical puzzle pieces in the historical verification data.
[0116] The embodiments disclosed herein can protect web pages, increase the difficulty of machine learning, increase the cost of cracking, and the server's verification data is automatically updated by the script on a regular basis without manual intervention. Moreover, the positions and number of puzzle pieces generated by updating the same base image are different each time, so there is no need to frequently change the base image data in a short period of time.
[0117] like Figure 3 As shown in the embodiments of this disclosure, a human-computer verification device based on web images is also provided, including:
[0118] The first sending unit 31 is configured to send an authentication request to the server and obtain the hash value of the random original image returned by the server in response to the authentication request;
[0119] The receiving unit 32 is configured to send the hash value of the random original image to the server and receive a data packet sent by the server carrying the hash value of the random original image and multiple puzzle links, wherein the puzzle links include target links that allow users to access and randomly generated obfuscated links that prohibit users from accessing.
[0120] The processing unit 33 is configured to remove obfuscated links that fail to be accessed and to display the rotating fragments corresponding to the target links that are successfully accessed in sequence within the verification area.
[0121] Image restoration unit 34 is configured to perform restoration operations on the rotating fragments sequentially to obtain restored images, and to record the restoration trajectory data of each rotating fragment during the restoration operation.
[0122] The first verification unit 35 is configured to send the restored trajectory data of the rotating fragment and the data packet carrying the hash value of the random original image to the server, so that the server can verify the pre-stored preset restoration trajectory and the restored trajectory data of the rotating fragment sent by the client based on the hash value of the received random original image.
[0123] like Figure 4 As shown in the embodiments of this disclosure, a human-computer verification device based on web images is also provided, including:
[0124] The second sending unit 41 is configured to respond to the client's authentication request by sending the hash value of the random original image to the client, receiving the hash value of the random original image returned by the client, and sending a data packet carrying the hash value of the random original image and multiple puzzle links to the client, wherein the puzzle links include target links that allow users to access and randomly generated obfuscated links that prohibit users from accessing.
[0125] The third sending unit 42 is configured to return a blocked page in response to an access request for an obfuscated link; and to return a rotating fragment corresponding to the target link in response to an access request for the target link.
[0126] The second verification unit 43 is configured to receive the restoration trajectory data generated by the rotating fragment during the restoration operation and the data packet carrying the hash value of the random original image sent by the client, and to verify the pre-stored preset restoration trajectory and the restoration trajectory data of the rotating fragment sent by the client according to the hash value of the received random original image.
[0127] An electronic device according to embodiments of the present disclosure includes a memory and a processor. The memory is used to store non-transitory computer-readable instructions. Specifically, the memory may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may, for example, include random access memory (RAM) and / or cache memory. The non-volatile memory may, for example, include read-only memory (ROM), a hard disk, flash memory, etc.
[0128] The processor may be a central processing unit (CPU) or other processing unit with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions. In one embodiment of this disclosure, the processor is used to execute computer-readable instructions stored in the memory, causing the electronic device to perform all or part of the steps of the web image-based human-machine verification method described in the foregoing embodiments of this disclosure.
[0129] Those skilled in the art will understand that, in order to solve the technical problem of how to achieve a good user experience, this embodiment may also include well-known structures such as communication buses and interfaces, and these well-known structures should also be included within the protection scope of this disclosure.
[0130] like Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. It illustrates a structural schematic diagram suitable for implementing the electronic device in the embodiment of the present disclosure. Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0131] like Figure 5As shown, an electronic device may include a processing unit (such as a central processing unit, graphics processing unit, etc.) that can perform various appropriate actions and processes based on a program stored in read-only memory (ROM) or a program loaded from a storage device into random access memory (RAM). The RAM also stores various programs and data required for the operation of the electronic device. The processing unit, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.
[0132] Typically, the following devices can be connected to the I / O interface: input devices, such as sensors or visual information acquisition devices; output devices, such as displays; storage devices, such as magnetic tapes or hard drives; and communication devices. Communication devices allow electronic devices to communicate wirelessly or wiredly with other devices (such as edge computing devices) to exchange data. Although Figure 5 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have instead.
[0133] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processing device, all or part of the steps of the web image-based human-machine verification method of embodiments of this disclosure are performed.
[0134] For a detailed description of this embodiment, please refer to the corresponding descriptions in the foregoing embodiments, which will not be repeated here.
[0135] A computer-readable storage medium according to embodiments of the present disclosure stores non-transitory computer-readable instructions. When the non-transitory computer-readable instructions are executed by a processor, all or part of the steps of the web image-based human-machine verification methods described in the foregoing embodiments of the present disclosure are performed.
[0136] The aforementioned computer-readable storage media include, but are not limited to: optical storage media (e.g., CD-ROM and DVD), magneto-optical storage media (e.g., MO), magnetic storage media (e.g., magnetic tape or portable hard drive), media with built-in rewritable non-volatile memory (e.g., memory card), and media with built-in ROM (e.g., ROM cartridge).
[0137] For a detailed description of this embodiment, please refer to the corresponding descriptions in the foregoing embodiments, which will not be repeated here.
[0138] The basic principles of this disclosure have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this disclosure are merely examples and not limitations, and should not be considered as essential features of each embodiment of this disclosure. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the scope of this disclosure to the necessity of employing the aforementioned specific details for implementation.
[0139] In this disclosure, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The block diagrams of devices, apparatuses, devices, and systems involved in this disclosure are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as "comprising," "including," "having," etc., are open-ended terms meaning "including but not limited to," and are used interchangeably with them. The terms "or" and "and" as used herein refer to the terms "and / or," and are used interchangeably with them unless the context clearly indicates otherwise. The term "such as" as used herein refers to the phrase "such as but not limited to," and is used interchangeably with it.
[0140] Additionally, as used herein, the “or” used in a list of items beginning with “at least one” indicates a separate list, such that a list of, for example, “at least one of A, B, or C” means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word “exemplary” does not imply that the described example is preferred or better than other examples.
[0141] It should also be noted that in the systems and methods of this disclosure, the components or steps can be decomposed and / or recombined. These decompositions and / or recombinations should be considered as equivalent solutions to this disclosure.
[0142] Various changes, substitutions, and modifications can be made to the technology described herein without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims of this disclosure is not limited to the specific aspects of the processes, machines, manufactures, events, means, methods, and actions described above. Currently existing or later-developed processes, machines, manufactures, events, means, methods, or actions that perform substantially the same function or achieve substantially the same result as the corresponding aspects described herein can be utilized. Therefore, the appended claims include such processes, machines, manufactures, events, means, methods, or actions within their scope.
[0143] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of this disclosure. Therefore, this disclosure is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features disclosed herein.
[0144] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this disclosure to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations therein.
Claims
1. A human-computer verification method based on web images, characterized in that, include: Send an authentication request to the server and obtain the hash value of the random original image returned by the server in response to the authentication request; The hash value of the random original image is sent to the server, and a data packet carrying the hash value of the random original image and multiple puzzle links is received from the server, wherein the puzzle links include target links that are allowed to be accessed by users and randomly generated obfuscated links that are prohibited from being accessed by users. Remove the obfuscated links that fail to be accessed, and display the rotating fragments corresponding to the target links that are successfully accessed in sequence within the verification area; The process includes removing the obfuscated links that fail to access and sequentially displaying the rotated fragments corresponding to the successfully accessed target links within the verification area, including: The puzzle links are accessed sequentially according to the order in which they are arranged in the data packet; When the puzzle link is successfully accessed, the puzzle link is determined to be the target link, and the rotated piece obtained according to the target link is displayed in the corresponding position of the verification area; When the puzzle link access fails, the puzzle link is determined to be an obfuscated link and is removed. The process continues to access other puzzle links in the puzzle data package until all puzzle links are accessed. The rotated pieces obtained by accessing the puzzle links are then displayed sequentially at the corresponding positions in the verification area. The web image-based human-computer verification method also includes: Obtain several original images to be cut, wherein the original images to be cut do not include solid color images; The original image to be cut is cut into several puzzle pieces; The puzzle pieces are rotated according to preset rules to obtain rotated pieces, and the hash value of the original image, the URL address of the rotated pieces, and the preset restoration trajectory of the rotated pieces are stored as verification data on the server. The rotating fragments are restored sequentially to obtain restored images, and the restoration trajectory data of each rotating fragment during the restoration process is recorded. The restored trajectory data of the rotating fragment and the data packet carrying the hash value of the random original image are sent to the server, so that the server can verify the pre-stored preset restored trajectory and the restored trajectory data of the rotating fragment sent by the client based on the hash value of the received random original image.
2. The human-computer verification method based on web images according to claim 1, characterized in that, The restored image is obtained by sequentially performing restoration operations on the rotated fragments, including: Several properties are created for the several rotating fragments using JavaScript, wherein the property values of the several properties correspond sequentially to the rotation record values of the rotating fragments, and the initial value of the rotation record values is zero; The rotation operation is performed on each of the rotated fragments in sequence to obtain the restored fragments, and the rotation record value of each of the rotated fragments is saved; After the rotation is complete, the restored fragments are stitched together to obtain the restored image.
3. The human-computer verification method based on web images according to claim 2, characterized in that, The method further includes: Count the number of rotations of the rotating fragment during the rotation process; When the number of rotations is less than a preset threshold, the number of rotations is used as the rotation record value of the rotating fragment; When the number of rotations is greater than or equal to a preset threshold, the remainder of the number of rotations is calculated and used as the rotation record value of the rotating fragment.
4. The human-computer verification method based on web images according to claim 2, characterized in that, The restored trajectory data of the rotating fragment and a data packet carrying the hash value of the random original image are sent to the server, so that the server verifies the pre-stored preset restored trajectory and the restored trajectory data of the rotating fragment sent by the client based on the received hash value of the random original image, including: The created attribute values are concatenated into strings with preset identifiers as intervals; The concatenated string and the data packet carrying the hash value of the random original image are sent to the server, so that the server can verify the pre-stored preset restoration trajectory and the string representing the restoration trajectory data sent by the client based on the received hash value of the random original image; Receive the verification value returned by the server based on the successful verification result; Send an access request carrying the verification value to the server; Receive the target access page returned by the server if the verification value is correct; or, receive the historical access page returned by the server if the verification value is incorrect, displaying a verification failure result.
5. A human-computer verification method based on web images, characterized in that, include: In response to the client's authentication request, the system sends the hash value of a random original image to the client and receives the hash value of the random original image returned by the client. The system then sends a data packet to the client carrying the hash value of the random original image and multiple puzzle links, wherein the puzzle links include target links that allow users to access and randomly generated obfuscated links that prohibit users from accessing. In response to an access request for the obfuscated link, a blocked access page is returned; and in response to an access request for the target link, the rotating fragment corresponding to the target link is returned. The system receives the restoration trajectory data generated by the rotating fragment during the restoration operation and the data packet carrying the hash value of the random original image sent by the client, and verifies the pre-stored preset restoration trajectory and the restoration trajectory data of the rotating fragment sent by the client based on the hash value of the received random original image. The method further includes: Check if an update request for historical verification data has been received; When the update request is received, the historical verification data is automatically updated by the script, and the position and number of puzzle pieces in the updated verification data are different from the position and number of historical puzzle pieces in the historical verification data. The verification data includes the hash value of the original image to be cut, the URL address of the rotated fragment, and the preset restoration trajectory of the rotated fragment; wherein, the original image does not contain a solid color image, and the rotated fragment is obtained by rotating the jigsaw puzzle pieces cut from the original image.
6. A human-computer verification device based on web images, characterized in that, include: The first sending unit is configured to send an authentication request to the server and obtain the hash value of the random original image returned by the server in response to the authentication request; The receiving unit is configured to send the hash value of the random original image to the server and receive a data packet sent by the server carrying the hash value of the random original image and multiple puzzle links, wherein the puzzle links include target links that are allowed to be accessed by users and randomly generated obfuscated links that are prohibited from being accessed by users. The processing unit is configured to remove the obfuscated links that fail to be accessed, and to sequentially display the rotating fragments corresponding to the target links that are successfully accessed within the verification area. The process includes removing the obfuscated links that fail to access and sequentially displaying the rotated fragments corresponding to the successfully accessed target links within the verification area, including: The puzzle links are accessed sequentially according to the order in which they are arranged in the data packet; When the puzzle link is successfully accessed, the puzzle link is determined to be the target link, and the rotated piece obtained according to the target link is displayed in the corresponding position of the verification area; When the puzzle link access fails, the puzzle link is determined to be an obfuscated link and is removed. The process continues to access other puzzle links in the puzzle data package until all puzzle links are accessed. The rotated pieces obtained by accessing the puzzle links are then displayed sequentially at the corresponding positions in the verification area. Also includes: Obtain several original images to be cut, wherein the original images to be cut do not include solid color images; The original image to be cut is cut into several puzzle pieces; The puzzle pieces are rotated according to preset rules to obtain rotated pieces, and the hash value of the original image, the URL address of the rotated pieces, and the preset restoration trajectory of the rotated pieces are stored as verification data on the server. The image restoration unit is configured to sequentially perform restoration operations on the rotating fragments to obtain restored images, and record the restoration trajectory data of each rotating fragment during the restoration operation. The first verification unit is configured to send the restored trajectory data of the rotating fragment and a data packet carrying the hash value of the random original image to the server, so that the server can verify the pre-stored preset restoration trajectory and the restored trajectory data of the rotating fragment sent by the client based on the hash value of the received random original image.
7. A human-computer verification device based on web images, characterized in that, include: The second sending unit is configured to, in response to an authentication request from a client, send a hash value of a random original image to the client, receive a hash value of a random original image returned by the client, and send a data packet carrying the hash value of the random original image and multiple puzzle links to the client, wherein the puzzle links include target links that allow users to access and randomly generated obfuscated links that prohibit users from accessing. The third sending unit is configured to return a blocked page in response to an access request for the obfuscated link; and to return a rotating fragment corresponding to the target link in response to an access request for the target link. The second verification unit is configured to receive the restoration trajectory data generated by the rotating fragment during the restoration operation and the data packet carrying the hash value of the random original image sent by the client, and to verify the pre-stored preset restoration trajectory and the restoration trajectory data of the rotating fragment sent by the client according to the hash value of the received random original image. Also includes: Check if an update request for historical verification data has been received; When the update request is received, the historical verification data is automatically updated by the script, and the position and number of puzzle pieces in the updated verification data are different from the position and number of historical puzzle pieces in the historical verification data. The verification data includes the hash value of the original image to be cut, the URL address of the rotated fragment, and the preset restoration trajectory of the rotated fragment; wherein, the original image does not contain a solid color image, and the rotated fragment is obtained by rotating the jigsaw puzzle pieces cut from the original image.
Citation Information
Patent Citations
Mobile terminal-based jigsaw puzzle unlocking method and system
CN107066189A
Page information acquisition method and device, computer equipment and storage medium
CN108008898A
Picture verification method and device, electronic equipment and computer readable storage medium
CN110308847A
